configui/templates/components/menu.tmpl

51 lines
1.3 KiB
Cheetah
Raw Normal View History

2021-10-19 09:28:38 +00:00
{{define "components/menu"}}
<section class="is-large">
<aside class="menu">
<p class="menu-label">
Files
</p>
<ul class="menu-list">
{{ range .Files }}
<li>
<a class="has-tooltip-arrow {{if eq $.File.Name .Name }}is-active{{end}}"
data-tooltip="{{.Path}}"
2021-10-24 07:06:02 +00:00
href="{{$.BaseUrl}}?name={{.Name}}"
>{{ .Name }}</a>
</li>
2021-10-19 09:28:38 +00:00
{{ end }}
</ul>
2021-11-15 04:33:28 +00:00
{{if .Onitachi}}
2021-11-12 15:09:32 +00:00
<p class="menu-label">
2021-11-15 04:33:28 +00:00
Programs
2021-11-12 15:09:32 +00:00
</p>
<ul class="menu-list">
2021-11-15 04:33:28 +00:00
{{- range $key, $value := .Onitachi -}}
2021-11-12 15:09:32 +00:00
<li>
2021-11-15 04:33:28 +00:00
<a class="has-tooltip-arrow" data-tooltip="{{$value.Cmd}}" href="{{$.BaseUrl}}program?name={{.Name}}">
<div class="level">
<span>{{$key}}</span>
<div class="tags has-addons">
<span class="tag">State</span>
<span class="tag {{$value.State|state_class}}">{{$value.State}}</span>
</div>
</div>
2021-11-12 15:09:32 +00:00
</a>
</li>
{{- end -}}
</ul>
2021-11-15 04:33:28 +00:00
{{end}}
{{if not .HideConfig}}
2021-10-19 09:28:38 +00:00
<p class="menu-label">
System
2021-10-19 09:28:38 +00:00
</p>
<ul class="menu-list">
<li>
<a class="has-tooltip-arrow {{if eq .File.Name .AppName }}is-active{{end}}"
data-tooltip="Configuration"
2021-10-24 07:06:02 +00:00
href="{{.BaseUrl}}"
>Config</a></li>
2021-10-19 09:28:38 +00:00
</ul>
{{end}}
2021-10-19 09:28:38 +00:00
</aside>
</section>
{{end}}