commit
8bf70ecbc9
|
|
@ -84,12 +84,14 @@ class ContentDataGrid extends DataGrid
|
|||
'searchable' => true,
|
||||
'filterable' => true,
|
||||
'wrapper' => function($value) {
|
||||
if ($value->content_type == 'link')
|
||||
if ($value->content_type == 'category')
|
||||
return 'Category Slug';
|
||||
else if ($value->content_type == 'link')
|
||||
return 'Link';
|
||||
else if ($value->content_type == 'product')
|
||||
return 'Product';
|
||||
else if ($value->content_type == 'static')
|
||||
return 'Static';
|
||||
return 'Static';
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
class="control"
|
||||
name="page_link"
|
||||
v-validate="'required|max:150'"
|
||||
value="{{ isset($locale) ? (old($locale)['page_link'] ?: $content->translate($locale)['page_link']) : '' }}"
|
||||
value="{{ isset($locale) ? (old($locale)['page_link'] ?? $content->translate($locale)['page_link']) : '' }}"
|
||||
data-vv-as=""{{ __('velocity::app.admin.contents.content.page-link') }}"" />
|
||||
|
||||
<span class="control-error" v-if="errors.has('page_link')">
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
@push('scripts')
|
||||
<script type="text/x-template" id="catalog-product-template">
|
||||
<div>
|
||||
<?php $catalogType = old($locale)['catalog_type'] ?: $content->translate($locale)['catalog_type']; ?>
|
||||
<?php $catalogType = old($locale)['catalog_type'] ?? $content->translate($locale)['catalog_type']; ?>
|
||||
|
||||
<div class="control-group" :class="[errors.has('{{$locale}}[catalog_type]') ? 'has-error' : '']">
|
||||
<label for="catalog_type" class="required">
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
{{ __('velocity::app.admin.contents.page.title') }}
|
||||
<span class="locale">[{{ $locale }}]</span>
|
||||
</label>
|
||||
<input type="text" v-validate="'required|max:100'" class="control" id="title" name="{{$locale}}[title]" value="{{ old($locale)['title'] ?: $content->translate($locale)['title'] }}" data-vv-as=""{{ __('velocity::app.admin.contents.page.title') }}""/>
|
||||
<input type="text" v-validate="'required|max:100'" class="control" id="title" name="{{$locale}}[title]" value="{{ old($locale)['title'] ?? $content->translate($locale)['title'] }}" data-vv-as=""{{ __('velocity::app.admin.contents.page.title') }}""/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('{{$locale}}[title]')">@{{ errors.first('{!!$locale!!}[title]') }}</span>
|
||||
</div>
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
<label for="position" class="required">
|
||||
{{ __('velocity::app.admin.contents.page.position') }}</span>
|
||||
</label>
|
||||
<input type="text" v-validate="'required|numeric|max:2'" class="control" id="position" name="position" value="{{ old('position') ?: $content->position }}" data-vv-as=""{{ __('velocity::app.admin.contents.page.position') }}""/>
|
||||
<input type="text" v-validate="'required|numeric|max:2'" class="control" id="position" name="position" value="{{ old('position') ?? $content->position }}" data-vv-as=""{{ __('velocity::app.admin.contents.page.position') }}""/>
|
||||
<span class="control-error" v-if="errors.has('position')">@{{ errors.first('position') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
id="custom_title"
|
||||
v-validate="'max:100'"
|
||||
name="{{$locale}}[custom_title]"
|
||||
value="{{ old($locale)['custom_title'] ?: $content->translate($locale)['custom_title'] }}"
|
||||
value="{{ old($locale)['custom_title'] ?? ($content->translate($locale)['custom_title'] ?? '') }}"
|
||||
data-vv-as=""{{ __('velocity::app.admin.contents.content.custom-title') }}"" />
|
||||
|
||||
<span
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
id="custom_heading"
|
||||
v-validate="'max:100'"
|
||||
name="{{$locale}}[custom_heading]"
|
||||
value="{{ old($locale)['custom_heading'] ?: $content->translate($locale)['custom_title'] }}" data-vv-as=""{{ __('velocity::app.admin.contents.content.custom-heading') }}"" />
|
||||
value="{{ old($locale)['custom_heading'] ?? $content->translate($locale)['custom_title'] }}" data-vv-as=""{{ __('velocity::app.admin.contents.content.custom-heading') }}"" />
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
|
|
@ -217,7 +217,7 @@
|
|||
class="control"
|
||||
name="{{$locale}}[page_link]"
|
||||
v-validate="'required|max:150'"
|
||||
value="{{ old($locale)['page_link'] ?: $content->translate($locale)['page_link'] }}"
|
||||
value="{{ old($locale)['page_link'] ?? $content->translate($locale)['page_link'] }}"
|
||||
data-vv-as=""{{ __('velocity::app.admin.contents.content.page-link') }}"" />
|
||||
|
||||
<span
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
v-validate="'required'"
|
||||
name="{{$locale}}[description]"
|
||||
data-vv-as=""{{ __('velocity::app.admin.contents.content.static-description') }}"">
|
||||
{{ old($locale)['description'] ?: $content->translate($locale)['description'] }}
|
||||
{{ old($locale)['description'] ?? $content->translate($locale)['description'] }}
|
||||
</textarea>
|
||||
|
||||
<span
|
||||
|
|
|
|||
Loading…
Reference in New Issue