]> git.openstreetmap.org Git - osqa.git/commitdiff
adding wrapping divs to user blocks
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 25 Mar 2012 00:18:56 +0000 (00:18 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 25 Mar 2012 00:18:56 +0000 (00:18 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1237 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/models/action.py
forum/skins/default/templates/users/stats.html

index e8d076542adbdce911816203d808ad85b9ff1137..3aa6582161ddcc7679d31ca7e4473a21cf99d3b0 100644 (file)
@@ -300,7 +300,7 @@ class ActionRepute(models.Model):
         return 0
 
     def _add_to_rep(self, value):
-        if (self.user.reputation + value < 1) and not settings.ALLOW_NEGATIVE_REPUTATION:
+        if int(self.user.reputation + value) < 1 and not settings.ALLOW_NEGATIVE_REPUTATION:
             return 0
         else:
             return models.F('reputation') + value
index fe34b19f3010f415629ef5ca8d8eb72e366a7b0f..358771dd59b912bc373ec93951daf41f07413dc8 100644 (file)
@@ -6,7 +6,7 @@
 {% load humanize %}
 {% load question_list_tags %}
                {% block usercontent %}
-
+    <div id="questionsBlock" class="userSection">
         <a name="questions"></a>
         {% spaceless %}
             <h2>
@@ -19,7 +19,7 @@
                     href="{{ view_user.get_asked_url }}?type=rss" title="{% trans "subscribe to question RSS feed" %}"></a>
             </h2>
         {% endspaceless %}
-        <div>{{ questions.paginator.sort_tabs }}</div>
+        <div id="questionTabs">{{ questions.paginator.sort_tabs }}</div>
                <div id="listA" class="user-stats-table">
                    {% for question in questions.paginator.page %}
                        {% question_list_item question favorite_count=yes signature_type=badges %}
@@ -28,7 +28,9 @@
                <br clear="all"/>
                <div class="pager">{{ questions.paginator.page_numbers }}</div>
                <br clear="all"/>
+    </div>
 
+    <div id="answersBlock" class="userSection">
         <a name="answers"></a>
         {% spaceless %}
             <h2>
@@ -39,7 +41,7 @@
                 {% endblocktrans %}
             </h2>
         {% endspaceless %}
-        <div>{{ answers.paginator.sort_tabs }}</div>
+        <div id="answerTabs">{{ answers.paginator.sort_tabs }}</div>
         <div class="user-stats-table">
             {% for answer in answers.paginator.page %}
             <div class="answer-summary">
@@ -61,6 +63,9 @@
         <br clear="all"/>
                <div class="pager">{{ answers.paginator.page_numbers }}</div>
         <br clear="all"/>
+    </div>
+
+
         <a name="votes"></a>
         {% spaceless %}
             <h2>