diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-02-09 17:29:36 -0500 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-02-09 17:29:36 -0500 |
commit | 7575e18525c9eb0ac12e7a30b1c1a22de5a2efd5 (patch) | |
tree | 12fe9d7af61898f05e7d415a44402a89ece8a5a1 /forum | |
parent | 3c4c71fc19865bfb75231c425fae31c6b2c211de (diff) | |
parent | b2da1ec4caf3f7ad7d966f502d71fdddc36e6569 (diff) | |
download | askbot-7575e18525c9eb0ac12e7a30b1c1a22de5a2efd5.tar.gz askbot-7575e18525c9eb0ac12e7a30b1c1a22de5a2efd5.tar.bz2 askbot-7575e18525c9eb0ac12e7a30b1c1a22de5a2efd5.zip |
Merge branch 'master' into skins
Diffstat (limited to 'forum')
-rw-r--r-- | forum/templates/answer_edit.html | 12 | ||||
-rw-r--r-- | forum/templates/ask.html | 12 | ||||
-rwxr-xr-x | forum/templates/authopenid/signin.html | 34 | ||||
-rwxr-xr-x | forum/templates/base.html | 10 | ||||
-rw-r--r-- | forum/templates/base_content.html | 10 | ||||
-rw-r--r-- | forum/templates/book.html | 6 | ||||
-rw-r--r-- | forum/templates/footer.html | 2 | ||||
-rw-r--r-- | forum/templates/header.html | 2 | ||||
-rw-r--r-- | forum/templates/index.html | 6 | ||||
-rw-r--r-- | forum/templates/question.html | 40 | ||||
-rw-r--r-- | forum/templates/question_edit.html | 12 | ||||
-rw-r--r-- | forum/templates/question_retag.html | 6 | ||||
-rw-r--r-- | forum/templates/questions.html | 4 | ||||
-rw-r--r-- | forum/templates/revisions_answer.html | 6 | ||||
-rw-r--r-- | forum/templates/revisions_question.html | 6 | ||||
-rw-r--r-- | forum/templates/tag_selector.html | 4 | ||||
-rw-r--r-- | forum/templates/user.html | 4 | ||||
-rw-r--r-- | forum/templates/user_edit.html | 2 | ||||
-rw-r--r-- | forum/templates/user_reputation.html | 4 | ||||
-rw-r--r-- | forum/templates/user_stats.html | 4 | ||||
-rw-r--r-- | forum/templates/user_votes.html | 4 | ||||
-rw-r--r-- | forum/templates/users_questions.html | 4 | ||||
-rw-r--r-- | forum/templatetags/extra_tags.py | 16 |
23 files changed, 105 insertions, 105 deletions
diff --git a/forum/templates/answer_edit.html b/forum/templates/answer_edit.html index cd247a3c..44b52c5f 100644 --- a/forum/templates/answer_edit.html +++ b/forum/templates/answer_edit.html @@ -4,12 +4,12 @@ {% load extra_tags %} {% block title %}{% spaceless %}{% trans "Edit answer" %}{% endspaceless %}{% endblock %} {% block forejs %} - <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.post.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/jquery.validate.pack.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/wmd/showdown.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/wmd/wmd.js" %}'></script> - <link rel="stylesheet" type="text/css" href="{% href "/content/js/wmd/wmd.css" %}" /> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.post.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/jquery.validate.pack.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/wmd/showdown.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/wmd/wmd.js" %}'></script> + <link rel="stylesheet" type="text/css" href="{% media "/content/js/wmd/wmd.css" %}" /> <script type="text/javascript"> $().ready(function(){ diff --git a/forum/templates/ask.html b/forum/templates/ask.html index 30d43ee0..df5580a6 100644 --- a/forum/templates/ask.html +++ b/forum/templates/ask.html @@ -4,12 +4,12 @@ {% load extra_tags %} {% block title %}{% spaceless %}{% trans "Ask a question" %}{% endspaceless %}{% endblock %} {% block forejs %} - <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.post.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/jquery.validate.pack.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/wmd/showdown.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/wmd/wmd.js" %}'></script> - <link rel="stylesheet" type="text/css" href="{% href "/content/js/wmd/wmd.css" %}" /> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.post.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/jquery.validate.pack.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/wmd/showdown.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/wmd/wmd.js" %}'></script> + <link rel="stylesheet" type="text/css" href="{% media "/content/js/wmd/wmd.css" %}" /> <script type="text/javascript"> $().ready(function(){ //set current module button style diff --git a/forum/templates/authopenid/signin.html b/forum/templates/authopenid/signin.html index aacdd490..679253da 100755 --- a/forum/templates/authopenid/signin.html +++ b/forum/templates/authopenid/signin.html @@ -4,10 +4,10 @@ {% load extra_tags %}
{% block title %}{% spaceless %}{% trans "User login" %}{% endspaceless %}{% endblock %}
{% block forejs %}
- <script type='text/javascript' src='{% href "/content/js/jquery.validate.pack.js" %}'></script>
+ <script type='text/javascript' src='{% media "/content/js/jquery.validate.pack.js" %}'></script>
- <link rel="stylesheet" type="text/css" media="screen" href="{% href "/content/jquery-openid/openid.css" %}"/>
- <script type="text/javascript" src="{% href "/content/jquery-openid/jquery.openid.js" %}"></script>
+ <link rel="stylesheet" type="text/css" media="screen" href="{% media "/content/jquery-openid/openid.css" %}"/>
+ <script type="text/javascript" src="{% media "/content/jquery-openid/jquery.openid.js" %}"></script>
<script type="text/javascript"> $().ready( function() { $("form.openid:eq(0)").openid(); })</script>
<!--<script type="text/javascript">
$().ready(function(){
@@ -44,23 +44,23 @@ <ul class="providers">
<li class="local" title="Local login">
<div class="logo_box local_login_box">
- <img src="{% href "/content/jquery-openid/images/local-login.png" %}" alt="your icon here" />
+ <img src="{% media "/content/jquery-openid/images/local-login.png" %}" alt="your icon here" />
</div>
<span></span>
</li>
<li class="direct" title="Google">
<div class="logo_box google_box">
- <img src="{% href "/content/jquery-openid/images/google.gif" %}" alt="icon" /><span>https://www.google.com/accounts/o8/id</span>
+ <img src="{% media "/content/jquery-openid/images/google.gif" %}" alt="icon" /><span>https://www.google.com/accounts/o8/id</span>
</div>
</li>
<li class="direct" title="Yahoo">
<div class="logo_box yahoo_box">
- <img src="{% href "/content/jquery-openid/images/yahoo.gif" %}" alt="icon" /><span>http://yahoo.com/</span>
+ <img src="{% media "/content/jquery-openid/images/yahoo.gif" %}" alt="icon" /><span>http://yahoo.com/</span>
</div>
</li>
<li class="username" title="AOL screen name">
<div class="logo_box aol_box">
- <img src="{% href "/content/jquery-openid/images/aol.gif" %}" alt="icon" /><span>http://openid.aol.com/<strong>username</strong></span>
+ <img src="{% media "/content/jquery-openid/images/aol.gif" %}" alt="icon" /><span>http://openid.aol.com/<strong>username</strong></span>
</div>
</li>
</ul>
@@ -83,43 +83,43 @@ {% endif %}
</li>
<li class="openid" title="OpenID URL">
- <img src="{% href "/content/jquery-openid/images/openidico16.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/openidico16.png" %}" alt="icon" />
<span>http://{your-openid-url}</span>
</li>
<li class="username" title="MyOpenID user name">
- <img src="{% href "/content/jquery-openid/images/myopenid-2.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/myopenid-2.png" %}" alt="icon" />
<span>http://<strong>username</strong>.myopenid.com/</span>
</li>
<li class="username" title="Flickr user name">
- <img src="{% href "/content/jquery-openid/images/flickr.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/flickr.png" %}" alt="icon" />
<span>http://flickr.com/<strong>username</strong>/</span>
</li>
<li class="username" title="Technorati user name">
- <img src="{% href "/content/jquery-openid/images/technorati-1.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/technorati-1.png" %}" alt="icon" />
<span>http://technorati.com/people/technorati/<strong>username</strong>/</span>
</li>
<li class="username" title="Wordpress blog name">
- <img src="{% href "/content/jquery-openid/images/wordpress.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/wordpress.png" %}" alt="icon" />
<span>http://<strong>username</strong>.wordpress.com</span>
</li>
<li class="username" title="Blogger blog name">
- <img src="{% href "/content/jquery-openid/images/blogger-1.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/blogger-1.png" %}" alt="icon" />
<span>http://<strong>username</strong>.blogspot.com/</span>
</li>
<li class="username" title="LiveJournal blog name">
- <img src="{% href "/content/jquery-openid/images/livejournal-1.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/livejournal-1.png" %}" alt="icon" />
<span>http://<strong>username</strong>.livejournal.com</span>
</li>
<li class="username" title="ClaimID user name">
- <img src="{% href "/content/jquery-openid/images/claimid-0.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/claimid-0.png" %}" alt="icon" />
<span>http://claimid.com/<strong>username</strong></span>
</li>
<li class="username" title="Vidoop user name">
- <img src="{% href "/content/jquery-openid/images/vidoop.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/vidoop.png" %}" alt="icon" />
<span>http://<strong>username</strong>.myvidoop.com/</span>
</li>
<li class="username" title="Verisign user name">
- <img src="{% href "/content/jquery-openid/images/verisign-2.png" %}" alt="icon" />
+ <img src="{% media "/content/jquery-openid/images/verisign-2.png" %}" alt="icon" />
<span>http://<strong>username</strong>.pip.verisignlabs.com/</span>
</li>
</ul>
diff --git a/forum/templates/base.html b/forum/templates/base.html index 17a32ef2..fdaef153 100755 --- a/forum/templates/base.html +++ b/forum/templates/base.html @@ -13,17 +13,17 @@ {% if settings.GOOGLE_SITEMAP_CODE %} <meta name="google-site-verification" content="{{settings.GOOGLE_SITEMAP_CODE}}" /> {% endif %} - <link rel="shortcut icon" href="{% href "/content/images/favicon.ico" %}" /> - <link href="{% href "/content/style/style.css" %}" rel="stylesheet" type="text/css" /> + <link rel="shortcut icon" href="{% media "/content/images/favicon.ico" %}" /> + <link href="{% media "/content/style/style.css" %}" rel="stylesheet" type="text/css" /> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript">google.load("jquery", "1.2.6");</script> <script type="text/javascript"> var i18nLang = '{{settings.LANGUAGE_CODE}}'; var scriptUrl = '/{{settings.FORUM_SCRIPT_ALIAS}}' </script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.i18n.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/jquery.i18n.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.utils.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.i18n.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/jquery.i18n.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.utils.js" %}'></script> <!--<script type="text/javascript"> var uservoiceJsHost = ("https:" == document.location.protocol) ? "https://uservoice.com" : "http://cdn.uservoice.com"; document.write(unescape("%3Cscript src='" + uservoiceJsHost + "/javascripts/widgets/tab.js' type='text/javascript'%3E%3C/script%3E")) diff --git a/forum/templates/base_content.html b/forum/templates/base_content.html index eacdc6d0..800785c7 100644 --- a/forum/templates/base_content.html +++ b/forum/templates/base_content.html @@ -9,8 +9,8 @@ {% if settings.GOOGLE_SITEMAP_CODE %} <meta name="google-site-verification" content="{{ settings.GOOGLE_SITEMAP_CODE }}" /> {% endif %} - <link rel="shortcut icon" href="{% href "/content/images/favicon.ico" %}" /> - <link href="{% href "/content/style/style.css" %}" rel="stylesheet" type="text/css" /> + <link rel="shortcut icon" href="{% media "/content/images/favicon.ico" %}" /> + <link href="{% media "/content/style/style.css" %}" rel="stylesheet" type="text/css" /> {% spaceless %} {% block forestyle %}{% endblock %} {% endspaceless %} @@ -20,9 +20,9 @@ var i18nLang = '{{ settings.LANGUAGE_CODE }}'; var scriptUrl = '/{{settings.FORUM_SCRIPT_ALIAS}}' </script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.i18n.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/jquery.i18n.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.utils.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.i18n.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/jquery.i18n.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.utils.js" %}'></script> <!-- <script type="text/javascript"> var uservoiceJsHost = ("https:" == document.location.protocol) ? "https://uservoice.com" : "http://cdn.uservoice.com"; diff --git a/forum/templates/book.html b/forum/templates/book.html index e83268e4..128f6668 100644 --- a/forum/templates/book.html +++ b/forum/templates/book.html @@ -85,12 +85,12 @@ {% if question.favourite_count %} {% if question.favorited_myself %} <div class="favorites-count"> - <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="{% href "/content/images/vote-favorite-on.png" %}"> + <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="{% media "/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="{% href "/content/images/vote-favorite-off.png" %}"> + <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="{% media "/content/images/vote-favorite-off.png" %}"> <div><b>{{question.favourite_count|intcomma}}</b></div> </div> {% endif %} @@ -144,7 +144,7 @@ </div> <div class="bookFeed"> <div id="feeds"> - <a href="{% href "/feeds/rss" %} " title="{% trans "subscribe to book RSS feed" %}">{% trans "subscribe to the questions feed" %}</a> + <a href="{% media "/feeds/rss" %} " title="{% trans "subscribe to book RSS feed" %}">{% trans "subscribe to the questions feed" %}</a> </div> </div> diff --git a/forum/templates/footer.html b/forum/templates/footer.html index 66feff8a..239ac9e1 100644 --- a/forum/templates/footer.html +++ b/forum/templates/footer.html @@ -28,7 +28,7 @@ </div> <div id="licenseLogo"> <a href="http://creativecommons.org/licenses/by/3.0/"> - <img src="{% href "/content/images/cc-wiki.png" %}" title="Creative Commons: Attribution - Share Alike" alt="cc-wiki" width="50" height="68" /> + <img src="{% media "/content/images/cc-wiki.png" %}" title="Creative Commons: Attribution - Share Alike" alt="cc-wiki" width="50" height="68" /> </a> </div> </div> diff --git a/forum/templates/header.html b/forum/templates/header.html index 466659de..4869fb3a 100644 --- a/forum/templates/header.html +++ b/forum/templates/header.html @@ -18,7 +18,7 @@ <td width="23%"> <div id="logo"> <a href="{% url index %}"> - <img src="{% href "/content/images/logo.png" %}" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/> + <img src="{% media "/content/images/logo.png" %}" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/> </a> </div> </td> diff --git a/forum/templates/index.html b/forum/templates/index.html index 4041b863..3011dc58 100644 --- a/forum/templates/index.html +++ b/forum/templates/index.html @@ -17,8 +17,8 @@ $("#nav_questions").attr('className',"on"); }); </script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.tag_selector.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.tag_selector.js" %}'></script> {% endblock %} {% block content %} <div class="tabBar"> @@ -153,7 +153,7 @@ </div> {% endif %} <div id="feeds"> -<a href="{% href "/feeds/rss" %}" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a> +<a href="{% media "/feeds/rss" %}" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a> </div> {% endblock %} {% block tail %} diff --git a/forum/templates/question.html b/forum/templates/question.html index 3955c059..15df0fc8 100644 --- a/forum/templates/question.html +++ b/forum/templates/question.html @@ -11,13 +11,13 @@ <meta name="keywords" content="{{question.tagname_meta_generator}}" />
<link rel="canonical" href="{{settings.APP_URL}}{{question.get_absolute_url}}" />
{% if not question.closed %}
- <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script>
- <script type='text/javascript' src='{% href "/content/js/wmd/showdown.js" %}'></script>
- <script type='text/javascript' src='{% href "/content/js/wmd/wmd.js" %}'></script>
- <link rel="stylesheet" type="text/css" href="{% href "/content/js/wmd/wmd.css" %}" />
+ <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script>
+ <script type='text/javascript' src='{% media "/content/js/wmd/showdown.js" %}'></script>
+ <script type='text/javascript' src='{% media "/content/js/wmd/wmd.js" %}'></script>
+ <link rel="stylesheet" type="text/css" href="{% media "/content/js/wmd/wmd.css" %}" />
{% endif %}
- <script type='text/javascript' src='{% href "/content/js/com.cnprog.post.js" %}'></script>
- <script type='text/javascript' src='{% href "/content/js/jquery.validate.pack.js" %}'></script>
+ <script type='text/javascript' src='{% media "/content/js/com.cnprog.post.js" %}'></script>
+ <script type='text/javascript' src='{% media "/content/js/jquery.validate.pack.js" %}'></script>
<script type="text/javascript">
// define reputation needs for comments
@@ -70,9 +70,9 @@ {% if question_vote %}
<img id="question-img-upvote-{{ question.id }}" class="question-img-upvote"
{% if question_vote.is_upvote %}
- src="{% href "/content/images/vote-arrow-up-on.png" %}"
+ src="{% media "/content/images/vote-arrow-up-on.png" %}"
{% else %}
- src="{% href "/content/images/vote-arrow-up.png" %}"
+ src="{% media "/content/images/vote-arrow-up.png" %}"
{% endif %}
alt="{% trans "i like this post (click again to cancel)" %}"
title="{% trans "i like this post (click again to cancel)" %}" />
@@ -82,9 +82,9 @@ </div>
<img id="question-img-downvote-{{ question.id }}" class="question-img-downvote"
{% if question_vote.is_downvote %}
- src="{% href "/content/images/vote-arrow-down-on.png" %}"
+ src="{% media "/content/images/vote-arrow-down-on.png" %}"
{% else %}
- src="{% href "/content/images/vote-arrow-down.png" %}"
+ src="{% media "/content/images/vote-arrow-down.png" %}"
{% endif %}
alt="{% trans "i dont like this post (click again to cancel)" %}"
title="{% trans "i dont like this post (click again to cancel)" %}" />
@@ -92,27 +92,27 @@ {% else %}
<img id="question-img-upvote-{{ question.id }}" class="question-img-upvote"
alt="{% trans "i like this post (click again to cancel)" %}"
- src="{% href "/content/images/vote-arrow-up.png" %}"
+ src="{% media "/content/images/vote-arrow-up.png" %}"
title="{% trans "i like this post (click again to cancel)" %}" />
<div id="question-vote-number-{{ question.id }}" class="vote-number"
title="{% trans "current number of votes" %}">
{{ question.score }}
</div>
<img id="question-img-downvote-{{ question.id }}" class="question-img-downvote"
- src="{% href "/content/images/vote-arrow-down.png" %}"
+ src="{% media "/content/images/vote-arrow-down.png" %}"
alt="{% trans "i dont like this post (click again to cancel)" %}"
title="{% trans "i dont like this post (click again to cancel)" %}" />
{% endif %}
{% if favorited %}
- <img class="question-img-favorite" src="{% href "/content/images/vote-favorite-on.png" %}"
+ <img class="question-img-favorite" src="{% media "/content/images/vote-favorite-on.png" %}"
alt="{% trans "mark this question as favorite (click again to cancel)" %}"
title="{% trans "mark this question as favorite (click again to cancel)" %}" />
<div id="favorite-number" class="favorite-number my-favorite-number">
{{ question.favourite_count }}
</div>
{% else %}
- <img class="question-img-favorite" src="{% href "/content/images/vote-favorite-off.png" %}"
+ <img class="question-img-favorite" src="{% media "/content/images/vote-favorite-off.png" %}"
alt="{% trans "remove favorite mark from this question (click again to restore mark)" %}"
title="{% trans "remove favorite mark from this question (click again to restore mark)" %}" />
<div id="favorite-number" class="favorite-number">
@@ -178,7 +178,7 @@ <span class="comment-age">({% diff_date comment.added_at %})</span>
{% if request.user|can_delete_comment:comment %}
<img class="delete-icon"
- src="{% href "/content/images/close-small.png" %}"
+ src="{% media "/content/images/close-small.png" %}"
title="{% trans "delete this comment" %}"/>
{% endif %}
{% endspaceless %}
@@ -251,26 +251,26 @@ <td style="width:30px;vertical-align:top">
<div class="vote-buttons">
<img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote"
- src="{% blockresource %}/content/images/vote-arrow-up{% get_user_vote_image user_answer_votes answer.id 1 %}.png{% endblockresource %}"
+ src="{% blockmedia %}/content/images/vote-arrow-up{% get_user_vote_image user_answer_votes answer.id 1 %}.png{% endblockmedia %}"
alt="{% trans "i like this answer (click again to cancel)" %}"
title="{% trans "i like this answer (click again to cancel)" %}"/>
<div id="answer-vote-number-{{ answer.id }}" class="vote-number" title="{% trans "current number of votes" %}">
{{ answer.score }}
</div>
<img id="answer-img-downvote-{{ answer.id }}" class="answer-img-downvote"
- src="{% blockresource %}/content/images/vote-arrow-down{% get_user_vote_image user_answer_votes answer.id -1 %}.png{% endblockresource %}"
+ src="{% blockmedia %}/content/images/vote-arrow-down{% get_user_vote_image user_answer_votes answer.id -1 %}.png{% endblockmedia %}"
alt="{% trans "i dont like this answer (click again to cancel)" %}"
title="{% trans "i dont like this answer (click again to cancel)" %}" />
{% ifequal request.user question.author %}
<img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept"
- src="{% blockresource %}/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png{% endblockresource %}"
+ src="{% blockmedia %}/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png{% endblockmedia %}"
alt="{% trans "mark this answer as favorite (click again to undo)" %}"
title="{% trans "mark this answer as favorite (click again to undo)" %}" />
{% else %}
{% if answer.accepted %}
<img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept"
- src="{% blockresource %}/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png{% endblockresource %}"
+ src="{% blockmedia %}/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png{% endblockmedia %}"
alt="{% trans "the author of the question has selected this answer as correct" %}"
title="{% trans "the author of the question has selected this answer as correct" %}" />
{% endif %}
@@ -327,7 +327,7 @@ <span class="comment-age">({% diff_date comment.added_at %})</span>
{% if request.user|can_delete_comment:comment %}
<img class="delete-icon"
- src="{% href "/content/images/close-small.png" %}"
+ src="{% media "/content/images/close-small.png" %}"
title="{% trans "delete this comment" %}"/>
{% endif %}
{% endspaceless %}
diff --git a/forum/templates/question_edit.html b/forum/templates/question_edit.html index 8ce980fe..59b70477 100644 --- a/forum/templates/question_edit.html +++ b/forum/templates/question_edit.html @@ -4,12 +4,12 @@ {% load extra_tags %} {% block title %}{% spaceless %}{% trans "Edit question" %}{% endspaceless %}{% endblock %} {% block forejs %} - <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.post.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/jquery.validate.pack.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/wmd/showdown.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/wmd/wmd.js" %}'></script> - <link rel="stylesheet" type="text/css" href="{% href "/content/js/wmd/wmd.css" %}" /> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.post.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/jquery.validate.pack.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/wmd/showdown.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/wmd/wmd.js" %}'></script> + <link rel="stylesheet" type="text/css" href="{% media "/content/js/wmd/wmd.css" %}" /> <script type="text/javascript"> //todo move javascript out $().ready(function(){ diff --git a/forum/templates/question_retag.html b/forum/templates/question_retag.html index b7957962..6a240dbc 100644 --- a/forum/templates/question_retag.html +++ b/forum/templates/question_retag.html @@ -3,9 +3,9 @@ {% load extra_tags %} {% block title %}{% spaceless %}{% trans "Change tags" %}{% endspaceless %}{% endblock %} {% block forejs %} - <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.post.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/jquery.validate.pack.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.post.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/jquery.validate.pack.js" %}'></script> <script type="text/javascript"> $().ready(function(){ diff --git a/forum/templates/questions.html b/forum/templates/questions.html index 67751996..e849e09d 100644 --- a/forum/templates/questions.html +++ b/forum/templates/questions.html @@ -19,8 +19,8 @@ Hilite.debug_referrer = location.href;
});
</script>
- <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script>
- <script type='text/javascript' src='{% href "/content/js/com.cnprog.tag_selector.js" %}'></script>
+ <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script>
+ <script type='text/javascript' src='{% media "/content/js/com.cnprog.tag_selector.js" %}'></script>
{% endblock %}
{% block content %}
<div class="tabBar">
diff --git a/forum/templates/revisions_answer.html b/forum/templates/revisions_answer.html index 974e589c..1c2e9c2f 100644 --- a/forum/templates/revisions_answer.html +++ b/forum/templates/revisions_answer.html @@ -6,8 +6,8 @@ {% load humanize %} {% block title %}{% spaceless %}{% trans "Revision history" %}{% endspaceless %}{% endblock %} {% block forejs %} - <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.post.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.post.js" %}'></script> <script type="text/javascript"> //todo - take this out into .js file $().ready(function(){ @@ -46,7 +46,7 @@ <table width="100%"> <tr> <td width="20" style="vertical-align:middle"><img id="rev-arrow-{{ revision.revision }}" - src="{% href "/content/images/expander-arrow-show.gif" %}" + src="{% media "/content/images/expander-arrow-show.gif" %}" alt="{% trans "click to hide/show revision" %}"/> </td> <td width="30px" style="vertical-align:middle"><span class="revision-number" title="{% trans "revision" %} {{ revision.revision }}">{{ revision.revision }}</span></td> diff --git a/forum/templates/revisions_question.html b/forum/templates/revisions_question.html index 83512e4a..e945c6d6 100644 --- a/forum/templates/revisions_question.html +++ b/forum/templates/revisions_question.html @@ -7,8 +7,8 @@ {% load humanize %} {% block title %}{% spaceless %}{% trans "Revision history" %}{% endspaceless %}{% endblock %} {% block forejs %} - <script type='text/javascript' src='{% href "/content/js/com.cnprog.editor.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/com.cnprog.post.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.editor.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.post.js" %}'></script> <script type="text/javascript"> //todo - take this out into .js file $().ready(function(){ @@ -46,7 +46,7 @@ <table width="100%"> <tr> <td width="20" style="vertical-align:middle"><img id="rev-arrow-{{ revision.revision }}" - src="{% href "/content/images/expander-arrow-show.gif" %}" + src="{% media "/content/images/expander-arrow-show.gif" %}" alt="{% trans "click to hide/show revision" %}"/> </td> <td width="30px" style="vertical-align:middle"><span class="revision-number" title="{% trans "revision" %} {{ revision.revision }}">{{ revision.revision }}</span></td> diff --git a/forum/templates/tag_selector.html b/forum/templates/tag_selector.html index 94d23f3c..07ffb135 100644 --- a/forum/templates/tag_selector.html +++ b/forum/templates/tag_selector.html @@ -10,7 +10,7 @@ title="{% blocktrans with tag as tagname %}see questions tagged '{{ tag_name }}'{% endblocktrans %}" href="{% url tag_questions tag_name|urlencode %}">{{tag_name}}</a> <img class="delete-icon" - src="{% href "/content/images/close-small-dark.png" %}" + src="{% media "/content/images/close-small-dark.png" %}" title="{% blocktrans %}remove '{{tag_name}}' from the list of interesting tags{% endblocktrans %}"/> </span> {% endspaceless %} @@ -27,7 +27,7 @@ title="{% blocktrans with tag as tagname %}see questions tagged '{{ tag_name }}'{% endblocktrans %}" href="{% url tag_questions tag_name|urlencode %}">{{tag_name}}</a> <img class="delete-icon" - src="{% href "/content/images/close-small-dark.png" %}" + src="{% media "/content/images/close-small-dark.png" %}" title="{% blocktrans %}remove '{{tag_name}}' from the list of ignored tags{% endblocktrans %}"/> </span> {% endspaceless %} diff --git a/forum/templates/user.html b/forum/templates/user.html index 6e4098e9..9f3e8370 100644 --- a/forum/templates/user.html +++ b/forum/templates/user.html @@ -12,8 +12,8 @@ {% endblock %} {% block forejs %} {% if request.user|can_moderate_users %} - <script type='text/javascript' src='{% href "/content/js/com.cnprog.admin.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/jquery.form.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/com.cnprog.admin.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/jquery.form.js" %}'></script> {% endif %} <script type="text/javascript"> var viewUserID = {{view_user.id}}; diff --git a/forum/templates/user_edit.html b/forum/templates/user_edit.html index bc5056f9..cc144e24 100644 --- a/forum/templates/user_edit.html +++ b/forum/templates/user_edit.html @@ -24,7 +24,7 @@ {% if request.user.email %}
{% gravatar request.user 128 %}
{% else %}
- <img src="{% href "/content/images/nophoto.png" %}">
+ <img src="{% media "/content/images/nophoto.png" %}">
{% endif %}
<div style="padding:20px 0 0 20px;font-weight:bold;font-size:150%">
<a href="http://www.gravatar.com/" target="_blank"
diff --git a/forum/templates/user_reputation.html b/forum/templates/user_reputation.html index 16127140..2f959c27 100644 --- a/forum/templates/user_reputation.html +++ b/forum/templates/user_reputation.html @@ -4,8 +4,8 @@ {% load extra_filters %} {% load humanize %} {% block userjs %} - <script type='text/javascript' src='{% href "/content/js/excanvas.pack.js" %}'></script> - <script type='text/javascript' src='{% href "/content/js/jquery.flot.pack.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/excanvas.pack.js" %}'></script> + <script type='text/javascript' src='{% media "/content/js/jquery.flot.pack.js" %}'></script> <script type="text/javascript"> $().ready(function(){ diff --git a/forum/templates/user_stats.html b/forum/templates/user_stats.html index ecc39807..8fc16447 100644 --- a/forum/templates/user_stats.html +++ b/forum/templates/user_stats.html @@ -69,12 +69,12 @@ <table> <tr> <td width="60"> - <img style="cursor: default;" src="{% href "/content/images/vote-arrow-up-on.png" %}" alt="{% trans "thumb up" %}" /> + <img style="cursor: default;" src="{% media "/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;" src="{% href "/content/images/vote-arrow-down-on.png" %}" alt="{% trans "thumb down" %}" /> + <img style="cursor: default;" src="{% media "/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> diff --git a/forum/templates/user_votes.html b/forum/templates/user_votes.html index 94d7fcbd..f29e3394 100644 --- a/forum/templates/user_votes.html +++ b/forum/templates/user_votes.html @@ -12,9 +12,9 @@ <div style="width:150px;float:left">{% diff_date vote.voted_at 3 %}</div> <div style="width:30px;float:left"> {% ifequal vote.vote 1 %} - <img src="{% href "/content/images/vote-arrow-up-on.png" %}" title="{% trans "upvote" %}"> + <img src="{% media "/content/images/vote-arrow-up-on.png" %}" title="{% trans "upvote" %}"> {% else %} - <img src="{% href "/content/images/vote-arrow-down-on.png" %}" title="{% trans "downvote" %}"> + <img src="{% media "/content/images/vote-arrow-down-on.png" %}" title="{% trans "downvote" %}"> {% endifequal %} </div> <div style="float:left;overflow:hidden;width:750px"> diff --git a/forum/templates/users_questions.html b/forum/templates/users_questions.html index b445a74c..5c7fb551 100644 --- a/forum/templates/users_questions.html +++ b/forum/templates/users_questions.html @@ -10,14 +10,14 @@ <div class="favorites-count"> <img title="{% trans "this questions was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" alt="{% trans "thumb-up on" %}" - src="{% href "/content/images/vote-favorite-on.png" %}"/> + src="{% media "/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" %}" alt="{% trans "thumb-up off" %}" - src="{% href "/content/images/vote-favorite-off.png" %}"/> + src="{% media "/content/images/vote-favorite-off.png" %}"/> <div><b>{{question.favourite_count|intcomma}}</b></div> </div> {% endif %} diff --git a/forum/templatetags/extra_tags.py b/forum/templatetags/extra_tags.py index 4f79e497..aa1a001f 100644 --- a/forum/templatetags/extra_tags.py +++ b/forum/templatetags/extra_tags.py @@ -276,7 +276,7 @@ def get_latest_changed_timestamp(): return timestr @register.simple_tag -def href(url): +def media(url): url = '///' + settings.FORUM_SCRIPT_ALIAS + '/' + url return posixpath.normpath(url) + '?v=%d' % settings.RESOURCE_REVISION @@ -323,7 +323,7 @@ def joinitems(parser,token): return JoinItemListNode(separator=sep_node,items=nodelist) -class BlockResourceNode(template.Node): +class BlockMediaUrlNode(template.Node): def __init__(self,nodelist): self.items = nodelist def render(self,context): @@ -336,16 +336,16 @@ class BlockResourceNode(template.Node): out = os.path.normpath(out) + '?v=%d' % settings.RESOURCE_REVISION return out.replace(' ','') -@register.tag(name='blockresource') -def blockresource(parser,token): +@register.tag(name='blockmedia') +def blockmedia(parser,token): try: tagname = token.split_contents() except ValueError: - raise template.TemplateSyntaxError("blockresource tag does not use arguments") + raise template.TemplateSyntaxError("blockmedia tag does not use arguments") nodelist = [] while True: - nodelist.append(parser.parse(('endblockresource'))) + nodelist.append(parser.parse(('endblockmedia'))) next = parser.next_token() - if next.contents == 'endblockresource': + if next.contents == 'endblockmedia': break - return BlockResourceNode(nodelist) + return BlockMediaUrlNode(nodelist) |