summaryrefslogtreecommitdiffstats
path: root/hyperkitty
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-09-06 12:50:21 +0200
committerAurélien Bompard <aurelien@bompard.org>2012-09-06 12:50:21 +0200
commit4935c17ef310732a5e339ff5faa6c33bfde298b6 (patch)
tree86840af9568592e437c5c86df7c110a099fdf776 /hyperkitty
parent9877360a7f81943239d852de14eebf8be7674ad5 (diff)
downloadhyperkitty-4935c17ef310732a5e339ff5faa6c33bfde298b6.tar.gz
hyperkitty-4935c17ef310732a5e339ff5faa6c33bfde298b6.tar.xz
hyperkitty-4935c17ef310732a5e339ff5faa6c33bfde298b6.zip
Fix leftover hardcoded URLs
Diffstat (limited to 'hyperkitty')
-rw-r--r--hyperkitty/templates/api.html12
-rw-r--r--hyperkitty/templates/login.html12
-rw-r--r--hyperkitty/templates/month_view.html9
-rw-r--r--hyperkitty/templates/recent_activities.html18
-rw-r--r--hyperkitty/templates/search.html9
-rw-r--r--hyperkitty/templates/user_profile.html8
-rw-r--r--hyperkitty/urls.py6
7 files changed, 39 insertions, 35 deletions
diff --git a/hyperkitty/templates/api.html b/hyperkitty/templates/api.html
index 85f3cf0..0fa38c9 100644
--- a/hyperkitty/templates/api.html
+++ b/hyperkitty/templates/api.html
@@ -36,8 +36,8 @@
Using the address /api/email/&lt;list name&gt;/&lt;Message-ID&gt; you will be able to
retrieve the information known about a specific email on the specified mailing-list.
</p>
- <p> For example: <a href="/api/email/devel@fp.o/<1312985457.28933.34.camel@ankur.pc>/">
- /api/email/devel@fp.o/&lt;1312985457.28933.34.camel@ankur.pc&gt;/
+ <p> For example: <a href="{% url api_email mlist_fqdn='devel@fp.o', hashid='13129854572893334' %}">
+ {% url api_email mlist_fqdn='devel@fp.o', hashid='13129854572893334' %}
</a>
</p>
</div>
@@ -49,8 +49,8 @@ retrieve the information known about a specific email on the specified mailing-l
Using the address /api/thread/&lt;list name&gt;/&lt;Message-ID&gt; you will be able to
retrieve the all the email for a specific thread on the specified mailing-list.
</p>
- <p> For example: <a href="/api/thread/devel@fp.o/1/">
- /api/email/devel@fp.o/1/
+ <p> For example: <a href="{% url api_thread mlist_fqdn='devel@fp.o', threadid='13129854572893334' %}">
+ {% url api_thread mlist_fqdn='devel@fp.o', threadid='13129854572893334' %}
</a>
</p>
</div>
@@ -69,8 +69,8 @@ search for all emails of the specified mailing-list containing the provided keyw
<li>Content</li>
<li>SubjectContent</li>
</ul>
- <p> For example: <a href="/api/search/devel@fp.o/From/pingoured">
- /api/search/devel@fp.o/From/pingoured
+ <p> For example: <a href="{% url api_search mlist_fqdn='devel@fp.o', field='From', keyword='pingoured' %}">
+ {% url api_search mlist_fqdn='devel@fp.o', field='From', keyword='pingoured' %}
</a>
</p>
</div>
diff --git a/hyperkitty/templates/login.html b/hyperkitty/templates/login.html
index a137c97..2ffdbd2 100644
--- a/hyperkitty/templates/login.html
+++ b/hyperkitty/templates/login.html
@@ -17,13 +17,13 @@
</form>
-<ul class="socialLogin">
- <li><a title="Google" class="socialaccount_provider google" href="/login/google"><img src="{{ STATIC_URL }}img/login/google.png" alt="Google"></a></li>
-
- <li><a title="Yahoo" class="socialaccount_provider yahoo" href="/login/yahoo"><img src="{{ STATIC_URL }}img/login/yahoo.png" alt="Yahoo"></a></li>
-
+<ul class="socialLogin">
+ <li><a title="Google" class="socialaccount_provider google" href="{% url socialauth_begin backend='google' %}"><img src="{{ STATIC_URL }}img/login/google.png" alt="Google"></a></li>
+
+ <li><a title="Yahoo" class="socialaccount_provider yahoo" href="{% url socialauth_begin backend='yahoo' %}"><img src="{{ STATIC_URL }}img/login/yahoo.png" alt="Yahoo"></a></li>
+
<li>
- <form method="post" action="{% url socialauth_complete "browserid" %}">
+ <form method="post" action="{% url socialauth_complete "browserid" %}">
{% csrf_token %}
<input type="hidden" name="assertion" value="" />
<a rel="nofollow" id="browserid" href="#"><img src="{{ STATIC_URL }}img/login/browserid.png" alt="Login using BrowserID" /></a>
diff --git a/hyperkitty/templates/month_view.html b/hyperkitty/templates/month_view.html
index 91d40f1..3dc3db3 100644
--- a/hyperkitty/templates/month_view.html
+++ b/hyperkitty/templates/month_view.html
@@ -16,11 +16,12 @@
<div class="thread_content">
{% if email.category_tag %}
<div class="inline-block type type_{{email.category_tag}}">
- <a href="/tag/{{list_address}}/{{email.category_tag}}"> {{email.category}} </a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category_tag %}">{{email.category}}</a>
</div>
- {% else %}
+ {% endif %}
+ {% if email.category %}
<div class="inline-block type type_{{email.category|lower}}">
- <a href="/tag/{{list_address}}/{{email.category|lower}}"> {{email.category}} </a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}">{{email.category}}</a>
</div>
{% endif %}
<div class="inline-block gravatar">
@@ -42,7 +43,7 @@
</li>
{% for tag in email.tags %}
<li>
- <a href="/tag/{{list_address}}/{{tag}}">{{tag}}</a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=tag %}">{{tag}}</a>
</li>
{% endfor %}
{% endif %}
diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html
index 9195834..3cbafdf 100644
--- a/hyperkitty/templates/recent_activities.html
+++ b/hyperkitty/templates/recent_activities.html
@@ -31,7 +31,7 @@
var bar = vis.add(pv.Bar)
.data(data)
- .event("click", function(n) self.location = "/archives/{{list_address}}/" + dates[this.index])
+ .event("click", function(n) self.location = "{% url archives mlist_fqdn=list_address %}" + dates[this.index] + "/")
.left(function() x(this.index))
.width(x.range().band)
.bottom(0)
@@ -90,11 +90,12 @@
<ul class="inline-block">
{% if email.category_tag %}
<li class="type type_{{email.category_tag}}">
- <a href="/tag/{{list_address}}/{{email.category_tag}}"> {{email.category}} </a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category_tag %}">{{email.category}}</a>
</li>
- {% else %}
+ {% endif %}
+ {% if email.category %}
<li class="type type_{{email.category|lower}}">
- <a href="/tag/{{list_address}}/{{email.category|lower}}"> {{email.category}} </a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}">{{email.category}}</a>
</li>
{% endif %}
{% if settings.USE_MOCKUPS %}
@@ -127,11 +128,12 @@
<ul class="inline-block">
{% if email.category_tag %}
<li class="type type_{{email.category_tag}}">
- <a href="/tag/{{list_address}}/{{email.category_tag}}"> {{email.category}} </a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category_tag %}">{{email.category}}</a>
</li>
- {% else %}
+ {% endif %}
+ {% if email.category %}
<li class="type type_{{email.category|lower}}">
- <a href="/tag/{{list_address}}/{{email.category|lower}}"> {{email.category}} </a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}">{{email.category}}</a>
</li>
{% endif %}
{% if settings.USE_MOCKUPS %}
@@ -206,7 +208,7 @@
<ul>
{% for ar_month in value %}
<li>
- <a href="{% url archives_with_month year=key, mlist_fqdn=list_address, month=ar_month %}"> {{ ar_month|tomonth }} </a>
+ <a href="{% url archives_with_month year=key, mlist_fqdn=list_address, month=ar_month %}">{{ ar_month|tomonth }}</a>
</li>
{% endfor %}
</ul>
diff --git a/hyperkitty/templates/search.html b/hyperkitty/templates/search.html
index 1727a79..0fd6e44 100644
--- a/hyperkitty/templates/search.html
+++ b/hyperkitty/templates/search.html
@@ -20,11 +20,12 @@
<div class="thread_content">
{% if email.category_tag %}
<div class="inline-block type type_{{email.category_tag}}">
- <a href="/tag/{{list_address}}/{{email.category_tag}}"> {{email.category}} </a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category_tag %}">{{email.category}}</a>
</div>
- {% else %}
+ {% endif %}
+ {% if email.category %}
<div class="inline-block type type_{{email.category|lower}}">
- <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}"> {{email.category}} </a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}">{{email.category}}</a>
</div>
{% endif %}
<div class="inline-block gravatar">
@@ -45,7 +46,7 @@
</li>
{% for tag in email.tags %}
<li>
- <a href="/tag/{{list_address}}/{{tag}}">{{tag}}</a>
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=tag %}">{{tag}}</a>
</li>
{% endfor %}
</ul>
diff --git a/hyperkitty/templates/user_profile.html b/hyperkitty/templates/user_profile.html
index 798a947..3077141 100644
--- a/hyperkitty/templates/user_profile.html
+++ b/hyperkitty/templates/user_profile.html
@@ -41,9 +41,9 @@
{% if vote.vote == 1 %}
<li>
{% if vote.message.content|trimString|length > 0 %}
- <a href="/message/{{vote.list_address}}/{{vote.messageid}}">{{ vote.message.content|truncatechars:20 }}</a>
+ <a href="{% url message_index mlist_fqdn=vote.list_address, hashid=vote.messageid %}">{{ vote.message.content|truncatechars:20 }}</a>
{% else %}
- <a href="/message/{{vote.list_address}}/{{vote.messageid}}">Message is empty</a>
+ <a href="{% url message_index mlist_fqdn=vote.list_address, hashid=vote.messageid %}">Message is empty</a>
{% endif %}
</li>
{% endif %}
@@ -57,9 +57,9 @@
{% if vote.vote == -1 %}
<li>
{% if vote.message.content|trimString|length > 0 %}
- <a href="/message/{{vote.list_address}}/{{vote.messageid}}">{{ vote.message.content|truncatechars:20 }}</a>
+ <a href="{% url message_index mlist_fqdn=vote.list_address, hashid=vote.messageid %}">{{ vote.message.content|truncatechars:20 }}</a>
{% else %}
- <a href="/message/{{vote.list_address}}/{{vote.messageid}}">Message is empty</a>
+ <a href="{% url message_index mlist_fqdn=vote.list_address, hashid=vote.messageid %}">Message is empty</a>
{% endif %}
</li>
{% endif %}
diff --git a/hyperkitty/urls.py b/hyperkitty/urls.py
index ae9ef64..61779bc 100644
--- a/hyperkitty/urls.py
+++ b/hyperkitty/urls.py
@@ -81,11 +81,11 @@ urlpatterns = patterns('hyperkitty.views',
# REST API
url(r'^api/$', 'api.api'),
url(r'^api/email\/(?P<mlist_fqdn>.*@.*)\/(?P<hashid>.*)/',
- EmailResource.as_view()),
+ EmailResource.as_view(), name="api_email"),
url(r'^api/thread\/(?P<mlist_fqdn>.*@.*)\/(?P<threadid>.*)/',
- ThreadResource.as_view()),
+ ThreadResource.as_view(), name="api_thread"),
url(r'^api/search\/(?P<mlist_fqdn>.*@.*)\/(?P<field>.*)\/(?P<keyword>.*)/',
- SearchResource.as_view()),
+ SearchResource.as_view(), name="api_search"),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),