small fixes

This commit is contained in:
Sanj 2011-07-11 03:28:48 +05:30
parent 1cb81fcd32
commit d3c03e0529
3 changed files with 8 additions and 2 deletions

View File

@ -835,6 +835,9 @@ def product_list(request):
return render_to_response("product_list.html", {'products': products})
def article_list(request):
user = request.user
if not user.is_superuser:
return HttpResponse("authentication error.")
articles = Article.objects.all()
return render_to_response("article_list.html", {'articles': articles})

View File

@ -328,11 +328,14 @@ def moveFiles(request):
files = json.loads(request.POST.get("ids", "[]"))
study_id = int(request.POST.get("study", "0"))
study = Category.objects.get(pk=study_id)
response['status'] = 'pass'
for f in files:
fil = File.objects.get(pk=f)
if fil.can_edit(user):
fil.move_to(study)
response['status'] = 'pass'
else:
response['status'] = 'fail'
response['error'] = 'one or more files could not be moved as you did not have permission to move them.'
return render_to_json_response(response)

View File

@ -48,7 +48,7 @@ To use the tool, you have to be logged in. To test-run the tool, use the login:g
Since the tool uses Html5 and features standard only in newer browsers, please note that the tool will only work in Firefox 3.5+, Google Chrome, and Safari.
</p><br/>
<p>
If you are a participant looking to open a new account, please write to contact@edgwareroad.org. A basic introduction to its features are found in our first publication, Instructions for Printing, here.
If you are a participant looking to open a new account, please write to hello@edgwareroad.org. A basic introduction to its features are found in our first publication, Instructions for Printing, <a href="/edit/article_web/21/" title="Instructions for Printing.">here</a>.
</p>
</div>
<div id="publishBlockright">