Show creation prompt for non empty folders
This commit is contained in:
@@ -17,6 +17,9 @@
|
|||||||
{{if .SpecialContent}}
|
{{if .SpecialContent}}
|
||||||
<div class="content">{{.SpecialContent}}</div>
|
<div class="content">{{.SpecialContent}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{if not (or .Content .SpecialContent)}}
|
||||||
|
<p class="empty">{{if .Entries}}No page{{else}}Empty folder{{end}} — <a href="?edit">[CREATE]</a></p>
|
||||||
|
{{end}}
|
||||||
{{if .Entries}}
|
{{if .Entries}}
|
||||||
<h2 id="files">Files <button class="btn btn-small" data-companion-reveal hidden title="Open folder in file manager">open</button>{{if .CanEdit}} <button class="btn btn-small" id="view-settings-btn" onclick="openViewSettings()" title="View & sorting" data-view="{{.View}}" data-sort="{{.Sort}}" data-order="{{.Order}}">view</button>{{end}}</h2>
|
<h2 id="files">Files <button class="btn btn-small" data-companion-reveal hidden title="Open folder in file manager">open</button>{{if .CanEdit}} <button class="btn btn-small" id="view-settings-btn" onclick="openViewSettings()" title="View & sorting" data-view="{{.View}}" data-sort="{{.Sort}}" data-order="{{.Order}}">view</button>{{end}}</h2>
|
||||||
{{if eq .View "thumbnail"}}
|
{{if eq .View "thumbnail"}}
|
||||||
@@ -42,10 +45,6 @@
|
|||||||
</table>
|
</table>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .CanEdit}}<script src="/_/page/view-settings.js"></script>{{end}}
|
{{if .CanEdit}}<script src="/_/page/view-settings.js"></script>{{end}}
|
||||||
{{else if not .Content}}
|
|
||||||
{{if not .SpecialContent}}
|
|
||||||
<p class="empty">Empty folder — <a href="?edit">[CREATE]</a></p>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if or .Content .SpecialContent}}
|
{{if or .Content .SpecialContent}}
|
||||||
<script src="/_/page/content.js"></script>
|
<script src="/_/page/content.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user