44 lines
952 B
Cheetah
44 lines
952 B
Cheetah
|
{{ define "Title" }}{{ or .Prefix "Řady" }}{{ end }}
|
||
|
{{ define "Content" }}
|
||
|
|
||
|
{{ if .Prefix }}
|
||
|
<h2>{{ .Prefix }}</h2>
|
||
|
|
||
|
{{ if .Description }}
|
||
|
<p>{{ .Description }}
|
||
|
{{ end }}
|
||
|
{{ else }}
|
||
|
|
||
|
<section>
|
||
|
<form method=post action="/series">
|
||
|
<header>
|
||
|
<h3>Nová řada</h3>
|
||
|
<input type=text name=prefix placeholder="Prefix řady">
|
||
|
<input type=text name=description placeholder="Popis řady"
|
||
|
><input type=submit value="Uložit">
|
||
|
</form>
|
||
|
</header>
|
||
|
</form>
|
||
|
</section>
|
||
|
|
||
|
{{ range $prefix, $desc := .AllSeries }}
|
||
|
<section>
|
||
|
<header>
|
||
|
<h3><a href="/series?prefix={{ $prefix }}">{{ $prefix }}</a></h3>
|
||
|
<form method=post action="/series?prefix={{ $prefix }}">
|
||
|
<input type=text name=description value="{{ $desc }}"
|
||
|
><input type=submit value="Uložit">
|
||
|
</form>
|
||
|
<form method=post action="/series?prefix={{ $prefix }}&remove">
|
||
|
<input type=submit value="Odstranit">
|
||
|
</form>
|
||
|
</header>
|
||
|
</section>
|
||
|
{{ else }}
|
||
|
<p>Nejsou žádné řady.
|
||
|
{{ end }}
|
||
|
|
||
|
{{ end }}
|
||
|
|
||
|
{{ end }}
|