comparison rhodecode/config/routing.py @ 1712:cac5109ac3b6 beta

Notification system improvements - deleting - tests - ui - moved to separate controller
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 23 Nov 2011 00:55:05 +0200
parents 8cb7f5c4d494
children e7eef7a1db6a
comparison
equal deleted inserted replaced
1711:b369bec5d468 1712:cac5109ac3b6
60 60
61 #MAIN PAGE 61 #MAIN PAGE
62 rmap.connect('home', '/', controller='home', action='index') 62 rmap.connect('home', '/', controller='home', action='index')
63 rmap.connect('repo_switcher', '/repos', controller='home', 63 rmap.connect('repo_switcher', '/repos', controller='home',
64 action='repo_switcher') 64 action='repo_switcher')
65 rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*}', 65 rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*}',
66 controller='home',action='branch_tag_switcher') 66 controller='home', action='branch_tag_switcher')
67 rmap.connect('bugtracker', 67 rmap.connect('bugtracker',
68 "http://bitbucket.org/marcinkuzminski/rhodecode/issues", 68 "http://bitbucket.org/marcinkuzminski/rhodecode/issues",
69 _static=True) 69 _static=True)
70 rmap.connect('rst_help', 70 rmap.connect('rst_help',
71 "http://docutils.sourceforge.net/docs/user/rst/quickref.html", 71 "http://docutils.sourceforge.net/docs/user/rst/quickref.html",
265 action="show", conditions=dict(method=["GET"])) 265 action="show", conditions=dict(method=["GET"]))
266 m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}", 266 m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}",
267 action="show", conditions=dict(method=["GET"])) 267 action="show", conditions=dict(method=["GET"]))
268 m.connect("admin_settings_my_account", "/my_account", 268 m.connect("admin_settings_my_account", "/my_account",
269 action="my_account", conditions=dict(method=["GET"])) 269 action="my_account", conditions=dict(method=["GET"]))
270 m.connect("admin_settings_notifications", "/notifications",
271 action="notifications", conditions=dict(method=["GET"]))
272 m.connect("admin_settings_my_account_update", "/my_account_update", 270 m.connect("admin_settings_my_account_update", "/my_account_update",
273 action="my_account_update", conditions=dict(method=["PUT"])) 271 action="my_account_update", conditions=dict(method=["PUT"]))
274 m.connect("admin_settings_create_repository", "/create_repository", 272 m.connect("admin_settings_create_repository", "/create_repository",
275 action="create_repository", conditions=dict(method=["GET"])) 273 action="create_repository", conditions=dict(method=["GET"]))
276 274
277 275
276 #NOTIFICATION REST ROUTES
277 with rmap.submapper(path_prefix=ADMIN_PREFIX,
278 controller='admin/notifications') as m:
279 m.connect("notifications", "/notifications",
280 action="create", conditions=dict(method=["POST"]))
281 m.connect("notifications", "/notifications",
282 action="index", conditions=dict(method=["GET"]))
283 m.connect("formatted_notifications", "/notifications.{format}",
284 action="index", conditions=dict(method=["GET"]))
285 m.connect("new_notification", "/notifications/new",
286 action="new", conditions=dict(method=["GET"]))
287 m.connect("formatted_new_notification", "/notifications/new.{format}",
288 action="new", conditions=dict(method=["GET"]))
289 m.connect("/notification/{notification_id}",
290 action="update", conditions=dict(method=["PUT"]))
291 m.connect("/notification/{notification_id}",
292 action="delete", conditions=dict(method=["DELETE"]))
293 m.connect("edit_notification", "/notification/{notification_id}/edit",
294 action="edit", conditions=dict(method=["GET"]))
295 m.connect("formatted_edit_notification",
296 "/notification/{notification_id}.{format}/edit",
297 action="edit", conditions=dict(method=["GET"]))
298 m.connect("notification", "/notification/{notification_id}",
299 action="show", conditions=dict(method=["GET"]))
300 m.connect("formatted_notification", "/notifications/{notification_id}.{format}",
301 action="show", conditions=dict(method=["GET"]))
302
303
304
278 #ADMIN MAIN PAGES 305 #ADMIN MAIN PAGES
279 with rmap.submapper(path_prefix=ADMIN_PREFIX, 306 with rmap.submapper(path_prefix=ADMIN_PREFIX,
280 controller='admin/admin') as m: 307 controller='admin/admin') as m:
281 m.connect('admin_home', '', action='index') 308 m.connect('admin_home', '', action='index')
282 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', 309 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
355 controller='changeset', revision='tip', action='comment', 382 controller='changeset', revision='tip', action='comment',
356 conditions=dict(function=check_repo)) 383 conditions=dict(function=check_repo))
357 384
358 rmap.connect('changeset_comment_delete', '/{repo_name:.*}/changeset/comment/{comment_id}/delete', 385 rmap.connect('changeset_comment_delete', '/{repo_name:.*}/changeset/comment/{comment_id}/delete',
359 controller='changeset', action='delete_comment', 386 controller='changeset', action='delete_comment',
360 conditions = dict(function=check_repo, method=["DELETE"])) 387 conditions=dict(function=check_repo, method=["DELETE"]))
361 388
362 rmap.connect('raw_changeset_home', 389 rmap.connect('raw_changeset_home',
363 '/{repo_name:.*}/raw-changeset/{revision}', 390 '/{repo_name:.*}/raw-changeset/{revision}',
364 controller='changeset', action='raw_changeset', 391 controller='changeset', action='raw_changeset',
365 revision='tip', conditions=dict(function=check_repo)) 392 revision='tip', conditions=dict(function=check_repo))