From 6a89728380e67197b89d5073a24c2c98b7b28ec4 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 10 Mar 2015 15:06:24 -0700 Subject: [PATCH 001/140] First shot at datatables for assets --- app/controllers/admin/AssetsController.php | 68 +++++----- app/routes.php | 3 + app/views/backend/hardware/index.blade.php | 145 +-------------------- 3 files changed, 43 insertions(+), 173 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 8a82ec8136..347a21fc89 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -23,6 +23,7 @@ use Location; use Log; use DNS2D; use Mail; +use Datatable; class AssetsController extends AdminController { @@ -36,40 +37,7 @@ class AssetsController extends AdminController public function getIndex() { - // Grab all the assets - - $assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')->Hardware(); - // Filter results - if (Input::get('Pending')) { - $assets->Pending(); - } elseif (Input::get('RTD')) { - $assets->RTD(); - } elseif (Input::get('Undeployable')) { - $assets->Undeployable(); - } elseif (Input::get('Archived')) { - $assets->Archived(); - } elseif (Input::get('Requestable')) { - $assets->RequestableAssets(); - } elseif (Input::get('Deployed')) { - $assets->Deployed(); - } elseif (Input::get('Deleted')) { - $assets->withTrashed()->Deleted(); - } - - $assets = $assets->orderBy('asset_tag', 'ASC')->get(); - - - // Paginate the users - /**$assets = $assets->paginate(Setting::getSettings()->per_page) - ->appends(array( - 'Pending' => Input::get('Pending'), - 'RTD' => Input::get('RTD'), - 'Undeployable' => Input::get('Undeployable'), - 'Deployed' => Input::get('Deployed'), - )); - **/ - - return View::make('backend/hardware/index', compact('assets')); + return View::make('backend/hardware/index'); } @@ -909,6 +877,38 @@ class AssetsController extends AdminController } + public function getDatatable() + { + //return Datatable::collection(Asset::all(array('id', 'name', 'asset_tag', 'serial'))) + + $assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')->Hardware(); + // Filter results + if (Input::get('Pending')) { + $assets->Pending(); + } elseif (Input::get('RTD')) { + $assets->RTD(); + } elseif (Input::get('Undeployable')) { + $assets->Undeployable(); + } elseif (Input::get('Archived')) { + $assets->Archived(); + } elseif (Input::get('Requestable')) { + $assets->RequestableAssets(); + } elseif (Input::get('Deployed')) { + $assets->Deployed(); + } elseif (Input::get('Deleted')) { + $assets->withTrashed()->Deleted(); + } + + $assets = $assets->orderBy('asset_tag', 'ASC')->get(); + + return Datatable::collection($assets) + ->showColumns('name', 'asset_tag', 'serial') + ->searchColumns('name', 'asset_tag', 'serial') + ->orderColumns('name', 'asset_tag', 'serial') + ->make(); + } + + } diff --git a/app/routes.php b/app/routes.php index 438bb55939..a7d098d73a 100755 --- a/app/routes.php +++ b/app/routes.php @@ -18,6 +18,9 @@ Route::group(array('prefix' => 'hardware', 'namespace' => 'Controllers\Admin', ' 'uses' => 'AssetsController@getIndex') ); + Route::resource('hardware', 'AssetsController'); + Route::get('api/hardware', array('as'=>'api.hardware', 'uses'=>'AssetsController@getDatatable')); + Route::get('create/{model?}', array( 'as' => 'create/hardware', 'uses' => 'AssetsController@getCreate') diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 7abf903efa..90dcc7fa1a 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -42,10 +42,6 @@
- - - -@if ($assets->count() > 0) {{ Form::open([ @@ -55,138 +51,19 @@ -
- +{{ Datatable::table() + ->addColumn('name', 'asset_tag', 'serial', 'assigned_to') // these are the column headings to be shown + ->setUrl(route('api.hardware')) // this is the route where data will be retrieved + ->render() }} - - - - - - @if (Setting::getSettings()->display_asset_name) - - - @endif - - - - @if (Input::get('Deployed') && Setting::getSettings()->display_checkout_date) - - - @endif - @if (Setting::getSettings()->display_eol) - - - @endif - - - - - - - - - - - - @foreach ($assets as $asset) - - - - - - @if (Setting::getSettings()->display_asset_name) - - @endif - - - - - - - - - - @if (Input::get('Deployed') && Setting::getSettings()->display_checkout_date) - - @endif - @if (Setting::getSettings()->display_eol) - - @endif - - - - - @endforeach - -
@lang('admin/hardware/table.asset_tag')@lang('admin/hardware/table.asset_model')@lang('general.name')@lang('admin/hardware/table.serial')@lang('general.status')@lang('admin/hardware/table.location')@lang('admin/hardware/table.checkout_date')@lang('admin/hardware/table.eol')@lang('admin/hardware/table.change')@lang('table.actions')
{{{ $asset->asset_tag }}}{{{ $asset->model->name }}}{{{ $asset->name }}}{{{ $asset->serial }}} - @if (Input::get('Pending')) - @lang('general.pending') - @elseif (Input::get('RTD')) - @lang('general.ready_to_deploy') - @elseif (Input::get('Undeployable')) - @if ($asset->assetstatus) - {{{ $asset->assetstatus->name }}} - @endif - @else - @if ($asset->assigneduser) - - {{{ $asset->assigneduser->fullName() }}} - - @else - @if ($asset->assetstatus) - {{{ $asset->assetstatus->name }}} - @endif - @endif - @endif - - @if ($asset->assigneduser && $asset->assetloc) - {{{ $asset->assetloc->name }}} - @elseif ($asset->defaultLoc) - {{{ $asset->defaultLoc->name }}} - - @endif - - - @if (count($asset->assetlog) > 0) - {{{ $asset->assetlog->first()->created_at }}} - @endif - - @if ($asset->model->eol) - {{{ $asset->eol_date() }}} - @endif - - - @if (($asset->assetstatus) && (($asset->assetstatus->deployable == 1 ) && ($asset->deleted_at==''))) - @if (($asset->assigned_to !='') && ($asset->assigned_to > 0)) - @lang('general.checkin') - @else - @lang('general.checkout') - @endif - @endif - - - - @if ($asset->deleted_at=='') - - - @else - @if ($asset->model->deleted_at=='') - - @endif - @endif - -
{{ Form::close() }}
-@else -
-
- - @lang('general.no_results') -
-
-
- -@endif @stop From 62d5ed48f087d6e1e4f486e59039d2f87619b056 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Mar 2015 13:24:07 -0700 Subject: [PATCH 002/140] Fixes #645 - added zip/rar to filetypes --- app/controllers/admin/LicensesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/LicensesController.php b/app/controllers/admin/LicensesController.php index 65670dfe64..4af089534a 100755 --- a/app/controllers/admin/LicensesController.php +++ b/app/controllers/admin/LicensesController.php @@ -668,7 +668,7 @@ class LicensesController extends AdminController foreach(Input::file('licensefile') as $file) { $rules = array( - 'licensefile' => 'required|mimes:png,gif,jpg,jpeg,doc,docx,pdf,txt|max:2000' + 'licensefile' => 'required|mimes:png,gif,jpg,jpeg,doc,docx,pdf,txt,zip,rar|max:2000' ); $validator = Validator::make(array('licensefile'=> $file), $rules); From ae2d2ca2be420ad60c604b54785dddb9d9ed0b82 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Mar 2015 17:34:34 -0700 Subject: [PATCH 003/140] Smaller button --- app/views/backend/users/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/backend/users/index.blade.php b/app/views/backend/users/index.blade.php index ed164e7c12..37ae9bdd44 100755 --- a/app/views/backend/users/index.blade.php +++ b/app/views/backend/users/index.blade.php @@ -88,7 +88,7 @@ @else - + @endif @endif From 35f3350ddf234cf978d6f6e6a061e4ec2b306c8a Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 13 Mar 2015 12:56:09 +1030 Subject: [PATCH 004/140] Remove duplicate status --- app/views/backend/reports/asset.blade.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/app/views/backend/reports/asset.blade.php b/app/views/backend/reports/asset.blade.php index a4db5045ba..b520363484 100644 --- a/app/views/backend/reports/asset.blade.php +++ b/app/views/backend/reports/asset.blade.php @@ -41,7 +41,6 @@ @lang('admin/hardware/form.supplier') @lang('admin/hardware/table.checkoutto') @lang('admin/hardware/table.location') - @lang('general.status') @@ -103,16 +102,6 @@ {{{ $asset->defaultLoc->name }}} @endif - - @if (($asset->status_id == '0') && ($asset->assigned_to == '0')) - @lang('general.ready_to_deploy') - @elseif (($asset->status_id == '') && ($asset->assigned_to == '0')) - @lang('general.pending') - @elseif ($asset->assetstatus) - {{{ $asset->assetstatus->name }}} - @endif - - @endforeach @@ -120,4 +109,4 @@ -@stop \ No newline at end of file +@stop From f33844d4aff0d362769de649fcf4fc62adb91828 Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 13 Mar 2015 13:01:30 +1030 Subject: [PATCH 005/140] move status around to match view --- app/controllers/admin/ReportsController.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/app/controllers/admin/ReportsController.php b/app/controllers/admin/ReportsController.php index dbb20c947b..919764ff80 100644 --- a/app/controllers/admin/ReportsController.php +++ b/app/controllers/admin/ReportsController.php @@ -45,13 +45,13 @@ class ReportsController extends AdminController Lang::get('general.model_no'), Lang::get('general.name'), Lang::get('admin/hardware/table.serial'), + Lang::get('general.status'), Lang::get('admin/hardware/table.purchase_date'), Lang::get('admin/hardware/table.purchase_cost'), Lang::get('admin/hardware/form.order'), Lang::get('admin/hardware/form.supplier'), Lang::get('admin/hardware/table.checkoutto'), - Lang::get('admin/hardware/table.location'), - Lang::get('general.status') + Lang::get('admin/hardware/table.location') ); $header = array_map('trim', $header); $rows[] = implode($header, ','); @@ -69,6 +69,11 @@ class ReportsController extends AdminController $row[] = '"'.$asset->model->modelno.'"'; $row[] = $asset->name; $row[] = $asset->serial; + if ($asset->assetstatus) { + $row[] = $asset->assetstatus->name; + } else { + $row[] = ''; + } $row[] = $asset->purchase_date; $row[] = '"'.number_format($asset->purchase_cost).'"'; if ($asset->order_number) { @@ -107,16 +112,6 @@ class ReportsController extends AdminController $row[] = ''; // Empty string if location is not set } - if (($asset->status_id == '0') && ($asset->assigned_to == '0')) { - $row[] = Lang::get('general.ready_to_deploy'); - } elseif (($asset->status_id == '') && ($asset->assigned_to == '0')) { - $row[] = Lang::get('general.pending'); - } elseif ($asset->assetstatus) { - $row[] = $asset->assetstatus->name; - } else { - $row[] = ''; - } - $rows[] = implode($row, ','); } @@ -456,4 +451,4 @@ class ReportsController extends AdminController return Redirect::to("reports/custom")->with('error', Lang::get('admin/reports/message.error')); } } -} \ No newline at end of file +} From 482c28804aed954334b86943932ffb79ccd4c6a1 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Mar 2015 19:51:08 -0700 Subject: [PATCH 006/140] Added chumper config --- .../packages/chumper/datatable/.gitkeep | 0 .../packages/chumper/datatable/config.php | 155 ++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 app/config/packages/chumper/datatable/.gitkeep create mode 100644 app/config/packages/chumper/datatable/config.php diff --git a/app/config/packages/chumper/datatable/.gitkeep b/app/config/packages/chumper/datatable/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/config/packages/chumper/datatable/config.php b/app/config/packages/chumper/datatable/config.php new file mode 100644 index 0000000000..f94c8c32bd --- /dev/null +++ b/app/config/packages/chumper/datatable/config.php @@ -0,0 +1,155 @@ + array( + + /* + |-------------------------------------------------------------------------- + | Table class + |-------------------------------------------------------------------------- + | + | Class(es) added to the table + | Supported: string + | + */ + + 'class' => 'table table-bordered', + + /* + |-------------------------------------------------------------------------- + | Table ID + |-------------------------------------------------------------------------- + | + | ID given to the table. Used for connecting the table and the Datatables + | jQuery plugin. If left empty a random ID will be generated. + | Supported: string + | + */ + + 'id' => '', + + /* + |-------------------------------------------------------------------------- + | DataTable options + |-------------------------------------------------------------------------- + | + | jQuery dataTable plugin options. The array will be json_encoded and + | passed through to the plugin. See https://datatables.net/usage/options + | for more information. + | Supported: array + | + */ + + 'options' => array( + + "sPaginationType" => "full_numbers", + + "bProcessing" => false + + ), + + /* + |-------------------------------------------------------------------------- + | DataTable callbacks + |-------------------------------------------------------------------------- + | + | jQuery dataTable plugin callbacks. The array will be json_encoded and + | passed through to the plugin. See https://datatables.net/usage/callbacks + | for more information. + | Supported: array + | + */ + + 'callbacks' => array(), + + /* + |-------------------------------------------------------------------------- + | Skip javascript in table template + |-------------------------------------------------------------------------- + | + | Determines if the template should echo the javascript + | Supported: boolean + | + */ + + 'noScript' => false, + + + /* + |-------------------------------------------------------------------------- + | Table view + |-------------------------------------------------------------------------- + | + | Template used to render the table + | Supported: string + | + */ + + 'table_view' => 'datatable::template', + + + /* + |-------------------------------------------------------------------------- + | Script view + |-------------------------------------------------------------------------- + | + | Template used to render the javascript + | Supported: string + | + */ + + 'script_view' => 'datatable::javascript', + + + ), + + + /* + |-------------------------------------------------------------------------- + | Engine specific configuration options. + |-------------------------------------------------------------------------- + | + */ + + 'engine' => array( + + /* + |-------------------------------------------------------------------------- + | Search for exact words + |-------------------------------------------------------------------------- + | + | If the search should be done with exact matching + | Supported: boolean + | + */ + + 'exactWordSearch' => false, + + /* + |-------------------------------------------------------------------------- + | Enable to display all records. + |-------------------------------------------------------------------------- + | + | Be careful! It may be overloaded with large record. + | Supported: boolean + | + */ + 'enableDisplayAll' => false, + /* + |-------------------------------------------------------------------------- + | Limit display when iDisplayLength invaild + |-------------------------------------------------------------------------- + */ + 'defaultDisplayLength' => 10, + ) + + +); From b2af86230a925bbfc3cab118d8177fb109c229e5 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Mar 2015 19:52:03 -0700 Subject: [PATCH 007/140] Added fields --- app/config/version.php | 4 +-- app/controllers/admin/AssetsController.php | 38 +++++++++++++++++----- app/models/Asset.php | 7 ++++ app/views/backend/hardware/index.blade.php | 10 +++++- 4 files changed, 48 insertions(+), 11 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 7c1795ab94..bda9aa6457 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6-26', - 'hash_version' => 'v1.2.6-26-gbb33e3c', + 'app_version' => 'v1.2.6.1-6', + 'hash_version' => 'v1.2.6.1-6-g84affba', ); \ No newline at end of file diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 2ba19820b5..617868adc9 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -882,7 +882,7 @@ class AssetsController extends AdminController { //return Datatable::collection(Asset::all(array('id', 'name', 'asset_tag', 'serial'))) - $assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')->Hardware(); + $assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog','model')->Hardware(); // Filter results if (Input::get('Pending')) { $assets->Pending(); @@ -901,15 +901,37 @@ class AssetsController extends AdminController } $assets = $assets->orderBy('asset_tag', 'ASC')->get(); - + + return Datatable::collection($assets) - ->showColumns('name', 'asset_tag', 'serial') - ->searchColumns('name', 'asset_tag', 'serial') + ->addColumn('name',function($assets) + { + return ''.$assets->name.''; + }) + + ->showColumns('asset_tag', 'serial') + + ->addColumn('status',function($assets) + { + return ''.$assets->assetstatus->name.''; + }) + + ->addColumn('model',function($assets) + { + return $assets->model->name; + }) + + ->addColumn('eol',function($assets) + { + return $assets->eol_date(); + }) + + + ->showColumns('checkedout_on') + ->searchColumns('name', 'asset_tag', 'serial', 'model', 'status','location','eol','checkedout_on') ->orderColumns('name', 'asset_tag', 'serial') ->make(); - } - - - + + } } diff --git a/app/models/Asset.php b/app/models/Asset.php index 7d4b830afd..373527e049 100755 --- a/app/models/Asset.php +++ b/app/models/Asset.php @@ -165,6 +165,13 @@ class Asset extends Depreciable { return $this->belongsTo('Supplier','supplier_id'); } + + // FIXME + public function category() + { + return $this->belongsTo('Category','category_id'); + } + public function months_until_eol() { diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 90dcc7fa1a..ec9f18b769 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -52,14 +52,22 @@ {{ Datatable::table() - ->addColumn('name', 'asset_tag', 'serial', 'assigned_to') // these are the column headings to be shown + ->addColumn('name', 'asset_tag', 'serial', 'status','model','eol','checkedout_on') ->setUrl(route('api.hardware')) // this is the route where data will be retrieved + ->setOptions( + array( + 'dom' =>'C<"clear">lfrtip', + ) + ) ->render() }} {{ Form::close() }} + - + + - From fdb92a201255cd2b2e119d84bf4b4e0c13508674 Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 10:50:52 +1030 Subject: [PATCH 069/140] Change to use eager loaded userloc not assetloc --- app/controllers/admin/AssetsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index c08d1d7058..c8d0fc786d 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -961,8 +961,8 @@ class AssetsController extends AdminController }) ->addColumn('location',function($assets) { - if ($assets->assigned_to && $assets->assetloc) { - return link_to('admin/location/'.$assets->assetloc->id.'/edit', $assets->assetloc->name); + if ($assets->assigned_to && $assets->assigneduser->userloc) { + return link_to('admin/location/'.$assets->assigneduser->userloc->id.'/edit', $assets->assigneduser->userloc->name); } elseif ($assets->defaultLoc){ return link_to('admin/location/'.$assets->defaultLoc->id.'/edit', $assets->defaultLoc->name); } From a341db4cf75cf379bebd5996c9912b35eda0d899 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 17 Mar 2015 17:29:48 -0700 Subject: [PATCH 070/140] Prevent delete when password lock is active --- app/controllers/admin/UsersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/UsersController.php b/app/controllers/admin/UsersController.php index e0d9fb9874..45c2510f12 100755 --- a/app/controllers/admin/UsersController.php +++ b/app/controllers/admin/UsersController.php @@ -371,7 +371,7 @@ class UsersController extends AdminController // Do we have permission to delete this user? - if ($user->isSuperUser() and ! Sentry::getUser()->isSuperUser()) { + if ((!Sentry::getUser()->isSuperUser()) || (Config::get('app.lock_passwords'))) { // Redirect to the user management page return Redirect::route('users')->with('error', 'Insufficient permissions!'); } From 139d206413506ace0c54fc375b6b3ba6c22d2854 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 17 Mar 2015 18:05:01 -0700 Subject: [PATCH 071/140] Select specific fields so Chumper has a smaller collection to parse --- app/config/version.php | 4 ++-- app/controllers/admin/AssetsController.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index f35d153f3d..dc774bd192 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6.1-81', - 'hash_version' => 'v1.2.6.1-81-g94afe20', + 'app_version' => 'v1.2.6.1-89', + 'hash_version' => 'v1.2.6.1-89-gb66f553', ); \ No newline at end of file diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index c8d0fc786d..215e49987c 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -881,7 +881,7 @@ class AssetsController extends AdminController public function getDatatable($status = null) { - $assets = Asset::with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category')->Hardware(); + $assets = Asset::with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category')->Hardware()->select(array('id', 'name','model_id','assigned_to','asset_tag','serial','status_id','purchase_date')); switch ($status) { From c8bf26a3b3d29f44f6b45dfbbda5a33985ae076d Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 16:01:48 +1030 Subject: [PATCH 072/140] Fix layout of loading box --- public/assets/css/lib/jquery.dataTables.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/assets/css/lib/jquery.dataTables.css b/public/assets/css/lib/jquery.dataTables.css index 0206b050dd..6ddad3f791 100755 --- a/public/assets/css/lib/jquery.dataTables.css +++ b/public/assets/css/lib/jquery.dataTables.css @@ -213,15 +213,16 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; } top: 50%; left: 50%; width: 250px; - height: 30px; + height: 50px; margin-left: -125px; margin-top: -15px; padding: 14px 0 2px 0; border: 1px solid #ddd; text-align: center; color: #999; - font-size: 14px; - background-color: white; + font-size: 16px; + background-color: #FFF; + z-index: 1; } From f5e14e59e9ddc4ec0e22f42f098e85309ae059ff Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 16:06:54 +1030 Subject: [PATCH 073/140] Processing and custom processing content --- app/views/backend/hardware/index.blade.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 292409b961..d1f33b1990 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -93,7 +93,11 @@ ), 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(0,10,11),'activate'=>'mouseover'), 'columnDefs'=> array(array('visible'=>false,'targets'=>array(7,8,9)),array('bSortable'=>false,'targets'=>array(0,10,11))), - 'order'=>array(array(1,'asc')), + 'order'=>array(array(1,'asc')), + 'bProcessing'=>true, + 'oLanguage'=>array( + 'sProcessing'=>' Loading...' + ), ) ) ->render('backend/hardware/datatable') }} From 434dbe035c199fe2bad1b6de8a6e0e0b28dea367 Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 16:08:02 +1030 Subject: [PATCH 074/140] Processing and custom processing content --- app/views/backend/users/index.blade.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/backend/users/index.blade.php b/app/views/backend/users/index.blade.php index 71b6afe73b..31ecfc45fe 100755 --- a/app/views/backend/users/index.blade.php +++ b/app/views/backend/users/index.blade.php @@ -67,7 +67,11 @@ ), 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','activate'=>'mouseover'), 'columnDefs'=> array(array('visible'=>false,'targets'=>array()),array('bSortable'=>false,'targets'=>array(6))), - 'order'=>array(array(1,'asc')), + 'order'=>array(array(1,'asc')), + 'bProcessing'=>true, + 'oLanguage'=>array( + 'sProcessing'=>' Loading...' + ), ) ) ->render() }} From ceb93926a3da62b6472f3014ddbbb62eeb8e290b Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 16:44:42 +1030 Subject: [PATCH 075/140] Add notes field --- app/views/backend/users/edit.blade.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/views/backend/users/edit.blade.php b/app/views/backend/users/edit.blade.php index 83e77f158a..5352cacd29 100755 --- a/app/views/backend/users/edit.blade.php +++ b/app/views/backend/users/edit.blade.php @@ -194,7 +194,14 @@ - + +
+ +
+ + {{ $errors->first('notes', '
:message') }} +
+
From 25dea384fe661bc3120811864417d0575cbbea7b Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 16:46:00 +1030 Subject: [PATCH 076/140] Change layout and add notes --- app/views/backend/users/view.blade.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/views/backend/users/view.blade.php b/app/views/backend/users/view.blade.php index 8c86bef035..14a3837803 100755 --- a/app/views/backend/users/view.blade.php +++ b/app/views/backend/users/view.blade.php @@ -266,37 +266,39 @@
- -
@lang('admin/users/general.contact_user', array('name' => $user->first_name))
- @if ($user->location_id)
@endif
    + @if ($user->phone) +
  • {{{ $user->phone }}}
  • + @endif +
  • {{{ $user->email }}}

  • @if ($user->manager)
  • @lang('admin/users/table.manager'):
    {{{ $user->manager->fullName() }}}
  • @endif - @if ($user->location_id)
  • {{{ $user->userloc->address }}} {{{ $user->userloc->address2 }}}
  • -
  • {{{ $user->userloc->city }}}, {{{ $user->userloc->state }}} {{{ $user->userloc->zip }}}

  • +
  • {{{ $user->userloc->city }}}, {{{ $user->userloc->state }}} {{{ $user->userloc->zip }}}
  • @endif - @if ($user->phone) -
  • {{{ $user->phone }}}
  • - @endif -
  • {{{ $user->email }}}
+ @if ($user->notes!='') +
    +
  • @lang('admin/users/table.notes'):
    + {{{ $user->notes }}}
  • +
+ @endif + @if ($user->last_login!='')
@lang('admin/users/general.last_login') {{{ $user->last_login->diffForHumans() }}}
@endif
- @stop From 7bb9929624d83cdb9b059794459749ecf1fcf076 Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 16:46:47 +1030 Subject: [PATCH 077/140] Add Notes Lang --- app/lang/en/admin/users/table.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lang/en/admin/users/table.php b/app/lang/en/admin/users/table.php index 3190efd072..8c9b40a454 100755 --- a/app/lang/en/admin/users/table.php +++ b/app/lang/en/admin/users/table.php @@ -21,6 +21,7 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', From 53ab21b0163c3afabed0b39df5b2e46bbf40c514 Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 16:47:52 +1030 Subject: [PATCH 078/140] Migration to add notes field to users --- .../2015_03_18_055327_add_note_to_user.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 app/database/migrations/2015_03_18_055327_add_note_to_user.php diff --git a/app/database/migrations/2015_03_18_055327_add_note_to_user.php b/app/database/migrations/2015_03_18_055327_add_note_to_user.php new file mode 100644 index 0000000000..3b199a3827 --- /dev/null +++ b/app/database/migrations/2015_03_18_055327_add_note_to_user.php @@ -0,0 +1,32 @@ +text('notes'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function ($table) { + $table->dropColumn('notes'); + }); + } + +} From 161d72390b2cb2235a39222ad564e76bf5dad52f Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 16:50:15 +1030 Subject: [PATCH 079/140] Update edit for notes field --- app/controllers/admin/UsersController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/admin/UsersController.php b/app/controllers/admin/UsersController.php index 45c2510f12..7dd0017098 100755 --- a/app/controllers/admin/UsersController.php +++ b/app/controllers/admin/UsersController.php @@ -289,6 +289,7 @@ class UsersController extends AdminController $user->phone = Input::get('phone'); $user->location_id = Input::get('location_id'); $user->manager_id = Input::get('manager_id'); + $user->notes = Input::get('notes'); if ($user->manager_id == "") { $user->manager_id = NULL; From 4aa4e7c9fc831f151e4fd4a2676b7f8e1b845841 Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 18 Mar 2015 17:11:34 +1030 Subject: [PATCH 080/140] Fix error if user is not in throttle table --- app/models/User.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/app/models/User.php b/app/models/User.php index b870ab4399..31a30ae08c 100755 --- a/app/models/User.php +++ b/app/models/User.php @@ -81,15 +81,17 @@ class User extends SentryUserModel public function accountStatus() { - if ($this->sentryThrottle->suspended==1) { - return 'suspended'; - } elseif ($this->sentryThrottle->banned==1) { - return 'banned'; - } else { - return false; - } - - + if ($this->sentryThrottle) { + if ($this->sentryThrottle->suspended==1) { + return 'suspended'; + } elseif ($this->sentryThrottle->banned==1) { + return 'banned'; + } else { + return false; + } + } else { + return false; + } } public function sentryThrottle() { From 61d916d94d2a2229c580812d3bc7cf71fef23004 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 09:43:34 +1030 Subject: [PATCH 081/140] Update for dynamic mac address field --- app/controllers/admin/AssetsController.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 215e49987c..54e662b2a4 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -154,6 +154,8 @@ class AssetsController extends AdminController } else { $asset->rtd_location_id = e(Input::get('rtd_location_id')); } + $checkModel = $this->checkModel(e(Input::get('model_id'))); + $asset->mac_address = ($checkModel == true) ? e(Input::get('mac_address')) : NULL; // Save the asset data $asset->name = e(Input::get('name')); @@ -162,7 +164,6 @@ class AssetsController extends AdminController $asset->order_number = e(Input::get('order_number')); $asset->notes = e(Input::get('notes')); $asset->asset_tag = e(Input::get('asset_tag')); - $asset->mac_address = e(Input::get('mac_address')); $asset->user_id = Sentry::getId(); $asset->archived = '0'; $asset->physical = '1'; @@ -289,6 +290,9 @@ class AssetsController extends AdminController } else { $asset->rtd_location_id = e(Input::get('rtd_location_id')); } + + $checkModel = $this->checkModel(e(Input::get('model_id'))); + $asset->mac_address = ($checkModel == true) ? e(Input::get('mac_address')) : NULL; // Update the asset data $asset->name = e(Input::get('name')); @@ -298,7 +302,6 @@ class AssetsController extends AdminController $asset->asset_tag = e(Input::get('asset_tag')); $asset->notes = e(Input::get('notes')); $asset->physical = '1'; - $asset->mac_address = e(Input::get('mac_address')); // Was the asset updated? if($asset->save()) { @@ -994,4 +997,12 @@ class AssetsController extends AdminController } + public function checkModel($id = null) { + if(Input::get('id')) { + $id = e(Input::get('id')); + } + $model = DB::table('models')->select('id','show_mac_address')->where('id','=',$id)->whereNull('deleted_at')->first(); + return $model->show_mac_address; + } + } From e56ccb0c825f529c98f2abde863b40461ce31a46 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 09:46:31 +1030 Subject: [PATCH 082/140] Add jQuery for mac address field --- app/views/backend/hardware/edit.blade.php | 31 ++++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/app/views/backend/hardware/edit.blade.php b/app/views/backend/hardware/edit.blade.php index 223f17e70e..7bf6a804c1 100755 --- a/app/views/backend/hardware/edit.blade.php +++ b/app/views/backend/hardware/edit.blade.php @@ -81,26 +81,23 @@
@if (isset($selected_model)) - {{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2', 'style'=>'min-width:400px')) }} + {{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2 model', 'style'=>'min-width:400px')) }} @else - {{ Form::select('model_id', $model_list , Input::old('model_id', $asset->model_id), array('class'=>'select2', 'style'=>'min-width:400px')) }} + {{ Form::select('model_id', $model_list , Input::old('model_id', $asset->model_id), array('class'=>'select2 model', 'style'=>'min-width:400px')) }} @endif {{ $errors->first('model_id', '
:message') }}
- - @if ($asset->model && $asset->model->show_mac_address == '1') -
+ - @endif
@@ -218,4 +215,26 @@
+ + @stop From c9628722cb8cdd0050dee5b5ce65978a7a86e660 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 11:31:01 +1030 Subject: [PATCH 083/140] Add check/model route --- app/routes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/routes.php b/app/routes.php index ca21e1f784..28c9887ee5 100755 --- a/app/routes.php +++ b/app/routes.php @@ -50,6 +50,7 @@ Route::group(array('prefix' => 'hardware', 'namespace' => 'Controllers\Admin', ' Route::get('{assetId}/deletefile/{fileId}', array('as' => 'delete/assetfile', 'uses' => 'AssetsController@getDeleteFile')); Route::get('{assetId}/showfile/{fileId}', array('as' => 'show/assetfile', 'uses' => 'AssetsController@displayFile')); Route::post('{assetId}/edit', 'AssetsController@postEdit'); + Route::get('check/model', array('as' => 'check.model', 'uses' => 'AssetsController@checkModel')); Route::post('bulkedit', array('as' => 'hardware/bulkedit', From 603fccb26c04fe6950482bb64f15ad7d89e65fb1 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 16:07:38 +1030 Subject: [PATCH 084/140] Update Routes for API --- app/routes.php | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/app/routes.php b/app/routes.php index 28c9887ee5..0b14fbf45c 100755 --- a/app/routes.php +++ b/app/routes.php @@ -1,4 +1,26 @@ 'api', 'namespace' => 'Controllers\Admin', 'before' => 'admin-auth'), function () { + /*---Hardware API---*/ + Route::group(array('prefix' => 'hardware'), function() { + Route::resource('/', 'AssetsController'); + Route::get('list/{status?}', array('as'=>'api.hardware.list', 'uses'=>'AssetsController@getDatatable')); + }); + /*---Accessories API---*/ + Route::group(array('prefix'=>'accessories'), function () { + Route::resource('/', 'AccessoriesController'); + Route::get('list', array('as'=>'api.accessories.list', 'uses'=>'AccessoriesController@getDatatable')); + }); + /*---Users API---*/ + Route::group(array('prefix'=>'users'), function() { + Route::resource('/', 'UsersController'); + Route::get('list/{status?}', array('as'=>'api.users.list', 'uses'=>'UsersController@getDatatable')); + }); +}); /* |-------------------------------------------------------------------------- @@ -18,9 +40,6 @@ Route::group(array('prefix' => 'hardware', 'namespace' => 'Controllers\Admin', ' 'uses' => 'AssetsController@getIndex') ); - Route::resource('hardware', 'AssetsController'); - Route::get('api/hardware/{status?}', array('as'=>'api.hardware', 'uses'=>'AssetsController@getDatatable')); - Route::get('create/{model?}', array( 'as' => 'create/hardware', 'uses' => 'AssetsController@getCreate') @@ -116,6 +135,7 @@ Route::group(array('prefix' => 'admin', 'before' => 'admin-auth', 'namespace' => # Accessories Route::group(array('prefix' => 'accessories'), function () { + Route::get('create', array('as' => 'create/accessory', 'uses' => 'AccessoriesController@getCreate')); Route::post('create', 'AccessoriesController@postCreate'); Route::get('{accessoryID}/edit', array('as' => 'update/accessory', 'uses' => 'AccessoriesController@getEdit')); @@ -226,7 +246,6 @@ Route::group(array('prefix' => 'admin', 'before' => 'admin-auth', 'namespace' => Route::get('{userId}/restore', array('as' => 'restore/user', 'uses' => 'UsersController@getRestore')); Route::get('{userId}/view', array('as' => 'view/user', 'uses' => 'UsersController@getView')); Route::get('{userId}/unsuspend', array('as' => 'unsuspend/user', 'uses' => 'UsersController@getUnsuspend')); - Route::get('api/users/{status?}', array('as'=>'api.users', 'uses'=>'UsersController@getDatatable')); Route::get('/', array('as' => 'users', 'uses' => 'UsersController@getIndex')); }); From abf91c7b29b2408f418d3be26715ecf978539604 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 16:08:38 +1030 Subject: [PATCH 085/140] Update for dataTables --- .../admin/AccessoriesController.php | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin/AccessoriesController.php b/app/controllers/admin/AccessoriesController.php index b8d7932011..3693e05a4a 100755 --- a/app/controllers/admin/AccessoriesController.php +++ b/app/controllers/admin/AccessoriesController.php @@ -14,6 +14,7 @@ use View; use User; use Actionlog; use Mail; +use Datatable; class AccessoriesController extends AdminController { @@ -25,11 +26,7 @@ class AccessoriesController extends AdminController public function getIndex() { - // Grab all the accessories - $accessories = Accessory::orderBy('created_at', 'DESC')->get(); - - // Show the page - return View::make('backend/accessories/index', compact('accessories')); + return View::make('backend/accessories/index'); } @@ -360,7 +357,37 @@ class AccessoriesController extends AdminController return Redirect::to("admin/accessories")->with('error', Lang::get('admin/accessories/message.checkin.error')); } + public function getDatatable() + { + $accessories = Accessory::select(array('id','name','qty')) + ->whereNull('deleted_at') + ->orderBy('created_at', 'DESC'); + $accessories = $accessories->get(); + + $actions = new \Chumper\Datatable\Columns\FunctionColumn('actions',function($accessories) + { + return 'numRemaining() > 0 ) ? '' : ' disabled').'>'.Lang::get('general.checkout').''; + }); + + return Datatable::collection($accessories) + ->addColumn('name',function($accessories) + { + return link_to('admin/accessories/'.$accessories->id.'/view', $accessories->name); + }) + ->addColumn('qty',function($accessories) + { + return $accessories->qty; + }) + ->addColumn('numRemaining',function($accessories) + { + return $accessories->numRemaining(); + }) + ->addColumn($actions) + ->searchColumns('name','qty','numRemaining','actions') + ->orderColumns('name','qty','numRemaining','actions') + ->make(); + } } From 75bbbcb4cad6cd1f23daf6dd347ba1953942fb03 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 16:09:26 +1030 Subject: [PATCH 086/140] Change to Datatable --- app/views/backend/accessories/index.blade.php | 103 +++++++++++------- 1 file changed, 62 insertions(+), 41 deletions(-) diff --git a/app/views/backend/accessories/index.blade.php b/app/views/backend/accessories/index.blade.php index a2b9132eb2..0dc3f735c0 100755 --- a/app/views/backend/accessories/index.blade.php +++ b/app/views/backend/accessories/index.blade.php @@ -17,49 +17,70 @@ --- app/views/backend/users/view.blade.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/backend/users/view.blade.php b/app/views/backend/users/view.blade.php index 14a3837803..f84ac7ef60 100755 --- a/app/views/backend/users/view.blade.php +++ b/app/views/backend/users/view.blade.php @@ -257,10 +257,8 @@ @endif - - - + From f9e0add4368e96e731e9958a19a475a82b8e739b Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 16:52:07 +1030 Subject: [PATCH 090/140] Change to Datatable --- app/views/backend/licenses/index.blade.php | 100 +++++++++------------ 1 file changed, 43 insertions(+), 57 deletions(-) diff --git a/app/views/backend/licenses/index.blade.php b/app/views/backend/licenses/index.blade.php index 8106044e23..f9f42b695d 100755 --- a/app/views/backend/licenses/index.blade.php +++ b/app/views/backend/licenses/index.blade.php @@ -17,62 +17,48 @@
-
- - - - - - - - - - - - - - - @foreach ($licenses as $license) - - @if ($license->licenseseats) - - - - - - - - - - - - - @endif - - - @endforeach - - - - - - - - -
@lang('admin/licenses/table.title')@lang('admin/licenses/table.serial')@lang('admin/licenses/form.seats')@lang('admin/licenses/form.remaining_seats')@lang('admin/licenses/table.purchase_date')@lang('table.actions')
{{{ $license->name }}} - {{{ mb_strimwidth($license->serial, 0, 50, "...") }}} - - {{{ $license->totalSeatsByLicenseID() }}} - - {{{ $license->remaincount() }}} - - {{{ $license->purchase_date }}} - - - -
+ {{ Datatable::table() + ->addColumn(Lang::get('admin/licenses/table.title'), + Lang::get('admin/licenses/table.serial'), + Lang::get('admin/licenses/form.seats'), + Lang::get('admin/licenses/form.remaining_seats'), + Lang::get('admin/licenses/table.purchase_date'), + Lang::get('table.actions')) + ->setUrl(route('api.licenses.list')) // this is the route where data will be retrieved + ->setOptions( + array( + 'deferRender'=> true, + 'stateSave'=> true, + 'stateDuration'=> -1, + 'dom' =>'CT<"clear">lfrtip', + 'tableTools' => array( + 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', + 'aButtons'=>array( + 'copy', + 'print', + array( + 'sExtends'=>'collection', + 'sButtonText'=>'Export', + 'aButtons'=>array( + 'csv', + 'xls', + 'pdf' + ) + ) + ) + ), + 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(5),'activate'=>'mouseover'), + 'columnDefs'=> array( + array('bSortable'=>false,'targets'=>array(5)), + array('width'=>'20%','targets'=>array(5)), + ), + 'order'=>array(array(0,'asc')), + 'bProcessing'=>true, + 'oLanguage'=>array( + 'sProcessing'=>' Loading...', + ), + ) + ) + ->render() }}
@stop From 8af799614e9a6eb626e134437feef832a38c1c54 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 16:52:52 +1030 Subject: [PATCH 091/140] Update for dataTables --- app/controllers/admin/LicensesController.php | 35 +++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/LicensesController.php b/app/controllers/admin/LicensesController.php index 4af089534a..94a6196ce5 100755 --- a/app/controllers/admin/LicensesController.php +++ b/app/controllers/admin/LicensesController.php @@ -19,6 +19,7 @@ use Supplier; use Validator; use View; use Response; +use Datatable; class LicensesController extends AdminController { @@ -33,11 +34,8 @@ class LicensesController extends AdminController public function getIndex() { - // Grab all the licenses - $licenses = License::orderBy('created_at', 'DESC')->get(); - // Show the page - return View::make('backend/licenses/index', compact('licenses')); + return View::make('backend/licenses/index'); } @@ -777,4 +775,33 @@ class LicensesController extends AdminController return Redirect::route('licenses')->with('error', $error); } } + + public function getDatatable() { + $licenses = License::orderBy('created_at', 'DESC')->get(); + + $actions = new \Chumper\Datatable\Columns\FunctionColumn('actions', function($licenses) { + return ''; + }); + + return Datatable::collection($licenses) + ->addColumn('name', function($licenses) { + return link_to('/admin/licenses/'.$licenses->id.'/view', $licenses->name); + }) + ->addColumn('serial', function($licenses) { + return link_to('/admin/licenses/'.$licenses->id.'/view', mb_strimwidth($licenses->serial, 0, 50, "...")); + }) + ->addColumn('totalSeats', function($licenses) { + return $licenses->totalSeatsByLicenseID(); + }) + ->addColumn('remaining', function($licenses) { + return $licenses->remaincount(); + }) + ->addColumn('purchase_date', function($licenses) { + return $licenses->purchase_date; + }) + ->addColumn($actions) + ->searchColumns('name','serial','totalSeats','remaining','purchase_date','actions') + ->orderColumns('name','serial','totalSeats','remaining','purchase_date','actions') + ->make(); + } } From 14aa12eb0951061c81175561553a66e28ff8bf6e Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 19 Mar 2015 16:53:43 +1030 Subject: [PATCH 092/140] Add Licenses API --- app/routes.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/routes.php b/app/routes.php index 0b14fbf45c..691faf1924 100755 --- a/app/routes.php +++ b/app/routes.php @@ -20,6 +20,11 @@ Route::group(array('prefix' => 'api', 'namespace' => 'Controllers\Admin', 'befor Route::resource('/', 'UsersController'); Route::get('list/{status?}', array('as'=>'api.users.list', 'uses'=>'UsersController@getDatatable')); }); + /*---Licenses API---*/ + Route::group(array('prefix'=>'licenses'), function() { + Route::resource('/', 'LicensesController'); + Route::get('list', array('as'=>'api.licenses.list', 'uses'=>'LicensesController@getDatatable')); + }); }); /* From fa794d7a15e757dc7038078779d2fed030b430bb Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 19 Mar 2015 18:06:50 -0700 Subject: [PATCH 093/140] Basic QR code printing --- app/controllers/admin/AssetsController.php | 47 +++++++++-- .../backend/hardware/datatable.blade.php | 7 +- app/views/backend/hardware/labels.blade.php | 78 +++++++++++++++++++ composer.lock | 48 ++++++------ 4 files changed, 148 insertions(+), 32 deletions(-) create mode 100644 app/views/backend/hardware/labels.blade.php diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 54e662b2a4..dc48effedd 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -24,6 +24,7 @@ use Log; use DNS2D; use Mail; use Datatable; +use TCPDF; class AssetsController extends AdminController { @@ -799,18 +800,50 @@ class AssetsController extends AdminController **/ public function postBulkEdit($assets = null) { + + if (!Input::has('edit_asset')) { + return Redirect::back()->with('error', 'No assets selected'); + } else { + $asset_raw_array = Input::get('edit_asset'); + foreach ($asset_raw_array as $asset_id => $value) { + $asset_ids[] = $asset_id; + + } + + } + + if (Input::has('bulk_actions')) { + + + // Create labels + if (Input::get('bulk_actions')=='labels') { + $assets = Asset::find($asset_ids); + $assetcount = count($assets); + + $settings = Setting::getSettings(); + return View::make('backend/hardware/labels')->with('assets',$assets)->with('settings',$settings); - if (Input::has('edit_asset')) { + + // Bulk edit + } elseif (Input::get('bulk_actions')=='edit') { + + $assets = Input::get('edit_asset'); + + $supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id'); + $statuslabel_list = array('' => '') + Statuslabel::lists('name', 'id'); + $location_list = array('' => '') + Location::lists('name', 'id'); + + return View::make('backend/hardware/bulk')->with('assets',$assets)->with('supplier_list',$supplier_list)->with('statuslabel_list',$statuslabel_list)->with('location_list',$location_list); - $assets = Input::get('edit_asset'); - - $supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id'); - $statuslabel_list = array('' => '') + Statuslabel::lists('name', 'id'); - $location_list = array('' => '') + Location::lists('name', 'id'); + + } + + } else { + return Redirect::back()->with('error', 'No action selected'); } - return View::make('backend/hardware/bulk')->with('assets',$assets)->with('supplier_list',$supplier_list)->with('statuslabel_list',$statuslabel_list)->with('location_list',$location_list); + } diff --git a/app/views/backend/hardware/datatable.blade.php b/app/views/backend/hardware/datatable.blade.php index f3ad22568e..e2306e3d84 100644 --- a/app/views/backend/hardware/datatable.blade.php +++ b/app/views/backend/hardware/datatable.blade.php @@ -13,7 +13,12 @@ - + + + diff --git a/app/views/backend/hardware/labels.blade.php b/app/views/backend/hardware/labels.blade.php new file mode 100644 index 0000000000..6afec696d2 --- /dev/null +++ b/app/views/backend/hardware/labels.blade.php @@ -0,0 +1,78 @@ + + + + + Labels + + + + + + + +@foreach ($assets as $asset) +
+
+
+ @if ($settings->qr_text!='') + {{ $settings->qr_text }} +

+ @endif + @if ($asset->name!='') + N: {{ $asset->name }} +
+ @endif + @if ($asset->asset_tag!='') + T: {{ $asset->asset_tag }} +
+ @endif + @if ($asset->serial!='') + S: {{ $asset->serial }} +
+ @endif + +
+
+@endforeach + + +
(Repeat 30 times)
+
+ + + + + diff --git a/composer.lock b/composer.lock index ebd38527fd..a1e2db6fd5 100644 --- a/composer.lock +++ b/composer.lock @@ -829,12 +829,12 @@ "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "65116c3cb0953447eac742aa4ea5fc4aaaa22db9" + "reference": "468d1e3da8bde049debee7f484a4f9c4b26b41ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/65116c3cb0953447eac742aa4ea5fc4aaaa22db9", - "reference": "65116c3cb0953447eac742aa4ea5fc4aaaa22db9", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/468d1e3da8bde049debee7f484a4f9c4b26b41ba", + "reference": "468d1e3da8bde049debee7f484a4f9c4b26b41ba", "shasum": "" }, "type": "library", @@ -860,7 +860,7 @@ "markdown", "parser" ], - "time": "2015-02-08 23:04:08" + "time": "2015-03-18 18:44:57" }, { "name": "filp/whoops", @@ -926,12 +926,12 @@ "source": { "type": "git", "url": "https://github.com/Intervention/image.git", - "reference": "e58192bb1efd7dc26c2bac9ab8ab49b0cbb4552a" + "reference": "8f3761154b4c1f5128365dfc32cbf757f27d97b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/e58192bb1efd7dc26c2bac9ab8ab49b0cbb4552a", - "reference": "e58192bb1efd7dc26c2bac9ab8ab49b0cbb4552a", + "url": "https://api.github.com/repos/Intervention/image/zipball/8f3761154b4c1f5128365dfc32cbf757f27d97b6", + "reference": "8f3761154b4c1f5128365dfc32cbf757f27d97b6", "shasum": "" }, "require": { @@ -974,7 +974,7 @@ "thumbnail", "watermark" ], - "time": "2015-03-11 22:03:31" + "time": "2015-03-18 17:41:04" }, { "name": "ircmaxell/password-compat", @@ -2863,12 +2863,12 @@ "source": { "type": "git", "url": "https://github.com/padraic/mockery.git", - "reference": "8f49adc0fccd0575e2a156a52046e6c6ed7a5c60" + "reference": "43006b6c41e8fa9ac7469ceea2efd8abbcb20657" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/mockery/zipball/8f49adc0fccd0575e2a156a52046e6c6ed7a5c60", - "reference": "8f49adc0fccd0575e2a156a52046e6c6ed7a5c60", + "url": "https://api.github.com/repos/padraic/mockery/zipball/43006b6c41e8fa9ac7469ceea2efd8abbcb20657", + "reference": "43006b6c41e8fa9ac7469ceea2efd8abbcb20657", "shasum": "" }, "require": { @@ -2920,7 +2920,7 @@ "test double", "testing" ], - "time": "2015-03-13 10:47:42" + "time": "2015-03-19 19:27:19" }, { "name": "phpdocumentor/reflection-docblock", @@ -3038,12 +3038,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "74cf128bd0f643957c076cc67121dbff445755fe" + "reference": "4676604b851bfc6fc02bf3394bf350c727bcebf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/74cf128bd0f643957c076cc67121dbff445755fe", - "reference": "74cf128bd0f643957c076cc67121dbff445755fe", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4676604b851bfc6fc02bf3394bf350c727bcebf4", + "reference": "4676604b851bfc6fc02bf3394bf350c727bcebf4", "shasum": "" }, "require": { @@ -3092,7 +3092,7 @@ "testing", "xunit" ], - "time": "2015-03-06 11:27:25" + "time": "2015-03-19 05:49:08" }, { "name": "phpunit/php-file-iterator", @@ -3282,12 +3282,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0af3326435e98143c808ab73b8e96d016987bbfb" + "reference": "ab0bd2250002bcaeed9407a362eeeaf2a78fe060" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0af3326435e98143c808ab73b8e96d016987bbfb", - "reference": "0af3326435e98143c808ab73b8e96d016987bbfb", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ab0bd2250002bcaeed9407a362eeeaf2a78fe060", + "reference": "ab0bd2250002bcaeed9407a362eeeaf2a78fe060", "shasum": "" }, "require": { @@ -3349,7 +3349,7 @@ "testing", "xunit" ], - "time": "2015-03-16 14:58:13" + "time": "2015-03-18 05:42:02" }, { "name": "phpunit/phpunit-mock-objects", @@ -3357,12 +3357,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "37e984c0d004800c456658cb08580fdfd26d9c1d" + "reference": "55484334fb4c306ed24bfc3bdb0874685c29036f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/37e984c0d004800c456658cb08580fdfd26d9c1d", - "reference": "37e984c0d004800c456658cb08580fdfd26d9c1d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/55484334fb4c306ed24bfc3bdb0874685c29036f", + "reference": "55484334fb4c306ed24bfc3bdb0874685c29036f", "shasum": "" }, "require": { @@ -3404,7 +3404,7 @@ "mock", "xunit" ], - "time": "2015-03-02 06:02:35" + "time": "2015-03-18 09:04:51" }, { "name": "sebastian/comparator", From 80d2347095447e809afc24a944d0c4a93de63293 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 20 Mar 2015 12:38:39 -0700 Subject: [PATCH 094/140] Better label layout --- app/config/version.php | 4 ++-- app/controllers/admin/AssetsController.php | 3 ++- app/views/backend/hardware/labels.blade.php | 25 ++++++++++++--------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index dc774bd192..31e5dabbaf 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6.1-89', - 'hash_version' => 'v1.2.6.1-89-gb66f553', + 'app_version' => 'v1.2.6.1-116', + 'hash_version' => 'v1.2.6.1-116-g85b6571', ); \ No newline at end of file diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index dc48effedd..454429de79 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -819,9 +819,10 @@ class AssetsController extends AdminController if (Input::get('bulk_actions')=='labels') { $assets = Asset::find($asset_ids); $assetcount = count($assets); + $count = 0; $settings = Setting::getSettings(); - return View::make('backend/hardware/labels')->with('assets',$assets)->with('settings',$settings); + return View::make('backend/hardware/labels')->with('assets',$assets)->with('settings',$settings)->with('count',$count); // Bulk edit diff --git a/app/views/backend/hardware/labels.blade.php b/app/views/backend/hardware/labels.blade.php index 6afec696d2..2a64d5b587 100644 --- a/app/views/backend/hardware/labels.blade.php +++ b/app/views/backend/hardware/labels.blade.php @@ -20,30 +20,31 @@ overflow: hidden; - outline: 1px dotted /* outline doesn't occupy space like border does */ + outline: none; /* outline doesn't occupy space like border does */ } .page-break { clear: left; display:block; page-break-after:always; } - .qr_img { + .qr_img { float: left; } - .qr_text { + .qr_text { margin-left: 5px; float: left; font-family: arial, helvetica, sans-serif; - font-size: 14px; + font-size: 15px; } - + @foreach ($assets as $asset) +
@@ -51,10 +52,7 @@ {{ $settings->qr_text }}

@endif - @if ($asset->name!='') - N: {{ $asset->name }} -
- @endif + @if ($asset->asset_tag!='') T: {{ $asset->asset_tag }}
@@ -66,11 +64,16 @@
+ @if ($count % 18 == 0) +
+ + @endif + @endforeach -
(Repeat 30 times)
-
+ + From 72048a52677a7a225e570349d1a482a8098e6ee0 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 20 Mar 2015 14:24:04 -0700 Subject: [PATCH 095/140] Updated default mail server to mailchimp --- app/config/local/mail.example.php | 2 +- app/config/production/mail.example.php | 2 +- app/config/staging/mail.example.php | 2 +- app/config/testing/mail.example.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/config/local/mail.example.php b/app/config/local/mail.example.php index 8d882a11e0..50e438f6d3 100755 --- a/app/config/local/mail.example.php +++ b/app/config/local/mail.example.php @@ -28,7 +28,7 @@ return array( | */ - 'host' => 'smtp.mailgun.org', + 'host' => 'smtp.mandrillapp.com', /* |-------------------------------------------------------------------------- diff --git a/app/config/production/mail.example.php b/app/config/production/mail.example.php index 8d882a11e0..50e438f6d3 100755 --- a/app/config/production/mail.example.php +++ b/app/config/production/mail.example.php @@ -28,7 +28,7 @@ return array( | */ - 'host' => 'smtp.mailgun.org', + 'host' => 'smtp.mandrillapp.com', /* |-------------------------------------------------------------------------- diff --git a/app/config/staging/mail.example.php b/app/config/staging/mail.example.php index 8d882a11e0..50e438f6d3 100755 --- a/app/config/staging/mail.example.php +++ b/app/config/staging/mail.example.php @@ -28,7 +28,7 @@ return array( | */ - 'host' => 'smtp.mailgun.org', + 'host' => 'smtp.mandrillapp.com', /* |-------------------------------------------------------------------------- diff --git a/app/config/testing/mail.example.php b/app/config/testing/mail.example.php index a4da87593b..22ebbad7e0 100755 --- a/app/config/testing/mail.example.php +++ b/app/config/testing/mail.example.php @@ -28,7 +28,7 @@ return array( | */ - 'host' => 'smtp.mailgun.org', + 'host' => 'smtp.mandrillapp.com', /* |-------------------------------------------------------------------------- From 0c9bc4e59e7982e1bf2ab734cd79c2813513336f Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 20 Mar 2015 14:24:23 -0700 Subject: [PATCH 096/140] Added link to Common Issues and Getting Help pages --- CONTRIBUTING.md | 6 +++++- app/config/version.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb20a68117..ae8746df79 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,10 @@ # Contribution Guidelines -Please submit all issues and pull requests to the [snipe/snipe-it](http://github.com/snipe/snipe-it) repository in the `develop` branch! +**Before opening an issue to report a bug or request help, make sure you've checked the [Common Issues](http://snipeitapp.com/documentation/common-issues/) and [Getting Help](http://snipeitapp.com/documentation/getting-help/) pages.** + +## Developing on Snipe-IT + +Please submit all pull requests to the [snipe/snipe-it](http://github.com/snipe/snipe-it) repository in the `develop` branch! **As you're working on bug-fixes or features, please break them out into their own feature branches and open the pull request against your feature branch**. It makes it _much_ easier to decipher down the road, as you open multiple pull requests over time, and makes it much easier for me to approve pull requests quickly. diff --git a/app/config/version.php b/app/config/version.php index 31e5dabbaf..4914f9a578 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6.1-116', - 'hash_version' => 'v1.2.6.1-116-g85b6571', + 'app_version' => 'v1.2.6.1-118', + 'hash_version' => 'v1.2.6.1-118-g80d2347', ); \ No newline at end of file From 617cc674672bae62b2fc525b759d2388e8ad2cc1 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 20 Mar 2015 14:31:31 -0700 Subject: [PATCH 097/140] Added Thai language files --- app/lang/th/admin/accessories/general.php | 20 ++++ app/lang/th/admin/accessories/message.php | 37 +++++++ app/lang/th/admin/accessories/table.php | 9 ++ app/lang/th/admin/categories/general.php | 21 ++++ app/lang/th/admin/categories/message.php | 24 +++++ app/lang/th/admin/categories/table.php | 10 ++ app/lang/th/admin/depreciations/general.php | 12 +++ app/lang/th/admin/depreciations/message.php | 25 +++++ app/lang/th/admin/depreciations/table.php | 10 ++ app/lang/th/admin/groups/message.php | 22 +++++ app/lang/th/admin/groups/table.php | 9 ++ app/lang/th/admin/groups/titles.php | 13 +++ app/lang/th/admin/hardware/form.php | 41 ++++++++ app/lang/th/admin/hardware/general.php | 18 ++++ app/lang/th/admin/hardware/message.php | 57 +++++++++++ app/lang/th/admin/hardware/table.php | 22 +++++ app/lang/th/admin/licenses/form.php | 27 +++++ app/lang/th/admin/licenses/general.php | 19 ++++ app/lang/th/admin/licenses/message.php | 50 ++++++++++ app/lang/th/admin/licenses/table.php | 17 ++++ app/lang/th/admin/locations/message.php | 25 +++++ app/lang/th/admin/locations/table.php | 15 +++ app/lang/th/admin/manufacturers/message.php | 24 +++++ app/lang/th/admin/manufacturers/table.php | 11 +++ app/lang/th/admin/models/general.php | 11 +++ app/lang/th/admin/models/message.php | 30 ++++++ app/lang/th/admin/models/table.php | 17 ++++ app/lang/th/admin/reports/general.php | 5 + app/lang/th/admin/reports/message.php | 5 + app/lang/th/admin/settings/general.php | 35 +++++++ app/lang/th/admin/settings/message.php | 11 +++ app/lang/th/admin/statuslabels/message.php | 25 +++++ app/lang/th/admin/statuslabels/table.php | 15 +++ app/lang/th/admin/suppliers/message.php | 24 +++++ app/lang/th/admin/suppliers/table.php | 25 +++++ app/lang/th/admin/users/general.php | 15 +++ app/lang/th/admin/users/message.php | 34 +++++++ app/lang/th/admin/users/table.php | 33 +++++++ app/lang/th/auth/message.php | 36 +++++++ app/lang/th/button.php | 14 +++ app/lang/th/general.php | 103 ++++++++++++++++++++ app/lang/th/pagination.php | 20 ++++ app/lang/th/reminders.php | 24 +++++ app/lang/th/table.php | 10 ++ app/lang/th/validation.php | 95 ++++++++++++++++++ 45 files changed, 1125 insertions(+) create mode 100755 app/lang/th/admin/accessories/general.php create mode 100755 app/lang/th/admin/accessories/message.php create mode 100755 app/lang/th/admin/accessories/table.php create mode 100755 app/lang/th/admin/categories/general.php create mode 100755 app/lang/th/admin/categories/message.php create mode 100755 app/lang/th/admin/categories/table.php create mode 100755 app/lang/th/admin/depreciations/general.php create mode 100755 app/lang/th/admin/depreciations/message.php create mode 100755 app/lang/th/admin/depreciations/table.php create mode 100755 app/lang/th/admin/groups/message.php create mode 100755 app/lang/th/admin/groups/table.php create mode 100755 app/lang/th/admin/groups/titles.php create mode 100755 app/lang/th/admin/hardware/form.php create mode 100755 app/lang/th/admin/hardware/general.php create mode 100755 app/lang/th/admin/hardware/message.php create mode 100755 app/lang/th/admin/hardware/table.php create mode 100755 app/lang/th/admin/licenses/form.php create mode 100755 app/lang/th/admin/licenses/general.php create mode 100755 app/lang/th/admin/licenses/message.php create mode 100755 app/lang/th/admin/licenses/table.php create mode 100755 app/lang/th/admin/locations/message.php create mode 100755 app/lang/th/admin/locations/table.php create mode 100755 app/lang/th/admin/manufacturers/message.php create mode 100755 app/lang/th/admin/manufacturers/table.php create mode 100755 app/lang/th/admin/models/general.php create mode 100755 app/lang/th/admin/models/message.php create mode 100755 app/lang/th/admin/models/table.php create mode 100755 app/lang/th/admin/reports/general.php create mode 100755 app/lang/th/admin/reports/message.php create mode 100755 app/lang/th/admin/settings/general.php create mode 100755 app/lang/th/admin/settings/message.php create mode 100755 app/lang/th/admin/statuslabels/message.php create mode 100755 app/lang/th/admin/statuslabels/table.php create mode 100755 app/lang/th/admin/suppliers/message.php create mode 100755 app/lang/th/admin/suppliers/table.php create mode 100755 app/lang/th/admin/users/general.php create mode 100755 app/lang/th/admin/users/message.php create mode 100755 app/lang/th/admin/users/table.php create mode 100755 app/lang/th/auth/message.php create mode 100755 app/lang/th/button.php create mode 100755 app/lang/th/general.php create mode 100755 app/lang/th/pagination.php create mode 100755 app/lang/th/reminders.php create mode 100755 app/lang/th/table.php create mode 100755 app/lang/th/validation.php diff --git a/app/lang/th/admin/accessories/general.php b/app/lang/th/admin/accessories/general.php new file mode 100755 index 0000000000..c0182c2a03 --- /dev/null +++ b/app/lang/th/admin/accessories/general.php @@ -0,0 +1,20 @@ + 'About Accessories', + 'about_accessories_text' => 'Accessories are anything you issue to users but that do not have a serial number (or you do not care about tracking them uniquely). For example, computer mice or keyboards.', + 'accessory_category' => 'Accessory Category', + 'accessory_name' => 'Accessory Name', + 'create' => 'Create Category', + 'eula_text' => 'Category EULA', + 'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.', + 'require_acceptance' => 'Require users to confirm acceptance of assets in this category.', + 'no_default_eula' => 'No primary default EULA found. Add one in Settings.', + 'qty' => 'QTY', + 'total' => 'Total', + 'remaining' => 'Avail', + 'update' => 'Update Category', + 'use_default_eula' => 'Use the primary default EULA instead.', + 'use_default_eula_disabled' => 'Use the primary default EULA instead. No primary default EULA is set. Please add one in Settings.', + +); diff --git a/app/lang/th/admin/accessories/message.php b/app/lang/th/admin/accessories/message.php new file mode 100755 index 0000000000..62f179c5a1 --- /dev/null +++ b/app/lang/th/admin/accessories/message.php @@ -0,0 +1,37 @@ + 'Category does not exist.', + 'assoc_users' => 'This accessory currently has :count items checked out to users. Please check in the accessories and and try again. ', + + 'create' => array( + 'error' => 'Category was not created, please try again.', + 'success' => 'Category created successfully.' + ), + + 'update' => array( + 'error' => 'Category was not updated, please try again', + 'success' => 'Category updated successfully.' + ), + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this category?', + 'error' => 'There was an issue deleting the category. Please try again.', + 'success' => 'The category was deleted successfully.' + ), + + 'checkout' => array( + 'error' => 'Accessory was not checked out, please try again', + 'success' => 'Accessory checked out successfully.', + 'user_does_not_exist' => 'That user is invalid. Please try again.' + ), + + 'checkin' => array( + 'error' => 'Accessory was not checked in, please try again', + 'success' => 'Accessory checked in successfully.', + 'user_does_not_exist' => 'That user is invalid. Please try again.' + ) + + +); diff --git a/app/lang/th/admin/accessories/table.php b/app/lang/th/admin/accessories/table.php new file mode 100755 index 0000000000..c86dd8adfa --- /dev/null +++ b/app/lang/th/admin/accessories/table.php @@ -0,0 +1,9 @@ + 'EULA', + 'id' => 'ID', + 'require_acceptance' => 'Acceptance', + 'title' => 'Accessory Name', + +); diff --git a/app/lang/th/admin/categories/general.php b/app/lang/th/admin/categories/general.php new file mode 100755 index 0000000000..241dd24326 --- /dev/null +++ b/app/lang/th/admin/categories/general.php @@ -0,0 +1,21 @@ + 'About Asset Categories', + 'about_categories' => 'Asset categories help you organize your assets. Some example categories might be "Desktops", "Laptops", "Mobile Phones", "Tablets", and so on, but you can use asset categories any way that makes sense for you.', + 'asset_categories' => 'Asset Categories', + 'category_name' => 'Category Name', + 'clone' => 'Clone Category', + 'create' => 'Create Category', + 'edit' => 'Edit Category', + 'eula_text' => 'Category EULA', + 'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.', + 'require_acceptance' => 'Require users to confirm acceptance of assets in this category.', + 'required_acceptance' => 'This user will be emailed with a link to confirm acceptance of this item.', + 'required_eula' => 'This user will be emailed a copy of the EULA', + 'no_default_eula' => 'No primary default EULA found. Add one in Settings.', + 'update' => 'Update Category', + 'use_default_eula' => 'Use the primary default EULA instead.', + 'use_default_eula_disabled' => 'Use the primary default EULA instead. No primary default EULA is set. Please add one in Settings.', + +); diff --git a/app/lang/th/admin/categories/message.php b/app/lang/th/admin/categories/message.php new file mode 100755 index 0000000000..c4f947bd3f --- /dev/null +++ b/app/lang/th/admin/categories/message.php @@ -0,0 +1,24 @@ + 'Category does not exist.', + 'assoc_users' => 'This category is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this category and try again. ', + + 'create' => array( + 'error' => 'Category was not created, please try again.', + 'success' => 'Category created successfully.' + ), + + 'update' => array( + 'error' => 'Category was not updated, please try again', + 'success' => 'Category updated successfully.' + ), + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this category?', + 'error' => 'There was an issue deleting the category. Please try again.', + 'success' => 'The category was deleted successfully.' + ) + +); diff --git a/app/lang/th/admin/categories/table.php b/app/lang/th/admin/categories/table.php new file mode 100755 index 0000000000..a3ee96ae7f --- /dev/null +++ b/app/lang/th/admin/categories/table.php @@ -0,0 +1,10 @@ + 'EULA', + 'id' => 'ID', + 'parent' => 'Parent', + 'require_acceptance' => 'Acceptance', + 'title' => 'Asset Category Name', + +); diff --git a/app/lang/th/admin/depreciations/general.php b/app/lang/th/admin/depreciations/general.php new file mode 100755 index 0000000000..d5796ff9f6 --- /dev/null +++ b/app/lang/th/admin/depreciations/general.php @@ -0,0 +1,12 @@ + 'About Asset Depreciations', + 'about_depreciations' => 'You can set up asset depreciations to depreciate assets based on straight-line depreciation.', + 'asset_depreciations' => 'Asset Depreciations', + 'create_depreciation' => 'Create Depreciation', + 'depreciation_name' => 'Depreciation Name', + 'number_of_months' => 'Number of Months', + 'update_depreciation' => 'Update Depreciation', + +); diff --git a/app/lang/th/admin/depreciations/message.php b/app/lang/th/admin/depreciations/message.php new file mode 100755 index 0000000000..c20e52c13c --- /dev/null +++ b/app/lang/th/admin/depreciations/message.php @@ -0,0 +1,25 @@ + 'Depreciation class does not exist.', + 'assoc_users' => 'This depreciation is currently associated with one or more models and cannot be deleted. Please delete the models, and then try deleting again. ', + + + 'create' => array( + 'error' => 'Depreciation class was not created, please try again. :(', + 'success' => 'Depreciation class created successfully. :)' + ), + + 'update' => array( + 'error' => 'Depreciation class was not updated, please try again', + 'success' => 'Depreciation class updated successfully.' + ), + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this depreciation class?', + 'error' => 'There was an issue deleting the depreciation class. Please try again.', + 'success' => 'The depreciation class was deleted successfully.' + ) + +); diff --git a/app/lang/th/admin/depreciations/table.php b/app/lang/th/admin/depreciations/table.php new file mode 100755 index 0000000000..5ba01d132c --- /dev/null +++ b/app/lang/th/admin/depreciations/table.php @@ -0,0 +1,10 @@ + 'ID', + 'months' => 'Months', + 'term' => 'Term', + 'title' => 'Name ', + +); diff --git a/app/lang/th/admin/groups/message.php b/app/lang/th/admin/groups/message.php new file mode 100755 index 0000000000..f14b6339e8 --- /dev/null +++ b/app/lang/th/admin/groups/message.php @@ -0,0 +1,22 @@ + 'Group already exists!', + 'group_not_found' => 'Group [:id] does not exist.', + 'group_name_required' => 'The name field is required', + + 'success' => array( + 'create' => 'Group was successfully created.', + 'update' => 'Group was successfully updated.', + 'delete' => 'Group was successfully deleted.', + ), + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this group?', + 'create' => 'There was an issue creating the group. Please try again.', + 'update' => 'There was an issue updating the group. Please try again.', + 'delete' => 'There was an issue deleting the group. Please try again.', + ), + +); diff --git a/app/lang/th/admin/groups/table.php b/app/lang/th/admin/groups/table.php new file mode 100755 index 0000000000..61f060a116 --- /dev/null +++ b/app/lang/th/admin/groups/table.php @@ -0,0 +1,9 @@ + 'Id', + 'name' => 'Name', + 'users' => '# of Users', + +); diff --git a/app/lang/th/admin/groups/titles.php b/app/lang/th/admin/groups/titles.php new file mode 100755 index 0000000000..12c333a66f --- /dev/null +++ b/app/lang/th/admin/groups/titles.php @@ -0,0 +1,13 @@ + 'Group Management', + 'create_group' => 'Create New Group', + 'edit_group' => 'Edit Group', + 'group_name' => 'Group Name', + 'group_admin' => 'Group Admin', + 'allow' => 'Allow', + 'deny' => 'Deny', + +); diff --git a/app/lang/th/admin/hardware/form.php b/app/lang/th/admin/hardware/form.php new file mode 100755 index 0000000000..337b49c571 --- /dev/null +++ b/app/lang/th/admin/hardware/form.php @@ -0,0 +1,41 @@ + 'Bulk Update Assets', + 'bulk_update_help' => 'This form allows you to update multiple assets at once. Only fill in the fields you need to change. Any fields left blank will remain unchanged. ', + 'bulk_update_warn' => 'You are about to edit the properties of :asset_count assets.', + 'checkedout_to' => 'Checked Out To', + 'checkout_date' => 'Checkout Date', + 'checkin_date' => 'Checkin Date', + 'checkout_to' => 'Checkout to', + 'cost' => 'Purchase Cost', + 'create' => 'Create Asset', + 'date' => 'Purchase Date', + 'depreciates_on' => 'Depreciates On', + 'depreciation' => 'Depreciation', + 'default_location' => 'Default Location', + 'eol_date' => 'EOL Date', + 'eol_rate' => 'EOL Rate', + 'expires' => 'Expires', + 'fully_depreciated' => 'Fully Depreciated', + 'help_checkout' => 'If you wish to assign this asset immediately, you should select "Ready to Deploy" from the status list above, or unexpected things may happen. ', + 'mac_address' => 'MAC Address', + 'manufacturer' => 'Manufacturer', + 'model' => 'Model', + 'months' => 'months', + 'name' => 'Asset Name', + 'notes' => 'Notes', + 'order' => 'Order Number', + 'qr' => 'QR Code', + 'requestable' => 'Users may request this asset', + 'select_statustype' => 'Select Status Type', + 'serial' => 'Serial', + 'status' => 'Status', + 'supplier' => 'Supplier', + 'tag' => 'Asset Tag', + 'update' => 'Asset Update', + 'warranty' => 'Warranty', + 'years' => 'years', +) +; diff --git a/app/lang/th/admin/hardware/general.php b/app/lang/th/admin/hardware/general.php new file mode 100755 index 0000000000..56554b1eda --- /dev/null +++ b/app/lang/th/admin/hardware/general.php @@ -0,0 +1,18 @@ + 'Archived', + 'asset' => 'Asset', + 'checkin' => 'Checkin Asset', + 'checkout' => 'Checkout Asset to User', + 'clone' => 'Clone Asset', + 'deployable' => 'Deployable', + 'deleted' => 'This asset has been deleted. Click here to restore it.', + 'edit' => 'Edit Asset', + 'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.
Click here to restore the model.', + 'requestable' => 'Requestable', + 'restore' => 'Restore Asset', + 'pending' => 'Pending', + 'undeployable' => 'Undeployable', + 'view' => 'View Asset', +); diff --git a/app/lang/th/admin/hardware/message.php b/app/lang/th/admin/hardware/message.php new file mode 100755 index 0000000000..953c99df70 --- /dev/null +++ b/app/lang/th/admin/hardware/message.php @@ -0,0 +1,57 @@ + 'Warning: This asset has been marked as currently undeployable. + If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + + 'create' => array( + 'error' => 'Asset was not created, please try again. :(', + 'success' => 'Asset created successfully. :)' + ), + + 'update' => array( + 'error' => 'Asset was not updated, please try again', + 'success' => 'Asset updated successfully.', + 'nothing_updated' => 'No fields were selected, so nothing was updated.', + ), + + 'restore' => array( + 'error' => 'Asset was not restored, please try again', + 'success' => 'Asset restored successfully.' + ), + + 'deletefile' => array( + 'error' => 'File not deleted. Please try again.', + 'success' => 'File successfully deleted.', + ), + + 'upload' => array( + 'error' => 'File(s) not uploaded. Please try again.', + 'success' => 'File(s) successfully uploaded.', + 'nofiles' => 'You did not select any files for upload', + 'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.', + ), + + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this asset?', + 'error' => 'There was an issue deleting the asset. Please try again.', + 'success' => 'The asset was deleted successfully.' + ), + + 'checkout' => array( + 'error' => 'Asset was not checked out, please try again', + 'success' => 'Asset checked out successfully.', + 'user_does_not_exist' => 'That user is invalid. Please try again.' + ), + + 'checkin' => array( + 'error' => 'Asset was not checked in, please try again', + 'success' => 'Asset checked in successfully.', + 'user_does_not_exist' => 'That user is invalid. Please try again.' + ) + +); diff --git a/app/lang/th/admin/hardware/table.php b/app/lang/th/admin/hardware/table.php new file mode 100755 index 0000000000..2a5a60e1f0 --- /dev/null +++ b/app/lang/th/admin/hardware/table.php @@ -0,0 +1,22 @@ + 'Asset Tag', + 'asset_model' => 'Model', + 'book_value' => 'Value', + 'change' => 'In/Out', + 'checkout_date' => 'Checkout Date', + 'checkoutto' => 'Checked Out', + 'diff' => 'Diff', + 'dl_csv' => 'Download CSV', + 'eol' => 'EOL', + 'id' => 'ID', + 'location' => 'Location', + 'purchase_cost' => 'Cost', + 'purchase_date' => 'Purchased', + 'serial' => 'Serial', + 'status' => 'Status', + 'title' => 'Asset ', + +); diff --git a/app/lang/th/admin/licenses/form.php b/app/lang/th/admin/licenses/form.php new file mode 100755 index 0000000000..164ab9def1 --- /dev/null +++ b/app/lang/th/admin/licenses/form.php @@ -0,0 +1,27 @@ + 'Asset', + 'checkin' => 'Checkin', + 'cost' => 'Purchase Cost', + 'create' => 'Create License', + 'date' => 'Purchase Date', + 'depreciation' => 'Depreciation', + 'expiration' => 'Expiration Date', + 'maintained' => 'Maintained', + 'name' => 'Software Name', + 'no_depreciation' => 'Do Not Depreciate', + 'notes' => 'Notes', + 'order' => 'Order No.', + 'purchase_order' => 'Purchase Order Number', + 'remaining_seats' => 'Remaining Seats', + 'seats' => 'Seats', + 'serial' => 'Serial', + 'supplier' => 'Supplier', + 'termination_date' => 'Termination Date', + 'to_email' => 'Licensed to Email', + 'to_name' => 'Licensed to Name', + 'update' => 'Update License', + 'checkout_help' => 'You must check a license out to a hardware asset or a person. You can select both, but the owner of the asset must match the person you\'re checking the asset out to.' +); diff --git a/app/lang/th/admin/licenses/general.php b/app/lang/th/admin/licenses/general.php new file mode 100755 index 0000000000..0e776b99d6 --- /dev/null +++ b/app/lang/th/admin/licenses/general.php @@ -0,0 +1,19 @@ + 'Checkin License Seat', + 'checkout_history' => 'Checkout History', + 'checkout' => 'Checkout License Seat', + 'edit' => 'Edit License', + 'clone' => 'Clone License', + 'history_for' => 'History for ', + 'in_out' => 'In/Out', + 'info' => 'License Info', + 'license_seats' => 'License Seats', + 'seat' => 'Seat', + 'seats' => 'Seats', + 'software_licenses' => 'Software Licenses', + 'user' => 'User', + 'view' => 'View License', +); diff --git a/app/lang/th/admin/licenses/message.php b/app/lang/th/admin/licenses/message.php new file mode 100755 index 0000000000..84ada1ccb9 --- /dev/null +++ b/app/lang/th/admin/licenses/message.php @@ -0,0 +1,50 @@ + 'License does not exist.', + 'user_does_not_exist' => 'User does not exist.', + 'asset_does_not_exist' => 'The asset you are trying to associate with this license does not exist.', + 'owner_doesnt_match_asset' => 'The asset you are trying to associate with this license is owned by somene other than the person selected in the assigned to dropdown.', + 'assoc_users' => 'This license is currently checked out to a user and cannot be deleted. Please check the license in first, and then try deleting again. ', + + + 'create' => array( + 'error' => 'License was not created, please try again.', + 'success' => 'License created successfully.' + ), + + 'deletefile' => array( + 'error' => 'File not deleted. Please try again.', + 'success' => 'File successfully deleted.', + ), + + 'upload' => array( + 'error' => 'File(s) not uploaded. Please try again.', + 'success' => 'File(s) successfully uploaded.', + 'nofiles' => 'You did not select any files for upload', + 'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.', + ), + + 'update' => array( + 'error' => 'License was not updated, please try again', + 'success' => 'License updated successfully.' + ), + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this license?', + 'error' => 'There was an issue deleting the license. Please try again.', + 'success' => 'The license was deleted successfully.' + ), + + 'checkout' => array( + 'error' => 'There was an issue checking out the license. Please try again.', + 'success' => 'The license was checked out successfully' + ), + + 'checkin' => array( + 'error' => 'There was an issue checking in the license. Please try again.', + 'success' => 'The license was checked in successfully' + ), + +); diff --git a/app/lang/th/admin/licenses/table.php b/app/lang/th/admin/licenses/table.php new file mode 100755 index 0000000000..dfce4136cb --- /dev/null +++ b/app/lang/th/admin/licenses/table.php @@ -0,0 +1,17 @@ + 'Assigned To', + 'checkout' => 'In/Out', + 'id' => 'ID', + 'license_email' => 'License Email', + 'license_name' => 'Licensed To', + 'purchase_date' => 'Purchase Date', + 'purchased' => 'Purchased', + 'seats' => 'Seats', + 'hardware' => 'Hardware', + 'serial' => 'Serial', + 'title' => 'License', + +); diff --git a/app/lang/th/admin/locations/message.php b/app/lang/th/admin/locations/message.php new file mode 100755 index 0000000000..b2277f9a9d --- /dev/null +++ b/app/lang/th/admin/locations/message.php @@ -0,0 +1,25 @@ + 'Location does not exist.', + 'assoc_users' => 'This location is currently associated with at least one user and cannot be deleted. Please update your users to no longer reference this location and try again. ', + + + 'create' => array( + 'error' => 'Location was not created, please try again.', + 'success' => 'Location created successfully.' + ), + + 'update' => array( + 'error' => 'Location was not updated, please try again', + 'success' => 'Location updated successfully.' + ), + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this location?', + 'error' => 'There was an issue deleting the location. Please try again.', + 'success' => 'The location was deleted successfully.' + ) + +); diff --git a/app/lang/th/admin/locations/table.php b/app/lang/th/admin/locations/table.php new file mode 100755 index 0000000000..4c2c86d330 --- /dev/null +++ b/app/lang/th/admin/locations/table.php @@ -0,0 +1,15 @@ + 'ID', + 'city' => 'City', + 'state' => 'State', + 'country' => 'Country', + 'create' => 'Create Location', + 'update' => 'Update Location', + 'name' => 'Location Name', + 'address' => 'Address', + 'zip' => 'Postal Code', + 'locations' => 'Locations', +); diff --git a/app/lang/th/admin/manufacturers/message.php b/app/lang/th/admin/manufacturers/message.php new file mode 100755 index 0000000000..6586d2af44 --- /dev/null +++ b/app/lang/th/admin/manufacturers/message.php @@ -0,0 +1,24 @@ + 'Manufacturer does not exist.', + 'assoc_users' => 'This manufacturer is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this manufacturer and try again. ', + + 'create' => array( + 'error' => 'Manufacturer was not created, please try again.', + 'success' => 'Manufacturer created successfully.' + ), + + 'update' => array( + 'error' => 'Manufacturer was not updated, please try again', + 'success' => 'Manufacturer updated successfully.' + ), + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this manufacturer?', + 'error' => 'There was an issue deleting the manufacturer. Please try again.', + 'success' => 'The Manufacturer was deleted successfully.' + ) + +); diff --git a/app/lang/th/admin/manufacturers/table.php b/app/lang/th/admin/manufacturers/table.php new file mode 100755 index 0000000000..1861ee7c56 --- /dev/null +++ b/app/lang/th/admin/manufacturers/table.php @@ -0,0 +1,11 @@ + 'Asset Manufacturers', + 'create' => 'Create Manufacturer', + 'id' => 'ID', + 'name' => 'Manufacturer Name', + 'update' => 'Update Manufacturer', + +); diff --git a/app/lang/th/admin/models/general.php b/app/lang/th/admin/models/general.php new file mode 100755 index 0000000000..564f6b4fd3 --- /dev/null +++ b/app/lang/th/admin/models/general.php @@ -0,0 +1,11 @@ + 'This model has been deleted. Click here to restore it.', + 'restore' => 'Restore Model', + 'show_mac_address' => 'Show MAC address field in assets in this model', + 'view_deleted' => 'View Deleted', + 'view_models' => 'View Models', + +); diff --git a/app/lang/th/admin/models/message.php b/app/lang/th/admin/models/message.php new file mode 100755 index 0000000000..e69a316dd0 --- /dev/null +++ b/app/lang/th/admin/models/message.php @@ -0,0 +1,30 @@ + 'Model does not exist.', + 'assoc_users' => 'This model is currently associated with one or more assets and cannot be deleted. Please delete the assets, and then try deleting again. ', + + + 'create' => array( + 'error' => 'Model was not created, please try again.', + 'success' => 'Model created successfully.' + ), + + 'update' => array( + 'error' => 'Model was not updated, please try again', + 'success' => 'Model updated successfully.' + ), + + '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.' + ), + + 'restore' => array( + 'error' => 'Model was not restored, please try again', + 'success' => 'Model restored successfully.' + ), + +); diff --git a/app/lang/th/admin/models/table.php b/app/lang/th/admin/models/table.php new file mode 100755 index 0000000000..11a512b3d3 --- /dev/null +++ b/app/lang/th/admin/models/table.php @@ -0,0 +1,17 @@ + 'Create Asset Model', + 'created_at' => 'Created at', + 'eol' => 'EOL', + 'modelnumber' => 'Model No.', + 'name' => 'Asset Model Name', + 'numassets' => 'Assets', + 'title' => 'Asset Models', + 'update' => 'Update Asset Model', + 'view' => 'View Asset Model', + 'update' => 'Update Asset Model', + 'clone' => 'Clone Model', + 'edit' => 'Edit Model', +); diff --git a/app/lang/th/admin/reports/general.php b/app/lang/th/admin/reports/general.php new file mode 100755 index 0000000000..b03b97546f --- /dev/null +++ b/app/lang/th/admin/reports/general.php @@ -0,0 +1,5 @@ + 'Select the options you want for your asset report.' +); diff --git a/app/lang/th/admin/reports/message.php b/app/lang/th/admin/reports/message.php new file mode 100755 index 0000000000..d4c8f8198f --- /dev/null +++ b/app/lang/th/admin/reports/message.php @@ -0,0 +1,5 @@ + 'You must select at least ONE option.' +); diff --git a/app/lang/th/admin/settings/general.php b/app/lang/th/admin/settings/general.php new file mode 100755 index 0000000000..0f686e859d --- /dev/null +++ b/app/lang/th/admin/settings/general.php @@ -0,0 +1,35 @@ + 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', + 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', + 'auto_increment_prefix' => 'Prefix (optional)', + 'auto_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', + 'barcode_type' => 'Barcode Type', + 'default_eula_text' => 'Default EULA', + 'default_eula_help_text' => 'You can also associate custom EULAs to specific asset categories.', + 'display_asset_name' => 'Display Asset Name', + 'display_checkout_date' => 'Display Checkout Date', + 'display_eol' => 'Display EOL in table view', + 'display_qr' => 'Display QR Codes', + 'eula_markdown' => 'This EULA allows Github flavored markdown.', + 'header_color' => 'Header Color', + 'info' => 'These settings let you customize certain aspects of your installation.', + 'laravel' => 'Laravel Version', + 'load_remote' => 'This Snipe-IT install can load scripts from the outside world.', + 'logo' => 'Logo', + 'per_page' => 'Results Per Page', + 'php' => 'PHP Version', + 'php_gd_info' => 'You must install php-gd to display QR codes, see install instructions.', + 'php_gd_warning' => 'PHP Image Processing and GD plugin is NOT installed.', + 'qr_help' => 'Enable QR Codes first to set this', + 'qr_text' => 'QR Code Text', + 'setting' => 'Setting', + 'settings' => 'Settings', + 'site_name' => 'Site Name', + 'snipe_version' => 'Snipe-IT version', + 'system' => 'System Information', + 'update' => 'Update Settings', + 'value' => 'Value', +); diff --git a/app/lang/th/admin/settings/message.php b/app/lang/th/admin/settings/message.php new file mode 100755 index 0000000000..693813ca0d --- /dev/null +++ b/app/lang/th/admin/settings/message.php @@ -0,0 +1,11 @@ + array( + 'error' => 'An error has occurred while updating. ', + 'success' => 'Settings updated successfully.' + ), + +); diff --git a/app/lang/th/admin/statuslabels/message.php b/app/lang/th/admin/statuslabels/message.php new file mode 100755 index 0000000000..98280082ef --- /dev/null +++ b/app/lang/th/admin/statuslabels/message.php @@ -0,0 +1,25 @@ + 'Location does not exist.', + 'assoc_users' => 'This location is currently associated with at least one user and cannot be deleted. Please update your users to no longer reference this location and try again. ', + + + 'create' => array( + 'error' => 'Location was not created, please try again.', + 'success' => 'Location created successfully.' + ), + + 'update' => array( + 'error' => 'Location was not updated, please try again', + 'success' => 'Location updated successfully.' + ), + + '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.' + ) + +); diff --git a/app/lang/th/admin/statuslabels/table.php b/app/lang/th/admin/statuslabels/table.php new file mode 100755 index 0000000000..dd21781115 --- /dev/null +++ b/app/lang/th/admin/statuslabels/table.php @@ -0,0 +1,15 @@ + 'About Status Labels', + 'archived' => 'Archived', + 'create' => 'Create Status Label', + 'deployable' => 'Deployable', + 'info' => 'Status labels are used to describe the various states your assets could be in. They may be out for repair, lost/stolen, etc. You can create new status labels for deployable, pending and archived assets.', + 'name' => 'Status Name', + 'pending' => 'Pending', + 'status_type' => 'Status Type', + 'title' => 'Status Labels', + 'undeployable' => 'Undeployable', + 'update' => 'Update Status Label', +); diff --git a/app/lang/th/admin/suppliers/message.php b/app/lang/th/admin/suppliers/message.php new file mode 100755 index 0000000000..df4bc41af3 --- /dev/null +++ b/app/lang/th/admin/suppliers/message.php @@ -0,0 +1,24 @@ + 'Supplier does not exist.', + 'assoc_users' => 'This supplier is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this supplier and try again. ', + + 'create' => array( + 'error' => 'Supplier was not created, please try again.', + 'success' => 'Supplier created successfully.' + ), + + 'update' => array( + 'error' => 'Supplier was not updated, please try again', + 'success' => 'Supplier updated successfully.' + ), + + 'delete' => array( + 'confirm' => 'Are you sure you wish to delete this supplier?', + 'error' => 'There was an issue deleting the supplier. Please try again.', + 'success' => 'Supplier was deleted successfully.' + ) + +); diff --git a/app/lang/th/admin/suppliers/table.php b/app/lang/th/admin/suppliers/table.php new file mode 100755 index 0000000000..88adfc692b --- /dev/null +++ b/app/lang/th/admin/suppliers/table.php @@ -0,0 +1,25 @@ + 'Supplier Address', + 'assets' => 'Assets', + 'city' => 'City', + 'contact' => 'Contact Name', + 'country' => 'Country', + 'create' => 'Create Supplier', + 'email' => 'Email', + 'fax' => 'Fax', + 'id' => 'ID', + 'licenses' => 'Licenses', + 'name' => 'Supplier Name', + 'notes' => 'Notes', + 'phone' => 'Phone', + 'state' => 'State', + 'suppliers' => 'Suppliers', + 'update' => 'Update Supplier', + 'url' => 'URL', + 'view' => 'View Supplier', + 'view_assets_for' => 'View Assets for', + 'zip' => 'Postal Code', + +); diff --git a/app/lang/th/admin/users/general.php b/app/lang/th/admin/users/general.php new file mode 100755 index 0000000000..550a32854d --- /dev/null +++ b/app/lang/th/admin/users/general.php @@ -0,0 +1,15 @@ + 'Assets assigned to :name', + 'clone' => 'Clone User', + 'contact_user' => 'Contact :name', + 'edit' => 'Edit User', + 'history_user' => 'History for :name', + 'last_login' => 'Last Login', + 'software_user' => 'Software Checked out to :name', + 'view_user' => 'View User :name', + 'usercsv' => 'CSV file', + ); diff --git a/app/lang/th/admin/users/message.php b/app/lang/th/admin/users/message.php new file mode 100755 index 0000000000..c668179bb0 --- /dev/null +++ b/app/lang/th/admin/users/message.php @@ -0,0 +1,34 @@ + 'User already exists!', + 'user_not_found' => 'User [:id] does not exist.', + 'user_login_required' => 'The login field is required', + 'user_password_required' => 'The password is required.', + 'insufficient_permissions' => 'Insufficient Permissions.', + 'user_deleted_warning' => 'This user has been deleted. You will have to restore this user to edit them or assign them new assets.', + + + 'success' => array( + 'create' => 'User was successfully created.', + 'update' => 'User was successfully updated.', + 'delete' => 'User was successfully deleted.', + 'ban' => 'User was successfully banned.', + 'unban' => 'User was successfully unbanned.', + 'suspend' => 'User was successfully suspended.', + 'unsuspend' => 'User was successfully unsuspended.', + 'restored' => 'User was successfully restored.', + 'import' => 'Users imported successfully.', + ), + + 'error' => array( + 'create' => 'There was an issue creating the user. Please try again.', + 'update' => 'There was an issue updating the user. Please try again.', + 'delete' => 'There was an issue deleting the user. Please try again.', + 'unsuspend' => 'There was an issue unsuspending the user. Please try again.', + 'import' => 'There was an issue importing users. Please try again.', + 'asset_already_accepted' => 'This asset has already been accepted.', + ), + +); diff --git a/app/lang/th/admin/users/table.php b/app/lang/th/admin/users/table.php new file mode 100755 index 0000000000..02768b6874 --- /dev/null +++ b/app/lang/th/admin/users/table.php @@ -0,0 +1,33 @@ + 'Active', + 'allow' => 'Allow', + 'checkedout' => 'Assets', + 'created_at' => 'Created', + 'createuser' => 'Create User', + 'deny' => 'Deny', + 'email' => 'Email', + 'employee_num' => 'Employee No.', + 'first_name' => 'First Name', + 'groupnotes' => 'Select a group to assign to the user, remember that a user takes on the permissions of the group they are assigned.', + 'id' => 'Id', + 'inherit' => 'Inherit', + 'job' => 'Job Title', + 'last_login' => 'Last Login', + 'last_name' => 'Last Name', + 'location' => 'Location', + 'lock_passwords' => 'Login details cannot be changed on this installation.', + 'manager' => 'Manager', + 'name' => 'Name', + 'password_confirm' => 'Confirm Password', + 'password' => 'Password', + 'phone' => 'Phone', + 'title' => 'Title', + 'updateuser' => 'Update User', + 'username' => 'Username', + 'username_note' => '(This is used for Active Directory binding only, not for login.)', + 'cloneuser' => 'Clone User', + 'viewusers' => 'View Users', +); diff --git a/app/lang/th/auth/message.php b/app/lang/th/auth/message.php new file mode 100755 index 0000000000..8148b126e9 --- /dev/null +++ b/app/lang/th/auth/message.php @@ -0,0 +1,36 @@ + 'An account with the this email already exists.', + 'account_not_found' => 'The email account or password is incorrect.', + 'account_not_activated' => 'This user account is not activated.', + 'account_suspended' => 'This user account is suspended.', + 'account_banned' => 'This user account is banned.', + + 'signin' => array( + 'error' => 'There was a problem while trying to log you in, please try again.', + 'success' => 'You have successfully logged in.', + ), + + 'signup' => array( + 'error' => 'There was a problem while trying to create your account, please try again.', + 'success' => 'Account sucessfully created.', + ), + + 'forgot-password' => array( + 'error' => 'There was a problem while trying to get a reset password code, please try again.', + 'success' => 'Password recovery email successfully sent.', + ), + + 'forgot-password-confirm' => array( + 'error' => 'There was a problem while trying to reset your password, please try again.', + 'success' => 'Your password has been successfully reset.', + ), + + 'activate' => array( + 'error' => 'There was a problem while trying to activate your account, please try again.', + 'success' => 'Your account has been successfully activated.', + ), + +); diff --git a/app/lang/th/button.php b/app/lang/th/button.php new file mode 100755 index 0000000000..79591b3c90 --- /dev/null +++ b/app/lang/th/button.php @@ -0,0 +1,14 @@ + 'Actions', + 'add' => 'Add New', + 'cancel' => 'Cancel', + 'delete' => 'Delete', + 'edit' => 'Edit', + 'restore' => 'Restore', + 'submit' => 'Submit', + 'upload' => 'Upload', + +); diff --git a/app/lang/th/general.php b/app/lang/th/general.php new file mode 100755 index 0000000000..2dd93149e1 --- /dev/null +++ b/app/lang/th/general.php @@ -0,0 +1,103 @@ + 'Accessories', + 'accessory' => 'Accessory', + 'address' => 'Address', + 'admin' => 'Admin', + 'all_assets' => 'All Assets', + 'all' => 'All', + 'archived' => 'Archived', + 'asset_models' => 'Asset Models', + 'asset' => 'Asset', + 'asset_report' => 'Asset Report', + 'asset_tag' => 'Asset Tag', + 'assets_available' => 'assets available', + 'assets' => 'Assets', + 'avatar_delete' => 'Delete Avatar', + 'avatar_upload' => 'Upload Avatar', + 'back' => 'Back', + 'cancel' => 'Cancel', + 'categories' => 'Asset Categories', + 'category' => 'Asset Category', + 'changeemail' => 'Change Email Address', + 'changepassword' => 'Change Password', + 'checkin' => 'Checkin', + 'checkout' => 'Checkout', + 'city' => 'City', + 'country' => 'Country', + 'create' => 'Create New', + 'created_asset' => 'created asset', + 'created_at' => 'Created at', + 'currency' => '$', + 'current' => 'Current', + 'custom_report' => 'Custom Asset Report', + 'dashboard' => 'Dashboard', + 'date' => 'Date', + 'delete' => 'Delete', + 'deleted' => 'Deleted', + 'deployed' => 'Deployed', + 'depreciation_report' => 'Depreciation Report', + 'download' => 'Download', + 'depreciation' => 'Depreciation', + 'editprofile' => 'Edit Your Profile', + 'eol' => 'EOL', + 'first_name' => 'First Name', + 'file_name' => 'File', + 'file_uploads' => 'File Uploads', + 'generate' => 'Generate', + 'groups' => 'Groups', + 'gravatar_email' => 'Gravatar Email Address', + 'history_for' => 'History for', + 'id' => 'ID', + 'image_delete' => 'Delete Image', + 'image_upload' => 'Upload Image', + 'last_name' => 'Last Name', + 'license' => 'License', + 'license_report' => 'License Report', + 'licenses_available' => 'licenses available', + 'licenses' => 'Licenses', + 'list_all' => 'List All', + 'location' => 'Location', + 'locations' => 'Locations', + 'logout' => 'Logout', + 'manufacturer' => 'Manufacturer', + 'manufacturers' => 'Manufacturers', + 'model_no' => 'Model No.', + 'months' => 'months', + 'moreinfo' => 'More Info', + 'name' => 'Name', + 'no_depreciation' => 'No Depreciation', + 'no_results' => 'No Results.', + 'no' => 'No', + 'notes' => 'Notes', + 'pending' => 'Pending', + 'people' => 'People', + 'per_page' => 'Results Per Page', + 'profile' => 'Your profile', + 'ready_to_deploy' => 'Ready to Deploy', + 'reports' => 'Reports', + 'save' => 'Save', + 'settings' => 'Settings', + 'sign_in' => 'Sign in', + 'site_name' => 'Site Name', + 'state' => 'State', + 'status_labels' => 'Status Labels', + 'status' => 'Status', + 'suppliers' => 'Suppliers', + 'total_assets' => 'total assets', + 'total_licenses' => 'total licenses', + 'type' => 'Type', + 'undeployable' => 'Un-deployable', + 'unknown_admin' => 'Unknown Admin', + 'user' => 'User', + 'viewassets' => 'View Assigned Assets', + 'website' => 'Website', + 'welcome' => 'Welcome, :name', + 'years' => 'years', + 'yes' => 'Yes', + 'zip' => 'Zip', + +); diff --git a/app/lang/th/pagination.php b/app/lang/th/pagination.php new file mode 100755 index 0000000000..b573b51e91 --- /dev/null +++ b/app/lang/th/pagination.php @@ -0,0 +1,20 @@ + '« Previous', + + 'next' => 'Next »', + +); diff --git a/app/lang/th/reminders.php b/app/lang/th/reminders.php new file mode 100755 index 0000000000..e7a476e3a2 --- /dev/null +++ b/app/lang/th/reminders.php @@ -0,0 +1,24 @@ + "Passwords must be six characters and match the confirmation.", + + "user" => "Username or email address is incorrect", + + "token" => "This password reset token is invalid.", + + "sent" => "If a matching email address was found, a password reminder has been sent!", + +); diff --git a/app/lang/th/table.php b/app/lang/th/table.php new file mode 100755 index 0000000000..f7a49d86c1 --- /dev/null +++ b/app/lang/th/table.php @@ -0,0 +1,10 @@ + 'Actions', + 'action' => 'Action', + 'by' => 'By', + 'item' => 'Item', + +); diff --git a/app/lang/th/validation.php b/app/lang/th/validation.php new file mode 100755 index 0000000000..4c6e269ded --- /dev/null +++ b/app/lang/th/validation.php @@ -0,0 +1,95 @@ + "The :attribute must be accepted.", + "active_url" => "The :attribute is not a valid URL.", + "after" => "The :attribute must be a date after :date.", + "alpha" => "The :attribute may only contain letters.", + "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", + "alpha_num" => "The :attribute may only contain letters and numbers.", + "before" => "The :attribute must be a date before :date.", + "between" => array( + "numeric" => "The :attribute must be between :min - :max.", + "file" => "The :attribute must be between :min - :max kilobytes.", + "string" => "The :attribute must be between :min - :max characters.", + ), + "confirmed" => "The :attribute confirmation does not match.", + "date" => "The :attribute is not a valid date.", + "date_format" => "The :attribute does not match the format :format.", + "different" => "The :attribute and :other must be different.", + "digits" => "The :attribute must be :digits digits.", + "digits_between" => "The :attribute must be between :min and :max digits.", + "email" => "The :attribute format is invalid.", + "exists" => "The selected :attribute is invalid.", + "image" => "The :attribute must be an image.", + "in" => "The selected :attribute is invalid.", + "integer" => "The :attribute must be an integer.", + "ip" => "The :attribute must be a valid IP address.", + "max" => array( + "numeric" => "The :attribute may not be greater than :max.", + "file" => "The :attribute may not be greater than :max kilobytes.", + "string" => "The :attribute may not be greater than :max characters.", + ), + "mimes" => "The :attribute must be a file of type: :values.", + "min" => array( + "numeric" => "The :attribute must be at least :min.", + "file" => "The :attribute must be at least :min kilobytes.", + "string" => "The :attribute must be at least :min characters.", + ), + "not_in" => "The selected :attribute is invalid.", + "numeric" => "The :attribute must be a number.", + "regex" => "The :attribute format is invalid.", + "required" => "The :attribute field is required.", + "required_if" => "The :attribute field is required when :other is :value.", + "required_with" => "The :attribute field is required when :values is present.", + "required_without" => "The :attribute field is required when :values is not present.", + "same" => "The :attribute and :other must match.", + "size" => array( + "numeric" => "The :attribute must be :size.", + "file" => "The :attribute must be :size kilobytes.", + "string" => "The :attribute must be :size characters.", + ), + "unique" => "The :attribute has already been taken.", + "url" => "The :attribute format is invalid.", + + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => array(), + 'alpha_space' => "The :attribute field may only contain letters, commas, spaces and dashes.", + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => array(), + +); From c6be6f480efd2ab0ecf34fc2360b4f55da46151a Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 20 Mar 2015 14:56:03 -0700 Subject: [PATCH 098/140] Disable editing title when locked --- app/views/backend/settings/edit.blade.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/backend/settings/edit.blade.php b/app/views/backend/settings/edit.blade.php index b1dd598c0c..9a9f68e9f5 100755 --- a/app/views/backend/settings/edit.blade.php +++ b/app/views/backend/settings/edit.blade.php @@ -56,8 +56,14 @@ padding: 0px 20px; {{ Form::label('site_name', Lang::get('admin/settings/general.site_name')) }}
- {{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control')) }} - {{ $errors->first('site_name', '
:message') }} + @if (Config::get('app.lock_passwords')===true) + {{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled')) }} + @else + {{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control')) }} + + @endif + + {{ $errors->first('site_name', '
:message') }}
From 7f07f35beb85759f09545ca804ab00ecd3dbac68 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 20 Mar 2015 14:56:12 -0700 Subject: [PATCH 099/140] Updated language strings --- app/config/version.php | 4 +- app/lang/ar/admin/accessories/table.php | 8 ++-- app/lang/ar/admin/users/general.php | 18 ++++---- app/lang/ar/admin/users/message.php | 42 ++++++++--------- app/lang/ar/admin/users/table.php | 55 ++++++++++++----------- app/lang/ar/general.php | 1 + app/lang/cs/admin/users/table.php | 5 ++- app/lang/cs/general.php | 1 + app/lang/da/admin/users/table.php | 5 ++- app/lang/da/general.php | 1 + app/lang/de/admin/hardware/form.php | 4 +- app/lang/de/admin/settings/general.php | 4 +- app/lang/de/admin/users/message.php | 2 +- app/lang/de/admin/users/table.php | 5 ++- app/lang/de/general.php | 1 + app/lang/en-GB/admin/users/table.php | 5 ++- app/lang/en-GB/general.php | 1 + app/lang/es-ES/admin/users/table.php | 5 ++- app/lang/es-ES/general.php | 1 + app/lang/fi/admin/users/table.php | 5 ++- app/lang/fi/general.php | 1 + app/lang/fr/admin/accessories/general.php | 24 +++++----- app/lang/fr/admin/users/table.php | 5 ++- app/lang/fr/general.php | 1 + app/lang/hu/admin/users/table.php | 5 ++- app/lang/hu/general.php | 1 + app/lang/it/admin/users/table.php | 5 ++- app/lang/it/general.php | 1 + app/lang/ja/admin/users/table.php | 5 ++- app/lang/ja/general.php | 1 + app/lang/ms/admin/users/table.php | 5 ++- app/lang/ms/general.php | 1 + app/lang/nl/admin/users/table.php | 5 ++- app/lang/nl/general.php | 1 + app/lang/no/admin/users/table.php | 5 ++- app/lang/no/general.php | 1 + app/lang/pl/admin/users/table.php | 5 ++- app/lang/pl/general.php | 1 + app/lang/pt-BR/admin/users/table.php | 5 ++- app/lang/pt-BR/general.php | 1 + app/lang/pt-PT/admin/users/table.php | 5 ++- app/lang/pt-PT/general.php | 1 + app/lang/ro/admin/users/table.php | 5 ++- app/lang/ro/general.php | 1 + app/lang/ru/admin/hardware/form.php | 4 +- app/lang/ru/admin/settings/general.php | 4 +- app/lang/ru/admin/users/message.php | 2 +- app/lang/ru/admin/users/table.php | 5 ++- app/lang/ru/general.php | 1 + app/lang/sv-SE/admin/users/table.php | 5 ++- app/lang/sv-SE/general.php | 1 + app/lang/th/admin/users/table.php | 5 ++- app/lang/th/general.php | 1 + app/lang/vi/admin/users/table.php | 5 ++- app/lang/vi/general.php | 1 + app/lang/zh-CN/admin/users/table.php | 5 ++- app/lang/zh-CN/general.php | 1 + 57 files changed, 198 insertions(+), 106 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 4914f9a578..3f94895341 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6.1-118', - 'hash_version' => 'v1.2.6.1-118-g80d2347', + 'app_version' => 'v1.2.6.1-121', + 'hash_version' => 'v1.2.6.1-121-g617cc67', ); \ No newline at end of file diff --git a/app/lang/ar/admin/accessories/table.php b/app/lang/ar/admin/accessories/table.php index c86dd8adfa..239909003d 100755 --- a/app/lang/ar/admin/accessories/table.php +++ b/app/lang/ar/admin/accessories/table.php @@ -1,9 +1,9 @@ 'EULA', - 'id' => 'ID', - 'require_acceptance' => 'Acceptance', - 'title' => 'Accessory Name', + 'eula_text' => 'اتفاقية ترخيص المستخدم', + 'id' => 'رقم المعرف', + 'require_acceptance' => 'القبول', + 'title' => 'اسم الملحق', ); diff --git a/app/lang/ar/admin/users/general.php b/app/lang/ar/admin/users/general.php index 550a32854d..e8a2a63180 100755 --- a/app/lang/ar/admin/users/general.php +++ b/app/lang/ar/admin/users/general.php @@ -3,13 +3,13 @@ return array( - 'assets_user' => 'Assets assigned to :name', - 'clone' => 'Clone User', - 'contact_user' => 'Contact :name', - 'edit' => 'Edit User', - 'history_user' => 'History for :name', - 'last_login' => 'Last Login', - 'software_user' => 'Software Checked out to :name', - 'view_user' => 'View User :name', - 'usercsv' => 'CSV file', + 'assets_user' => 'الجهاز مسجل بعهدة :name', + 'clone' => 'نسخ المستخدم', + 'contact_user' => 'اتصل بـ :name', + 'edit' => 'تعديل المستخدم', + 'history_user' => 'الأرشيف الخاص بـ :name', + 'last_login' => 'آخر دخول للمستخدم', + 'software_user' => 'البرامج المسجلة لـ :name', + 'view_user' => 'عرض المستخدم :name', + 'usercsv' => 'ملف CSV', ); diff --git a/app/lang/ar/admin/users/message.php b/app/lang/ar/admin/users/message.php index c668179bb0..60f5763fbd 100755 --- a/app/lang/ar/admin/users/message.php +++ b/app/lang/ar/admin/users/message.php @@ -2,33 +2,33 @@ return array( - 'user_exists' => 'User already exists!', - 'user_not_found' => 'User [:id] does not exist.', - 'user_login_required' => 'The login field is required', - 'user_password_required' => 'The password is required.', - 'insufficient_permissions' => 'Insufficient Permissions.', - 'user_deleted_warning' => 'This user has been deleted. You will have to restore this user to edit them or assign them new assets.', + 'user_exists' => 'المستخدم موجود مسبقاً!', + 'user_not_found' => 'المستخدم [id:] غير موجود.', + 'user_login_required' => 'حقل "الدخول" مطلوب', + 'user_password_required' => 'كلمة السر مطلوبة.', + 'insufficient_permissions' => 'صلاحيات غير كافية.', + 'user_deleted_warning' => 'تم حذف المستخدم. سيكون عليك استعادة هذا المستخدم للتعديل عليه او تسليمه اجهزة جديدة.', 'success' => array( - 'create' => 'User was successfully created.', - 'update' => 'User was successfully updated.', - 'delete' => 'User was successfully deleted.', - 'ban' => 'User was successfully banned.', - 'unban' => 'User was successfully unbanned.', - 'suspend' => 'User was successfully suspended.', - 'unsuspend' => 'User was successfully unsuspended.', - 'restored' => 'User was successfully restored.', - 'import' => 'Users imported successfully.', + 'create' => 'تم إنشاء المستخدم بنجاح.', + 'update' => 'تم تعديل المستخدم بنجاح.', + 'delete' => 'تم حذف المستخدم بنجاح.', + 'ban' => 'تم حظر المستخدم بنجاح.', + 'unban' => 'تم إلغاء الحظر عن المستخدم بنجاح.', + 'suspend' => 'تم تعليق المستخدم بنجاح.', + 'unsuspend' => 'تم إلغاء التعليق عن المستخدم بنجاح.', + 'restored' => 'تم استعادة المستخدم بنجاح.', + 'import' => 'تم استيراد المستخدمين بنجاح.', ), 'error' => array( - 'create' => 'There was an issue creating the user. Please try again.', - 'update' => 'There was an issue updating the user. Please try again.', - 'delete' => 'There was an issue deleting the user. Please try again.', - 'unsuspend' => 'There was an issue unsuspending the user. Please try again.', - 'import' => 'There was an issue importing users. Please try again.', - 'asset_already_accepted' => 'This asset has already been accepted.', + 'create' => 'حدث خطأ ما أثناء إنشاء هذا المستخدم. حاول مرة أخرى.', + 'update' => 'حدث خطأ أثناء تحديث هذا المستخدم. حاول مرة أخرى.', + 'delete' => 'حدث خطأ ما أثناء حذف هذا المستخدم. حاول مرة أخرى.', + 'unsuspend' => 'حدث خطأ ما أثناء إلغاء التعليق عن المستخدم. حاول مرة أخرى.', + 'import' => 'حدث خطأ أثناء استيراد المستخدمين. حاول مرة أخرى.', + 'asset_already_accepted' => 'هذا الجهاز تم قبوله مسبقاً.', ), ); diff --git a/app/lang/ar/admin/users/table.php b/app/lang/ar/admin/users/table.php index 02768b6874..374f93f0d7 100755 --- a/app/lang/ar/admin/users/table.php +++ b/app/lang/ar/admin/users/table.php @@ -2,32 +2,35 @@ return array( - 'activated' => 'Active', - 'allow' => 'Allow', - 'checkedout' => 'Assets', - 'created_at' => 'Created', - 'createuser' => 'Create User', - 'deny' => 'Deny', - 'email' => 'Email', - 'employee_num' => 'Employee No.', - 'first_name' => 'First Name', + 'activated' => 'نشط', + 'allow' => 'السماح', + 'checkedout' => 'الأصول', + 'created_at' => 'تم إنشاؤه', + 'createuser' => 'أنشاء مستخدم جديد', + 'deny' => 'رفض', + 'email' => 'البريد الالكتروني', + 'employee_num' => 'رقم الموظف', + 'first_name' => 'الإسم الأول', 'groupnotes' => 'Select a group to assign to the user, remember that a user takes on the permissions of the group they are assigned.', - 'id' => 'Id', + 'id' => 'رقم المعرف', 'inherit' => 'Inherit', - 'job' => 'Job Title', - 'last_login' => 'Last Login', - 'last_name' => 'Last Name', - 'location' => 'Location', - 'lock_passwords' => 'Login details cannot be changed on this installation.', - 'manager' => 'Manager', - 'name' => 'Name', - 'password_confirm' => 'Confirm Password', - 'password' => 'Password', - 'phone' => 'Phone', - 'title' => 'Title', - 'updateuser' => 'Update User', - 'username' => 'Username', - 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', - 'viewusers' => 'View Users', + 'job' => 'العنوان الوظيفي', + 'last_login' => 'اخر تسجيل دخول', + 'last_name' => 'الإسم الأخير', + 'location' => 'الموقع', + 'lock_passwords' => 'لا يمكن تغيير تفاصيل الدخول بالنسبة لهذا التنصيب.', + 'manager' => 'المدير', + 'name' => 'الاسم', + 'notes' => 'Notes', + 'password_confirm' => 'تأكيد كلمة المرور', + 'password' => 'كلمة المرور', + 'phone' => 'رقم الهاتف', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', + 'title' => 'المسمى الوظيفي', + 'updateuser' => 'تحديث المستخدم', + 'username' => 'اسم المستخدم', + 'username_note' => '(يستخدم فقط للربط مع الـ Active Directory وليس لغرض تسجيل الدخول.)', + 'cloneuser' => 'نسخ المستخدم', + 'viewusers' => 'عرض المستخدمين', ); diff --git a/app/lang/ar/general.php b/app/lang/ar/general.php index fbf27087cc..bbd3d23d16 100755 --- a/app/lang/ar/general.php +++ b/app/lang/ar/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'غير قابلة للتوزيع', 'unknown_admin' => 'إداري غير معروف', 'user' => 'المستخدم', + 'users' => 'Users', 'viewassets' => 'عرض الأصول المسجلة', 'website' => 'الموقع', 'welcome' => 'إهلاً وسهلاً، :name', diff --git a/app/lang/cs/admin/users/table.php b/app/lang/cs/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/cs/admin/users/table.php +++ b/app/lang/cs/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/cs/general.php b/app/lang/cs/general.php index e8ba42f929..5cd3572849 100755 --- a/app/lang/cs/general.php +++ b/app/lang/cs/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Ne-přiřaditelné', 'unknown_admin' => 'Neznámy správce', 'user' => 'Uživatel', + 'users' => 'Users', 'viewassets' => 'Zobrazit přiřazený majetek', 'website' => 'Webová stránka', 'welcome' => 'Vítej, :name', diff --git a/app/lang/da/admin/users/table.php b/app/lang/da/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/da/admin/users/table.php +++ b/app/lang/da/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/da/general.php b/app/lang/da/general.php index 98afe10dd0..d264e64b12 100755 --- a/app/lang/da/general.php +++ b/app/lang/da/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'Bruger', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Hjemmeside', 'welcome' => 'Velkommen, :name', diff --git a/app/lang/de/admin/hardware/form.php b/app/lang/de/admin/hardware/form.php index f36b676d17..2cf41aa4e4 100755 --- a/app/lang/de/admin/hardware/form.php +++ b/app/lang/de/admin/hardware/form.php @@ -6,8 +6,8 @@ return array( 'bulk_update_help' => 'Diese Eingabemaske erlaubt Ihnen die Aktualisierung von mehrere Assets zugleich. Füllen Sie die Felder aus welche Sie ändern möchten. Alle leeren Felder bleiben unverändert. ', 'bulk_update_warn' => 'Sie sind dabei die Eigenschaften von :asset_count assets zu bearbeiten.', 'checkedout_to' => 'Herausgegeben an', - 'checkout_date' => 'Checkout Date', - 'checkin_date' => 'Checkin Date', + 'checkout_date' => 'Ausgecheckt am', + 'checkin_date' => 'Eingecheckt am', 'checkout_to' => 'Herausgeben an', 'cost' => 'Einkaufspreis', 'create' => 'Asset erstellen', diff --git a/app/lang/de/admin/settings/general.php b/app/lang/de/admin/settings/general.php index 5feeb4bdc6..c9096291ba 100755 --- a/app/lang/de/admin/settings/general.php +++ b/app/lang/de/admin/settings/general.php @@ -6,7 +6,7 @@ return array( 'auto_increment_assets' => 'Erzeugen von fortlaufenden Asset IDs', 'auto_increment_prefix' => 'Präfix (optional)', 'auto_incrementing_help' => 'Aktiviere zuerst fortlaufende Asset IDs um dies zu setzen', - 'barcode_type' => 'Barcode Type', + 'barcode_type' => 'Barcode Typ', 'default_eula_text' => 'Standard EULA', 'default_eula_help_text' => 'Sie können ebenfalls eigene EULA\'s mit spezifischen Asset Kategorien verknüpfen.', 'display_asset_name' => 'Zeige Assetname an', @@ -28,7 +28,7 @@ return array( 'setting' => 'Einstellung', 'settings' => 'Einstellungen', 'site_name' => 'Seitenname', - 'snipe_version' => 'Snipe-IT version', + 'snipe_version' => 'Snipe-IT Version', 'system' => 'Systeminformationen', 'update' => 'Einstellungen übernehmen', 'value' => 'Wert', diff --git a/app/lang/de/admin/users/message.php b/app/lang/de/admin/users/message.php index 779fcc00c6..e3929127d6 100755 --- a/app/lang/de/admin/users/message.php +++ b/app/lang/de/admin/users/message.php @@ -28,7 +28,7 @@ return array( 'delete' => 'Beim Entfernen des Benutzers ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.', 'unsuspend' => 'Es gab ein Problem beim reaktivieren des Benutzers. Bitte versuche es erneut.', 'import' => 'Es gab ein Problem beim importieren der Benutzer. Bitte noch einmal versuchen.', - 'asset_already_accepted' => 'This asset has already been accepted.', + 'asset_already_accepted' => 'Dieses Asset wurde bereits akzeptiert.', ), ); diff --git a/app/lang/de/admin/users/table.php b/app/lang/de/admin/users/table.php index bc4a65d87a..e3c42f9845 100755 --- a/app/lang/de/admin/users/table.php +++ b/app/lang/de/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Die Login-Daten können auf dieser Installation nicht geändert werden.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Kennwort bestätigen', 'password' => 'Passwort', 'phone' => 'Telefonnummer', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Titel', 'updateuser' => 'Benutzer aktualisieren', 'username' => 'Benutzernamen', 'username_note' => '(Dies wird für den Bind an das Active Directory benutzt, nicht für die Anmeldung.)', - 'cloneuser' => 'Benutzer kopieren', + 'cloneuser' => 'Benutzer kopieren', 'viewusers' => 'Benutzer anzeigen', ); diff --git a/app/lang/de/general.php b/app/lang/de/general.php index 70bd9e11bd..0e646c9628 100755 --- a/app/lang/de/general.php +++ b/app/lang/de/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Nicht herausgebbar', 'unknown_admin' => 'Unbekannter Administrator', 'user' => 'Nutzer', + 'users' => 'Users', 'viewassets' => 'Zugeordnete Assets anzeigen', 'website' => 'Webseite', 'welcome' => 'Wilkommen, :name', diff --git a/app/lang/en-GB/admin/users/table.php b/app/lang/en-GB/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/en-GB/admin/users/table.php +++ b/app/lang/en-GB/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/en-GB/general.php b/app/lang/en-GB/general.php index 440f2a5c94..0b4fa67713 100755 --- a/app/lang/en-GB/general.php +++ b/app/lang/en-GB/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'User', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Website', 'welcome' => 'Welcome, :name', diff --git a/app/lang/es-ES/admin/users/table.php b/app/lang/es-ES/admin/users/table.php index 13a4f3a168..6cbf2f2e01 100755 --- a/app/lang/es-ES/admin/users/table.php +++ b/app/lang/es-ES/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Los detalles de acceso no pueden ser cambiados en esta instalación.', 'manager' => 'Responsable', 'name' => 'Usuario', + 'notes' => 'Notes', 'password_confirm' => 'Confirmar Password', 'password' => 'Contraseña', 'phone' => 'Teléfono', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Puesto', 'updateuser' => 'Actualizar Usuario', 'username' => 'UsuarioUsuario', 'username_note' => '(Esto se usa solo para la conexión con Active Directory, no para el inicio de sesión.)', - 'cloneuser' => 'Clonar Usuario', + 'cloneuser' => 'Clonar Usuario', 'viewusers' => 'Ver Usuarios', ); diff --git a/app/lang/es-ES/general.php b/app/lang/es-ES/general.php index b2a45e687d..2261c24539 100755 --- a/app/lang/es-ES/general.php +++ b/app/lang/es-ES/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'No Instalable', 'unknown_admin' => 'Admin Desconocido', 'user' => 'Usuario', + 'users' => 'Users', 'viewassets' => 'Ver Equipos Asignados', 'website' => 'Sitio web', 'welcome' => 'Bienvenido, :name', diff --git a/app/lang/fi/admin/users/table.php b/app/lang/fi/admin/users/table.php index 2b61e1dc19..412c97046a 100755 --- a/app/lang/fi/admin/users/table.php +++ b/app/lang/fi/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Esimies', 'name' => 'Nimi', + 'notes' => 'Notes', 'password_confirm' => 'Vahvista Salasana', 'password' => 'Salasana', 'phone' => 'Puhelin', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Titteli', 'updateuser' => 'Päivitä Käyttäjä', 'username' => 'Käyttäjätunnus', 'username_note' => '(Tätä käytetään vain Active Directory synkronointiin, ei kirjautumista varten.)', - 'cloneuser' => 'Monista Käyttäjä', + 'cloneuser' => 'Monista Käyttäjä', 'viewusers' => 'Näytä Käyttäjät', ); diff --git a/app/lang/fi/general.php b/app/lang/fi/general.php index ca0c482130..3505534bbb 100755 --- a/app/lang/fi/general.php +++ b/app/lang/fi/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Ei-käyttöönotettavissa', 'unknown_admin' => 'Tuntematon Ylläpitäjä', 'user' => 'Käyttäjä', + 'users' => 'Users', 'viewassets' => 'Näytä Käyttöönotetut Laitteet', 'website' => 'Verkkosivu', 'welcome' => 'Tervetuloa, :name', diff --git a/app/lang/fr/admin/accessories/general.php b/app/lang/fr/admin/accessories/general.php index c0182c2a03..54001e6d46 100755 --- a/app/lang/fr/admin/accessories/general.php +++ b/app/lang/fr/admin/accessories/general.php @@ -1,19 +1,19 @@ 'About Accessories', - 'about_accessories_text' => 'Accessories are anything you issue to users but that do not have a serial number (or you do not care about tracking them uniquely). For example, computer mice or keyboards.', - 'accessory_category' => 'Accessory Category', - 'accessory_name' => 'Accessory Name', - 'create' => 'Create Category', - 'eula_text' => 'Category EULA', - 'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.', - 'require_acceptance' => 'Require users to confirm acceptance of assets in this category.', - 'no_default_eula' => 'No primary default EULA found. Add one in Settings.', - 'qty' => 'QTY', + 'about_accessories_title' => 'À propos des accessoires', + 'about_accessories_text' => 'Les accessoires sont des items que vous assignerai à des utilisateurs mais qui n\'ont pas de numéro de série (ou que vous ne désirez pas en faire un suivi). Par exemple, une souris ou un clavier.', + 'accessory_category' => 'Catégorie d\'accessoire', + 'accessory_name' => 'Nom de l\'accessoire', + 'create' => 'Créér une catégorie', + 'eula_text' => 'License de catégorie', + 'eula_text_help' => 'Ce champ vous permet de configurer vos licenses d\'utilisation pour chaque type d\'items. Si vous avez seulement une license pour tout vos items, vous pouvez cochez la case ci-dessous pour utiliser celle par défaut.', + 'require_acceptance' => 'L\'utilisateur doit confirmer qu\'il accepte les items dans cette catégorie.', + 'no_default_eula' => 'Aucune licence d\'utilisation par défaut trouvée. Ajoutez-en une dans la section "Réglages".', + 'qty' => 'Quantité', 'total' => 'Total', - 'remaining' => 'Avail', - 'update' => 'Update Category', + 'remaining' => 'Dispo', + 'update' => 'Actualiser Catégorie', 'use_default_eula' => 'Use the primary default EULA instead.', 'use_default_eula_disabled' => 'Use the primary default EULA instead. No primary default EULA is set. Please add one in Settings.', diff --git a/app/lang/fr/admin/users/table.php b/app/lang/fr/admin/users/table.php index 3b38290cc1..7af0e6026e 100755 --- a/app/lang/fr/admin/users/table.php +++ b/app/lang/fr/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Responsable', 'name' => 'Nom', + 'notes' => 'Notes', 'password_confirm' => 'Confirmer le mot de passe', 'password' => 'Mot de passe', 'phone' => 'Téléphone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Titre', 'updateuser' => 'Mettre à jour l\'utilisateur', 'username' => 'Nom d\'utilisateur', 'username_note' => '( Ceci est utilisé pour la liaison ne Active Directory , pas pour la connexion. )', - 'cloneuser' => 'Cloner l\'utilisateur', + 'cloneuser' => 'Cloner l\'utilisateur', 'viewusers' => 'Voir les utilisateurs', ); diff --git a/app/lang/fr/general.php b/app/lang/fr/general.php index 84ca58bc47..95f647868e 100755 --- a/app/lang/fr/general.php +++ b/app/lang/fr/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Non déployable', 'unknown_admin' => 'Admin inconnu', 'user' => 'Utilisateur', + 'users' => 'Users', 'viewassets' => 'Voir les actifs associés', 'website' => 'Site web', 'welcome' => 'Bienvenue, :name', diff --git a/app/lang/hu/admin/users/table.php b/app/lang/hu/admin/users/table.php index 15c146fd7b..c310e0aa98 100755 --- a/app/lang/hu/admin/users/table.php +++ b/app/lang/hu/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Felettes', 'name' => 'Név', + 'notes' => 'Notes', 'password_confirm' => 'Jelszó megerősítése', 'password' => 'Jelszó', 'phone' => 'Telefon', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/hu/general.php b/app/lang/hu/general.php index 88e455b156..69c6cb801a 100755 --- a/app/lang/hu/general.php +++ b/app/lang/hu/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'Felhasználó', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Website', 'welcome' => 'Welcome, :name', diff --git a/app/lang/it/admin/users/table.php b/app/lang/it/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/it/admin/users/table.php +++ b/app/lang/it/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/it/general.php b/app/lang/it/general.php index 2dd93149e1..96ff475f39 100755 --- a/app/lang/it/general.php +++ b/app/lang/it/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'User', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Website', 'welcome' => 'Welcome, :name', diff --git a/app/lang/ja/admin/users/table.php b/app/lang/ja/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/ja/admin/users/table.php +++ b/app/lang/ja/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/ja/general.php b/app/lang/ja/general.php index 2dd93149e1..96ff475f39 100755 --- a/app/lang/ja/general.php +++ b/app/lang/ja/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'User', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Website', 'welcome' => 'Welcome, :name', diff --git a/app/lang/ms/admin/users/table.php b/app/lang/ms/admin/users/table.php index 3eeab357b0..681a244b79 100755 --- a/app/lang/ms/admin/users/table.php +++ b/app/lang/ms/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Pengurus', 'name' => 'Nama', + 'notes' => 'Notes', 'password_confirm' => 'Sahkan kata laluan', 'password' => 'Kata Laluan', 'phone' => 'Telefon', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Tajuk', 'updateuser' => 'Kemaskini Pengguna', 'username' => 'Nama pengguna', 'username_note' => '(Ini digunakan untuk \'Active Directory\' sahaja, bukan untuk log masuk.)', - 'cloneuser' => 'Pendua Pengguna', + 'cloneuser' => 'Pendua Pengguna', 'viewusers' => 'Papar Pengguna', ); diff --git a/app/lang/ms/general.php b/app/lang/ms/general.php index dc58a79b24..edd32eb32b 100755 --- a/app/lang/ms/general.php +++ b/app/lang/ms/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Tidak Boleh Agih', 'unknown_admin' => 'Pentadbir Tidak Dikenali', 'user' => 'Pengguna', + 'users' => 'Users', 'viewassets' => 'Paparkan Harta yang diserahkan', 'website' => 'Tapak web', 'welcome' => 'Selamat Datang :nama', diff --git a/app/lang/nl/admin/users/table.php b/app/lang/nl/admin/users/table.php index 82e7940dc8..5d6179da39 100755 --- a/app/lang/nl/admin/users/table.php +++ b/app/lang/nl/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Naam', + 'notes' => 'Notes', 'password_confirm' => 'Bevestig uw wachtwoord', 'password' => 'Wachtwoord', 'phone' => 'Telefoon', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Titel', 'updateuser' => 'Gebruiker bijwerken', 'username' => 'Gebruikersnaam', 'username_note' => '(Dit wordt enkel gebruikt om te koppelen met de Active Directory, niet om aan te melden.)', - 'cloneuser' => 'Gebruiker klonen', + 'cloneuser' => 'Gebruiker klonen', 'viewusers' => 'Bekijk gebruikers', ); diff --git a/app/lang/nl/general.php b/app/lang/nl/general.php index 0b3410b092..c65b434394 100755 --- a/app/lang/nl/general.php +++ b/app/lang/nl/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Niet-inzetbaar', 'unknown_admin' => 'Onbekende Beheerder', 'user' => 'Gebruiker', + 'users' => 'Users', 'viewassets' => 'Bekijk toegekende materialen', 'website' => 'Website', 'welcome' => 'Welkom :name', diff --git a/app/lang/no/admin/users/table.php b/app/lang/no/admin/users/table.php index 45cea8944a..aefd7494a9 100755 --- a/app/lang/no/admin/users/table.php +++ b/app/lang/no/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Innloggingsdetaljer kan ikke endres i denne installasjonen.', 'manager' => 'Overordnet', 'name' => 'Navn', + 'notes' => 'Notes', 'password_confirm' => 'Bekreft passord', 'password' => 'Passord', 'phone' => 'Telefon', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Tittel', 'updateuser' => 'Oppdater bruker', 'username' => 'Brukernavn', 'username_note' => '(Dette brukes til binding i Active Directory, ikke for innlogging)', - 'cloneuser' => 'Klon bruker', + 'cloneuser' => 'Klon bruker', 'viewusers' => 'Vis brukere', ); diff --git a/app/lang/no/general.php b/app/lang/no/general.php index db4241d465..205bdb6de1 100755 --- a/app/lang/no/general.php +++ b/app/lang/no/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Ikke utleverbar', 'unknown_admin' => 'Ukjent admin', 'user' => 'Bruker', + 'users' => 'Users', 'viewassets' => 'Vis tildelte eiendeler', 'website' => 'Nettsted', 'welcome' => 'Velkommen, :name', diff --git a/app/lang/pl/admin/users/table.php b/app/lang/pl/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/pl/admin/users/table.php +++ b/app/lang/pl/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/pl/general.php b/app/lang/pl/general.php index f502a816a2..07caad6b30 100755 --- a/app/lang/pl/general.php +++ b/app/lang/pl/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Nie przypisane', 'unknown_admin' => 'Nieznany Administrator', 'user' => 'Użytkownik', + 'users' => 'Users', 'viewassets' => 'Zobacz przypisane aktywa', 'website' => 'Adres witryny', 'welcome' => 'Witaj, :name', diff --git a/app/lang/pt-BR/admin/users/table.php b/app/lang/pt-BR/admin/users/table.php index e3e786983b..6c1d8116d7 100755 --- a/app/lang/pt-BR/admin/users/table.php +++ b/app/lang/pt-BR/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Detalhes de login não podem ser alterados nesta instalação.', 'manager' => 'Gerenciador', 'name' => 'Nome', + 'notes' => 'Notes', 'password_confirm' => 'Confirmar Senha', 'password' => 'Senha', 'phone' => 'Telefone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Título', 'updateuser' => 'Atualizar Usuário', 'username' => 'Usuário', 'username_note' => '(Istó é usado somente para conexão do Active Directory, não para login.)', - 'cloneuser' => 'Clonar Usuário', + 'cloneuser' => 'Clonar Usuário', 'viewusers' => 'Ver Usuários', ); diff --git a/app/lang/pt-BR/general.php b/app/lang/pt-BR/general.php index dcb0b02645..c04e08090c 100755 --- a/app/lang/pt-BR/general.php +++ b/app/lang/pt-BR/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Não implantável', 'unknown_admin' => 'Administrador Desconhecido', 'user' => 'Usuário', + 'users' => 'Users', 'viewassets' => 'Ver Bens Atribuídos', 'website' => 'Site', 'welcome' => 'Bem-vindo, :name', diff --git a/app/lang/pt-PT/admin/users/table.php b/app/lang/pt-PT/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/pt-PT/admin/users/table.php +++ b/app/lang/pt-PT/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/pt-PT/general.php b/app/lang/pt-PT/general.php index 2dd93149e1..96ff475f39 100755 --- a/app/lang/pt-PT/general.php +++ b/app/lang/pt-PT/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'User', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Website', 'welcome' => 'Welcome, :name', diff --git a/app/lang/ro/admin/users/table.php b/app/lang/ro/admin/users/table.php index 1aff4078d1..786e46a3e5 100755 --- a/app/lang/ro/admin/users/table.php +++ b/app/lang/ro/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Nume', + 'notes' => 'Notes', 'password_confirm' => 'Confirma parola', 'password' => 'Parola', 'phone' => 'Telefon', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Titlu', 'updateuser' => 'Actualizeaza utilizator', 'username' => 'Utilizator', 'username_note' => '(Folosit numai pentru legatura cu Active Directory, nu pentru logare.)', - 'cloneuser' => 'Cloneaza utilizator', + 'cloneuser' => 'Cloneaza utilizator', 'viewusers' => 'Vezi utilizatori', ); diff --git a/app/lang/ro/general.php b/app/lang/ro/general.php index fb5a002649..14a6232adc 100755 --- a/app/lang/ro/general.php +++ b/app/lang/ro/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Nelansabil', 'unknown_admin' => 'Admin necunoscut', 'user' => 'Utilizator', + 'users' => 'Users', 'viewassets' => 'Vezi active desemnate', 'website' => 'Website', 'welcome' => 'Bine ati venit, :name', diff --git a/app/lang/ru/admin/hardware/form.php b/app/lang/ru/admin/hardware/form.php index c3db09beb7..38ce826a86 100755 --- a/app/lang/ru/admin/hardware/form.php +++ b/app/lang/ru/admin/hardware/form.php @@ -6,8 +6,8 @@ return array( 'bulk_update_help' => 'Эта форма позволяет Вам обновить несколько объектов за раз. Заполняйте только те поля, которые нужно изменить. Пустые поля останутся без изменений. ', 'bulk_update_warn' => 'Редактирование свойств :asset_count assets.', 'checkedout_to' => 'Привязан к', - 'checkout_date' => 'Checkout Date', - 'checkin_date' => 'Checkin Date', + 'checkout_date' => 'Дата выдачи', + 'checkin_date' => 'Дата возврата', 'checkout_to' => 'Привязать к', 'cost' => 'Цена', 'create' => 'Создать актив', diff --git a/app/lang/ru/admin/settings/general.php b/app/lang/ru/admin/settings/general.php index c54fa1383e..4a395b933c 100755 --- a/app/lang/ru/admin/settings/general.php +++ b/app/lang/ru/admin/settings/general.php @@ -6,7 +6,7 @@ return array( 'auto_increment_assets' => 'Генерировать автоматическое возрастание идентификационных номеров активов', 'auto_increment_prefix' => 'Префикс ( не обязательно )', 'auto_incrementing_help' => 'Включить автоматические возрастание ID активов начиная с', - 'barcode_type' => 'Barcode Type', + 'barcode_type' => 'Тип штрихкода', 'default_eula_text' => 'Пользовательское соглашение по умолчанию', 'default_eula_help_text' => 'Вы так же можете привязать собственные пользовательские соглашения к определенным категориям активов.', 'display_asset_name' => 'Отображаемое имя актива', @@ -28,7 +28,7 @@ return array( 'setting' => 'Настройка', 'settings' => 'Настройки', 'site_name' => 'Название сайта', - 'snipe_version' => 'Snipe-IT version', + 'snipe_version' => 'Версия Snipe-IT', 'system' => 'Информация о системе', 'update' => 'Обновить настройки', 'value' => 'Значение', diff --git a/app/lang/ru/admin/users/message.php b/app/lang/ru/admin/users/message.php index 1d2032ea19..88e8dbd1e6 100755 --- a/app/lang/ru/admin/users/message.php +++ b/app/lang/ru/admin/users/message.php @@ -28,7 +28,7 @@ return array( 'delete' => 'При удалении пользователя возникла проблема. Пожалуйста попробуйте снова.', 'unsuspend' => 'При разморозке пользователя возникла проблема. Пожалуйста попробуйте снова.', 'import' => 'При импорте пользователей произошла ошибка. Попробуйте еще раз.', - 'asset_already_accepted' => 'This asset has already been accepted.', + 'asset_already_accepted' => 'Этот актив уже был принят.', ), ); diff --git a/app/lang/ru/admin/users/table.php b/app/lang/ru/admin/users/table.php index 611ccee226..3dee13e82d 100755 --- a/app/lang/ru/admin/users/table.php +++ b/app/lang/ru/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Подробности логина не могут быть изменены на этой конфигурации.', 'manager' => 'Руководитель', 'name' => 'Имя', + 'notes' => 'Notes', 'password_confirm' => 'Подтверждение пароля', 'password' => 'Пароль', 'phone' => 'Телефон', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Название', 'updateuser' => 'Обновить пользователя', 'username' => 'Имя Пользователя', 'username_note' => '(Это используется для связи с Active Directory, а не для входа.)', - 'cloneuser' => 'Дублировать пользователя', + 'cloneuser' => 'Дублировать пользователя', 'viewusers' => 'Просмотр пользователей', ); diff --git a/app/lang/ru/general.php b/app/lang/ru/general.php index 6fa84b1f1b..71a3319a21 100755 --- a/app/lang/ru/general.php +++ b/app/lang/ru/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Не развертываемый', 'unknown_admin' => 'Неизвестный администратор', 'user' => 'Пользователь', + 'users' => 'Users', 'viewassets' => 'Показать присвоенные активы', 'website' => 'Сайт', 'welcome' => 'Добро пожаловать, :name', diff --git a/app/lang/sv-SE/admin/users/table.php b/app/lang/sv-SE/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/sv-SE/admin/users/table.php +++ b/app/lang/sv-SE/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/sv-SE/general.php b/app/lang/sv-SE/general.php index c7d01e72c8..253bd8005c 100755 --- a/app/lang/sv-SE/general.php +++ b/app/lang/sv-SE/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'User', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Website', 'welcome' => 'Welcome, :name', diff --git a/app/lang/th/admin/users/table.php b/app/lang/th/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/th/admin/users/table.php +++ b/app/lang/th/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/th/general.php b/app/lang/th/general.php index 2dd93149e1..96ff475f39 100755 --- a/app/lang/th/general.php +++ b/app/lang/th/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'User', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Website', 'welcome' => 'Welcome, :name', diff --git a/app/lang/vi/admin/users/table.php b/app/lang/vi/admin/users/table.php index 02768b6874..8c9b40a454 100755 --- a/app/lang/vi/admin/users/table.php +++ b/app/lang/vi/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', + 'notes' => 'Notes', 'password_confirm' => 'Confirm Password', 'password' => 'Password', 'phone' => 'Phone', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => 'Title', 'updateuser' => 'Update User', 'username' => 'Username', 'username_note' => '(This is used for Active Directory binding only, not for login.)', - 'cloneuser' => 'Clone User', + 'cloneuser' => 'Clone User', 'viewusers' => 'View Users', ); diff --git a/app/lang/vi/general.php b/app/lang/vi/general.php index 2dd93149e1..96ff475f39 100755 --- a/app/lang/vi/general.php +++ b/app/lang/vi/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => 'Un-deployable', 'unknown_admin' => 'Unknown Admin', 'user' => 'User', + 'users' => 'Users', 'viewassets' => 'View Assigned Assets', 'website' => 'Website', 'welcome' => 'Welcome, :name', diff --git a/app/lang/zh-CN/admin/users/table.php b/app/lang/zh-CN/admin/users/table.php index f040b717c3..17d0c21501 100755 --- a/app/lang/zh-CN/admin/users/table.php +++ b/app/lang/zh-CN/admin/users/table.php @@ -21,13 +21,16 @@ return array( 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => '领导', 'name' => '名字', + 'notes' => 'Notes', 'password_confirm' => '确认密码', 'password' => '密码', 'phone' => '电话', + 'show_current' => 'Show Current Users', + 'show_deleted' => 'Show Deleted Users', 'title' => '职位', 'updateuser' => '更新用户', 'username' => '用户名', 'username_note' => '(这个是用来活动目录「Active Directory」的绑定,非用来登录)', - 'cloneuser' => '克隆用户', + 'cloneuser' => '克隆用户', 'viewusers' => '查看用户', ); diff --git a/app/lang/zh-CN/general.php b/app/lang/zh-CN/general.php index e5d530e889..99d7bf5560 100755 --- a/app/lang/zh-CN/general.php +++ b/app/lang/zh-CN/general.php @@ -93,6 +93,7 @@ return array( 'undeployable' => '无法被分配', 'unknown_admin' => '未知管理员', 'user' => '用户', + 'users' => 'Users', 'viewassets' => '查看资产分配', 'website' => '站点', 'welcome' => '欢迎您,:name', From 40852f9a6a908491605cd6f9bb95cdb67c9ee279 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 20 Mar 2015 15:00:05 -0700 Subject: [PATCH 100/140] Update to settings edit --- app/config/version.php | 4 ++-- app/controllers/admin/SettingsController.php | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 3f94895341..486fe97955 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6.1-121', - 'hash_version' => 'v1.2.6.1-121-g617cc67', + 'app_version' => 'v1.2.6.1-122', + 'hash_version' => 'v1.2.6.1-122-gc6be6f4', ); \ No newline at end of file diff --git a/app/controllers/admin/SettingsController.php b/app/controllers/admin/SettingsController.php index 06e43bd38b..9a1fd38f41 100755 --- a/app/controllers/admin/SettingsController.php +++ b/app/controllers/admin/SettingsController.php @@ -11,6 +11,7 @@ use Str; use Validator; use View; use Image; +use Config; class SettingsController extends AdminController { @@ -97,7 +98,11 @@ class SettingsController extends AdminController // Update the asset data $setting->id = '1'; - $setting->site_name = e(Input::get('site_name')); + + if (Config::get('app.lock_passwords')==false) { + $setting->site_name = e(Input::get('site_name')); + } + $setting->display_asset_name = e(Input::get('display_asset_name', '0')); $setting->display_checkout_date = e(Input::get('display_checkout_date', '0')); $setting->per_page = e(Input::get('per_page')); From 75d5f494a3dd0be8b4499179a33121c3df67bf7c Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 20 Mar 2015 15:08:10 -0700 Subject: [PATCH 101/140] Bypass site name validation if locked --- app/config/version.php | 4 ++-- app/controllers/admin/SettingsController.php | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 486fe97955..2364c4d94d 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6.1-122', - 'hash_version' => 'v1.2.6.1-122-gc6be6f4', + 'app_version' => 'v1.2.6.1-123', + 'hash_version' => 'v1.2.6.1-123-g7f07f35', ); \ No newline at end of file diff --git a/app/controllers/admin/SettingsController.php b/app/controllers/admin/SettingsController.php index 9a1fd38f41..72ab914bc1 100755 --- a/app/controllers/admin/SettingsController.php +++ b/app/controllers/admin/SettingsController.php @@ -64,14 +64,19 @@ class SettingsController extends AdminController // Declare the rules for the form validation + $rules = array( - "site_name" => 'required|min:3', - "per_page" => 'required|min:1|numeric', - "qr_text" => 'min:1|max:31', - "logo" => 'mimes:jpeg,bmp,png,gif', - "alert_email" => 'email', - ); + "per_page" => 'required|min:1|numeric', + "qr_text" => 'min:1|max:31', + "logo" => 'mimes:jpeg,bmp,png,gif', + "alert_email" => 'email', + ); + + if (Config::get('app.lock_passwords')==false) { + $rules['site_name'] = 'required|min:3'; + } + // Create a new validator instance from our validation rules $validator = Validator::make(Input::all(), $rules); @@ -101,7 +106,7 @@ class SettingsController extends AdminController if (Config::get('app.lock_passwords')==false) { $setting->site_name = e(Input::get('site_name')); - } + } $setting->display_asset_name = e(Input::get('display_asset_name', '0')); $setting->display_checkout_date = e(Input::get('display_checkout_date', '0')); From 2d9e49f245565e7236145981163af64cc20233c4 Mon Sep 17 00:00:00 2001 From: madd15 Date: Sat, 21 Mar 2015 17:46:05 +1030 Subject: [PATCH 102/140] Fix #682 - Updated buttons and data loading *Buttons show now only show what is visible (this means the checkbox, checkin and actions for now) *Changed from setUrl to ajax for loading the data --- app/views/backend/hardware/index.blade.php | 41 +++++++++++++++++----- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 5b0ea9300b..aa8cd635b6 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -68,9 +68,9 @@ Lang::get('admin/hardware/table.checkout_date'), Lang::get('admin/hardware/table.change'), Lang::get('table.actions')) - ->setUrl(route('api.hardware.list', Input::get('status'))) // this is the route where data will be retrieved ->setOptions( array( + 'ajax'=> route('api.hardware.list', Input::get('status')), 'deferRender'=> true, 'stateSave'=> true, 'stateDuration'=> -1, @@ -78,15 +78,40 @@ 'tableTools' => array( 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', 'aButtons'=>array( - 'copy', - 'print', + array( + 'sExtends'=>'copy', + 'sButtonText'=>'Copy', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), + array( + 'sExtends'=>'print', + 'sButtonText'=>'Print', + 'mColumns'=>'visible', + 'bShowAll'=>false, + ), array( 'sExtends'=>'collection', 'sButtonText'=>'Export', 'aButtons'=>array( - 'csv', - 'xls', - 'pdf' + array( + 'sExtends'=>'csv', + 'sButtonText'=>'csv', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), + array( + 'sExtends'=>'xls', + 'sButtonText'=>'XLS', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), + array( + 'sExtends'=>'pdf', + 'sButtonText'=>'PDF', + 'mColumns'=>'visible', + 'bFooter'=>false, + ) ) ) ) @@ -96,8 +121,8 @@ 'order'=>array(array(1,'asc')), 'bProcessing'=>true, 'oLanguage'=>array( - 'sProcessing'=>' Loading...' - ), + 'sProcessing'=>' Loading...' + ), ) ) ->render('backend/hardware/datatable') }} From c79fd5ed304915450109652d4d4cb13b322f90d2 Mon Sep 17 00:00:00 2001 From: madd15 Date: Sat, 21 Mar 2015 17:52:15 +1030 Subject: [PATCH 103/140] Fix showAll on Print --- app/views/backend/hardware/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index aa8cd635b6..47bed3eca6 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -88,7 +88,7 @@ 'sExtends'=>'print', 'sButtonText'=>'Print', 'mColumns'=>'visible', - 'bShowAll'=>false, + 'bShowAll'=>true, ), array( 'sExtends'=>'collection', From da983af2cb05901ecc22fbc9691f3dff9e23a5e8 Mon Sep 17 00:00:00 2001 From: madd15 Date: Sat, 21 Mar 2015 21:22:23 +1030 Subject: [PATCH 104/140] Fix #683 - Use sAjaxSource, change to processing --- app/views/backend/hardware/index.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 47bed3eca6..89427d1ccc 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -70,7 +70,7 @@ Lang::get('table.actions')) ->setOptions( array( - 'ajax'=> route('api.hardware.list', Input::get('status')), + 'sAjaxSource'=> route('api.hardware.list', Input::get('status')), 'deferRender'=> true, 'stateSave'=> true, 'stateDuration'=> -1, @@ -119,7 +119,7 @@ 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(0,10,11),'activate'=>'mouseover'), 'columnDefs'=> array(array('visible'=>false,'targets'=>array(7,8,9)),array('bSortable'=>false,'targets'=>array(0,10,11))), 'order'=>array(array(1,'asc')), - 'bProcessing'=>true, + 'processing'=>true, 'oLanguage'=>array( 'sProcessing'=>' Loading...' ), From 2c6597c5fb802df14a922483ef361637377bea11 Mon Sep 17 00:00:00 2001 From: madd15 Date: Mon, 23 Mar 2015 18:17:41 +1030 Subject: [PATCH 105/140] Add deleted_at to select array for datatable --- app/controllers/admin/AssetsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 454429de79..fd1038d8de 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -918,7 +918,7 @@ class AssetsController extends AdminController public function getDatatable($status = null) { - $assets = Asset::with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category')->Hardware()->select(array('id', 'name','model_id','assigned_to','asset_tag','serial','status_id','purchase_date')); + $assets = Asset::with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category')->Hardware()->select(array('id', 'name','model_id','assigned_to','asset_tag','serial','status_id','purchase_date','deleted_at')); switch ($status) { From 86623822f5d0641764913a9db51cda0ecc79dfd5 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 23 Mar 2015 10:37:55 -0700 Subject: [PATCH 106/140] Trying to fix the build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e3d66dd232..f708c0aa51 100755 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ before_script: - cp app/config/testing/database.example.php app/config/testing/database.php - cp app/config/testing/mail.example.php app/config/testing/mail.php - composer self-update - - composer install --prefer-source --no-interaction + - composer install --prefer-source - php artisan key:generate --env=testing - php artisan migrate:install --env=testing --no-interaction -vvv - php artisan migrate --package cartalyst/sentry --env=testing --no-interaction -vvv From 35bbea30521984cf9038244b52deab97a8565f5a Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 24 Mar 2015 17:08:15 -0700 Subject: [PATCH 107/140] Fixes #688 - show model if no asset name --- app/config/version.php | 4 ++-- app/controllers/admin/AssetsController.php | 2 +- app/models/Asset.php | 12 ++++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 2364c4d94d..b22b3d1f1f 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6.1-123', - 'hash_version' => 'v1.2.6.1-123-g7f07f35', + 'app_version' => 'v1.2.6.1-130', + 'hash_version' => 'v1.2.6.1-130-gad1a939', ); \ No newline at end of file diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index fd1038d8de..a77c0ffd9a 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -437,7 +437,7 @@ class AssetsController extends AdminController $data['log_id'] = $logaction->id; $data['eula'] = $asset->getEula(); $data['first_name'] = $user->first_name; - $data['item_name'] = $asset->name; + $data['item_name'] = $asset->assetNameForEula(); $data['require_acceptance'] = $asset->requireAcceptance(); diff --git a/app/models/Asset.php b/app/models/Asset.php index 8038d73def..2a49932bbb 100755 --- a/app/models/Asset.php +++ b/app/models/Asset.php @@ -119,6 +119,18 @@ class Asset extends Depreciable { return $this->belongsTo('Statuslabel','status_id'); } + + /** + * Get name for EULA + **/ + public function assetNameForEula() + { + if ($this->name=='') { + return $this->model->name; + } else { + return $this->name; + } + } public function warrantee_expires() From 3e98f05564a47eaba338a508a3f96af2c536b0ab Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 20 Mar 2015 15:39:46 +1030 Subject: [PATCH 108/140] Convert Models and Categories Index to use Datatables --- .../admin/CategoriesController.php | 32 +++++- app/controllers/admin/ModelsController.php | 46 ++++++-- app/routes.php | 10 ++ app/views/backend/categories/index.blade.php | 103 +++++++++--------- app/views/backend/models/index.blade.php | 103 ++++++++---------- 5 files changed, 169 insertions(+), 125 deletions(-) diff --git a/app/controllers/admin/CategoriesController.php b/app/controllers/admin/CategoriesController.php index d46c18365c..28e19e2687 100755 --- a/app/controllers/admin/CategoriesController.php +++ b/app/controllers/admin/CategoriesController.php @@ -22,11 +22,8 @@ class CategoriesController extends AdminController public function getIndex() { - // Grab all the categories - $categories = Category::orderBy('created_at', 'DESC')->get(); - // Show the page - return View::make('backend/categories/index', compact('categories')); + return View::make('backend/categories/index'); } @@ -215,7 +212,34 @@ class CategoriesController extends AdminController } + public function getDatatable() + { + // Grab all the categories + $categories = Category::orderBy('created_at', 'DESC')->get(); + $actions = new \Chumper\Datatable\Columns\FunctionColumn('actions', function($categories) { + return ''; + }); + + return Datatable::collection($categories) + ->showColumns('name') + ->addColumn('category_type', function($categories) { + return ucwords($categories->category_type); + }) + ->addColumn('count', function($categories) { + return ($categories->category_type=='asset') ? link_to('/admin/settings/categories/'.$categories->id.'/view', $categories->assetscount()) : $categories->accessoriescount(); + }) + ->addColumn('acceptance', function($categories) { + return ($categories->require_acceptance=='1') ? '' : ''; + }) + ->addColumn('eula', function($categories) { + return ($categories->getEula()) ? '' : ''; + }) + ->addColumn($actions) + ->searchColumns('name','category_type','count','acceptance','eula','actions') + ->orderColumns('name','category_type','count','acceptance','eula','actions') + ->make(); + } } diff --git a/app/controllers/admin/ModelsController.php b/app/controllers/admin/ModelsController.php index 1e548e3ce0..c95f923157 100755 --- a/app/controllers/admin/ModelsController.php +++ b/app/controllers/admin/ModelsController.php @@ -24,16 +24,8 @@ class ModelsController extends AdminController */ public function getIndex() { - // Grab all the models - $models = Model::orderBy('created_at', 'DESC'); - if (Input::get('Deleted')) { - $models->withTrashed()->Deleted(); - } - - $models = $models->with('category','assets','depreciation')->get(); - // Show the page - return View::make('backend/models/index', compact('models')); + return View::make('backend/models/index'); } /** @@ -315,6 +307,42 @@ class ModelsController extends AdminController return $view; } + + public function getDatatable($status = null) + { + $models = Model::orderBy('created_at', 'DESC')->with('category','assets','depreciation'); + ($status != 'Deleted') ?: $models->withTrashed()->Deleted();; + $models = $models->get(); + $actions = new \Chumper\Datatable\Columns\FunctionColumn('actions', function($models) { + if($models->deleted_at=='') { + return ''; + } else { + return ''; + } + }); + + return Datatable::collection($models) + ->addColumn('name', function ($models) { + return link_to('/hardware/models/'.$models->id.'/view', $models->name); + }) + ->showColumns('modelno') + ->addColumn('asset_count', function($models) { + return $models->assets->count(); + }) + ->addColumn('depreciation', function($models) { + return (($models->depreciation)&&($models->depreciation->id > 0)) ? $models->depreciation->name.' ('.$models->depreciation->months.')' : Lang::get('general.no_depreciation'); + }) + ->addColumn('category', function($models) { + return ($models->category) ? $models->category->name : ''; + }) + ->addColumn('eol', function($models) { + return ($models->eol) ? $models->eol.' '.Lang::get('general.months') : ''; + }) + ->addColumn($actions) + ->searchColumns('name','modelno','asset_count','depreciation','category','eol','actions') + ->orderColumns('name','modelno','asset_count','depreciation','category','eol','actions') + ->make(); + } } diff --git a/app/routes.php b/app/routes.php index 691faf1924..613c2ea507 100755 --- a/app/routes.php +++ b/app/routes.php @@ -25,6 +25,16 @@ Route::group(array('prefix' => 'api', 'namespace' => 'Controllers\Admin', 'befor Route::resource('/', 'LicensesController'); Route::get('list', array('as'=>'api.licenses.list', 'uses'=>'LicensesController@getDatatable')); }); + /*---Models API---*/ + Route::group(array('prefix'=>'models'), function() { + Route::resource('/', 'ModelsController'); + Route::get('list/{status?}', array('as'=>'api.models.list', 'uses'=>'ModelsController@getDatatable')); + }); + /*--- Categories API---*/ + Route::group(array('prefix'=>'categories'), function() { + Route::resource('/', 'CategoriesController'); + Route::get('list', array('as'=>'api.categories.list', 'uses'=>'CategoriesController@getDatatable')); + }); }); /* diff --git a/app/views/backend/categories/index.blade.php b/app/views/backend/categories/index.blade.php index f14f64dfa8..367be2d92c 100755 --- a/app/views/backend/categories/index.blade.php +++ b/app/views/backend/categories/index.blade.php @@ -17,59 +17,58 @@ @stop diff --git a/app/views/backend/models/index.blade.php b/app/views/backend/models/index.blade.php index d7f78631da..d73c603686 100755 --- a/app/views/backend/models/index.blade.php +++ b/app/views/backend/models/index.blade.php @@ -12,73 +12,56 @@
@lang('general.create') - @if(Input::get('Deleted')) + @if(Input::get('status')=='Deleted') @lang('admin/models/general.view_models') @else - @lang('admin/models/general.view_deleted') + @lang('admin/models/general.view_deleted') @endif

@lang('admin/models/table.title')

- - - - - - - - - - - - - - @foreach ($models as $model) - - - - - - - - - - - - @endforeach - -
@lang('admin/models/table.title')@lang('admin/models/table.modelnumber')@lang('admin/models/table.numassets')@lang('general.depreciation')@lang('general.category')@lang('general.eol')@lang('table.actions')
{{{ $model->name }}}{{{ $model->modelno }}}{{ ($model->assets->count()) }} - - @if (($model->depreciation) && ($model->depreciation->id > 0)) {{{ $model->depreciation->name }}} - ({{{ $model->depreciation->months }}} - @lang('general.months') - ) - @else - @lang('general.no_depreciation') - @endif - - - @if ($model->category) {{{ $model->category->name }}} - @endif - - - @if ($model->eol) {{{ $model->eol }}} - @lang('general.months') - @else - -- - @endif - - - @if($model->deleted_at=="") - - - @else - - @endif -
+ {{ Datatable::table() + ->addColumn(Lang::get('admin/models/table.title'), + Lang::get('admin/models/table.modelnumber'), + Lang::get('admin/models/table.numassets'), + Lang::get('general.depreciation'), + Lang::get('general.category'), + Lang::get('general.eol'), + Lang::get('table.actions')) + ->setOptions( + array( + 'ajax'=> route('api.models.list', Input::get('status')), + 'deferRender'=> true, + 'stateSave'=> true, + 'stateDuration'=> -1, + 'dom' =>'CT<"clear">lfrtip', + 'tableTools' => array( + 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', + 'aButtons'=>array( + 'copy', + 'print', + array( + 'sExtends'=>'collection', + 'sButtonText'=>'Export', + 'aButtons'=>array( + 'csv', + 'xls', + 'pdf' + ) + ) + ) + ), + 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(6),'activate'=>'mouseover'), + 'columnDefs'=> array(array('bSortable'=>false,'targets'=>array(6))), + 'order'=>array(array(0,'asc')), + 'bProcessing'=>true, + 'oLanguage'=>array( + 'sProcessing'=>' Loading...', + ), + ) + ) + ->render() }} @stop From 6678905d79312db552ab76d601c6a65b5beff8fc Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 20 Mar 2015 15:57:43 +1030 Subject: [PATCH 109/140] Remove width from actions --- app/views/backend/accessories/index.blade.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/backend/accessories/index.blade.php b/app/views/backend/accessories/index.blade.php index 0dc3f735c0..089074445c 100755 --- a/app/views/backend/accessories/index.blade.php +++ b/app/views/backend/accessories/index.blade.php @@ -61,7 +61,6 @@ ), 'columnDefs'=> array( array('bSortable'=>false,'targets'=>array(3)), - array('width'=>'20%','targets'=>array(3)), ), 'order'=>array(array(0,'asc')), 'bProcessing'=>true, From faa999ab2b471fed92062d738f695cdc0c0985c8 Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 20 Mar 2015 16:01:30 +1030 Subject: [PATCH 110/140] Fix incorrect values --- app/views/backend/categories/index.blade.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/backend/categories/index.blade.php b/app/views/backend/categories/index.blade.php index 367be2d92c..78f637a29d 100755 --- a/app/views/backend/categories/index.blade.php +++ b/app/views/backend/categories/index.blade.php @@ -20,8 +20,7 @@
{{ Datatable::table() - ->addColumn('', - Lang::get('admin/categories/table.title'), + ->addColumn(Lang::get('admin/categories/table.title'), Lang::get('general.type'), Lang::get('general.assets'), Lang::get('admin/categories/table.require_acceptance'), @@ -50,9 +49,9 @@ ) ) ), - 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(0,6),'activate'=>'mouseover'), - 'columnDefs'=> array(array('visible'=>false,'targets'=>array(0)),array('bSortable'=>false,'targets'=>array(6))), - 'order'=>array(array(1,'asc')), + 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(5),'activate'=>'mouseover'), + 'columnDefs'=> array(array('bSortable'=>false,'targets'=>array(5))), + 'order'=>array(array(0,'asc')), 'bProcessing'=>true, 'oLanguage'=>array( 'sProcessing'=>' Loading...', From 66d187223041093f9e75190cf6e7c54586ec885d Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 20 Mar 2015 16:05:56 +1030 Subject: [PATCH 111/140] Fix button spacing --- app/views/backend/models/index.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/backend/models/index.blade.php b/app/views/backend/models/index.blade.php index d73c603686..01e8620da6 100755 --- a/app/views/backend/models/index.blade.php +++ b/app/views/backend/models/index.blade.php @@ -13,9 +13,9 @@ From 1d1c14ae214a7c6b00d230bddd9ed2762e49cc80 Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 20 Mar 2015 17:01:31 +1030 Subject: [PATCH 112/140] Add use Datatable --- app/controllers/admin/CategoriesController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/admin/CategoriesController.php b/app/controllers/admin/CategoriesController.php index 28e19e2687..1ab1caa07d 100755 --- a/app/controllers/admin/CategoriesController.php +++ b/app/controllers/admin/CategoriesController.php @@ -11,6 +11,7 @@ use Sentry; use Str; use Validator; use View; +use Datatable; class CategoriesController extends AdminController { From 678b7700b44a984e6b927d5a57c75ee26f3d2877 Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 20 Mar 2015 17:02:33 +1030 Subject: [PATCH 113/140] Add use Datatable --- app/controllers/admin/ModelsController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/admin/ModelsController.php b/app/controllers/admin/ModelsController.php index c95f923157..faf3f29b8f 100755 --- a/app/controllers/admin/ModelsController.php +++ b/app/controllers/admin/ModelsController.php @@ -14,6 +14,7 @@ use Manufacturer; use Str; use Validator; use View; +use Datatable; class ModelsController extends AdminController { From e61f254ffc3f301f4204db26f69b3b4c42c2eaa1 Mon Sep 17 00:00:00 2001 From: madd15 Date: Sat, 21 Mar 2015 21:30:09 +1030 Subject: [PATCH 114/140] Update datatable options --- app/views/backend/accessories/index.blade.php | 46 ++++++++++++------- app/views/backend/categories/index.blade.php | 4 +- app/views/backend/licenses/index.blade.php | 4 +- app/views/backend/models/index.blade.php | 4 +- 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/app/views/backend/accessories/index.blade.php b/app/views/backend/accessories/index.blade.php index 089074445c..9235c9eb31 100755 --- a/app/views/backend/accessories/index.blade.php +++ b/app/views/backend/accessories/index.blade.php @@ -24,9 +24,9 @@ Lang::get('admin/accessories/general.total'), Lang::get('admin/accessories/general.remaining'), Lang::get('table.actions')) - ->setUrl(route('api.accessories.list')) // this is the route where data will be retrieved ->setOptions( array( + 'sAjaxSource'=>route('api.accessories.list'), 'deferRender'=> true, 'stateSave'=> true, 'stateDuration'=> -1, @@ -35,27 +35,41 @@ 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', 'aButtons'=>array( array( - 'sExtends'=>'copy', - 'mColumns'=> array(0,1,2), - ), - 'print', + 'sExtends'=>'copy', + 'sButtonText'=>'Copy', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), + array( + 'sExtends'=>'print', + 'sButtonText'=>'Print', + 'mColumns'=>'visible', + 'bShowAll'=>true, + 'bFooter'=>true, + ), array( 'sExtends'=>'collection', 'sButtonText'=>'Export', 'aButtons'=>array( array( - 'sExtends'=>'csv', - 'mColumns'=> array(0,1,2), - ), + 'sExtends'=>'csv', + 'sButtonText'=>'csv', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), array( - 'sExtends'=>'xls', - 'mColumns'=> array(0,1,2), - ), + 'sExtends'=>'xls', + 'sButtonText'=>'XLS', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), array( - 'sExtends'=>'pdf', - 'mColumns'=> array(0,1,2), - ), - ), + 'sExtends'=>'pdf', + 'sButtonText'=>'PDF', + 'mColumns'=>'visible', + 'bFooter'=>false, + ) + ) ), ) ), @@ -63,7 +77,7 @@ array('bSortable'=>false,'targets'=>array(3)), ), 'order'=>array(array(0,'asc')), - 'bProcessing'=>true, + 'processing'=>true, 'oLanguage'=>array( 'sProcessing'=>' Loading...', ), diff --git a/app/views/backend/categories/index.blade.php b/app/views/backend/categories/index.blade.php index 78f637a29d..ae966a3617 100755 --- a/app/views/backend/categories/index.blade.php +++ b/app/views/backend/categories/index.blade.php @@ -28,7 +28,7 @@ Lang::get('table.actions')) ->setOptions( array( - 'ajax'=> route('api.categories.list'), + 'sAjaxSource'=> route('api.categories.list'), 'deferRender'=> true, 'stateSave'=> true, 'stateDuration'=> -1, @@ -52,7 +52,7 @@ 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(5),'activate'=>'mouseover'), 'columnDefs'=> array(array('bSortable'=>false,'targets'=>array(5))), 'order'=>array(array(0,'asc')), - 'bProcessing'=>true, + 'processing'=>true, 'oLanguage'=>array( 'sProcessing'=>' Loading...', ), diff --git a/app/views/backend/licenses/index.blade.php b/app/views/backend/licenses/index.blade.php index f9f42b695d..7c291288ef 100755 --- a/app/views/backend/licenses/index.blade.php +++ b/app/views/backend/licenses/index.blade.php @@ -24,9 +24,9 @@ Lang::get('admin/licenses/form.remaining_seats'), Lang::get('admin/licenses/table.purchase_date'), Lang::get('table.actions')) - ->setUrl(route('api.licenses.list')) // this is the route where data will be retrieved ->setOptions( array( + 'sAjaxSource'=>route('api.licenses.list'), 'deferRender'=> true, 'stateSave'=> true, 'stateDuration'=> -1, @@ -53,7 +53,7 @@ array('width'=>'20%','targets'=>array(5)), ), 'order'=>array(array(0,'asc')), - 'bProcessing'=>true, + 'processing'=>true, 'oLanguage'=>array( 'sProcessing'=>' Loading...', ), diff --git a/app/views/backend/models/index.blade.php b/app/views/backend/models/index.blade.php index 01e8620da6..80b1cf3145 100755 --- a/app/views/backend/models/index.blade.php +++ b/app/views/backend/models/index.blade.php @@ -32,7 +32,7 @@ Lang::get('table.actions')) ->setOptions( array( - 'ajax'=> route('api.models.list', Input::get('status')), + 'sAjaxSource'=> route('api.models.list', Input::get('status')), 'deferRender'=> true, 'stateSave'=> true, 'stateDuration'=> -1, @@ -56,7 +56,7 @@ 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(6),'activate'=>'mouseover'), 'columnDefs'=> array(array('bSortable'=>false,'targets'=>array(6))), 'order'=>array(array(0,'asc')), - 'bProcessing'=>true, + 'processing'=>true, 'oLanguage'=>array( 'sProcessing'=>' Loading...', ), From 7881e70afbc6c6e215e60cf1a2cb3f91f8eca788 Mon Sep 17 00:00:00 2001 From: madd15 Date: Mon, 23 Mar 2015 08:30:50 +1030 Subject: [PATCH 115/140] Update Model Check in Hardware Edit and move to API --- app/controllers/admin/AssetsController.php | 9 --------- app/controllers/admin/ModelsController.php | 5 +++++ app/routes.php | 2 +- app/views/backend/hardware/edit.blade.php | 8 +++++--- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index dc48effedd..79a8671543 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -1029,13 +1029,4 @@ class AssetsController extends AdminController ->make(); } - - public function checkModel($id = null) { - if(Input::get('id')) { - $id = e(Input::get('id')); - } - $model = DB::table('models')->select('id','show_mac_address')->where('id','=',$id)->whereNull('deleted_at')->first(); - return $model->show_mac_address; - } - } diff --git a/app/controllers/admin/ModelsController.php b/app/controllers/admin/ModelsController.php index faf3f29b8f..1bdcd7492b 100755 --- a/app/controllers/admin/ModelsController.php +++ b/app/controllers/admin/ModelsController.php @@ -345,5 +345,10 @@ class ModelsController extends AdminController ->orderColumns('name','modelno','asset_count','depreciation','category','eol','actions') ->make(); } + + public function checkModel($modelId) { + $model = Model::find($modelId); + return $model->show_mac_address; + } } diff --git a/app/routes.php b/app/routes.php index 613c2ea507..157028a0b7 100755 --- a/app/routes.php +++ b/app/routes.php @@ -29,6 +29,7 @@ Route::group(array('prefix' => 'api', 'namespace' => 'Controllers\Admin', 'befor Route::group(array('prefix'=>'models'), function() { Route::resource('/', 'ModelsController'); Route::get('list/{status?}', array('as'=>'api.models.list', 'uses'=>'ModelsController@getDatatable')); + Route::get('{modelId}/check', array('as' => 'api.models.check', 'uses' => 'ModelsController@checkModel')); }); /*--- Categories API---*/ Route::group(array('prefix'=>'categories'), function() { @@ -84,7 +85,6 @@ Route::group(array('prefix' => 'hardware', 'namespace' => 'Controllers\Admin', ' Route::get('{assetId}/deletefile/{fileId}', array('as' => 'delete/assetfile', 'uses' => 'AssetsController@getDeleteFile')); Route::get('{assetId}/showfile/{fileId}', array('as' => 'show/assetfile', 'uses' => 'AssetsController@displayFile')); Route::post('{assetId}/edit', 'AssetsController@postEdit'); - Route::get('check/model', array('as' => 'check.model', 'uses' => 'AssetsController@checkModel')); Route::post('bulkedit', array('as' => 'hardware/bulkedit', diff --git a/app/views/backend/hardware/edit.blade.php b/app/views/backend/hardware/edit.blade.php index 7bf6a804c1..dee143bb86 100755 --- a/app/views/backend/hardware/edit.blade.php +++ b/app/views/backend/hardware/edit.blade.php @@ -220,12 +220,14 @@ var $eventSelect = $(".model"); $eventSelect.on("change", function () { mac_add($eventSelect.val()); }); $(function() { - mac_add($(".model option:selected").val()); + var mac = $(".model option:selected").val(); + if(mac!=''){ + mac_add(mac); + } }); function mac_add(id) { $.ajax({ - url: '{{ route('check.model') }}', - data: 'id=' + id, + url: "{{Config::get('app.url')}}/api/models/"+id+"/check", success: function(data) { if(data == true){ $("#mac_address").css("display", "block"); From d90d7d7ddd9e8ac9f9bd20c8d7da52944f1b4d0a Mon Sep 17 00:00:00 2001 From: madd15 Date: Mon, 23 Mar 2015 08:37:18 +1030 Subject: [PATCH 116/140] Only include first 3 columns on exports --- app/views/backend/accessories/index.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/backend/accessories/index.blade.php b/app/views/backend/accessories/index.blade.php index 9235c9eb31..f9213dfa50 100755 --- a/app/views/backend/accessories/index.blade.php +++ b/app/views/backend/accessories/index.blade.php @@ -37,13 +37,13 @@ array( 'sExtends'=>'copy', 'sButtonText'=>'Copy', - 'mColumns'=>'visible', + 'mColumns'=>array(0,1,2), 'bFooter'=>false, ), array( 'sExtends'=>'print', 'sButtonText'=>'Print', - 'mColumns'=>'visible', + 'mColumns'=>array(0,1,2), 'bShowAll'=>true, 'bFooter'=>true, ), @@ -54,19 +54,19 @@ array( 'sExtends'=>'csv', 'sButtonText'=>'csv', - 'mColumns'=>'visible', + 'mColumns'=>array(0,1,2), 'bFooter'=>false, ), array( 'sExtends'=>'xls', 'sButtonText'=>'XLS', - 'mColumns'=>'visible', + 'mColumns'=>array(0,1,2), 'bFooter'=>false, ), array( 'sExtends'=>'pdf', 'sButtonText'=>'PDF', - 'mColumns'=>'visible', + 'mColumns'=>array(0,1,2), 'bFooter'=>false, ) ) From 7f03c7538fbcdc2d98a644ab2d242a72fb984bff Mon Sep 17 00:00:00 2001 From: madd15 Date: Tue, 24 Mar 2015 10:31:58 +1030 Subject: [PATCH 117/140] Convert Accessories View to use Datatable --- .../admin/AccessoriesController.php | 17 +++++ app/routes.php | 1 + app/views/backend/accessories/view.blade.php | 75 ++++++++++++------- 3 files changed, 64 insertions(+), 29 deletions(-) diff --git a/app/controllers/admin/AccessoriesController.php b/app/controllers/admin/AccessoriesController.php index 3693e05a4a..1052ae607d 100755 --- a/app/controllers/admin/AccessoriesController.php +++ b/app/controllers/admin/AccessoriesController.php @@ -389,5 +389,22 @@ class AccessoriesController extends AdminController ->make(); } + public function getDataView($accessoryID) + { + $accessory = Accessory::find($accessoryID); + $accessory_users = $accessory->users; + + $actions = new \Chumper\Datatable\Columns\FunctionColumn('actions',function($accessory_users){ + return 'Checkin'; + }); + + return Datatable::collection($accessory_users) + ->addColumn('name',function($accessory_users) + { + return link_to('/admin/users/'.$accessory_users->id.'/view', $accessory_users->fullName()); + }) + ->addColumn($actions) + ->make(); + } } diff --git a/app/routes.php b/app/routes.php index 157028a0b7..77b45862e1 100755 --- a/app/routes.php +++ b/app/routes.php @@ -14,6 +14,7 @@ Route::group(array('prefix' => 'api', 'namespace' => 'Controllers\Admin', 'befor Route::group(array('prefix'=>'accessories'), function () { Route::resource('/', 'AccessoriesController'); Route::get('list', array('as'=>'api.accessories.list', 'uses'=>'AccessoriesController@getDatatable')); + Route::get('{accessoryID}/view', array('as'=>'api.accessories.view', 'uses'=>'AccessoriesController@getDataView')); }); /*---Users API---*/ Route::group(array('prefix'=>'users'), function() { diff --git a/app/views/backend/accessories/view.blade.php b/app/views/backend/accessories/view.blade.php index fb295a878e..07f6fd12b2 100644 --- a/app/views/backend/accessories/view.blade.php +++ b/app/views/backend/accessories/view.blade.php @@ -31,35 +31,52 @@ @if ($accessory->users->count() > 0) - - - - - - - - - - @foreach ($accessory->users as $accessory_users) - - - - - - @endforeach - - - -
@lang('general.user')@lang('table.actions')
- - - {{{ $accessory_users->fullName() }}} - - - - - Checkin -
+ {{ Datatable::table() + ->addColumn(Lang::get('general.user'), + Lang::get('table.actions')) + ->setOptions( + array( + 'sAjaxSource'=>route('api.accessories.view', $accessory->id), + 'deferRender'=> true, + 'stateSave'=> true, + 'stateDuration'=> -1, + 'dom' =>'T<"clear">lfrtip', + 'tableTools' => array( + 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', + 'aButtons'=>array( + array( + 'sExtends'=>'copy', + ), + 'print', + array( + 'sExtends'=>'collection', + 'sButtonText'=>'Export', + 'aButtons'=>array( + array( + 'sExtends'=>'csv', + ), + array( + 'sExtends'=>'xls', + ), + array( + 'sExtends'=>'pdf', + ), + ), + ), + ) + ), + 'columnDefs'=> array( + array('bSortable'=>false,'targets'=>array(1)), + array('width'=>'auto','targets'=>array(1)), + ), + 'order'=>array(array(0,'asc')), + 'processing'=>true, + 'oLanguage'=>array( + 'sProcessing'=>' Loading...', + ), + ) + ) + ->render() }} @else
From 7d266fdc4e74ab3663c9b632d0f039842d19f7ce Mon Sep 17 00:00:00 2001 From: madd15 Date: Tue, 24 Mar 2015 11:06:37 +1030 Subject: [PATCH 118/140] Convert Models View to use Datatables --- app/controllers/admin/ModelsController.php | 33 ++++++++ app/routes.php | 1 + app/views/backend/models/view.blade.php | 95 ++++++++++++---------- 3 files changed, 84 insertions(+), 45 deletions(-) diff --git a/app/controllers/admin/ModelsController.php b/app/controllers/admin/ModelsController.php index 1bdcd7492b..f77304d185 100755 --- a/app/controllers/admin/ModelsController.php +++ b/app/controllers/admin/ModelsController.php @@ -350,5 +350,38 @@ class ModelsController extends AdminController $model = Model::find($modelId); return $model->show_mac_address; } + + public function getDataView($modelID) + { + $model = Model::withTrashed()->find($modelID); + $modelassets = $model->assets; + + $actions = new \Chumper\Datatable\Columns\FunctionColumn('actions', function ($modelassets) + { + if (($modelassets->assigned_to !='') && ($modelassets->assigned_to > 0)) { + return ''.Lang::get('general.checkin').''; + } else { + return ''.Lang::get('general.checkout').''; + } + }); + + return Datatable::collection($modelassets) + ->addColumn('name', function ($modelassets) { + return link_to('/hardware/'.$modelassets->id.'/view', $modelassets->name); + }) + ->addColumn('asset_tag', function ($modelassets) { + return link_to('/hardware/'.$modelassets->id.'/view', $modelassets->asset_tag); + }) + ->showColumns('serial') + ->addColumn('assigned_to', function ($modelassets) { + if ($modelassets->assigned_to) { + return link_to('/admin/users/'.$modelassets->assigned_to.'/view', $modelassets->assigneduser->fullName()); + } + }) + ->addColumn($actions) + ->searchColumns('name','asset_tag','serial','assigned_to''actions') + ->orderColumns('name','asset_tag','serial','assigned_to''actions') + ->make(); + } } diff --git a/app/routes.php b/app/routes.php index 77b45862e1..5055baa35e 100755 --- a/app/routes.php +++ b/app/routes.php @@ -31,6 +31,7 @@ Route::group(array('prefix' => 'api', 'namespace' => 'Controllers\Admin', 'befor Route::resource('/', 'ModelsController'); Route::get('list/{status?}', array('as'=>'api.models.list', 'uses'=>'ModelsController@getDatatable')); Route::get('{modelId}/check', array('as' => 'api.models.check', 'uses' => 'ModelsController@checkModel')); + Route::get('{modelID}/view', array('as'=>'api.models.view', 'uses'=>'ModelsController@getDataView')); }); /*--- Categories API---*/ Route::group(array('prefix'=>'categories'), function() { diff --git a/app/views/backend/models/view.blade.php b/app/views/backend/models/view.blade.php index 9e639bb29a..daa742d2ea 100755 --- a/app/views/backend/models/view.blade.php +++ b/app/views/backend/models/view.blade.php @@ -52,51 +52,56 @@ @if (count($model->assets) > 0) - - - - - - - - - - - - - @foreach ($model->assets as $modelassets) - - - - - - - - - @endforeach - - - -
@lang('general.name')@lang('general.asset_tag')@lang('admin/hardware/table.serial')@lang('general.user')@lang('table.actions')
{{{ $modelassets->name }}}{{{ $modelassets->asset_tag }}} - @if ($modelassets->serial) - - {{{ $modelassets->serial }}} - - @endif - - @if ($modelassets->assigneduser) - - {{{ $modelassets->assigneduser->fullName() }}} - - @endif - - @if ($modelassets->assigned_to != 0) - Checkin - @else - Checkout - @endif -
- + {{ Datatable::table() + ->addColumn(Lang::get('general.name'), + Lang::get('general.asset_tag'), + Lang::get('admin/hardware/table.serial'), + Lang::get('general.user'), + Lang::get('table.actions')) + ->setOptions( + array( + 'sAjaxSource'=>route('api.models.view', $model->id), + 'deferRender'=> true, + 'stateSave'=> true, + 'stateDuration'=> -1, + 'dom' =>'CT<"clear">lfrtip', + 'tableTools' => array( + 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', + 'aButtons'=>array( + array( + 'sExtends'=>'copy', + ), + 'print', + array( + 'sExtends'=>'collection', + 'sButtonText'=>'Export', + 'aButtons'=>array( + array( + 'sExtends'=>'csv', + ), + array( + 'sExtends'=>'xls', + ), + array( + 'sExtends'=>'pdf', + ), + ), + ), + ) + ), + 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(4),'activate'=>'mouseover'), + 'columnDefs'=> array( + array('bSortable'=>false,'targets'=>array(4)), + array('width'=>'auto','targets'=>array(4)), + ), + 'order'=>array(array(0,'asc')), + 'processing'=>true, + 'oLanguage'=>array( + 'sProcessing'=>' Loading...', + ), + ) + ) + ->render() }} @else
From a9f15fbcaef14ae1f78f08da632032c41074c0f9 Mon Sep 17 00:00:00 2001 From: madd15 Date: Tue, 24 Mar 2015 11:27:00 +1030 Subject: [PATCH 119/140] Convert Categories View to use Datatables, and fix Model View missing comma --- .../admin/CategoriesController.php | 31 +++++++ app/controllers/admin/ModelsController.php | 4 +- app/routes.php | 1 + app/views/backend/categories/view.blade.php | 85 +++++++++++-------- 4 files changed, 82 insertions(+), 39 deletions(-) diff --git a/app/controllers/admin/CategoriesController.php b/app/controllers/admin/CategoriesController.php index 1ab1caa07d..476331ba84 100755 --- a/app/controllers/admin/CategoriesController.php +++ b/app/controllers/admin/CategoriesController.php @@ -241,6 +241,37 @@ class CategoriesController extends AdminController ->orderColumns('name','category_type','count','acceptance','eula','actions') ->make(); } + + public function getDataView($categoryID) { + $category = Category::find($categoryID); + $categoryassets = $category->assets; + + $actions = new \Chumper\Datatable\Columns\FunctionColumn('actions', function ($categoryassets) + { + if (($categoryassets->assigned_to !='') && ($categoryassets->assigned_to > 0)) { + return ''.Lang::get('general.checkin').''; + } else { + return ''.Lang::get('general.checkout').''; + } + }); + + return Datatable::collection($categoryassets) + ->addColumn('name', function ($categoryassets) { + return link_to('/hardware/'.$categoryassets->id.'/view', $categoryassets->name); + }) + ->addColumn('asset_tag', function ($categoryassets) { + return link_to('/hardware/'.$categoryassets->id.'/view', $categoryassets->asset_tag); + }) + ->addColumn('assigned_to', function ($categoryassets) { + if ($categoryassets->assigned_to) { + return link_to('/admin/users/'.$categoryassets->assigned_to.'/view', $categoryassets->assigneduser->fullName()); + } + }) + ->addColumn($actions) + ->searchColumns('name','asset_tag','assigned_to','actions') + ->orderColumns('name','asset_tag','assigned_to','actions') + ->make(); + } } diff --git a/app/controllers/admin/ModelsController.php b/app/controllers/admin/ModelsController.php index f77304d185..29ef9e400d 100755 --- a/app/controllers/admin/ModelsController.php +++ b/app/controllers/admin/ModelsController.php @@ -379,8 +379,8 @@ class ModelsController extends AdminController } }) ->addColumn($actions) - ->searchColumns('name','asset_tag','serial','assigned_to''actions') - ->orderColumns('name','asset_tag','serial','assigned_to''actions') + ->searchColumns('name','asset_tag','serial','assigned_to','actions') + ->orderColumns('name','asset_tag','serial','assigned_to','actions') ->make(); } diff --git a/app/routes.php b/app/routes.php index 5055baa35e..14dbd4c96b 100755 --- a/app/routes.php +++ b/app/routes.php @@ -37,6 +37,7 @@ Route::group(array('prefix' => 'api', 'namespace' => 'Controllers\Admin', 'befor Route::group(array('prefix'=>'categories'), function() { Route::resource('/', 'CategoriesController'); Route::get('list', array('as'=>'api.categories.list', 'uses'=>'CategoriesController@getDatatable')); + Route::get('{categoryID}/view', array('as'=>'api.categories.view', 'uses'=>'CategoriesController@getDataView')); }); }); diff --git a/app/views/backend/categories/view.blade.php b/app/views/backend/categories/view.blade.php index 845a2e7f44..d5a0a49ea8 100644 --- a/app/views/backend/categories/view.blade.php +++ b/app/views/backend/categories/view.blade.php @@ -39,43 +39,54 @@ @if (count($category->assets) > 0) - - - - - - - - - - - - @foreach ($category->assets as $modelassets) - - - - - - - - @endforeach - - - -
@lang('general.name')@lang('general.asset_tag')@lang('general.user')@lang('table.actions')
{{{ $modelassets->name }}}{{{ $modelassets->asset_tag }}} - @if ($modelassets->assigneduser) - - {{{ $modelassets->assigneduser->fullName() }}} - - @endif - - @if ($modelassets->assigned_to != 0) - Checkin - @else - Checkout - @endif -
- + {{ Datatable::table() + ->addColumn(Lang::get('general.name'), + Lang::get('general.asset_tag'), + Lang::get('general.user'), + Lang::get('table.actions')) + ->setOptions( + array( + 'sAjaxSource'=>route('api.categories.view', $category->id), + 'deferRender'=> true, + 'stateSave'=> true, + 'stateDuration'=> -1, + 'dom' =>'T<"clear">lfrtip', + 'tableTools' => array( + 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', + 'aButtons'=>array( + array( + 'sExtends'=>'copy', + ), + 'print', + array( + 'sExtends'=>'collection', + 'sButtonText'=>'Export', + 'aButtons'=>array( + array( + 'sExtends'=>'csv', + ), + array( + 'sExtends'=>'xls', + ), + array( + 'sExtends'=>'pdf', + ), + ), + ), + ) + ), + 'columnDefs'=> array( + array('bSortable'=>false,'targets'=>array(3)), + array('width'=>'auto','targets'=>array(3)), + ), + 'order'=>array(array(0,'asc')), + 'processing'=>true, + 'oLanguage'=>array( + 'sProcessing'=>' Loading...', + ), + ) + ) + ->render() }} @else
From d9b92240450f559d60b811d6ab6be948995de9e5 Mon Sep 17 00:00:00 2001 From: madd15 Date: Wed, 25 Mar 2015 13:02:02 +1030 Subject: [PATCH 120/140] Fix mobile unable to click sign in --- app/views/frontend/auth/signin.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/frontend/auth/signin.blade.php b/app/views/frontend/auth/signin.blade.php index ee8e4b4049..be994c27dd 100755 --- a/app/views/frontend/auth/signin.blade.php +++ b/app/views/frontend/auth/signin.blade.php @@ -40,20 +40,20 @@ Account Sign in ::
-
+
-
+
-
- +
+
-
+ From 7f2ccc860b5af8effdadff91119d5d9ffe9c0584 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 26 Mar 2015 05:38:56 +1030 Subject: [PATCH 121/140] Remove forgot password link and fix save icon --- app/views/frontend/account/change-password.blade.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/frontend/account/change-password.blade.php b/app/views/frontend/account/change-password.blade.php index d7849ffd12..fdd9030242 100755 --- a/app/views/frontend/account/change-password.blade.php +++ b/app/views/frontend/account/change-password.blade.php @@ -60,10 +60,9 @@ Change your Password
@lang('button.cancel') - - I forgot my password +
-@stop \ No newline at end of file +@stop From d952a1199b285dd2c7de3567ea6f4d006c489920 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 26 Mar 2015 05:39:56 +1030 Subject: [PATCH 122/140] Remove forgot password link and fix save icon --- app/views/frontend/account/change-email.blade.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/frontend/account/change-email.blade.php b/app/views/frontend/account/change-email.blade.php index 56c285b1ef..df35572b67 100755 --- a/app/views/frontend/account/change-email.blade.php +++ b/app/views/frontend/account/change-email.blade.php @@ -66,8 +66,7 @@ Change your Email
@lang('button.cancel') - - I forgot my password +
From 6854c568c7ead1d81d05a0e5b8df68a5196aedfa Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 26 Mar 2015 05:53:58 +1030 Subject: [PATCH 123/140] Add if locked disable button --- app/views/frontend/account/change-email.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/frontend/account/change-email.blade.php b/app/views/frontend/account/change-email.blade.php index df35572b67..89e8b7f902 100755 --- a/app/views/frontend/account/change-email.blade.php +++ b/app/views/frontend/account/change-email.blade.php @@ -66,7 +66,7 @@ Change your Email
@lang('button.cancel') - +
From e2a2746ed668e4eab071d645295db760a22568e2 Mon Sep 17 00:00:00 2001 From: madd15 Date: Thu, 26 Mar 2015 05:54:14 +1030 Subject: [PATCH 124/140] Add if locked disable button --- app/views/frontend/account/change-password.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/frontend/account/change-password.blade.php b/app/views/frontend/account/change-password.blade.php index fdd9030242..3c7c127329 100755 --- a/app/views/frontend/account/change-password.blade.php +++ b/app/views/frontend/account/change-password.blade.php @@ -60,7 +60,7 @@ Change your Password
@lang('button.cancel') - +
From 865c302f71b8fe6cac8cc424594c6e48bf6db57b Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 25 Mar 2015 14:26:00 -0700 Subject: [PATCH 125/140] Prevent changing user email/pass/groups if locked --- app/controllers/account/ChangeEmailController.php | 14 ++++++++------ .../account/ChangePasswordController.php | 13 ++++++++----- app/controllers/admin/UsersController.php | 8 ++++++-- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/app/controllers/account/ChangeEmailController.php b/app/controllers/account/ChangeEmailController.php index 8ef3e8d19b..6907181c77 100755 --- a/app/controllers/account/ChangeEmailController.php +++ b/app/controllers/account/ChangeEmailController.php @@ -32,16 +32,18 @@ class ChangeEmailController extends AuthorizedController */ public function postIndex() { - // Declare the rules for the form validation - $rules = array( - 'current_password' => 'required|between:3,32', - 'email' => 'required|email|unique:users,email,'.Sentry::getUser()->email.',email', - 'email_confirm' => 'required|same:email', - ); + if (Config::get('app.lock_passwords')) { return Redirect::route('change-password')->with('error', Lang::get('admin/users/table.lock_passwords')); } else { + + // Declare the rules for the form validation + $rules = array( + 'current_password' => 'required|between:3,32', + 'email' => 'required|email|unique:users,email,'.Sentry::getUser()->email.',email', + 'email_confirm' => 'required|same:email', + ); // Create a new validator instance from our validation rules $validator = Validator::make(Input::all(), $rules); diff --git a/app/controllers/account/ChangePasswordController.php b/app/controllers/account/ChangePasswordController.php index 29e1737151..aefdb629e3 100755 --- a/app/controllers/account/ChangePasswordController.php +++ b/app/controllers/account/ChangePasswordController.php @@ -32,16 +32,19 @@ class ChangePasswordController extends AuthorizedController */ protected function postIndex() { - // Declare the rules for the form validation + + + if (Config::get('app.lock_passwords')) { + return Redirect::route('change-password')->with('error', Lang::get('admin/users/table.lock_passwords')); + } else { + + // Declare the rules for the form validation $rules = array( 'old_password' => 'required|min:6', 'password' => 'required|min:6', 'password_confirm' => 'required|same:password', ); - - if (Config::get('app.lock_passwords')) { - return Redirect::route('change-password')->with('error', Lang::get('admin/users/table.lock_passwords')); - } else { + // Create a new validator instance from our validation rules $validator = Validator::make(Input::all(), $rules); diff --git a/app/controllers/admin/UsersController.php b/app/controllers/admin/UsersController.php index 7dd0017098..4eaf895871 100755 --- a/app/controllers/admin/UsersController.php +++ b/app/controllers/admin/UsersController.php @@ -276,12 +276,16 @@ class UsersController extends AdminController // Ooops.. something went wrong return Redirect::back()->withInput()->withErrors($validator); } + + // Only update the email address if locking is set to false + if (!Config::get('app.lock_passwords')) { + $user->email = Input::get('email'); + } try { // Update the user $user->first_name = Input::get('first_name'); - $user->last_name = Input::get('last_name'); - $user->email = Input::get('email'); + $user->last_name = Input::get('last_name'); $user->employee_num = Input::get('employee_num'); $user->activated = Input::get('activated', $user->activated); $user->permissions = Input::get('permissions'); From bbcc8aa9ac2e805520e7f0d125fdb41791d5ac8f Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 25 Mar 2015 14:26:12 -0700 Subject: [PATCH 126/140] Update groups if unlocked --- app/config/version.php | 4 ++-- app/controllers/admin/UsersController.php | 29 +++++++++++++---------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index b22b3d1f1f..4a12de20a4 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.6.1-130', - 'hash_version' => 'v1.2.6.1-130-gad1a939', + 'app_version' => 'v1.2.6.1-152', + 'hash_version' => 'v1.2.6.1-152-g2cf8256', ); \ No newline at end of file diff --git a/app/controllers/admin/UsersController.php b/app/controllers/admin/UsersController.php index 4eaf895871..9a8c379398 100755 --- a/app/controllers/admin/UsersController.php +++ b/app/controllers/admin/UsersController.php @@ -305,7 +305,7 @@ class UsersController extends AdminController // Do we want to update the user password? - if ($password) { + if (($password) && (!Config::get('app.lock_passwords'))) { $user->password = $password; } @@ -320,19 +320,22 @@ class UsersController extends AdminController $groupsToAdd = array_diff($selectedGroups, $userGroups); $groupsToRemove = array_diff($userGroups, $selectedGroups); - // Assign the user to groups - foreach ($groupsToAdd as $groupId) { - $group = Sentry::getGroupProvider()->findById($groupId); + if (!Config::get('app.lock_passwords')) { - $user->addGroup($group); - } - - // Remove the user from groups - foreach ($groupsToRemove as $groupId) { - $group = Sentry::getGroupProvider()->findById($groupId); - - $user->removeGroup($group); - } + // Assign the user to groups + foreach ($groupsToAdd as $groupId) { + $group = Sentry::getGroupProvider()->findById($groupId); + + $user->addGroup($group); + } + + // Remove the user from groups + foreach ($groupsToRemove as $groupId) { + $group = Sentry::getGroupProvider()->findById($groupId); + + $user->removeGroup($group); + } + } // Was the user updated? if ($user->save()) { From b32379393f7572fe0199920ec6453ca4bc05aab6 Mon Sep 17 00:00:00 2001 From: madd15 Date: Fri, 27 Mar 2015 07:50:13 +1030 Subject: [PATCH 127/140] Fix missed hardware statuses --- app/views/backend/layouts/default.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/backend/layouts/default.blade.php b/app/views/backend/layouts/default.blade.php index 187ecb7726..8b8f0f4be9 100644 --- a/app/views/backend/layouts/default.blade.php +++ b/app/views/backend/layouts/default.blade.php @@ -249,7 +249,7 @@
- + {{ number_format(Asset::availassetcount()) }} @lang('general.assets_available') From 06b3d6e5cef265546ae457d6088324bff6a97440 Mon Sep 17 00:00:00 2001 From: Madd15 Date: Fri, 27 Mar 2015 16:49:03 +1030 Subject: [PATCH 128/140] Fix saveState, change chumper defaults Hopefully this will fix the saveState issues --- .../packages/chumper/datatable/config.php | 61 +++++++++++++++++-- app/views/backend/accessories/index.blade.php | 7 --- app/views/backend/accessories/view.blade.php | 7 --- app/views/backend/categories/index.blade.php | 23 ------- app/views/backend/categories/view.blade.php | 31 ---------- app/views/backend/hardware/index.blade.php | 57 ++--------------- app/views/backend/layouts/default.blade.php | 20 +++--- app/views/backend/licenses/index.blade.php | 23 ------- app/views/backend/models/index.blade.php | 25 +------- app/views/backend/models/view.blade.php | 31 ---------- app/views/backend/users/index.blade.php | 29 +-------- 11 files changed, 76 insertions(+), 238 deletions(-) diff --git a/app/config/packages/chumper/datatable/config.php b/app/config/packages/chumper/datatable/config.php index f94c8c32bd..34777b1dc9 100644 --- a/app/config/packages/chumper/datatable/config.php +++ b/app/config/packages/chumper/datatable/config.php @@ -50,9 +50,55 @@ return array( 'options' => array( - "sPaginationType" => "full_numbers", - - "bProcessing" => false + "pagingType" => "full_numbers", + 'processing'=>true, + 'language'=>array( + 'processing'=>' Loading...' + ), + 'deferRender'=> true, + 'stateSave'=> true, + 'paging'=>true, + 'tableTools' => array( + 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', + 'aButtons'=>array( + array( + 'sExtends'=>'copy', + 'sButtonText'=>'Copy', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), + array( + 'sExtends'=>'print', + 'sButtonText'=>'Print', + 'mColumns'=>'visible', + 'bShowAll'=>true, + ), + array( + 'sExtends'=>'collection', + 'sButtonText'=>'Export', + 'aButtons'=>array( + array( + 'sExtends'=>'csv', + 'sButtonText'=>'csv', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), + array( + 'sExtends'=>'xls', + 'sButtonText'=>'XLS', + 'mColumns'=>'visible', + 'bFooter'=>false, + ), + array( + 'sExtends'=>'pdf', + 'sButtonText'=>'PDF', + 'mColumns'=>'visible', + 'bFooter'=>false, + ) + ) + ) + ) + ), ), @@ -68,7 +114,14 @@ return array( | */ - 'callbacks' => array(), + 'callbacks' => array( + "stateSaveCallback"=>"function (oSettings, oData) { + localStorage.setItem('DataTables_'+window.location.pathname, JSON.stringify(oData)); + }", + "stateLoadCallback"=>"function (oSettings) { + return JSON.parse(localStorage.getItem('DataTables_'+window.location.pathname)); + }", + ), /* |-------------------------------------------------------------------------- diff --git a/app/views/backend/accessories/index.blade.php b/app/views/backend/accessories/index.blade.php index f9213dfa50..5773b2234e 100755 --- a/app/views/backend/accessories/index.blade.php +++ b/app/views/backend/accessories/index.blade.php @@ -27,9 +27,6 @@ ->setOptions( array( 'sAjaxSource'=>route('api.accessories.list'), - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, 'dom' =>'T<"clear">lfrtip', 'tableTools' => array( 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', @@ -77,10 +74,6 @@ array('bSortable'=>false,'targets'=>array(3)), ), 'order'=>array(array(0,'asc')), - 'processing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...', - ), ) ) ->render() }} diff --git a/app/views/backend/accessories/view.blade.php b/app/views/backend/accessories/view.blade.php index 07f6fd12b2..a2f9876c77 100644 --- a/app/views/backend/accessories/view.blade.php +++ b/app/views/backend/accessories/view.blade.php @@ -37,9 +37,6 @@ ->setOptions( array( 'sAjaxSource'=>route('api.accessories.view', $accessory->id), - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, 'dom' =>'T<"clear">lfrtip', 'tableTools' => array( 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', @@ -70,10 +67,6 @@ array('width'=>'auto','targets'=>array(1)), ), 'order'=>array(array(0,'asc')), - 'processing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...', - ), ) ) ->render() }} diff --git a/app/views/backend/categories/index.blade.php b/app/views/backend/categories/index.blade.php index ae966a3617..47342f9651 100755 --- a/app/views/backend/categories/index.blade.php +++ b/app/views/backend/categories/index.blade.php @@ -29,33 +29,10 @@ ->setOptions( array( 'sAjaxSource'=> route('api.categories.list'), - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, 'dom' =>'CT<"clear">lfrtip', - 'tableTools' => array( - 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', - 'aButtons'=>array( - 'copy', - 'print', - array( - 'sExtends'=>'collection', - 'sButtonText'=>'Export', - 'aButtons'=>array( - 'csv', - 'xls', - 'pdf' - ) - ) - ) - ), 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(5),'activate'=>'mouseover'), 'columnDefs'=> array(array('bSortable'=>false,'targets'=>array(5))), 'order'=>array(array(0,'asc')), - 'processing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...', - ), ) ) ->render() }} diff --git a/app/views/backend/categories/view.blade.php b/app/views/backend/categories/view.blade.php index d5a0a49ea8..99b731d5c8 100644 --- a/app/views/backend/categories/view.blade.php +++ b/app/views/backend/categories/view.blade.php @@ -47,43 +47,12 @@ ->setOptions( array( 'sAjaxSource'=>route('api.categories.view', $category->id), - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, 'dom' =>'T<"clear">lfrtip', - 'tableTools' => array( - 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', - 'aButtons'=>array( - array( - 'sExtends'=>'copy', - ), - 'print', - array( - 'sExtends'=>'collection', - 'sButtonText'=>'Export', - 'aButtons'=>array( - array( - 'sExtends'=>'csv', - ), - array( - 'sExtends'=>'xls', - ), - array( - 'sExtends'=>'pdf', - ), - ), - ), - ) - ), 'columnDefs'=> array( array('bSortable'=>false,'targets'=>array(3)), array('width'=>'auto','targets'=>array(3)), ), 'order'=>array(array(0,'asc')), - 'processing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...', - ), ) ) ->render() }} diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 89427d1ccc..82e3563261 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -71,58 +71,10 @@ ->setOptions( array( 'sAjaxSource'=> route('api.hardware.list', Input::get('status')), - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, 'dom' =>'CT<"clear">lfrtip', - 'tableTools' => array( - 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', - 'aButtons'=>array( - array( - 'sExtends'=>'copy', - 'sButtonText'=>'Copy', - 'mColumns'=>'visible', - 'bFooter'=>false, - ), - array( - 'sExtends'=>'print', - 'sButtonText'=>'Print', - 'mColumns'=>'visible', - 'bShowAll'=>true, - ), - array( - 'sExtends'=>'collection', - 'sButtonText'=>'Export', - 'aButtons'=>array( - array( - 'sExtends'=>'csv', - 'sButtonText'=>'csv', - 'mColumns'=>'visible', - 'bFooter'=>false, - ), - array( - 'sExtends'=>'xls', - 'sButtonText'=>'XLS', - 'mColumns'=>'visible', - 'bFooter'=>false, - ), - array( - 'sExtends'=>'pdf', - 'sButtonText'=>'PDF', - 'mColumns'=>'visible', - 'bFooter'=>false, - ) - ) - ) - ) - ), 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(0,10,11),'activate'=>'mouseover'), - 'columnDefs'=> array(array('visible'=>false,'targets'=>array(7,8,9)),array('bSortable'=>false,'targets'=>array(0,10,11))), - 'order'=>array(array(1,'asc')), - 'processing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...' - ), + 'columnDefs'=> array(array('visible'=>false,'targets'=>array(7,8,9)),array('orderable'=>false,'targets'=>array(0,10,11))), + 'order'=>array(array(1,'asc')), ) ) ->render('backend/hardware/datatable') }} @@ -131,7 +83,6 @@
- - + + - + - - - diff --git a/app/views/backend/licenses/index.blade.php b/app/views/backend/licenses/index.blade.php index 7c291288ef..6721f94253 100755 --- a/app/views/backend/licenses/index.blade.php +++ b/app/views/backend/licenses/index.blade.php @@ -27,36 +27,13 @@ ->setOptions( array( 'sAjaxSource'=>route('api.licenses.list'), - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, 'dom' =>'CT<"clear">lfrtip', - 'tableTools' => array( - 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', - 'aButtons'=>array( - 'copy', - 'print', - array( - 'sExtends'=>'collection', - 'sButtonText'=>'Export', - 'aButtons'=>array( - 'csv', - 'xls', - 'pdf' - ) - ) - ) - ), 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(5),'activate'=>'mouseover'), 'columnDefs'=> array( array('bSortable'=>false,'targets'=>array(5)), array('width'=>'20%','targets'=>array(5)), ), 'order'=>array(array(0,'asc')), - 'processing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...', - ), ) ) ->render() }} diff --git a/app/views/backend/models/index.blade.php b/app/views/backend/models/index.blade.php index 80b1cf3145..2d02153d00 100755 --- a/app/views/backend/models/index.blade.php +++ b/app/views/backend/models/index.blade.php @@ -33,33 +33,10 @@ ->setOptions( array( 'sAjaxSource'=> route('api.models.list', Input::get('status')), - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, 'dom' =>'CT<"clear">lfrtip', - 'tableTools' => array( - 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', - 'aButtons'=>array( - 'copy', - 'print', - array( - 'sExtends'=>'collection', - 'sButtonText'=>'Export', - 'aButtons'=>array( - 'csv', - 'xls', - 'pdf' - ) - ) - ) - ), - 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(6),'activate'=>'mouseover'), + 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(6),'activate'=>'mouseover'), 'columnDefs'=> array(array('bSortable'=>false,'targets'=>array(6))), 'order'=>array(array(0,'asc')), - 'processing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...', - ), ) ) ->render() }} diff --git a/app/views/backend/models/view.blade.php b/app/views/backend/models/view.blade.php index daa742d2ea..67e864b49b 100755 --- a/app/views/backend/models/view.blade.php +++ b/app/views/backend/models/view.blade.php @@ -61,44 +61,13 @@ ->setOptions( array( 'sAjaxSource'=>route('api.models.view', $model->id), - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, 'dom' =>'CT<"clear">lfrtip', - 'tableTools' => array( - 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', - 'aButtons'=>array( - array( - 'sExtends'=>'copy', - ), - 'print', - array( - 'sExtends'=>'collection', - 'sButtonText'=>'Export', - 'aButtons'=>array( - array( - 'sExtends'=>'csv', - ), - array( - 'sExtends'=>'xls', - ), - array( - 'sExtends'=>'pdf', - ), - ), - ), - ) - ), 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','exclude'=>array(4),'activate'=>'mouseover'), 'columnDefs'=> array( array('bSortable'=>false,'targets'=>array(4)), array('width'=>'auto','targets'=>array(4)), ), 'order'=>array(array(0,'asc')), - 'processing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...', - ), ) ) ->render() }} diff --git a/app/views/backend/users/index.blade.php b/app/views/backend/users/index.blade.php index e490f4e280..729d258645 100755 --- a/app/views/backend/users/index.blade.php +++ b/app/views/backend/users/index.blade.php @@ -41,37 +41,14 @@ Lang::get('general.licenses'), Lang::get('admin/users/table.activated'), Lang::get('table.actions') - ) - ->setUrl(route('api.users.list', Input::get('status'))) // this is the route where data will be retrieved + ) ->setOptions( array( - 'deferRender'=> true, - 'stateSave'=> true, - 'stateDuration'=> -1, + 'sAjaxSource'=>route('api.users.list', Input::get('status')), 'dom' =>'CT<"clear">lfrtip', - 'tableTools' => array( - 'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf', - 'aButtons'=>array( - 'copy', - 'print', - array( - 'sExtends'=>'collection', - 'sButtonText'=>'Export', - 'aButtons'=>array( - 'csv', - 'xls', - 'pdf' - ) - ) - ) - ), 'colVis'=> array('showAll'=>'Show All','restore'=>'Restore','activate'=>'mouseover'), 'columnDefs'=> array(array('visible'=>false,'targets'=>array()),array('bSortable'=>false,'targets'=>array(6))), - 'order'=>array(array(1,'asc')), - 'bProcessing'=>true, - 'oLanguage'=>array( - 'sProcessing'=>' Loading...' - ), + 'order'=>array(array(1,'asc')), ) ) ->render() }} From 87bf51b0334aefacc7f720592e327cbbe0540cc6 Mon Sep 17 00:00:00 2001 From: Madd15 Date: Fri, 27 Mar 2015 16:52:40 +1030 Subject: [PATCH 129/140] Restore JS changes --- app/views/backend/layouts/default.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/backend/layouts/default.blade.php b/app/views/backend/layouts/default.blade.php index b87e328fce..1cd4f82bfc 100644 --- a/app/views/backend/layouts/default.blade.php +++ b/app/views/backend/layouts/default.blade.php @@ -46,10 +46,10 @@ - - + + - +