file permissions implemented

This commit is contained in:
Sanj 2011-07-04 18:23:40 +05:30
commit 4d8ae66f69
5 changed files with 24 additions and 6 deletions

View File

@ -19,6 +19,8 @@ except:
import simplejson as json
from utils.decorators import user_passes_test_json
from django.db.models import Q
from django.template import RequestContext
'''
class folder_names(object):
@ -361,8 +363,9 @@ def fileList(request):
def browse(request):
form = FileFilterForm()
return render_to_response("files/browser.html", {
context = RequestContext(request, {
'filterForm': form
})
return render_to_response("files/browser.html", context)

View File

@ -120,6 +120,9 @@ color:#555353;}
.previewObject a:active
{color:#000;}
.itemForm
{width:400px;}
.itemForm p
{padding-top:12px;}
@ -139,6 +142,7 @@ float:left;}
.itemDescription
{float:right;
height:50px;
width: 200px;
border:2px groove #efecec;}
.submitItem

View File

@ -67,7 +67,7 @@ ul {
#intro {
position: absolute;
width: 350px;
width: 370px;
right: 20px;
top: 12px;
font-size: 11px;

View File

@ -5,6 +5,11 @@ $(function() {
$('#id_category').children().eq(0).text("All");
$('#moveSelectedSelect').html(selectHTML);
$('#submitFilter').click(function(e) {
e.preventDefault();
$('#firstPage').click();
});
$('#filterForm').submit(function(e) {
e.preventDefault();
var formData = $(this).serializeArray();

View File

@ -34,16 +34,22 @@
<div id="nextBtn">&gt;&gt;</div>
<div id="lastPage">Last</div>
</div>
{% if user.is_authenticated %}
<div id="withSelected">
Selected Items: <button id="deleteSelectedBtn">Delete</button>
<button id="makePrivate">Make Private</button>
<p id="em">OR</p> <p>Move to:
<select id="moveSelectedSelect">
</select> <button id="moveSelectedBtn">Move</button></p>
</div>
</select>
<button id="moveSelectedBtn">Move</button></p>
</div>
{% endif %}
</div>
</div>
<div id="previewPane">
</div>