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.main 0.6.0
parent
1f32b6d25b
commit
ea9641cfb1
@ -1,17 +1,23 @@
|
|||||||
{{ template "header.html" . }}
|
{{ template "header.html" . }}
|
||||||
<div class="column">
|
<div class="ui container">
|
||||||
<div class="ui negative message">
|
<div class="ui negative icon message">
|
||||||
<div class="header.html">You are not authorized to act here!</div>
|
<i class="ban icon "></i>
|
||||||
|
<div class="content">
|
||||||
|
<div class="header">You are not authorized to act here!</div>
|
||||||
<p>If you think this is in error, please contact the administrator.</p>
|
<p>If you think this is in error, please contact the administrator.</p>
|
||||||
<p>If you don't know who that is, it is definitely not an error ;)</p>
|
<p>If you don't know who that is, it is definitely not an error ;)</p>
|
||||||
{{ if .Emails }}
|
{{ if .Emails }}
|
||||||
<p>The following addresses were present in your certificate:<p>
|
<p>The following addresses were present in your certificate:<p>
|
||||||
<ul>
|
<div class="ui list">
|
||||||
{{ range .Emails }}
|
{{ range .Emails }}
|
||||||
<li>{{ . }}</li>
|
<div class="item">
|
||||||
|
<i class="address card outline icon"></i>
|
||||||
|
<div class="content">{{ . }}</div>
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ template "footer.html" . }}
|
{{ template "footer.html" . }}
|
@ -1,12 +1,12 @@
|
|||||||
{{ define "footer.html" }}
|
{{ define "footer.html" }}
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
$('.message .close').on('click', function() {
|
$('.message .close').on('click', function () {
|
||||||
$(this).closest('.message').transition('fade');
|
$(this).closest('.message').transition('fade');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
{{ end }}
|
{{ end }}
|
@ -1,19 +1,20 @@
|
|||||||
{{ template "header.html" . }}
|
{{ template "header.html" . }}
|
||||||
{{ $voter := .Voter }}
|
{{ $voter := .Voter }}
|
||||||
<div class="column">
|
<div class="ui basic segment">
|
||||||
<div class="ui basic segment">
|
<div class="ui secondary pointing menu">
|
||||||
<div class="ui floated right secondary menu">
|
|
||||||
<a href="/motions/" class="item" title="Show all votes">All votes</a>
|
<a href="/motions/" class="item" title="Show all votes">All votes</a>
|
||||||
{{ if $voter }}<a href="/motions/?unvoted=1" class="item" title="Show my outstanding votes">My outstanding votes</a>{{ end }}
|
{{ if $voter }}
|
||||||
|
<a href="/motions/?unvoted=1" class="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>
|
</div>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ with .Decision }}
|
{{ with .Decision }}
|
||||||
<div class="column">
|
|
||||||
<div class="ui raised segment">
|
<div class="ui raised segment">
|
||||||
{{ template "motion_fragment" . }}
|
{{ template "motion_fragment" . }}
|
||||||
{{ if $voter }}{{ template "motion_actions" . }}{{ end }}
|
{{ if $voter }}{{ template "motion_actions" . }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{ end}}
|
{{ end}}
|
||||||
{{ template "footer.html" . }}
|
{{ template "footer.html" . }}
|
@ -1,52 +1,45 @@
|
|||||||
{{ template "header.html" . }}
|
{{ template "header.html" . }}
|
||||||
{{ $voter := .Voter }}
|
{{ $voter := .Voter }}
|
||||||
<div class="column">
|
{{ $page := . }}
|
||||||
<div class="ui basic segment">
|
<div class="ui basic segment">
|
||||||
<div class="ui floated right secondary menu">
|
<div class="ui secondary pointing menu">
|
||||||
|
<a href="/motions/" class="{{ if not .Params.Flags.Unvoted }}active {{ end }}item" title="Show all votes">All
|
||||||
<a href="/motions/" class="{{ if not .Params.Flags.Unvoted }}active {{ end }}item" title="Show all votes">All votes</a>
|
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>{{ end }}
|
{{ if $voter }}
|
||||||
</div>
|
<a href="/motions/?unvoted=1" class="{{ if .Params.Flags.Unvoted }}active {{ end}}item"
|
||||||
{{ if $voter }}<a class="ui primary button" href="/newmotion/">New motion</a>{{ end }}
|
title="Show my outstanding votes">My outstanding votes</a>
|
||||||
{{ if .PrevPage -}}
|
<div class="right item">
|
||||||
<a href="?page={{ .PrevPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}"
|
<a class="ui primary button" href="/newmotion/">New motion</a>
|
||||||
class="ui left labeled icon button" title="newer motions"><i class="left arrow icon"></i> newer</a>
|
</div>
|
||||||
{{- end }}
|
{{ end }}
|
||||||
{{ if .NextPage -}}
|
|
||||||
<a href="?page={{ .NextPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}"
|
|
||||||
class="ui right labeled icon button" title="older motions"><i class="right arrow icon"></i> older</a>
|
|
||||||
{{- end }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ if .Decisions }}
|
{{ if .Decisions }}
|
||||||
|
<div class="ui labeled icon menu">
|
||||||
|
{{ template "pagination_fragment" $page }}
|
||||||
|
</div>
|
||||||
{{ range .Decisions }}
|
{{ range .Decisions }}
|
||||||
<div class="column">
|
|
||||||
<div class="ui raised segment">
|
<div class="ui raised segment">
|
||||||
{{ template "motion_fragment" . }}
|
{{ template "motion_fragment" . }}
|
||||||
{{ if $voter }}{{ template "motion_actions" . }}{{ end }}
|
{{ if $voter }}{{ template "motion_actions" . }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="column">
|
<div class="ui labeled icon menu">
|
||||||
<div class="ui basic segment">
|
{{ template "pagination_fragment" $page }}
|
||||||
{{ if $voter }}<a class="ui primary button" href="/newmotion/">New motion</a>{{ end }}
|
|
||||||
{{ if .PrevPage -}}
|
|
||||||
<a href="?page={{ .PrevPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}"
|
|
||||||
class="ui left labeled icon button" title="newer motions">
|
|
||||||
<i class="left arrow icon"></i> newer</a>
|
|
||||||
{{- end }}
|
|
||||||
{{ if .NextPage -}}
|
|
||||||
<a href="?page={{ .NextPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}"
|
|
||||||
class="ui right labeled icon button" title="older motions">
|
|
||||||
<i class="right arrow icon"></i> older</a>
|
|
||||||
{{- end }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{ else }}
|
{{ 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 }}
|
{{ if .Params.Flags.Unvoted }}
|
||||||
<p>There are no motions requiring a vote from you.</p>
|
<p>There are no motions requiring a vote from you.</p>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<p>There are no motions in the system yet.</p>
|
<p>There are no motions in the system yet.</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ template "footer.html" . }}
|
{{ template "footer.html" . }}
|
@ -0,0 +1,20 @@
|
|||||||
|
{{ define "pagination_fragment" }}
|
||||||
|
{{ if .PrevPage -}}
|
||||||
|
<a class="item" href="?page={{ .PrevPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}">
|
||||||
|
<i class="left arrow icon"></i> newer
|
||||||
|
</a>
|
||||||
|
{{- end }}
|
||||||
|
{{ if .NextPage -}}
|
||||||
|
<a class="right item" href="?page={{ .NextPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}">
|
||||||
|
<i class="right arrow icon"></i> older
|
||||||
|
</a>
|
||||||
|
{{- end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "return_header" }}
|
||||||
|
<div class="ui basic segment">
|
||||||
|
<div class="ui secondary pointing menu">
|
||||||
|
<a href="/motions/" class="item" title="Show all votes">Back to motions</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
@ -1,22 +1,17 @@
|
|||||||
{{ template "header.html" . }}
|
{{ template "header.html" . }}
|
||||||
<div class="column">
|
{{ template "return_header" . }}
|
||||||
<div class="ui basic segment">
|
|
||||||
<div class="ui floated right secondary menu">
|
|
||||||
<a href="/motions/" class="item" title="Show all votes">Back to motions</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{ with .Decision }}
|
{{ with .Decision }}
|
||||||
<div class="column">
|
|
||||||
<div class="ui raised segment">
|
<div class="ui raised segment">
|
||||||
{{ template "motion_fragment" . }}
|
{{ template "motion_fragment" . }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<form action="/motions/{{ .Decision.Tag }}/withdraw" method="post">
|
<div class="ui basic segment">
|
||||||
{{ csrfField }}
|
<form action="/motions/{{ .Decision.Tag }}/withdraw" method="post">
|
||||||
|
{{ csrfField }}
|
||||||
<div class="ui form">
|
<div class="ui form">
|
||||||
<button class="ui primary left labeled icon button" type="submit"><i class="trash icon"></i> Withdraw</button>
|
<button class="ui primary left labeled icon button" type="submit"><i class="trash icon"></i> Withdraw
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
{{ template "footer.html" . }}
|
{{ template "footer.html" . }}
|
Loading…
Reference in New Issue