Skip to content

Commit

Permalink
Update user(view) for support multilanguage (#3383)
Browse files Browse the repository at this point in the history
Update user(view) for support multilanguage. Added lang var. and strings
  • Loading branch information
kpawelski authored and snipe committed Mar 11, 2017
1 parent fee60ec commit 4af2a8e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 23 deletions.
1 change: 1 addition & 0 deletions resources/lang/en/admin/users/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'edit' => 'Edit User',
'filetype_info' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
'history_user' => 'History for :name',
'info' => 'Info',
'last_login' => 'Last Login',
'ldap_config_text' => 'LDAP configuration settings can be found Admin > Settings. The (optional) selected location will be set for all imported users.',
'software_user' => 'Software Checked out to :name',
Expand Down
3 changes: 2 additions & 1 deletion resources/lang/en/admin/users/table.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

return array(

'activated' => 'Active',
'allow' => 'Allow',
'checkedout' => 'Assets',
Expand All @@ -28,8 +27,10 @@
'show_current' => 'Show Current Users',
'show_deleted' => 'Show Deleted Users',
'title' => 'Title',
'to_restore_them' => 'to restore them.',
'updateuser' => 'Update User',
'username' => 'Username',
'user_deleted_text' => 'This user has been marked as deleted.',
'username_note' => '(This is used for Active Directory binding only, not for login.)',
'cloneuser' => 'Clone User',
'viewusers' => 'View Users',
Expand Down
3 changes: 1 addition & 2 deletions resources/lang/en/button.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

return array(

'actions' => 'Actions',
'add' => 'Add New',
'cancel' => 'Cancel',
Expand All @@ -12,5 +11,5 @@
'request' => 'Request',
'submit' => 'Submit',
'upload' => 'Upload',

'select_file' => 'Select File...',
);
2 changes: 2 additions & 0 deletions resources/lang/en/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
'checkin_from' => 'Checkin from',
'checkout' => 'Checkout',
'city' => 'City',
'click_here' => 'Click here',
'companies' => 'Companies',
'company' => 'Company',
'component' => 'Component',
'components' => 'Components',
'complete' => 'Complete',
'consumable' => 'Consumable',
'consumables' => 'Consumables',
'country' => 'Country',
Expand Down
40 changes: 20 additions & 20 deletions resources/views/users/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<span class="hidden-lg hidden-md">
<i class="fa fa-info-circle"></i>
</span>
<span class="hidden-xs hidden-sm">Info</span>
<span class="hidden-xs hidden-sm">{{ trans('admin/users/general.info') }}</span>
</a>
</li>

Expand Down Expand Up @@ -97,9 +97,9 @@
<div class="col-md-12">
<div class="callout callout-warning">
<i class="icon fa fa-warning"></i>
This user has been marked as deleted.
{{ trans('general.user_deleted_text') }}
@can('update', $user)
<a href="{{ route('restore/user', $user->id) }}">Click here</a> to restore them.
<a href="{{ route('restore/user', $user->id) }}">{{ trans('general.click_here') }}</a> {{ trans('general.to_restore_them') }}
@endcan
</div>
</div>
Expand All @@ -117,13 +117,13 @@
<table class="table table-striped">
@if (!is_null($user->company))
<tr>
<td>Company</td>
<td>{{ trans('general.company') }}</td>
<td>{{ $user->company->name }}</td>
</tr>
@endif

<tr>
<td>Name</td>
<td>{{ trans('admin/users/table.name') }}</td>
<td>{{ $user->present()->fullName() }}</td>
</tr>

Expand All @@ -136,42 +136,42 @@

@if ($user->jobtitle)
<tr>
<td>Title</td>
<td>{{ trans('admin/users/table.job') }}</td>
<td>{{ $user->jobtitle }}</td>
</tr>
@endif

@if ($user->employee_num)
<tr>
<td>Employee No.</td>
<td>{{ trans('admin/users/table.employee_num') }}</td>
<td>{{ $user->employee_num }}</td>
</tr>
@endif

@if ($user->manager)
<tr>
<td>Manager</td>
<td>{{ trans('admin/users/table.manager') }}</td>
<td>{{$user->manager->present()->nameUrl() }}</td>
</tr>
@endif

@if ($user->email)
<tr>
<td>Email</td>
<td>{{ trans('admin/users/table.email') }}</td>
<td><a href="mailto:{{ $user->email }}">{{ $user->email }}</a></td>
</tr>
@endif

@if ($user->phone)
<tr>
<td>Phone</td>
<td>{{ trans('admin/users/table.phone') }}</td>
<td>{{ $user->phone }}</td>
</tr>
@endif

@if ($user->userloc)
<tr>
<td>Location</td>
<td>{{ trans('admin/users/table.location') }}</td>
<td>{{ $user->userloc->name }}</td>
</tr>
@endif
Expand Down Expand Up @@ -251,7 +251,7 @@
<td>{!! $asset->present()->nameUrl() !!}</td>
<td class="hidden-print">
@can('checkin', $asset)
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">Checkin</a>
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
@endcan
</td>
</tr>
Expand Down Expand Up @@ -282,7 +282,7 @@
</td>
<td class="hidden-print">
@can('update', $license)
<a href="{{ route('licenses.checkin', array('licenseseat_id'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">Checkin</a>
<a href="{{ route('licenses.checkin', array('licenseseat_id'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
@endcan
</td>
</tr>
Expand All @@ -297,8 +297,8 @@
<table class="display table table-hover">
<thead>
<tr>
<th class="col-md-5">Name</th>
<th class="col-md-1 hidden-print">Actions</th>
<th class="col-md-5">{{ trans('general.name') }}</th>
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
</tr>
</thead>
<tbody>
Expand All @@ -307,7 +307,7 @@
<td>{!!$accessory->present()->nameUrl()!!}</td>
<td class="hidden-print">
@can('checkin', $accessory)
<a href="{{ route('checkin/accessory', array('accessory_id'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">Checkin</a>
<a href="{{ route('checkin/accessory', array('accessory_id'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
@endcan
</td>
</tr>
Expand Down Expand Up @@ -348,7 +348,7 @@
@can('update', $user)
<span class="btn btn-info fileinput-button hidden-print">
<i class="fa fa-plus icon-white"></i>
<span>Select File...</span>
<span>{{ trans('button.select_file') }}</span>
<!-- The file input field used as target for the file upload widget -->
<input id="fileupload" type="file" name="file[]" data-url="{{ route('upload/user', $user->id) }}">
</span>
Expand All @@ -362,7 +362,7 @@
<div class="col-md-11">
<div id="progress" class="progress progress-striped active" style="margin-top: 8px;">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
<span id="progress-bar-text">0% Complete</span>
<span id="progress-bar-text">0% {{ trans('general.complete') }}</span>
</div>
</div>
</div>
Expand Down Expand Up @@ -399,7 +399,7 @@
</td>
<td>
@if ($file->filename)
<a href="{{ route('show/userfile', [$user->id, $file->id]) }}" class="btn btn-default">Download</a>
<a href="{{ route('show/userfile', [$user->id, $file->id]) }}" class="btn btn-default">{{ trans('general.download') }}</a>
@endif
</td>
<td>
Expand All @@ -422,7 +422,7 @@
<thead>
<tr>
<th class="col-md-1"></th>
<th class="col-md-2">Date</th>
<th class="col-md-2">{{ trans('general.date') }}</th>
<th class="col-md-2"><span class="line"></span>{{ trans('table.action') }}</th>
<th class="col-md-4"><span class="line"></span>{{ trans('general.asset') }}</th>
<th class="col-md-3"><span class="line"></span>{{ trans('table.by') }}</th>
Expand Down

0 comments on commit 4af2a8e

Please sign in to comment.