Parent: [c4c87a] (diff)

Child: [0d6290] (diff)

Download this file

neighborhood_admin_accolades.html    150 lines (140 with data), 4.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{% extends g.theme.master %}
{% block title %}{{neighborhood.name}} / Award Administration{% endblock %}
{% block header %}Award Administration for {{neighborhood.name}}{% endblock %}
{% block nav_menu %}
{% include 'jinja_master/neigh_nav_menu.html' %}
{% endblock %}
{% block top_nav %}
{% include 'jinja_master/neigh_top_nav.html' %}
{% endblock %}
{% block content %}
{% if awards_count > 0 %}
<p>
<a href="awards/"><h3>Current Awards</h3></a>
<div id="award_list">
<table border="1">
<thead>
<tr>
<th>Icon</th>
<th>Abbreviation</th>
<th>Description</th>
<th>Delete?</th>
</tr>
</thead>
<tbody>
{% for award in awards %}
<tr>
<td>
<py:if test="award.icon">
<img class="award_icon" src="awards/{{award.url()}}/icon"/>
</py:if>
</td>
<td><a href="{{award.longurl()}}">{{award.short}}</a></td>
<td>{{award.full}}</td>
<td><a href="{{award.longurl()}}/delete">[X]</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</p>
{% endif %}
<h3>Create an Award</h3>
<form enctype="multipart/form-data" method="POST" action="awards/create">
<table border="1">
<thead>
<tr>
<th>Icon</th>
<th>Abbreviation</th>
<th>Description</th>
<th/>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="file" id="icon" name="icon" class="text" />
</td>
<td>
<input name="short"/>
</td>
<td>
<input name="full"/>
</td>
<td>
<input type="submit" value="Create"/>
</td>
</tr>
</tbody>
</table>
</form>
{% macro neighborhood_project_select(n, projects) %}
<optgroup label="{{n.name}}">
{% for p in projects %}
<option value="{{p.name}}">{{p.name}}</option>
{% endfor %}
</optgroup>
{% endmacro %}
{% if awards_count > 0 %}
<p>
<h3>Grant an Award</h3>
<form method="POST" action="awards/grant">
<table border="1">
<thead>
<tr>
<th>Award</th>
<th>Recipient</th>
<th/>
</tr>
</thead>
<tbody>
<tr>
<td>
<select name="grant">
{% for assign in assigns %}
<option value="{{assign.short}}">{{assign.short}}</option>
{% endfor %}
</select>
</td>
<td>
<select name="recipient">
{% for n, projects in neigh_projects %}
{{neighborhood_project_select(n, projects)}}
{% endfor %}
</select>
</td>
<td>
<input type="submit" value="Grant"/>
</td>
</tr>
</tbody>
</table>
</form>
</p>
{% endif %}
{% if grants_count > 0 %}
<p py:if="">
<h3>Current Grants</h3>
<div id="grant_list">
<table border="1">
<thead>
<tr>
<th>Award</th>
<th>Recipient</th>
<th>Delete?</th>
</tr>
</thead>
<tbody>
{% for grant in grants %}
<tr>
<td><a href="{{grant.longurl()}}">{{grant.award.short}}</a></td>
<td><a href="{{grant.granted_to_project.url()}}">{{grant.granted_to_project.shortname}}</a></td>
<td><a href="{{grant.longurl()}}/revoke">[X]</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</p>
{% endif %}
{% endblock %}