Browse Source

Change trans helper to __()

pull/68/head
Nafies Luthfi 5 years ago
parent
commit
28544ae4eb
  1. 56
      resources/views/bank-accounts/forms.blade.php
  2. 12
      resources/views/customers/edit.blade.php
  3. 26
      resources/views/customers/index.blade.php
  4. 10
      resources/views/invoices/partials/item-list.blade.php
  5. 16
      resources/views/options/index.blade.php

56
resources/views/bank-accounts/forms.blade.php

@ -1,66 +1,66 @@
@if (Request::get('action') == 'create')
@if (request('action') == 'create')
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('bank_account.create') }}</h3></div>
<div class="panel-heading"><h3 class="panel-title">{{ __('bank_account.create') }}</h3></div>
{!! Form::open(['route' => 'bank-accounts.store']) !!}
<div class="panel-body">
{!! FormField::text('name', ['required' => true, 'label' => trans('bank_account.name')]) !!}
{!! FormField::text('number', ['required' => true, 'label' => trans('bank_account.number')]) !!}
{!! FormField::text('account_name', ['required' => true, 'label' => trans('bank_account.account_name')]) !!}
{!! FormField::textarea('description', ['label' => trans('bank_account.description')]) !!}
{!! FormField::text('name', ['required' => true, 'label' => __('bank_account.name')]) !!}
{!! FormField::text('number', ['required' => true, 'label' => __('bank_account.number')]) !!}
{!! FormField::text('account_name', ['required' => true, 'label' => __('bank_account.account_name')]) !!}
{!! FormField::textarea('description', ['label' => __('bank_account.description')]) !!}
</div>
<div class="panel-footer">
{!! Form::submit(trans('bank_account.create'), ['class' => 'btn btn-success']) !!}
{{ link_to_route('bank-accounts.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }}
{!! Form::submit(__('bank_account.create'), ['class' => 'btn btn-success']) !!}
{{ link_to_route('bank-accounts.index', __('app.cancel'), [], ['class' => 'btn btn-default']) }}
</div>
{!! Form::close() !!}
</div>
@endif
@if (Request::get('action') == 'edit' && $editableBankAccount)
@if (request('action') == 'edit' && $editableBankAccount)
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('bank_account.edit') }}</h3></div>
{!! Form::model($editableBankAccount, ['route' => ['bank-accounts.update', request('id')], 'method' => 'patch']) !!}
<div class="panel-heading"><h3 class="panel-title">{{ __('bank_account.edit') }}</h3></div>
{!! Form::model($editableBankAccount, ['route' => ['bank-accounts.update', $editableBankAccount->id], 'method' => 'patch']) !!}
<div class="panel-body">
{!! FormField::text('name', ['required' => true, 'label' => trans('bank_account.name')]) !!}
{!! FormField::text('number', ['required' => true, 'label' => trans('bank_account.number')]) !!}
{!! FormField::text('account_name', ['required' => true, 'label' => trans('bank_account.account_name')]) !!}
{!! FormField::textarea('description', ['label' => trans('bank_account.description')]) !!}
{!! FormField::text('name', ['required' => true, 'label' => __('bank_account.name')]) !!}
{!! FormField::text('number', ['required' => true, 'label' => __('bank_account.number')]) !!}
{!! FormField::text('account_name', ['required' => true, 'label' => __('bank_account.account_name')]) !!}
{!! FormField::textarea('description', ['label' => __('bank_account.description')]) !!}
{!! FormField::radios('is_active', [__('app.in_active'), __('app.active')], ['label' => __('app.status')]) !!}
</div>
<div class="panel-footer">
{!! Form::submit(trans('bank_account.update'), ['class' => 'btn btn-success']) !!}
{{ link_to_route('bank-accounts.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }}
{!! Form::submit(__('bank_account.update'), ['class' => 'btn btn-success']) !!}
{{ link_to_route('bank-accounts.index', __('app.cancel'), [], ['class' => 'btn btn-default']) }}
</div>
{!! Form::close() !!}
</div>
@endif
@if (Request::get('action') == 'delete' && $editableBankAccount)
@if (request('action') == 'delete' && $editableBankAccount)
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('bank_account.delete') }}</h3></div>
<div class="panel-heading"><h3 class="panel-title">{{ __('bank_account.delete') }}</h3></div>
<div class="panel-body">
<label class="control-label">{{ trans('bank_account.name') }}</label>
<label class="control-label">{{ __('bank_account.name') }}</label>
<p>{{ $editableBankAccount->name }}</p>
<label class="control-label">{{ trans('bank_account.number') }}</label>
<label class="control-label">{{ __('bank_account.number') }}</label>
<p>{{ $editableBankAccount->number }}</p>
<label class="control-label">{{ trans('bank_account.account_name') }}</label>
<label class="control-label">{{ __('bank_account.account_name') }}</label>
<p>{{ $editableBankAccount->account_name }}</p>
<label class="control-label">{{ trans('bank_account.description') }}</label>
<label class="control-label">{{ __('bank_account.description') }}</label>
<p>{{ $editableBankAccount->description }}</p>
{!! $errors->first('bank_account_id', '<span class="form-error small">:message</span>') !!}
</div>
<hr style="margin:0">
<div class="panel-body">{{ trans('app.delete_confirm') }}</div>
<div class="panel-body">{{ __('app.delete_confirm') }}</div>
<div class="panel-footer">
{!! FormField::delete(
['route'=>['bank-accounts.destroy', request('id')]],
trans('app.delete_confirm_button'),
['route'=>['bank-accounts.destroy', $editableBankAccount->id]],
__('app.delete_confirm_button'),
['class'=>'btn btn-danger'],
[
'bank_account_id' => request('id'),
'bank_account_id' => $editableBankAccount->id,
'page' => request('page'),
'q' => request('q'),
]
) !!}
{{ link_to_route('bank-accounts.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }}
{{ link_to_route('bank-accounts.index', __('app.cancel'), [], ['class' => 'btn btn-default']) }}
</div>
</div>
@endif

12
resources/views/customers/edit.blade.php

@ -1,13 +1,13 @@
@extends('layouts.app')
@section('title', trans('customer.edit').' '.$customer->name)
@section('title', __('customer.edit').' '.$customer->name)
@section('content')
<h1 class="page-header">
<div class="pull-right">
{{ link_to_route('customers.show', trans('customer.back_to_show'), [$customer->id], ['class' => 'btn btn-default']) }}
{{ link_to_route('customers.show', __('customer.back_to_show'), [$customer->id], ['class' => 'btn btn-default']) }}
</div>
{{ $customer->name }} <small>{{ trans('customer.edit') }}</small>
{{ $customer->name }} <small>{{ __('customer.edit') }}</small>
</h1>
@if (Request::has('action'))
@ -40,9 +40,9 @@
</div>
</div>
<div class="panel-footer">
{!! Form::submit(trans('customer.update'), ['class' => 'btn btn-success']) !!}
{{ link_to_route('customers.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }}
{!! link_to_route('customers.edit', trans('app.delete'), [$customer->id, 'action' => 'delete'], [
{!! Form::submit(__('customer.update'), ['class' => 'btn btn-success']) !!}
{{ link_to_route('customers.index', __('app.cancel'), [], ['class' => 'btn btn-default']) }}
{!! link_to_route('customers.edit', __('app.delete'), [$customer->id, 'action' => 'delete'], [
'id' => 'del-customer-'.$customer->id,
'class' => 'btn btn-link pull-right'
] ) !!}

26
resources/views/customers/index.blade.php

@ -1,33 +1,33 @@
@extends('layouts.app')
@section('title', trans('customer.list'))
@section('title', __('customer.list'))
@section('content')
<h1 class="page-header">
<div class="pull-right">
{{ link_to_route('customers.create', trans('customer.create'), [], ['class' => 'btn btn-success']) }}
{{ link_to_route('customers.create', __('customer.create'), [], ['class' => 'btn btn-success']) }}
</div>
{{ trans('customer.list') }}
<small>{{ trans('app.total') }} : {{ $customers->total() }} {{ trans('customer.customer') }}</small>
{{ __('customer.list') }}
<small>{{ __('app.total') }} : {{ $customers->total() }} {{ __('customer.customer') }}</small>
</h1>
<div class="panel panel-default table-responsive">
<div class="panel-heading">
{{ Form::open(['method' => 'get', 'class' => 'form-inline']) }}
{!! FormField::text('q', ['value' => request('q'), 'label' => trans('customer.search'), 'class' => 'input-sm']) !!}
{{ Form::submit(trans('customer.search'), ['class' => 'btn btn-sm']) }}
{{ link_to_route('customers.index', trans('app.reset')) }}
{!! FormField::text('q', ['value' => request('q'), 'label' => __('customer.search'), 'class' => 'input-sm']) !!}
{{ Form::submit(__('customer.search'), ['class' => 'btn btn-sm']) }}
{{ link_to_route('customers.index', __('app.reset')) }}
{{ Form::close() }}
</div>
<table class="table table-condensed">
<thead>
<tr>
<th class="text-center">{{ trans('app.table_no') }}</th>
<th>{{ trans('customer.name') }}</th>
<th>{{ trans('contact.email') }}</th>
<th>{{ trans('contact.phone') }}</th>
<th class="text-center">{{ trans('customer.projects_count') }}</th>
<th class="text-center">{{ trans('app.status') }}</th>
<th class="text-center">{{ __('app.table_no') }}</th>
<th>{{ __('customer.name') }}</th>
<th>{{ __('contact.email') }}</th>
<th>{{ __('contact.phone') }}</th>
<th class="text-center">{{ __('customer.projects_count') }}</th>
<th class="text-center">{{ __('app.status') }}</th>
</tr>
</thead>
<tbody>

10
resources/views/invoices/partials/item-list.blade.php

@ -1,7 +1,7 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
{{ trans('invoice.items') }}
{{ __('invoice.items') }}
</h3>
</div>
<table class="table">
@ -56,7 +56,7 @@
<td colspan="2">
{!! FormField::textarea(
'new_item_description',
['id' => 'new_item_description', 'label' => false, 'placeholder' => trans('invoice.item_description')]
['id' => 'new_item_description', 'label' => false, 'placeholder' => __('invoice.item_description')]
) !!}
</td>
<td colspan="2">
@ -65,18 +65,18 @@
[
'id' => 'new_item_amount',
'label' => false,
'placeholder' => trans('invoice.item_amount'),
'placeholder' => __('invoice.item_amount'),
'currency' => Option::get('money_sign', 'Rp')
]
) !!}
{{ Form::submit(trans('invoice.add_item'), ['class' => 'btn btn-primary btn-block']) }}
{{ Form::submit(__('invoice.add_item'), ['class' => 'btn btn-primary btn-block']) }}
</td>
{{ Form::close() }}
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="2" class="text-right">{{ trans('invoice.amount') }} :</th>
<th colspan="2" class="text-right">{{ __('invoice.amount') }} :</th>
<th class="text-right">{{ format_money(collect($invoice->items)->sum('amount')) }}</th>
<th></th>
</tr>

16
resources/views/options/index.blade.php

@ -1,7 +1,7 @@
@extends('layouts.app')
@section('content')
<h3 class="page-header">{{ trans('option.list') }}</h3>
<h3 class="page-header">{{ __('option.list') }}</h3>
<div class="row">
<div class="col-md-8">
@ -24,7 +24,7 @@
</tbody>
</table>
<div class="form-group">
{!! Form::submit(trans('app.update'), ['class' => 'btn btn-warning']) !!}
{!! Form::submit(__('app.update'), ['class' => 'btn btn-warning']) !!}
</div>
{!! Form::close() !!}
</div>
@ -32,9 +32,9 @@
<div class="col-md-4">
@if (Request::get('action') == 'del' && $editableOption)
<div class="panel panel-info">
<div class="panel-heading"><h3 class="panel-title">{{ trans('option.delete') }}</h3></div>
<div class="panel-heading"><h3 class="panel-title">{{ __('option.delete') }}</h3></div>
<div class="panel-body">
<p>{{ trans('app.delete_confirm') }}</p>
<p>{{ __('app.delete_confirm') }}</p>
<table class="table table-condensed">
<tbody>
<tr><th class="col-md-4">{{ str_split_ucwords($editableOption->key) }}</th><td>{{ $editableOption->value }}</td></tr>
@ -42,20 +42,20 @@
</table>
</div>
<div class="panel-footer">
{!! FormField::delete(['route' => ['options.destroy',$editableOption->id]], trans('app.delete'), ['class' => 'btn btn-danger'], ['option_id' => $option->id]) !!}
{{ link_to_route('options.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }}
{!! FormField::delete(['route' => ['options.destroy',$editableOption->id]], __('app.delete'), ['class' => 'btn btn-danger'], ['option_id' => $option->id]) !!}
{{ link_to_route('options.index', __('app.cancel'), [], ['class' => 'btn btn-default']) }}
</div>
</div>
@endif
{!! Form::open(['route' => 'options.store']) !!}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('option.create') }}</h3></div>
<div class="panel-heading"><h3 class="panel-title">{{ __('option.create') }}</h3></div>
<div class="panel-body">
{!! FormField::text('key') !!}
{!! FormField::textarea('value') !!}
</div>
<div class="panel-footer">
{!! Form::submit(trans('app.add'), ['class' => 'btn btn-primary']) !!}
{!! Form::submit(__('app.add'), ['class' => 'btn btn-primary']) !!}
</div>
</div>
{!! Form::close() !!}

Loading…
Cancel
Save