Commit f3a1f885 authored by Olga Brani's avatar Olga Brani
Browse files

UI changes

- Show more/less button
- Removed table sorting
parent 76ac919e
......@@ -322,4 +322,9 @@ dl.alt-style dt:nth-child(2n) { background:black; }
table.alt-style tr.tr1 td,
table.alt-style tr.tmore1 td { background:#F2F2F2 }
table.alt-style tr.tr2 td,
table.alt-style tr.tmore2 td { background:#fff }
\ No newline at end of file
table.alt-style tr.tmore2 td { background:#fff }
table.alt-style tr td.info-td { padding:5px; }
table.alt-style tr td.info-td div { padding:15px; border:1px dashed #000 }
table.alt-style tr td a.more-info { display:block; float:left; width:17px; height:16px; background:url(../images/plus-minus.png) no-repeat 0 0; margin-right:5px; }
table.alt-style tr td a.more-info:hover { background-image:url(../images/plus-minus-hover.png); text-decoration:none;}
table.alt-style tr td a.open { background-position:-16px 0}
\ No newline at end of file
......@@ -208,16 +208,9 @@ $(document).ready(function() {
e.preventDefault();
$(this).toggleClass('open');
$(this).parents('tr').next('tr').toggle();
check_table_info();
})
function check_table_info() {
if ($('table .more-info').hasClass('open')){
$(this).text('[- Less Info]')
} else {
$(this).text('[+ More Info]')
}
}
});
$(window).resize(function() {
......
......@@ -49,7 +49,7 @@
{{o.realname}} ({{o.email}})
{% endif %}
{% endfor %}
{% endfor %} 
</dd>
</dl>
</div>
......
......@@ -39,7 +39,7 @@
{% with d|lookup:'own' as mine %}
{% if mine %}
<div class="full-dotted">
<table class="alt-style table_sorting complex" id="">
<table class="alt-style complex" id="">
<caption>MY GROUPS</caption>
<thead>
<tr>
......@@ -51,22 +51,33 @@
<th>Status</th>
<th>Moderated</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for o in mine %}
<tr class="{% cycle 'tr1' 'tr2' %}">
<td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name|cut:"http://"|cut:"/" }}</a></td>
<td><a href="{% url group_detail o.id %}" title="visit group page">{{o.name|cut:"http://"|cut:"/" }}</a></td>
<td>{{o.kind|capfirst}}</td>
<td>{{o.issue_date|date:"d/m/Y"}}</td>
<td>{{o.expiration_date|date:"d/m/Y"}}</td>
<td>{{ o.approved_members|length }}</td>
<td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
<td>{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td>
<td><a href="#" class="more-info">[ + More Info ]</a></td>
<td><a href="#" class="more-info" title="more info">&nbsp;</a></td>
</tr>
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none">
<td colspan="8">{{o.desc}}</td>
<td colspan="8" class="info-td">
<div>
<p>{{o.desc}}</p>
<p>{% if o.homepage%}
Vistit group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a>
{% else %}
There is no homepage for this group yet.
{% endif %}
</p>
</div>
</td>
</tr>
{% endfor %}
</tbody>
......@@ -78,7 +89,7 @@
{% with d|lookup:'other' as other %}
{% if other %}
<div class="full-dotted">
<table class="alt-style table_sorting">
<table class="alt-style complex">
<caption>
{% if is_search %}
SEARCH RESULTS
......@@ -97,13 +108,14 @@
<th>Enrollment status</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for o in other %}
<tr>
<td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name|cut:"http://"|cut:"/" }}</a></td>
<tr class="{% cycle 'tr1' 'tr2' %}">
<td><a href="{% url group_detail o.id %}" title="visit group page">{{o.name|cut:"http://"|cut:"/" }}</a></td>
<td>{{o.kind|capfirst}}</td>
<td>{{o.issue_date|date:"d/m/Y"}}</td>
<td>{{o.expiration_date|date:"d/m/Y"}}</td>
......@@ -131,6 +143,20 @@
{% endif %}
{% endif %}
</td>
<td><a href="#" class="more-info" title="more info">&nbsp;</a></td>
</tr>
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none">
<td colspan="8" class="info-td">
<div>
<p>{{o.desc}}</p>
<p>{% if o.homepage%}
Vistit group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a>
{% else %}
There is no homepage for this group yet.
{% endif %}
</p>
</div>
</td>
</tr>
{% endfor %}
</tbody>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment