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

- Editable group fields

- Show all feature in search 
- 
parent f3a1f885
......@@ -327,4 +327,7 @@ 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
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%;}
......@@ -209,6 +209,13 @@ $(document).ready(function() {
$(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();
})
});
......
......@@ -7,22 +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>
<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>
{% 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>
......
......@@ -13,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>
......
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