mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-08 10:44:46 -04:00
fileserver: Add sort buttons in grid mode (#7089)
Some checks failed
Tests / test (./cmd/caddy/caddy, ~1.24.1, ubuntu-latest, 0, 1.24, linux) (push) Failing after 2m30s
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Has been skipped
Cross-Build / build (~1.24.1, 1.24, aix) (push) Successful in 1m19s
Cross-Build / build (~1.24.1, 1.24, darwin) (push) Successful in 1m18s
Cross-Build / build (~1.24.1, 1.24, dragonfly) (push) Successful in 1m19s
Cross-Build / build (~1.24.1, 1.24, freebsd) (push) Successful in 1m22s
Cross-Build / build (~1.24.1, 1.24, illumos) (push) Successful in 1m18s
Cross-Build / build (~1.24.1, 1.24, linux) (push) Successful in 1m18s
Cross-Build / build (~1.24.1, 1.24, netbsd) (push) Successful in 1m17s
Cross-Build / build (~1.24.1, 1.24, openbsd) (push) Successful in 1m16s
Cross-Build / build (~1.24.1, 1.24, solaris) (push) Successful in 1m18s
Cross-Build / build (~1.24.1, 1.24, windows) (push) Successful in 1m21s
Lint / lint (ubuntu-latest, linux) (push) Successful in 2m13s
Lint / govulncheck (push) Successful in 1m36s
Lint / dependency-review (push) Failing after 53s
Tests / test (./cmd/caddy/caddy, ~1.24.1, macos-14, 0, 1.24, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.24.1, windows-latest, True, 1.24, windows) (push) Has been cancelled
Lint / lint (macos-14, mac) (push) Has been cancelled
Lint / lint (windows-latest, windows) (push) Has been cancelled
OpenSSF Scorecard supply-chain security / Scorecard analysis (push) Has started running
Some checks failed
Tests / test (./cmd/caddy/caddy, ~1.24.1, ubuntu-latest, 0, 1.24, linux) (push) Failing after 2m30s
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Has been skipped
Cross-Build / build (~1.24.1, 1.24, aix) (push) Successful in 1m19s
Cross-Build / build (~1.24.1, 1.24, darwin) (push) Successful in 1m18s
Cross-Build / build (~1.24.1, 1.24, dragonfly) (push) Successful in 1m19s
Cross-Build / build (~1.24.1, 1.24, freebsd) (push) Successful in 1m22s
Cross-Build / build (~1.24.1, 1.24, illumos) (push) Successful in 1m18s
Cross-Build / build (~1.24.1, 1.24, linux) (push) Successful in 1m18s
Cross-Build / build (~1.24.1, 1.24, netbsd) (push) Successful in 1m17s
Cross-Build / build (~1.24.1, 1.24, openbsd) (push) Successful in 1m16s
Cross-Build / build (~1.24.1, 1.24, solaris) (push) Successful in 1m18s
Cross-Build / build (~1.24.1, 1.24, windows) (push) Successful in 1m21s
Lint / lint (ubuntu-latest, linux) (push) Successful in 2m13s
Lint / govulncheck (push) Successful in 1m36s
Lint / dependency-review (push) Failing after 53s
Tests / test (./cmd/caddy/caddy, ~1.24.1, macos-14, 0, 1.24, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.24.1, windows-latest, True, 1.24, windows) (push) Has been cancelled
Lint / lint (macos-14, mac) (push) Has been cancelled
Lint / lint (windows-latest, windows) (push) Has been cancelled
OpenSSF Scorecard supply-chain security / Scorecard analysis (push) Has started running
* [ADD] sort buttons in grid mode * [CHANGE] replace spaces with tabs
This commit is contained in:
parent
070d454c0d
commit
3b4d966fba
@ -828,6 +828,96 @@ footer {
|
||||
</svg>
|
||||
Grid
|
||||
</a>
|
||||
{{- if and (eq .Layout "grid") (eq .Sort "name") (ne .Order "asc")}}
|
||||
<a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<text x="2" y="10" font-size="9" fill="currentColor">Z</text>
|
||||
<text x="2" y="20" font-size="9" fill="currentColor">A</text>
|
||||
<path d="M13 4v12"></path>
|
||||
<path d="M12 16l1 2l1 -2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- else if and (eq .Layout "grid") (eq .Sort "name") (ne .Order "desc")}}
|
||||
<a href="?sort=name&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<text x="2" y="10" font-size="9" fill="currentColor">A</text>
|
||||
<text x="2" y="20" font-size="9" fill="currentColor">Z</text>
|
||||
<path d="M13 4v12"></path>
|
||||
<path d="M12 16l1 2l1 -2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- else if and (eq .Layout "grid")}}
|
||||
<a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<text x="2" y="20" font-size="9" fill="currentColor">A</text>
|
||||
<text x="2" y="10" font-size="9" fill="currentColor">Z</text>
|
||||
<path d="M13 4v12"></path>
|
||||
<path d="M12 16l1 2l1 -2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- end}}
|
||||
{{- if and (eq .Layout "grid") (eq .Sort "size") (ne .Order "asc")}}
|
||||
<a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="2" y="4" width="4" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<rect x="2" y="16" width="12" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<path d="M18 4v12"></path>
|
||||
<path d="M17 16l1 2l1 -2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- else if and (eq .Layout "grid") (eq .Sort "size") (ne .Order "desc")}}
|
||||
<a href="?sort=size&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="2" y="4" width="12" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<rect x="2" y="16" width="4" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<path d="M18 4v12"></path>
|
||||
<path d="M17 16l1 2l1 -2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- else if and (eq .Layout "grid")}}
|
||||
<a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="2" y="4" width="4" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<rect x="2" y="16" width="12" height="3" rx="0.4" ry="0.4"></rect>
|
||||
<path d="M18 4v12"></path>
|
||||
<path d="M17 16l1 2l1 -2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- end}}
|
||||
{{- if and (eq .Layout "grid") (eq .Sort "time") (ne .Order "asc")}}
|
||||
<a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="11" r="8"></circle>
|
||||
<line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line>
|
||||
<line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line>
|
||||
<path d="M20 4v12"></path>
|
||||
<path d="M19 16l1 2l1 -2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- else if and (eq .Layout "grid") (eq .Sort "time") (ne .Order "desc")}}
|
||||
<a href="?sort=time&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="11" r="8"></circle>
|
||||
<line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line>
|
||||
<line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line>
|
||||
<path d="M20 4v12"></path>
|
||||
<path d="M19 5l1 -2l1 2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- else if and (eq .Layout "grid")}}
|
||||
<a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="11" r="8"></circle>
|
||||
<line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line>
|
||||
<line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line>
|
||||
<path d="M20 4v12"></path>
|
||||
<path d="M19 16l1 2l1 -2"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{- end}}
|
||||
</div>
|
||||
<div class='listing{{if eq .Layout "grid"}} grid{{end}}'>
|
||||
{{- if eq .Layout "grid"}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user