diff options
author | Adolfo Fitoria <fitoria@fitoria-laptop.(none)> | 2009-08-16 17:05:27 -0600 |
---|---|---|
committer | Adolfo Fitoria <fitoria@fitoria-laptop.(none)> | 2009-08-16 17:05:27 -0600 |
commit | a32975a5d8acf5fa54f544271e2cfb9e92bbf8bf (patch) | |
tree | 5bf13b5605e40c755e20edf9be45e3a20308d5dd /templates | |
parent | fa30dc90be82aa0f818e14110e9b86373f7c8a35 (diff) | |
parent | f15cb4dc7d9284a24f75dc8b56248916140ceb09 (diff) | |
download | askbot-a32975a5d8acf5fa54f544271e2cfb9e92bbf8bf.tar.gz askbot-a32975a5d8acf5fa54f544271e2cfb9e92bbf8bf.tar.bz2 askbot-a32975a5d8acf5fa54f544271e2cfb9e92bbf8bf.zip |
Merge branch 'evgenyfadeev/master'
Conflicts:
locale/en/LC_MESSAGES/django.mo
locale/es/LC_MESSAGES/django.mo
locale/es/LC_MESSAGES/django.po
Diffstat (limited to 'templates')
-rw-r--r-- | templates/404.html | 8 | ||||
-rw-r--r-- | templates/500.html | 4 | ||||
-rw-r--r-- | templates/answer_edit_tips.html | 2 | ||||
-rw-r--r-- | templates/badge.html | 2 | ||||
-rw-r--r-- | templates/book.html | 4 | ||||
-rw-r--r-- | templates/content/js/com.cnprog.i18n.js | 2 | ||||
-rw-r--r-- | templates/content/js/com.cnprog.post.js | 2 | ||||
-rw-r--r-- | templates/content/style/style.css | 2 | ||||
-rw-r--r-- | templates/faq.html | 14 | ||||
-rw-r--r-- | templates/footer.html | 8 | ||||
-rw-r--r-- | templates/header.html | 30 | ||||
-rw-r--r-- | templates/index.html | 24 | ||||
-rw-r--r-- | templates/question.html | 18 | ||||
-rw-r--r-- | templates/question_edit_tips.html | 3 | ||||
-rw-r--r-- | templates/revisions_answer.html | 2 | ||||
-rw-r--r-- | templates/revisions_question.html | 2 | ||||
-rw-r--r-- | templates/tags.html | 4 | ||||
-rw-r--r-- | templates/user_info.html | 2 | ||||
-rw-r--r-- | templates/user_reputation.html | 2 | ||||
-rw-r--r-- | templates/user_stats.html | 84 | ||||
-rw-r--r-- | templates/user_tabs.html | 14 | ||||
-rw-r--r-- | templates/user_votes.html | 4 | ||||
-rw-r--r-- | templates/users_questions.html | 36 |
23 files changed, 115 insertions, 158 deletions
diff --git a/templates/404.html b/templates/404.html index 7090156b..2fa38f99 100644 --- a/templates/404.html +++ b/templates/404.html @@ -27,7 +27,7 @@ <ul> <li>{% trans "this question or answer has been deleted;" %}</li> <li>{% trans "url has error - please check it;" %}</li> - <li>{% trans "the page you tried to visit is protected or you don't have sufficient points, see" %} <a href="/faq"> faq</a>;</li> + <li>{% trans "the page you tried to visit is protected or you don't have sufficient points, see" %} <a href="{% url faq %}"> faq</a>;</li> <li>{% trans "if you believe this error 404 should not have occured, please" %} <a href="{{feedback_site_url}}" target="_blank">{% trans "report this problem" %}</a></li> </u> @@ -38,9 +38,9 @@ </script> <script type="text/javascript" src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script> <ul> - <li><a href="#" id="linkPrevious">{% trans "back to previous page" %} » </li> - <li><a href="/questions">{% trans "see all questions" %} » </a></li> - <li><a href="/tags/">{% trans "see all tags" %} » </a></li> + <li><a href="#" id="linkPrevious">{% trans "back to previous page" %} »</li> + <li><a href="{% url questions %}">{% trans "see all questions" %} »</a></li> + <li><a href="{% url tags %}">{% trans "see all tags" %} »</a></li> </u> </div> diff --git a/templates/500.html b/templates/500.html index 313150fb..51e73178 100644 --- a/templates/500.html +++ b/templates/500.html @@ -25,8 +25,8 @@ {% trans "please report the error to the site administrators if you wish" %} <ul> <li><a href="#" id="linkPrevious">{% trans "back to previous page" %}</li> - <li><a href="/questions">{% trans "see latest questions" %}</a></li> - <li><a href="/tags/">{% trans "see tags" %}</a></li> + <li><a href="{% url questions %}">{% trans "see latest questions" %}</a></li> + <li><a href="{% url tags %}">{% trans "see tags" %}</a></li> </u> </div> diff --git a/templates/answer_edit_tips.html b/templates/answer_edit_tips.html index bf1cd516..33e4e242 100644 --- a/templates/answer_edit_tips.html +++ b/templates/answer_edit_tips.html @@ -16,7 +16,7 @@ {% trans "be clear and concise" %} </li> </ul> - <a href="/faq/" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a> + <a href="{% url faq %}" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a> </div> </div> diff --git a/templates/badge.html b/templates/badge.html index 029ba0d9..73cba4ba 100644 --- a/templates/badge.html +++ b/templates/badge.html @@ -28,7 +28,7 @@ </div> <div id="award-list" style="clear:both;margin-left:20px;line-height:25px;"> {% for award in awards %} - <p style="width:185px;float:left"><a href="/users/{{ award.id }}/{{ award.name }}">{{ award.name }}</a> {% get_score_badge_by_details award.rep award.gold award.silver award.bronze %}</p> + <p style="width:185px;float:left"><a href="{% url users %}{{ award.id }}/{{ award.name }}">{{ award.name }}</a> {% get_score_badge_by_details award.rep award.gold award.silver award.bronze %}</p> {% endfor %} </div> diff --git a/templates/book.html b/templates/book.html index 23166cb7..cc6fc77b 100644 --- a/templates/book.html +++ b/templates/book.html @@ -98,7 +98,7 @@ <div class="favorites-empty"> </div> {% endif %} <div id="question-summary-{{question.id}}" class="question-summary narrow"> - <a style="text-decoration: none;" href="/questions/{{question.id}}/{{question.get_question_title}}"> + <a style="text-decoration: none;" href="{% url questions %}{{question.id}}/{{question.get_question_title}}"> <div class="stats"> <div class="votes"> <div class="vote-count-post">{{question.score|intcomma}}</div> @@ -118,7 +118,7 @@ </a> <div class="bookQuestionItem"> <h3> - <a title="{{question.summary|collapse}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a> + <a title="{{question.summary|collapse}}" href="{% url questions %}{{question.id}}/{{question.title}}">{{question.title}}</a> </h3> <div class="tags"> {% for tag in question.tagname_list %} diff --git a/templates/content/js/com.cnprog.i18n.js b/templates/content/js/com.cnprog.i18n.js index 848ad59e..6ba8b59d 100644 --- a/templates/content/js/com.cnprog.i18n.js +++ b/templates/content/js/com.cnprog.i18n.js @@ -140,6 +140,8 @@ var i18nEs = { 'enter image url':'introduzca la URL de la imagen, por ejemplo:<br />http://www.example.com/image.jpg \"titulo de imagen\"', 'enter url':'introduzca direcciones web, ejemplo:<br />http://www.cnprog.com/ \"titulo del enlace\"</p>"', 'upload image':'cargar imagen:', + 'questions/' : 'preguntas/', + 'vote/' : 'votar/', }; var i18n = { diff --git a/templates/content/js/com.cnprog.post.js b/templates/content/js/com.cnprog.post.js index 546cf101..aa6c51b6 100644 --- a/templates/content/js/com.cnprog.post.js +++ b/templates/content/js/com.cnprog.post.js @@ -243,7 +243,7 @@ var Vote = function(){ type: "POST", cache: false, dataType: "json", - url: "/questions/" + questionId + "/vote/", + url: "/" + $.i18n._("questions/") + questionId + "/" + $.i18n._("vote/"), data: { "type": voteType, "postId": postId }, error: handleFail, success: function(data){callback(object, voteType, data)}}); diff --git a/templates/content/style/style.css b/templates/content/style/style.css index e353dd47..6d48198b 100644 --- a/templates/content/style/style.css +++ b/templates/content/style/style.css @@ -745,7 +745,7 @@ background-color: #97ff97; } /*用户资料页面*/ -.count {font-family:Arial;font-size:200%;font-weight:700;color:#777} +.count {font-family:Arial;font-size:24px;font-weight:700;color:#777} .scoreNumber{font-family:Arial;font-size:35px;font-weight:800;color:#777;line-height:40px; /*letter-spacing:0px*/ } diff --git a/templates/faq.html b/templates/faq.html index 7e99ae7f..aec37a56 100644 --- a/templates/faq.html +++ b/templates/faq.html @@ -25,7 +25,7 @@ <div> <h3 class="subtitle">{% trans "What should I avoid in my answers?" %}</h3> - <p>{% trans "site title" %} {% trans "is a Q&A site, not a discussion group. Therefore - please avoid having discussions in your answers, comment facility allows some space for brief discussions." %}</p> + <p>{{ settings.APP_TITLE }} {% trans "is a Q&A site, not a discussion group. Therefore - please avoid having discussions in your answers, comment facility allows some space for brief discussions." %}</p> </div> <div> @@ -39,13 +39,7 @@ <div> <h3 class="subtitle">{% trans "How does reputation system work?" %}</h3> <p>{% trans "Rep system summary" %}</p> - <p> - For example, if you ask an interesting question or give a helpful answer, your input will be upvoted. - On the other hand if the answer is misleading - it will be downvoted. - Each vote in favor will generate <strong>10</strong> points, each vote against will subtract <strong>2</strong> points. - There is a limit of <strong>200</strong> points that can be accumulated per question or answer. - - The table below explains reputation point requirements for each type of moderation task. + <p>{% blocktrans %}For example, if you ask an interesting question or give a helpful answer, your input will be upvoted. On the other hand if the answer is misleading - it will be downvoted. Each vote in favor will generate <strong>10</strong> points, each vote against will subtract <strong>2</strong> points. There is a limit of <strong>200</strong> points that can be accumulated per question or answer. The table below explains reputation point requirements for each type of moderation task.{% endblocktrans %} </p> <table style="font-family:arial;" cellspacing="3" cellpadding="3"> @@ -115,7 +109,7 @@ <div> <h3 class="subtitle">{% trans "To register, do I need to create new password?" %}</h3> <p>{% trans "No, you don't have to. You can login through any service that supports OpenID, e.g. Google, Yahoo, AOL, etc." %} - <strong><a href="/account/signin">{% trans "Login now!" %}</a> »</strong> + <strong><a href="{% url user_signin %}">{% trans "Login now!" %}</a> »</strong> </p> </div> @@ -129,7 +123,7 @@ <h3 class="subtitle">{% trans "Still have questions?" %}</h3> <p>{% trans "Please ask your question, help make our community better!" %} <!-- - <a href="/tags/faq" class="big">{% trans "site title" %} {% trans "questions" %}</a>{% trans "." %} + <a href="{% url tags %}faq" class="big">{{ settings.APP_TITLE }} {% trans "questions" %}</a>{% trans "." %} --> </p> </div> diff --git a/templates/footer.html b/templates/footer.html index c291c328..9e877b42 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -4,11 +4,11 @@ <!-- 页面底部开始: --> <div id="ground"> <div class="footerLinks" > - <a href="/about">{% trans "about" %}</a><span class="link-separator"> |</span> - <a href="/faq">{% trans "faq" %}</a><span class="link-separator"> |</span> + <a href="{% url about %}">{% trans "about" %}</a><span class="link-separator"> |</span> + <a href="{% url faq %}">{% trans "faq" %}</a><span class="link-separator"> |</span> <a href="{{ blog_url }}">{% trans "blog" %}</a><span class="link-separator"> |</span> <a href="{{ webmaster_email }}">{% trans "contact us" %}</a><span class="link-separator"> |</span> - <a href="/privacy">{% trans "privacy policy" %}</a><span class="link-separator"> |</span> + <a href="{% url privacy %}">{% trans "privacy policy" %}</a><span class="link-separator"> |</span> <a href="{{ feedback_url }}" target="_blank">{% trans "give feedback" %}</a> </div> <p style="margin-top:10px;"> @@ -27,7 +27,7 @@ </script> <script type="text/javascript"> try { - var pageTracker = _gat._getTracker({{ settings.GOOGLE_ANALYTICS_KEY }}); + var pageTracker = _gat._getTracker("{{ settings.GOOGLE_ANALYTICS_KEY }}"); pageTracker._trackPageview(); } catch(err) {} </script> diff --git a/templates/header.html b/templates/header.html index d606e9e7..e1097802 100644 --- a/templates/header.html +++ b/templates/header.html @@ -6,13 +6,13 @@ <div id="top"> <!--<div id="header">--> {% if request.user.is_authenticated %} - <a href="/users/{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %} - <a href="/logout/">{% trans "logout" %}</a> + <a href="{% url users %}{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %} + <a href="{% url logout %}">{% trans "logout" %}</a> {% else %} - <a href="/account/signin">{% trans "login" %}</a> + <a href="{% url user_signin %}">{% trans "login" %}</a> {% endif %} - <a href="/about">{% trans "about" %}</a> - <a href="/faq">{% trans "faq" %}</a> + <a href="{% url about %}">{% trans "about" %}</a> + <a href="{% url faq %}">{% trans "faq" %}</a> <!--</div>--> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> @@ -26,20 +26,22 @@ </td> <td width="77%" valign="bottom"> <div class="nav"> - <a id="nav_questions" href="/questions/" >{% trans "questions" %}</a> - <a id="nav_tags" href="/tags/">{% trans "tags" %}</a> - <a id="nav_users" href="/users/">{% trans "users" %}</a> - <!--<a id="nav_books" href="/books/">{% trans "books" %}</a>--> - <a id="nav_badges" href="/badges/">{% trans "badges" %}</a> - <a id="nav_unanswered" href="/questions/unanswered/">{% trans "unanswered questions" %}</a> + <a id="nav_questions" href="{% url questions %}" >{% trans "questions" %}</a> + <a id="nav_tags" href="{% url tags %}">{% trans "tags" %}</a> + <a id="nav_users" href="{% url users %}">{% trans "users" %}</a> + {% if settings.BOOKS_ON %} + <a id="nav_books" href="{% url books %}">{% trans "books" %}</a> + {% endif %} + <a id="nav_badges" href="{% url badges %}">{% trans "badges" %}</a> + <a id="nav_unanswered" href="{% url unanswered %}">{% trans "unanswered questions" %}</a> {% comment %}<!-- i think this needs to be removed -e.f. --> {% if request.user.is_authenticated %} - <a id="nav_profile" href="/users/{{ request.user.id }}/{{ request.user.username }}/">{% trans "my profile" %}</a> + <a id="nav_profile" href="{% url user %}{{ request.user.id }}/{{ request.user.username }}/">{% trans "my profile" %}</a> {% endif %} {% endcomment %} <div class="focus"> - <a id="nav_ask" href="/questions/ask/" class="special">{% trans "ask a question" %}</a> + <a id="nav_ask" href="{% url ask %}" class="special">{% trans "ask a question" %}</a> </div> </div> @@ -51,7 +53,7 @@ <table width="100%" border="0" cellpadding="0" cellspacing="0" class="content"> <tr> <td align="center" valign="middle"> - <form action="/search/" method="get"> + <form action="{% url search %}" method="get"> <div> <input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" /> <input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" /> diff --git a/templates/index.html b/templates/index.html index 964721f7..104b24d0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -21,10 +21,10 @@ <div class="tabBar"> <div class="headQuestions">{% trans "Questions" %}</div> <div class="tabsA"> - <a id="latest" href="?sort=latest" title="{% trans "last updated questions" %}" >{% trans "newest" %}</a> - <a id="hottest" href="?sort=hottest" title="{% trans "hottest questions" %}" >{% trans "hottest" %}</a> - <a id="mostvoted" href="?sort=mostvoted" title="{% trans "most voted questions" %}" >{% trans "most voted" %}</a> - <a id="all" href="/questions/" title="{% trans "all questions" %}" >{% trans "all questions" %}</a> + <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> + <a id="mostvoted" href="{% url questions %}?sort=mostvoted" title="{% trans "most voted questions" %}" >{% trans "most voted" %}</a> + <a id="all" href="{% url questions %}" title="{% trans "all questions" %}" >{% trans "all questions" %}</a> </div> </div> <!-- 问题列表 --> @@ -79,9 +79,9 @@ <div class="boxA"> <h3>{% trans "welcome to website" %}</h3> <div class="body"> - {{settings.APP_INTRO|safe}} - <div class="more"><a href="/about">{% trans "about" %} »</a></div> - <div class="more"><a href="/faq">{% trans "faq" %} »</a></div> + {{ settings.APP_INTRO|safe }} + <div class="more"><a href="{% url about %}">{% trans "about" %} »</a></div> + <div class="more"><a href="{% url faq %}">{% trans "faq" %} »</a></div> </div> </div> {% endif %} @@ -94,7 +94,7 @@ title="{% blocktrans with tag.name as tagname %}see questions tagged '{{tagname}}'{% endblocktrans %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a> {% endfor %} </div> - <div class="more"><a href="/tags">{% trans "popular tags" %} »</a> </div> + <div class="more"><a href="{% url tags %}">{% trans "popular tags" %} »</a> </div> </div> </div> {% if awards %} @@ -104,13 +104,13 @@ <ul class="badge-list"> {% for award in awards %} <li> - <a href="/badges/{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal"> + <a href="{% url badges %}{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal"> <span class="badge{{ award.badge_type }}">●</span> {{ award.badge_name }}</a> {% trans "given to" %} - <a href="/users/{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a> + <a href="{% url users %}{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a> </li> {% endfor %} </ul> - <div class="more"><a href="/badges/">{% trans "all awards" %} »</a> </div> + <div class="more"><a href="{% url badges %}">{% trans "all awards" %} »</a> </div> </div> </div> {% endif %} @@ -120,7 +120,7 @@ {% endblock %} {% block tail %} <div style="padding:5px 0 5px 5px;"> -<span class="evenMore">{% trans "Still looking for more? See" %} <a href="/questions/">{% trans "complete list of questions" %}</a> {% trans "or" %} <a href="/tags/">{% trans "popular tags" %}</a>{% trans "." %} {% trans "Please help us answer" %} <a href="/questions/unanswered">{% trans "list of unanswered questions" %}</a>{% trans "." %}</span> +<span class="evenMore">{% trans "Still looking for more? See" %} <a href="{% url questions %}">{% trans "complete list of questions" %}</a> {% trans "or" %} <a href="/tags/">{% trans "popular tags" %}</a>{% trans "." %} {% trans "Please help us answer" %} <a href="{% url questions %}unanswered">{% trans "list of unanswered questions" %}</a>{% trans "." %}</span> </div> {% endblock %} <!-- index.html --> diff --git a/templates/question.html b/templates/question.html index 74bc014b..66713342 100644 --- a/templates/question.html +++ b/templates/question.html @@ -30,7 +30,7 @@ {% if not question.closed and request.user.is_authenticated %}initEditor();{% endif %} lanai.highlightSyntax(); - $('#btLogin').bind('click', function(){window.location.href='/account/signin/'; } ) + $('#btLogin').bind('click', function(){window.location.href='{% url user_signin %}'; } ) }); function initEditor(){ @@ -122,7 +122,7 @@ <div id="question-tags" class="tags" > {% for tag in question.tagname_list %} <a href="{% url forum.views.tag tag|urlencode %}" class="post-tag" - title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a> + title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a> {% endfor %} </div> <div id="question-controls" style="clear:both;"> @@ -174,7 +174,7 @@ {% gravatar question.last_edited_by 32 %} </td> <td style="width:160px; vertical-align:top"> - <a href="/users/{{ question.last_edited_by.id }}/{{ question.last_edited_by.username }}">{{ question.last_edited_by.username }}</a> + <a href="{% url users %}{{ question.last_edited_by.id }}/{{ question.last_edited_by.username }}">{{ question.last_edited_by.username }}</a> </td> </tr> {% else %} @@ -189,7 +189,7 @@ {% gravatar question.last_edited_by 32 %} </td> <td style="width:160px; vertical-align:top"> - <div><a href="/users/{{ question.last_edited_by.id }}/{{ question.last_edited_by.username }}">{{ question.last_edited_by.username }}</a></div> + <div><a href="{% url users %}{{ question.last_edited_by.id }}/{{ question.last_edited_by.username }}">{{ question.last_edited_by.username }}</a></div> <div> {% get_score_badge question.last_edited_by %} @@ -223,7 +223,7 @@ {% gravatar question.author 32 %} </td> <td align="left" style="width:160px;vertical-align:top"> - <div><a href="/users/{{ question.author.id }}/{{ question.author }}">{{ question.author }}</a></div> + <div><a href="{% url users %}{{ question.author.id }}/{{ question.author }}">{{ question.author }}</a></div> <div> {% get_score_badge question.author %} </div> @@ -361,7 +361,7 @@ {% gravatar answer.last_edited_by 32 %} </td> <td style="width:160px; vertical-align:top"> - <div><a href="/users/{{ answer.last_edited_by.id }}/{{ answer.last_edited_by.username }}">{{ answer.last_edited_by.username }}</a></div> + <div><a href="{% url users %}{{ answer.last_edited_by.id }}/{{ answer.last_edited_by.username }}">{{ answer.last_edited_by.username }}</a></div> </td> </tr> @@ -377,7 +377,7 @@ {% gravatar answer.last_edited_by 32 %} </td> <td style="width:160px; vertical-align:top"> - <div><a href="/users/{{ answer.last_edited_by.id }}/{{ answer.last_edited_by.username }}">{{ answer.last_edited_by.username }}</a></div> + <div><a href="{% url users %}{{ answer.last_edited_by.id }}/{{ answer.last_edited_by.username }}">{{ answer.last_edited_by.username }}</a></div> <div> {% get_score_badge answer.last_edited_by %} </div> @@ -407,7 +407,7 @@ {% gravatar answer.author 32 %} </td> <td style="width:160px; vertical-align:top"> - <div><a href="/users/{{ answer.author.id }}/{{ answer.author.username }}">{{ answer.author }}</a></div> + <div><a href="{% url users %}{{ answer.author.id }}/{{ answer.author.username }}">{{ answer.author }}</a></div> <div> {% get_score_badge answer.author %} </div> @@ -516,7 +516,7 @@ <div class="questions-related"> {% for question in similar_questions %} <p> - <a href="/questions/{{question.id}}/{{ question.get_question_title }}">{{ question.get_question_title }}</a> + <a href="{% url questions %}{{question.id}}/{{ question.get_question_title }}">{{ question.get_question_title }}</a> </p> {% endfor %} </div> diff --git a/templates/question_edit_tips.html b/templates/question_edit_tips.html index ef6dca15..85614595 100644 --- a/templates/question_edit_tips.html +++ b/templates/question_edit_tips.html @@ -13,7 +13,8 @@ {% trans "be clear and concise" %} </li> </ul> - <a href="/faq/" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a> + <a href="{% url faq %}" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">{% trans "faq" %} »</a> + <br> </div> </div> diff --git a/templates/revisions_answer.html b/templates/revisions_answer.html index 9c2e53eb..23606dc9 100644 --- a/templates/revisions_answer.html +++ b/templates/revisions_answer.html @@ -73,7 +73,7 @@ </td> <td style="width:120px; vertical-align:top"> <div style="height:18px"> - <a href="/users/{{ revision.author.id }}/{{ revision.author.username }}">{{ revision.author.username }}</a></div> + <a href="{% url users %}{{ revision.author.id }}/{{ revision.author.username }}">{{ revision.author.username }}</a></div> <div> {% get_score_badge revision.author %} </div> diff --git a/templates/revisions_question.html b/templates/revisions_question.html index 7ada3e74..b76ced24 100644 --- a/templates/revisions_question.html +++ b/templates/revisions_question.html @@ -73,7 +73,7 @@ </td> <td style="width:120px; vertical-align:top"> <div style="height:18px"> - <a href="/users/{{ revision.author.id }}/{{ revision.author.username }}">{{ revision.author.username }}</a></div> + <a href="{% url users %}{{ revision.author.id }}/{{ revision.author.username }}">{{ revision.author.username }}</a></div> <div> {% get_score_badge revision.author %} </div> diff --git a/templates/tags.html b/templates/tags.html index 65a7e4dd..f558594a 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -29,8 +29,8 @@ <div class="tabBar"> <div class="headQuestions">{% trans "Tag list" %}</div> <div class="tabsA"> - <a id="sort_name" href="/tags/?sort=name" class="off" title="{% trans "sorted alphabetically" %}">{% trans "by name" %}</a> - <a id="sort_used" href="/tags/?sort=used" class="off" title="{% trans "sorted by frequency of tag use" %}">{% trans "by popularity" %}</a> + <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> </div> </div> <div id="searchtags"> diff --git a/templates/user_info.html b/templates/user_info.html index 86e36023..e56fb143 100644 --- a/templates/user_info.html +++ b/templates/user_info.html @@ -31,7 +31,7 @@ <th width="130" align="left"><strong>{% trans "Registered user" %}</strong></th> <th width="230" align="right"> {% if request.user|can_view_user_edit:view_user %} - <span class="user-edit-link"><a href="/users/{{ view_user.id }}/edit/">{% trans "update profile" %}</a></span> + <span class="user-edit-link"><a href="{% url users %}{{ view_user.id }}/{% trans "edit/" %}">{% trans "update profile" %}</a></span> {% endif %} </th> </tr> diff --git a/templates/user_reputation.html b/templates/user_reputation.html index bb7200de..270bb37d 100644 --- a/templates/user_reputation.html +++ b/templates/user_reputation.html @@ -33,7 +33,7 @@ <div style="float:left;width:20px;color:red">{{ rep.negative }}</div> </div> - <a href="/questions/{{ rep.question_id }}/{{ rep.title }}">{{ rep.title }}</a> <span class="small">({{ rep.reputed_at }})</span> + <a href="{% url questions %}{{ rep.question_id }}/{{ rep.title }}">{{ rep.title }}</a> <span class="small">({{ rep.reputed_at }})</span> </p> {% endfor %} </div> diff --git a/templates/user_stats.html b/templates/user_stats.html index 2c2a7a72..07578cb7 100644 --- a/templates/user_stats.html +++ b/templates/user_stats.html @@ -7,85 +7,51 @@ {% block usercontent %} <a name="questions"></a> - <table> - <tr> - <td> - <div style="text-align: right;" class="count">{{questions|length}}</div> - </td> - <td> - <h2>{% trans "User questions" %}</h2> - </td> - </tr> - </table> + <h2><span class="count">{{questions|length}}</span> {% trans "User questions" %}</h2> {% include "users_questions.html" %} - <p> </p> <a name="answers"></a> - <table> - <tr> - <td> - <div style="text-align: right;" class="count">{{answered_questions|length}}</div> - </td> - <td > - <h2>{% trans "Answers" %}</h2> - </td> - </tr> - </table> + <h2><span class="count">{{answered_questions|length}}</span> {% trans "Answers" %}</h2> <div class="user-stats-table"> {% for answered_question in answered_questions %} <div class="answer-summary"> - <a title="{{answered_question.summary|collapse}}" href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}"> - <div class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}" - title="{% blocktrans with answered_question.vote_count as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %} {% if answered_question.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}"> + <a title="{{answered_question.summary|collapse}}" + href="{% url questions %}{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}"> + <span class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}" + title="{% blocktrans with answered_question.vote_count as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %} {% if answered_question.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}"> {{ answered_question.vote_count }} - </div> + </span> </a> <div class="answer-link"> - <a href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> {% if answered_question.comment_count %}<span - title="{% blocktrans with answered_question.comment_count as comment_count %}the answer has been commented {{ comment_count }} times{% endblocktrans %}">({{answered_question.comment_count}})</span>{% endif %} + <a href="{% url questions %}{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> + {% if answered_question.comment_count %} + <span> + {% blocktrans with answered_question.comment_count as comment_count %}the answer has been commented {{ comment_count }} times{% endblocktrans %} + </span> + {% endif %} </div> </div> {% endfor %} </div> - <p> </p> <a name="votes"></a> - <table> - <tr> - <td> - <div style="text-align: right;" class="count">{{total_votes}}</div> - </td> - <td > - <h2>{% trans "votes total" %}</h2> - </td> - </tr> - </table> + <h2><span class="count">{{total_votes}}</span> {% trans "Votes" %}</h2> <div class="user-stats-table"> - <table height="50px"> + <table> <tr> <td width="60"> - <img style="cursor: default;" align="absmiddle" src="/content/images/vote-arrow-up-on.png"/> + <img style="cursor: default;" src="/content/images/vote-arrow-up-on.png" alt="{% trans "thumb up" %}" /> <span title="{% trans "user has voted up this many times" %}" class="vote-count">{{up_votes}}</span> </td> <td width="60"> - <img style="cursor: default;" align="absmiddle" src="/content/images/vote-arrow-down-on.png"/> + <img style="cursor: default;" src="/content/images/vote-arrow-down-on.png" alt="{% trans "thumb down" %}" /> <span title="{% trans "user voted down this many times" %}" class="vote-count">{{down_votes}}</span> </td> </tr> </table> </div> - <p> </p> <a name="tags"></a> - <table> - <tr> - <td> - <div style="text-align: right;" class="count">{{tags|length}}</div> - </td> - <td > - <h2>{% trans "Tags" %}</h2> - </td> - </tr> - </table> + <h2><span class="count">{{tags|length}}</span> {% trans "Tags" %}</h2> <div class="user-stats-table"> <table class="tags"> <tr> @@ -103,24 +69,14 @@ </tr> </table> </div> - <p> </p> <a name="badges"></a> - <table> - <tr> - <td> - <div style="text-align: right;" class="count">{{total_awards}}</div> - </td> - <td > - <h2>{% trans "Badges" %}</h2> - </td> - </tr> - </table> + <h2><span class="count">{{total_awards}}</span> {% trans "Badges" %}</h2> <div class="user-stats-table"> <table> <tr> <td width="180" style="line-height:35px"> {% for award in awards %} - <a href="/badges/{{award.id}}/{{award.name}}" title="{{ award.description }}" class="medal"><span class="badge{{ award.type }}">●</span> {{ award.name }}</a><span class="tag-number"> × {{ award.count|intcomma }}</span><br/> + <a href="{% url badges %}{{award.id}}/{{award.name}}" title="{{ award.description }}" class="medal"><span class="badge{{ award.type }}">●</span> {{ award.name }}</a><span class="tag-number"> ✕ {{ award.count|intcomma }}</span><br/> {% if forloop.counter|divisibleby:"6" %} </td> <td width="180" style="line-height:35px"> diff --git a/templates/user_tabs.html b/templates/user_tabs.html index 7800eb00..cb7e1d2f 100644 --- a/templates/user_tabs.html +++ b/templates/user_tabs.html @@ -4,28 +4,28 @@ <div class="tabBar"> <div class="tabsA"> <a id="stats" {% ifequal tab_name "stats" %}class="on"{% endifequal %} - title="{% trans "User profile" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=stats">{% trans "overview" %}</a> + title="{% trans "User profile" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=stats">{% trans "overview" %}</a> <a id="recent" {% ifequal tab_name "recent" %}class="on"{% endifequal %} - title="{% trans "recent activity" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=recent">{% trans "recent activity" %}</a> + title="{% trans "recent activity" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=recent">{% trans "recent activity" %}</a> {% if request.user|is_user_self:view_user %} <a id="responses" {% ifequal tab_name "responses" %}class="on"{% endifequal %} title="{% trans "comments and answers to others questions" %}" - href="/users/{{view_user.id}}/{{view_user.username}}?sort=responses">{% trans "responses" %}</a> + href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=responses">{% trans "responses" %}</a> {% endif %} <a id="reputation" {% ifequal tab_name "reputation" %}class="on"{% endifequal %} title="{% trans "graph of user reputation" %}" - href="/users/{{view_user.id}}/{{view_user.username}}?sort=reputation">{% trans "reputation history" %}</a> + href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=reputation">{% trans "reputation history" %}</a> {% if request.user|can_view_user_votes:view_user %} <a id="votes" {% ifequal tab_name "votes" %}class="on"{% endifequal %} - title="{% trans "user vote record" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=votes">{% trans "casted votes" %}</a> + title="{% trans "user vote record" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=votes">{% trans "casted votes" %}</a> {% endif %} <a id="favorites" {% ifequal tab_name "favorites" %}class="on"{% endifequal %} title="{% trans "questions that user selected as his/her favorite" %}" - href="/users/{{view_user.id}}/{{view_user.username}}?sort=favorites">{% trans "favorites" %}</a> + href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=favorites">{% trans "favorites" %}</a> {% if request.user|can_view_user_preferences:view_user %} <a id="preferences" {% ifequal tab_name "preferences" %}class="on"{% endifequal %} title="{% trans "user preference settings" %}" - href="/users/{{view_user.id}}/{{view_user.username}}?sort=preferences">{% trans "settings" %}</a> + href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=preferences">{% trans "settings" %}</a> {% endif %} </div> </div> diff --git a/templates/user_votes.html b/templates/user_votes.html index 80fa27ee..45134ac9 100644 --- a/templates/user_votes.html +++ b/templates/user_votes.html @@ -18,9 +18,9 @@ </div> <div style="float:left;overflow:hidden;width:750px"> {% ifequal vote.answer_id 0 %} - <span class="question-title-link"><a href="/questions/{{ vote.question_id }}/{{ vote.title }}">{{ vote.title }}</a></span> + <span class="question-title-link"><a href="{% url questions %}{{ vote.question_id }}/{{ vote.title }}">{{ vote.title }}</a></span> {% else %} - <span class="answer-title-link" ><a href="/questions/{{ vote.question_id }}/{{ vote.title }}#{{ vote.answer_id }}">{{ vote.title }}</a></span> + <span class="answer-title-link" ><a href="{% url questions %}{{ vote.question_id }}/{{ vote.title }}#{{ vote.answer_id }}">{{ vote.title }}</a></span> {% endifequal %} <div style="height:5px"></div> </div> diff --git a/templates/users_questions.html b/templates/users_questions.html index 7b00fd3f..9907885e 100644 --- a/templates/users_questions.html +++ b/templates/users_questions.html @@ -9,13 +9,15 @@ {% if question.favorited_myself %} <div class="favorites-count"> <img title="{% trans "this questions was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" - src="/content/images/vote-favorite-on.png"> + alt="{% trans "thumb-up on" %}" + src="/content/images/vote-favorite-on.png"/> <div><b>{{question.favourite_count|intcomma}}</b></div> </div> {% else %} <div class="favorites-count-off"> <img title="{% trans "this question was selected as favorite" %}{{question.favourite_count}} {% trans "number of times" %}" - src="/content/images/vote-favorite-off.png"> + alt="{% trans "thumb-up off" %}" + src="/content/images/vote-favorite-off.png"/> <div><b>{{question.favourite_count|intcomma}}</b></div> </div> {% endif %} @@ -23,27 +25,27 @@ <div class="favorites-empty"> </div> {% endif %} <div id="question-summary-{{question.id}}" class="question-summary narrow"> - <a style="text-decoration: none;" href="/questions/{{question.id}}/{{question.get_question_title}}"> - <div class="stats"> - <div class="votes"> - <div class="vote-count-post">{{question.vote_count|intcomma}}</div> + <a style="text-decoration: none;" href="{% url questions %}{{question.id}}/{{question.get_question_title}}"> + <span class="stats"> + <span class="votes"> + <span class="vote-count-post">{{question.vote_count|intcomma}}</span> {% trans "votes" %} - </div> - <div title="{% if question.answer_accepted %}{% trans "this answer has been accepted to be correct" %}{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}"> - <div class="answer-count-post">{{question.answer_count|intcomma}}</div> + </span> + <span title="{% if question.answer_accepted %}{% trans "this answer has been accepted to be correct" %}{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}"> + <span class="answer-count-post">{{question.answer_count|intcomma}}</span> {% trans "answers" %} - </div> - <div class="views"> - <div class="views-count-post">{{question.view_count|cnprog_intword|safe}}</div> + </span> + <span class="views"> + <span class="views-count-post">{{question.view_count|cnprog_intword|safe}}</span> {% trans "views" %} - </div> - </div> + </span> + </span> </a> <div class="summary"> <h3> - <a title="{{question.summary|collapse}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a> + <a title="{{question.summary}}" href="{% url questions %}{{question.id}}/{{question.title}}">{{question.title}}</a> </h3> <div class="tags"> {% convert2tagname_list question %} @@ -55,12 +57,12 @@ <div class="started"> <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span> {% if question.la_username %} - <a href="/users/{{question.la_user_id}}/{{question.la_username}}">{{question.la_username}}</a> {% get_score_badge_by_details question.la_user_reputation question.la_user_gold question.la_user_silver question.la_user_bronze%} + <a href="{% url users %}{{question.la_user_id}}/{{question.la_username}}">{{question.la_username}}</a> {% get_score_badge_by_details question.la_user_reputation question.la_user_gold question.la_user_silver question.la_user_bronze%} {% endif %} </div> </div> </div> - <br clear="both"/> + <br clear="all"/> {% endfor %} </div> <!-- end users_questions.html --> |