Skip to content

Commit

Permalink
end of day.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Apr 23, 2024
1 parent c2eff1c commit 22a9132
Show file tree
Hide file tree
Showing 7 changed files with 517 additions and 45 deletions.
1 change: 1 addition & 0 deletions handler/app/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ func artifactTmpls(lock bool, files ...string) []string {
}
return append(files,
GlobTo("artifact_editor.tmpl"),
GlobTo("artifact_editorHtmx.tmpl"),
GlobTo("artifact_editor_table.tmpl"),
GlobTo("artifact_table_switch.tmpl"))
}
Expand Down
1 change: 1 addition & 0 deletions view/app/artifact.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@
</div>
{{- template "artifactJSDOS6" . }}
{{- template "artifactEditor" . }}
{{- template "artifactEditorHtmx" . }}
{{- end}}
472 changes: 472 additions & 0 deletions view/app/artifact_editorHtmx.tmpl

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion view/app/artifact_editor_null.tmpl
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{{- /* artifact_editor_null.tmpl */}}
{{- define "artifactEditor" }}{{end}}
{{- define "artifactEditor" }}{{end}}
{{- define "artifactEditorHtmx" . }}{{end}}
1 change: 1 addition & 0 deletions view/app/artifact_editor_table.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{- define "artifactTableEditor" }}
{{- if eq true (index . "editor")}}
<div class="btn-group w-100 p-3">
<a href="#" data-bs-toggle="modal" data-bs-target="#artifact-editor-modal" class="btn btn-lg btn-dark">Data editor*</a>
<a href="#" data-bs-toggle="modal" data-bs-target="#assetEditorModal" class="btn btn-lg btn-outline-success">File assets editor</a>
<a href="#" data-bs-toggle="modal" data-bs-target="#fileEditorModal" class="btn btn-lg btn-outline-primary">Metadata editor</a>
</div>
Expand Down
46 changes: 21 additions & 25 deletions view/app/layout_editor.tmpl
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
{{- /* layout_editor.tmpl */}}
{{- define "layoutEditor" }}
{{- if eq true (index . "editor")}}
<div class="btn-toolbar me-3">
<button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
Editor
</button>
<ul class="dropdown-menu dropdown-menu-end"><li>
{{/* <h6 class="dropdown-header">Record</h6></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#assetEditorModal">Assets</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#fileEditorModal">Metadata</a></li> */}}
<li><h6 class="dropdown-header">Files</h6></li>
<li><a class="dropdown-item" href="/editor/for-approval">New <em>for approval</em></a></li>
<li><a class="dropdown-item" href="/editor/deletions">List <em>deletions</em></a></li>
<li><a class="dropdown-item" href="/editor/unwanted">List <em>unwanted</em></a></li>
<li><h6 class="dropdown-header">Tools</h6></li>
<!--software, db versions, table sets and env configs-->
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#editorVersion">Software</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#editor">Statistics</a></li>
<li><h6 class="dropdown-header">Batch rename</h6></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#editorVersion">Releasers</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#editorVersion">People</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="/signedout">Sign out</a></li>
</ul>
</div>
{{- end}}
{{- if eq false (index . "editor")}}{{/* render nothing */}}{{end}}
<div class="btn-group me-1">
<button class="btn btn-outline-info btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Site editor
</button>
<ul class="dropdown-menu">
<li><h6 class="dropdown-header">Artifacts</h6></li>
<li><a class="dropdown-item" href="/editor/for-approval">List <em>for approval</em></a></li>
<li><a class="dropdown-item" href="/editor/deletions">List <em>deletions</em></a></li>
<li><a class="dropdown-item" href="/editor/unwanted">List <em>unwanted</em></a></li>
<li><h6 class="dropdown-header">Tools</h6></li>
<!--software, db versions, table sets and env configs-->
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#editorVersion">Software</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#editor">Statistics</a></li>
<li><h6 class="dropdown-header">Batch rename</h6></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#editorVersion">Releasers</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#editorVersion">People</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="/signedout">Sign out</a></li>
</ul>
</div>
{{- end}}
38 changes: 19 additions & 19 deletions view/app/layout_uploader.tmpl
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{{- /* layout_uploader.tmpl */}}
{{- define "layoutUploader" }}
<div class="btn-toolbar d-flex d-none d-lg-block">
<button type="button" class="btn btn-sm btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
Uploader
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li><h6 class="dropdown-header">Submit a production</h6></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-demozoo-modal">Demozoo</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-pouet-modal">Pouët</a></li>
<li><hr class="dropdown-divider"></li>
<li><h6 class="dropdown-header">Upload files</h6></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-intro-modal">Intro, cracktro, bbstro</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-text-modal">Text, ANSI or NFO</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-image-modal">Image or photo</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-magazine-modal">Magazine</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-advanced-modal">Advanced uploader</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-about">About</a></li>
</ul>
</div>
<div class="btn-group">
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Uploader
</button>
<ul class="dropdown-menu">
<li><h6 class="dropdown-header">Submit a production</h6></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-demozoo-modal">Demozoo</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-pouet-modal">Pouët</a></li>
<li><hr class="dropdown-divider"></li>
<li><h6 class="dropdown-header">Upload files</h6></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-intro-modal">Intro, cracktro, bbstro</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-text-modal">Text, ANSI or NFO</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-image-modal">Image or photo</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-magazine-modal">Magazine</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-advanced-modal">Advanced uploader</a></li>
<li><a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#uploader-about">About</a></li>
</ul>
</div>
{{- end}}

0 comments on commit 22a9132

Please sign in to comment.