diff --git a/resources/views/products/index.blade.php b/resources/views/products/index.blade.php index 998cc5a..ac6476d 100644 --- a/resources/views/products/index.blade.php +++ b/resources/views/products/index.blade.php @@ -1,15 +1,15 @@ @extends('layouts.app') -@section('title', trans('product.list')) +@section('title', __('product.list')) @section('content')
- {{ link_to_route('products.price-list', trans('product.print_price_list'), [], ['class' => 'btn btn-info']) }} - {{ link_to_route('products.index', trans('product.create'), ['action' => 'create'], ['class' => 'btn btn-success']) }} + {{ link_to_route('products.price-list', __('product.print_price_list'), [], ['class' => 'btn btn-info']) }} + {{ link_to_route('products.index', __('product.create'), ['action' => 'create'], ['class' => 'btn btn-success']) }}
@@ -17,24 +17,24 @@
{{ Form::open(['method' => 'get','class' => 'form-inline']) }} - {!! FormField::text('q', ['value' => request('q'), 'label' => trans('product.search'), 'class' => 'input-sm']) !!} - {{ Form::submit(trans('product.search'), ['class' => 'btn btn-sm']) }} - {{ link_to_route('products.index', trans('app.reset')) }} + {!! FormField::text('q', ['value' => request('q'), 'label' => __('product.search'), 'class' => 'input-sm']) !!} + {{ Form::submit(__('product.search'), ['class' => 'btn btn-sm']) }} + {{ link_to_route('products.index', __('app.reset')) }} {{ Form::close() }}
- - - - - - + + + + + + - + @foreach($products as $key => $product) @@ -43,14 +43,14 @@ @endforeach
{{ trans('app.table_no') }}{{ trans('product.name') }}{{ trans('product.unit') }}{{ trans('product.cash_price') }}{{ trans('product.credit_price') }}{{ trans('app.action') }}{{ __('app.table_no') }}{{ __('product.name') }}{{ __('product.unit') }}{{ __('product.cash_price') }}{{ __('product.credit_price') }}{{ __('app.action') }}
{{ $products->firstItem() + $key }}{{ formatRp($product->cash_price) }} {{ formatRp($product->credit_price) }} - {!! link_to_route('products.index', trans('app.edit'), ['action' => 'edit', 'id' => $product->id] + Request::only('page','q'), ['id' => 'edit-product-' . $product->id]) !!} | - {!! link_to_route('products.index', trans('app.delete'), ['action' => 'delete', 'id' => $product->id] + Request::only('page','q'), ['id' => 'del-product-' . $product->id]) !!} + {!! link_to_route('products.index', __('app.edit'), ['action' => 'edit', 'id' => $product->id] + request(['page','q']), ['id' => 'edit-product-' . $product->id]) !!} | + {!! link_to_route('products.index', __('app.delete'), ['action' => 'delete', 'id' => $product->id] + request(['page','q']), ['id' => 'del-product-' . $product->id]) !!}
-
{!! str_replace('/?', '?', $products->appends(Request::except('page'))->render()) !!}
+
{{ $products->appends(Request::except('page'))->render() }}
diff --git a/resources/views/products/partials/forms.blade.php b/resources/views/products/partials/forms.blade.php index 82e35bb..a1c886e 100644 --- a/resources/views/products/partials/forms.blade.php +++ b/resources/views/products/partials/forms.blade.php @@ -1,58 +1,58 @@ @inject('unit', 'App\Unit') @if (Request::get('action') == 'create') {!! Form::open(['route' => 'products.store']) !!} - {!! FormField::text('name', ['label' => trans('product.name'), 'required' => true]) !!} + {!! FormField::text('name', ['label' => __('product.name'), 'required' => true]) !!}
-
{!! FormField::price('cash_price', ['label' => trans('product.cash_price'), 'required' => true]) !!}
-
{!! FormField::price('credit_price', ['label' => trans('product.credit_price')]) !!}
+
{!! FormField::price('cash_price', ['label' => __('product.cash_price'), 'required' => true]) !!}
+
{!! FormField::price('credit_price', ['label' => __('product.credit_price')]) !!}
- {!! FormField::select('unit_id', $unit->pluck('name','id'), ['label' => trans('product.unit'), 'required' => true]) !!} - {!! Form::submit(trans('product.create'), ['class' => 'btn btn-success']) !!} - {{ link_to_route('products.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }} + {!! FormField::select('unit_id', $unit->pluck('name','id'), ['label' => __('product.unit'), 'required' => true]) !!} + {!! Form::submit(__('product.create'), ['class' => 'btn btn-success']) !!} + {{ link_to_route('products.index', __('app.cancel'), [], ['class' => 'btn btn-default']) }} {!! Form::close() !!} @endif @if (Request::get('action') == 'edit' && $editableProduct) {!! Form::model($editableProduct, ['route' => ['products.update', $editableProduct->id],'method' => 'patch']) !!} - {!! FormField::text('name', ['label' => trans('product.name'), 'required' => true]) !!} + {!! FormField::text('name', ['label' => __('product.name'), 'required' => true]) !!}
-
{!! FormField::price('cash_price', ['label' => trans('product.cash_price'), 'required' => true]) !!}
-
{!! FormField::price('credit_price', ['label' => trans('product.credit_price')]) !!}
+
{!! FormField::price('cash_price', ['label' => __('product.cash_price'), 'required' => true]) !!}
+
{!! FormField::price('credit_price', ['label' => __('product.credit_price')]) !!}
- {!! FormField::select('unit_id', $unit->pluck('name','id'), ['label' => trans('product.unit'), 'required' => true]) !!} + {!! FormField::select('unit_id', $unit->pluck('name','id'), ['label' => __('product.unit'), 'required' => true]) !!} @if (request('q')) {{ Form::hidden('q', request('q')) }} @endif @if (request('page')) {{ Form::hidden('page', request('page')) }} @endif - {!! Form::submit(trans('product.update'), ['class' => 'btn btn-success']) !!} - {{ link_to_route('products.index', trans('app.cancel'), Request::only('q'), ['class' => 'btn btn-default']) }} + {!! Form::submit(__('product.update'), ['class' => 'btn btn-success']) !!} + {{ link_to_route('products.index', __('app.cancel'), Request::only('q'), ['class' => 'btn btn-default']) }} {!! Form::close() !!} @endif @if (Request::get('action') == 'delete' && $editableProduct)
-

{{ trans('product.delete') }}

+

{{ __('product.delete') }}

- - - - + + + +
{{ trans('product.name') }}{{ $editableProduct->name }}
{{ trans('product.unit') }}{{ $editableProduct->unit->name }}
{{ trans('product.cash_price') }}{{ formatRp($editableProduct->cash_price) }}
{{ trans('product.credit_price') }}{{ formatRp($editableProduct->credit_price) }}
{{ __('product.name') }}{{ $editableProduct->name }}
{{ __('product.unit') }}{{ $editableProduct->unit->name }}
{{ __('product.cash_price') }}{{ formatRp($editableProduct->cash_price) }}
{{ __('product.credit_price') }}{{ formatRp($editableProduct->credit_price) }}

- {{ trans('product.delete_confirm') }} + {{ __('product.delete_confirm') }}
@endif diff --git a/resources/views/products/price-list.blade.php b/resources/views/products/price-list.blade.php index 9766ac7..7b45004 100644 --- a/resources/views/products/price-list.blade.php +++ b/resources/views/products/price-list.blade.php @@ -1,6 +1,6 @@ @extends('layouts.pdf') -@section('title', trans('product.price_list') . ' (per ' . date('Y-m-d H:i') . ')') +@section('title', __('product.price_list') . ' (per ' . date('Y-m-d H:i') . ')') @section('content') @@ -8,7 +8,7 @@ -

{{ trans('product.price_list') }} - {{ config('store.name') }}

+

{{ __('product.price_list') }} - {{ config('store.name') }}

Per: {{ date('Y-m-d H:i') }}


@@ -34,4 +34,4 @@ @endforeach -@endsection \ No newline at end of file +@endsection