- @if ($debug_in_production)
@@ -825,25 +826,72 @@ dir="{{ Helper::determineLanguageDirection() }}"> @endif -
-

@yield('title')

+
- @if (isset($helpText)) - @include ('partials.more-info', - [ - 'helpText' => $helpText, - 'helpPosition' => (isset($helpPosition)) ? $helpPosition : 'left' - ]) - @endif -
- @yield('header_right') + +
+
+ + + +

+ + @if (Breadcrumbs::has() && (Breadcrumbs::current()->count() > 1)) + + @else + @yield('title') + @endif + +

+ + @if (isset($helpText)) + @include ('partials.more-info', + [ + 'helpText' => $helpText, + 'helpPosition' => (isset($helpPosition)) ? $helpPosition : 'left' + ]) + @endif +
+ @yield('header_right') +
+ +
- -
-
+
diff --git a/resources/views/livewire/category-edit-form.blade.php b/resources/views/livewire/category-edit-form.blade.php index cb80eb45d..82dbf57e8 100644 --- a/resources/views/livewire/category-edit-form.blade.php +++ b/resources/views/livewire/category-edit-form.blade.php @@ -3,7 +3,12 @@
- {{ Form::textarea('eula_text', null, ['wire:model.live' => 'eulaText', 'class' => 'form-control', 'aria-label'=>'eula_text', 'disabled' => $this->eulaTextDisabled]) }} +

{!! trans('admin/categories/general.eula_text_help') !!}

{!! trans('admin/settings/general.eula_markdown') !!}

{!! $errors->first('eula_text', '') !!} diff --git a/resources/views/livewire/slack-settings-form.blade.php b/resources/views/livewire/slack-settings-form.blade.php index 76b398722..48e0fb72a 100644 --- a/resources/views/livewire/slack-settings-form.blade.php +++ b/resources/views/livewire/slack-settings-form.blade.php @@ -83,7 +83,7 @@
- {{ Form::label('webhook_endpoint', trans('admin/settings/general.webhook_endpoint',['app' => $webhook_name ])) }} +
@@ -100,7 +100,7 @@ @if($webhook_selected != 'microsoft' && $webhook_selected!= 'google')
- {{ Form::label('webhook_channel', trans('admin/settings/general.webhook_channel',['app' => $webhook_name ])) }} +
@@ -118,7 +118,7 @@ @if($webhook_selected != 'microsoft' && $webhook_selected != 'google')
- {{ Form::label('webhook_botname', trans('admin/settings/general.webhook_botname',['app' => $webhook_name ])) }} +
diff --git a/resources/views/locations/edit.blade.php b/resources/views/locations/edit.blade.php index 4b4e655a5..004053d8a 100755 --- a/resources/views/locations/edit.blade.php +++ b/resources/views/locations/edit.blade.php @@ -57,6 +57,23 @@
@endif + @include ('partials.forms.edit.image-upload', ['image_path' => app('locations_upload_path')]) + +
+ +
+ + {!! $errors->first('notes', '') !!} +
+
+ @stop diff --git a/resources/views/locations/print.blade.php b/resources/views/locations/print.blade.php index 9f54978ff..a047f0227 100644 --- a/resources/views/locations/print.blade.php +++ b/resources/views/locations/print.blade.php @@ -126,7 +126,7 @@ @foreach ($assets as $asset) @php - if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus->archived == 1){ + if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus?->archived == 1){ continue; } @endphp diff --git a/resources/views/locations/view.blade.php b/resources/views/locations/view.blade.php index b71167646..b10cb315e 100644 --- a/resources/views/locations/view.blade.php +++ b/resources/views/locations/view.blade.php @@ -314,11 +314,13 @@
-

- Assigned Accessories -

+ +

+ {{ trans('general.accessories_assigned') }} +

+ app('manufacturers_upload_path')]) +
+ +
+ + {!! $errors->first('notes', '') !!} +
+
+ @stop diff --git a/resources/views/modals/add-note.blade.php b/resources/views/modals/add-note.blade.php new file mode 100644 index 000000000..8208fc36a --- /dev/null +++ b/resources/views/modals/add-note.blade.php @@ -0,0 +1,35 @@ +{{-- See snipeit_modals.js for what powers this --}} + diff --git a/resources/views/modals/upload-file.blade.php b/resources/views/modals/upload-file.blade.php index c5816bf17..caeac9a76 100644 --- a/resources/views/modals/upload-file.blade.php +++ b/resources/views/modals/upload-file.blade.php @@ -6,11 +6,13 @@ - {{ Form::open([ - 'method' => 'POST', - 'route' => ['upload/'.$item_type, $item_id], - 'files' => true, - 'class' => 'form-horizontal' ]) }} +
- {{ Form::textarea('notes', old('notes', old('notes')), ['class' => 'form-control','placeholder' => 'Notes (Optional)', 'rows'=>3, 'aria-label' => 'file']) }} +
@@ -40,7 +48,7 @@ {{ trans('button.cancel') }} - {{ Form::close() }} + diff --git a/resources/views/models/bulk-edit.blade.php b/resources/views/models/bulk-edit.blade.php index 8a053b048..7a283fbba 100644 --- a/resources/views/models/bulk-edit.blade.php +++ b/resources/views/models/bulk-edit.blade.php @@ -84,15 +84,15 @@
diff --git a/resources/views/models/custom_fields_form.blade.php b/resources/views/models/custom_fields_form.blade.php index 4949fae71..325540c6e 100644 --- a/resources/views/models/custom_fields_form.blade.php +++ b/resources/views/models/custom_fields_form.blade.php @@ -1,10 +1,18 @@ @if (($model) && ($model->fieldset)) @foreach($model->fieldset->fields AS $field) + @if ( + ((!isset($show_display_checkin_fields)) + || (($field->display_checkin == '1') + && ($show_display_checkin_fields =='true'))) && + ((!isset($show_display_checkout_fields)) + || (($field->display_checkout == '1') + && ($show_display_checkout_fields =='true'))) + ) +
- @if ($field->element!='text') @if ($field->element=='listbox') @@ -83,6 +91,7 @@
+ @endif @endforeach @endif diff --git a/resources/views/models/index.blade.php b/resources/views/models/index.blade.php index cc2986cb8..6f3f5e78d 100755 --- a/resources/views/models/index.blade.php +++ b/resources/views/models/index.blade.php @@ -62,7 +62,6 @@
- {{ Form::close() }}
diff --git a/resources/views/models/view.blade.php b/resources/views/models/view.blade.php index f26b9babd..f3475e663 100755 --- a/resources/views/models/view.blade.php +++ b/resources/views/models/view.blade.php @@ -31,7 +31,18 @@
+ + @if ($model->deleted_at!='') +
+
+ + {{ trans('admin/models/general.deleted') }} +
+
+ @endif +
+ -
+
@@ -154,6 +164,24 @@ @endif + @if ($model->created_by) +
  • {{ trans('general.created_by') }}: + {{ $model->adminuser->present()->name() }} +
  • + @endif + + @if ($model->deleted_at) +
  • + + + {{ trans('general.deleted') }}: + {{ Helper::getFormattedDateObject($model->deleted_at, 'datetime', false) }} + + + +
  • + @endif + @if ($model->min_amt)
  • {{ trans('general.min_amt') }}: {{$model->min_amt }} @@ -244,7 +272,7 @@
  • @can('update', \App\Models\AssetModel::class)
    - + {{ trans('admin/models/table.edit') }} diff --git a/resources/views/partials/asset-bulk-actions.blade.php b/resources/views/partials/asset-bulk-actions.blade.php index 992fb52bb..dec9b0f29 100644 --- a/resources/views/partials/asset-bulk-actions.blade.php +++ b/resources/views/partials/asset-bulk-actions.blade.php @@ -1,10 +1,12 @@
    -{{ Form::open([ - 'method' => 'POST', - 'route' => ['hardware/bulkedit'], - 'class' => 'form-inline', - 'id' => (isset($id_formname)) ? $id_formname : 'assetsBulkForm', - ]) }} +
    + @csrf {{-- The sort and order will only be used if the cookie is actually empty (like on first-use) --}} @@ -34,5 +36,5 @@ - {{ Form::close() }} +
    diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index 099640f0b..70c10edff 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -39,66 +39,93 @@ return htmlData } $(this).bootstrapTable({ - classes: 'table table-responsive table-no-bordered', - ajaxOptions: { - headers: { - 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') - } - }, - // reorderableColumns: true, - stickyHeader: true, - stickyHeaderOffsetLeft: parseInt($('body').css('padding-left'), 10), - stickyHeaderOffsetRight: parseInt($('body').css('padding-right'), 10), - undefinedText: '', - iconsPrefix: 'fa', - cookieStorage: '{{ config('session.bs_table_storage') }}', - cookie: true, - cookieExpire: '2y', - showColumnsToggleAll: true, - minimumCountColumns: 2, - mobileResponsive: true, - maintainSelected: true, - trimOnSearch: false, - showSearchClearButton: true, - addrbar: {{ (config('session.bs_table_addrbar') == 'true') ? 'true' : 'false'}}, // deeplink search phrases, sorting, etc - paginationFirstText: "{{ trans('general.first') }}", - paginationLastText: "{{ trans('general.last') }}", - paginationPreText: "{{ trans('general.previous') }}", - paginationNextText: "{{ trans('general.next') }}", - pageList: ['10','20', '30','50','100','150','200'{!! ((config('app.max_results') > 200) ? ",'500'" : '') !!}{!! ((config('app.max_results') > 500) ? ",'".config('app.max_results')."'" : '') !!}], - pageSize: {{ (($snipeSettings->per_page!='') && ($snipeSettings->per_page > 0)) ? $snipeSettings->per_page : 20 }}, - paginationVAlign: 'both', - queryParams: function (params) { - var newParams = {}; - for(var i in params) { - if(!keyBlocked(i)) { // only send the field if it's not in blockedFields - newParams[i] = params[i]; + classes: 'table table-responsive table-no-bordered', + ajaxOptions: { + headers: { + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } + }, + // reorderableColumns: true, + stickyHeader: true, + stickyHeaderOffsetLeft: parseInt($('body').css('padding-left'), 10), + stickyHeaderOffsetRight: parseInt($('body').css('padding-right'), 10), + undefinedText: '', + iconsPrefix: 'fa', + cookieStorage: '{{ config('session.bs_table_storage') }}', + cookie: true, + cookieExpire: '2y', + showColumnsToggleAll: true, + minimumCountColumns: 2, + mobileResponsive: true, + maintainSelected: true, + trimOnSearch: false, + showSearchClearButton: true, + addrbar: {{ (config('session.bs_table_addrbar') == 'true') ? 'true' : 'false'}}, // deeplink search phrases, sorting, etc + paginationFirstText: "{{ trans('general.first') }}", + paginationLastText: "{{ trans('general.last') }}", + paginationPreText: "{{ trans('general.previous') }}", + paginationNextText: "{{ trans('general.next') }}", + pageList: ['10', '20', '30', '50', '100', '150', '200'{!! ((config('app.max_results') > 200) ? ",'500'" : '') !!}{!! ((config('app.max_results') > 500) ? ",'".config('app.max_results')."'" : '') !!}], + pageSize: {{ (($snipeSettings->per_page!='') && ($snipeSettings->per_page > 0)) ? $snipeSettings->per_page : 20 }}, + paginationVAlign: 'both', + queryParams: function (params) { + var newParams = {}; + for (var i in params) { + if (!keyBlocked(i)) { // only send the field if it's not in blockedFields + newParams[i] = params[i]; + } + } + return newParams; + }, + formatLoadingMessage: function () { + return '

    {{ trans('general.loading') }}

    '; + }, + icons: { + advancedSearchIcon: 'fas fa-search-plus', + paginationSwitchDown: 'fa-caret-square-o-down', + paginationSwitchUp: 'fa-caret-square-o-up', + fullscreen: 'fa-expand', + columns: 'fa-columns', + refresh: 'fas fa-sync-alt', + export: 'fa-download', + clearSearch: 'fa-times' + }, + locale: '{{ app()->getLocale() }}', + exportOptions: export_options, + exportTypes: ['xlsx', 'excel', 'csv', 'pdf', 'json', 'xml', 'txt', 'sql', 'doc'], + onLoadSuccess: function () { // possible 'fixme'? this might be for contents, not for headers? + $('[data-tooltip="true"]').tooltip(); // Needed to attach tooltips after ajax call + }, + onPostHeader: function () { + var lookup = {}; + var lookup_initialized = false; + var ths = $('th'); + ths.each(function (index, element) { + th = $(element); + //only populate the lookup table once; don't need to keep doing it. + if (!lookup_initialized) { + // th -> tr -> thead -> table + var table = th.parent().parent().parent() + var column_data = table.data('columns') + for (var column in column_data) { + lookup[column_data[column].field] = column_data[column].titleTooltip; + } + lookup_initialized = true + } + + field = th.data('field'); // find fieldname this column refers to + title = lookup[field]; + if (title) { + th.attr('data-toggle', 'tooltip'); + th.attr('data-placement', 'top'); + // th.attr('title', title) //this causes 'double-titles' which looks gross + th.tooltip({container: 'body', title: title}); + } + }) + }, + formatNoMatches: function () { + return '{{ trans('table.no_matching_records') }}'; } - return newParams; - }, - formatLoadingMessage: function () { - return '

    {{ trans('general.loading') }}

    '; - }, - icons: { - advancedSearchIcon: 'fas fa-search-plus', - paginationSwitchDown: 'fa-caret-square-o-down', - paginationSwitchUp: 'fa-caret-square-o-up', - fullscreen: 'fa-expand', - columns: 'fa-columns', - refresh: 'fas fa-sync-alt', - export: 'fa-download', - clearSearch: 'fa-times' - }, - locale: '{{ app()->getLocale() }}', - exportOptions: export_options, - exportTypes: ['xlsx', 'excel', 'csv', 'pdf','json', 'xml', 'txt', 'sql', 'doc' ], - onLoadSuccess: function () { - $('[data-tooltip="true"]').tooltip(); // Needed to attach tooltips after ajax call - }, - formatNoMatches: function () { - return '{{ trans('table.no_matching_records') }}'; - } }); @@ -290,9 +317,6 @@ var dest = 'admin/groups'; } - if (dest =='maintenances') { - var dest = 'hardware/maintenances'; - } if(element_name != '') { dest = dest + '/' + row.owner_id + '/' + element_name; diff --git a/resources/views/partials/forms/checkout-selector.blade.php b/resources/views/partials/forms/checkout-selector.blade.php index 268089a7d..4fb4ccbd8 100644 --- a/resources/views/partials/forms/checkout-selector.blade.php +++ b/resources/views/partials/forms/checkout-selector.blade.php @@ -1,5 +1,5 @@
    - {{ Form::label('checkout_to_type', trans('admin/hardware/form.checkout_to'), array('class' => 'col-md-3 control-label')) }} +
    @if ((isset($user_select)) && ($user_select!='false')) diff --git a/resources/views/partials/forms/edit/accessory-select.blade.php b/resources/views/partials/forms/edit/accessory-select.blade.php index d34b6b2fe..e047d16d2 100644 --- a/resources/views/partials/forms/edit/accessory-select.blade.php +++ b/resources/views/partials/forms/edit/accessory-select.blade.php @@ -1,6 +1,6 @@
    - {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} +
    {!! $errors->first('address', '') !!}
    @@ -9,30 +9,30 @@
    - {{Form::text('address2', old('address2', $item->address2), array('class' => 'form-control', 'aria-label'=>'address2', 'maxlength'=>'191')) }} + {!! $errors->first('address2', '') !!}
    - {{ Form::label('city', trans('general.city'), array('class' => 'col-md-3 control-label')) }} +
    - {{Form::text('city', old('city', $item->city), array('class' => 'form-control', 'aria-label'=>'city', 'maxlength'=>'191')) }} + {!! $errors->first('city', '') !!}
    - {{ Form::label('state', trans('general.state'), array('class' => 'col-md-3 control-label')) }} +
    - {{Form::text('state', old('state', $item->state), array('class' => 'form-control', 'aria-label'=>'state', 'maxlength'=>'191')) }} + {!! $errors->first('state', '') !!}
    - {{ Form::label('country', trans('general.country'), array('class' => 'col-md-3 control-label')) }} +
    {!! Form::countries('country', old('country', $item->country), 'select2') !!}

    {{ trans('general.countries_manually_entered_help') }}

    @@ -41,9 +41,9 @@
    - {{ Form::label('zip', trans('general.zip'), array('class' => 'col-md-3 control-label', 'maxlength'=>'10')) }} +
    - {{Form::text('zip', old('zip', $item->zip), array('class' => 'form-control')) }} + {!! $errors->first('zip', '') !!}
    diff --git a/resources/views/partials/forms/edit/asset-select.blade.php b/resources/views/partials/forms/edit/asset-select.blade.php index 9867a8e55..6a8c72957 100644 --- a/resources/views/partials/forms/edit/asset-select.blade.php +++ b/resources/views/partials/forms/edit/asset-select.blade.php @@ -1,7 +1,7 @@
    - {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} +
    diff --git a/resources/views/partials/forms/edit/company.blade.php b/resources/views/partials/forms/edit/company.blade.php index 22cb62358..767bdeb9f 100644 --- a/resources/views/partials/forms/edit/company.blade.php +++ b/resources/views/partials/forms/edit/company.blade.php @@ -1,7 +1,7 @@ @if (\App\Models\Company::isCurrentUserAuthorized())
    - {{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label', 'for' => 'company_id')) }} +
    {{ Form::select('company_id', $company_list , old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%', 'required' => Helper::checkIfRequired($item, 'company_id') ? true : '')) }} diff --git a/resources/views/partials/forms/edit/consumable-select.blade.php b/resources/views/partials/forms/edit/consumable-select.blade.php index d2d084d0b..ccc8030a7 100644 --- a/resources/views/partials/forms/edit/consumable-select.blade.php +++ b/resources/views/partials/forms/edit/consumable-select.blade.php @@ -1,6 +1,6 @@
    - {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} +
    diff --git a/resources/views/partials/forms/edit/department-select.blade.php b/resources/views/partials/forms/edit/department-select.blade.php index f0fc16dd6..0648f991d 100644 --- a/resources/views/partials/forms/edit/department-select.blade.php +++ b/resources/views/partials/forms/edit/department-select.blade.php @@ -1,6 +1,6 @@
    - {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} +
    {!! $errors->first('fax', '') !!}
    -
    \ No newline at end of file +
    diff --git a/resources/views/partials/forms/edit/kit-select.blade.php b/resources/views/partials/forms/edit/kit-select.blade.php index d8c6ba101..cd1801f16 100644 --- a/resources/views/partials/forms/edit/kit-select.blade.php +++ b/resources/views/partials/forms/edit/kit-select.blade.php @@ -1,6 +1,6 @@
    - {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} +
    diff --git a/resources/views/partials/forms/edit/location-profile-select.blade.php b/resources/views/partials/forms/edit/location-profile-select.blade.php index 14dc4793a..f3db9ad9b 100644 --- a/resources/views/partials/forms/edit/location-profile-select.blade.php +++ b/resources/views/partials/forms/edit/location-profile-select.blade.php @@ -1,7 +1,7 @@
    - {{ Form::label('location_id', $translated_name, array('class' => 'col-md-3 control-label')) }} +
    @isset($selected) diff --git a/resources/views/partials/forms/edit/manufacturer-select.blade.php b/resources/views/partials/forms/edit/manufacturer-select.blade.php index c8cafddf8..44e831fd5 100644 --- a/resources/views/partials/forms/edit/manufacturer-select.blade.php +++ b/resources/views/partials/forms/edit/manufacturer-select.blade.php @@ -1,7 +1,7 @@
    - {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} +
    diff --git a/resources/views/partials/forms/edit/notes.blade.php b/resources/views/partials/forms/edit/notes.blade.php index f6b08ea1a..5f82616c2 100644 --- a/resources/views/partials/forms/edit/notes.blade.php +++ b/resources/views/partials/forms/edit/notes.blade.php @@ -1,6 +1,6 @@
    - +
    {!! $errors->first('notes', '') !!} diff --git a/resources/views/partials/forms/edit/phone.blade.php b/resources/views/partials/forms/edit/phone.blade.php index 1a9d407a1..af6ad8388 100644 --- a/resources/views/partials/forms/edit/phone.blade.php +++ b/resources/views/partials/forms/edit/phone.blade.php @@ -1,7 +1,7 @@
    - {{ Form::label('phone', trans('admin/suppliers/table.phone'), array('class' => 'col-md-3 control-label')) }} +
    - {{Form::text('phone', old('phone', $item->phone), array('class' => 'form-control', 'aria-label'=>'phone', 'maxlength'=>'191')) }} + {!! $errors->first('phone', '') !!}
    diff --git a/resources/views/partials/forms/edit/status-select.blade.php b/resources/views/partials/forms/edit/status-select.blade.php index ae4a4f2d1..bd1fb5014 100644 --- a/resources/views/partials/forms/edit/status-select.blade.php +++ b/resources/views/partials/forms/edit/status-select.blade.php @@ -1,7 +1,7 @@
    - {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} +
    diff --git a/resources/views/partials/forms/edit/user-select.blade.php b/resources/views/partials/forms/edit/user-select.blade.php index 629e94239..e73d09def 100644 --- a/resources/views/partials/forms/edit/user-select.blade.php +++ b/resources/views/partials/forms/edit/user-select.blade.php @@ -1,6 +1,6 @@
    - {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} +
    -

    Fields

    +

    {{trans('general.fields')}}