root / snf-astakos-app / astakos / im / templates / im / astakosgroup_list.html @ 0a63687f
History | View | Annotate | Download (16.4 kB)
1 |
{% extends "im/account_base.html" %} |
---|---|
2 |
|
3 |
{% load filters %} |
4 |
|
5 |
{% block page.body %} |
6 |
<div class="maincol {% block innerpage.class %}{% endblock %}"> |
7 |
<div class="projects"> |
8 |
<h2>PROJECTS</h2> |
9 |
{% if form %} |
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 %} |
12 |
{% include "im/form_render.html" %} |
13 |
<div class="form-row submit"> |
14 |
<input type="submit" class="submit altcol" value="SEARCH" /> |
15 |
{% if q %}<a href="{% url group_all %}">clear</a>{% endif %} |
16 |
</div>
|
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 |
{% else %} |
26 |
<div class="two-cols clearfix"> |
27 |
<div class="rt"> |
28 |
|
29 |
</div>
|
30 |
<div class="lt"> |
31 |
<p>~okeanos gives the opportunity to Greek Academic or Research Organizations/Institutions/Faculty to run their own projects remotely on virtual infrastructure. Simple, fast and with minimal to no cost at all.</p> |
32 |
<p><a href="{% url how_it_works %}" style="font-size:1.154em;">How it works ></a></p> |
33 |
</div>
|
34 |
</div>
|
35 |
|
36 |
|
37 |
<div class="widjets"> |
38 |
<!--<a href="#" class="widjet-x" title="remove boxes">X</a>-->
|
39 |
<ul class="clearfix"> |
40 |
<li class="create"> |
41 |
<div>
|
42 |
<div class="wrap"> |
43 |
|
44 |
<p class="centered"><a href="{% url group_add 'project' %}"><img alt="THINK ABOUT IT" src="/static/im/images/create.png"></a></p> |
45 |
<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>-->
|
48 |
</div>
|
49 |
</div>
|
50 |
</li>
|
51 |
<li class="join"> |
52 |
<div>
|
53 |
<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> |
55 |
<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 |
|
57 |
<p><a href="{% url group_all %}">join a project ></a></p> |
58 |
</div>
|
59 |
</div>
|
60 |
</li>
|
61 |
</ul>
|
62 |
</div>
|
63 |
|
64 |
{% endif %} |
65 |
{% with page_obj.object_list as object_list %} |
66 |
<!-- Search group -->
|
67 |
{% if object_list %} |
68 |
<div class="full-dotted"> |
69 |
<form method="GET" class="minimal" action="#searchResults"> |
70 |
<div class="form-row"> |
71 |
<select name="sorting" onchange="this.form.submit();" class="dropkicked" tabindex="1"> |
72 |
<option value="groupname">Sort by Name</option> |
73 |
<option value="issue_date" {% if == 'issue_date' %}selected{% endif %}>Sort by Issue date</option> |
74 |
<option value="expiration_date" {% if == 'expiration_date' %}selected{% endif %}>Sort by Expiration Date</option> |
75 |
<option value="approved_members_num" {% if == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> |
76 |
<option value="moderation_enabled" {% if == 'moderation_enabled' %}selected{% endif %}>Sort by Moderation</option> |
77 |
</select>
|
78 |
<input type="hidden" name="q" value="{{q}}"/> |
79 |
</div>
|
80 |
</form>
|
81 |
<table class="alt-style complex" id="searchResults"> |
82 |
<caption>
|
83 |
{% if q %}SEARCH RESULTS{% else %}ALL PROJECTS{% endif %} |
84 |
</caption>
|
85 |
<thead>
|
86 |
<tr>
|
87 |
<th>Name</th> |
88 |
<!--<th>Type</th>-->
|
89 |
<th>Start date</th> |
90 |
<th>End date</th> |
91 |
|
92 |
<th>Members</th> |
93 |
|
94 |
|
95 |
<th>Status</th> |
96 |
<th> </th> |
97 |
<th>Moderated</th> |
98 |
<!-- <th> </th>-->
|
99 |
|
100 |
</tr>
|
101 |
</thead>
|
102 |
<tbody>
|
103 |
{% for o in object_list %} |
104 |
<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> |
106 |
<!--td>{{o.kindname|capfirst}}</td-->
|
107 |
<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> |
110 |
|
111 |
<td style="width:17%"> |
112 |
<div class="msg-wrap"> |
113 |
|
114 |
{% if o.is_member %} |
115 |
{% if o.membership_approval_date %} |
116 |
|
117 |
|
118 |
{% if not o.is_owner %} |
119 |
Registered |
120 |
|
121 |
{% else %} |
122 |
Owner |
123 |
{% endif %} |
124 |
|
125 |
|
126 |
|
127 |
{% else %} |
128 |
Activation pending |
129 |
{% endif %} |
130 |
{% else %} |
131 |
Not member |
132 |
|
133 |
|
134 |
{% endif %} |
135 |
</div>
|
136 |
</td>
|
137 |
<td style="width:15%"> |
138 |
<div class="msg-wrap"> |
139 |
|
140 |
{% if o.is_member %} |
141 |
{% if o.membership_approval_date %} |
142 |
|
143 |
|
144 |
{% if not o.is_owner %} |
145 |
|
146 |
<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %} |
147 |
<input type="submit" value="x leave group" class="leave"/> |
148 |
</form>
|
149 |
<div class="dialog"> |
150 |
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> |
153 |
|
154 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
155 |
</div>
|
156 |
{% else %} |
157 |
|
158 |
{% endif %} |
159 |
|
160 |
|
161 |
|
162 |
{% else %} |
163 |
|
164 |
{% endif %} |
165 |
{% else %} |
166 |
|
167 |
<form action="{% url group_join o.id %}" method="post" class="link-like">{% csrf_token %} |
168 |
<input type="submit" value="+ join group" class="join_group join" /> |
169 |
</form>
|
170 |
<div class="dialog"> |
171 |
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> |
174 |
|
175 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
176 |
</div>
|
177 |
|
178 |
{% endif %} |
179 |
</div>
|
180 |
</td>
|
181 |
<td class="centered" style="width:9%">{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td> |
182 |
<!--td><a href="#" class="more-info" title="more info">+ more info</a></td-->
|
183 |
</tr>
|
184 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none"> |
185 |
<td colspan="7" class="info-td"> |
186 |
<div>
|
187 |
<p>{{o.desc}}</p> |
188 |
<p>{% if o.homepage%}
|
189 |
Group's home page: <a target="_blank" href="{{ o.homepage }}">{{ o.homepage }}</a> |
190 |
|
191 |
{% endif %} |
192 |
</p>
|
193 |
</div>
|
194 |
</td>
|
195 |
</tr>
|
196 |
{% endfor %} |
197 |
</tbody>
|
198 |
</table>
|
199 |
|
200 |
</div>
|
201 |
|
202 |
|
203 |
<div class="pagination"> |
204 |
<p class="next-prev"> |
205 |
{% if page_obj.has_previous %} |
206 |
<a href="?page={{ page_obj.previous_page_number }}{% if q %}&q={{q}}{% endif %}{% if sorting %}&sorting={{sorting}}{% endif %}">< previous</a> |
207 |
{% else %} |
208 |
<a href="javascript:void()" class="disabled">< previous</a> |
209 |
{% endif %} |
210 |
{% if page_obj.has_next %} |
211 |
<a href="?page={{ page_obj.next_page_number }}{% if q %}&q={{q}}{% endif %}{% if sorting %}&sorting={{sorting}}{% endif %}">next ></a> |
212 |
{% else %} |
213 |
<a href="javascript:void()" class="disabled">next ></a> |
214 |
{% endif %} |
215 |
</p>
|
216 |
<p class="nums"> |
217 |
<span class="current"> |
218 |
Page {{ page_obj.number }} of {{ paginator.num_pages }} |
219 |
</span>
|
220 |
</p>
|
221 |
</div>
|
222 |
<!-- Group listing -->
|
223 |
{% else %} |
224 |
{% if not form %} |
225 |
{% with page|concat:sorting as args %} |
226 |
{% with q|paginate:args as page_obj %} |
227 |
{% if page_obj.object_list %} |
228 |
<div>
|
229 |
<form method="GET" class="minimal" action="#allGroups" id="mygroups"> |
230 |
<div class="form-row"> |
231 |
<select name="sorting" class="dropkicked" tabindex="1"> |
232 |
<option value="groupname">Sort by Name</option> |
233 |
<!--<option value="kindname" {% if sorting == 'kindname' %}selected{% endif %}>Type</option>-->
|
234 |
<option value="issue_date" {% if == 'issue_date' %}selected{% endif %}>Sort by Issue date</option> |
235 |
<option value="expiration_date" {% if == 'expiration_date' %}selected{% endif %}>Sort by Expiration Date</option> |
236 |
<option value="approved_members_num" {% if == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> |
237 |
<option value="moderation_enabled" {% if == 'moderation_enabled' %}selected{% endif %}>Sort by Moderation</option> |
238 |
</select>
|
239 |
</div>
|
240 |
</form>
|
241 |
<table class="alt-style complex" id="allGroups"> |
242 |
<caption>MY PROJECTS</caption> |
243 |
<thead>
|
244 |
<tr>
|
245 |
<th>Name</th> |
246 |
<!--th>Type</th-->
|
247 |
<th>Start date</th> |
248 |
<th>End date</th> |
249 |
<th>Members</th> |
250 |
<th>Status</th> |
251 |
<th> </th> |
252 |
<th class="centered">Moderated</th> |
253 |
<!-- <th> </th>-->
|
254 |
|
255 |
</tr>
|
256 |
</thead>
|
257 |
<tbody>
|
258 |
{% for o in page_obj.object_list %} |
259 |
<tr class="{% cycle 'tr1' 'tr2' %}"> |
260 |
<td style="width:22%"><a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|truncatename }}</a></td> |
261 |
<!--td>{{o.kindname|capfirst}}</td-->
|
262 |
<td style="width:13%">{{o.issue_date|date:"d/m/Y"}}</td> |
263 |
<td style="width:13%">{{o.expiration_date|date:"d/m/Y"}}</td> |
264 |
<td style="width:11%">{{ o.approved_members_num }}</td> |
265 |
<td style="width:17%"> |
266 |
<div class="msg-wrap"> |
267 |
{% if user.email = o.groupowner %} |
268 |
{% if o.is_enabled %} |
269 |
Active (Owner) |
270 |
{% else %} |
271 |
Pending |
272 |
{% endif %} |
273 |
{% else %} |
274 |
{% if o.is_enabled %} |
275 |
{% if o.membership_status %} |
276 |
Registered |
277 |
|
278 |
{% else %} |
279 |
Activation Pending |
280 |
{% endif %} |
281 |
{% else %} |
282 |
- |
283 |
{% endif %} |
284 |
{% endif %} |
285 |
|
286 |
</div>
|
287 |
</td>
|
288 |
<td style="width:15%"> |
289 |
<div class="msg-wrap"> |
290 |
{% if user.email = o.groupowner %} |
291 |
{% if o.is_enabled %} |
292 |
|
293 |
{% else %} |
294 |
|
295 |
{% endif %} |
296 |
{% else %} |
297 |
{% if o.is_enabled %} |
298 |
{% if o.membership_status %} |
299 |
|
300 |
<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %} |
301 |
<input type="submit" value="x leave" class="leave" /> |
302 |
</form>
|
303 |
<div class="dialog"> |
304 |
Are you sure you what to leave this group?<br>
|
305 |
Name: <a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname}}</a><br> |
306 |
{% if o.desc %}Description:{{o.desc|truncatewords:30}}{% endif %}<br><br> |
307 |
|
308 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
309 |
</div>
|
310 |
{% else %} |
311 |
|
312 |
{% endif %} |
313 |
{% else %} |
314 |
|
315 |
{% endif %} |
316 |
{% endif %} |
317 |
|
318 |
</div>
|
319 |
</td>
|
320 |
<td class="centered" style="width:9%">{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td> |
321 |
<!-- <td><a href="#" class="more-info" title="more info">+ more info </a></td>-->
|
322 |
</tr>
|
323 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none"> |
324 |
<td colspan="8" class="info-td"> |
325 |
<div>
|
326 |
<p>{{o.desc}}</p> |
327 |
<p>{% if o.homepage%}
|
328 |
Group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a> |
329 |
{% endif %} |
330 |
</p>
|
331 |
</div>
|
332 |
</td>
|
333 |
</tr>
|
334 |
{% endfor %} |
335 |
</tbody>
|
336 |
</table>
|
337 |
</div>
|
338 |
<div class="pagination"> |
339 |
<p class="next-prev"> |
340 |
{% if page_obj.has_previous %} |
341 |
<a href="?page={{ page_obj.previous_page_number }}{% if sorting %}&sorting={{ sorting }}{% endif%}#allGroups">< previous</a> |
342 |
{% else %} |
343 |
<a href="javascript:void()" class="disabled">< previous</a> |
344 |
{% endif %} |
345 |
{% if page_obj.has_next %} |
346 |
<a href="?page={{ page_obj.next_page_number }}{% if sorting %}&sorting={{ sorting }}{% endif%}#allGroups">next ></a> |
347 |
{% else %} |
348 |
<a href="javascript:void()" class="disabled">next ></a> |
349 |
{% endif %} |
350 |
</p>
|
351 |
<p class="nums"> |
352 |
<span class="current"> |
353 |
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }} |
354 |
</span>
|
355 |
</p>
|
356 |
</div>
|
357 |
{% endif %} |
358 |
{% endwith %} |
359 |
{% endwith %} |
360 |
{% endif %} |
361 |
{% if form %} |
362 |
{% if q %} |
363 |
<h2>No projects found!</h2> |
364 |
{% endif %} |
365 |
{% endif %} |
366 |
{% endif %} |
367 |
{% endwith %} |
368 |
</div>
|
369 |
</div>
|
370 |
{% endblock %} |