Skip to content

Commit

Permalink
Merge pull request vicalloy#18 from slepa/master
Browse files Browse the repository at this point in the history
django 1.5 support
vicalloy committed Dec 19, 2013

Verified

This commit was signed with the committer’s verified signature.
thesamesam Sam James
2 parents 614ab1f + 36c25d3 commit 02d43d4
Showing 36 changed files with 104 additions and 101 deletions.
3 changes: 3 additions & 0 deletions lbforum/.idea/dictionaries/slepa.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions lbforum/templates/lbforum/account/base.html
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
<div id="brd-crumbs-top" class="crumbs gen-content">
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb crumblast">
<span> &raquo; </span>
@@ -34,20 +34,20 @@
<ul>
<li class="item1 {% block main_menu_profile_class %}{% endblock %}">
{% if view_only %}
<a href="{% url lbforum_account_index %}"><span>{% trans "Introduction" %}</span></a>
<a href="{% url 'lbforum_account_index' %}"><span>{% trans "Introduction" %}</span></a>
{% endif %}
{% if not view_only %}
<a href="{% url lbforum_user_profile user.pk %}"><span>{% trans "Introduction" %}</span></a>
<a href="{% url 'lbforum_user_profile' user_id=user.pk %}"><span>{% trans "Introduction" %}</span></a>
{% endif %}
</li>
{% if not view_only %}
<li class="{% block main_menu_avatar_class %}{% endblock %}">
<a href="{% url lbforum_avatar_change %}"><span>{% trans "Avatar" %}</span></a>
<a href="{% url 'lbforum_avatar_change' %}"><span>{% trans "Avatar" %}</span></a>
</li>
{% endif %}
{% if not view_only %}
<li class="{% block main_menu_sig_class %}{% endblock %}">
<a href="{% url lbforum_signature %}"><span>{% trans "Signature" %}</span></a>
<a href="{% url 'lbforum_signature' %}"><span>{% trans "Signature" %}</span></a>
</li>
{% endif %}
</ul>
@@ -68,7 +68,7 @@ <h2 class="hn"><span>{% block main_subhead %}{% endblock %}</span></h2>
<div class="crumbs gen-content" id="brd-crumbs-end">
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb crumblast">
<span> &raquo; </span>
6 changes: 3 additions & 3 deletions lbforum/templates/lbforum/account/profile.html
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
{% block account_main_content %}
{% if user == view_user %}
<p class="content-options options">
<span class="item1"><a href="{% url auth_password_change %}">{% trans "Change your password" %}</a></span>
<span class="item1"><a href="{% url 'auth_password_change' %}">{% trans "Change your password" %}</a></span>
</p>
{% endif %}

@@ -42,8 +42,8 @@
<div class="ct-box data-box">
<h3 class="ct-legend hn"><span>{% trans "Posts and topics" %}</span></h3>
<p class="options">
<span class="item1"><a href="{% url lbforum_user_posts view_user.pk %}">{% blocktrans %}View all {{view_user}}'s posts{% endblocktrans %}</a></span>
<span><a href="{% url lbforum_user_topics view_user.pk %}">{% blocktrans %}View all {{view_user}}'s topics{% endblocktrans %}</a></span>
<span class="item1"><a href="{% url 'lbforum_user_posts' user_id=view_user.pk %}">{% blocktrans %}View all {{view_user}}'s posts{% endblocktrans %}</a></span>
<span><a href="{% url 'lbforum_user_topics' user_id=view_user.pk %}">{% blocktrans %}View all {{view_user}}'s topics{% endblocktrans %}</a></span>
</p>
</div>
</div>
2 changes: 1 addition & 1 deletion lbforum/templates/lbforum/account/signature.html
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ <h3 class="ct-legend hn">{% trans "Current signature" %}</h3>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/markitup/jquery.markitup.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/markitup/sets/bbcode/set.js"></script>
<script type="text/javascript">
mySettings['previewParserPath']='{% url markitup_preview %}';
mySettings['previewParserPath']="{% url 'markitup_preview' %}";
$("#id_signature").markItUp(mySettings);
</script>
{% endblock %}
8 changes: 4 additions & 4 deletions lbforum/templates/lbforum/account/user_posts.html
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
<div class="crumbs gen-content" id="brd-crumbs-top">
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb crumblast">
<span>&raquo;</span>
@@ -57,7 +57,7 @@ <h3 class="hn post-ident">
<span class="post-num">{% page_item_idx page_obj forloop %}</span>
<span class="post-byline">
<span>{% trans "Topic by" %} </span>
<a href="{% url lbforum_user_profile post.posted_by.pk %}">{{post.posted_by.username}}</a>
<a href="{% url 'lbforum_user_profile' user_id=post.posted_by.pk %}">{{post.posted_by.username}}</a>
</span>
<span class="post-link">
<a href="{{ post.get_absolute_url }}" title="Permanent link to this post" rel="bookmark" class="permalink">{{ post.created_on|lbtimesince }}</a>
@@ -73,7 +73,7 @@ <h4 class="hn post-title">
<div class="postbody">
<div class="post-author">
<ul class="author-ident">
<li class="username"> <a href="{% url lbforum_user_profile post.posted_by.pk %}">{{post.posted_by.username}}</a> </li>
<li class="username"> <a href="{% url 'lbforum_user_profile' user_id=post.posted_by.pk %}">{{post.posted_by.username}}</a> </li>
</ul>
</div>
<div class="post-entry">
@@ -101,7 +101,7 @@ <h4 class="hn post-title">
<div class="crumbs gen-content" id="brd-crumbs-end">
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb crumblast">
<span>&raquo;</span>
4 changes: 2 additions & 2 deletions lbforum/templates/lbforum/account/user_topics.html
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
<div class="crumbs gen-content" id="brd-crumbs-top">
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb crumblast">
<span>&raquo;</span>
@@ -63,7 +63,7 @@ <h1 class="hn">
<div class="crumbs gen-content" id="brd-crumbs-end">
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb crumblast">
<span>&raquo;</span>
6 changes: 3 additions & 3 deletions lbforum/templates/lbforum/forum.html
Original file line number Diff line number Diff line change
@@ -32,14 +32,14 @@
{% paginate %}
<p class="posting">
{% if user.is_authenticated %}
<a class="newpost" href="{% url lbforum_new_topic forum.pk %}"><span>{% trans "Post new topic" %}</span></a>
<a class="newpost" href="{% url 'lbforum_new_topic' forum_id=forum.pk %}"><span>{% trans "Post new topic" %}</span></a>
{% else %}
{% trans "You must" %} <a href="{{ LOGIN_URL }}">{% trans "Login" %}</a> {% trans "or" %} <a href="{{ REGISTER_URL }}">{% trans "register" %}</a> {% trans "to post a topic" %}
{% endif %}
</p>
</div>
<div class="main-head">
<h1 class="hn"><span><a title="Permanent link to this forum." rel="bookmark" href="{% url lbforum_forum forum.slug %}" class="permalink">{{ forum }}</a> <small></small></span></h1>
<h1 class="hn"><span><a title="Permanent link to this forum." rel="bookmark" href="{% url 'lbforum_forum' forum_slug=forum.slug %}" class="permalink">{{ forum }}</a> <small></small></span></h1>
</div>

{% include 'lbforum/inc_topic_list.html' %}
@@ -52,7 +52,7 @@ <h1 class="hn"><span><a title="Permanent link to this forum." rel="bookmark" hre
{% paginate %}
<p class="posting">
{% if user.is_authenticated %}
<a class="newpost" href="{% url lbforum_new_topic forum.pk %}"><span>{% trans "Post new topic" %}</span></a>
<a class="newpost" href="{% url 'lbforum_new_topic' forum_id=forum.pk %}"><span>{% trans "Post new topic" %}</span></a>
{% else %}
{% trans "You must" %} <a href="{{ LOGIN_URL }}">{% trans "Login" %}</a> {% trans "or" %} <a href="{{ REGISTER_URL }}">{% trans "register" %}</a> {% trans "to post a topic" %}
{% endif %}
2 changes: 1 addition & 1 deletion lbforum/templates/lbforum/inc_forum_brd_crumbs.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb crumblast">
<span>&raquo;</span>
8 changes: 4 additions & 4 deletions lbforum/templates/lbforum/inc_header.html
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

<div id="brd-head" class="gen-content">
<p id="brd-access"><a href="#brd-main">Skip to forum content</a></p>
<p id="brd-title"><a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a></p>
<p id="brd-title"><a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a></p>
<p id="brd-desc">{{ LBFORUM_SUB_TITLE }}</p>
</div>

@@ -15,8 +15,8 @@
<a href="#">{% trans "Search" %}</a>
</li>
{% if user.is_authenticated %}
<li id="navprofile"><a href="{% url lbforum_account_index %}">{% trans "My profile" %}</a></li>
<li id="navlogout"><a href="{{ LOGOUT_URL }}?next={% url lbforum_index %}">{% trans "Logout" %}</a></li>
<li id="navprofile"><a href="{% url 'lbforum_account_index' %}">{% trans "My profile" %}</a></li>
<li id="navlogout"><a href="{{ LOGOUT_URL }}?next={% url 'lbforum_index' %}">{% trans "Logout" %}</a></li>
{% else %}
<li id="navregister"><a href="{{ REGISTER_URL }}">{% trans "Register" %}</a></li>
<li id="navlogin"><a href="{{ LOGIN_URL }}">{% trans "Login" %}</a></li>
@@ -28,7 +28,7 @@
<p id="welcome">
<span>
{% if user.is_authenticated %}
{% blocktrans %}Hello {{user}}{% endblocktrans %}, <a href='{{ LOGOUT_URL }}?next={% url lbforum_index %}'>{% trans "Logout" %}</a>
{% blocktrans %}Hello {{user}}{% endblocktrans %}, <a href="{{ LOGOUT_URL }}?next={% url 'lbforum_index' %}">{% trans "Logout" %}</a>
{% else %}
<a href="{{ LOGIN_URL }}">{% trans "Login" %}</a>
|
2 changes: 1 addition & 1 deletion lbforum/templates/lbforum/inc_new_post_brd_crumbs.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n %}
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb">
<span> &raquo; </span>
12 changes: 6 additions & 6 deletions lbforum/templates/lbforum/inc_post_detail.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ <h3 class="hn post-ident">
<span class="post-num">{% page_item_idx page_obj forloop %}</span>
<span class="post-byline">
<span>{% trans "Topic by" %}</span>
<a href="{% url lbforum_user_profile post.posted_by.pk %}">{{post.posted_by.username}}</a>
<a href="{% url 'lbforum_user_profile' user_id=post.posted_by.pk %}">{{post.posted_by.username}}</a>
</span>
<span class="post-link">
{{ post.created_on|lbtimesince }}
@@ -18,8 +18,8 @@ <h3 class="hn post-ident">
<div class="postbody">
<div class="post-author">
<ul class="author-ident">
<li class="useravatar"><a href="{% url lbforum_user_profile post.posted_by.pk %}">{% avatar post.posted_by %}</a></li>
<li class="username"> <a href="{% url lbforum_user_profile post.posted_by.pk %}">{{post.posted_by.username}}</a> </li>
<li class="useravatar"><a href="{% url 'lbforum_user_profile' user_id=post.posted_by.pk %}">{% avatar post.posted_by %}</a></li>
<li class="username"> <a href="{% url 'lbforum_user_profile' user_id=post.posted_by.pk %}">{{post.posted_by.username}}</a> </li>
<li class="usertitle"><span>{% trans "Member" %}</span></li>
<li class="userstatus"><span>{{post.posted_by|online}}</span></li>
</ul>
@@ -82,12 +82,12 @@ <h3 class="hn post-ident">
<div class="post-options">
<p class="post-contacts"></p>
<p class="post-actions">
<span class="quote-post"><a href="{% url lbforum_new_replay topic.pk %}?qid={{post.pk}}">{% trans "quote" %}</a></span>
<span class="quote-post"><a href="{% url 'lbforum_new_replay' topic_id=topic.pk %}?qid={{post.pk}}">{% trans "quote" %}</a></span>
{% if user == post.posted_by or user.is_staff %}
<span class="edit-post"><a href="{% url lbforum_post_edit post.pk %}">{% trans "edit" %}</a></span>
<span class="edit-post"><a href="{% url 'lbforum_post_edit' post_id=post.pk %}">{% trans "edit" %}</a></span>
{% endif %}
{% if user.is_staff and not post.topic_post %}
<span class="del-post"><a href="{% url lbforum_post_delete post.id %}" onclick="return confirm('{% trans "Do you want to delete it?" %}')">{% trans "delete" %}</a></span>
<span class="del-post"><a href="{% url 'lbforum_post_delete' post_id=post.id %}" onclick="return confirm('{% trans "Do you want to delete it?" %}')">{% trans "delete" %}</a></span>
{% endif %}
</p>
</div>
2 changes: 1 addition & 1 deletion lbforum/templates/lbforum/inc_topic_brd_crumbs.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p>
<span class="crumb crumbfirst">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
</span>
<span class="crumb">
<span> &raquo; </span>
2 changes: 1 addition & 1 deletion lbforum/templates/lbforum/inc_topic_detail.html
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ <h3 class="hn mm"><span class="item-num">1</span>
{% if topic.topic_type %}
[{{ topic.topic_type }}]
{% endif %}
<a href="{% url lbforum_topic topic.id %}">{{ topic.subject }} </a>
<a href="{% url 'lbforum_topic' topic_id=topic.id %}">{{ topic.subject }} </a>
</h3>
<p>
<span class="item-starter">
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<li>
<a href="{% url lbforum_index %}">Home</a>
<a href="{% url 'lbforum_index' %}">Home</a>
</li>
<li>
<a href="#">Blog</a>
12 changes: 6 additions & 6 deletions lbforum/templates/lbforum/post.html
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ <h3 class="hn post-ident">
</div>
</div>

<script type="text/javascript" src="{% url lbforum_lang_js %}"></script>
<script type="text/javascript" src="{% url 'lbforum_lang_js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/jquery.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/markitup/jquery.markitup.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/markitup/sets/bbcode/set.js"></script>
@@ -167,13 +167,13 @@ <h3 class="hn post-ident">
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/upload_attachment.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/common.js"></script>
<script type="text/javascript">
mySettings['previewParserPath']='{% url markitup_preview %}';
mySettings['previewParserPath']="{% url 'markitup_preview' %}";
$("#id_message").markItUp(mySettings);
url_attachments_ajax_change_descn = "{% url attachments_ajax_change_descn %}";
url_attachments_ajax_delete = "{% url attachments_ajax_delete %}";
url_attachments_ajax_upload = "{% url attachments_ajax_upload %}";
url_attachments_ajax_change_descn = "{% url 'attachments_ajax_change_descn' %}";
url_attachments_ajax_delete = "{% url 'attachments_ajax_delete' %}";
url_attachments_ajax_upload = "{% url 'attachments_ajax_upload' %}";
ify_uploader = '{{ STATIC_URL }}lbforum/scripts/jquery.uploadify/uploadify.swf';
ify_script = '{% url attachments_uploadify %}';
ify_script = "{% url 'attachments_uploadify' %}";
ify_cancelImg = '{{ STATIC_URL }}lbforum/styles/Oxygen/cancel.png';
session_key = '{{ session_key }}';
$(function() {
4 changes: 2 additions & 2 deletions lbforum/templates/lbforum/post_paginate.html
Original file line number Diff line number Diff line change
@@ -4,11 +4,11 @@
(
<span>{% trans "Pages" %}&nbsp;</span>
{% for p in pages %}
<a href="{% url lbforum_topic topic.id %}?page={{p}}">{{p}}</a>
<a href="{% url 'lbforum_topic' topic_id=topic.id %}?page={{p}}">{{p}}</a>
{% endfor %}
{% if page_count > window %}
...
<a href="{% url lbforum_topic topic.id %}?page={{page_count}}">{{page_count}}</a>
<a href="{% url 'lbforum_topic' topic_id=topic.id %}?page={{page_count}}">{{page_count}}</a>
{% endif %}
)
</span>
16 changes: 8 additions & 8 deletions lbforum/templates/lbforum/topic.html
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
<p class="posting">
{% if not topic.closed %}
{% if user.is_authenticated %}
<a class="newpost" href="{% url lbforum_new_replay topic.pk %}"><span>{% trans "Post reply" %}</span></a>
<a class="newpost" href="{% url 'lbforum_new_replay' topic_id=topic.pk %}"><span>{% trans "Post reply" %}</span></a>
{% else %}
{% trans "You must" %} <a href="{{ LOGIN_URL }}">{% trans "Login" %}</a> {% trans "or" %} <a href="{{ REGISTER_URL }}">{% trans "register" %}</a> {% trans "to post a reply" %}
{% endif %}
@@ -43,27 +43,27 @@ <h1 class="hn"><span><a title="Permanent link to this topic" rel="bookmark" href
<h2 class="hn">
{% if user.is_staff %}
<span>
<a href="{% url lbforum_update_topic_attr_as_not topic.id 'sticky' %}">
<a href="{% url 'lbforum_update_topic_attr_as_not' topic_id=topic.id attr='sticky' %}">
{% if topic.sticky %} {% trans "unsticky" %} {% else %} {% trans "sticky" %} {% endif %}
</a>
</span>
<span>
<a href="{% url lbforum_update_topic_attr_as_not topic.id 'distillate' %}">
<a href="{% url 'lbforum_update_topic_attr_as_not' topic_id=topic.id attr='distillate' %}">
{% if topic.level >= 60 %} {% trans "undistillate" %} {% else %} {% trans "distillate" %} {% endif %}
</a>
</span>
<span>
<a href="{% url lbforum_update_topic_attr_as_not topic.id 'close' %}">
<a href="{% url 'lbforum_update_topic_attr_as_not' topic_id=topic.id attr='close' %}">
{% if topic.closed %} {% trans "unclose" %} {% else %} {% trans "close" %} {% endif %}
</a>
</span>
<span>
<a href="{% url lbforum_update_topic_attr_as_not topic.id 'hide' %}">
<a href="{% url 'lbforum_update_topic_attr_as_not' topic_id=topic.id attr='hide' %}">
{% if topic.hidden %} {% trans "unhide" %} {% else %} {% trans "hide" %} {% endif %}
</a>
</span>
<span>
<a href="{% url lbforum_delete_topic topic.id %}" onclick="return confirm('{% trans "Do you want to delete it?" %}')">{% trans "delete" %}</a>
<a href="{% url 'lbforum_delete_topic' topic_id=topic.id %}" onclick="return confirm('{% trans "Do you want to delete it?" %}')">{% trans "delete" %}</a>
</span>
<span>|</span>
{% endif %}
@@ -87,7 +87,7 @@ <h2 class="hn">
<p class="posting">
{% if not topic.closed %}
{% if user.is_authenticated %}
<a class="newpost" href="{% url lbforum_new_replay topic.pk %}"><span>{% trans "Post reply" %}</span></a>
<a class="newpost" href="{% url 'lbforum_new_replay' topic_id=topic.pk %}"><span>{% trans "Post reply" %}</span></a>
{% else %}
{% trans "You must" %} <a href="{{ LOGIN_URL }}">{% trans "Login" %}</a> {% trans "or" %} <a href="{{ REGISTER_URL }}">{% trans "register" %}</a> {% trans "to post a reply" %}
{% endif %}
@@ -104,7 +104,7 @@ <h2 class="hn"><span>{% trans "Quick reply to this topic" %}</span></h2>
</div>
<div class="main-content main-frm" id="brd-qpost">
<p class="content-options options">{% trans "You may use" %}: <span class="item1"><a title="Help with: BBCode" href="http://fluxbb.org/forums/help/bbcode/" class="exthelp">BBCode</a></span> <span><a title="Help with: Images" href="http://fluxbb.org/forums/help/img/" class="exthelp">Images</a></span> <span><a title="Help with: Smilies" href="http://fluxbb.org/forums/help/smilies/" class="exthelp">Smilies</a></span></p>
<form action="{% url lbforum_new_replay topic.pk %}" accept-charset="utf-8" method="post" class="frm-form">
<form action="{% url 'lbforum_new_replay' topic_id=topic.pk %}" accept-charset="utf-8" method="post" class="frm-form">
<div class="hidden">
{% csrf_token %}
</div>
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ <h2 class="hn"><span>{{ category }}</span></h2>
<span class="icon "><!-- --></span>

<div class="item-subject">
<h3 class="hn"><a href="{% url lbforum_forum forum.slug %}"><span> {{forum}} </span></a></h3>
<h3 class="hn"><a href="{% url 'lbforum_forum' forum_slug=forum.slug %}"><span> {{forum}} </span></a></h3>
<p>{{ forum.description }}</p>
</div>

2 changes: 1 addition & 1 deletion lbforum/templates/lbforum/widgets/lbf_status.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ <h2 class="hn"><span>Forum statistics</span></h2>
<li class="st-users">
<span>{% trans "Newest registered user" %}:
<strong>
<a href="{% url lbforum_user_profile last_registered_user.pk %}">
<a href="{% url 'lbforum_user_profile' user_id=last_registered_user.pk %}">
{{ last_registered_user.username }}
</a>
</strong>
2 changes: 1 addition & 1 deletion lbforum/templates/lbforum/widgets/onlineinfos.html
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@ <h3 class="hn">
<span>{% trans "Currently online" %} <strong> {{ total_onlines }} </strong> ( <strong> {{ total_onlines_guest }} </strong> {% trans "guests" %}, <strong>{{ total_onlines_user }}</strong> {% trans "registered user" %} )</span>
</h3>
<p>
{% for o in online_users %} <a href="{% url lbforum_user_profile o.user_id %}">{{o.username}}</a> {% endfor %}
{% for o in online_users %} <a href="{% url 'lbforum_user_profile' user_id=o.user_id %}">{{o.username}}</a> {% endfor %}
</p>
</div>
8 changes: 4 additions & 4 deletions lbforum/templates_v2ex/lbforum/account/base.html
Original file line number Diff line number Diff line change
@@ -15,18 +15,18 @@
<ul>
<li class="item1 {% block main_menu_profile_class %}{% endblock %}">
{% if view_only %}
<a href="{% url lbforum_account_index %}"><span>{% trans "Introduction" %}</span></a>
<a href="{% url 'lbforum_account_index' %}"><span>{% trans "Introduction" %}</span></a>
{% endif %}
{% if not view_only %}
<a href="{% url lbforum_user_profile user.pk %}"><span>{% trans "Introduction" %}</span></a>
<a href="{% url 'lbforum_user_profile' user_id=user.pk %}"><span>{% trans "Introduction" %}</span></a>
{% endif %}
</li>
{% if not view_only %}
<li class="{% block main_menu_pwd_class %}{% endblock %}">
<a href="{% url lbforum_avatar_change %}"><span><a href="{{CHANGE_PSWD_URL}}">{% trans "Change your password" %}</a></span></a>
<a href="{% url 'lbforum_avatar_change' %}"><span><a href="{{CHANGE_PSWD_URL}}">{% trans "Change your password" %}</a></span></a>
</li>
<li class="{% block main_menu_avatar_class %}{% endblock %}">
<a href="{% url lbforum_avatar_change %}"><span>{% trans "Avatar" %}</span></a>
<a href="{% url 'lbforum_avatar_change' %}"><span>{% trans "Avatar" %}</span></a>
</li>
{% endif %}
</ul>
4 changes: 2 additions & 2 deletions lbforum/templates_v2ex/lbforum/account/inc_base_profile.html
Original file line number Diff line number Diff line change
@@ -31,10 +31,10 @@ <h2 style="padding: 0px; margin: 0px; font-size: 22px; line-height: 22px;">{{vie
</tr>
<tr>
<td width="50%">
<a href="{% url lbforum_user_topics view_user.pk %}">{% blocktrans %}View all {{view_user}}'s topics{% endblocktrans %}</a>
<a href="{% url 'lbforum_user_topics' user_id=view_user.pk %}">{% blocktrans %}View all {{view_user}}'s topics{% endblocktrans %}</a>
</td>
<td width="50%">
<a href="{% url lbforum_user_posts view_user.pk %}">{% blocktrans %}View all {{view_user}}'s posts{% endblocktrans %}</a>
<a href="{% url 'lbforum_user_posts' user_id=view_user.pk %}">{% blocktrans %}View all {{view_user}}'s posts{% endblocktrans %}</a>
</td>
</tr>

4 changes: 2 additions & 2 deletions lbforum/templates_v2ex/lbforum/forum.html
Original file line number Diff line number Diff line change
@@ -57,15 +57,15 @@
</span>
</div>
<span class="bigger">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
<span class="chevron">&raquo;</span>
{{ forum }}
</span>
{% if user.is_authenticated %}
<div class="sep10"></div>
<div class="sep10"></div>
<div align="left">
<a href="{% url lbforum_new_topic forum.pk %}" class="super normal button">{% trans "Post new topic" %}</a>
<a href="{% url 'lbforum_new_topic' forum_id=forum.pk %}" class="super normal button">{% trans "Post new topic" %}</a>
</div>
{% endif %}
<div class="sep5"></div>
6 changes: 3 additions & 3 deletions lbforum/templates_v2ex/lbforum/inc_header.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% load i18n %}
<div id="Top">
<div id="TopMain">
<p id="title"><a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a></p>
<p id="title"><a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a></p>
<div id="Navigation">
<ul>
{% include 'lbforum/plugins/inc_header_left_links.html' %}
{% if user.is_authenticated %}
<li id="navprofile"><a href="{% url lbforum_account_index %}">{% trans "My profile" %}</a></li>
<li id="navlogout"><a href="{{ LOGOUT_URL }}?next={% url lbforum_index %}">{% trans "Logout" %}</a></li>
<li id="navprofile"><a href="{% url 'lbforum_account_index' %}">{% trans "My profile" %}</a></li>
<li id="navlogout"><a href="{{ LOGOUT_URL }}?next={% url 'lbforum_index' %}">{% trans "Logout" %}</a></li>
{% else %}
<li id="navregister"><a href="{{ REGISTER_URL }}">{% trans "Register" %}</a></li>
<li id="navlogin"><a href="{{ LOGIN_URL }}">{% trans "Login" %}</a></li>
8 changes: 4 additions & 4 deletions lbforum/templates_v2ex/lbforum/inc_post_detail.html
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="48" valign="top">
<a href="{% url lbforum_user_profile post.posted_by.pk %}">{% avatar post.posted_by 48 %}</a>
<a href="{% url 'lbforum_user_profile' user_id=post.posted_by.pk %}">{% avatar post.posted_by 48 %}</a>
</td>
<td width="10"></td>
<td width="auto" valign="top">
@@ -15,12 +15,12 @@
<small class="snow">#{% page_item_idx page_obj forloop %} - {{ post.created_on|lbtimesince }}
{% if user.is_authenticated %}
&bull;
<a href="{% url lbforum_new_replay topic.pk %}?qid={{post.pk}}">{% trans "quote" %}</a>
<a href="{% url 'lbforum_new_replay' topic_id=topic.pk %}?qid={{post.pk}}">{% trans "quote" %}</a>
{% if user == post.posted_by or user.is_staff %}
<a href="{% url lbforum_post_edit post.pk %}">{% trans "edit" %}</a>
<a href="{% url 'lbforum_post_edit' post_id=post.pk %}">{% trans "edit" %}</a>
{% endif %}
{% if user.is_staff and not post.topic_post %}
<a href="{% url lbforum_post_delete post.id %}" onclick="return confirm('{% trans "Do you want to delete it?" %}')">{% trans "delete" %}</a>
<a href="{% url 'lbforum_post_delete' post_id=post.id %}" onclick="return confirm('{% trans "Do you want to delete it?" %}')">{% trans "delete" %}</a>
{% endif %}
{% endif %}
</small>
6 changes: 3 additions & 3 deletions lbforum/templates_v2ex/lbforum/inc_topic_detail.html
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<div class="cell">
<table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr>
<td valign="top" class="avatar">
<a class="dark" href="{% url lbforum_user_profile t.posted_by.pk %}">{% avatar t.posted_by 48 %}</a>
<a class="dark" href="{% url 'lbforum_user_profile' user_id=t.posted_by.pk %}">{% avatar t.posted_by 48 %}</a>
</td>
<td valign="top" style="padding-left: 12px">
<div class="fr">
@@ -32,9 +32,9 @@
<div class="sep5"></div>
<span class="created">
{% if not forum %}
<strong><a class="node" href="{% url lbforum_forum t.forum.slug %}">{{t.forum.name}}</a></strong> &bull;
<strong><a class="node" href="{% url 'lbforum_forum' forum_slug=t.forum.slug %}">{{t.forum.name}}</a></strong> &bull;
{% endif %}
<strong><a class="dark" href="{% url lbforum_user_profile t.posted_by.pk %}">{{t.posted_by.username}}</a></strong> &bull;
<strong><a class="dark" href="{% url 'lbforum_user_profile' user_id=t.posted_by.pk %}">{{t.posted_by.username}}</a></strong> &bull;
{{ t.num_views }} {% trans "views" %} &bull;
{% trans "Last post" %} {{ t.get_last_post.update|lbtimesince }} by
{{t.get_last_post.posted_by}}
2 changes: 1 addition & 1 deletion lbforum/templates_v2ex/lbforum/index.html
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
{% include 'lbforum/inc_topic_list.html' %}

<div class="inner">
<a href="{% url lbforum_recent %}">{% trans "More" %}</a>
<a href="{% url 'lbforum_recent' %}">{% trans "More" %}</a>
</div>
</div>
{% endblock %}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<li>
<a href="{% url lbforum_index %}">Home</a>
<a href="{% url 'lbforum_index' %}">Home</a>
</li>
<li>
<a href="#">Blog</a>
14 changes: 7 additions & 7 deletions lbforum/templates_v2ex/lbforum/post.html
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
<div class="box">
<div class="cell">
<span class="bigger">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
<span class="chevron">&raquo;</span>
<a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a>
{% if topic %}
@@ -87,7 +87,7 @@
{% endblock %}

{% block footer_js %}
<script type="text/javascript" src="{% url lbforum_lang_js %}"></script>
<script type="text/javascript" src="{% url 'lbforum_lang_js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/jquery.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/markitup/jquery.markitup.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/markitup/sets/bbcode/set.js"></script>
@@ -98,13 +98,13 @@
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/upload_attachment.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/common.js"></script>
<script type="text/javascript">
mySettings['previewParserPath']='{% url markitup_preview %}';
mySettings['previewParserPath']="{% url 'markitup_preview' %}";
$("#id_message").markItUp(mySettings);
url_attachments_ajax_change_descn = "{% url attachments_ajax_change_descn %}";
url_attachments_ajax_delete = "{% url attachments_ajax_delete %}";
url_attachments_ajax_upload = "{% url attachments_ajax_upload %}";
url_attachments_ajax_change_descn = "{% url 'attachments_ajax_change_descn' %}";
url_attachments_ajax_delete = "{% url 'attachments_ajax_delete' %}";
url_attachments_ajax_upload = "{% url 'attachments_ajax_upload' %}";
ify_uploader = '{{ STATIC_URL }}lbforum/scripts/jquery.uploadify/uploadify.swf';
ify_script = '{% url attachments_uploadify %}';
ify_script = "{% url 'attachments_uploadify' %}";
ify_cancelImg = '{{ STATIC_URL }}lbforum/styles/Oxygen/cancel.png';
session_key = '{{ session_key }}';
$(function() {
4 changes: 2 additions & 2 deletions lbforum/templates_v2ex/lbforum/post_paginate.html
Original file line number Diff line number Diff line change
@@ -4,11 +4,11 @@
(
<span>{% trans "Pages" %}&nbsp;</span>
{% for p in pages %}
<a href="{% url lbforum_topic topic.id %}?page={{p}}">{{p}}</a>
<a href="{% url 'lbforum_topic' topic_id=topic.id %}?page={{p}}">{{p}}</a>
{% endfor %}
{% if page_count > window %}
...
<a href="{% url lbforum_topic topic.id %}?page={{page_count}}">{{page_count}}</a>
<a href="{% url 'lbforum_topic' topic_id=topic.id %}?page={{page_count}}">{{page_count}}</a>
{% endif %}
)
</span>
2 changes: 1 addition & 1 deletion lbforum/templates_v2ex/lbforum/recent.html
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
{% block content_content %}
<div class="box">
<div class="cell">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
<span class="chevron">&raquo;</span>
{% trans "Recent Topics" %}
</div>
22 changes: 11 additions & 11 deletions lbforum/templates_v2ex/lbforum/topic.html
Original file line number Diff line number Diff line change
@@ -20,38 +20,38 @@
{% with post=topic.post %}
<div class="cell" style="min-height: 73px;">
<div class="fr snow" style="padding-left: 10px; padding-bottom: 10px;">
<a href="{% url lbforum_user_profile post.posted_by.pk %}">{% avatar post.posted_by %}</a>
<a href="{% url 'lbforum_user_profile' user_id=post.posted_by.pk %}">{% avatar post.posted_by %}</a>
</div>
<span class="bigger">
<a href="{% url lbforum_index %}">{{ LBFORUM_TITLE }}</a>
<a href="{% url 'lbforum_index' %}">{{ LBFORUM_TITLE }}</a>
<span class="chevron">&raquo;</span>
<a href="{{ topic.forum.get_absolute_url }}">{{ topic.forum.name }}</a>
</span>
<h1>{{topic}}</h1>
<small class="fade">
By
<a href="{% url lbforum_user_profile post.posted_by.pk %}">{{post.posted_by.username}}</a>
<a href="{% url 'lbforum_user_profile' user_id=post.posted_by.pk %}">{{post.posted_by.username}}</a>
at {{ topic.get_last_post.update|lbtimesince }},
{{topic.num_views}} hits
{% if user.is_staff %}
<span>|</span>
<span>
<a href="{% url lbforum_update_topic_attr_as_not topic.id 'distillate' %}">
<a href="{% url 'lbforum_update_topic_attr_as_not' topic_id=topic.id attr='distillate' %}">
{% if topic.level >= 60 %} {% trans "undistillate" %} {% else %} {% trans "distillate" %} {% endif %}
</a>
</span>
<span>
<a href="{% url lbforum_update_topic_attr_as_not topic.id 'close' %}">
<a href="{% url 'lbforum_update_topic_attr_as_not' topic_id=topic.id attr='close' %}">
{% if topic.closed %} {% trans "unclose" %} {% else %} {% trans "close" %} {% endif %}
</a>
</span>
<span>
<a href="{% url lbforum_update_topic_attr_as_not topic.id 'hide' %}">
<a href="{% url 'lbforum_update_topic_attr_as_not' topic_id=topic.id attr='hide' %}">
{% if topic.hidden %} {% trans "unhide" %} {% else %} {% trans "hide" %} {% endif %}
</a>
</span>
<span>
<a href="{% url lbforum_delete_topic topic.id %}" onclick="return confirm('{% trans "Do you want to delete it?" %}')">{% trans "delete" %}</a>
<a href="{% url 'lbforum_delete_topic' topic_id=topic.id %}" onclick="return confirm('{% trans "Do you want to delete it?" %}')">{% trans "delete" %}</a>
</span>
{% endif %}
</small>
@@ -65,16 +65,16 @@ <h1>{{topic}}</h1>
<div class="fr">
{% if user == post.posted_by or user.is_staff %}
<span>
<a href="{% url lbforum_post_edit post.pk %}">{% trans "edit" %}</a>
<a href="{% url 'lbforum_post_edit' post_id=post.pk %}">{% trans "edit" %}</a>
</span>
|
{% endif %}
<span>
<a href="{% url lbforum_new_replay topic.pk %}?qid={{post.pk}}">{% trans "quote" %}</a>
<a href="{% url 'lbforum_new_replay' topic_id=topic.pk %}?qid={{post.pk}}">{% trans "quote" %}</a>
</span>
{% if user.is_authenticated %}
<span>
<a class="newpost" href="{% url lbforum_new_replay topic.pk %}">
<a class="newpost" href="{% url 'lbforum_new_replay' topic_id=topic.pk %}">
{% trans "Post reply" %}
</a>
</span>
@@ -114,7 +114,7 @@ <h1>{{topic}}</h1>
{% if user.is_authenticated %}
<div class="sep20"></div>
<div class="box" id="quick-reply-box">
<form action="{% url lbforum_new_replay topic.pk %}" accept-charset="utf-8" method="post" class="frm-form">
<form action="{% url 'lbforum_new_replay' topic_id=topic.pk %}" accept-charset="utf-8" method="post" class="frm-form">
<div class="cell"><div class="fr fade"><a class="dark" href="#Top">Top&uarr;</a></div>
<span class="fade">
{% trans "Quick reply to this topic" %}
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
{% for category in categories %}
<strong class="green">{{ category }}</strong><br/>
{% for forum in category.forum_set.all %}
<a class="item_node" href="{% url lbforum_forum forum.slug %}"><span> {{forum}} </span></a>
<a class="item_node" href="{% url 'lbforum_forum' forum_slug=forum.slug %}"><span> {{forum}} </span></a>
{% endfor %}
<br/>
{% endfor %}
4 changes: 2 additions & 2 deletions lbforum/templates_v2ex/lbforum/widgets/cur_user_profile.html
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody><tr>
<td width="48" valign="top">
<a href="{% url lbforum_user_profile user.pk %}">{% avatar user 48 %}</a>
<a href="{% url 'lbforum_user_profile' user_id=user.pk %}">{% avatar user 48 %}</a>
</td>
<td width="10" valign="top"></td>
<td width="auto" align="left">
<span class="bigger"><a href="{% url lbforum_user_profile user.pk %}">{{ user }}</a></span>
<span class="bigger"><a href="{% url 'lbforum_user_profile' user_id=user.pk %}">{{ user }}</a></span>
<div class="sep5"></div>
<span class="fade"></span>
</td>
4 changes: 2 additions & 2 deletions lbforum/templates_v2ex/lbforum/widgets/onlineinfos.html
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@
</span>
</div>
<div class="inner">
{% for o in online_users %} <a class="item_node" href="{% url lbforum_user_profile o.user_id %}">{{o.username}}</a> {% endfor %}
{% for o in online_users %} <a class="item_node" href="{% url 'lbforum_user_profile' user_id=o.user_id %}">{{o.username}}</a> {% endfor %}
{% for forum in category.forum_set.all %}
<a class="item_node" href="{% url lbforum_forum forum.slug %}"><span> {{forum}} </span></a>
<a class="item_node" href="{% url 'lbforum_forum' forum_slug=forum.slug %}"><span> {{forum}} </span></a>
{% endfor %}
</div>
</div>
4 changes: 2 additions & 2 deletions lbforum/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.conf.urls import patterns, include, url
from django.views.generic.simple import direct_to_template
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required

from lbforum import views, accountviews
@@ -45,7 +45,7 @@
name='lbforum_user_topics'),
url('^user/(?P<user_id>\d+)/posts/$', views.user_posts,
name='lbforum_user_posts'),
url(r'^lang.js$', direct_to_template, {'template': 'lbforum/lang.js'},
url(r'^lang.js$', TemplateView.as_view(template_name='lbforum/lang.js'),
name='lbforum_lang_js'),
url('^markitup_preview/$', views.markitup_preview,
name='markitup_preview'),

0 comments on commit 02d43d4

Please sign in to comment.