Skip to content

Commit

Permalink
Fixes #852 - localized string for file types, added zip and rar for a…
Browse files Browse the repository at this point in the history
…sset upload
  • Loading branch information
snipe committed Jun 16, 2015
1 parent 7820efc commit c3c4e9d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ public function postUpload($assetID = null)
foreach(Input::file('assetfile') as $file) {

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

Expand Down
1 change: 1 addition & 0 deletions app/lang/en/admin/hardware/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'deployable' => 'Deployable',
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
'edit' => 'Edit Asset',
'filetype_info' => 'Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, rar and zip.',
'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>.',
'requestable' => 'Requestable',
'restore' => 'Restore Asset',
Expand Down
1 change: 1 addition & 0 deletions app/lang/en/admin/licenses/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'checkout' => 'Checkout License Seat',
'edit' => 'Edit License',
'clone' => 'Clone License',
'filetype_info' => 'Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, rar and zip.',
'history_for' => 'History for ',
'in_out' => 'In/Out',
'info' => 'License Info',
Expand Down
22 changes: 11 additions & 11 deletions app/views/backend/hardware/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<div class="col-md-12" style="padding-bottom: 5px;"><strong>@lang('admin/hardware/form.fully_depreciated'): </strong>
@if ($asset->time_until_depreciated()->y > 0)
{{{ $asset->time_until_depreciated()->y }}}
@lang('admin/hardware/form.years'),
@lang('admin/hardware/form.years'),
@endif
{{{ $asset->time_until_depreciated()->m }}}
@lang('admin/hardware/form.months')
Expand Down Expand Up @@ -192,8 +192,8 @@
</div>
</div>
@endif


<div class="col-md-12">


Expand Down Expand Up @@ -262,7 +262,7 @@
<tbody>
@if (count($asset->assetlog) > 0)
@foreach ($asset->assetlog as $log)

<tr>
<td>{{{ $log->created_at }}}</td>
<td>
Expand All @@ -289,7 +289,7 @@
@endif
</td>
</tr>

@endforeach
@endif
<tr>
Expand Down Expand Up @@ -333,8 +333,8 @@
</li>
</ul>
@endif


@if (($asset->assigneduser) && ($asset->assigned_to > 0) && ($asset->deleted_at==''))
<h6><br>@lang('admin/hardware/form.checkedout_to')</h6>
<ul>
Expand Down Expand Up @@ -373,14 +373,14 @@
@if ($asset->assetstatus)
<h6><br>
@if (($asset->assetstatus->deployable=='1') && ($asset->assigned_to > 0))
@lang('admin/hardware/general.asset')
@lang('admin/hardware/general.asset')
@lang('general.deployed')
@else
{{{ $asset->assetstatus->name }}}
{{{ $asset->assetstatus->name }}}
@lang('admin/hardware/general.asset')
@endif
<ul>

@if (($asset->assetstatus->deployable=='1') && ($asset->assigned_to > 0) && ($asset->deleted_at==''))
<li><br /><a href="{{ route('checkin/hardware', $asset->id) }}" class="btn btn-primary btn-sm">@lang('admin/hardware/general.checkin')</a></li>
@elseif ((($asset->assetstatus->deployable=='1') && (($asset->assigned_to=='') || ($asset->assigned_to==0))) && ($asset->deleted_at==''))
Expand Down Expand Up @@ -423,7 +423,7 @@
'files' => true, 'class' => 'form-horizontal' ]) }}
<div class="modal-body">

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

<div class="form-group col-md-12">
<div class="input-group col-md-12">
Expand Down
4 changes: 2 additions & 2 deletions app/views/backend/licenses/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{-- Page title --}}
@section('title')
@lang('admin/licenses/general.view')
- {{{ $license->name }}}
- {{{ $license->name }}}
@parent
@stop

Expand Down Expand Up @@ -221,7 +221,7 @@
'files' => true, 'class' => 'form-horizontal' ]) }}
<div class="modal-body">

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

<div class="form-group col-md-12">
<div class="input-group col-md-12">
Expand Down

0 comments on commit c3c4e9d

Please sign in to comment.