Revision ccab6eb5 snf-astakos-app/astakos/im/templates/im/projects/project_list.html
b/snf-astakos-app/astakos/im/templates/im/projects/project_list.html | ||
---|---|---|
67 | 67 |
<option value="definition__end_date" {% if sorting == 'definition__end_date' %}selected{% endif %}>Sort by End Date</option> |
68 | 68 |
<!-- <option value="approved_members_num" {% if sorting == 'approved_members_num' %}selected{% endif %}>Sort by Participants</option> --> |
69 | 69 |
<!-- <option value="status" {% if sorting == '' %}selected{% endif %}>Sort by Member Accept Policy</option> --> |
70 |
<option value="definition__member_accept_policy" {% if sorting == 'definition__member_accept_policy' %}selected{% endif %}>Sort by Member Accept Policy</option>
|
|
71 |
<option value="definition__member_reject_policy" {% if sorting == 'definition__member_reject_policy' %}selected{% endif %}>Sort by Member Reject Policy</option>
|
|
70 |
<option value="definition__member_join_policy__description" {% if sorting == 'definition__member_join_policy__description' %}selected{% endif %}>Sort by Member Join Policy</option>
|
|
71 |
<option value="definition__member_leave_policy__description" {% if sorting == 'definition__member_leave_policy__description' %}selected{% endif %}>Sort by Member Leave Policy</option>
|
|
72 | 72 |
</select> |
73 | 73 |
<input type="hidden" name="q" value="{{q}}"/> |
74 | 74 |
</div> |
... | ... | |
96 | 96 |
</thead> |
97 | 97 |
<tbody> |
98 | 98 |
{% for o in object_list %} |
99 |
{% with o.project.members as members %} |
|
99 |
{% with o.project.members.all as members %}
|
|
100 | 100 |
{% with o.project.approved_members as approved_members%} |
101 | 101 |
<tr class="{% cycle 'tr1' 'tr2' %}"> |
102 |
<td style="width:22%"><a href="{% url project_detail o.serial %}" title="visit group page">{{o.definition.name|truncatename}}</a></td>
|
|
102 |
<td style="width:22%"><a href="{% url project_detail o.id %}" title="visit group page">{{o.definition.name|truncatename}}</a></td>
|
|
103 | 103 |
<!--td>{{o.kindname|capfirst}}</td--> |
104 | 104 |
<td style="width:13%">{{o.issue_date|date:"d/m/Y"}}</td> |
105 | 105 |
<td style="width:13%">{{o.definition.start_date|date:"d/m/Y"}}</td> |
106 | 106 |
<td style="width:13%">{{o.definition.end_date|date:"d/m/Y"}}</td> |
107 | 107 |
<td style="width:11%">{{approved_members|length}}</td> |
108 | 108 |
<td style="width:11%"> |
109 |
{{o.status}} <a href="{% url project_update o.serial %}">Update</a>
|
|
109 |
{{o.status}} <a href="{% url project_update o.id %}">Update</a>
|
|
110 | 110 |
</td> |
111 | 111 |
<td style="width:17%"> |
112 | 112 |
<div class="msg-wrap"> |
... | ... | |
131 | 131 |
{% if user in members %} |
132 | 132 |
{% if user in approved_members %} |
133 | 133 |
{% if not user == o.owner %} |
134 |
<form action="{% url project_leave o.serial %}" method="post" class="link-like">{% csrf_token %}
|
|
134 |
<form action="{% url project_leave o.id %}" method="post" class="link-like">{% csrf_token %}
|
|
135 | 135 |
<input type="submit" value="x leave group" class="leave"/> |
136 | 136 |
</form> |
137 | 137 |
<div class="dialog"> |
138 | 138 |
Are you sure you what to leave this group?<br> |
139 |
Name: <a href="{% url project_detail o.serial %}" title="visit group page">{{o.groupname}}</a><br>
|
|
139 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.groupname}}</a><br>
|
|
140 | 140 |
{% if o.definition.description %}Description:{{o.definition.description|truncatewords:30}}{% endif %}<br><br> |
141 | 141 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
142 | 142 |
</div> |
... | ... | |
148 | 148 |
{% endif %} |
149 | 149 |
{% else %} |
150 | 150 |
{% if o.project.is_alive %} |
151 |
<form action="{% url project_join o.serial %}" method="post" class="link-like">{% csrf_token %}
|
|
151 |
<form action="{% url project_join o.id %}" method="post" class="link-like">{% csrf_token %}
|
|
152 | 152 |
<input type="submit" value="+ join group" class="join_group join" /> |
153 | 153 |
</form> |
154 | 154 |
<div class="dialog"> |
155 | 155 |
Are you sure you what to join this group?<br> |
156 |
Name: <a href="{% url project_detail o.serial %}" title="visit group page">{{o.groupname}}</a><br>
|
|
156 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.groupname}}</a><br>
|
|
157 | 157 |
{% if o.definition.description %}Description:{{o.definition.description|truncatewords:30}}{% endif %}<br><br> |
158 | 158 |
|
159 | 159 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
... | ... | |
162 | 162 |
{% endif %} |
163 | 163 |
</div> |
164 | 164 |
</td> |
165 |
<td class="centered" style="width:9%">{{o.definition.member_accept_policy}}</td>
|
|
166 |
<td class="centered" style="width:9%">{{o.definition.member_reject_policy}}</td>
|
|
165 |
<td class="centered" style="width:9%">{{o.definition.member_join_policy}}</td>
|
|
166 |
<td class="centered" style="width:9%">{{o.definition.member_leave_policy}}</td>
|
|
167 | 167 |
<!--td><a href="#" class="more-info" title="more info">+ more info</a></td--> |
168 | 168 |
</tr> |
169 | 169 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none"> |
... | ... | |
244 | 244 |
<tbody> |
245 | 245 |
{% for o in page_obj.object_list %} |
246 | 246 |
<tr class="{% cycle 'tr1' 'tr2' %}"> |
247 |
<td style="width:22%"><a href="{% url project_detail o.serial %}" title="visit group page">{{o.definition.name|truncatename }}</a></td>
|
|
247 |
<td style="width:22%"><a href="{% url project_detail o.id %}" title="visit group page">{{o.definition.name|truncatename }}</a></td>
|
|
248 | 248 |
<!--td>{{o.kindname|capfirst}}</td--> |
249 | 249 |
<td style="width:13%">{{o.issue_date|date:"d/m/Y"}}</td> |
250 | 250 |
<td style="width:13%">{{o.definition.start_date|date:"d/m/Y"}}</td> |
... | ... | |
285 | 285 |
{% if o.is_active %} |
286 | 286 |
{% if user in approved_members %} |
287 | 287 |
|
288 |
<form action="{% url project_leave o.serial %}" method="post" class="link-like">{% csrf_token %}
|
|
288 |
<form action="{% url project_leave o.id %}" method="post" class="link-like">{% csrf_token %}
|
|
289 | 289 |
<input type="submit" value="x leave" class="leave" /> |
290 | 290 |
</form> |
291 | 291 |
<div class="dialog"> |
292 | 292 |
Are you sure you want to leave this group?<br> |
293 |
Name: <a href="{% url project_detail o.serial %}" title="visit group page">{{o.groupname}}</a><br>
|
|
293 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.groupname}}</a><br>
|
|
294 | 294 |
{% if o.definition.description %}Description:{{o.definition.description|truncatewords:30}}{% endif %}<br><br> |
295 | 295 |
|
296 | 296 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
Also available in: Unified diff