Fix display bug for attachments

This commit is contained in:
James Cole
2016-09-20 17:21:26 +02:00
parent e5f7228fa9
commit 5545d1c1ba
2 changed files with 5 additions and 5 deletions

View File

@@ -133,10 +133,10 @@ class CreateMainTables extends Migration
$table->string('attachable_type', 255); $table->string('attachable_type', 255);
$table->string('md5', 32); $table->string('md5', 32);
$table->string('filename', 1024); $table->string('filename', 1024);
$table->string('title', 1024); $table->string('title', 1024)->nullable();
$table->text('description'); $table->text('description')->nullable();
$table->text('notes'); $table->text('notes')->nullable();
$table->string('mime', 200); $table->string('mime', 1024);
$table->integer('size', false, true); $table->integer('size', false, true);
$table->boolean('uploaded')->default(1); $table->boolean('uploaded')->default(1);

View File

@@ -161,7 +161,7 @@
<td> <td>
<i class="fa {{ att.mime|mimeIcon }}"></i> <i class="fa {{ att.mime|mimeIcon }}"></i>
<a href="{{ route('attachments.download', att.id) }}" title="{{ att.filename }}"> <a href="{{ route('attachments.download', att.id) }}" title="{{ att.filename }}">
{% if att.title %} {% if strlen(att.title) > 0 %}
{{ att.title }} {{ att.title }}
{% else %} {% else %}
{{ att.filename }} {{ att.filename }}