Skip to content

Firefly III: a personal finances manager

Clean up view and route.

James Cole3fa39a680531
diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig
index 025361444f..65473d8bb7 100644
--- a/resources/views/transactions/show.twig
+++ b/resources/views/transactions/show.twig
@@ -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>
diff --git a/routes/web.php b/routes/web.php
index fdc92b379f..db5274e68e 100755
--- a/routes/web.php
+++ b/routes/web.php
@@ -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']);