summaryrefslogtreecommitdiffstats
path: root/combo/manager/urls.py
blob: 23c1a8df6aa14190b07c29bdc9e7e319b5fb6f92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# combo - content management system
# Copyright (C) 2014  Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from django.conf.urls import url, include
from django.contrib.admin.views.decorators import staff_member_required
from django.views.decorators.cache import never_cache

import ckeditor.views as ckeditor_views

from .. import plugins
from . import views

urlpatterns = [
        url(r'^$', views.homepage, name='combo-manager-homepage'),
        url(r'^menu.json$', views.menu_json),
        url(r'^site-export$', views.site_export, name='combo-manager-site-export'),
        url(r'^site-import$', views.site_import, name='combo-manager-site-import'),
        url(r'^pages/add/$', views.page_add, name='combo-manager-page-add'),
        url(r'^pages/(?P<pk>\w+)/$', views.page_view,
            name='combo-manager-page-view'),
        url(r'^pages/(?P<pk>\w+)/template$', views.page_select_template,
            name='combo-manager-page-select-template'),
        url(r'^pages/(?P<pk>\w+)/visibility$', views.page_visibility,
            name='combo-manager-page-visibility'),
        url(r'^pages/(?P<pk>\w+)/redirection$', views.page_edit_redirection,
            name='combo-manager-page-edit-redirection'),
        url(r'^pages/(?P<pk>\w+)/exclude-from-navigation$', views.page_edit_exclude_from_navigation,
            name='combo-manager-page-edit-exclude-from-navigation'),
        url(r'^pages/(?P<pk>\w+)/slug$', views.page_edit_slug,
            name='combo-manager-page-edit-slug'),
        url(r'^pages/(?P<pk>\w+)/title$', views.page_edit_title,
            name='combo-manager-page-edit-title'),
        url(r'^pages/(?P<pk>\w+)/description$', views.page_edit_description,
            name='combo-manager-page-edit-description'),
        url(r'^pages/(?P<pk>\w+)/picture/$', views.page_edit_picture,
            name='combo-manager-page-edit-picture'),
        url(r'^pages/(?P<pk>\w+)/remove-picture/$', views.page_remove_picture,
            name='combo-manager-page-remove-picture'),
        url(r'^pages/(?P<pk>\w+)/delete$', views.page_delete,
            name='combo-manager-page-delete'),
        url(r'^pages/(?P<pk>\w+)/export$', views.page_export,
            name='combo-manager-page-export'),
        url(r'^pages/(?P<pk>\w+)/history$', views.page_history,
            name='combo-manager-page-history'),
        url(r'^pages/(?P<page_pk>\w+)/history/(?P<pk>\w+)/$', views.snapshot_restore,
            name='combo-manager-snapshot-restore'),
        url(r'^pages/(?P<page_pk>\w+)/add-cell-to-(?P<ph_key>[\w_-]+)/(?P<cell_type>\w+)/(?P<variant>[\w-]+)/$',
            views.page_add_cell,
            name='combo-manager-page-add-cell'),
        url(r'^pages/(?P<page_pk>\w+)/cell/(?P<cell_reference>[\w_-]+)/$', views.page_edit_cell,
            name='combo-manager-page-edit-cell'),
        url(r'^pages/(?P<page_pk>\w+)/cell/(?P<cell_reference>[\w_-]+)/delete$', views.page_delete_cell,
            name='combo-manager-page-delete-cell'),
        url(r'^pages/(?P<page_pk>\w+)/cell/(?P<cell_reference>[\w_-]+)/options$',
            views.page_cell_options,
            name='combo-manager-page-options-cell'),
        url(r'^pages/(?P<page_pk>\w+)/cell/(?P<cell_reference>[\w_-]+)/visibility$',
            views.page_cell_visibility,
            name='combo-manager-page-visibility-cell'),
        url(r'^pages/(?P<page_pk>\w+)/cell/(?P<cell_reference>[\w_-]+)/label$',
            views.page_get_additional_label, name='combo-manager-page-get-additional-label'),
        url(r'^pages/(?P<page_pk>\w+)/order$', views.cell_order,
            name='combo-manager-cell-order'),
        url(r'^pages/order$', views.page_order,
            name='combo-manager-page-order'),
        url(r'^ckeditor/upload/', staff_member_required(ckeditor_views.upload),
            name='ckeditor_upload'),
        url(r'^ckeditor/browse/', never_cache(staff_member_required(ckeditor_views.browse)),
            name='ckeditor_browse'),
]

urlpatterns = plugins.register_plugins_manager_urls(urlpatterns)