Skip to content

Commit c3c4e9d

Browse files
committed
Fixes #852 - localized string for file types, added zip and rar for asset upload
1 parent 7820efc commit c3c4e9d

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

app/controllers/admin/AssetsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ public function postUpload($assetID = null)
752752
foreach(Input::file('assetfile') as $file) {
753753

754754
$rules = array(
755-
'assetfile' => 'required|mimes:png,gif,jpg,jpeg,doc,docx,pdf,txt|max:2000'
755+
'assetfile' => 'required|mimes:png,gif,jpg,jpeg,doc,docx,pdf,txt,zip,rar|max:2000'
756756
);
757757
$validator = Validator::make(array('assetfile'=> $file), $rules);
758758

app/lang/en/admin/hardware/general.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'deployable' => 'Deployable',
1010
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
1111
'edit' => 'Edit Asset',
12+
'filetype_info' => 'Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, rar and zip.',
1213
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
1314
'requestable' => 'Requestable',
1415
'restore' => 'Restore Asset',

app/lang/en/admin/licenses/general.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
'checkout' => 'Checkout License Seat',
88
'edit' => 'Edit License',
99
'clone' => 'Clone License',
10+
'filetype_info' => 'Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, rar and zip.',
1011
'history_for' => 'History for ',
1112
'in_out' => 'In/Out',
1213
'info' => 'License Info',

app/views/backend/hardware/view.blade.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
<div class="col-md-12" style="padding-bottom: 5px;"><strong>@lang('admin/hardware/form.fully_depreciated'): </strong>
125125
@if ($asset->time_until_depreciated()->y > 0)
126126
{{{ $asset->time_until_depreciated()->y }}}
127-
@lang('admin/hardware/form.years'),
127+
@lang('admin/hardware/form.years'),
128128
@endif
129129
{{{ $asset->time_until_depreciated()->m }}}
130130
@lang('admin/hardware/form.months')
@@ -192,8 +192,8 @@
192192
</div>
193193
</div>
194194
@endif
195-
196-
195+
196+
197197
<div class="col-md-12">
198198

199199

@@ -262,7 +262,7 @@
262262
<tbody>
263263
@if (count($asset->assetlog) > 0)
264264
@foreach ($asset->assetlog as $log)
265-
265+
266266
<tr>
267267
<td>{{{ $log->created_at }}}</td>
268268
<td>
@@ -289,7 +289,7 @@
289289
@endif
290290
</td>
291291
</tr>
292-
292+
293293
@endforeach
294294
@endif
295295
<tr>
@@ -333,8 +333,8 @@
333333
</li>
334334
</ul>
335335
@endif
336-
337-
336+
337+
338338
@if (($asset->assigneduser) && ($asset->assigned_to > 0) && ($asset->deleted_at==''))
339339
<h6><br>@lang('admin/hardware/form.checkedout_to')</h6>
340340
<ul>
@@ -373,14 +373,14 @@
373373
@if ($asset->assetstatus)
374374
<h6><br>
375375
@if (($asset->assetstatus->deployable=='1') && ($asset->assigned_to > 0))
376-
@lang('admin/hardware/general.asset')
376+
@lang('admin/hardware/general.asset')
377377
@lang('general.deployed')
378378
@else
379-
{{{ $asset->assetstatus->name }}}
379+
{{{ $asset->assetstatus->name }}}
380380
@lang('admin/hardware/general.asset')
381381
@endif
382382
<ul>
383-
383+
384384
@if (($asset->assetstatus->deployable=='1') && ($asset->assigned_to > 0) && ($asset->deleted_at==''))
385385
<li><br /><a href="{{ route('checkin/hardware', $asset->id) }}" class="btn btn-primary btn-sm">@lang('admin/hardware/general.checkin')</a></li>
386386
@elseif ((($asset->assetstatus->deployable=='1') && (($asset->assigned_to=='') || ($asset->assigned_to==0))) && ($asset->deleted_at==''))
@@ -423,7 +423,7 @@
423423
'files' => true, 'class' => 'form-horizontal' ]) }}
424424
<div class="modal-body">
425425

426-
<p>Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.</p>
426+
<p><p>@lang('admin/hardware/general.filetype_info')</p>.</p>
427427

428428
<div class="form-group col-md-12">
429429
<div class="input-group col-md-12">

app/views/backend/licenses/view.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{-- Page title --}}
44
@section('title')
55
@lang('admin/licenses/general.view')
6-
- {{{ $license->name }}}
6+
- {{{ $license->name }}}
77
@parent
88
@stop
99

@@ -221,7 +221,7 @@
221221
'files' => true, 'class' => 'form-horizontal' ]) }}
222222
<div class="modal-body">
223223

224-
<p>Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.</p>
224+
<p>@lang('admin/licenses/general.filetype_info')</p>
225225

226226
<div class="form-group col-md-12">
227227
<div class="input-group col-md-12">

0 commit comments

Comments
 (0)