cacert-boardvoting/boardvoting/templates/motions.html
Jan Dittberner ea9641cfb1 Refine HTML layout
This commit improves the page structure and unifies the layout. Some
reusable parts of the HTML code have been moved into
page_fragments.html.
2019-08-03 01:39:55 +02:00

45 lines
No EOL
1.6 KiB
HTML

{{ template "header.html" . }}
{{ $voter := .Voter }}
{{ $page := . }}
<div class="ui basic segment">
<div class="ui secondary pointing menu">
<a href="/motions/" class="{{ if not .Params.Flags.Unvoted }}active {{ end }}item" title="Show all votes">All
votes</a>
{{ if $voter }}
<a href="/motions/?unvoted=1" class="{{ if .Params.Flags.Unvoted }}active {{ end}}item"
title="Show my outstanding votes">My outstanding votes</a>
<div class="right item">
<a class="ui primary button" href="/newmotion/">New motion</a>
</div>
{{ end }}
</div>
</div>
{{ if .Decisions }}
<div class="ui labeled icon menu">
{{ template "pagination_fragment" $page }}
</div>
{{ range .Decisions }}
<div class="ui raised segment">
{{ template "motion_fragment" . }}
{{ if $voter }}{{ template "motion_actions" . }}{{ end }}
</div>
{{ end }}
<div class="ui labeled icon menu">
{{ template "pagination_fragment" $page }}
</div>
{{ else }}
<div class="ui basic segment">
<div class="ui icon message">
<i class="inbox icon"></i>
<div class="content">
<div class="header">No motions available</div>
{{ if .Params.Flags.Unvoted }}
<p>There are no motions requiring a vote from you.</p>
{{ else }}
<p>There are no motions in the system yet.</p>
{{ end }}
</div>
</div>
</div>
{{ end }}
{{ template "footer.html" . }}