closed #58: set urls namespace to "djangobb"
This commit is contained in:
parent
ca306b6fd8
commit
65d5956296
30 changed files with 157 additions and 154 deletions
|
@ -10,7 +10,7 @@ class ForumFeed(Feed):
|
|||
feed_type = Atom1Feed
|
||||
|
||||
def link(self):
|
||||
return reverse('forum.views.index')
|
||||
return reverse('djangobb:forum.views.index')
|
||||
|
||||
def item_guid(self, obj):
|
||||
return str(obj.id)
|
||||
|
|
|
@ -5,7 +5,6 @@ from markdown import Markdown
|
|||
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User, Group
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.html import escape, strip_tags
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
@ -102,8 +101,9 @@ class Forum(models.Model):
|
|||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return reverse('forum', args=[self.id])
|
||||
return ('djangobb:forum', [self.id])
|
||||
|
||||
@property
|
||||
def posts(self):
|
||||
|
@ -142,8 +142,9 @@ class Topic(models.Model):
|
|||
def reply_count(self):
|
||||
return self.post_count - 1
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return reverse('topic', args=[self.id])
|
||||
return ('djangobb:topic', [self.id])
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if self.id is None:
|
||||
|
@ -189,13 +190,6 @@ class Post(models.Model):
|
|||
verbose_name = _('Post')
|
||||
verbose_name_plural = _('Posts')
|
||||
|
||||
def summary(self):
|
||||
LIMIT = 50
|
||||
tail = len(self.body) > LIMIT and '...' or ''
|
||||
return self.body[:LIMIT] + tail
|
||||
|
||||
__unicode__ = summary
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if self.created is None:
|
||||
self.created = datetime.now()
|
||||
|
@ -212,9 +206,6 @@ class Post(models.Model):
|
|||
self.body_html = smiles(self.body_html)
|
||||
super(Post, self).save(*args, **kwargs)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('post', args=[self.id])
|
||||
|
||||
def delete(self, *args, **kwargs):
|
||||
self_id = self.id
|
||||
head_post_id = self.topic.posts.order_by('created')[0].id
|
||||
|
@ -241,6 +232,17 @@ class Post(models.Model):
|
|||
forum.topic_count = Topic.objects.filter(forum=forum).count()
|
||||
forum.save()
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return ('djangobb:post', [self.id])
|
||||
|
||||
def summary(self):
|
||||
LIMIT = 50
|
||||
tail = len(self.body) > LIMIT and '...' or ''
|
||||
return self.body[:LIMIT] + tail
|
||||
|
||||
__unicode__ = summary
|
||||
|
||||
|
||||
class Reputation(models.Model):
|
||||
from_user = models.ForeignKey(User, related_name='reputations_from', verbose_name=_('From'))
|
||||
|
@ -341,22 +343,15 @@ class PrivateMessage(models.Model):
|
|||
body = models.TextField(_('Message'))
|
||||
body_html = models.TextField(_('HTML version'))
|
||||
body_text = models.TextField(_('Text version'))
|
||||
|
||||
|
||||
class Meta:
|
||||
ordering = ['-created']
|
||||
verbose_name = _('Private message')
|
||||
verbose_name_plural = _('Private messages')
|
||||
|
||||
# TODO: summary and part of the save method is the same as in the Post model
|
||||
# move to common functions
|
||||
def summary(self):
|
||||
LIMIT = 50
|
||||
tail = len(self.body) > LIMIT and '...' or ''
|
||||
return self.body[:LIMIT] + tail
|
||||
|
||||
def __unicode__(self):
|
||||
return self.subject
|
||||
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if self.created is None:
|
||||
self.created = datetime.now()
|
||||
|
@ -373,9 +368,17 @@ class PrivateMessage(models.Model):
|
|||
self.body_html = smiles(self.body_html)
|
||||
new = self.id is None
|
||||
super(PrivateMessage, self).save(*args, **kwargs)
|
||||
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return reverse('forum_show_pm', args=[self.id])
|
||||
return ('djangobb:forum_show_pm', [self.id])
|
||||
|
||||
# TODO: summary and part of the save method is the same as in the Post model
|
||||
# move to common functions
|
||||
def summary(self):
|
||||
LIMIT = 50
|
||||
tail = len(self.body) > LIMIT and '...' or ''
|
||||
return self.body[:LIMIT] + tail
|
||||
|
||||
|
||||
class Ban(models.Model):
|
||||
|
@ -387,7 +390,10 @@ class Ban(models.Model):
|
|||
class Meta:
|
||||
verbose_name = _('Ban')
|
||||
verbose_name_plural = _('Bans')
|
||||
|
||||
|
||||
def __unicode__(self):
|
||||
return self.user.username
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.user.is_active = False
|
||||
self.user.save()
|
||||
|
@ -398,9 +404,6 @@ class Ban(models.Model):
|
|||
self.user.save()
|
||||
super(Ban, self).delete(*args, **kwargs)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.user.username
|
||||
|
||||
|
||||
class Attachment(models.Model):
|
||||
post = models.ForeignKey(Post, verbose_name=_('Post'), related_name='attachments')
|
||||
|
@ -410,17 +413,18 @@ class Attachment(models.Model):
|
|||
name = models.TextField(_('Name'))
|
||||
hash = models.CharField(_('Hash'), max_length=40, blank=True, default='', db_index=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
super(Attachment, self).save(*args, **kwargs)
|
||||
if not self.hash:
|
||||
self.hash = sha_constructor(str(self.id) + settings.SECRET_KEY).hexdigest()
|
||||
super(Attachment, self).save(*args, **kwargs)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return reverse('forum_attachment', args=[self.hash])
|
||||
return ('djangobb:forum_attachment', [self.hash])
|
||||
|
||||
def get_absolute_path(self):
|
||||
return os.path.join(settings.MEDIA_ROOT, forum_settings.ATTACHMENT_UPLOAD_TO,
|
||||
|
|
|
@ -53,7 +53,7 @@ def notify_topic_subscribers(post):
|
|||
'username': post.user.username,
|
||||
'message': post.body_text,
|
||||
'post_url': absolute_url(post.get_absolute_url()),
|
||||
'unsubscribe_url': absolute_url(reverse('forum_delete_subscription', args=[post.topic.id])),
|
||||
'unsubscribe_url': absolute_url(reverse('djangobb:forum_delete_subscription', args=[post.topic.id])),
|
||||
}
|
||||
#html_content = html_version(post)
|
||||
send_mail([to_email], subject, text_content)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
<div class="linkst">
|
||||
<div class="inbox">
|
||||
{% if forum %}
|
||||
<ul class="start"><li><a href="{% url index %}">{% trans "Root" %}</a> </li><li>» {% link forum %}</li></ul>
|
||||
<ul class="start"><li><a href="{% url djangobb:index %}">{% trans "Root" %}</a> </li><li>» {% link forum %}</li></ul>
|
||||
{% else %}
|
||||
<ul><li><a href="{% url index %}">{% trans "Root" %}</a> </li><li>» {% link topic.forum %}</li><li>» {{ topic }}</li></ul>
|
||||
<ul><li><a href="{% url djangobb:index %}">{% trans "Root" %}</a> </li><li>» {% link topic.forum %}</li><li>» {{ topic }}</li></ul>
|
||||
{% endif %}
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<div class="blockform">
|
||||
<h2><span>{% if forum %}{% trans "New topic" %}{% else %}{% trans "New reply" %}{% endif %}</span></h2>
|
||||
<div class="box">
|
||||
<form id="post" action="{% if forum %}{% url add_topic forum.id %}{% else %}{% url add_post topic.id %}{% endif %}" method="post" enctype="multipart/form-data">
|
||||
<form id="post" action="{% if forum %}{% url djangobb:add_topic forum.id %}{% else %}{% url djangobb:add_post topic.id %}{% endif %}" method="post" enctype="multipart/form-data">
|
||||
<div class="inform">
|
||||
<fieldset>
|
||||
<legend>{% trans "Write your message and submit" %}</legend>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<link rel="shortcut icon" href="{{ MEDIA_URL }}forum/favicon.png" type="image/png" />
|
||||
<script type="text/javascript">
|
||||
var MEDIA_URL = "{{ MEDIA_URL }}";
|
||||
var POST_PREVIEW_URL = "{% url post_preview %}";
|
||||
var POST_PREVIEW_URL = "{% url djangobb:post_preview %}";
|
||||
</script>
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="{{ MEDIA_URL }}forum/js/board.js"></script>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="linkst">
|
||||
<div class="inbox">
|
||||
<p class="pagelink conl">{% pagination %}</p>
|
||||
<ul><li><a href="{% url index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic }}
|
||||
<ul><li><a href="{% url djangobb:index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic }}
|
||||
<a href="{% url forum_feed "topic" %}{{ topic.id }}"><img src="{{ MEDIA_URL }}/forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" style="vertical-align:middle;" /></a>
|
||||
</li></ul>
|
||||
<div class="clearer"></div>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<div class="inbox">
|
||||
<div class="postleft">
|
||||
<dl>
|
||||
<dt><strong><a href="{% url forum_profile post.user %}">{{ post.user }}</a></strong></dt>
|
||||
<dt><strong><a href="{% url djangobb:forum_profile post.user %}">{{ post.user }}</a></strong></dt>
|
||||
<dd class="usertitle"><strong>{{ post.user.forum_profile.status }}</strong></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<div class="inbox">
|
||||
<p class="pagelink conl">{% pagination %}</p>
|
||||
{% if user.is_authenticated %}
|
||||
<p class="postlink conr"><a href="{% url add_topic forum.id %}">{% trans "New topic" %}</a></p>
|
||||
<p class="postlink conr"><a href="{% url djangobb:add_topic forum.id %}">{% trans "New topic" %}</a></p>
|
||||
{% endif %}
|
||||
<ul><li><a href="{% url index %}">{% trans "Root" %}</a> </li><li>» {{ forum.name }}</li></ul>
|
||||
<ul><li><a href="{% url djangobb:index %}">{% trans "Root" %}</a> </li><li>» {{ forum.name }}</li></ul>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -66,9 +66,9 @@
|
|||
<div class="inbox">
|
||||
<p class="pagelink conl">{% pagination %}</p>
|
||||
{% if user.is_authenticated %}
|
||||
<p class="postlink conr"><a href="{% url add_topic forum.id %}">{% trans "New topic" %}</a></p>
|
||||
<p class="postlink conr"><a href="{% url djangobb:add_topic forum.id %}">{% trans "New topic" %}</a></p>
|
||||
{% endif %}
|
||||
<ul><li><a href="{% url index %}">{% trans "Root" %}</a> </li><li>» {{ forum.name }}</li></ul>
|
||||
<ul><li><a href="{% url djangobb:index %}">{% trans "Root" %}</a> </li><li>» {{ forum.name }}</li></ul>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -88,7 +88,7 @@
|
|||
<form id="qjump" method="get" action="forum">
|
||||
<div><label>{% trans "Jump to" %}
|
||||
<br />
|
||||
<select name="id" id="forum_id" onchange="window.location=('{% url index %}'+this.options[this.selectedIndex].value)">
|
||||
<select name="id" id="forum_id" onchange="window.location=('{% url djangobb:index %}'+this.options[this.selectedIndex].value)">
|
||||
{% for category in categories %}
|
||||
<optgroup label="{{ category }}">
|
||||
{% for forum in category.forums.all %}
|
||||
|
@ -97,11 +97,11 @@
|
|||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="button" onclick="window.location=('{% url index %}'+getElementById('forum_id').value)" value=" {% trans "Go" %} " accesskey="g" />
|
||||
<input type="button" onclick="window.location=('{% url djangobb:index %}'+getElementById('forum_id').value)" value=" {% trans "Go" %} " accesskey="g" />
|
||||
</label></div>
|
||||
</form>
|
||||
{% if moderator %}
|
||||
<p id="modcontrols"><a href="{% url moderate forum.id %}">{% trans "Moderate forum" %}</a></p>
|
||||
<p id="modcontrols"><a href="{% url djangobb:moderate forum.id %}">{% trans "Moderate forum" %}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -6,23 +6,23 @@
|
|||
<div id="brdheader" class="block">
|
||||
<div class="box">
|
||||
<div id="brdtitle" class="inbox">
|
||||
<h1><span><a href="{% url index %}">{{ "HEADER"|forum_setting }}</a></span></h1>
|
||||
<h1><span><a href="{% url djangobb:index %}">{{ "HEADER"|forum_setting }}</a></span></h1>
|
||||
<p><span>{{ "TAGLINE"|forum_setting|safe }}</span></p>
|
||||
{% if not user.is_authenticated %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="brdmenu" class="inbox">
|
||||
<ul>
|
||||
<li id="navindex"><a href="{% url index %}">{% trans "Index" %}</a></li>
|
||||
<li id="navuserlist"><a href="{% url forum_users %}">{% trans "User list" %}</a></li>
|
||||
<li id="navsearch"><a href="{% url search %}">{% trans "Search" %}</a></li>
|
||||
<li id="navindex"><a href="{% url djangobb:index %}">{% trans "Index" %}</a></li>
|
||||
<li id="navuserlist"><a href="{% url djangobb:forum_users %}">{% trans "User list" %}</a></li>
|
||||
<li id="navsearch"><a href="{% url djangobb:search %}">{% trans "Search" %}</a></li>
|
||||
{% if user.is_superuser %}
|
||||
<li id="navadmin"><a href="{% url admin:index %}">{% trans "Administration" %}</a></li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li id="navprofile"><a href="{% url forum_profile request.user %}">{% trans "Profile" %}</a></li>
|
||||
<li id="navprofile"><a href="{% url djangobb:forum_profile request.user %}">{% trans "Profile" %}</a></li>
|
||||
{% if "PM_SUPPORT"|forum_setting %}
|
||||
<li id="navpm"><a href="{% url forum_pm_inbox %}">{% trans "PM" %}</a></li>
|
||||
<li id="navpm"><a href="{% url djangobb:forum_pm_inbox %}">{% trans "PM" %}</a></li>
|
||||
{% endif %}
|
||||
<li id="navlogout"><a href="{% url user_signout %}?next={{ request.path }}">{% trans "Log out" %}</a></li>
|
||||
{% else %}
|
||||
|
@ -37,7 +37,7 @@
|
|||
<li>{% trans "Logged in as" %} <strong>{{ user.username }}</strong></li>
|
||||
<li>{% trans "Last visit:" %} {% forum_time user.last_login %}</li>
|
||||
{% if request.user|pm_unreads %}
|
||||
<ul><li class="pmlink"><strong><a href="{% url forum_pm_inbox %}">{% blocktrans with request.user|pm_unreads as new_msg %} There are new messages ({{ new_msg }}){% endblocktrans %}</a></strong></li></ul>
|
||||
<ul><li class="pmlink"><strong><a href="{% url djangobb:forum_pm_inbox %}">{% blocktrans with request.user|pm_unreads as new_msg %} There are new messages ({{ new_msg }}){% endblocktrans %}</a></strong></li></ul>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li>{% trans "You are not logged in." %}</li>
|
||||
|
@ -48,8 +48,8 @@
|
|||
</ul>
|
||||
{% if user.is_authenticated %}
|
||||
<ul class="conr">
|
||||
<li><a href="{% url search %}?action=show_new">{% trans "Show new posts since last visit" %}</a></li>
|
||||
<li><a href="{% url misc %}?action=markread">{% trans "Mark all topics as read" %}</a></li>
|
||||
<li><a href="{% url djangobb:search %}?action=show_new">{% trans "Show new posts since last visit" %}</a></li>
|
||||
<li><a href="{% url djangobb:misc %}?action=markread">{% trans "Mark all topics as read" %}</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="clearer"></div>
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div id="brdfooter" class="block">
|
||||
<div class="box">
|
||||
<div class="inbox" align="center">
|
||||
<a href="{% url lofi_index %}">Lo-Fi Version</a>
|
||||
<a href="{% url djangobb:lofi_index %}">Lo-Fi Version</a>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -74,11 +74,11 @@
|
|||
{% block controls %}
|
||||
<dl id="searchlinks" class="conl">
|
||||
<dt><strong>{% trans "Search links" %}</strong></dt>
|
||||
<dd><a href="{% url search %}?action=show_24h">{% trans "Show recent posts" %}</a></dd>
|
||||
<dd><a href="{% url search %}?action=show_unanswered">{% trans "Show unanswered posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_24h">{% trans "Show recent posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_unanswered">{% trans "Show unanswered posts" %}</a></dd>
|
||||
{% if user.is_authenticated %}
|
||||
<dd><a href="{% url search %}?action=show_subscriptions">{% trans "Show your subscribed topics" %}</a></dd>
|
||||
<dd><a href="{% url search %}?action=show_user&user_id={{ request.user.id }}">{% trans "Show your posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_subscriptions">{% trans "Show your subscribed topics" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_user&user_id={{ request.user.id }}">{% trans "Show your posts" %}</a></dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% block content %}
|
||||
<div id='largetext'>{% trans "Full Version:" %} {% link forum %}</div>
|
||||
<div class='djangobbnav'>
|
||||
<a href="{% url lofi_index %}">{% trans "Root" %}</a> » {% lofi_link forum %}
|
||||
<a href="{% url djangobb:lofi_index %}">{% trans "Root" %}</a> » {% lofi_link forum %}
|
||||
</div>
|
||||
|
||||
<div class="djangobbpagespan">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% load i18n %}
|
||||
<div id='djangobbwrapper'>
|
||||
<div class='djangobbnavsmall'>
|
||||
<a href='{% url search %}'>{% trans "Search" %}</a> -
|
||||
<a href='{% url forum_users %}'>{% trans "User list" %}</a>
|
||||
<a href='{% url djangobb:search %}'>{% trans "Search" %}</a> -
|
||||
<a href='{% url djangobb:forum_users %}'>{% trans "User list" %}</a>
|
||||
</div>
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div id='largetext'>{% trans "Full Version:" %} <a href="{% url index %}">{% trans "Root" %}</a></div>
|
||||
<div id='largetext'>{% trans "Full Version:" %} <a href="{% url djangobb:index %}">{% trans "Root" %}</a></div>
|
||||
<div class='djangobbnav'>
|
||||
<a href="{% url lofi_index %}">{% trans "Root" %}</a>
|
||||
<a href="{% url djangobb:lofi_index %}">{% trans "Root" %}</a>
|
||||
</div>
|
||||
|
||||
<div id="djangobbcontent">
|
||||
|
@ -22,7 +22,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='smalltext'>This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please <a href='{% url index %}'>click here</a>.</div>
|
||||
<div class='smalltext'>This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please <a href='{% url djangobb:index %}'>click here</a>.</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% block content %}
|
||||
<div id='largetext'>{% trans "Full Version:" %} {% link topic %}</div>
|
||||
<div class='djangobbnav'>
|
||||
<a href="{% url lofi_index %}">{% trans "Root" %}</a> » {% lofi_link topic.forum %} » {% lofi_link topic %}
|
||||
<a href="{% url djangobb:lofi_index %}">{% trans "Root" %}</a> » {% lofi_link topic.forum %} » {% lofi_link topic %}
|
||||
</div>
|
||||
|
||||
<div class="djangobbpagespan">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="linkst">
|
||||
<div class="inbox">
|
||||
<p class="pagelink conl">{% pagination %}</p>
|
||||
<ul><li><a href="{% url index %}">{% trans "Root" %}</a> </li><li>» {{ forum }}</li></ul>
|
||||
<ul><li><a href="{% url djangobb:index %}">{% trans "Root" %}</a> </li><li>» {{ forum }}</li></ul>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
<div class="intd">
|
||||
<div class="icon"><div class="nosize"><!-- --></div></div>
|
||||
<div class="tclcon">
|
||||
<a href="{% url forum_show_pm msg.id %}">{{ msg.subject }}</a>
|
||||
<a href="{% url djangobb:forum_show_pm msg.id %}">{{ msg.subject }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tc2" style="white-space: nowrap; OVERFLOW: hidden"><a href="{% url forum_profile msg.src_user.username %}">{{ msg.src_user }}</a></td>
|
||||
<td class="tc2" style="white-space: nowrap; OVERFLOW: hidden"><a href="{% url djangobb:forum_profile msg.src_user.username %}">{{ msg.src_user }}</a></td>
|
||||
<td class="tcr" style="white-space: nowrap">{% forum_time msg.created %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<div class="box">
|
||||
<div class="inbox">
|
||||
<ul>
|
||||
<li {%ifequal active_menu "inbox" %}class="isactive"{% endifequal %}><a href="{% url forum_pm_inbox %}">{% trans "Inbox" %}</a></li>
|
||||
<li {%ifequal active_menu "outbox" %}class="isactive"{% endifequal %}><a href="{% url forum_pm_outbox %}">{% trans "Sent" %}</a></li>
|
||||
<li {%ifequal active_menu "create" %}class="isactive"{% endifequal %}><a href="{% url forum_create_pm %}">{% trans "Send new message" %}</a></li>
|
||||
<li {%ifequal active_menu "inbox" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_pm_inbox %}">{% trans "Inbox" %}</a></li>
|
||||
<li {%ifequal active_menu "outbox" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_pm_outbox %}">{% trans "Sent" %}</a></li>
|
||||
<li {%ifequal active_menu "create" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_create_pm %}">{% trans "Send new message" %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -33,14 +33,14 @@
|
|||
<dd>{% trans "IP:" %} {{ post_user_ip }}</dd>
|
||||
{% endif %}
|
||||
{% if "REPUTATION_SUPPORT"|forum_setting %}
|
||||
<dd><a href="{% url reputation post_user %}">{% trans "Reputation" %}</a> : <b>{{ post_user.forum_profile.reply_total }}</b></dd>
|
||||
<dd><a href="{% url djangobb:reputation post_user %}">{% trans "Reputation" %}</a> : <b>{{ post_user.forum_profile.reply_total }}</b></dd>
|
||||
{% endif %}
|
||||
<dd class="usercontacts"><a href="{% url forum_profile post_user %}">{% trans "Profile" %}</a>
|
||||
<dd class="usercontacts"><a href="{% url djangobb:forum_profile post_user %}">{% trans "Profile" %}</a>
|
||||
{% ifequal post_user.forum_profile.privacy_permission 0 %}
|
||||
<a href="mailto:{{ post_user.email }}">{% trans "E-mail" %}</a>
|
||||
{% endifequal %}
|
||||
{% if user_is_authenticated %}
|
||||
<a href="{% url forum_create_pm %}?recipient={{ post_user.username }}">{% trans "PM" %}</a> </dd>
|
||||
<a href="{% url djangobb:forum_create_pm %}?recipient={{ post_user.username }}">{% trans "PM" %}</a> </dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
|
@ -72,12 +72,12 @@
|
|||
<li>
|
||||
{% if moderator or post|forum_equal_to:last_post %}
|
||||
{% if moderator or post.user|forum_equal_to:user %}
|
||||
/ <a onclick="return confirm('{% trans "Are you sure you want to delete this post?" %}')" href="{% url delete_post post.id %}">{% trans "Delete" %}</a>
|
||||
/ <a onclick="return confirm('{% trans "Are you sure you want to delete this post?" %}')" href="{% url djangobb:delete_post post.id %}">{% trans "Delete" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if inbox %}
|
||||
<li><a href="{% url forum_create_pm %}?recipient={{ post.src_user.username }}">{% trans "Reply" %}</a></li>
|
||||
<li><a href="{% url djangobb:forum_create_pm %}?recipient={{ post.src_user.username }}">{% trans "Reply" %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
<div class="intd">
|
||||
<div class="icon"><div class="nosize"><!-- --></div></div>
|
||||
<div class="tclcon">
|
||||
<a href="{% url forum_show_pm msg.id %}">{{ msg.subject }}</a>
|
||||
<a href="{% url djangobb:forum_show_pm msg.id %}">{{ msg.subject }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tc2" style="white-space: nowrap; OVERFLOW: hidden"><a href="{% url forum_profile msg.dst_user.username %}">{{ msg.dst_user }}</a></td>
|
||||
<td class="tc2" style="white-space: nowrap; OVERFLOW: hidden"><a href="{% url djangobb:forum_profile msg.dst_user.username %}">{{ msg.dst_user }}</a></td>
|
||||
<td class="tcr" style="white-space: nowrap">{% forum_time msg.created %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<label><strong>{{ form.email.label }}</strong><br>
|
||||
{{ form.email }}<br></label>
|
||||
{% if request.user.is_superuser %}
|
||||
<p><a href="{% url misc %}?mail_to={{ profile }}">{% trans "Send e-mail" %}</a></p>
|
||||
<p><a href="{% url djangobb:misc %}?mail_to={{ profile }}">{% trans "Send e-mail" %}</a></p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<p>{% trans "Registered:" %} {{ profile.date_joined|date:"Y-m-d" }}</p>
|
||||
<p>{% trans "Last post:" %} {{ profile.forum_profile.last_post }}</p>
|
||||
<label>{% trans "Posts:" %} {{ profile.forum_profile.post_count }} -
|
||||
<a href="{% url search %}?action=show_user&user_id={{ profile.id }}">{% trans "Show all posts" %}</a></p>
|
||||
<a href="{% url djangobb:search %}?action=show_user&user_id={{ profile.id }}">{% trans "Show all posts" %}</a></p>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
<div class="box">
|
||||
<div class="inbox">
|
||||
<ul>
|
||||
<li {%ifequal active_menu "essentials" %}class="isactive"{% endifequal %}><a href="{% url forum_profile profile %}?section=essentials">{% trans "Essentials" %}</a></li>
|
||||
<li {%ifequal active_menu "personal" %}class="isactive"{% endifequal %}><a href="{% url forum_profile profile %}?section=personal">{% trans "Personal" %}</a></li>
|
||||
<li {%ifequal active_menu "messaging" %}class="isactive"{% endifequal %}><a href="{% url forum_profile profile %}?section=messaging">{% trans "Messaging" %}</a></li>
|
||||
<li {%ifequal active_menu "personality" %}class="isactive"{% endifequal %}><a href="{% url forum_profile profile %}?section=personality">{% trans "Personality" %}</a></li>
|
||||
<li {%ifequal active_menu "display" %}class="isactive"{% endifequal %}><a href="{% url forum_profile profile %}?section=display">{% trans "Display" %}</a></li>
|
||||
<li {%ifequal active_menu "privacy" %}class="isactive"{% endifequal %}><a href="{% url forum_profile profile %}?section=privacy">{% trans "Privacy" %}</a></li>
|
||||
<li {%ifequal active_menu "essentials" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_profile profile %}?section=essentials">{% trans "Essentials" %}</a></li>
|
||||
<li {%ifequal active_menu "personal" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_profile profile %}?section=personal">{% trans "Personal" %}</a></li>
|
||||
<li {%ifequal active_menu "messaging" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_profile profile %}?section=messaging">{% trans "Messaging" %}</a></li>
|
||||
<li {%ifequal active_menu "personality" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_profile profile %}?section=personality">{% trans "Personality" %}</a></li>
|
||||
<li {%ifequal active_menu "display" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_profile profile %}?section=display">{% trans "Display" %}</a></li>
|
||||
<li {%ifequal active_menu "privacy" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_profile profile %}?section=privacy">{% trans "Privacy" %}</a></li>
|
||||
{# if request.user.is_superuser #}
|
||||
<!--li {%ifequal active_menu "admin" %}class="isactive"{% endifequal %}><a href="{% url forum_profile profile %}?section=admin">{% trans "Administration" %}</a></li-->
|
||||
<!--li {% ifequal active_menu "admin" %}class="isactive"{% endifequal %}><a href="{% url djangobb:forum_profile profile %}?section=admin">{% trans "Administration" %}</a></li-->
|
||||
{# endif #}
|
||||
|
||||
</ul>
|
||||
|
|
|
@ -13,20 +13,20 @@
|
|||
<fieldset id="profileavatar">
|
||||
<legend>{% trans "Set your avatar display options" %}</legend>
|
||||
<div class="infldset">
|
||||
{{ profile.forum_profile.avatar.errors }}
|
||||
{% if profile.forum_profile.avatar %}
|
||||
<img src="{{ profile.forum_profile.avatar.url }}" />
|
||||
{% endif %}
|
||||
<p>{% trans "An avatar is a small image that will be displayed with all your posts. You can upload an avatar by clicking the link below. The checkbox 'Use avatar' below must be checked in order for the avatar to be visible in your posts." %}</p>
|
||||
{{ profile.forum_profile.avatar.errors }}
|
||||
{% if profile.forum_profile.avatar %}
|
||||
<img src="{{ profile.forum_profile.avatar.url }}" />
|
||||
{% endif %}
|
||||
<p>{% trans "An avatar is a small image that will be displayed with all your posts. You can upload an avatar by clicking the link below. The checkbox 'Use avatar' below must be checked in order for the avatar to be visible in your posts." %}</p>
|
||||
<div class="rbox">
|
||||
{{ form.show_avatar.errors }}
|
||||
<label>{{ form.show_avatar }}{% trans "Use avatar." %}<br></label>
|
||||
</div>
|
||||
{% if profile.forum_profile.avatar %}
|
||||
<p class="clearb"><a href="{% url forum_profile profile.username %}?action=upload_avatar">{% trans "Upload avatar" %}</a>
|
||||
<a href="{% url forum_profile profile.username %}?action=delete_avatar">{% trans "Delete avatar" %}</a></p>
|
||||
<p class="clearb"><a href="{% url djangobb:forum_profile profile.username %}?action=upload_avatar">{% trans "Upload avatar" %}</a>
|
||||
<a href="{% url djangobb:forum_profile profile.username %}?action=delete_avatar">{% trans "Delete avatar" %}</a></p>
|
||||
{% else %}
|
||||
<p class="clearb"><a href="{% url forum_profile profile.username %}?action=upload_avatar">{% trans "Upload avatar" %}</a>
|
||||
<p class="clearb"><a href="{% url djangobb:forum_profile profile.username %}?action=upload_avatar">{% trans "Upload avatar" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -34,7 +34,6 @@
|
|||
<div class="inform">
|
||||
<fieldset>
|
||||
<legend>{% trans "Compose your signature" %}</legend>
|
||||
|
||||
<div class="infldset">
|
||||
{{ form.signature.errors }}
|
||||
<p>{% trans "A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature." %}</p>
|
||||
|
@ -44,9 +43,9 @@
|
|||
<br></label>
|
||||
</div>
|
||||
{% if profile.forum_profile.signature %}
|
||||
<p>{{ profile.forum_profile.signature|safe }}</p>
|
||||
<p>{{ profile.forum_profile.signature|safe }}</p>
|
||||
{% else %}
|
||||
<p>{% trans "No signature currently stored in profile." %}</p>
|
||||
<p>{% trans "No signature currently stored in profile." %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<tbody>
|
||||
{% for reputation in reputations %}
|
||||
<tr>
|
||||
<td><a href="{% url reputation reputation.from_user %}">{{ reputation.from_user }}</a></td>
|
||||
<td><a href="{% url djangobb:reputation reputation.from_user %}">{{ reputation.from_user }}</a></td>
|
||||
<td>{% link reputation.topic %}</td>
|
||||
<td>{{ reputation.reason }}</td>
|
||||
<td style="text-align: center;">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<h2><span>{% trans "Please, fill the form" %}</span></h2>
|
||||
<div class="box">
|
||||
<div class="inbox">
|
||||
<form action="{% url reputation form.to_user %}" method="post">
|
||||
<form action="{% url djangobb:reputation form.to_user %}" method="post">
|
||||
<table cellspacing="0">
|
||||
{{ form.topic }}
|
||||
{{ form.sign }}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div class="inbox">
|
||||
<div class="postleft">
|
||||
<dl>
|
||||
<dt><strong><a href="{% url forum_profile post.instance.user %}">{{ post.instance.user }}</a></strong></dt>
|
||||
<dt><strong><a href="{% url djangobb:forum_profile post.instance.user %}">{{ post.instance.user }}</a></strong></dt>
|
||||
<dd>{% trans "Replies:" %} {{ post.instance.topic.post_count }}</dd>
|
||||
<dd><div class="icon"><div class="nosize"><!-- --></div></div>
|
||||
</dd>
|
||||
|
@ -65,11 +65,11 @@
|
|||
{% block controls %}
|
||||
<dl id="searchlinks" class="conl">
|
||||
<dt><strong>{% trans "Search links" %}</strong></dt>
|
||||
<dd><a href="{% url search %}?action=show_24h">{% trans "Show recent posts" %}</a></dd>
|
||||
<dd><a href="{% url search %}?action=show_unanswered">{% trans "Show unanswered posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_24h">{% trans "Show recent posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_unanswered">{% trans "Show unanswered posts" %}</a></dd>
|
||||
{% if user.is_authenticated %}
|
||||
<dd><a href="{% url search %}?action=show_subscriptions">{% trans "Show your subscribed topics" %}</a></dd>
|
||||
<dd><a href="{% url search %}?action=show_user&user_id={{ request.user.id }}">{% trans "Show your posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_subscriptions">{% trans "Show your subscribed topics" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_user&user_id={{ request.user.id }}">{% trans "Show your posts" %}</a></dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
|
|
|
@ -74,11 +74,11 @@
|
|||
{% block controls %}
|
||||
<dl id="searchlinks" class="conl">
|
||||
<dt><strong>{% trans "Search links" %}</strong></dt>
|
||||
<dd><a href="{% url search %}?action=show_24h">{% trans "Show recent posts" %}</a></dd>
|
||||
<dd><a href="{% url search %}?action=show_unanswered">{% trans "Show unanswered posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_24h">{% trans "Show recent posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_unanswered">{% trans "Show unanswered posts" %}</a></dd>
|
||||
{% if user.is_authenticated %}
|
||||
<dd><a href="{% url search %}?action=show_subscriptions">{% trans "Show your subscribed topics" %}</a></dd>
|
||||
<dd><a href="{% url search %}?action=show_user&user_id={{ request.user.id }}">{% trans "Show your posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_subscriptions">{% trans "Show your subscribed topics" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:search %}?action=show_user&user_id={{ request.user.id }}">{% trans "Show your posts" %}</a></dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
<div class="inbox">
|
||||
<p class="pagelink conl">{% pagination %}</p>
|
||||
{% if not topic.closed and user.is_authenticated %}
|
||||
<p class="postlink conr"><a href="{% url add_post topic.id %}">{% trans "Reply" %}</a></p>
|
||||
<p class="postlink conr"><a href="{% url djangobb:add_post topic.id %}">{% trans "Reply" %}</a></p>
|
||||
{% endif %}
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{% url index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic.name }}
|
||||
<a href="{% url djangobb:index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic.name }}
|
||||
<a href="{% url forum_feed "topic" %}{{ topic.id }}/"><img src="{{ MEDIA_URL }}/forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" class="breadcrumb_rss" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -55,20 +55,20 @@
|
|||
{% endif %}
|
||||
{% if "REPUTATION_SUPPORT"|forum_setting %}
|
||||
{% ifnotequal request.user post.user.username %}
|
||||
<dd><a href="{% url reputation post.user %}">{% trans "Reputation" %}</a> : <a href="{% url reputation post.user %}?action=plus&topic_id={{ post.topic.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_add.gif" alt="+" border="0"></a> <strong>{{ post.user.forum_profile.reply_total }} </strong><a href="{% url reputation post.user %}?action=minus&topic_id={{ post.topic.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_minus.gif" alt="-" border="0"></a></dd>
|
||||
<dd><a href="{% url djangobb:reputation post.user %}">{% trans "Reputation" %}</a> : <a href="{% url djangobb:reputation post.user %}?action=plus&topic_id={{ post.topic.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_add.gif" alt="+" border="0"></a> <strong>{{ post.user.forum_profile.reply_total }} </strong><a href="{% url djangobb:reputation post.user %}?action=minus&topic_id={{ post.topic.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_minus.gif" alt="-" border="0"></a></dd>
|
||||
{% endifnotequal %}
|
||||
{% endif %}
|
||||
<dd class="usercontacts"><a href="{% url forum_profile post.user %}">{% trans "Profile" %}</a>
|
||||
<dd class="usercontacts"><a href="{% url djangobb:forum_profile post.user %}">{% trans "Profile" %}</a>
|
||||
{% ifequal post.user.forum_profile.privacy_permission 0 %}
|
||||
<a href="mailto:{{ post.user.email }}">{% trans "E-mail" %}</a>
|
||||
{% else %}
|
||||
{% ifequal post.user.forum_profile.privacy_permission 1 %}
|
||||
<a href="{% url misc %}?mail_to={{ post.user }}">{% trans "Send e-mail" %}</a>
|
||||
<a href="{% url djangobb:misc %}?mail_to={{ post.user }}">{% trans "Send e-mail" %}</a>
|
||||
{% endifequal %}
|
||||
{% endifequal %}
|
||||
{% if "PM_SUPPORT"|forum_setting %}
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url forum_create_pm %}?recipient={{ post.user.username }}">{% trans "PM" %}</a> </dd>
|
||||
<a href="{% url djangobb:forum_create_pm %}?recipient={{ post.user.username }}">{% trans "PM" %}</a> </dd>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
@ -105,16 +105,16 @@
|
|||
</div>
|
||||
<div class="postfootright">
|
||||
<ul>
|
||||
<li class="postreport"><a href="{% url misc %}?action=report&post_id={{ post.id }}">{% trans "Report" %}</a> | </li>
|
||||
<li class="postreport"><a href="{% url djangobb:misc %}?action=report&post_id={{ post.id }}">{% trans "Report" %}</a> | </li>
|
||||
{% if moderator or post|forum_equal_to:last_post %}
|
||||
{% if moderator or post.user|forum_equal_to:user %}
|
||||
<li class="postdelete"><a onclick="return confirm('{% trans "Are you sure you want to delete this post?" %}')" href="{% url delete_post post.id %}">{% trans "Delete" %}</a> | </li>
|
||||
<li class="postdelete"><a onclick="return confirm('{% trans "Are you sure you want to delete this post?" %}')" href="{% url djangobb:delete_post post.id %}">{% trans "Delete" %}</a> | </li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if moderator or post|forum_posted_by:user %}
|
||||
<li class="postedit"><a href="{% url edit_post post.id %}">{% trans "Edit" %}</a> | </li>
|
||||
<li class="postedit"><a href="{% url djangobb:edit_post post.id %}">{% trans "Edit" %}</a> | </li>
|
||||
{% endif %}
|
||||
<li class="postquote"><a href="{% url add_post topic.id %}?post_id={{ post.id }}">{% trans "Reply" %}</a> | </li>
|
||||
<li class="postquote"><a href="{% url djangobb:add_post topic.id %}?post_id={{ post.id }}">{% trans "Reply" %}</a> | </li>
|
||||
<li class="postquote"><a onmouseover="copyQ('{{ post.user }}');" href="javascript:pasteQ();">{% trans "Quote" %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -125,15 +125,15 @@
|
|||
<div class="postlinksb">
|
||||
<div class="inbox">
|
||||
<p class="pagelink conl">{% pagination %}</p>
|
||||
<p class="postlink conr"><a href="{% url add_post topic.id %}">{% trans "Reply" %}</a></p>
|
||||
<ul><li><a href="{% url index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic }}
|
||||
<p class="postlink conr"><a href="{% url djangobb:add_post topic.id %}">{% trans "Reply" %}</a></p>
|
||||
<ul><li><a href="{% url djangobb:index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic }}
|
||||
<a href="{% url forum_feed "topic" %}{{ topic.id }}"><img src="{{ MEDIA_URL }}/forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" class="breadcrumb_rss" /></a>
|
||||
</li></ul>
|
||||
{% if user.is_authenticated %}
|
||||
{% if subscribed %}
|
||||
<a class="subscribelink clearb" href="{% url forum_delete_subscription topic.id %}?from_topic">{% trans "Unsubscribe" %}</a>
|
||||
<a class="subscribelink clearb" href="{% url djangobb:forum_delete_subscription topic.id %}?from_topic">{% trans "Unsubscribe" %}</a>
|
||||
{% else %}
|
||||
<a class="subscribelink clearb" href="{% url forum_add_subscription topic.id %}">{% trans "Subscribe" %}</a>
|
||||
<a class="subscribelink clearb" href="{% url djangobb:forum_add_subscription topic.id %}">{% trans "Subscribe" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="clearer"></div>
|
||||
|
@ -143,7 +143,7 @@
|
|||
<div class="blockform">
|
||||
<h2><span>{% trans "Quick post" %}</span></h2>
|
||||
<div class="box">
|
||||
<form id="post" action="{% url add_post topic.id %}" method="post" enctype="multipart/form-data">
|
||||
<form id="post" action="{% url djangobb:add_post topic.id %}" method="post" enctype="multipart/form-data">
|
||||
<div class="inform">
|
||||
<fieldset>
|
||||
<legend>{% trans "Write your message and submit" %}</legend>
|
||||
|
@ -187,7 +187,7 @@
|
|||
<form id="qjump" method="GET" action="forum">
|
||||
<div><label>{% trans "Jump to " %}
|
||||
<br />
|
||||
<select name="id" id="forum_id" onchange="window.location=('{% url index %}'+this.options[this.selectedIndex].value)">
|
||||
<select name="id" id="forum_id" onchange="window.location=('{% url djangobb:index %}'+this.options[this.selectedIndex].value)">
|
||||
{% for category in categories %}
|
||||
<optgroup label="{{ category }}">
|
||||
{% for forum in category.forums.all %}
|
||||
|
@ -196,22 +196,22 @@
|
|||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="button" onclick="window.location=('{% url index %}'+getElementById('forum_id').value)" value=" {% trans "Go" %} " accesskey="g" />
|
||||
<input type="button" onclick="window.location=('{% url djangobb:index %}'+getElementById('forum_id').value)" value=" {% trans "Go" %} " accesskey="g" />
|
||||
</label></div>
|
||||
</form>
|
||||
<dl id="modcontrols"><dt><strong>{% trans "Moderator control" %}</strong></dt>
|
||||
{% if moderator %}
|
||||
<dd><a href="{% url delete_posts topic.id %}">{% trans "Delete multiple posts" %}</a></dd>
|
||||
<dd><a href="{% url move_topic topic.id %}">{% trans "Move topic" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:delete_posts topic.id %}">{% trans "Delete multiple posts" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:move_topic topic.id %}">{% trans "Move topic" %}</a></dd>
|
||||
{% if topic.closed %}
|
||||
<dd><a href="{% url open_topic topic.id %}">{% trans "Open topic" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:open_topic topic.id %}">{% trans "Open topic" %}</a></dd>
|
||||
{% else %}
|
||||
<dd><a href="{% url close_topic topic.id %}">{% trans "Close topic" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:close_topic topic.id %}">{% trans "Close topic" %}</a></dd>
|
||||
{% endif %}
|
||||
{% if topic.sticky %}
|
||||
<dd><a href="{% url unstick_topic topic.id %}">{% trans "Unstick topic" %}</a></dd></dl>
|
||||
<dd><a href="{% url djangobb:unstick_topic topic.id %}">{% trans "Unstick topic" %}</a></dd></dl>
|
||||
{% else %}
|
||||
<dd><a href="{% url stick_topic topic.id %}">{% trans "Stick topic" %}</a></dd></dl>
|
||||
<dd><a href="{% url djangobb:stick_topic topic.id %}">{% trans "Stick topic" %}</a></dd></dl>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<dd><a href="mailto:{{ profile.email }}">{{ profile.email }}</a></dd>
|
||||
{% else %}
|
||||
{% ifequal profile.forum_profile.privacy_permission 1 %}
|
||||
<dd><a href="{% url misc %}?mail_to={{ profile }}">{% trans "Send e-mail" %}</a></dd>
|
||||
<dd><a href="{% url djangobb:misc %}?mail_to={{ profile }}">{% trans "Send e-mail" %}</a></dd>
|
||||
{% else %}
|
||||
<dd>{% trans "(Hidden)" %}</dd>
|
||||
{% endifequal %}
|
||||
|
@ -117,7 +117,7 @@
|
|||
<div class="infldset">
|
||||
<dl>
|
||||
<dt>{% trans "Posts:" %} </dt>
|
||||
<dd>{{ profile.forum_profile.post_count }} - <a href="{% url search %}?action=show_user&user_id={{ profile.id }}">{% trans "Show all posts" %}</a></dd>
|
||||
<dd>{{ profile.forum_profile.post_count }} - <a href="{% url djangobb:search %}?action=show_user&user_id={{ profile.id }}">{% trans "Show all posts" %}</a></dd>
|
||||
<dt>{% trans "Last post:" %} </dt>
|
||||
{% if profile.forum_profile.last_post %}
|
||||
<dd>{{ profile.forum_profile.last_post }}</dd>
|
||||
|
|
|
@ -25,7 +25,7 @@ register = template.Library()
|
|||
@register.filter
|
||||
def profile_link(user):
|
||||
data = u'<a href="%s">%s</a>' % (\
|
||||
reverse('forum_profile', args=[user.username]), user.username)
|
||||
reverse('djangobb:forum_profile', args=[user.username]), user.username)
|
||||
return mark_safe(data)
|
||||
|
||||
|
||||
|
|
|
@ -77,20 +77,20 @@ def moderate(request, forum_id):
|
|||
topic_list = request.POST.getlist('topic_id')
|
||||
if 'move_topics' in request.POST:
|
||||
#TODO
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
return HttpResponseRedirect(reverse('djangobb:index'))
|
||||
elif 'delete_topics' in request.POST:
|
||||
for topic_id in topic_list:
|
||||
topic = get_object_or_404(Topic, pk=topic_id)
|
||||
topic.delete()
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
return HttpResponseRedirect(reverse('djangobb:index'))
|
||||
elif 'open_topics' in request.POST:
|
||||
for topic_id in topic_list:
|
||||
open_topic(request, topic_id)
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
return HttpResponseRedirect(reverse('djangobb:index'))
|
||||
elif 'close_topics' in request.POST:
|
||||
for topic_id in topic_list:
|
||||
close_topic(request, topic_id)
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
return HttpResponseRedirect(reverse('djangobb:index'))
|
||||
|
||||
return {'forum': forum,
|
||||
'topics': topics,
|
||||
|
@ -169,7 +169,7 @@ def search(request):
|
|||
else:
|
||||
query = 'forum:%s AND user:%s' % (forum, author)
|
||||
else:
|
||||
return HttpResponseRedirect(reverse('search'))
|
||||
return HttpResponseRedirect(reverse('djangobb:search'))
|
||||
|
||||
order = {'0': 'created',
|
||||
'1': 'user',
|
||||
|
@ -206,7 +206,7 @@ def misc(request):
|
|||
if action =='markread':
|
||||
user = request.user
|
||||
PostTracking.objects.filter(user=user).update(last_read=datetime.now(), topics=None)
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
return HttpResponseRedirect(reverse('djangobb:index'))
|
||||
|
||||
elif action == 'report':
|
||||
if request.GET.get('post_id', ''):
|
||||
|
@ -225,7 +225,7 @@ def misc(request):
|
|||
subject = form.cleaned_data['subject']
|
||||
body = form.cleaned_data['body']
|
||||
user.email_user(subject, body, request.user.email)
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
return HttpResponseRedirect(reverse('djangobb:index'))
|
||||
|
||||
elif 'mail_to' in request.GET:
|
||||
user = get_object_or_404(User, username=request.GET['mail_to'])
|
||||
|
@ -441,7 +441,7 @@ def user(request, username):
|
|||
form = build_form(UploadAvatarForm, request, instance=user.forum_profile)
|
||||
if request.method == 'POST' and form.is_valid():
|
||||
form.save()
|
||||
return HttpResponseRedirect(reverse('forum_profile', args=[user.username]))
|
||||
return HttpResponseRedirect(reverse('djangobb:forum_profile', args=[user.username]))
|
||||
return {'form': form,
|
||||
'avatar_width': forum_settings.AVATAR_WIDTH,
|
||||
'avatar_height': forum_settings.AVATAR_HEIGHT,
|
||||
|
@ -451,7 +451,7 @@ def user(request, username):
|
|||
profile = get_object_or_404(Profile, user=request.user)
|
||||
profile.avatar = None
|
||||
profile.save()
|
||||
return HttpResponseRedirect(reverse('forum_profile', args=[user.username]))
|
||||
return HttpResponseRedirect(reverse('djangobb:forum_profile', args=[user.username]))
|
||||
|
||||
else:
|
||||
form = build_form(EssentialsProfileForm, request, instance=user.forum_profile,
|
||||
|
@ -500,7 +500,7 @@ def reputation(request, username):
|
|||
for reputation_id in reputation_list:
|
||||
reputation = get_object_or_404(Reputation, pk=reputation_id)
|
||||
reputation.delete()
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
return HttpResponseRedirect(reverse('djangobb:index'))
|
||||
elif form.is_valid():
|
||||
form.save()
|
||||
topic_id = request.POST['topic']
|
||||
|
@ -518,7 +518,7 @@ def show_post(request, post_id):
|
|||
post = get_object_or_404(Post, pk=post_id)
|
||||
count = post.topic.posts.filter(created__lt=post.created).count() + 1
|
||||
page = math.ceil(count / float(forum_settings.TOPIC_PAGE_SIZE))
|
||||
url = '%s?page=%d#post-%d' % (reverse('topic', args=[post.topic.id]), page, post.id)
|
||||
url = '%s?page=%d#post-%d' % (reverse('djangobb:topic', args=[post.topic.id]), page, post.id)
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
@login_required
|
||||
|
@ -701,7 +701,7 @@ def create_pm(request):
|
|||
|
||||
if form.is_valid():
|
||||
post = form.save();
|
||||
return HttpResponseRedirect(reverse('forum_pm_outbox'))
|
||||
return HttpResponseRedirect(reverse('djangobb:forum_pm_outbox'))
|
||||
|
||||
return {'active_menu':'create',
|
||||
'form': form,
|
||||
|
@ -748,15 +748,15 @@ def delete_subscription(request, topic_id):
|
|||
topic = get_object_or_404(Topic, pk=topic_id)
|
||||
topic.subscribers.remove(request.user)
|
||||
if 'from_topic' in request.GET:
|
||||
return HttpResponseRedirect(reverse('topic', args=[topic.id]))
|
||||
return HttpResponseRedirect(reverse('djangobb:topic', args=[topic.id]))
|
||||
else:
|
||||
return HttpResponseRedirect(reverse('edit_profile'))
|
||||
return HttpResponseRedirect(reverse('djangobb:edit_profile'))
|
||||
|
||||
@login_required
|
||||
def add_subscription(request, topic_id):
|
||||
topic = get_object_or_404(Topic, pk=topic_id)
|
||||
topic.subscribers.add(request.user)
|
||||
return HttpResponseRedirect(reverse('topic', args=[topic.id]))
|
||||
return HttpResponseRedirect(reverse('djangobb:topic', args=[topic.id]))
|
||||
|
||||
@login_required
|
||||
def show_attachment(request, hash):
|
||||
|
|
|
@ -38,7 +38,7 @@ urlpatterns = patterns('',
|
|||
|
||||
# Apps
|
||||
(r'^forum/account/', include(authopenid_urlpatterns)),
|
||||
(r'^forum/', include('forum.urls')),
|
||||
(r'^forum/', include('forum.urls', namespace='djangobb')),
|
||||
|
||||
# Feeds
|
||||
url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
|
||||
|
|
Reference in a new issue