Commit 61f0bcb1 by Ibrahim Awwal

Drop annoying /thread/ in discussion URLs that adds nothing.

parent a4afea93
......@@ -4,7 +4,7 @@ import django_comment_client.forum.views
urlpatterns = patterns('django_comment_client.forum.views',
url(r'users/(?P<user_id>\w+)/followed$', 'followed_threads', name='followed_threads'),
url(r'users/(?P<user_id>\w+)$', 'user_profile', name='user_profile'),
url(r'(?P<discussion_id>[\w\-]+)/threads/(?P<thread_id>[-\w]+)$', 'single_thread', name='single_thread'),
url(r'(?P<discussion_id>[\w\-]+)/inline$', 'inline_discussion', name='inline_discussion'),
url(r'(?P<discussion_id>[\w\-]+)/(?P<thread_id>[-\w]+)$', 'single_thread', name='single_thread'),
url(r'', 'forum_form_discussion', name='forum_form_discussion'),
)
......@@ -2,7 +2,7 @@ if Backbone?
class @DiscussionRouter extends Backbone.Router
routes:
"": "allThreads"
":forum_name/threads/:thread_id" : "showThread"
":forum_name/:thread_id" : "showThread"
initialize: (options) ->
@discussion = options['discussion']
......@@ -44,7 +44,7 @@ if Backbone?
navigateToThread: (thread_id) =>
thread = @discussion.get(thread_id)
@navigate("#{thread.get("commentable_id")}/threads/#{(thread.get('slug') or thread_id)}", trigger: true)
@navigate("#{thread.get("commentable_id")}/#{(thread.get('slug') or thread_id)}", trigger: true)
navigateToAllThreads: =>
@navigate("", trigger: true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment