Skip to content

Commit

Permalink
fix: fix storage page not being displayed if a contact does not exist…
Browse files Browse the repository at this point in the history
… anymore (#3082)
  • Loading branch information
djaiss authored Oct 13, 2019
1 parent 14069f9 commit 7975614
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

### Fixes:

*
* Fix storage page not being displayed if a contact does not exist anymore


# RELEASED VERSIONS:
Expand Down
58 changes: 31 additions & 27 deletions resources/views/settings/storage/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,36 @@
<p>{{ trans('settings.storage_description') }}</p>

<ul class="table">
@foreach($documents as $document)
<li class="table-row">
<div class="table-cell">
{{ $document->created_at }}
</div>
<div class="table-cell">
{{ $document->original_filename }} ({{ round($document->filesize / 1000) }} Kb)
</div>
<div class="table-cell">
<a href="people/{{ $document->contact->hashID() }}">{{ $document->contact->name }}</a>
</div>
</li>
@endforeach
@foreach($photos as $photo)
<li class="table-row">
<div class="table-cell">
{{ $photo->created_at }}
</div>
<div class="table-cell">
{{ $photo->original_filename }} ({{ round($photo->filesize / 1000) }} Kb)
</div>
<div class="table-cell">
<a href="people/{{ $photo->contact()->hashID() }}">{{ $photo->contact()->name }}</a>
</div>
</li>
@endforeach
@foreach($documents as $document)
@if (!is_null($document->contact()))
<li class="table-row">
<div class="table-cell">
{{ $document->created_at }}
</div>
<div class="table-cell">
{{ $document->original_filename }} ({{ round($document->filesize / 1000) }} Kb)
</div>
<div class="table-cell">
<a href="{{ $document->contact()->getLink() }}">{{ $document->contact->name }}</a>
</div>
</li>
@endif
@endforeach
@foreach($photos as $photo)
@if (!is_null($photo->contact()))
<li class="table-row">
<div class="table-cell">
{{ $photo->created_at }}
</div>
<div class="table-cell">
{{ $photo->original_filename }} ({{ round($photo->filesize / 1000) }} Kb)
</div>
<div class="table-cell">
<a href="{{ $photo->contact()->getLink() }}">{{ $photo->contact()->name }}</a>
</div>
</li>
@endif
@endforeach
</ul>
</div>
</div>
Expand All @@ -76,4 +80,4 @@
</div>
</div>

@endsection
@endsection

0 comments on commit 7975614

Please sign in to comment.