Clean up view and route.

This commit is contained in:
James Cole 2018-01-25 19:21:58 +01:00
parent 3dbe6d4870
commit 3fa39a6805
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 3 additions and 5 deletions

View File

@ -288,11 +288,12 @@
<div class="btn-group btn-group-xs">
<a href="{{ route('attachments.edit', att.id) }}" class="btn btn-default"><i class="fa fa-pencil"></i></a>
<a href="{{ route('attachments.delete', att.id) }}" class="btn btn-danger"><i class="fa fa-trash"></i></a>
<a href="{{ route('attachments.download', att.id) }}" class="btn btn-default"><i class="fa fa-download"></i></a>
</div>
</td>
<td>
<i class="fa {{ att.mime|mimeIcon }}"></i>
<a href="{{ route('attachments.download', att.id) }}" title="{{ att.filename }}">
<a href="{{ route('attachments.view', att.id) }}" title="{{ att.filename }}">
{% if att.title %}
{{ att.title }}
{% else %}
@ -305,9 +306,6 @@
<em>{{ att.description }}</em>
{% endif %}
</td>
<td style="width:100px;">
<img src="{{ route('attachments.preview', att.id) }}"/>
</td>
</tr>
{% endfor %}
</table>

View File

@ -130,8 +130,8 @@ Route::group(
['middleware' => 'user-full-auth', 'prefix' => 'attachments', 'as' => 'attachments.'], function () {
Route::get('edit/{attachment}', ['uses' => 'AttachmentController@edit', 'as' => 'edit']);
Route::get('delete/{attachment}', ['uses' => 'AttachmentController@delete', 'as' => 'delete']);
Route::get('preview/{attachment}', ['uses' => 'AttachmentController@preview', 'as' => 'preview']);
Route::get('download/{attachment}', ['uses' => 'AttachmentController@download', 'as' => 'download']);
Route::get('view/{attachment}', ['uses' => 'AttachmentController@view', 'as' => 'view']);
Route::post('update/{attachment}', ['uses' => 'AttachmentController@update', 'as' => 'update']);
Route::post('destroy/{attachment}', ['uses' => 'AttachmentController@destroy', 'as' => 'destroy']);