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

View File

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

View File

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

View File

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

View File

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