Commit a5001143 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Merge branch '0.6.4' into dev

parents 03989039 cb7b6e18
......@@ -225,7 +225,7 @@ table.alt-style tr td:first-child,
table.alt-style tr th:first-child { padding-left:5px; }
table.alt-style tr td a { margin:0 0 0 20px; }
table.alt-style tr td:first-child a { margin:0; }
.content a.submit { margin:0; display:inline-block; margin:10px 0 ; height:auto;}
.content a.submit { margin:0; display:inline-block; margin:10px 0 ; height:auto; min-width:100px; text-align:center;}
table.alt-style tr:nth-child(2n) td { background:#F2F2F2 }
dl.alt-style { width:500px; }
dl.alt-style dt { width:50%; float:left; color:#3582AC; font-weight:normal;}
......@@ -317,4 +317,17 @@ dl.alt-style dt:nth-child(2n) { background:black; }
.billing .resource-cat-2.filter-item a:hover { color:#4085A5 }
.table_sorting tr th { cursor:pointer; }
.table_sorting tr th:hover { text-decoration:underline }
\ No newline at end of file
.table_sorting tr th:hover { text-decoration:underline }
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 }
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}
.projects .details a.edit { float:right; }
.projects .editable form textarea { width:70%; height:50px; max-width:70%;}
......@@ -203,6 +203,21 @@ $(document).ready(function() {
$(".table_sorting").tablesorter();
$('table .more-info').click(function(e){
e.preventDefault();
$(this).toggleClass('open');
$(this).parents('tr').next('tr').toggle();
});
$('.projects .details .edit').click( function(e){
e.preventDefault();
$(this).parents('.details').children('.data').hide();
$(this).parents('.details').children('.editable').show();
$(this).hide();
})
});
$(window).resize(function() {
......
......@@ -7,12 +7,65 @@
<h2>
{% if request.user in object.members %}
<em>[ ENROLLED ]</em>
<em>
{% if request.user in object.owner.all %}
[ADMINISTRATOR]
{% else %}
[ ENROLLED ]
{% endif %}
</em>
{% endif %}
<span>[ {{object.kind|upper}} ]</span>
</h2>
<div class="details">
<p>{{ object.desc }}</p>
{% if request.user in object.owner.all %}
<a href="#" class="edit">[ EDIT GROUP INFO ]</a>
{% endif %}
<div class="data">
<p>{{ object.desc }}</p>
<dl class="alt-style">
<dt>Homepage url</dt>
<dd>
{% if object.homepage%}
<a href="{{ object.homepage }}">{{ object.homepage }}</a>
{% else %}
Not set yet
{% endif %}
</dd>
</dl>
</div>
<div class="editable" style="display:none;">
<!-- demo form-->
<form class="innerlabels" method="post" action=""><div style="display:none"><input type="hidden" value="d1d4677634f858843ca84e2cac5bbebc" name="csrfmiddlewaretoken" autocomplete="off"></div>
<div class="form-errors all"></div>
<div class="form-row ">
<p class="clearfix ">
<label for="id_homepage">Homepage</label>
<input type="text" id="id_homepage" name="homepage" autocomplete="off" value="{{ object.homepage }}">
<span class="extra-img">&nbsp;</span>
</p>
</div>
<div class="form-row ">
<p class="clearfix ">
<label for="id_desc">Description</label>
<textarea name="desc" cols="40" rows="10" id="id_desc">{{ object.desc }}</textarea>
<span class="extra-img">&nbsp;</span>
</p>
</div>
<div class="form-row submit">
<input type="submit" value="SUBMIT" class="submit altcol" autocomplete="off">
</div>
</form>
<!-- end of demo form-->
</div>
</div>
<div class="full-dotted">
<h3>DETAILS:</h3>
......@@ -39,17 +92,16 @@
{{o.realname}} ({{o.email}})
{% endif %}
{% endfor %}
{% endfor %}&nbsp;
</dd>
</dl>
</div>
<div class="full-dotted">
<h3>POLICIES:</h3>
<h3>RESOURCES:</h3>
{% if quota %}
<dl class="alt-style">
<dt>Resrouce</dt>
<dd>Limit</dd>
{% for k in quota|dkeys %}
<dt>{{ k }}</dt>
......@@ -67,7 +119,7 @@
<caption>MEMBERS:</caption>
<thead>
<tr>
<th>Email</th>
<th>User Id</th>
<th>Name</th>
<th>Status</th>
</tr>
......@@ -85,8 +137,8 @@
{% else %}
<td>Pending
{% if user in m.group.owner.all %}
<a href="{% url approve_member m.group.id m.person.id %}">Approve</a>
<a href="{% url disapprove_member m.group.id m.person.id %}">Disapprove</a>
<a href="{% url approve_member m.group.id m.person.id %}">Accept</a>
<a href="{% url disapprove_member m.group.id m.person.id %}">Reject</a>
{% endif %}
</td>
{% endif %}
......
......@@ -5,7 +5,7 @@
<div class="maincol {% block innerpage.class %}{% endblock %}">
<form action="" method="post"
class="withlabels">{% csrf_token %}
<h2><span>NEW GROUP</span></h2>
<h2><span>CREATE {{ kind|upper }}</span></h2>
{% include "im/form_render.html" %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="SUBMIT" />
......
......@@ -4,6 +4,7 @@
{% 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 %}
......@@ -12,6 +13,8 @@
<input type="submit" class="submit altcol" value="SEARCH" />
</div>
</form>
<p><a href="">Show all groups</a></p>
{% 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>
......@@ -20,13 +23,13 @@
<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 group</a></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 group</a></p>
<p class="btn"><a href="{% url group_search %}" class="submit">JOIN</a></p>
</div>
</li>
</ul>
......@@ -38,30 +41,45 @@
{% with d|lookup:'own' as mine %}
{% if mine %}
<div class="full-dotted">
<table class="alt-style table_sorting" id="">
<table class="alt-style complex" id="">
<caption>MY GROUPS</caption>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Issue date</th>
<th>Expiration date</th>
<th>Participants</th>
<th>Activation</th>
<th>Moderation</th>
<th>Issued</th>
<th>Expires</th>
<th>Enrolled</th>
<th>Status</th>
<th>Moderated</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for o in mine %}
<tr>
<td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name}}</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>
<td>{{ o.approved_members|length }}/{{ o.members|length }}</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" 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>
......@@ -73,52 +91,74 @@
{% with d|lookup:'other' as other %}
{% if other %}
<div class="full-dotted">
<table class="alt-style table_sorting">
<caption>I PARTICIPATE IN</caption>
<table class="alt-style complex">
<caption>
{% if is_search %}
SEARCH RESULTS
{% else %}
I PARTICIPATE IN
{% endif %}
</caption>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Issue date</th>
<th>Expiration date</th>
<th>Issued</th>
<th>Expires</th>
<th>Participants</th>
<th>Activation</th>
<th>Enrolled</th>
<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}}</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>
<td>{{ o.approved_members|length }}</td>
<td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
<td>
{% if user in o.approved_members %}
<td>
Active
<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
<input type="submit" value="LEAVE GROUP" />
</form>
Registered
<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
<input type="submit" value="LEAVE GROUP" />
</form>
</td>
{% else %}
{% if user in o.members %}
<td>Pending</td>
Pending
{% else %}
<td>Not member
Not member
<form action="{% url group_join o.id %}" method="post" class="link-like">{% csrf_token %}
<input type="submit" value="JOIN GROUP" />
</form>
</td>
{% 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>
......@@ -135,4 +175,5 @@
{% endif %}
{% endwith %}
</div>
</div>
{% endblock %}
......@@ -15,7 +15,7 @@
{% endwith %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="SEND" />
<input type="submit" class="submit altcol" value="INVITE" />
</div>
</form>
{% endif %}
......@@ -26,7 +26,7 @@
<h2>You have <em>{{ inviter.invitations }}</em> invitation{{ inviter.invitations|pluralize }} left.</h2>
{% if sent|length %}
<table class="zebra-striped id-sorted">
<table class="alt-style">
<thead>
<tr>
<th>Email</th>
......@@ -50,14 +50,5 @@
</div>
<div class="rightcol">
{% if inviter.invitations %}
<form action="{% url invite %}" method="post"
class="innerlabels">{% csrf_token %}
<h2>INVITE SOMEONE ELSE</h2>
{% with invitation_form as form %}
{% include "im/form_render.html" %}
{% endwith %}
{% endif %}
{% endblock %}
{% endblock %}
\ No newline at end of file
......@@ -699,7 +699,8 @@ def group_add(request, kind_name='default'):
)
t = template_loader.get_template(template_name)
c = RequestContext(request, {
'form': form
'form': form,
'kind': kind,
}, context_processors)
return HttpResponse(t.render(c))
......
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