[9fbddb]: / Allura / allura / templates / neighborhood_admin_accolades.html  Maximize  Restore  History

Download this file

142 lines (133 with data), 5.2 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
{#-
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-#}
{% extends g.theme.master %}
{% block title %}{{neighborhood.name}} / Award Administration{% endblock %}
{% block header %}Award Administration for {{neighborhood.name}}{% endblock %}
{% block content %}
{% if awards_count > 0 %}
<p>
<h3>Current Awards</h3>
<div id="award_list">
<table>
<thead>
<tr>
<th>Icon</th>
<th>Abbreviation</th>
<th>Description</th>
<th>Delete?</th>
</tr>
</thead>
<tbody>
{% for award in awards %}
<tr>
<td>
{% if award.icon %}
<img class="award_icon" src="awards/{{award.url()}}/icon" alt=""/>
{% endif %}
</td>
<td><a href="{{award.longurl()}}">{{award.short}}</a></td>
<td>{{award.full}}</td>
<td>
<form action="{{award.longurl()}}/delete" method="post" onsubmit="return confirm('Continue to delete this award?');">
<input type="submit" value="Delete"/>
{{lib.csrf_token()}}
</form>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</p>
{% endif %}
<h3>Create an Award</h3>
<form enctype="multipart/form-data" method="POST" action="awards/create">
<table>
<thead>
<tr>
<th>Icon</th>
<th>Abbreviation</th>
<th>Description</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="file" id="icon" name="icon" class="text" />
</td>
<td>
<input name="short" type="text"/>
</td>
<td>
<input name="full" type="text"/>
</td>
<td>
<input type="submit" value="Create"/>
</td>
</tr>
</tbody>
</table>
{{lib.csrf_token()}}
</form>
{% if awards_count > 0 %}
<p>
<h3>Grant an Award</h3>
{{ c.award_grant_form.display(action="awards/grant") }}
</p>
{% endif %}
{% if grants_count > 0 %}
<p>
<h3>Current Grants</h3>
<div id="grant_list">
<table>
<thead>
<tr>
<th>Award</th>
<th>Recipient</th>
<th>URL</th>
<th>Comment</th>
<th>Revoke?</th>
</tr>
</thead>
<tbody>
{% for grant in grants %}
<tr>
<td><a href="{{grant.award.longurl()}}">{{grant.award.short}}</a></td>
<td>
{% if grant.granted_to_project %}
<a href="{{grant.granted_to_project.url()}}">{{grant.granted_to_project.shortname}}</a>
{% else %}
Project not found
{% endif %}
</td>
<td><a href="{{grant.award_url}}">{{grant.award_url}}</a></td>
<td>{{grant.comment}}</td>
<td>
{% if grant.granted_to_project %}
<form action="{{grant.longurl()}}/revoke" method="post" onsubmit="return confirm('Continue to revoke this award?');">
<input type="submit" value="Revoke"/>
{{lib.csrf_token()}}
</form>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</p>
{% endif %}
{% endblock %}