FEATURE: style categories
This commit is contained in:
@@ -30,7 +30,6 @@ class CategoriesServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,9 +39,7 @@ class CategoriesServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->publishes([
|
||||
__DIR__ . '/../Config/config.php' => config_path('categories.php'),
|
||||
]);
|
||||
$this->publishes([__DIR__ . '/../Config/config.php' => config_path('categories.php')]);
|
||||
$this->mergeConfigFrom(__DIR__ . '/../Config/config.php', 'categories');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
@extends('admin.layout')
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', trans('categories::categories.edit'))
|
||||
|
||||
@section('content')
|
||||
<h2>@lang('categories::categories.edit')</h2>
|
||||
|
||||
@if (session('success'))
|
||||
<div data-alert class="callout success">
|
||||
<strong>{{ session('success') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div data-alert class="callout alert">
|
||||
<strong>{{ session('error') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('categories::admin.form', ['action' => route('categories.postEdit', ['id' => $category->id])])
|
||||
@endsection
|
||||
@@ -1,64 +1,67 @@
|
||||
<form action="{{$action}}" method="post">
|
||||
{!! csrf_field() !!}
|
||||
<div class="row">
|
||||
<div class="column large-5">
|
||||
<label>
|
||||
<div class="col-lg-5">
|
||||
<label class="label-control">
|
||||
@lang('categories::categories.fields.name')
|
||||
|
||||
<input type="text" name="name" class="slug-source" value="{{old('name', $category->name)}}">
|
||||
</label>
|
||||
|
||||
<input type="text" name="name" class="form-control slug-source" value="{{old('name', $category->name)}}">
|
||||
</div>
|
||||
<div class="column large-5">
|
||||
<div class="col-lg-5">
|
||||
<label>
|
||||
@lang('categories::categories.fields.url')
|
||||
|
||||
<input type="text" name="url" class="slug-target" value="{{old('url', $category->url)}}">
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<div class="column large-2 text-center">
|
||||
<label>
|
||||
@lang('admin/contents.lockUrl')<br />
|
||||
<input type="text" name="url" class="form-control slug-target" value="{{old('url', $category->url)}}">
|
||||
|
||||
<input type="checkbox" value="1" id="lockUrl"
|
||||
</div>
|
||||
<div class="col-lg-2 text-center">
|
||||
<div>
|
||||
<label>
|
||||
<input class="checkbox" value="1" id="lockUrl"
|
||||
@if(old('lockUrl') || ($category->id > 0 && \Illuminate\Support\Str::slug($category->name) != $category->url)) checked
|
||||
@endif name="lockUrl" />
|
||||
@endif name="lockUrl" type="checkbox">
|
||||
<span>@lang('admin/contents.lockUrl')</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label>
|
||||
<label class="label-control">
|
||||
@lang('categories::categories.fields.description')
|
||||
|
||||
<textarea name="description">{{old('description', $category->description)}}</textarea>
|
||||
</label>
|
||||
|
||||
<textarea class="form-control" name="description">{{old('description', $category->description)}}</textarea>
|
||||
|
||||
<div class="row">
|
||||
<div class="column large-6">
|
||||
<label>
|
||||
<div class="col-lg-6">
|
||||
<label class="label-control">
|
||||
@lang('categories::categories.fields.module')
|
||||
<select name="moduleId" @if($category->id) disabled @endif>
|
||||
</label>
|
||||
|
||||
<select class="form-control" name="moduleId" @if($category->id) disabled @endif>
|
||||
@foreach($modules as $module)
|
||||
<option @if($module->id == $category->module_id) selected
|
||||
@endif value="{{$module->id}}">{{trans($module->name)}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div class="column large-6">
|
||||
<div class="col-lg-6">
|
||||
@if(count($categories))
|
||||
<label>
|
||||
<label class="label-control">
|
||||
@lang('categories::categories.fields.parentCategory')
|
||||
<select name="parentCategory">
|
||||
<option value=""> ---</option>
|
||||
</label>
|
||||
|
||||
<select class="form-control" name="parentCategory">
|
||||
<option value="">@lang('admin/contents.noCategory')</option>
|
||||
@foreach($categories as $parentCategory)
|
||||
@include('categories::admin.snippets.optionParentCategories', ['level' => 0, 'selectedCategory' => $category, 'currentCategory' => $parentCategory])
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="button primary">@lang('categories::categories.fields.save')</button>
|
||||
<button type="submit" class="btn btn-primary">@lang('categories::categories.fields.save')</button>
|
||||
</form>
|
||||
@@ -1,19 +1,7 @@
|
||||
@extends('admin.layout')
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', trans('categories::categories.new'))
|
||||
|
||||
@section('content')
|
||||
<h2>@lang('categories::categories.new')</h2>
|
||||
|
||||
@if (session('success'))
|
||||
<div data-alert class="callout success">
|
||||
<strong>{{ session('success') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div data-alert class="callout alert">
|
||||
<strong>{{ session('error') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('categories::admin.form', ['action' => route('categories.postNew')])
|
||||
@endsection
|
||||
@@ -1,22 +1,10 @@
|
||||
@extends('admin.layout')
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', trans('categories::categories.overview'))
|
||||
|
||||
@section('content')
|
||||
<h2>@lang('categories::categories.overview')</h2>
|
||||
|
||||
@if (session('success'))
|
||||
<div data-alert class="callout success">
|
||||
<strong>{{ session('success') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div data-alert class="callout alert">
|
||||
<strong>{{ session('error') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(count($categories))
|
||||
<table class="full-width">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@lang('categories::categories.name')</th>
|
||||
@@ -31,6 +19,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<em>@lang('categories::categories.noCategories')</em>
|
||||
<div class="alert alert-info">
|
||||
@lang('categories::categories.noCategories')
|
||||
</div>
|
||||
@endif
|
||||
@stop
|
||||
Reference in New Issue
Block a user