1 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 from django.urls import path, re_path
5 from django.contrib.auth.decorators import permission_required
6 from django.views.generic import RedirectView
7 from .feeds import PublishTrackFeed
12 path('', RedirectView.as_view(url='catalogue/', permanent=False)),
14 path('images/', views.image_list, name='documents_image_list'),
15 path('image/<slug:slug>/', views.image, name="documents_image"),
16 path('image/<slug:slug>/publish', views.publish_image,
17 name="documents_publish_image"),
19 path('catalogue/', views.document_list, name='documents_document_list'),
20 path('user/', views.my, name='documents_user'),
21 path('user/<username>/', views.user, name='documents_user'),
22 path('users/', views.users, name='documents_users'),
23 path('activity/', views.activity, name='documents_activity'),
24 re_path(r'^activity/(?P<isodate>\d{4}-\d{2}-\d{2})/$',
25 views.activity, name='documents_activity'),
27 path('upload/', views.upload, name='documents_upload'),
29 path('create/<slug:slug>/',
30 views.create_missing, name='documents_create_missing'),
31 path('create/', views.create_missing, name='documents_create_missing'),
33 path('book/<slug:slug>/publish', views.publish, name="documents_publish"),
35 path('book/<slug:slug>/', views.book, name="documents_book"),
36 path('book/<slug:slug>/gallery/',
37 permission_required('documents.change_book')(views.GalleryView.as_view()),
38 name="documents_book_gallery"),
39 path('book/<slug:slug>/xml', views.book_xml, name="documents_book_xml"),
40 path('book/dc/<slug:slug>/xml', views.book_xml_dc, name="documents_book_xml_dc"),
41 path('book/<slug:slug>/txt', views.book_txt, name="documents_book_txt"),
42 path('book/<slug:slug>/html', views.book_html, name="documents_book_html"),
43 path('book/<slug:slug>/epub', views.book_epub, name="documents_book_epub"),
44 path('book/<slug:slug>/mobi', views.book_mobi, name="documents_book_mobi"),
45 path('book/<slug:slug>/pdf', views.book_pdf, name="documents_book_pdf"),
46 path('book/<slug:slug>/pdf-mobile', views.book_pdf, kwargs={'mobile': True}, name="documents_book_pdf_mobile"),
48 path('chunk_add/<slug:slug>/<slug:chunk>/',
49 views.chunk_add, name="documents_chunk_add"),
50 path('chunk_edit/<slug:slug>/<slug:chunk>/',
51 views.chunk_edit, name="documents_chunk_edit"),
52 path('book_append/<slug:slug>/',
53 views.book_append, name="documents_book_append"),
54 path('chunk_mass_edit',
55 views.chunk_mass_edit, name='documents_chunk_mass_edit'),
56 path('image_mass_edit',
57 views.image_mass_edit, name='documents_image_mass_edit'),
59 path('track/<slug:slug>/', PublishTrackFeed()),
60 path('active/', views.active_users_list, name='active_users_list'),
61 path('active.csv', views.active_users_list, kwargs={'csv': True}, name='active_users_csv'),
63 path('mark-final/', views.mark_final, name='mark_final'),
64 path('mark-final-completed/', views.mark_final_completed, name='mark_final_completed'),