* dev: support for edition specific options in pages * refactor: page quick actions * chore: add customizable page actions * fix: type errors * dev: hook to get page operations * refactor: remove unnecessary props * chore: add permisssions to duplicate page endpoint * chore: memoize arranged options * chore: use enum for page access * chore: add type assertion * fix: auth for access change and delete * fix: removing readonly editor * chore: add sync for page access cahnge * fix: sync state * fix: indexeddb sync loader added * fix: remove node error fixed * style: page title and checkbox * chore: removing the syncing logic * revert: is editable check removed in display message * fix: editable field optional * fix: editable removed as optional prop * fix: extra options import fix * fix: remove readonly stuff * fix: added toggle access * chore: add access change sync * fix: full width toggle * refactor: types and enums added * refactore: update store action * chore: changed the duplicate viewset * fix: remove the page binary * fix: duplicate page action * fix: merge conflicts --------- Co-authored-by: Palanikannan M <akashmalinimurugu@gmail.com> Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
87 lines
2.8 KiB
Python
87 lines
2.8 KiB
Python
from django.urls import path
|
|
|
|
|
|
from plane.app.views import (
|
|
PageViewSet,
|
|
PageFavoriteViewSet,
|
|
PageLogEndpoint,
|
|
SubPagesEndpoint,
|
|
PagesDescriptionViewSet,
|
|
PageVersionEndpoint,
|
|
PageDuplicateEndpoint,
|
|
)
|
|
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/",
|
|
PageViewSet.as_view({"get": "list", "post": "create"}),
|
|
name="project-pages",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/",
|
|
PageViewSet.as_view(
|
|
{"get": "retrieve", "patch": "partial_update", "delete": "destroy"}
|
|
),
|
|
name="project-pages",
|
|
),
|
|
# favorite pages
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/favorite-pages/<uuid:pk>/",
|
|
PageFavoriteViewSet.as_view({"post": "create", "delete": "destroy"}),
|
|
name="user-favorite-pages",
|
|
),
|
|
# archived pages
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/archive/",
|
|
PageViewSet.as_view({"post": "archive", "delete": "unarchive"}),
|
|
name="project-page-archive-unarchive",
|
|
),
|
|
# lock and unlock
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/lock/",
|
|
PageViewSet.as_view({"post": "lock", "delete": "unlock"}),
|
|
name="project-pages-lock-unlock",
|
|
),
|
|
# private and public page
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/access/",
|
|
PageViewSet.as_view({"post": "access"}),
|
|
name="project-pages-access",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/transactions/",
|
|
PageLogEndpoint.as_view(),
|
|
name="page-transactions",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/transactions/<uuid:transaction>/",
|
|
PageLogEndpoint.as_view(),
|
|
name="page-transactions",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/sub-pages/",
|
|
SubPagesEndpoint.as_view(),
|
|
name="sub-page",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/description/",
|
|
PagesDescriptionViewSet.as_view({"get": "retrieve", "patch": "partial_update"}),
|
|
name="page-description",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:page_id>/versions/",
|
|
PageVersionEndpoint.as_view(),
|
|
name="page-versions",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:page_id>/versions/<uuid:pk>/",
|
|
PageVersionEndpoint.as_view(),
|
|
name="page-versions",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:page_id>/duplicate/",
|
|
PageDuplicateEndpoint.as_view(),
|
|
name="page-duplicate",
|
|
),
|
|
]
|