1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Merge pull request #2791 from BookStackApp/attachments_open_in_browser

Attachment serving without forced download
This commit is contained in:
Dan Brown
2021-06-13 14:03:08 +01:00
committed by GitHub
9 changed files with 122 additions and 35 deletions

View File

@ -1,8 +1,10 @@
@foreach($attachments as $attachment)
<div class="attachment icon-list">
<a class="icon-list-item py-xs" href="{{ $attachment->getUrl() }}" @if($attachment->external) target="_blank" @endif>
<span class="icon">@icon($attachment->external ? 'export' : 'file')</span>
<span>{{ $attachment->name }}</span>
</a>
</div>
@endforeach
<div component="attachments-list">
@foreach($attachments as $attachment)
<div class="attachment icon-list">
<a class="icon-list-item py-xs attachment-{{ $attachment->external ? 'link' : 'file' }}" href="{{ $attachment->getUrl() }}" @if($attachment->external) target="_blank" @endif>
<span class="icon">@icon($attachment->external ? 'export' : 'file')</span>
<span>{{ $attachment->name }}</span>
</a>
</div>
@endforeach
</div>