]> BookStack Code Mirror - bookstack/blob - resources/views/attachments/list.blade.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / resources / views / attachments / list.blade.php
1 <div component="attachments-list">
2     @foreach($attachments as $attachment)
3         <div class="attachment icon-list">
4             <div class="split-icon-list-item attachment-{{ $attachment->external ? 'link' : 'file' }}">
5                 <a href="{{ $attachment->getUrl() }}"
6                    refs="attachments-list@link-type-{{ $attachment->external ? 'link' : 'file' }}"
7                    @if($attachment->external) target="_blank" @endif>
8                     <div class="icon">@icon($attachment->external ? 'export' : 'file')</div>
9                     <div class="label">{{ $attachment->name }}</div>
10                 </a>
11                 @if(!$attachment->external)
12                     <div component="dropdown" class="icon-list-item-dropdown">
13                         <button refs="dropdown@toggle" type="button" class="icon-list-item-dropdown-toggle">@icon('caret-down')</button>
14                         <ul refs="dropdown@menu" class="dropdown-menu" role="menu">
15                             <a href="{{ $attachment->getUrl(false) }}" class="icon-item">
16                                 @icon('download')
17                                 <div>{{ trans('common.download') }}</div>
18                             </a>
19                             <a href="{{ $attachment->getUrl(true) }}" target="_blank" class="icon-item">
20                                 @icon('export')
21                                 <div>{{ trans('common.open_in_tab') }}</div>
22                             </a>
23                         </ul>
24                     </div>
25                 @endif
26             </div>
27         </div>
28     @endforeach
29 </div>