mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
multiple saved reports, beginning of dynamic dropdown listing/queried url
This commit is contained in:
parent
bd86c5430c
commit
e636d7b9d5
|
@ -388,7 +388,7 @@ class ReportsController extends Controller
|
|||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function getCustomReport()
|
||||
public function getCustomReport(Request $request)
|
||||
{
|
||||
$this->authorize('reports.view');
|
||||
$customfields = CustomField::get();
|
||||
|
@ -398,7 +398,7 @@ class ReportsController extends Controller
|
|||
'customfields' => $customfields,
|
||||
'saved_reports' => $saved_reports,
|
||||
// @todo: temporary
|
||||
'savedReport' => $saved_reports->first(),
|
||||
'savedReport' => $saved_reports->find($request->input('report')),
|
||||
// 'savedReport' => new SavedReport,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -386,17 +386,18 @@
|
|||
</form>
|
||||
</div>
|
||||
<div style=padding-bottom:5px>
|
||||
<a href="#" class="js-data-ajax" data-toggle="dropdown" tabindex="-1" data-placeholder="{{ trans('admin/reports/general.saved_reports')}}" style="width:100%">
|
||||
{{ trans('admin/reports/general.select_template') }}
|
||||
<strong class="caret"></strong>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
{{-- <a href="#" class="js-data-ajax" data-toggle="dropdown" tabindex="-1" data-placeholder="{{ trans('admin/reports/general.saved_reports')}}" style="width:100%">--}}
|
||||
{{-- {{ trans('admin/reports/general.select_template') }}--}}
|
||||
{{-- <strong class="caret"></strong>--}}
|
||||
{{-- </a>--}}
|
||||
{{-- {!! Form::select('brand', array('1'=>'Text','2'=>'Logo','3'=>'Logo + Text'), old('brand', $setting->brand), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}--}}
|
||||
<select class="form-control select2">
|
||||
@foreach($saved_reports as $report)
|
||||
<li>
|
||||
<option>
|
||||
{{ $report->name }}
|
||||
</li>
|
||||
</option>
|
||||
@endforeach
|
||||
</ul>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue