The following commit has been merged in the master branch:
commit ac3c11e969c6321ed342bf3a5df35e2ef0de85e6
Author: Michal Čihař <[email protected]>
Date:   Thu Oct 8 15:36:50 2009 +0200

    Add some management actions.

diff --git a/html/phonedb/phone.html b/html/phonedb/phone.html
index 40961cd..98dd3cc 100644
--- a/html/phonedb/phone.html
+++ b/html/phonedb/phone.html
@@ -9,6 +9,12 @@
 <li><a href="/phones">Phones Database</a></li>
 <li><a href="{{ vendor.get_absolute_url }}">{{ vendor.name }}</a></li>
 <li><a href="/phones/new?vendor={{ vendor.slug }}">{% trans "Add new record" 
%}</a></li>
+{% if user.is_superuser %}
+<li><a href="/admin/phonedb/phone/{{ phone.id }}/">Edit</a></li>
+{% ifequal phone.state "draft" %}
+<li><a href="{{ phone.get_absolute_url }}delete/">Delete</a></li>
+{% endifequal %}
+{% endif %}
 </ul>
 <h3>{% trans "Similar Phones" %}</h3>
 
diff --git a/phonedb/views.py b/phonedb/views.py
index 855a305..be8ac68 100644
--- a/phonedb/views.py
+++ b/phonedb/views.py
@@ -212,6 +212,7 @@ def phone(request, vendorname, id):
         'phone': phone,
         'related': related,
         'feeds': get_feeds(),
+        'user': request.user,
     }))
 
 def phones_csv(request):

-- 
UNNAMED PROJECT

_______________________________________________
Wammu-svn mailing list
[email protected]
https://lists.cihar.com/cgi-bin/mailman/listinfo/wammu-svn

Reply via email to