]> git.openstreetmap.org Git - osqa.git/commitdiff
added number of answers to the question list pages
authorqw3rty <qw3rty@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 12 May 2010 19:50:56 +0000 (19:50 +0000)
committerqw3rty <qw3rty@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 12 May 2010 19:50:56 +0000 (19:50 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@236 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/skins/default/media/style/style.css
forum/skins/default/templates/base.html
forum/skins/default/templates/question_list/count.html
forum/views/readers.py

index 7514be0b3d3124331fbb41090b30e7be1ddc540d..52978eaac26fc5cab15e61a4e9d5a57b5eb3f6da 100644 (file)
@@ -340,16 +340,17 @@ blockquote {
 .questions-count {
        color: #A40000;
        font-family: sans-serif;
-       font-size: 32px;
+       font-size: 24px;
        font-weight: 600;
        margin-top: 3px;
+    margin-right: 5px;
        padding: 0 0 5px 0;
 }
 
 .boxA {
-       background: none repeat scroll 0 0 #888A85;
-       margin-bottom: 8px;
-       padding: 6px;
+    background: none repeat scroll 0 0 #888A85;
+    margin-bottom: 8px;
+    padding: 6px;
 }
 
 .boxA h3 {
index e163d73095ea1c090012b3b24040c2d2a642d4d1..465fa7c51ee64697967974dd665f4778c9c68048 100644 (file)
@@ -36,9 +36,8 @@
             });
         </script>
         {% endif %}
-      
-        {% block forejs %}
-        {% endblock %}
+
+        <link rel="search" type="application/opensearchdescription+xml" href="open_search.xml" title="Web Search" />
     </head>
     <body>
         <div class="notify" style="display:none">
@@ -76,4 +75,4 @@
         {% endblock %}
     </body>
 </html>
-<!-- end template base.html -->
+ <!-- end template base.html -->
index d1cf227609953e716a7a47a424c6584a470ef3dc..5108a8431c4338e48d729af3c253b4b0b0da6161 100644 (file)
@@ -2,9 +2,21 @@
 {% load humanize %}\r
 \r
 <div class="boxC">\r
-               <div class="questions-count">{{ questions_count }}</div>\r
-               <p>{{ list_description }}</p>\r
+    <div class="questions-count">\r
+        {{ questions_count }}<span style="color:black;font-size:14px;margin-left:5px">{{ list_description }}</span>\r
+    </div>\r
+\r
+\r
+    {% if answer_count %}\r
+    <div class="questions-count" style="color:green">\r
+        {{ answer_count }}<span style="color:black;font-size:14px;margin-left:5px">answers</span>\r
+    </div>\r
+\r
+    {% endif %}\r
+\r
+    <div>\r
         <p class="nomargin">\r
-        {{ sort_description|safe }}\r
+            {{ sort_description|safe }}\r
         </p>\r
+    </div>\r
 </div>
\ No newline at end of file
index c86794f308a48893d64a25510975cbfe0018c1a4..17cea0fe2599c86331b61f3afb6804d8205327b4 100644 (file)
@@ -52,7 +52,7 @@ def index(request):
 def unanswered(request):
     return question_list(request,
                          Question.objects.filter(extra_ref=None),
-                         _('Open questions without an accepted answer'),
+                         _('open questions without an accepted answer'),
                          request.utils.set_sort_method('active'),
                          None,
                          _("Unanswered questions"))
@@ -65,10 +65,10 @@ def questions(request):
 def tag(request, tag):
     return question_list(request,
                          Question.objects.filter(tags__name=unquote(tag)),
-                         mark_safe(_('Questions tagged <span class="tag">%(tag)s</span>') % {'tag': tag}),
+                         mark_safe(_('questions tagged <span class="tag">%(tag)s</span>') % {'tag': tag}),
                          request.utils.set_sort_method('active'),
                          None,
-                         mark_safe(_('Questions tagged %(tag)s') % {'tag': tag}),
+                         mark_safe(_('questions tagged %(tag)s') % {'tag': tag}),
                          False)
 
 @decorators.list('questions', QUESTIONS_PAGE_SIZE)
@@ -91,9 +91,12 @@ def question_list(request, initial, list_description=_('questions'), sort=None,
     if page_title is None:
         page_title = _("Questions")
 
+    answer_count = Answer.objects.filter(deleted=None, parent__in=questions).count()   
+
     return {
         "questions" : questions,
         "questions_count" : questions.count(),
+        "answer_count" : answer_count,
         #"tags_autocomplete" : _get_tags_cache_json(),
         "list_description": list_description,
         "base_path" : base_path,