mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
7f5a361bc1
Former-commit-id: 693423b34a05c66aeb1fac8832a7cfbe8a440a8c [formerly db4998875d0347b455cd77e34d68cfe3e7db355b] [formerly 48da880c8e3e5b7a0f32d36e4a728b899acb7986 [formerly 7aa6a549f9
]]
Former-commit-id: d7c550899bf1a84e5e0831ed6e3573ccf798f7a4 [formerly 3c951aaf0f638ac5e7637841e835f3a354c33192]
Former-commit-id: b5839c3e783af0182ca7ffc037161914d4a2a503
108 lines
3.6 KiB
Cheetah
108 lines
3.6 KiB
Cheetah
{{ define "info-button" }}
|
|
|
|
{{ end }}
|
|
|
|
{{ define "delete-button" }}
|
|
<button aria-label="Delete" title="Delete" class="action" id="delete">
|
|
<i class="material-icons">delete</i>
|
|
<span>Delete</span>
|
|
</button>
|
|
{{ end }}
|
|
|
|
{{ define "right-side-actions" }}
|
|
{{ template "info-button" }}
|
|
{{ end }}
|
|
|
|
{{ define "right" }}
|
|
{{- if not .IsEditor }}
|
|
<a aria-label="Switch View" href="?display={{- if eq .Display "mosaic" }}list{{ else }}mosaic{{ end }}" class="action">
|
|
<i class="material-icons">{{- if eq .Display "mosaic" }}view_list{{ else }}view_module{{ end }}</i>
|
|
<span>Switch view</span>
|
|
</a>
|
|
|
|
<button aria-label="Select multiple" class="action mobile-only" id="multiple-selection-activate">
|
|
<i class="material-icons">check_circle</i>
|
|
<span>Select</span>
|
|
</button>
|
|
{{- end }}
|
|
|
|
{{- if and (.User.AllowNew) (not .IsEditor) }}
|
|
<button aria-label="Upload" title="Upload" class="action" id="upload">
|
|
<i class="material-icons">file_upload</i>
|
|
<span>Upload</span>
|
|
</button>
|
|
{{- end }}
|
|
|
|
{{- if and .User.AllowEdit (.IsEditor) }}
|
|
<button aria-label="Delete" title="Delete" class="action" id="delete">
|
|
<i class="material-icons">delete</i>
|
|
<span>Delete</span>
|
|
</button>
|
|
{{- end }}
|
|
|
|
<button {{ if .IsDir }}data-dropdown{{ end }} aria-label="Download" title="Download" class="action" id="download">
|
|
{{- if .IsEditor}}<a href="?download=true">{{ end }}
|
|
<i class="material-icons">file_download</i><span>Download</span>
|
|
{{- if .IsEditor}}</a>{{ end }}
|
|
|
|
{{- if not .IsEditor }}
|
|
<ul class="dropdown" id="download-drop">
|
|
<a tabindex="0" aria-label="Download as Zip" data-format="zip" href="?download=zip"><li>zip</li></a>
|
|
<a tabindex="0" aria-label="Download as Tar" data-format="tar" href="?download=tar"><li>tar</li></a>
|
|
<a tabindex="0" aria-label="Download as TarGz" data-format="targz" href="?download=targz"><li>tar.gz</li></a>
|
|
<a tabindex="0" aria-label="Download as TarBz2" data-format="tarbz2" href="?download=tarbz2"><li>tar.bz2</li></a>
|
|
<a tabindex="0" aria-label="Download as TarXz" data-format="tarbz2" href="?download=tarxz"><li>tar.xz</li></a>
|
|
</ul>
|
|
{{- end }}
|
|
</button>
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
{{ define "left-side-actions" }}
|
|
|
|
{{ end }}
|
|
|
|
{{ define "left" }}
|
|
{{- if and (not .IsDir) (.User.AllowEdit) }}
|
|
{{- if .Editor}}
|
|
|
|
{{- if eq .Data.Mode "markdown" }}
|
|
<button aria-label="Preview" class="action" id="preview" onclick="notImplemented(event);">
|
|
<i class="material-icons" title="Preview">remove_red_eye</i>
|
|
</button>
|
|
{{- end }}
|
|
|
|
{{- if eq .Data.Visual true }}
|
|
<button aria-label="Toggle edit source" class="action" id="edit-source">
|
|
<i class="material-icons" title="Toggle edit source">code</i>
|
|
</button>
|
|
{{- end }}
|
|
|
|
{{/* end if editor */}}
|
|
|
|
<button aria-label="Save" class="action" id="save">
|
|
<i class="material-icons" title="Save">save</i>
|
|
</button>
|
|
{{- end }}
|
|
|
|
{{/* end if not dir and AllowEdit */}}
|
|
{{- end }}
|
|
|
|
{{- if and .IsDir .User.AllowEdit }}
|
|
<button aria-label="Edit" class="action" id="rename">
|
|
<i class="material-icons" title="Edit">mode_edit</i>
|
|
<span>Rename</span>
|
|
</button>
|
|
|
|
<button aria-label="Move" class="action" id="move">
|
|
<i class="material-icons" title="Move">forward</i>
|
|
<span>Move file</span>
|
|
</button>
|
|
|
|
<button aria-label="Delete" class="action" id="delete">
|
|
<i class="material-icons" title="Delete">delete</i><span>Delete</span>
|
|
</button>
|
|
{{- end }}
|
|
{{ end }} |