mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 16:00:13 +00:00
Fix display bug for attachments
This commit is contained in:
@@ -104,7 +104,7 @@ class Attachment extends Model
|
|||||||
*/
|
*/
|
||||||
public function getDescriptionAttribute($value)
|
public function getDescriptionAttribute($value)
|
||||||
{
|
{
|
||||||
if (is_null($value)) {
|
if (is_null($value) || strlen($value) === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ class Attachment extends Model
|
|||||||
*/
|
*/
|
||||||
public function getFilenameAttribute($value)
|
public function getFilenameAttribute($value)
|
||||||
{
|
{
|
||||||
if (is_null($value)) {
|
if (is_null($value) || strlen($value) === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ class Attachment extends Model
|
|||||||
*/
|
*/
|
||||||
public function getMimeAttribute($value)
|
public function getMimeAttribute($value)
|
||||||
{
|
{
|
||||||
if (is_null($value)) {
|
if (is_null($value) || strlen($value) === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ class Attachment extends Model
|
|||||||
*/
|
*/
|
||||||
public function getNotesAttribute($value)
|
public function getNotesAttribute($value)
|
||||||
{
|
{
|
||||||
if (is_null($value)) {
|
if (is_null($value) || strlen($value) === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ class Attachment extends Model
|
|||||||
*/
|
*/
|
||||||
public function getTitleAttribute($value)
|
public function getTitleAttribute($value)
|
||||||
{
|
{
|
||||||
if (is_null($value)) {
|
if (is_null($value) || strlen($value) === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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|length > 0 %}
|
{% if att.title %}
|
||||||
{{ att.title }}
|
{{ att.title }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ att.filename }}
|
{{ att.filename }}
|
||||||
|
Reference in New Issue
Block a user