[Oi-commits] r1346 - in trunk: forum media/css templates/forum

oi-commits at pardus.org.tr oi-commits at pardus.org.tr
Wed May 7 12:23:11 EEST 2008


Author: erenturkay
Date: Wed May  7 12:23:11 2008
New Revision: 1346

Added:
   trunk/templates/forum/forum_error.html
Modified:
   trunk/forum/views.py
   trunk/media/css/forum.css
Log:
add error page

Modified: trunk/forum/views.py
=================================================================
--- trunk/forum/views.py	(original)
+++ trunk/forum/views.py	Wed May  7 12:23:11 2008
@@ -153,8 +153,8 @@
 
     # determine if user already added this to prevent double adding.
     if len(WatchList.objects.filter(topic__id=topic_id).filter(user__username=request.user.username)) > 0:
-        # FIXME: Give proper error.
-        return HttpResponse('Sorry, you are already following this topic')
+        error = 'Bu başlığı zaten izlemektesiniz.'
+        return render_response(request, 'forum/forum_error.html', {'error': error})
     else:
         watchlist = WatchList(topic=topic, user=request.user)
         watchlist.save()

Modified: trunk/media/css/forum.css
=================================================================
--- trunk/media/css/forum.css	(original)
+++ trunk/media/css/forum.css	Wed May  7 12:23:11 2008
@@ -40,12 +40,20 @@
     margin: 0px auto;
     width: 900px;
 }
+
+#space {
+    width: 100%;
+    height: 2px;
+    background-color: #6A91A6;
+}
+
 #content {
     padding: 0px 0px 20px 0px;
     float: left;
     width: 100%;
     background-color:#FFFFFF;	
 }
+
 .page_title {
     font-size: 18px;
     border-bottom: 1px dashed #c0c0c0;
@@ -229,6 +237,22 @@
 .tag {
     padding-left: 5px;
 }
+
+div.forum_error {
+    margin-top: 20px;
+    margin-left: auto;
+    margin-right: auto;
+    text-align: center;
+    padding: 6px;;
+    background-color: #C84E4A;
+    border: 1px solid #D1514D;
+    color: #EDE4E1;
+    font-weight: bold;
+    font-size: 14px;
+    width: 50%;
+    height: 20px;
+}
+
 div.topic_news_area {
     width: 100%;
     overflow: hidden;


More information about the Oi-commits mailing list