Fixes related to the embed mode.
This commit is contained in:
parent
0b03d75f81
commit
8cc767be90
1 changed files with 10 additions and 9 deletions
|
@ -23,35 +23,36 @@
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{$embed := .Req.URL.Query.embed}}
|
||||||
<main>
|
<main>
|
||||||
<div class="listing">
|
<div class="listing">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<th>
|
<th>
|
||||||
{{- if and (eq .Sort "name") (ne .Order "desc")}}
|
{{- if and (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}}">Name</a>
|
<a href="?sort=name&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Name</a>
|
||||||
{{- else if and (eq .Sort "name") (ne .Order "asc")}}
|
{{- else if and (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}}">Name</a>
|
<a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Name</a>
|
||||||
{{- else}}
|
{{- else}}
|
||||||
<a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}">Name </a>
|
<a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Name </a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
{{- if and (eq .Sort "size") (ne .Order "desc")}}
|
{{- if and (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}}">Size</a>
|
<a href="?sort=size&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Size</a>
|
||||||
{{- else if and (eq .Sort "size") (ne .Order "asc")}}
|
{{- else if and (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}}">Size</a>
|
<a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Size</a>
|
||||||
{{- else}}
|
{{- else}}
|
||||||
<a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}">Size</a>
|
<a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Size</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</th>
|
</th>
|
||||||
<th class="hideable">
|
<th class="hideable">
|
||||||
{{- if and (eq .Sort "time") (ne .Order "desc")}}
|
{{- if and (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}}">Modified</a>
|
<a href="?sort=time&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Modified</a>
|
||||||
{{- else if and (eq .Sort "time") (ne .Order "asc")}}
|
{{- else if and (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}}">Modified</a>
|
<a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Modified</a>
|
||||||
{{- else}}
|
{{- else}}
|
||||||
<a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}">Modified</a>
|
<a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}{{if $embed}}&embed{{end}}">Modified</a>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</th>
|
</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
Loading…
Reference in a new issue