summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-11 17:14:25 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-11 17:14:52 -0400
commit0762b79da73cb02e1be04c2de4aaa55eda221901 (patch)
tree7e203abc410bb5e09405475941cf4eb4f94a1b29
parentd2f242282cc00b8ab6aac94fbb30d6e55a7b87ec (diff)
downloadaskbot-0762b79da73cb02e1be04c2de4aaa55eda221901.tar.gz
askbot-0762b79da73cb02e1be04c2de4aaa55eda221901.tar.bz2
askbot-0762b79da73cb02e1be04c2de4aaa55eda221901.zip
question views merged, changed UI a bit, full text search broken
-rwxr-xr-xdjango_authopenid/views.py2
-rwxr-xr-xforum/const.py1
-rwxr-xr-xforum/forms.py1
-rw-r--r--forum/middleware/view_log.py1
-rw-r--r--forum/search/state_manager.py4
-rwxr-xr-xforum/skins/default/media/style/style.css85
-rw-r--r--forum/skins/default/templates/about.html2
-rw-r--r--forum/skins/default/templates/ask.html2
-rw-r--r--forum/skins/default/templates/ask_form.html66
-rw-r--r--forum/skins/default/templates/base.html1
-rw-r--r--forum/skins/default/templates/base_content.html1
-rw-r--r--forum/skins/default/templates/faq.html2
-rw-r--r--forum/skins/default/templates/feedback.html2
-rw-r--r--forum/skins/default/templates/header.html49
-rw-r--r--forum/skins/default/templates/index.html2
-rw-r--r--forum/skins/default/templates/index_.html2
-rw-r--r--forum/skins/default/templates/input_bar.html45
-rw-r--r--forum/skins/default/templates/question.html2
-rw-r--r--forum/skins/default/templates/questions.html10
-rw-r--r--forum/skins/default/templates/tags.html6
-rw-r--r--forum/skins/default/templates/user.html2
-rw-r--r--forum/skins/default/templates/user_reputation.html7
-rw-r--r--forum/skins/default/templates/users.html2
-rwxr-xr-xforum/templatetags/extra_tags.py4
-rw-r--r--forum/views/readers.py4
-rwxr-xr-xforum/views/users.py3
26 files changed, 204 insertions, 104 deletions
diff --git a/django_authopenid/views.py b/django_authopenid/views.py
index e2d8b67c..4f7d3efa 100755
--- a/django_authopenid/views.py
+++ b/django_authopenid/views.py
@@ -90,7 +90,7 @@ def login(request,user):
_login(request,user)
#4) transfer search_state to new session if found
if search_state:
- search_session.set_logged_in()
+ search_state.set_logged_in()
request.session['search_state'] = search_state
#5) send signal with old session key as argument
logging.debug('logged in user %s with session key %s' % (user.username, session_key))
diff --git a/forum/const.py b/forum/const.py
index dd85bb2e..11c833ea 100755
--- a/forum/const.py
+++ b/forum/const.py
@@ -131,3 +131,4 @@ CONST = {
#how to filter questions by tags in email digests?
TAG_EMAIL_FILTER_CHOICES = (('ignored', _('exclude ignored tags')),('interesting',_('allow only selected tags')))
MAX_ALERTS_PER_EMAIL = 7
+USERS_PAGE_SIZE = 28
diff --git a/forum/forms.py b/forum/forms.py
index 2c2df738..b205c6e1 100755
--- a/forum/forms.py
+++ b/forum/forms.py
@@ -174,7 +174,6 @@ class AdvancedSearchForm(forms.Form):
def clean(self):
#todo rewrite
- print self.cleaned_data
if self.cleaned_data['scope'] == '':
del self.cleaned_data['scope']
if self.cleaned_data['tags'] is None:
diff --git a/forum/middleware/view_log.py b/forum/middleware/view_log.py
index 213292fe..6472322b 100644
--- a/forum/middleware/view_log.py
+++ b/forum/middleware/view_log.py
@@ -49,7 +49,6 @@ class ViewLogMiddleware(object):
else:
view_str = view_func.__name__
if view_str == 'wrap':
- print str(view_func.__module__)# == 'forum.utils.decorators':
return
if settings.DEBUG == True:
diff --git a/forum/search/state_manager.py b/forum/search/state_manager.py
index 4b3772b6..8a66deb3 100644
--- a/forum/search/state_manager.py
+++ b/forum/search/state_manager.py
@@ -15,7 +15,6 @@ class SearchState(object):
self.page = 1
self.logged_in = False
logging.debug('new search state initialized')
- print 'new search state'
def __str__(self):
out = 'scope=%s\n' % self.scope
@@ -77,10 +76,7 @@ class SearchState(object):
if 'tags' in input:
if self.tags:
old_tags = self.tags.copy()
- print 'old tags %s' % str(old_tags)
- print 'new tags %s' % str(input['tags'])
self.tags = self.tags.union(input['tags'])
- print 'combined %s' % str(self.tags)
if self.tags != old_tags:
self.reset_page()
else:
diff --git a/forum/skins/default/media/style/style.css b/forum/skins/default/media/style/style.css
index 81c6965e..f96e9d67 100755
--- a/forum/skins/default/media/style/style.css
+++ b/forum/skins/default/media/style/style.css
@@ -217,7 +217,7 @@ blockquote {
}
#room {
- padding: 10px 0 10px 0;
+ padding: 0 0 10px 0;
background-color: #FFF;
border-bottom: 1px solid #777;
}
@@ -250,16 +250,15 @@ blockquote {
/*#licenseLogo {position:absolute;top:10px;right:10px;}*/
-/*顶部及导航栏*/
+/* why is this called top? - this contains links like login, faq, etc */
#top {
position: absolute;
top: 0px;
- right: 0px;
+ right: 250px;
height: 20px;
text-align: right;
padding: 3px;
background-color: #ffffff;
- width: 500px;
}
/*#header {width:960px;}*/
@@ -269,13 +268,21 @@ blockquote {
margin-left: 20px;
text-decoration: underline;
font-size: 12px;
- color: #333333;
+ color: #555555;
}
#logo {
padding: 5px 0px 0px 0px;
}
+#logoContainer {
+}
+#navTabContainer {
+ width: 500px;
+ text-align: left;
+}
+
+/* navBar includes logo, main tabs and links like logout, about, faq */
#navBar {
float: clear;
position: relative;
@@ -284,7 +291,7 @@ blockquote {
}
#navBar .nav {
- margin: 20px 0px 0px 16px; /*letter-spacing:1px; */
+ margin: 20px 0px 0px 0px; /*letter-spacing:1px; */
}
#navBar .nav a {
@@ -334,29 +341,24 @@ blockquote {
text-decoration: underline;
}
+/* todo: this is probably not used any more */
#navBar .nav div.focus {
float: right;
padding-right: 0px;
}
#searchBar {
- width: 958px;
- background-color: #888a85; /*#e9b96e;*/
- border: 1px solid #aaaaaa;
- padding: 4px 0 5px 5px;
-}
-#fakeSearchBar {
- width: 958px;
- height: 4px;
- background-color: #888a85; /*#e9b96e;*/
+ display:inline-block;
+ background-color: #cccccc;/*888a85; /*#e9b96e;*/
border: 1px solid #aaaaaa;
+ padding: 4px 7px 5px 5px;
}
#searchBar .searchInput {
font-size: 24px;
line-height: 24px;
height: 36px;
- width: 620px;
+ width: 598px;
margin: 0px;
padding: 5px 0 0 5px;
}
@@ -365,7 +367,7 @@ blockquote {
font-size: 24px;
line-height: 24px;
height: 36px;
- width: 570px;
+ width: 552px;
padding: 5px 0 0 5px;
margin: 0px;
}
@@ -391,6 +393,26 @@ blockquote {
text-align: center;
}
+#askFormBar {
+ display:inline-block;
+ background-color: #e3e3e3;/*888a85; /*#e9b96e;*/
+ border: 1px solid #aaaaaa;
+ padding: 4px 7px 5px 5px;
+}
+#askFormBar p {
+ width: 685px;
+ margin:0 0 5px 0;
+}
+#askFormBar .questionTitleInput {
+ font-size: 24px;
+ line-height: 24px;
+ height: 36px;
+ width: 680px;
+ margin: 0px;
+ padding: 5px 0 0 5px;
+}
+
+
#searchBar .options {
padding: 3px 0 3px 0;
font-size: 100%;
@@ -654,13 +676,16 @@ blockquote {
}
.boxC {
- background: #cacdc6; /*f9f7ed;*/
+ background: white /*#cacdc6; /*f9f7ed;*/
padding: 10px;
margin-bottom: 8px;
+ margin-left: 10px;
+ /*
border-top: 1px solid #eeeeec;
border-left: 1px solid #eeeeec;
border-right: 1px solid #a9aca5;
border-bottom: 1px solid #babdb6;
+ */
}
.boxC p {
@@ -877,6 +902,7 @@ a:hover.medal {
width: 100%;
clear: both;
margin-bottom: 3px;
+ margin-top: 3px;
}
.tabsA {
@@ -996,6 +1022,7 @@ a:hover.medal {
padding-left: 24px;
}
+/* todo: make this class applicable to all headers it is actually uses in tags.html too */
.headUsers {
float: left;
height: 23px;
@@ -1531,7 +1558,8 @@ span.form-error {
font-size: 100%;
min-height: 200px;
line-height: 18px;
- width: 100%;
+ width: 697px;
+ margin:0;
}
#id_title {
@@ -1539,9 +1567,9 @@ span.form-error {
}
.wmd-preview {
- margin-top: 10px;
+ margin: 10px 0 0 0;
padding: 6px;
- width: 100%;
+ width: 691px;
background-color: #F5F5F5;
min-height: 20px;
}
@@ -1729,7 +1757,6 @@ ins .post-tag {
}
.narrow .stats {
- background: transparent none repeat scroll 0 0;
float: left;
height: 48px;
margin: 0 0 0 7px;
@@ -1738,6 +1765,11 @@ ins .post-tag {
font-family: Arial;
}
+/* todo: remove this hack? */
+.user-stats-table .narrow {
+ width: 660px;
+}
+
.stats div {
font-size: 11px;
text-align: center;
@@ -2546,15 +2578,16 @@ p.signup_p {
}
.karma-diagram {
- width:550px;
- height:250px;
+ width:390px;
+ height:300px;
float:left;
+ margin-right:10px;
}
.karma-details {
float:right;
- width:385px;
- height:300px;
+ width:300px;
+ height:250px;
overflow-y:auto;
word-wrap:break-word;
}
diff --git a/forum/skins/default/templates/about.html b/forum/skins/default/templates/about.html
index 66dcc3fd..686141b3 100644
--- a/forum/skins/default/templates/about.html
+++ b/forum/skins/default/templates/about.html
@@ -1,4 +1,4 @@
-{% extends "base_content.html" %}
+{% extends "base.html" %}
<!-- template about.html -->
{% load i18n %}
{% load extra_tags %}
diff --git a/forum/skins/default/templates/ask.html b/forum/skins/default/templates/ask.html
index 083b01d9..4278f4cb 100644
--- a/forum/skins/default/templates/ask.html
+++ b/forum/skins/default/templates/ask.html
@@ -56,6 +56,7 @@
</script>
{% endblock %}
+{% comment %}
{% block content %}
<div id="main-bar" class="headNormal">
{% trans "Ask a question" %}
@@ -124,6 +125,7 @@
</div>
</div>
{% endblock %}
+{% endcomment %}
{% block sidebar %}
{% include "question_edit_tips.html" %}
diff --git a/forum/skins/default/templates/ask_form.html b/forum/skins/default/templates/ask_form.html
new file mode 100644
index 00000000..25e9fe6c
--- /dev/null
+++ b/forum/skins/default/templates/ask_form.html
@@ -0,0 +1,66 @@
+{% load i18n %}
+{% load smart_if %}
+<div id="askform">
+ <form id="fmask" action="" method="post" >
+ <div class="form-item">
+ {% comment %}
+ <label for="id_title" ><strong>{{ form.title.label_tag }}:</strong></label>
+ {% endcomment %}
+ <div id="askFormBar">
+ {% if not request.user.is_authenticated %}
+ <p>{% trans "login to post question info" %}</p>
+ {% else %}
+ {% ifequal settings.EMAIL_VALIDATION 'on' %}
+ {% if not request.user.email_isvalid %}
+ {% blocktrans with request.user.email as email %}must have valid {{email}} to post,
+ see {{email_validation_faq_url}}
+ {% endblocktrans %}
+ {% endif %}
+ {% endifequal %}
+ {% endif %}
+ <input id="id_title" class="questionTitleInput" name="title"
+ value="{% if form.initial.title %}{{form.initial.title}}{% endif %}"/>
+ </div>
+ {{ form.title.errors }}
+ <span class="form-error"></span><br/>
+ <div class="title-desc">
+ {{ form.title.help_text }}
+ </div>
+ </div>
+
+ <div class="form-item">
+ <div id="wmd-button-bar" class="wmd-panel"></div>
+ {{ form.text }}
+
+ <div class="preview-toggle">
+ <table>
+ <tr>
+ <td>
+ <span id="pre-collapse" title="{% trans "Toggle the real time Markdown editor preview" %}">{% trans "toggle preview" %}</span>
+ </td>
+ {% if settings.WIKI_ON %}
+ <td style="text-align:right;">
+ {{ form.wiki }} <span style="font-weight:normal;cursor:help" title="{{form.wiki.help_text}}">{{ form.wiki.label_tag }} </span>
+ </td>
+ {% endif %}
+ </tr>
+
+ </table>
+ </div>
+ <div id="previewer" class="wmd-preview"></div>
+ <span class="form-error"></span>
+ </div>
+ <div class="form-item">
+ <strong>{{ form.tags.label_tag }}:</strong> {% trans "(required)" %} <span class="form-error"></span><br/>
+ {{ form.tags }} {{ form.tags.errors }}
+ </div>
+ <p class="title-desc">
+ {{ form.tags.help_text }}
+ </p>
+ {% if not request.user.is_authenticated %}
+ <input type="submit" value="{% trans "Login/signup to post your question" %}" class="submit" />
+ {% else %}
+ <input type="submit" value="{% trans "Ask your question" %}" class="submit" />
+ {% endif %}
+ </form>
+</div>
diff --git a/forum/skins/default/templates/base.html b/forum/skins/default/templates/base.html
index fe5a95a3..0b85e7fb 100644
--- a/forum/skins/default/templates/base.html
+++ b/forum/skins/default/templates/base.html
@@ -68,6 +68,7 @@
<div id="wrapper">
<div id="room">
<div id="CALeft">
+ {% include "input_bar.html" %}
{% block content%}
{% endblock%}
diff --git a/forum/skins/default/templates/base_content.html b/forum/skins/default/templates/base_content.html
index c98e1f67..fff7838d 100644
--- a/forum/skins/default/templates/base_content.html
+++ b/forum/skins/default/templates/base_content.html
@@ -55,6 +55,7 @@
<div id="wrapper">
<div id="room">
<div id="CAFull">
+ {% include "input_bar.html" %}
{% block content%}
{% endblock%}
diff --git a/forum/skins/default/templates/faq.html b/forum/skins/default/templates/faq.html
index ca963237..cc790ccc 100644
--- a/forum/skins/default/templates/faq.html
+++ b/forum/skins/default/templates/faq.html
@@ -1,4 +1,4 @@
-{% extends "base_content.html" %}
+{% extends "base.html" %}
<!-- template faq.html -->
{% load extra_tags %}
{% load humanize %}
diff --git a/forum/skins/default/templates/feedback.html b/forum/skins/default/templates/feedback.html
index 38bb48ff..af4f635f 100644
--- a/forum/skins/default/templates/feedback.html
+++ b/forum/skins/default/templates/feedback.html
@@ -1,4 +1,4 @@
-{% extends "base_content.html" %}
+{% extends "base.html" %}
<!-- template about.html -->
{% load i18n %}
{% load extra_tags %}
diff --git a/forum/skins/default/templates/header.html b/forum/skins/default/templates/header.html
index efc0d8f2..5d634dd7 100644
--- a/forum/skins/default/templates/header.html
+++ b/forum/skins/default/templates/header.html
@@ -14,15 +14,15 @@
<a href="{% url about %}">{% trans "about" %}</a>
<a href="{% url faq %}">{% trans "faq" %}</a>
</div>
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td width="23%">
+ <td id="logoContainer">
<div id="logo">
<a href="{% url questions %}?start_over=true"><img
src="{% media "/media/images/logo.png" %}" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/></a>
</div>
</td>
- <td width="77%" valign="bottom">
+ <td id="navTabContainer" valign="bottom" align="left">
<div class="nav">
<a id="nav_questions" href="{% url questions %}" >{% trans "questions" %}</a>
<a id="nav_tags" href="{% url tags %}">{% trans "tags" %}</a>
@@ -43,48 +43,5 @@
</tr>
</table>
</div>
- {% if active_tab != "ask" %}
- <div id="searchBar">
- {% comment %}url action depends on which tab is active{% endcomment %}
- <form
- {% if active_tab == "tags" or active_tab == "users" %}
- action="{% url search %}"
- {% else %}
- action="{% url questions %}"
- {% endif %}
- method="get">
- {% comment %} class was searchInput {% endcomment %}
- <input
- {% if query %}
- class="searchInputCancelable"
- {% else %}
- class="searchInput"
- {% endif %}
- type="text"
- value="{{ query|default_if_none:"" }}"
- name="query"
- id="keywords"/>
- {% if active_tab == "tags" %}
- <input type="hidden" name="t" value="tag"/>
- {% else %}
- {% if active_tab == "users" %}
- <input type="hidden" name="t" value="user"/>
- {% endif %}
- {% endif %}
- {% if query %}{% comment %}query is only defined by questions view{% endcomment %}
- <input type="button"
- value="x"
- name="reset_query"
- {% comment %}todo - make sure it works on Enter keypress{% endcomment %}
- onclick="window.location.href='{% url questions %}?reset_query=true'"
- value="true"
- class="cancelSearchBtn"/>
- {% endif %}
- <input type="submit" value="{% trans "search" %}" name="search" class="searchBtn" default />
- </form>
- </div>
- {% else %}
- <div id="fakeSearchBar"></div>
- {% endif %}
</div>
<!-- end template header.html -->
diff --git a/forum/skins/default/templates/index.html b/forum/skins/default/templates/index.html
index b90d788a..f94f84fc 100644
--- a/forum/skins/default/templates/index.html
+++ b/forum/skins/default/templates/index.html
@@ -23,7 +23,7 @@
{% endblock %}
{% block content %}
<div class="tabBar">
- <div class="headQuestions">{% trans "Questions" %}</div>
+ <div class="headUsers">{% trans "Questions" %}</div>
<div class="tabsA">
<a id="latest" href="{% url questions %}?sort=latest" title="{% trans "last updated questions" %}" >{% trans "newest" %}</a>
<a id="hottest" href="{% url questions %}?sort=hottest" title="{% trans "hottest questions" %}" >{% trans "hottest" %}</a>
diff --git a/forum/skins/default/templates/index_.html b/forum/skins/default/templates/index_.html
index 8ba169a7..36531f62 100644
--- a/forum/skins/default/templates/index_.html
+++ b/forum/skins/default/templates/index_.html
@@ -22,7 +22,7 @@
{% endblock %}
{% block content %}
<div class="tabBar">
- <div class="headQuestions">{% trans "Questions" %}</div>
+ <div class="headUsers">{% trans "Questions" %}</div>
<div class="tabsA">
<a id="latest" href="{% url index %}?sort=latest" title="{% trans "last updated questions" %}" >{% trans "newest" %}</a>
<a id="hottest" href="{% url index %}?sort=hottest" title="{% trans "hottest questions" %}" >{% trans "hottest" %}</a>
diff --git a/forum/skins/default/templates/input_bar.html b/forum/skins/default/templates/input_bar.html
new file mode 100644
index 00000000..59236350
--- /dev/null
+++ b/forum/skins/default/templates/input_bar.html
@@ -0,0 +1,45 @@
+{% load i18n %}
+{% load smart_if %}
+{% if active_tab != "ask" %}
+<div id="searchBar">
+ {% comment %}url action depends on which tab is active{% endcomment %}
+ <form
+ {% if active_tab == "tags" or active_tab == "users" %}
+ action="{% url search %}"
+ {% else %}
+ action="{% url questions %}"
+ {% endif %}
+ method="get">
+ {% comment %} class was searchInput {% endcomment %}
+ <input
+ {% if query %}
+ class="searchInputCancelable"
+ {% else %}
+ class="searchInput"
+ {% endif %}
+ type="text"
+ value="{{ query|default_if_none:"" }}"
+ name="query"
+ id="keywords"/>
+ {% if query %}{% comment %}query is only defined by questions view{% endcomment %}
+ <input type="button"
+ value="x"
+ name="reset_query"
+ {% comment %}todo - make sure it works on Enter keypress{% endcomment %}
+ onclick="window.location.href='{% url questions %}?reset_query=true'"
+ value="true"
+ class="cancelSearchBtn"/>
+ {% endif %}
+ <input type="submit" value="{% trans "search" %}" name="search" class="searchBtn" default />
+ {% if active_tab == "tags" %}
+ <input type="hidden" name="t" value="tag"/>
+ {% else %}
+ {% if active_tab == "users" %}
+ <input type="hidden" name="t" value="user"/>
+ {% endif %}
+ {% endif %}
+ </form>
+</div>
+{% else %}
+ {% include "ask_form.html" %}
+{% endif %}
diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html
index c3564a34..79ff9a5b 100644
--- a/forum/skins/default/templates/question.html
+++ b/forum/skins/default/templates/question.html
@@ -226,7 +226,7 @@
<hr/>
<div class="tabBar">
<a name="sort-top"></a>
- <div class="headQuestions">
+ <div class="headUsers">
{% blocktrans count answers|length as counter %}
One Answer:
{% plural %}
diff --git a/forum/skins/default/templates/questions.html b/forum/skins/default/templates/questions.html
index 03ccc324..f864180f 100644
--- a/forum/skins/default/templates/questions.html
+++ b/forum/skins/default/templates/questions.html
@@ -27,7 +27,7 @@
{% block content %}
<div class="tabBar">
{% comment %}
- <div class="headQuestions">
+ <div class="headUsers">
{% if searchtag %}
{% trans "Found by tags" %}
{% else %}
@@ -50,7 +50,7 @@
<div class="tabsC">
<span class="label">{% trans "In:" %}</span>
<a id="all" class="off" href="?scope=all" title="{% trans "see all questions" %}">{% trans "all" %}</a>
- <a id="unanswered" class="off" href="?scope=unanswered" title="{% trans "see unanswered questions" %}">{% trans "unanswered" %}</a>
+ <a id="unanswered" class="off" href="?scope=unanswered&sort=coldest" title="{% trans "see unanswered questions" %}">{% trans "unanswered" %}</a>
{% if request.user.is_authenticated %}
<a id="favorite" class="off" href="?scope=favorite" title="{% trans "see your favorite questions" %}">{% trans "favorite" %}</a>
{% endif %}
@@ -99,18 +99,18 @@
<a id="coldest"
href="?sort=hottest"
class="off"
- title="{% trans "click to see hottest questions" %}">{% trans "coldest" %}</a>
+ title="{% trans "click to see hottest questions" %}">{% trans "less answers" %}</a>
{% else %}
{% if sort == "hottest" %}
<a id="hottest"
href="?sort=coldest"
class="off"
- title="{% trans "click to see coldest questions" %}">{% trans "hottest" %}</a>
+ title="{% trans "click to see coldest questions" %}">{% trans "more answers" %}</a>
{% else %}
<a id="hottest"
href="?sort=hottest"
class="off"
- title="{% trans "click to see hottest questions" %}">{% trans "hottest" %}</a>
+ title="{% trans "click to see hottest questions" %}">{% trans "more answers" %}</a>
{% endif %}
{% endif %}
diff --git a/forum/skins/default/templates/tags.html b/forum/skins/default/templates/tags.html
index 2bc01070..6627db32 100644
--- a/forum/skins/default/templates/tags.html
+++ b/forum/skins/default/templates/tags.html
@@ -1,4 +1,4 @@
-{% extends "base_content.html" %}
+{% extends "base.html" %}
<!-- tags.html -->
{% load i18n %}
{% load extra_tags %}
@@ -27,7 +27,7 @@
{% block content %}
<!-- Tabs -->
<div class="tabBar">
- <div class="headQuestions">{% trans "Tag list" %}</div>
+ <div class="headUsers">{% trans "Tag list" %}</div>
<div class="tabsA">
<a id="sort_name" href="{% url tags %}?sort=name" class="off" title="{% trans "sorted alphabetically" %}">{% trans "by name" %}</a>
<a id="sort_used" href="{% url tags %}?sort=used" class="off" title="{% trans "sorted by frequency of tag use" %}">{% trans "by popularity" %}</a>
@@ -36,7 +36,7 @@
<div id="searchtags">
<p>
{% if stag %}
- {% trans "All tags matching query" %} '<span class="darkred"><strong>{{ stag }}</strong></span>' {% trans "all tags - make this empty in english" %}:
+ {% blocktrans %}All tags matching '<span class="darkred"><strong>{{ stag }}</strong></span>'{% endblocktrans %}:
{% endif %}
{% if not tags.object_list %}
<span>{% trans "Nothing found" %}</span>
diff --git a/forum/skins/default/templates/user.html b/forum/skins/default/templates/user.html
index 5931f31c..8fd9e267 100644
--- a/forum/skins/default/templates/user.html
+++ b/forum/skins/default/templates/user.html
@@ -1,4 +1,4 @@
-{% extends "base_content.html" %}
+{% extends "base.html" %}
<!-- user.html -->
{% load extra_tags %}
{% load extra_filters %}
diff --git a/forum/skins/default/templates/user_reputation.html b/forum/skins/default/templates/user_reputation.html
index 954fb44d..f6a33d93 100644
--- a/forum/skins/default/templates/user_reputation.html
+++ b/forum/skins/default/templates/user_reputation.html
@@ -4,6 +4,7 @@
{% load extra_filters %}
{% load humanize %}
{% load i18n %}
+{% load smart_if %}
{% block userjs %}
<script type='text/javascript' src='{% media "/media/js/excanvas.min.js" %}'></script>
<script type='text/javascript' src='{% media "/media/js/jquery.flot.min.js" %}'></script>
@@ -24,7 +25,11 @@
{% block usercontent %}
<div class="karma-summary">
<div id="diagram" class="karma-diagram"></div>
- <h3>{% trans "Change in karma per question or answer" %}</h3>
+ {% if view_user.id == user.id %}
+ <h3>{% trans "Your karma change log." %}</h3>
+ {% else %}
+ <h3>{% blocktrans with view_user.username as user_name %}{{user_name}}'s karma change log{% endblocktrans %}</h3>
+ {% endif %}
<div class="karma-details">
{% for rep in reputation %}
<p>
diff --git a/forum/skins/default/templates/users.html b/forum/skins/default/templates/users.html
index 78715e05..f3ccd6e9 100644
--- a/forum/skins/default/templates/users.html
+++ b/forum/skins/default/templates/users.html
@@ -1,4 +1,4 @@
-{% extends "base_content.html" %}
+{% extends "base.html" %}
<!-- users.html -->
{% load extra_tags %}
{% load humanize %}
diff --git a/forum/templatetags/extra_tags.py b/forum/templatetags/extra_tags.py
index a10c473b..83aeb4c7 100755
--- a/forum/templatetags/extra_tags.py
+++ b/forum/templatetags/extra_tags.py
@@ -467,13 +467,10 @@ class IsManyNode(template.Node):
maybe = False
for item in self.test_items:
is_good = item.resolve(context)
- print item, is_good
if maybe == True and is_good:
- print 'have many!'
return self.true_nodelist.render(context)
if is_good:
maybe = True
- print 'have one item'
return self.false_nodelist.render(context)
@register.tag(name='ifmany')
@@ -497,7 +494,6 @@ def ifmany(parser,token):
true_nodelist = parser.parse((end_tag,else_tag,))
token = parser.next_token()
if token.contents == else_tag:
- print 'have else clause'
false_nodelist = parser.parse((end_tag,))
token = parser.next_token()
else:
diff --git a/forum/views/readers.py b/forum/views/readers.py
index 01dfc035..7fd30a25 100644
--- a/forum/views/readers.py
+++ b/forum/views/readers.py
@@ -81,10 +81,10 @@ def questions(request):#a view generating listing of questions, used by 'unanswe
search_state = request.session.get('search_state', SearchState())
view_log = request.session['view_log']
- print view_log
+ #print view_log
if view_log.get_previous(1) != 'questions':
if view_log.get_previous(2) != 'questions':
- print 'user stepped too far, resetting search state'
+ #print 'user stepped too far, resetting search state'
search_state.reset()
if request.user.is_authenticated():
diff --git a/forum/views/users.py b/forum/views/users.py
index 2356bf38..8af5a1e8 100755
--- a/forum/views/users.py
+++ b/forum/views/users.py
@@ -16,6 +16,7 @@ from forum.utils.html import sanitize_html
from forum import auth
import calendar
from django.contrib.contenttypes.models import ContentType
+from forum.const import USERS_PAGE_SIZE
question_type = ContentType.objects.get_for_model(Question)
answer_type = ContentType.objects.get_for_model(Answer)
@@ -30,8 +31,6 @@ question_revision_type_id = question_revision_type.id
answer_revision_type_id = answer_revision_type.id
repute_type_id = repute_type.id
-USERS_PAGE_SIZE = 35# refactor - move to some constants file
-
def users(request):
is_paginated = True
sortby = request.GET.get('sort', 'reputation')