3 |
3 |
{% load astakos_tags %}
|
4 |
4 |
{% load filters %}
|
5 |
5 |
|
6 |
|
{% block page.body %}
|
|
6 |
{% block page.body %}
|
7 |
7 |
<div class="maincol {% block innerpage.class %}{% endblock %}">
|
8 |
8 |
<div class="projects">
|
9 |
9 |
<h2>PROJECTS</h2>
|
... | ... | |
17 |
17 |
</div>
|
18 |
18 |
</form>
|
19 |
19 |
{% else %}
|
|
20 |
|
20 |
21 |
<div class="two-cols clearfix">
|
21 |
22 |
<div class="rt">
|
22 |
23 |
|
... | ... | |
58 |
59 |
{% with page_obj.object_list as object_list %}
|
59 |
60 |
<!-- Search project -->
|
60 |
61 |
{% if is_search %}
|
61 |
|
<div>
|
62 |
|
{% comment %}
|
63 |
|
<form method="GET" class="minimal" action="#searchResults">
|
64 |
|
<div class="form-row">
|
65 |
|
<select name="sorting" onchange="this.form.submit();" class="dropkicked" tabindex="1">
|
66 |
|
<option value="name">Sort by Name</option>
|
67 |
|
<option value="issue_date" {% if sorting == 'issue_date' %}selected{% endif %}>Sort by Issue date</option>
|
68 |
|
<option value="start_date" {% if sorting == 'start_date' %}selected{% endif %}>Sort by Start Date</option>
|
69 |
|
<option value="end_date" {% if sorting == 'end_date' %}selected{% endif %}>Sort by End Date</option>
|
70 |
|
<!-- <option value="approved_members_num" {% if sorting == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> -->
|
71 |
|
<option value="state" {% if sorting == 'state' %}selected{% endif %}>Sort by Status</option>
|
72 |
|
<option value="member_join_policy__description" {% if sorting == 'member_join_policy__description' %}selected{% endif %}>Sort by Member Join Policy</option>
|
73 |
|
<option value="member_leave_policy__description" {% if sorting == 'member_leave_policy__description' %}selected{% endif %}>Sort by Member Leave Policy</option>
|
74 |
|
</select>
|
75 |
|
<input type="hidden" name="q" value="{{q}}"/>
|
76 |
|
</div>
|
77 |
|
</form>
|
78 |
|
{% endcomment %}
|
|
62 |
|
|
63 |
{% if object_list %}
|
|
64 |
<div>
|
79 |
65 |
<table class="alt-style complex" id="searchResults">
|
80 |
66 |
<caption>
|
81 |
67 |
{% if q %}SEARCH RESULTS{% else %}ALL PROJECTS{% endif %}
|
... | ... | |
101 |
87 |
{% with o.project.members.all as members %}
|
102 |
88 |
{% with o.project.approved_members as approved_members%}
|
103 |
89 |
<tr class="{% cycle 'tr1' 'tr2' %}">
|
104 |
|
<td style="width:22%"><a href="{% url project_detail o.id %}" title="visit project page">{{o.name|truncatename}}</a></td>
|
|
90 |
<td><a href="{% url project_detail o.id %}" title="visit project page">{{o.name|truncatename}}</a></td>
|
105 |
91 |
<!--td>{{o.kindname|capfirst}}</td-->
|
106 |
|
<td style="width:13%">{{o.issue_date|date:"d/m/Y"}}</td>
|
107 |
|
<td style="width:13%">{{o.start_date|date:"d/m/Y"}}</td>
|
108 |
|
<td style="width:13%">{{o.end_date|date:"d/m/Y"}}</td>
|
109 |
|
<td style="width:11%">{{approved_members|length}}</td>
|
110 |
|
<td style="width:11%">
|
|
92 |
<td>{{o.issue_date|date:"d/m/Y"}}</td>
|
|
93 |
<td>{{o.start_date|date:"d/m/Y"}}</td>
|
|
94 |
<td>{{o.end_date|date:"d/m/Y"}}</td>
|
|
95 |
<td>{{approved_members|length}}</td>
|
|
96 |
<td>
|
111 |
97 |
{{o.state}}
|
112 |
98 |
</td>
|
113 |
99 |
<td>{% if o.state != 'Replaced' %}<a href="{% url project_update o.id %}">Update</a>{% endif %}</td>
|
114 |
|
<td style="width:17%">
|
|
100 |
<td>
|
115 |
101 |
<div class="msg-wrap">
|
116 |
102 |
{% if user == o.owner %}
|
117 |
103 |
Owner
|
... | ... | |
128 |
114 |
{% endif %}
|
129 |
115 |
</div>
|
130 |
116 |
</td>
|
131 |
|
<td style="width:15%">
|
|
117 |
<td>
|
132 |
118 |
<div class="msg-wrap">
|
133 |
119 |
|
134 |
120 |
{% if user in members %}
|
... | ... | |
150 |
136 |
|
151 |
137 |
{% endif %}
|
152 |
138 |
{% else %}
|
153 |
|
{% if o.project.is_alive %}
|
|
139 |
{% if o.project.is_alive and not user == o.owner %}
|
154 |
140 |
<form action="{% url project_join o.id %}?next={{request.path}}" method="post" class="link-like">{% csrf_token %}
|
155 |
141 |
<input type="submit" value="+ join group" class="join_group join" />
|
156 |
142 |
</form>
|
... | ... | |
165 |
151 |
{% endif %}
|
166 |
152 |
</div>
|
167 |
153 |
</td>
|
168 |
|
<td class="centered" style="width:9%">{{o.member_join_policy}}</td>
|
169 |
|
<td class="centered" style="width:9%">{{o.member_leave_policy}}</td>
|
|
154 |
<td class="centered">{{o.member_join_policy}}</td>
|
|
155 |
<td class="centered">{{o.member_leave_policy}}</td>
|
170 |
156 |
<!--td><a href="#" class="more-info" title="more info">+ more info</a></td-->
|
171 |
157 |
</tr>
|
172 |
158 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none">
|
173 |
|
<td colspan="7" class="info-td">
|
|
159 |
<td colspan="11" class="info-td">
|
174 |
160 |
<div>
|
175 |
161 |
<p>{{o.desc}}</p>
|
176 |
162 |
<p>{% if o.homepage%}
|
... | ... | |
209 |
195 |
</span>
|
210 |
196 |
</p>
|
211 |
197 |
</div>
|
|
198 |
|
|
199 |
{% endif %}
|
|
200 |
|
212 |
201 |
<!-- Group listing -->
|
213 |
202 |
{% else %}
|
214 |
203 |
{% if not form %}
|
... | ... | |
217 |
206 |
{% with o.project.members as members %}
|
218 |
207 |
{% with o.project.approved_members as approved_members %}
|
219 |
208 |
<div>
|
220 |
|
{% comment %}
|
221 |
|
<form method="GET" class="minimal" action="#allGroups" id="mygroups">
|
222 |
|
<div class="form-row">
|
223 |
|
<select name="sorting" class="dropkicked" tabindex="1">
|
224 |
|
<option value="name">Sort by Name</option>
|
225 |
|
<option value="issue_date" {% if sorting == 'issue_date' %}selected{% endif %}>Sort by Issue date</option>
|
226 |
|
<option value="start_date" {% if sorting == 'start_date' %}selected{% endif %}>Sort by Start Date</option>
|
227 |
|
<option value="end_date" {% if sorting == 'expiration_date' %}selected{% endif %}>Sort by Expiration Date</option>
|
228 |
|
<!-- <option value="approved_members_num" {% if sorting == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> -->
|
229 |
|
<option value="state" {% if sorting == 'state' %}selected{% endif %}>Sort by Status</option>
|
230 |
|
<option value="member_join_policy__description" {% if sorting == 'member_join_policy__description' %}selected{% endif %}>Sort by Member Join Policy</option>
|
231 |
|
<option value="member_leave_policy__description" {% if sorting == 'member_leave_policy__description' %}selected{% endif %}>Sort by Member Leave Policy</option>
|
232 |
|
</select>
|
233 |
|
</div>
|
234 |
|
</form>
|
235 |
|
{% endcomment %}
|
|
209 |
|
236 |
210 |
<table class="alt-style complex" id="allGroups">
|
237 |
211 |
<caption>MY PROJECTS</caption>
|
238 |
212 |
<thead>
|
... | ... | |
254 |
228 |
<tbody>
|
255 |
229 |
{% for o in object_list %}
|
256 |
230 |
<tr class="{% cycle 'tr1' 'tr2' %}">
|
257 |
|
<td style="width:22%"><a href="{% url project_detail o.id %}" title="visit group page">{{o.name|truncatename }}</a></td>
|
258 |
|
<!--td>{{o.kindname|capfirst}}</td-->
|
259 |
|
<td style="width:13%">{{o.issue_date|date:"d/m/Y"}}</td>
|
260 |
|
<td style="width:13%">{{o.start_date|date:"d/m/Y"}}</td>
|
261 |
|
<td style="width:13%">{{o.end_date|date:"d/m/Y"}}</td>
|
262 |
|
<td style="width:11%">{{approved_members|length}}</td>
|
263 |
|
<td style="width:11%">
|
|
231 |
<td><a href="{% url project_detail o.id %}" title="visit group page">{{o.name|truncatename }}</a></td>
|
|
232 |
<td>{{o.issue_date|date:"d/m/Y"}}</td>
|
|
233 |
<td>{{o.start_date|date:"d/m/Y"}}</td>
|
|
234 |
<td>{{o.end_date|date:"d/m/Y"}}</td>
|
|
235 |
<td>{{approved_members|length}}</td>
|
|
236 |
<td>
|
264 |
237 |
{{o.state}}
|
265 |
238 |
</td>
|
266 |
239 |
<td>{% if o.state != 'Replaced' %}<a href="{% url project_update o.id %}">Update</a>{% endif %}</td>
|
267 |
|
<td style="width:17%">
|
268 |
|
<div class="msg-wrap">
|
269 |
|
{% if user == o.owner %}
|
270 |
|
Owner
|
271 |
|
{% else %}
|
272 |
|
{% if not user in members %}
|
273 |
|
Not member
|
274 |
|
{% else %}
|
275 |
|
{% if user in approved_members %}
|
276 |
|
Registered
|
277 |
|
{% else %}
|
278 |
|
Activation pending
|
279 |
|
{% endif %}
|
280 |
|
{% endif %}
|
281 |
|
{% endif %}
|
282 |
|
</div>
|
283 |
|
</td>
|
284 |
|
<td style="width:15%">
|
285 |
|
<div class="msg-wrap">
|
286 |
|
|
287 |
|
{% if user in members %}
|
288 |
|
{% if user in approved_members %}
|
289 |
|
{% if not user == o.owner %}
|
290 |
|
<form action="{% url project_leave o.id %}?next={{request.path}}" method="post" class="link-like">{% csrf_token %}
|
291 |
|
<input type="submit" value="x leave group" class="leave"/>
|
292 |
|
</form>
|
293 |
|
<div class="dialog">
|
294 |
|
Are you sure you what to leave this project?<br>
|
295 |
|
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.name}}</a><br>
|
296 |
|
{% if o.description %}Description:{{o.description|truncatewords:30}}{% endif %}<br><br>
|
297 |
|
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a>
|
298 |
|
</div>
|
299 |
|
{% else %}
|
300 |
|
|
301 |
|
{% endif %}
|
|
240 |
<td>
|
|
241 |
|
|
242 |
{% if user == o.owner %}
|
|
243 |
Owner
|
302 |
244 |
{% else %}
|
303 |
|
|
304 |
|
{% endif %}
|
305 |
|
{% else %}
|
306 |
|
{% if o.project.is_alive %}
|
307 |
|
<form action="{% url project_join o.id %}?next={{request.path}}" method="post" class="link-like">{% csrf_token %}
|
308 |
|
<input type="submit" value="+ join group" class="join_group join" />
|
309 |
|
</form>
|
310 |
|
<div class="dialog">
|
311 |
|
Are you sure you what to join this project?<br>
|
312 |
|
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.name}}</a><br>
|
313 |
|
{% if o.description %}Description:{{o.description|truncatewords:30}}{% endif %}<br><br>
|
314 |
|
|
315 |
|
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a>
|
316 |
|
</div>
|
|
245 |
{% if not user in members %}
|
|
246 |
Not member
|
|
247 |
{% else %}
|
|
248 |
{% if user in approved_members %}
|
|
249 |
Registered
|
|
250 |
{% else %}
|
|
251 |
Activation pending
|
|
252 |
{% endif %}
|
|
253 |
{% endif %}
|
317 |
254 |
{% endif %}
|
318 |
|
{% endif %}
|
319 |
|
</div>
|
320 |
|
</td>
|
321 |
|
<td class="centered" style="width:9%">{{o.member_join_policy}}</td>
|
322 |
|
<td class="centered" style="width:9%">{{o.member_leave_policy}}</td>
|
323 |
|
<!-- <td><a href="#" class="more-info" title="more info">+ more info </a></td>-->
|
|
255 |
|
|
256 |
</td>
|
|
257 |
<td>
|
|
258 |
<div class="msg-wrap">
|
|
259 |
|
|
260 |
{% if user in members %}
|
|
261 |
{% if user in approved_members %}
|
|
262 |
{% if not user == o.owner %}
|
|
263 |
<form action="{% url project_leave o.id %}?next={{request.path}}" method="post" class="link-like">{% csrf_token %}
|
|
264 |
<input type="submit" value="x leave group" class="leave"/>
|
|
265 |
</form>
|
|
266 |
<div class="dialog">
|
|
267 |
Are you sure you what to leave this project?<br>
|
|
268 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.name}}</a><br>
|
|
269 |
{% if o.description %}Description:{{o.description|truncatewords:30}}{% endif %}<br><br>
|
|
270 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a>
|
|
271 |
</div>
|
|
272 |
{% else %}
|
|
273 |
|
|
274 |
{% endif %}
|
|
275 |
{% else %}
|
|
276 |
|
|
277 |
{% endif %}
|
|
278 |
{% else %}
|
|
279 |
{% if o.project.is_alive and not user == o.owner %}
|
|
280 |
<form action="{% url project_join o.id %}?next={{request.path}}" method="post" class="link-like">{% csrf_token %}
|
|
281 |
<input type="submit" value="+ join group" class="join_group join" />
|
|
282 |
</form>
|
|
283 |
<div class="dialog">
|
|
284 |
Are you sure you what to join this project?<br>
|
|
285 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.name}}</a><br>
|
|
286 |
{% if o.description %}Description:{{o.description|truncatewords:30}}{% endif %}<br><br>
|
|
287 |
|
|
288 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a>
|
|
289 |
</div>
|
|
290 |
{% endif %}
|
|
291 |
{% endif %}
|
|
292 |
</div>
|
|
293 |
</td>
|
|
294 |
<td class="centered" >{{o.member_join_policy}}</td>
|
|
295 |
<td class="centered">{{o.member_leave_policy}}</td>
|
|
296 |
<!-- <td><a href="#" class="more-info" title="more info">+ more info </a></td>-->
|
324 |
297 |
</tr>
|
325 |
298 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none">
|
326 |
|
<td colspan="8" class="info-td">
|
|
299 |
<td colspan="11" class="info-td">
|
327 |
300 |
<div>
|
328 |
301 |
<p>{{o.description}}</p>
|
329 |
302 |
<p>{% if o.homepage%}
|