.stats ul { margin:0; padding:0; list-style:none outside none; }\r
.stats ul li { margin:0 0 1em 0; padding:0 0 1em 0; list-style:none outside none; background:url(../images/stats-line.jpg) repeat-x left bottom}\r
.stats .bar { padding: 0; text-align:center; float:left; width:200px;}\r
-.stats .bar div { width:340px; height:30px; border:1px solid #000;}\r
+.stats .bar div { width:340px; height:30px; border:1px solid #000; margin-top:20px;}\r
.stats .bar span { text-align:right; display:block; height:100%; color:#fff; line-height:30px; font-size:1.231em; text-indent:50px;}\r
.stats .red .bar span { background:#ef4f54; }\r
.stats .yellow .bar span { background:#f6921e; }\r
.stats .vm .img-wrap { background-image:url(../images/vm-stats.png) }\r
.stats .ram .img-wrap { background-image:url(../images/ram-stats.png) }\r
.stats .network .img-wrap { background-image:url(../images/network-stats.png) }\r
-.stats .disk .img-wrap { background-image:url(../images/disk-stats.png) }\r
-.stats .storage .img-wrap { background-image:url(../images/storage-stats.png) }\r
+.stats .disksize .img-wrap { background-image:url(../images/disk-stats.png) }\r
+.stats .diskspace .img-wrap { background-image:url(../images/storage-stats.png) }\r
.stats .bandwidth .img-wrap { background-image:url(../images/bandwidth-stats.png) }\r
\r
.stats .red .img-wrap { background-position: 15px 7px; }\r
</form>
{% else %}
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br>You can <a href="{% url group_create_list %}">create a new group</a> or <a href="{% url group_search %}">join</a> to an existing one.</p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br>You can <!--<a href="{% url group_create_list %}">create a new group</a>--> <a href="{% url group_add 'course' %}">create a new group</a>or <a href="{% url group_search %}">join</a> to an existing one.</p>
<div class="widjets">
<a href="#" class="widjet-x" title="remove boxes">X</a>
<li>
<div>
<p>WELCOME!<br>Connect with a world of people who share your passions.<br>With millions of groups at your fingertips, it's easy to find the group that's best for you -- no matter your interest.</p><p style="text-align: center"><img alt="THINK ABOUT IT" src="/static/im/images/create.png"></p>
- <p class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>
+ <p class="btn"><a href="{% url group_add 'course' %}" class="submit">CREATE</a></p>
+ <!--<p class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>-->
</div>
</li>
<li>
<div class="stats clearfix">
<ul>
{% for r in data %}
-
- <li class="clearfix {{ r.load_class }} {{ r.name}}">
+ {% with resource_presentation|lookup:r.name as resource_info %}
+ <li class="clearfix {{ r.load_class }} {{ r.name|get_value_after_dot}}">
<div class="img-wrap"> </div>
<div class="info">
- <h3>{{ r.description }}</h3>
+ <h3>{{ resource_info.report_desc }}</h3>
<p>
{{ r.ratio|floatformat }}% Used<br>
- You are using {{ r.currValue }} {{ r.unit }} out of your {{ r.maxValue }}{{ r.unit }} {{ r.plural|capfirst }} - Aouch!
+ You are using {{ r.currValue }} {{ r.unit }} out of your {{ r.maxValue }} {{ r.unit }} {% if resource_info.is_abbreviation %}{{ r.name|get_value_after_dot|upper }}{% else %}{{ r.name|get_value_after_dot }}{% endif %}{% if not r.unit %}s {% endif %}
</p>
</div>
<div class="bar">
<div><span style="width:{{ r.ratio|floatformat }}%;">{{ r.ratio|floatformat }}% </span></div>
</div>
</li>
+ {% endwith %}
{% endfor %}
</ul>
</div>
extra_context))
+
+resource_presentation = {
+ 'compute': {
+ 'help_text':'group compute help text',
+ 'is_abbreviation':False,
+ 'report_desc':''
+ },
+ 'storage': {
+ 'help_text':'group storage help text',
+ 'is_abbreviation':False,
+ 'report_desc':''
+ },
+ 'pithos+.diskspace': {
+ 'help_text':'resource pithos+.diskspace help text',
+ 'is_abbreviation':False,
+ 'report_desc':'Diskspace used'
+ },
+ 'cyclades.vm': {
+ 'help_text':'resource cyclades.vm help text resource cyclades.vm help text resource cyclades.vm help text resource cyclades.vm help text',
+ 'is_abbreviation':True,
+ 'report_desc':'Number of Virtual Machines'
+ },
+ 'cyclades.disksize': {
+ 'help_text':'resource cyclades.disksize help text',
+ 'is_abbreviation':False,
+ 'report_desc':'Amount of Disksize used'
+ },
+ 'cyclades.ram': {
+ 'help_text':'resource cyclades.ram help text',
+ 'is_abbreviation':True,
+ 'report_desc':'RAM used'
+ },
+ 'cyclades.cpu': {
+ 'help_text':'resource cyclades.cpu help text',
+ 'is_abbreviation':True,
+ 'report_desc':'CPUs used'
+ }
+ }
+
@require_http_methods(["GET", "POST"])
@signed_terms_required
@login_required
except:
return HttpResponseBadRequest(_('No such group kind'))
- resource_presentation = {
- 'compute': {
- 'help_text':'group compute help text',
- },
- 'storage': {
- 'help_text':'group storage help text',
- },
- 'pithos+.diskspace': {
- 'help_text':'resource pithos+.diskspace help text',
- 'is_abbreviation':False,
- },
- 'cyclades.vm': {
- 'help_text':'resource cyclades.vm help text resource cyclades.vm help text resource cyclades.vm help text resource cyclades.vm help text',
- 'is_abbreviation':True,
- },
- 'cyclades.disksize': {
- 'help_text':'resource cyclades.disksize help text',
- 'is_abbreviation':False,
- },
- 'cyclades.ram': {
- 'help_text':'resource cyclades.ram help text',
- 'is_abbreviation':True,
- },
- 'cyclades.cpu': {
- 'help_text':'resource cyclades.cpu help text',
- 'is_abbreviation':True,
- }
- }
+
post_save_redirect = '/im/group/%(id)s/'
context_processors = None
messages.error(request, result.reason)
return render_response('im/resource_list.html',
data=data,
+ resource_presentation=resource_presentation,
context_instance=get_context(request))