Revision 595dde70
b/snf-astakos-app/astakos/im/forms.py | ||
---|---|---|
918 | 918 |
help_text=" The Project's name should be in a domain format. The domain shouldn't neccessarily exist in the real world but is helpful to imply a structure. e.g.: myproject.mylab.ntua.gr or myservice.myteam.myorganization " |
919 | 919 |
) |
920 | 920 |
homepage = forms.URLField( |
921 |
label="Homepage Url", |
|
921 | 922 |
help_text="This should be a URL pointing at your project's site. e.g.: http://myproject.com ", |
922 | 923 |
widget=forms.TextInput(attrs={'placeholder': 'http://myproject.com'}), |
923 | 924 |
|
b/snf-astakos-app/astakos/im/static/im/css/modules.css | ||
---|---|---|
379 | 379 |
|
380 | 380 |
/* quotas-form */ |
381 | 381 |
|
382 |
.quotas-form fieldset { background:url(../images/dots.jpg) repeat-x scroll center bottom transparent; margin-bottom:3em; padding-bottom:3em; position:relative; } |
|
382 |
.quotas-form fieldset { background:url(../images/dots.jpg) repeat-x scroll center bottom transparent; margin-bottom:3em; padding-bottom:5em; position:relative; } |
|
383 |
.quotas-form fieldset#icons { padding-bottom:3em; } |
|
383 | 384 |
.quotas-form legend { color:#55B577; font-size:1.308em; position:relative; } |
384 | 385 |
|
385 | 386 |
/* workaround for fixing bug with legend margin*/ |
... | ... | |
519 | 520 |
.login-section {} |
520 | 521 |
.main-login-method { margin-bottom: 20px;} |
521 | 522 |
|
522 |
.quotas-form span.info { z-index:2; } |
|
523 |
.1quotas-form span.info { z-index:2; } |
b/snf-astakos-app/astakos/im/static/im/js/common.js | ||
---|---|---|
249 | 249 |
$(this).hide(); |
250 | 250 |
}) |
251 | 251 |
|
252 |
// todo den doulevei |
|
253 |
$('#group_create_form').submit(function(){ |
|
254 |
if ($('.quotas-form .group .form-row.with-errors').length>0 ){ |
|
255 |
return false; |
|
256 |
} |
|
257 |
var flag = 0; |
|
258 |
$('.quotas-form .group input[type="text"]').each(function() { |
|
259 |
// get value from input |
|
260 |
var value = $(this).val(); |
|
261 |
if (value){ |
|
262 |
flag =1; |
|
263 |
} |
|
264 |
}); |
|
265 |
if (flag =='0') { |
|
266 |
$('#icons span.info').addClass('error-msg'); |
|
267 |
return false; |
|
268 |
|
|
269 |
} |
|
270 |
}); |
|
252 |
|
|
271 | 253 |
|
272 | 254 |
|
273 | 255 |
|
b/snf-astakos-app/astakos/im/static/im/js/quotas.js | ||
---|---|---|
101 | 101 |
// if you fill _proxy fields do stuff |
102 | 102 |
$('.quotas-form .quota input[type="text"]').change(function () { |
103 | 103 |
|
104 |
|
|
104 |
if ( $('#icons span.info').hasClass('error-msg')){ |
|
105 |
$('#icons span.info').find('span').html('Here you add resources to your Project. Each resource you specify here, will be granted to *EACH* user of this Project. So the total resources will be: <Total number of members> * <amount_of_resource> for each resource.'); |
|
106 |
} |
|
105 | 107 |
|
106 | 108 |
// get value from input |
107 | 109 |
var value = $(this).val(); |
... | ... | |
128 | 130 |
if ( num == '0' ) { |
129 | 131 |
flag = 1 ; msg="zero" |
130 | 132 |
} else { |
131 |
if ( value && !num ) { flag = 1 ; msg="Invalid format"} |
|
133 |
if ( value && !num ) { flag = 1 ; msg="Invalid format. Try something like 10GB, 2MB etc"}
|
|
132 | 134 |
|
133 | 135 |
var bytes = num; |
134 | 136 |
|
... | ... | |
357 | 359 |
} |
358 | 360 |
}); |
359 | 361 |
|
362 |
// todo den doulevei |
|
363 |
$('#group_create_form').submit(function(){ |
|
364 |
if ($('.quotas-form .group .form-row.with-errors').length>0 ){ |
|
365 |
return false; |
|
366 |
} |
|
367 |
var flag = 0; |
|
368 |
$('.quotas-form .group input[type="text"]').each(function() { |
|
369 |
// get value from input |
|
370 |
var value = $(this).val(); |
|
371 |
if (value){ |
|
372 |
flag =1; |
|
373 |
} |
|
374 |
}); |
|
375 |
if (flag =='0') { |
|
376 |
$('#icons span.info').addClass('error-msg'); |
|
377 |
$('#icons span.info').find('span').html('You must fill in at least one resource'); |
|
378 |
return false; |
|
379 |
|
|
380 |
} |
|
381 |
}); |
|
382 |
|
|
383 |
|
|
384 |
|
|
385 |
|
|
386 |
|
|
360 | 387 |
}); |
b/snf-astakos-app/astakos/im/templates/im/projects/project_detail.html | ||
---|---|---|
24 | 24 |
</h2> |
25 | 25 |
|
26 | 26 |
<div class="full-dotted"> |
27 |
<h3>DETAILS</h3> |
|
27 |
<h3>PROJECT DETAILS</h3>
|
|
28 | 28 |
<dl class="alt-style"> |
29 | 29 |
<dt>Name</dt> |
30 | 30 |
<dd>{{ object.name }} </dd> |
31 |
<dt>Description</dt> |
|
32 |
<dd>{{ object.description }} </dd> |
|
33 |
<dt>Homepage url</dt> |
|
31 |
<dt>Homepage url</dt> |
|
34 | 32 |
<dd> |
35 | 33 |
{% if object.homepage%} |
36 | 34 |
<a href="{{ object.homepage }}">{{ object.homepage }}</a> |
... | ... | |
38 | 36 |
Not set yet |
39 | 37 |
{% endif %} |
40 | 38 |
</dd> |
41 |
<dt>Member join policy</dt> |
|
42 |
<dd> |
|
43 |
{{ object.member_join_policy }} |
|
44 |
</dd> |
|
45 |
<dt>Member leave policy</dt> |
|
46 |
<dd> |
|
47 |
{{ object.member_leave_policy }} |
|
48 |
</dd> |
|
49 |
<dt>Issue date:</dt> |
|
39 |
<dt>Description</dt> |
|
40 |
<dd>{{ object.description }} </dd> |
|
41 |
|
|
42 |
|
|
43 |
<dt>Issue date</dt> |
|
50 | 44 |
<dd>{{object.issue_date|date:"d/m/Y"}} </dd> |
51 |
<dt>Start date:</dt>
|
|
45 |
<dt>Start date</dt> |
|
52 | 46 |
<dd>{{object.start_date|date:"d/m/Y"}} </dd> |
53 | 47 |
<dt>End Date</dt> |
54 | 48 |
<dd>{{object.end_date|date:"d/m/Y"}} </dd> |
49 |
<dt>Comments</dt> |
|
50 |
<dd>{{ object.comments }} </dd> |
|
55 | 51 |
<dt>Status</dt> |
56 | 52 |
<dd>{{ object.state }}</dd> |
57 | 53 |
<dt>Owner</dt> |
... | ... | |
62 | 58 |
{% endif %} |
63 | 59 |
|
64 | 60 |
</dd> |
65 |
<dt>Max participants</dt> |
|
66 |
<dd>{% if object.limit_on_members_number%}{{object.limit_on_members_number}}{% else %} {% endif %}</dd> |
|
61 |
|
|
67 | 62 |
<dt>Precursor Application</dt> |
68 | 63 |
<dd> |
69 | 64 |
{% if object.precursor_application %} |
... | ... | |
81 | 76 |
</dl> |
82 | 77 |
</div> |
83 | 78 |
<div class="full-dotted"> |
79 |
<h3>MEMBERSHIP OPTIONS</h3> |
|
80 |
<dl class="alt-style"> |
|
81 |
<dt>Max participants</dt> |
|
82 |
<dd>{% if object.limit_on_members_number%}{{object.limit_on_members_number}}{% else %} {% endif %}</dd> |
|
83 |
<dt>Member join policy</dt> |
|
84 |
<dd> |
|
85 |
{{ object.member_join_policy }} |
|
86 |
</dd> |
|
87 |
<dt>Member leave policy</dt> |
|
88 |
<dd> |
|
89 |
{{ object.member_leave_policy }} |
|
90 |
</dd> |
|
91 |
</dl> |
|
92 |
</div> |
|
93 |
<div class="full-dotted"> |
|
84 | 94 |
<h3>RESOURCES</h3> |
85 | 95 |
{% if object.projectresourcegrant_set.all %} |
86 | 96 |
<dl class="alt-style"> |
... | ... | |
198 | 208 |
</div> |
199 | 209 |
{% endif %} |
200 | 210 |
<div class="full-dotted"> |
201 |
<p> |
|
202 |
<a href="{% url project_all %}">back to All Projects ></a></li> |
|
203 |
</p> |
|
211 |
|
|
204 | 212 |
<p> |
205 |
<a href="{% url project_list %}">back to My Projects ></a>
|
|
213 |
<a href="{% url project_list %}">back to Projects ></a> |
|
206 | 214 |
</p> |
207 | 215 |
</ul> |
208 | 216 |
</div> |
b/snf-astakos-app/astakos/im/templates/im/projects/project_list.html | ||
---|---|---|
124 | 124 |
</form> |
125 | 125 |
<div class="dialog"> |
126 | 126 |
Are you sure you what to leave this project?<br> |
127 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.name}}</a><br>
|
|
127 |
Name: <a href="{% url project_detail o.id %}" title="visit project page">{{o.name}}</a><br>
|
|
128 | 128 |
{% if o.description %}Description:{{o.description|truncatewords:30}}{% endif %}<br><br> |
129 | 129 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
130 | 130 |
</div> |
... | ... | |
141 | 141 |
</form> |
142 | 142 |
<div class="dialog"> |
143 | 143 |
Are you sure you what to join this project?<br> |
144 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.name}}</a><br>
|
|
144 |
Name: <a href="{% url project_detail o.id %}" title="visit project page">{{o.name}}</a><br>
|
|
145 | 145 |
{% if o.description %}Description:{{o.description|truncatewords:30}}{% endif %}<br><br> |
146 | 146 |
|
147 | 147 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
... | ... | |
264 | 264 |
</form> |
265 | 265 |
<div class="dialog"> |
266 | 266 |
Are you sure you what to leave this project?<br> |
267 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.name}}</a><br>
|
|
267 |
Name: <a href="{% url project_detail o.id %}" title="visit project page">{{o.name}}</a><br>
|
|
268 | 268 |
{% if o.description %}Description:{{o.description|truncatewords:30}}{% endif %}<br><br> |
269 | 269 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
270 | 270 |
</div> |
... | ... | |
281 | 281 |
</form> |
282 | 282 |
<div class="dialog"> |
283 | 283 |
Are you sure you what to join this project?<br> |
284 |
Name: <a href="{% url project_detail o.id %}" title="visit group page">{{o.name}}</a><br>
|
|
284 |
Name: <a href="{% url project_detail o.id %}" title="visit project page">{{o.name}}</a><br>
|
|
285 | 285 |
{% if o.description %}Description:{{o.description|truncatewords:30}}{% endif %}<br><br> |
286 | 286 |
|
287 | 287 |
<a href="#" class="yes submit">Yes</a> <a href="#" class="no submit">No</a> |
b/snf-astakos-app/astakos/im/templates/im/projects/projectapplication_form.html | ||
---|---|---|
109 | 109 |
|
110 | 110 |
</fieldset> |
111 | 111 |
|
112 |
<div class="visible"> |
|
113 |
|
|
114 |
</div> |
|
112 |
<div class="visible"> </div> |
|
115 | 113 |
<div class="not-visible"> |
116 | 114 |
{% for gname, resources in resource_catalog.get_groups_resources %} |
117 | 115 |
<div class="group {{'group_'|add:gname}}" id="{{ gname }}"> |
... | ... | |
133 | 131 |
<div class="form-row"> |
134 | 132 |
<p class="clearfix"> |
135 | 133 |
<label for="{{'id_'|add:rname|add:'_uplimit'}}_proxy" > |
136 |
Amount to grant per user
|
|
134 |
Total {% if rdata.unit %}amount{% else %}units{% endif %} per user
|
|
137 | 135 |
</label> |
138 | 136 |
<input type="text" |
139 | 137 |
id="{{'id_'|add:rname|add:'_uplimit'}}_proxy" |
... | ... | |
152 | 150 |
/> |
153 | 151 |
<span class="extra-img"> </span> |
154 | 152 |
<span class="info"><em>more info</em><span>{{ rdata.help_text_input_each }}</span></span> |
155 |
<p class="error-msg">Invalid format</p> |
|
156 | 153 |
</p> |
154 |
<p class="error-msg">Invalid format</p> |
|
157 | 155 |
<p class="msg"></p> |
158 | 156 |
</div> |
159 | 157 |
</fieldset> |
b/snf-astakos-app/astakos/im/templates/im/projects/projectapplication_form_summary.html | ||
---|---|---|
12 | 12 |
<input type="hidden" name="{{k}}" id="{{'id_'|add:k}}" value="{{v}}"> |
13 | 13 |
{% endif %} |
14 | 14 |
{% endfor %} |
15 |
<legend>CONFIRMATION REQUEST</legend>
|
|
15 |
<legend>CONFIRM REQUEST</legend> |
|
16 | 16 |
<P>These are the specifications of the Project you want to create. If you hit the "Submit" button this form will be officially sent to GRNET for review. Please make sure the following reflect exactly your request. After submitting, there is no way to modify your Project request. </P> |
17 | 17 |
<div class="full-dotted"> |
18 |
<h3>GENERAL INFO</h3>
|
|
18 |
<h3>PROJECT DETAILS</h3>
|
|
19 | 19 |
<p class="restricted">{{ form_data.desc }}</p> |
20 |
<dl class="alt-style"> |
|
21 |
<dt>Homepage Url</dt> |
|
20 |
<dl class="alt-style"> |
|
21 |
<dt>Name</dt> |
|
22 |
<dd>{{ form_data.name }} </dd> |
|
23 |
<dt>Homepage Url</dt> |
|
22 | 24 |
<dd>{{ form_data.homepage }} </dd> |
23 |
<dt>Member join policy</dt> |
|
24 |
<dd>{{ form_data.member_join_policy }}</dd> |
|
25 |
<dt>Member leave policy</dt> |
|
26 |
<dd>{{ form_data.member_leave_policy }}</dd> |
|
25 |
<dt>Description</dt> |
|
26 |
<dd>{{ form_data.description }} </dd> |
|
27 |
<dt>Start date</dt> |
|
28 |
<dd>{{ form_data.start_date|date:"d/m/Y"}} </dd> |
|
29 |
<dt>End Date</dt> |
|
30 |
<dd>{{ form_data.end_date|date:"d/m/Y"}} </dd> |
|
31 |
<dt>Comments</dt> |
|
32 |
<dd>{{ form_data.comments }} </dd> |
|
33 |
|
|
27 | 34 |
</dl> |
28 | 35 |
</div> |
29 | 36 |
<div class="full-dotted"> |
30 |
<h3>DETAILS</h3>
|
|
37 |
<h3>MEMBERSHIP OPTIONS</h3>
|
|
31 | 38 |
<dl class="alt-style"> |
32 |
<dt>Name</dt> |
|
33 |
<dd>{{ form_data.name }} </dd> |
|
34 |
<!--<dt>Type</dt> |
|
35 |
<dd>Course </dd>--> |
|
36 |
<dt>Start date</dt> |
|
37 |
<dd>{{ form_data.start_date|date:"d/m/Y"}} </dd> |
|
38 |
<dt>End Date</dt> |
|
39 |
<dd>{{ form_data.end_date|date:"d/m/Y"}} </dd> |
|
39 |
<dt>Member join policy</dt> |
|
40 |
<dd>{{ form_data.member_join_policy }}</dd> |
|
41 |
<dt>Member leave policy</dt> |
|
42 |
<dd>{{ form_data.member_leave_policy }}</dd> |
|
40 | 43 |
<dt>Total number of members</dt> |
41 | 44 |
<dd>{{ form_data.limit_on_members_number }}</dd> |
42 | 45 |
</dl> |
b/snf-astakos-app/astakos/im/templatetags/astakos_tags.py | ||
---|---|---|
67 | 67 |
|
68 | 68 |
|
69 | 69 |
@register.simple_tag |
70 |
def olga(v): |
|
71 |
return v+'a' |
|
72 |
|
|
73 |
@register.simple_tag |
|
74 | 70 |
def get_grant_value(rname, form): |
75 | 71 |
grants = form.instance.grants |
76 | 72 |
service_name, resource_name = rname.split('.',1) |
Also available in: Unified diff