Revision 71a38edf snf-astakos-app/astakos/im/templates/im/projects/project_list.html
b/snf-astakos-app/astakos/im/templates/im/projects/project_list.html | ||
---|---|---|
8 | 8 |
<h2>PROJECTS</h2> |
9 | 9 |
{% if form %} |
10 | 10 |
<p>Search for existing Projects and join the ones you like. Please search by Project name. </p> |
11 |
<form action="{% url group_search %}" method="post" class="withlabels signup submit-inline">{% csrf_token %}
|
|
11 |
<form action="{% url project_search %}" method="post" class="withlabels signup submit-inline">{% csrf_token %}
|
|
12 | 12 |
{% include "im/form_render.html" %} |
13 | 13 |
<div class="form-row submit"> |
14 | 14 |
<input type="submit" class="submit altcol" value="SEARCH" /> |
15 |
{% if q %}<a href="{% url group_all %}">clear</a>{% endif %}
|
|
15 |
{% if q %}<a href="{% url project_all %}">clear</a>{% endif %}
|
|
16 | 16 |
</div> |
17 | 17 |
</form> |
18 |
|
|
19 |
<!--<form action="{% url group_all %}" method="post" class="link-like alone">{% csrf_token %} |
|
20 |
<div class="form-row submit"> |
|
21 |
<input type="submit" class="submit altcol" value="clear" /> |
|
22 |
</div> |
|
23 |
</form> |
|
24 |
<--> |
|
25 | 18 |
{% else %} |
26 | 19 |
<div class="two-cols clearfix"> |
27 | 20 |
<div class="rt"> |
... | ... | |
41 | 34 |
<div> |
42 | 35 |
<div class="wrap"> |
43 | 36 |
|
44 |
<p class="centered"><a href="{% url group_add 'project' %}"><img alt="THINK ABOUT IT" src="/static/im/images/create.png"></a></p>
|
|
37 |
<p class="centered"><a href="{% url project_add %}"><img alt="THINK ABOUT IT" src="/static/im/images/create.png"></a></p>
|
|
45 | 38 |
<p class="txt">Create a new Project in seconds. Specify how many members it will have, which and how many virtual resources it will provide to its members. Describe its purpose. Submit your request and if accepted, you and your colleagues are ready to deploy!<br><br> </p> |
46 |
<p><a href="{% url group_add 'project' %}">create a project ></a></p> |
|
47 |
<!--<p class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>--> |
|
39 |
<p><a href="{% url project_add %}">create a project ></a></p> |
|
48 | 40 |
</div> |
49 | 41 |
</div> |
50 | 42 |
</li> |
51 | 43 |
<li class="join"> |
52 | 44 |
<div> |
53 | 45 |
<div class="wrap"> |
54 |
<p class="centered"><a href="{% url group_all %}"><img alt="THINK ABOUT IT" src="/static/im/images/join.png"></a></p>
|
|
46 |
<p class="centered"><a href="{% url project_all %}"><img alt="THINK ABOUT IT" src="/static/im/images/join.png"></a></p>
|
|
55 | 47 |
<p class="txt">Become a member of an existing Project and instantly gain access to the resources it has to offer you. Search for open Projects and join for free. Contact the closed Projects administrators, if you think they will accept you. In two words: try to Join now. </p> |
56 | 48 |
|
57 |
<p><a href="{% url group_all %}">join a project ></a></p>
|
|
49 |
<p><a href="{% url project_all %}">join a project ></a></p>
|
|
58 | 50 |
</div> |
59 | 51 |
</div> |
60 | 52 |
</li> |
... | ... | |
69 | 61 |
<form method="GET" class="minimal" action="#searchResults"> |
70 | 62 |
<div class="form-row"> |
71 | 63 |
<select name="sorting" onchange="this.form.submit();" class="dropkicked" tabindex="1"> |
72 |
<option value="groupname">Sort by Name</option>
|
|
64 |
<option value="definition__name">Sort by Name</option>
|
|
73 | 65 |
<option value="issue_date" {% if sorting == 'issue_date' %}selected{% endif %}>Sort by Issue date</option> |
74 |
<option value="expiration_date" {% if sorting == 'expiration_date' %}selected{% endif %}>Sort by Expiration Date</option> |
|
75 |
<option value="approved_members_num" {% if sorting == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> |
|
76 |
<option value="moderation_enabled" {% if sorting == 'moderation_enabled' %}selected{% endif %}>Sort by Moderation</option> |
|
66 |
<option value="definition__start_date" {% if sorting == 'definition__start_date' %}selected{% endif %}>Sort by Start Date</option> |
|
67 |
<option value="definition__end_date" {% if sorting == 'definition__end_date' %}selected{% endif %}>Sort by End Date</option> |
|
68 |
<!-- <option value="approved_members_num" {% if sorting == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> --> |
|
69 |
<option value="definition__member_accept_policy" {% if sorting == 'definition__member_accept_policy' %}selected{% endif %}>Sort by Moderation</option> |
|
77 | 70 |
</select> |
78 | 71 |
<input type="hidden" name="q" value="{{q}}"/> |
79 | 72 |
</div> |
... | ... | |
87 | 80 |
<th>Name</th> |
88 | 81 |
<!--<th>Type</th>--> |
89 | 82 |
<th>Issued</th> |
83 |
<th>Starts</th> |
|
90 | 84 |
<th>Expires</th> |
91 | 85 |
|
92 | 86 |
<th>Enrolled</th> |
... | ... | |
100 | 94 |
</tr> |
101 | 95 |
</thead> |
102 | 96 |
<tbody> |
103 |
{% for o in object_list %} |
|
97 |
{% for o in object_list %} |
|
98 |
{% with o.project.members as members %} |
|
99 |
{% with o.project.approved_members as approved_members%} |
|
104 | 100 |
<tr class="{% cycle 'tr1' 'tr2' %}"> |
105 |
<td style="width:22%"><a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|truncatename}}</a></td>
|
|
101 |
<td style="width:22%"><a href="{% url project_detail o.serial %}" title="visit group page">{{o.definition.name|truncatename}}</a></td>
|
|
106 | 102 |
<!--td>{{o.kindname|capfirst}}</td--> |
107 | 103 |
<td style="width:13%">{{o.issue_date|date:"d/m/Y"}}</td> |
108 |
<td style="width:13%">{{o.expiration_date|date:"d/m/Y"}}</td> |
|
109 |
<td style="width:11%">{{o.approved_members_num}}</td> |
|
104 |
<td style="width:13%">{{o.definition.start_date|date:"d/m/Y"}}</td> |
|
105 |
<td style="width:13%">{{o.definition.end_date|date:"d/m/Y"}}</td> |
|
106 |
<td style="width:11%">{{approved_members|length}}</td> |
|
110 | 107 |
|
111 | 108 |
<td style="width:17%"> |
112 | 109 |
<div class="msg-wrap"> |
113 | 110 |
|
114 |
{% if o.is_member %}
|
|
115 |
{% if o.membership_approval_date %}
|
|
111 |
{% if user in members %}
|
|
112 |
{% if user in approved_members %}
|
|
116 | 113 |
|
117 | 114 |
|
118 |
{% if not o.is_owner %}
|
|
115 |
{% if not user == o.owner %}
|
|
119 | 116 |
Registered |
120 | 117 |
|
121 | 118 |
{% else %} |
... | ... | |
137 | 134 |
<td style="width:15%"> |
138 | 135 |
<div class="msg-wrap"> |
139 | 136 |
|
140 |
{% if o.is_member %}
|
|
141 |
{% if o.membership_approval_date %}
|
|
137 |
{% if user in members %}
|
|
138 |
{% if user in approved_members %}
|
|
142 | 139 |
|
143 | 140 |
|
144 |
{% if not o.is_owner %}
|
|
141 |
{% if not user == o.owner %}
|
|
145 | 142 |
|
146 |
<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
|
|
143 |
<form action="{% url project_leave o.serial %}" method="post" class="link-like">{% csrf_token %}
|
|
147 | 144 |
<input type="submit" value="x leave group" class="leave"/> |
148 | 145 |
</form> |
149 | 146 |
<div class="dialog"> |
150 | 147 |
Are you sure you what to leave this group?<br> |
151 |
Name: <a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname}}</a><br>
|
|
152 |
{% if o.desc %}Description:{{o.desc|truncatewords:30}}{% endif %}<br><br>
|
|
148 |
Name: <a href="{% url project_detail o.serial %}" title="visit group page">{{o.groupname}}</a><br>
|
|
149 |
{% if o.definition.description %}Description:{{o.definition.description|truncatewords:30}}{% endif %}<br><br>
|
|
153 | 150 |
|
154 | 151 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
155 | 152 |
</div> |
... | ... | |
164 | 161 |
{% endif %} |
165 | 162 |
{% else %} |
166 | 163 |
|
167 |
<form action="{% url group_join o.id %}" method="post" class="link-like">{% csrf_token %}
|
|
164 |
<form action="{% url project_join o.serial %}" method="post" class="link-like">{% csrf_token %}
|
|
168 | 165 |
<input type="submit" value="+ join group" class="join_group join" /> |
169 | 166 |
</form> |
170 | 167 |
<div class="dialog"> |
171 | 168 |
Are you sure you what to join this group?<br> |
172 |
Name: <a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname}}</a><br>
|
|
173 |
{% if o.desc %}Description:{{o.desc|truncatewords:30}}{% endif %}<br><br>
|
|
169 |
Name: <a href="{% url project_detail o.serial %}" title="visit group page">{{o.groupname}}</a><br>
|
|
170 |
{% if o.definition.description %}Description:{{o.definition.description|truncatewords:30}}{% endif %}<br><br>
|
|
174 | 171 |
|
175 | 172 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
176 | 173 |
</div> |
... | ... | |
185 | 182 |
<td colspan="7" class="info-td"> |
186 | 183 |
<div> |
187 | 184 |
<p>{{o.desc}}</p> |
188 |
<p>{% if o.homepage%} |
|
189 |
Group's home page: <a target="_blank" href="{{ o.homepage }}">{{ o.homepage }}</a>
|
|
185 |
<p>{% if o.definition.homepage%}
|
|
186 |
Project's home page: <a target="_blank" href="{{ o.homepage }}">{{ o.definition.homepage }}</a>
|
|
190 | 187 |
|
191 | 188 |
{% endif %} |
192 | 189 |
</p> |
193 | 190 |
</div> |
194 | 191 |
</td> |
195 | 192 |
</tr> |
193 |
{% endwith %} |
|
194 |
{% endwith %} |
|
196 | 195 |
{% endfor %} |
197 | 196 |
</tbody> |
198 | 197 |
</table> |
... | ... | |
221 | 220 |
{% with page|concat:sorting as args %} |
222 | 221 |
{% with q|paginate:args as page_obj %} |
223 | 222 |
{% if page_obj.object_list %} |
223 |
{% with o.project.members as members %} |
|
224 |
{% with o.project.approved_members as approved_members %} |
|
224 | 225 |
<div> |
225 | 226 |
<form method="GET" class="minimal" action="#allGroups" id="mygroups"> |
226 | 227 |
<div class="form-row"> |
227 | 228 |
<select name="sorting" class="dropkicked" tabindex="1"> |
228 |
<option value="groupname">Sort by Name</option>
|
|
229 |
<option value="definition__name">Sort by Name</option>
|
|
229 | 230 |
<!--<option value="kindname" {% if sorting == 'kindname' %}selected{% endif %}>Type</option>--> |
230 |
<option value="issue_date" {% if sorting == 'issue_date' %}selected{% endif %}>Sort by Issue date</option> |
|
231 |
<option value="expiration_date" {% if sorting == 'expiration_date' %}selected{% endif %}>Sort by Expiration Date</option> |
|
232 |
<option value="approved_members_num" {% if sorting == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> |
|
233 |
<option value="moderation_enabled" {% if sorting == 'moderation_enabled' %}selected{% endif %}>Sort by Moderation</option> |
|
231 |
<option value="definition__start_date" {% if sorting == 'definition__start_date' %}selected{% endif %}>Sort by Start Date</option> |
|
232 |
<option value="definition__issue_date" {% if sorting == 'definition__issue_date' %}selected{% endif %}>Sort by Issue date</option> |
|
233 |
<option value="definition__expiration_date" {% if sorting == 'definition__expiration_date' %}selected{% endif %}>Sort by Expiration Date</option> |
|
234 |
<!-- <option value="approved_members_num" {% if sorting == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> --> |
|
235 |
<option value="definition__moderation_enabled" {% if sorting == 'definition__moderation_enabled' %}selected{% endif %}>Sort by Moderation</option> |
|
234 | 236 |
</select> |
235 | 237 |
</div> |
236 | 238 |
</form> |
... | ... | |
241 | 243 |
<th>Name</th> |
242 | 244 |
<!--th>Type</th--> |
243 | 245 |
<th>Issued</th> |
246 |
<th>Starts</th> |
|
244 | 247 |
<th>Expires</th> |
245 | 248 |
<th>Enrolled</th> |
246 | 249 |
<th>Status</th> |
... | ... | |
253 | 256 |
<tbody> |
254 | 257 |
{% for o in page_obj.object_list %} |
255 | 258 |
<tr class="{% cycle 'tr1' 'tr2' %}"> |
256 |
<td style="width:22%"><a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|truncatename }}</a></td>
|
|
259 |
<td style="width:22%"><a href="{% url project_detail o.serial %}" title="visit group page">{{o.definition.name|truncatename }}</a></td>
|
|
257 | 260 |
<!--td>{{o.kindname|capfirst}}</td--> |
258 | 261 |
<td style="width:13%">{{o.issue_date|date:"d/m/Y"}}</td> |
259 |
<td style="width:13%">{{o.expiration_date|date:"d/m/Y"}}</td> |
|
260 |
<td style="width:11%">{{ o.approved_members_num }}</td> |
|
262 |
<td style="width:13%">{{o.definition.start_date|date:"d/m/Y"}}</td> |
|
263 |
<td style="width:13%">{{o.definition.end_date|date:"d/m/Y"}}</td> |
|
264 |
<td style="width:11%">{{approved_members|length}}</td> |
|
261 | 265 |
<td style="width:17%"> |
262 | 266 |
<div class="msg-wrap"> |
263 |
{% if user.email = o.groupowner %}
|
|
264 |
{% if o.is_enabled %}
|
|
267 |
{% if user == o.owner %}
|
|
268 |
{% if o.is_active %}
|
|
265 | 269 |
Active (Owner) |
266 | 270 |
{% else %} |
267 | 271 |
Pending |
268 | 272 |
{% endif %} |
269 | 273 |
{% else %} |
270 |
{% if o.is_enabled %}
|
|
271 |
{% if o.membership_status %}
|
|
274 |
{% if o.is_active %}
|
|
275 |
{% if user in members %}
|
|
272 | 276 |
Registered |
273 | 277 |
|
274 | 278 |
{% else %} |
... | ... | |
283 | 287 |
</td> |
284 | 288 |
<td style="width:15%"> |
285 | 289 |
<div class="msg-wrap"> |
286 |
{% if user.email = o.groupowner %}
|
|
287 |
{% if o.is_enabled %}
|
|
290 |
{% if user == o.owner %}
|
|
291 |
{% if o.is_active %}
|
|
288 | 292 |
|
289 | 293 |
{% else %} |
290 | 294 |
|
291 | 295 |
{% endif %} |
292 | 296 |
{% else %} |
293 |
{% if o.is_enabled %}
|
|
294 |
{% if o.membership_status %}
|
|
297 |
{% if o.is_active %}
|
|
298 |
{% if user in approved_members %}
|
|
295 | 299 |
|
296 |
<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
|
|
300 |
<form action="{% url project_leave o.serial %}" method="post" class="link-like">{% csrf_token %}
|
|
297 | 301 |
<input type="submit" value="x leave" class="leave" /> |
298 | 302 |
</form> |
299 | 303 |
<div class="dialog"> |
300 |
Are you sure you what to leave this group?<br>
|
|
301 |
Name: <a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname}}</a><br>
|
|
302 |
{% if o.desc %}Description:{{o.desc|truncatewords:30}}{% endif %}<br><br>
|
|
304 |
Are you sure you want to leave this group?<br>
|
|
305 |
Name: <a href="{% url project_detail o.serial %}" title="visit group page">{{o.groupname}}</a><br>
|
|
306 |
{% if o.definition.description %}Description:{{o.definition.description|truncatewords:30}}{% endif %}<br><br>
|
|
303 | 307 |
|
304 | 308 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
305 | 309 |
</div> |
... | ... | |
313 | 317 |
|
314 | 318 |
</div> |
315 | 319 |
</td> |
316 |
<td class="centered" style="width:9%">{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td> |
|
317 | 320 |
<!-- <td><a href="#" class="more-info" title="more info">+ more info </a></td>--> |
318 | 321 |
</tr> |
319 | 322 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none"> |
320 | 323 |
<td colspan="8" class="info-td"> |
321 | 324 |
<div> |
322 |
<p>{{o.desc}}</p>
|
|
323 |
<p>{% if o.homepage%} |
|
324 |
Group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a>
|
|
325 |
<p>{{o.definition.description}}</p>
|
|
326 |
<p>{% if o.definition.homepage%}
|
|
327 |
Project's home page: <a href="{{ o.definition.homepage }}">{{ o.definition.homepage }}</a>
|
|
325 | 328 |
{% endif %} |
326 | 329 |
</p> |
327 | 330 |
</div> |
... | ... | |
346 | 349 |
</span> |
347 | 350 |
</p> |
348 | 351 |
</div> |
352 |
{% endwith %} |
|
353 |
{% endwith %} |
|
349 | 354 |
{% endif %} |
350 | 355 |
{% endwith %} |
351 | 356 |
{% endwith %} |
Also available in: Unified diff