Skip to content

Commit

Permalink
More refactoring of language structure, language strings per #151
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jun 9, 2014
1 parent 65d298a commit 74653d3
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 24 deletions.
1 change: 1 addition & 0 deletions app/lang/en/admin/models/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
),

'delete' => array(
'confirm' => 'Are you sure you wish to delete this asset model?',
'error' => 'There was an issue deleting the model. Please try again.',
'success' => 'The model was deleted successfully.'
)
Expand Down
2 changes: 2 additions & 0 deletions app/lang/en/admin/models/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
'numassets' => 'Assets',
'title' => 'Asset Models',
'update' => 'Update Asset Model',
'view' => 'View Asset Model',
'update' => 'Update Model',
);
1 change: 1 addition & 0 deletions app/lang/en/admin/statuslabels/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
),

'delete' => array(
'confirm' => 'Are you sure you wish to delete this status label?',
'error' => 'There was an issue deleting the location. Please try again.',
'success' => 'The location was deleted successfully.'
)
Expand Down
7 changes: 6 additions & 1 deletion app/lang/en/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
'back' => 'Back',
'cancel' => 'Cancel',
'categories' => 'Categories',
'category' => 'Category',
'checkin' => 'Checkin',
'checkout' => 'Checkout',
'city' => 'City',
Expand All @@ -24,11 +25,12 @@
'date' => 'Date',
'delete' => 'Delete',
'deployed' => 'Deployed',
'depreciation' => 'Depreciation',
'depreciation_report' => 'Depreciation Report',
'depreciation' => 'Depreciation',
'eol' => 'EOL',
'first_name' => 'First Name',
'groups' => 'Groups',
'history_for' => 'History for',
'id' => 'ID',
'last_name' => 'Last Name',
'license' => 'License',
Expand All @@ -38,10 +40,13 @@
'locations' => 'Locations',
'logout' => 'Logout',
'manufacturers' => 'Manufacturers',
'manufacturer' => 'Manufacturer',
'model_no' => 'Model No.',
'months' => 'months',
'moreinfo' => 'More Info',
'name' => 'Name',
'no_results' => 'No Results.',
'no_depreciation' => 'No Derepciation',
'no' => 'No',
'pending' => 'Pending',
'people' => 'People',
Expand Down
2 changes: 1 addition & 1 deletion app/views/backend/licenses/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="row header">
<div class="col-md-12">
<a href="{{ route('update/license', $license->id) }}" class="btn-flat white pull-right"> @lang('admin/licenses/form.update')</a>
<h3 class="name">@lang('admin/licenses/general.history_for') {{ $license->name }}</h3>
<h3 class="name">@lang('general.history_for') {{ $license->name }}</h3>
</div>
</div>

Expand Down
10 changes: 5 additions & 5 deletions app/views/backend/models/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@

<!-- Model No. -->
<div class="form-group {{ $errors->has('modelno') ? ' has-error' : '' }}">
<label for="modelno" class="col-md-2 control-label">@lang('admin/models/table.modelnumber')</label>
<label for="modelno" class="col-md-2 control-label">@lang('general.model_no')</label>
<div class="col-md-7">
<input class="form-control" type="text" name="modelno" id="modelno" value="{{ Input::old('modelno', $model->modelno) }}" />
{{ $errors->first('modelno', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
</div>
</div>

<div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
<label for="manufacturer_id" class="col-md-2 control-label">@lang('admin/models/table.manufacturer')</label>
<label for="manufacturer_id" class="col-md-2 control-label">@lang('general.manufacturer')</label>
<div class="col-md-7">
{{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $model->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }}
{{ $errors->first('manufacturer_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
Expand All @@ -62,7 +62,7 @@

<!-- Depreciation -->
<div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
<label for="depreciation_id" class="col-md-2 control-label">@lang('admin/models/general.depreciation')</label>
<label for="depreciation_id" class="col-md-2 control-label">@lang('general.depreciation')</label>
<div class="col-md-7">
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $model->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
{{ $errors->first('depreciation_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
Expand All @@ -71,7 +71,7 @@

<!-- Category -->
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
<label for="category_id" class="col-md-2 control-label">@lang('admin/models/table.category')</label>
<label for="category_id" class="col-md-2 control-label">@lang('general.category')</label>
<div class="col-md-7">
{{ Form::select('category_id', $category_list , Input::old('category_id', $model->category_id), array('class'=>'select2', 'style'=>'width:350px')) }}
{{ $errors->first('category_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
Expand All @@ -97,7 +97,7 @@
<div class="form-group">
<label class="col-md-2 control-label"></label>
<div class="col-md-7">
<a class="btn btn-link" href="{{ URL::previous() }}">Cancel</a>
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
</div>
</div>
Expand Down
17 changes: 10 additions & 7 deletions app/views/backend/models/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="row header">
<div class="col-md-12">
<a href="{{ route('create/model') }}" class="btn btn-success pull-right"><i class="icon-plus-sign icon-white"></i> @lang('general.create')</a>
<h3>Asset Models</h3>
<h3>@lang('admin/models/table.title')</h3>
</div>
</div>

Expand All @@ -23,9 +23,9 @@
<th class="col-md-3">@lang('admin/models/table.title')</th>
<th class="col-md-2">@lang('admin/models/table.modelnumber')</th>
<th class="col-md-1">@lang('admin/models/table.numassets')</th>
<th class="col-md-2">Depreciation</th>
<th class="col-md-2">Category</th>
<th class="col-md-2">EOL</th>
<th class="col-md-2">@lang('general.depreciation')</th>
<th class="col-md-2">@lang('general.category')</th>
<th class="col-md-2">@lang('general.eol')</th>
<th class="col-md-2 actions">@lang('table.actions')</th>
</tr>
</thead>
Expand All @@ -41,7 +41,7 @@
{{ $model->depreciation->name }}
({{ $model->depreciation->months }} months)
@else
No Depreciation
@lang('general.no_depreciation')
@endif

</td>
Expand All @@ -54,7 +54,8 @@
<td>

@if ($model->eol)
{{ $model->eol }} months
{{ $model->eol }}
@lang('general.months')
@else
--
@endif
Expand All @@ -63,7 +64,9 @@

<td>
<a href="{{ route('update/model', $model->id) }}" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/model', $model->id) }}" data-content="Are you sure you wish to delete this model?" data-title="Delete {{ htmlspecialchars($model->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/model', $model->id) }}" data-content="@lang('admin/models/message.delete.confirm')"
data-title="@lang('general.delete')
{{ htmlspecialchars($model->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
</td>
</tr>
@endforeach
Expand Down
24 changes: 15 additions & 9 deletions app/views/backend/models/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

{{-- Page title --}}
@section('title')
View Model {{ $model->model_tag }} ::
@lang('admin/models/table.view')
{{ $model->model_tag }} ::
@parent
@stop

Expand All @@ -11,8 +12,9 @@

<div class="row header">
<div class="col-md-12">
<a href="{{ route('update/model', $model->id) }}" class="btn btn-default pull-right"><i class="icon-plus-sign icon-white"></i> Update Model</a>
<h3 class="name">History for {{ $model->name }} </h3>
<a href="{{ route('update/model', $model->id) }}" class="btn-flat white pull-right">
@lang('admin/models/table.update')</a>
<h3 class="name">@lang('general.history_for') {{ $model->name }} </h3>
</div>
</div>

Expand Down Expand Up @@ -61,10 +63,10 @@
</table>

@else
<div class="col-md-6">
<div class="col-md-9">
<div class="alert alert-info alert-block">
<i class="icon-info-sign"></i>
There are no results for your query.
@lang('general.no_results')
</div>
</div>
@endif
Expand All @@ -79,19 +81,23 @@


@if ($model->manufacturer)
<li>Manufacturer: {{ $model->manufacturer->name }}</li>
<li>@lang('general.manufacturer'):
{{ $model->manufacturer->name }}</li>
@endif

@if ($model->modelno)
<li>Model No.: {{ $model->modelno }}</li>
<li>@lang('general.model_no'):
{{ $model->modelno }}</li>
@endif

@if ($model->depreciation)
<li>Depreciation: {{ $model->depreciation->name }} ({{ $model->depreciation->months }} months)</li>
<li>@lang('general.depreciation'):
{{ $model->depreciation->name }} ({{ $model->depreciation->months }} months)</li>
@endif

@if ($model->eol)
<li>EOL: {{ $model->eol }} months</li>
<li>@lang('general.eol'):
{{ $model->eol }} months</li>
@endif

</ul>
Expand Down
2 changes: 1 addition & 1 deletion app/views/backend/reports/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@lang('admin/hardware/table.dl_csv')</a>
</div>

<h3>Depreciation Report</h3>
<h3>@lang('general.depreciation_report')</h3>
</div>

<div class="row table">
Expand Down

0 comments on commit 74653d3

Please sign in to comment.