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

Group changes

-  Pagination set to 8 
-  Extra fields in sorting select
-  X to close widjets
parent a6fb45e6
......@@ -601,5 +601,12 @@ class AstakosGroupSearchForm(forms.Form):
class AstakosGroupSortForm(forms.Form):
sort_by = forms.ChoiceField(label='Sort by',
choices=(('groupname', 'Name'), ('kindname', 'Type')),
choices=(('groupname', 'Name'),
('kindname', 'Type'),
('issue_date', 'Issue Date'),
('expiration_date', 'Expiration Date'),
('approved_members_num', 'Participants'),
('is_enabled', 'Status'),
('moderation_enabled', 'Moderation')
),
required=False)
\ No newline at end of file
......@@ -134,4 +134,4 @@ PASSWORD_RESET_EMAIL_SUBJECT = getattr(settings, 'ASTAKOS_PASSWORD_RESET_EMAIL_S
'Password reset on %s alpha2 testing' % SITENAME)
# Set how many objects should be displayed per page
PAGINATE_BY = getattr(settings, 'ASTAKOS_PAGINATE_BY', 10)
PAGINATE_BY = getattr(settings, 'ASTAKOS_PAGINATE_BY', 8)
......@@ -286,11 +286,14 @@ dl.alt-style dt:nth-child(2n) { background:black; }
.details img { max-width:100%; }
.question .section { margin-top:1em; }
.question pre { border:1px dashed #000; padding:5px; margin:10px 0; line-height:auto; }
.widjets { margin: 0; padding:0; }
.widjets { position:relative; }
.widjets ul { margin: 0; padding:0; }
.widjets li { width:50%; float:left; list-style:none outside; margin:30px 0; }
.widjets li div { border:1px dashed #000; padding:20px 20px 70px; width:60%; margin:0 auto; position:relative; }
.widjets li div img { max-width:100%; }
.widjets li .btn { text-align:center; position:absolute; bottom:0; left:0; right:0; }
.widjets .widjet-x { position:absolute; right:0;top:0; font-weight:bold; font-size:1.5em; }
.widjets .widjet-x:hover { text-decoration:none; color:#000; }
/* billing styles */
.alt-style .table-div { border:1px dashed #000; }
......
......@@ -194,6 +194,13 @@ $(document).ready(function() {
$(this).hide();
})
$('.widjet-x').click(function(e){
e.preventDefault();
$(this).siblings('ul').hide('slow');
$(this).hide();
})
});
$(window).resize(function() {
......
......@@ -91,7 +91,7 @@
</div>
<div class="full-dotted">
{% if object.members %}
<table class="alt-style table_sorting">
<table class="alt-style">
<caption>MEMBERS:</caption>
<thead>
<tr>
......
......@@ -4,44 +4,59 @@
{% block page.body %}
<div class="maincol {% block innerpage.class %}{% endblock %}">
<h2>GROUPS</h2>
{% if form %}
<p>You can search for a group by name</p>
<form action="{% url group_search %}" method="post" class="withlabels signup">{% csrf_token %}
{% include "im/form_render.html" %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="SEARCH" />
</div>
</form>
<form action="{% url group_all %}" method="post" class="link-like">{% csrf_token %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="Show all groups" />
</div>
</form>
{% else %}
<div class="projects">
<!--<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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <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>
<ul class="widjets clearfix">
<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 class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>
</div>
</li>
<li>
<div>
<p>LOOKING FOR A GROUP?</p><p>Well, this is the place to start!</br>sdofuisd ofuaofi usdiof uiofu osifuaoi ufisdfiousf oiusd<br /><img alt="THINK ABOUT IT" src="/static/medialibrary/2012/06/behind_okeanos.png"></p>
<p class="btn"><a href="{% url group_search %}" class="submit">JOIN</a></p>
</div>
</li>
</ul>-->
<h2>GROUPS</h2>
{% if form %}
<p>You can search for a group by name</p>
<form action="{% url group_search %}" method="post" class="withlabels signup">{% csrf_token %}
{% include "im/form_render.html" %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="SEARCH" />
</div>
</form>
<form action="{% url group_all %}" method="post" class="link-like alone">{% csrf_token %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="Show all groups" />
</div>
</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>
<div class="widjets">
<a href="#" class="widjet-x" title="remove boxes">X</a>
<ul class="clearfix">
<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 class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>
</div>
</li>
<li>
<div>
<p>LOOKING FOR A GROUP?</p><p>Well, this is the place to start!<br>sdofuisd ofuaofi usdiof uiofu osifuaoi ufisdfiousf oiusd<br><img alt="THINK ABOUT IT" src="/static/medialibrary/2012/06/behind_okeanos.png"></p>
<p class="btn"><a href="{% url group_search %}" class="submit">JOIN</a></p>
</div>
</li>
</ul>
</div>
{% endif %}
{% with page_obj.object_list as object_list %}
{% if object_list %}
<div class="full-dotted">
<form method="GET" class="minimal" action="">
<div class="form-row">
<select name="sorting" onchange="this.form.submit();">
<option value="">Sort by</option>
<option value="groupname" {% if sorting == 'groupname' %}selected{% endif %}>Name</option>
<option value="kindname" {% if sorting == 'kindname' %}selected{% endif %}>Type</option>
<option value="issue_date" {% if sorting == 'issue_date' %}selected{% endif %}>Issue date</option>
<option value="expiration_date" {% if sorting == 'expiration_date' %}selected{% endif %}>Expiration Date</option>
<option value="approved_members_num" {% if sorting == 'approved_members_num' %}selected{% endif %}>Participants</option>
</select>
</div>
</form>
<table class="alt-style complex">
<caption>
SEARCH RESULTS
......@@ -95,13 +110,12 @@
<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">
<td colspan="7" class="info-td">
<div>
<p>{{o.desc}}</p>
<p>{% if o.homepage%}
Visit it group's home page: <a target="_blank" href="{{ o.homepage }}">{{ o.homepage }}</a>
{% else %}
There is no homepage for this group yet.
Group's home page: <a target="_blank" href="{{ o.homepage }}">{{ o.homepage }}</a>
{% endif %}
</p>
</div>
......@@ -137,11 +151,16 @@
<select name="own_sorting" onchange="this.form.submit();">
<option value="">Sort by</option>
<option value="groupname" {% if own_sorting == 'groupname' %}selected{% endif %}>Name</option>
<option value="kindname" {% if own_sorting == 'kindname' %}selected{% endif %}>Type</option>
<option value="kindname" {% if own_sorting == 'kindname' %}selected{% endif %}>Type</option>
<option value="issue_date" {% if own_sorting == 'issue_date' %}selected{% endif %}>Issue date</option>
<option value="expiration_date" {% if own_sorting == 'expiration_date' %}selected{% endif %}>Expiration Date</option>
<option value="approved_members_num" {% if own_sorting == 'approved_members_num' %}selected{% endif %}>Participants</option>
<option value="is_enabled" {% if own_sorting == 'is_enabled' %}selected{% endif %}>Status</option>
<option value="moderation_enabled" {% if own_sorting == 'moderation_enabled' %}selected{% endif %}>Moderation</option>
</select>
</div>
</form>
<table class="alt-style complex" id="">
<table class="alt-style complex">
<caption>MY GROUPS</caption>
<thead>
<tr>
......@@ -173,9 +192,7 @@
<div>
<p>{{o.desc}}</p>
<p>{% if o.homepage%}
Visit it group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a>
{% else %}
There is no homepage for this group yet.
Group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a>
{% endif %}
</p>
</div>
......@@ -210,6 +227,10 @@
<option value="">Sort by</option>
<option value="groupname" {% if other_sorting == 'groupname' %}selected{% endif %}>Name</option>
<option value="kindname" {% if other_sorting == 'kindname' %}selected{% endif %}>Type</option>
<option value="issue_date" {% if other_sorting == 'issue_date' %}selected{% endif %}>Issue date</option>
<option value="expiration_date" {% if other_sorting == 'expiration_date' %}selected{% endif %}>Expiration Date</option>
<option value="approved_members_num" {% if other_sorting == 'approved_members_num' %}selected{% endif %}>Participants</option>
</select>
</div>
</form>
......@@ -222,7 +243,7 @@
<th>Name</th>
<th>Type</th>
<th>Issued</th>
<th>Expires</th>
<th>Expires</th>
<th>Enrolled</th>
......@@ -258,7 +279,7 @@
<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">
<td colspan="7" class="info-td">
<div>
<p>{{o.desc}}</p>
<p>{% if o.homepage%}
......
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