@raketa-cloud/admin 1.8.3 → 1.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application.css +36 -0
- package/package.json +2 -2
- package/src/cloud/ResourceChanges.js +41 -0
- package/src/cloud/ResourceRevisions.js +242 -0
- package/src/cloud/Resources.js +219 -0
- package/src/cloud/documents/common.js +0 -30
- package/src/cloud/documents/resourcesDocuments.js +371 -0
- package/src/handlers/_shared/getResourceUpdateDestination.js +11 -0
- package/src/handlers/resource_revisions/CancelSchedulesHandler.js +31 -0
- package/src/handlers/resource_revisions/CodeHandler.js +70 -0
- package/src/handlers/resource_revisions/GeneralHandler.js +72 -0
- package/src/handlers/{article_revisions → resource_revisions}/LocksHandler.js +15 -10
- package/src/handlers/resource_revisions/MetaHandler.js +70 -0
- package/src/handlers/{article_revisions → resource_revisions}/PublishesHandler.js +27 -19
- package/src/handlers/resource_revisions/ResourceRevisionsHandler.js +65 -0
- package/src/handlers/{article_revisions → resource_revisions}/RevertsHandler.js +7 -5
- package/src/handlers/{page_revisions → resource_revisions}/TagHandler.js +31 -16
- package/src/handlers/resource_revisions/UnlocksHandler.js +29 -0
- package/src/handlers/resource_revisions/VisualHandler.js +71 -0
- package/src/handlers/{article_revisions → resource_revisions}/WidgetHandler.js +11 -6
- package/src/handlers/{pages → resources}/ChangeHandler.js +5 -3
- package/src/handlers/resources/ClonesHandler.js +24 -0
- package/src/handlers/resources/DeletesHandler.js +79 -0
- package/src/handlers/{pages → resources}/ExportsHandler.js +8 -4
- package/src/handlers/resources/HistoryHandler.js +39 -0
- package/src/handlers/{pages/PagesAPIHandler.js → resources/ResourcesAPIHandler.js} +4 -2
- package/src/handlers/{pages/PagesHandler.js → resources/ResourcesHandler.js} +35 -18
- package/src/handlers/{pages → resources}/TranslationsHandler.js +65 -37
- package/src/handlers/resources/URLsHandler.js +84 -0
- package/src/helpers/CSVExportHelper.js +5 -6
- package/src/index.js +28 -69
- package/src/routeArticlesModule.js +7 -167
- package/src/routeEventsModule.js +7 -182
- package/src/routePagesModule.js +7 -179
- package/src/routeResource.js +197 -0
- package/src/routeStandard.js +1 -1
- package/src/setupCloud.js +10 -30
- package/src/tests/HonoAdapter.coverage.test.js +640 -0
- package/src/tests/HonoAdapter.test.js +3 -0
- package/src/tests/buildResourcePath.test.js +69 -0
- package/src/tests/handlers/_shared/getResourceUpdateDestination.test.js +63 -0
- package/src/tests/handlers/{article_revisions/CancelScheduledHandler.test → resource_revisions/CancelSchedulesHandler.test}/create.test.js +26 -26
- package/src/tests/handlers/{page_revisions/CodesHandler.test → resource_revisions/CodeHandler.test}/edit_form.test.js +13 -16
- package/src/tests/handlers/{article_revisions/CodesHandler.test → resource_revisions/CodeHandler.test}/update.test.js +38 -57
- package/src/tests/handlers/resource_revisions/GeneralHandler.test/edit_form.test.js +58 -0
- package/src/tests/handlers/{article_revisions → resource_revisions}/GeneralHandler.test/update.test.js +39 -53
- package/src/tests/handlers/{event_revisions → resource_revisions}/LocksHandler.test/create.test.js +34 -31
- package/src/tests/handlers/{event_revisions → resource_revisions}/LocksHandler.test/create_form.test.js +16 -12
- package/src/tests/handlers/{page_revisions → resource_revisions}/MetaHandler.test/edit_form.test.js +13 -9
- package/src/tests/handlers/{article_revisions → resource_revisions}/MetaHandler.test/update.test.js +38 -57
- package/src/tests/handlers/{article_revisions → resource_revisions}/PublishesHandler.test/create.test.js +60 -72
- package/src/tests/handlers/{page_revisions → resource_revisions}/PublishesHandler.test/create_form.test.js +14 -10
- package/src/tests/handlers/resource_revisions/ResourceRevisionsHandler.test/create.test.js +87 -0
- package/src/tests/handlers/{article_revisions/ArticleRevisionsHandler.test → resource_revisions/ResourceRevisionsHandler.test}/destroy.test.js +13 -13
- package/src/tests/handlers/resource_revisions/RevertsHandler.test/create.test.js +83 -0
- package/src/tests/handlers/{event_revisions → resource_revisions}/TagHandler.test/edit_form.test.js +23 -19
- package/src/tests/handlers/{article_revisions → resource_revisions}/TagHandler.test/update.test.js +44 -49
- package/src/tests/handlers/{article_revisions → resource_revisions}/UnlocksHandler.test/create.test.js +22 -22
- package/src/tests/handlers/{page_revisions/VisualHandler.test.test → resource_revisions/VisualHandler.test}/edit_form.test.js +13 -16
- package/src/tests/handlers/resource_revisions/VisualHandler.test/update.test.js +130 -0
- package/src/tests/handlers/{event_revisions → resource_revisions}/WidgetHandler.test/show.test.js +11 -7
- package/src/tests/handlers/{event_revisions → resource_revisions}/WidgetHandler.test/update.test.js +28 -14
- package/src/tests/handlers/resources/ChangeHandler.test/show.test.js +57 -0
- package/src/tests/handlers/resources/ClonesHandler.test/create.test.js +57 -0
- package/src/tests/handlers/{articles → resources}/DeletesHandler.test/create.test.js +30 -30
- package/src/tests/handlers/resources/DeletesHandler.test/create_form.test.js +60 -0
- package/src/tests/handlers/{articles → resources}/ExportsHandler.test/index.test.js +57 -57
- package/src/tests/handlers/{articles/ArticlesHistoryHandler.test → resources/HistoryHandler.test}/index.test.js +19 -20
- package/src/tests/handlers/resources/ResourcesAPIHandler.test/index.test.js +41 -0
- package/src/tests/handlers/{pages/PagesHandler.test → resources/ResourcesHandler.test}/create.test.js +23 -22
- package/src/tests/handlers/{events/EventsHandler.test → resources/ResourcesHandler.test}/create_form.test.js +12 -11
- package/src/tests/handlers/{events/EventsHandler.test → resources/ResourcesHandler.test}/index.test.js +18 -18
- package/src/tests/handlers/resources/ResourcesHandler.test/show.test.js +111 -0
- package/src/tests/handlers/resources/TranslationsHandler.test/create.test.js +320 -0
- package/src/tests/handlers/resources/TranslationsHandler.test/create_form.test.js +85 -0
- package/src/tests/handlers/resources/TranslationsHandler.test/index.test.js +99 -0
- package/src/tests/handlers/{articles → resources}/URLsHandler.test/create.test.js +48 -43
- package/src/tests/handlers/resources/URLsHandler.test/create_form.test.js +55 -0
- package/src/tests/routeArticlesModule.test.js +43 -0
- package/src/tests/routeCategoriesModule.test.js +23 -0
- package/src/tests/routeEventsModule.test.js +43 -0
- package/src/tests/routePagesModule.test.js +43 -0
- package/src/tests/routeResource.test.js +202 -0
- package/src/tests/routeSettings.test.js +40 -0
- package/src/tests/routeStandard.test.js +70 -0
- package/src/tests/setGlobalContext.test.js +12 -0
- package/src/tests/setupAuthentication.test.js +407 -0
- package/src/tests/setupCloud.test.js +51 -0
- package/src/tests/support/factory.js +15 -86
- package/src/views/article_revisions/_nav.ejs +6 -6
- package/src/views/article_revisions/codes/_form.ejs +2 -2
- package/src/views/article_revisions/general/_form.ejs +3 -3
- package/src/views/article_revisions/locks/_form.ejs +2 -2
- package/src/views/article_revisions/meta/_form.ejs +2 -2
- package/src/views/article_revisions/publishes/_form.ejs +3 -3
- package/src/views/article_revisions/tags/_form.ejs +2 -2
- package/src/views/article_revisions/visuals/_form.ejs +2 -2
- package/src/views/articles/_form.ejs +9 -9
- package/src/views/articles/_shared/_export_button.ejs +1 -1
- package/src/views/articles/_shared/_history_toolbar.ejs +2 -2
- package/src/views/articles/_shared/_revision_operator.ejs +8 -0
- package/src/views/articles/_shared/_revision_toolbar.ejs +7 -7
- package/src/views/articles/_shared/_title.ejs +2 -2
- package/src/views/articles/_shared/_toolbar.ejs +6 -6
- package/src/views/articles/_shared/history_table.ejs +1 -1
- package/src/views/articles/create_form.ejs +1 -1
- package/src/views/articles/deletes/create_form.ejs +3 -3
- package/src/views/articles/history/index.ejs +4 -4
- package/src/views/articles/index.ejs +14 -12
- package/src/views/articles/show.ejs +8 -22
- package/src/views/articles/translations/_translation_toolbar.ejs +2 -2
- package/src/views/articles/translations/create_form.ejs +2 -2
- package/src/views/articles/translations/index.ejs +3 -3
- package/src/views/articles/urls/create_form.ejs +3 -3
- package/src/views/event_revisions/_nav.ejs +6 -6
- package/src/views/event_revisions/codes/_form.ejs +2 -2
- package/src/views/event_revisions/general/_form.ejs +5 -5
- package/src/views/event_revisions/locks/_form.ejs +2 -2
- package/src/views/event_revisions/meta/_form.ejs +2 -2
- package/src/views/event_revisions/publishes/_form.ejs +3 -3
- package/src/views/event_revisions/tags/_form.ejs +2 -2
- package/src/views/event_revisions/visuals/_form.ejs +2 -2
- package/src/views/events/_form.ejs +6 -6
- package/src/views/events/_shared/_export_button.ejs +1 -1
- package/src/views/events/_shared/_history_toolbar.ejs +2 -2
- package/src/views/events/_shared/_revision_operator.ejs +8 -0
- package/src/views/events/_shared/_revision_toolbar.ejs +7 -7
- package/src/views/events/_shared/_title.ejs +2 -2
- package/src/views/events/_shared/_toolbar.ejs +6 -6
- package/src/views/events/_shared/history_table.ejs +1 -1
- package/src/views/events/create_form.ejs +1 -1
- package/src/views/events/deletes/create_form.ejs +3 -3
- package/src/views/events/history/index.ejs +4 -4
- package/src/views/events/index.ejs +14 -12
- package/src/views/events/show.ejs +8 -22
- package/src/views/events/translations/_translation_toolbar.ejs +2 -2
- package/src/views/events/translations/create_form.ejs +2 -2
- package/src/views/events/translations/index.ejs +3 -3
- package/src/views/events/urls/create_form.ejs +3 -3
- package/src/views/layouts/application.ejs +30 -0
- package/src/views/page_revisions/_nav.ejs +6 -6
- package/src/views/page_revisions/codes/_form.ejs +2 -2
- package/src/views/page_revisions/general/_form.ejs +2 -2
- package/src/views/page_revisions/locks/_form.ejs +2 -2
- package/src/views/page_revisions/meta/_form.ejs +2 -2
- package/src/views/page_revisions/publishes/_form.ejs +3 -3
- package/src/views/page_revisions/tags/_form.ejs +2 -2
- package/src/views/page_revisions/visuals/_form.ejs +2 -2
- package/src/views/pages/_form.ejs +3 -3
- package/src/views/pages/_shared/_export_button.ejs +1 -1
- package/src/views/pages/_shared/_history_toolbar.ejs +2 -2
- package/src/views/pages/_shared/_revision_operator.ejs +8 -0
- package/src/views/pages/_shared/_revision_toolbar.ejs +7 -7
- package/src/views/pages/_shared/_title.ejs +2 -2
- package/src/views/pages/_shared/_toolbar.ejs +6 -6
- package/src/views/pages/_shared/history_table.ejs +1 -1
- package/src/views/pages/create_form.ejs +1 -1
- package/src/views/pages/deletes/create_form.ejs +3 -3
- package/src/views/pages/history/index.ejs +4 -4
- package/src/views/pages/index.ejs +12 -10
- package/src/views/pages/show.ejs +8 -22
- package/src/views/pages/translations/_translation_toolbar.ejs +2 -2
- package/src/views/pages/translations/create_form.ejs +2 -2
- package/src/views/pages/translations/index.ejs +3 -3
- package/src/views/pages/urls/create_form.ejs +3 -3
- package/src/cloud/ArticleChanges.js +0 -36
- package/src/cloud/ArticleRevisions.js +0 -239
- package/src/cloud/Articles.js +0 -216
- package/src/cloud/EventChanges.js +0 -36
- package/src/cloud/EventRevisions.js +0 -246
- package/src/cloud/Events.js +0 -231
- package/src/cloud/PageChanges.js +0 -36
- package/src/cloud/PageRevisions.js +0 -226
- package/src/cloud/Pages.js +0 -204
- package/src/cloud/documents/articlesDocuments.js +0 -375
- package/src/cloud/documents/eventsDocuments.js +0 -390
- package/src/cloud/documents/pagesDocuments.js +0 -370
- package/src/handlers/_shared/getArticlesUpdateDestination.js +0 -7
- package/src/handlers/_shared/getEventsUpdateDestination.js +0 -7
- package/src/handlers/_shared/getPagesUpdateDestination.js +0 -8
- package/src/handlers/article_revisions/ArticleRevisionsHandler.js +0 -57
- package/src/handlers/article_revisions/CancelSchedulesHandler.js +0 -26
- package/src/handlers/article_revisions/CodeHandler.js +0 -75
- package/src/handlers/article_revisions/GeneralHandler.js +0 -77
- package/src/handlers/article_revisions/MetaHandler.js +0 -75
- package/src/handlers/article_revisions/TagHandler.js +0 -83
- package/src/handlers/article_revisions/UnlocksHandler.js +0 -24
- package/src/handlers/article_revisions/VisualHandler.js +0 -75
- package/src/handlers/articles/ArticlesAPIHandler.js +0 -15
- package/src/handlers/articles/ArticlesHandler.js +0 -126
- package/src/handlers/articles/ChangeHandler.js +0 -22
- package/src/handlers/articles/ClonesHandler.js +0 -19
- package/src/handlers/articles/DeletesHandler.js +0 -72
- package/src/handlers/articles/ExportsHandler.js +0 -35
- package/src/handlers/articles/HistoryHandler.js +0 -31
- package/src/handlers/articles/TranslationsHandler.js +0 -231
- package/src/handlers/articles/URLsHandler.js +0 -83
- package/src/handlers/event_revisions/CancelSchedulesHandler.js +0 -26
- package/src/handlers/event_revisions/CodeHandler.js +0 -73
- package/src/handlers/event_revisions/EventRevisionsHandler.js +0 -55
- package/src/handlers/event_revisions/GeneralHandler.js +0 -75
- package/src/handlers/event_revisions/LocksHandler.js +0 -65
- package/src/handlers/event_revisions/MetaHandler.js +0 -73
- package/src/handlers/event_revisions/PublishesHandler.js +0 -112
- package/src/handlers/event_revisions/RevertsHandler.js +0 -26
- package/src/handlers/event_revisions/TagHandler.js +0 -80
- package/src/handlers/event_revisions/UnlocksHandler.js +0 -24
- package/src/handlers/event_revisions/VisualHandler.js +0 -73
- package/src/handlers/event_revisions/WidgetHandler.js +0 -41
- package/src/handlers/events/ChangeHandler.js +0 -22
- package/src/handlers/events/ClonesHandler.js +0 -19
- package/src/handlers/events/DeletesHandler.js +0 -72
- package/src/handlers/events/EventsAPIHandler.js +0 -15
- package/src/handlers/events/EventsHandler.js +0 -128
- package/src/handlers/events/ExportsHandler.js +0 -35
- package/src/handlers/events/HistoryHandler.js +0 -31
- package/src/handlers/events/TranslationsHandler.js +0 -233
- package/src/handlers/events/URLsHandler.js +0 -81
- package/src/handlers/page_revisions/CancelSchedulesHandler.js +0 -26
- package/src/handlers/page_revisions/CodeHandler.js +0 -59
- package/src/handlers/page_revisions/GeneralHandler.js +0 -61
- package/src/handlers/page_revisions/LocksHandler.js +0 -69
- package/src/handlers/page_revisions/MetaHandler.js +0 -59
- package/src/handlers/page_revisions/PageRevisionsHandler.js +0 -55
- package/src/handlers/page_revisions/PublishesHandler.js +0 -112
- package/src/handlers/page_revisions/RevertsHandler.js +0 -26
- package/src/handlers/page_revisions/UnlocksHandler.js +0 -22
- package/src/handlers/page_revisions/VisualHandler.js +0 -60
- package/src/handlers/page_revisions/WidgetHandler.js +0 -41
- package/src/handlers/pages/ClonesHandler.js +0 -19
- package/src/handlers/pages/DeletesHandler.js +0 -68
- package/src/handlers/pages/HistoryHandler.js +0 -31
- package/src/handlers/pages/URLsHandler.js +0 -77
- package/src/tests/handlers/article_revisions/ArticleRevisionsHandler.test/create.test.js +0 -87
- package/src/tests/handlers/article_revisions/CodesHandler.test/edit_form.test.js +0 -56
- package/src/tests/handlers/article_revisions/GeneralHandler.test/edit_form.test.js +0 -59
- package/src/tests/handlers/article_revisions/LocksHandler.test/create.test.js +0 -142
- package/src/tests/handlers/article_revisions/LocksHandler.test/create_form.test.js +0 -55
- package/src/tests/handlers/article_revisions/MetaHandler.test/edit_form.test.js +0 -56
- package/src/tests/handlers/article_revisions/PublishesHandler.test/create_form.test.js +0 -48
- package/src/tests/handlers/article_revisions/RevertsHandler.test/create.test.js +0 -86
- package/src/tests/handlers/article_revisions/TagHandler.test/edit_form.test.js +0 -72
- package/src/tests/handlers/article_revisions/VisualHandler.test.test/edit_form.test.js +0 -56
- package/src/tests/handlers/article_revisions/VisualHandler.test.test/update.test.js +0 -146
- package/src/tests/handlers/article_revisions/WidgetHandler.test/show.test.js +0 -46
- package/src/tests/handlers/article_revisions/WidgetHandler.test/update.test.js +0 -103
- package/src/tests/handlers/articles/ArticlesAPIHandler.test/index.test.js +0 -43
- package/src/tests/handlers/articles/ArticlesHandler.test/create.test.js +0 -172
- package/src/tests/handlers/articles/ArticlesHandler.test/create_form.test.js +0 -44
- package/src/tests/handlers/articles/ArticlesHandler.test/index.test.js +0 -73
- package/src/tests/handlers/articles/ArticlesHandler.test/show.test.js +0 -120
- package/src/tests/handlers/articles/ChangeHandler.test/show.test.js +0 -59
- package/src/tests/handlers/articles/ClonesHandler.test/create.test.js +0 -57
- package/src/tests/handlers/articles/DeletesHandler.test/create_form.test.js +0 -60
- package/src/tests/handlers/articles/TranslationHandler.test/create.test.js +0 -297
- package/src/tests/handlers/articles/TranslationHandler.test/create_form.test.js +0 -71
- package/src/tests/handlers/articles/TranslationHandler.test/index.test.js +0 -91
- package/src/tests/handlers/articles/URLsHandler.test/create_form.test.js +0 -55
- package/src/tests/handlers/event_revisions/CancelScheduledHandler.test/create.test.js +0 -90
- package/src/tests/handlers/event_revisions/CodesHandler.test/edit_form.test.js +0 -60
- package/src/tests/handlers/event_revisions/CodesHandler.test/update.test.js +0 -171
- package/src/tests/handlers/event_revisions/EventRevisionsHandler.test/create.test.js +0 -87
- package/src/tests/handlers/event_revisions/EventRevisionsHandler.test/destroy.test.js +0 -57
- package/src/tests/handlers/event_revisions/GeneralHandler.test/edit_form.test.js +0 -63
- package/src/tests/handlers/event_revisions/GeneralHandler.test/update.test.js +0 -172
- package/src/tests/handlers/event_revisions/MetaHandler.test/edit_form.test.js +0 -60
- package/src/tests/handlers/event_revisions/MetaHandler.test/update.test.js +0 -173
- package/src/tests/handlers/event_revisions/PublishesHandler.test/create.test.js +0 -333
- package/src/tests/handlers/event_revisions/PublishesHandler.test/create_form.test.js +0 -48
- package/src/tests/handlers/event_revisions/RevertsHandler.test/create.test.js +0 -83
- package/src/tests/handlers/event_revisions/TagHandler.test/update.test.js +0 -163
- package/src/tests/handlers/event_revisions/UnlocksHandler.test/create.test.js +0 -84
- package/src/tests/handlers/event_revisions/VisualHandler.test.test/edit_form.test.js +0 -60
- package/src/tests/handlers/event_revisions/VisualHandler.test.test/update.test.js +0 -156
- package/src/tests/handlers/events/ChangeHandler.test/show.test.js +0 -59
- package/src/tests/handlers/events/ClonesHandler.test/create.test.js +0 -57
- package/src/tests/handlers/events/DeletesHandler.test/create.test.js +0 -115
- package/src/tests/handlers/events/DeletesHandler.test/create_form.test.js +0 -60
- package/src/tests/handlers/events/EventsAPIHandler.test/index.test.js +0 -39
- package/src/tests/handlers/events/EventsHandler.test/create.test.js +0 -172
- package/src/tests/handlers/events/EventsHandler.test/show.test.js +0 -120
- package/src/tests/handlers/events/EventsHistoryHandler.test/index.test.js +0 -87
- package/src/tests/handlers/events/ExportsHandler.test/index.test.js +0 -212
- package/src/tests/handlers/events/TranslationHandler.test/create.test.js +0 -303
- package/src/tests/handlers/events/TranslationHandler.test/create_form.test.js +0 -71
- package/src/tests/handlers/events/TranslationHandler.test/index.test.js +0 -91
- package/src/tests/handlers/events/URLsHandler.test/create.test.js +0 -160
- package/src/tests/handlers/events/URLsHandler.test/create_form.test.js +0 -55
- package/src/tests/handlers/page_revisions/CancelScheduledHandler.test/create.test.js +0 -86
- package/src/tests/handlers/page_revisions/CodesHandler.test/update.test.js +0 -204
- package/src/tests/handlers/page_revisions/GeneralHandler.test/edit_form.test.js +0 -54
- package/src/tests/handlers/page_revisions/GeneralHandler.test/update.test.js +0 -219
- package/src/tests/handlers/page_revisions/LocksHandler.test/create.test.js +0 -138
- package/src/tests/handlers/page_revisions/LocksHandler.test/create_form.test.js +0 -55
- package/src/tests/handlers/page_revisions/MetaHandler.test/update.test.js +0 -211
- package/src/tests/handlers/page_revisions/PageRevisionsHandler.test/create.test.js +0 -85
- package/src/tests/handlers/page_revisions/PageRevisionsHandler.test/destroy.test.js +0 -57
- package/src/tests/handlers/page_revisions/PublishesHandler.test/create.test.js +0 -333
- package/src/tests/handlers/page_revisions/RevertsHandler.test/create.test.js +0 -83
- package/src/tests/handlers/page_revisions/TagHandler.test/edit_form.test.js +0 -100
- package/src/tests/handlers/page_revisions/TagHandler.test/update.test.js +0 -223
- package/src/tests/handlers/page_revisions/UnlocksHandler.test/create.test.js +0 -80
- package/src/tests/handlers/page_revisions/VisualHandler.test.test/update.test.js +0 -183
- package/src/tests/handlers/page_revisions/WidgetHandler.test/show.test.js +0 -46
- package/src/tests/handlers/page_revisions/WidgetHandler.test/update.test.js +0 -103
- package/src/tests/handlers/pages/ChangeHandler.test/show.test.js +0 -59
- package/src/tests/handlers/pages/ConesHandler.test/create.test.js +0 -57
- package/src/tests/handlers/pages/DeletesHandler.test/create.test.js +0 -115
- package/src/tests/handlers/pages/DeletesHandler.test/create_form.test.js +0 -60
- package/src/tests/handlers/pages/ExportsHandler.test/index.test.js +0 -212
- package/src/tests/handlers/pages/PagesAPIHandler.test/index.test.js +0 -39
- package/src/tests/handlers/pages/PagesHandler.test/create_form.test.js +0 -41
- package/src/tests/handlers/pages/PagesHandler.test/index.test.js +0 -69
- package/src/tests/handlers/pages/PagesHandler.test/show.test.js +0 -118
- package/src/tests/handlers/pages/PagesHistoryHandler.test/index.test.js +0 -87
- package/src/tests/handlers/pages/TranslationHandler.test/create.test.js +0 -290
- package/src/tests/handlers/pages/TranslationHandler.test/create_form.test.js +0 -71
- package/src/tests/handlers/pages/TranslationHandler.test/index.test.js +0 -87
- package/src/tests/handlers/pages/URLsHandler.test/create.test.js +0 -160
- package/src/tests/handlers/pages/URLsHandler.test/create_form.test.js +0 -58
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
<% if (key === _context.locale) { %>
|
|
18
18
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
19
19
|
<% } else if (resource.translations[key]) { %>
|
|
20
|
-
<a href="<%= `/${key}/${_context.resourceConfig.
|
|
20
|
+
<a href="<%= `/${key}/${_context.resourceConfig.resourceTypePlural}/${resource.translations[key].id}` %>">
|
|
21
21
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
22
22
|
</a>
|
|
23
23
|
<% } else { %>
|
|
24
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
24
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
25
25
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="<%= [" transition-all ease-in-out duration-300 size-6 rounded-full border hover:opacity-100 dark:border-neutral-700", key === _context.locale ? "opacity-100" : "opacity-10"].join(" ") %>" />
|
|
26
26
|
</a>
|
|
27
27
|
<% } %>
|
|
28
28
|
<% }); %>
|
|
29
29
|
|
|
30
30
|
<% if (canBeTranslated) { %>
|
|
31
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
31
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/translations/new` %>" class="btn-text ml-2">
|
|
32
32
|
Translate
|
|
33
33
|
</a>
|
|
34
34
|
<% } %>
|
|
@@ -86,14 +86,7 @@
|
|
|
86
86
|
</td>
|
|
87
87
|
|
|
88
88
|
<td class="whitespace-nowrap">
|
|
89
|
-
|
|
90
|
-
<div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
|
|
91
|
-
<% if (revision.meta.operatorMeta.avatar) { %>
|
|
92
|
-
<img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4 rounded-full">
|
|
93
|
-
<% } %>
|
|
94
|
-
<%= revision.meta.operatorMeta.name %>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
89
|
+
<%- render_partial('./_shared/_revision_operator.ejs', { revision }) %>
|
|
97
90
|
</td>
|
|
98
91
|
|
|
99
92
|
<td class="whitespace-nowrap">
|
|
@@ -150,14 +143,7 @@
|
|
|
150
143
|
</td>
|
|
151
144
|
|
|
152
145
|
<td class="whitespace-nowrap">
|
|
153
|
-
|
|
154
|
-
<div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
|
|
155
|
-
<% if (revision.meta.operatorMeta.avatar) { %>
|
|
156
|
-
<img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4 rounded-full">
|
|
157
|
-
<% } %>
|
|
158
|
-
<%= revision.meta.operatorMeta.name %>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
146
|
+
<%- render_partial('./_shared/_revision_operator.ejs', { revision }) %>
|
|
161
147
|
</td>
|
|
162
148
|
|
|
163
149
|
<td class="whitespace-nowrap">
|
|
@@ -187,11 +173,11 @@
|
|
|
187
173
|
|
|
188
174
|
<td class="whitespace-nowrap">
|
|
189
175
|
<div class="actions-toolbar justify-end">
|
|
190
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
176
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${revision.id}/cancel_schedules` %>" method="post" class="inline-flex gap-2 items-center">
|
|
191
177
|
<%- f.submit('Remove schedule', { class: 'btn-text' }) %>
|
|
192
178
|
</form>
|
|
193
179
|
|
|
194
|
-
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.
|
|
180
|
+
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.resourceType %>-revisions/<%= revision.id %>/preview" target="_blank" class="btn-text has-icon">
|
|
195
181
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
196
182
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
|
197
183
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
@@ -229,7 +215,7 @@
|
|
|
229
215
|
toolbarPath: './_shared/_history_toolbar.ejs'
|
|
230
216
|
}) %>
|
|
231
217
|
|
|
232
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
218
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/history` %>" class="btn-text ml-2 my-8">
|
|
233
219
|
Full page history
|
|
234
220
|
</a>
|
|
235
221
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="actions-toolbar justify-end">
|
|
2
|
-
<a href="/remote/login?redirect_to=/<%= translation.translationLocale %>/admin/<%= _context.resourceConfig.
|
|
2
|
+
<a href="/remote/login?redirect_to=/<%= translation.translationLocale %>/admin/<%= _context.resourceConfig.resourceType %>-revisions/<%= translation.revisionId %>/builder" class="btn-text has-icon">
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
4
4
|
<path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
|
|
5
5
|
</svg>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Update Content
|
|
8
8
|
</a>
|
|
9
9
|
|
|
10
|
-
<a href="<%= `/${translation.translationLocale}/${_context.resourceConfig.
|
|
10
|
+
<a href="<%= `/${translation.translationLocale}/${_context.resourceConfig.resourceType}_revisions/${translation.revisionId}/general/edit` %>" class="btn-text has-icon">
|
|
11
11
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
12
12
|
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z" />
|
|
13
13
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<div class="grid gap-4 md:grid-cols-3">
|
|
10
10
|
<% form_for({ resource }, errors, (f) => { %>
|
|
11
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
11
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${blueprint.id}/translations` %>" method="post" class="form">
|
|
12
12
|
<h6>Available languages:</h6>
|
|
13
13
|
<% if (targetLocale) { %>
|
|
14
14
|
<input type="hidden" name="resource[languages][]" value="<%= targetLocale %>">
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class="form-actions">
|
|
47
47
|
<div class="btn-toolbar">
|
|
48
48
|
<%- f.submit('Initiate translations', { class: 'btn-primary' }) %>
|
|
49
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
49
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${blueprint.id}` %>" class="btn-secondary">Cancel</a>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
</form>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="page-title">
|
|
3
3
|
<div>
|
|
4
4
|
<h1 class="heading-1">Translations initiated</h1>
|
|
5
|
-
<span class="body-2 opacity-50"><%=
|
|
5
|
+
<span class="body-2 opacity-50"><%= resourceTitle %></span>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<tr class="border-b border-mono-25">
|
|
20
20
|
<td class="py-4 pl-2 w-full">
|
|
21
21
|
<div class="flex gap-1 items-center">
|
|
22
|
-
<a href="<%= `/${translation.translationLocale}/${_context.resourceConfig.
|
|
22
|
+
<a href="<%= `/${translation.translationLocale}/${_context.resourceConfig.resourceTypePlural}/${translation.id}` %>" class="btn-text">
|
|
23
23
|
<%= _context.locales[translation.translationLocale].name %>
|
|
24
24
|
</a>
|
|
25
25
|
</div>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</tbody>
|
|
34
34
|
</table>
|
|
35
35
|
<% } %>
|
|
36
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
36
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${parent_id}` %>" class="btn-primary mt-8">
|
|
37
37
|
Go to original
|
|
38
38
|
</a>
|
|
39
39
|
</div>
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
<div class="page-title">
|
|
3
3
|
<h1 class="heading-1">
|
|
4
4
|
<span class="opacity-50">Change URL / </span>
|
|
5
|
-
<%=
|
|
5
|
+
<%= record.title %>
|
|
6
6
|
</h1>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div class="grid gap-4 md:grid-cols-3">
|
|
10
10
|
<% form_for({ resource }, errors, (f) => { %>
|
|
11
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
11
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/urls` %>" method="post" class="form">
|
|
12
12
|
<%- f.field('resource.slug', { label: "URL", required: true, hint: "Only lowercase letters, numbers and dash allowed. Ex: celebrate/friday-13" }) %>
|
|
13
13
|
<%- f.field('resource.redirect', { as: "checkbox", value: "1", label: "Create 301 redirect for the old URL" }) %>
|
|
14
14
|
|
|
15
15
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
16
|
-
<a href="<%=`/${_context.locale}/${_context.resourceConfig.
|
|
16
|
+
<a href="<%=`/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}`%>" class="btn-secondary">Back</a>
|
|
17
17
|
</form>
|
|
18
18
|
<% }) %>
|
|
19
19
|
|
|
@@ -11,31 +11,31 @@
|
|
|
11
11
|
<div class="flex items-center justify-between mb-4">
|
|
12
12
|
<div class="flex items-center border-b-2">
|
|
13
13
|
<div class=" <%= active === 'general' ? activeClass : inactiveClass %>">
|
|
14
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
14
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/general/edit` %>" class="text-raketa-primary font-semibold">
|
|
15
15
|
General
|
|
16
16
|
</a>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
19
|
<div class="<%= active === 'visuals' ? activeClass : inactiveClass %>">
|
|
20
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
20
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/visuals/edit` %>" class="text-raketa-primary font-semibold">
|
|
21
21
|
Visuals
|
|
22
22
|
</a>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
25
|
<div class="<%= active === 'codes' ? activeClass : inactiveClass %>">
|
|
26
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
26
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/codes/edit` %>" class="text-raketa-primary font-semibold">
|
|
27
27
|
Code customizations
|
|
28
28
|
</a>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
<div class="<%= active === 'meta' ? activeClass : inactiveClass %>">
|
|
32
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
32
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/meta/edit` %>" class="text-raketa-primary font-semibold">
|
|
33
33
|
OpenGraph & Meta tags
|
|
34
34
|
</a>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
37
|
<div class="<%= active === 'tags' ? activeClass : inactiveClass %>">
|
|
38
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
38
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/tags/edit` %>" class="text-raketa-primary font-semibold">
|
|
39
39
|
Content tags
|
|
40
40
|
</a>
|
|
41
41
|
</div>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
<div>
|
|
46
|
-
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.
|
|
46
|
+
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.resourceType %>-revisions/<%= resource.id %>/builder" class="btn-secondary has-icon <%= resource.meta && resource.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
47
47
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
48
48
|
<path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
|
|
49
49
|
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/codes` %>" method="POST" class="form">
|
|
3
3
|
<%- render_partial('../../_shared/_scripts_input.ejs', { resource, f }) %>
|
|
4
4
|
<%- render_partial('../../_shared/_structured_json_input.ejs', { resource, f }) %>
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div class="btn-toolbar">
|
|
8
8
|
<%- f.submit('Save', { class: 'btn-primary' }) %>
|
|
9
9
|
<%- f.submit('Save and publish', { class: 'btn-secondary', name: '_next', value: 'publish' }) %>
|
|
10
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
10
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.originalId}` %>" class="btn-text">Back</a>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
13
|
</form>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/general` %>" method="POST" class="form">
|
|
3
3
|
<%- f.field('resource.title', { required: true }) %>
|
|
4
4
|
<%- f.field('resource.slug', { label: "URL", required: true, hint: "Only lowercase letters, numbers and dash allowed. E.g: celebrate-friday-13" }) %>
|
|
5
|
-
<%- f.field('resource.
|
|
6
|
-
<%- f.field('resource.
|
|
7
|
-
<%- f.field('resource.
|
|
5
|
+
<%- f.field('resource.settings.publish_at', { required: true, type: 'date', label: `${Inflector.capitalize(_context.resourceConfig.resourceType)} post date` }) %>
|
|
6
|
+
<%- f.field('resource.settings.starts_at', { required: true, type: 'datetime-local', label: 'Starts at (UTC)' }) %>
|
|
7
|
+
<%- f.field('resource.settings.ends_at', { required: true, type: 'datetime-local', label: 'Ends at (UTC)' }) %>
|
|
8
8
|
<%- f.field('resource.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
9
9
|
|
|
10
10
|
<%- include('../../_shared/_credentials_input.ejs', { f, visibilityFieldId: "f_resource_visibility"}) %>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div class="btn-toolbar">
|
|
14
14
|
<%- f.submit('Save', { class: 'btn-primary' }) %>
|
|
15
15
|
<%- f.submit('Save and publish', { class: 'btn-secondary', name: '_next', value: 'publish' }) %>
|
|
16
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
16
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.originalId}` %>" class="btn-text">Back</a>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
</form>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/locks` %>" method="POST" class="form">
|
|
3
3
|
<%- f.field('resource.message', { as: 'textarea', label: 'Lock Message', required: true }) %>
|
|
4
4
|
<div class="form-actions">
|
|
5
5
|
<div class="btn-toolbar">
|
|
6
6
|
<%- f.submit('Lock revision', { class: 'btn-primary' }) %>
|
|
7
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
7
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.originalId}` %>" class="btn-secondary">Cancel</a>
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
10
|
</form>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/meta` %>" method="POST" class="form">
|
|
3
3
|
<%- f.field('resource.settings.meta.title', { required: true, label: "Meta title", hint: "Used for both meta and OpenGraph" }) %>
|
|
4
4
|
<%- f.field('resource.settings.meta.description', { as: "textarea", required: true, label: "Meta description", hint: "Used for both meta and OpenGraph" }) %>
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<div class="btn-toolbar">
|
|
10
10
|
<%- f.submit('Save', { class: 'btn-primary' }) %>
|
|
11
11
|
<%- f.submit('Save and publish', { class: 'btn-secondary', name: '_next', value: 'publish' }) %>
|
|
12
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
12
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.originalId}` %>" class="btn-text">Back</a>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
</form>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% form_for({ publishing }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${publishing.id}/publishes` %>" method="post" class="form">
|
|
3
3
|
<% if (errors.slug) { %>
|
|
4
4
|
<div class="mb-4 text-red-500">A page with this URL already exists</div>
|
|
5
5
|
<% } %>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<%- f.field('publishing.type', { as: 'radio_group', label: "", options: [["now", "Publish now"], ["later", "Schedule for a date"]] }) %>
|
|
8
8
|
<%- f.field('publishing.mergeAt', { type: 'datetime-local', label: 'Publish revision at (UTC)' }) %>
|
|
9
9
|
|
|
10
|
-
<%- f.field('publishing.title'
|
|
10
|
+
<%- f.field('publishing.title', { required: true, hint: "Appears in the history of changes" }) %>
|
|
11
11
|
<%- f.field('publishing.description', { as: "textarea", hint: "Provide optional details" }) %>
|
|
12
12
|
<%- f.field('publishing.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
13
13
|
<%- f.field('publishing.username', { required: true }) %>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="btn-toolbar">
|
|
18
18
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
19
19
|
|
|
20
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
20
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${publishing.originalId}` %>" class="btn-secondary">Back</a>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
</form>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/tags` %>" method="POST" class="form">
|
|
3
3
|
<%- f.field('resource.tags', { as: 'checkbox_group', options: tags.map(tag => [tag.id, tag.name]) }) %>
|
|
4
4
|
|
|
5
5
|
<div class="form-actions">
|
|
6
6
|
<div class="btn-toolbar">
|
|
7
7
|
<%- f.submit('Save', { class: 'btn-primary' }) %>
|
|
8
8
|
<%- f.submit('Save and publish', { class: 'btn-secondary', name: '_next', value: 'publish' }) %>
|
|
9
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
9
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.originalId}` %>" class="btn-text">Back</a>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</form>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${resource.id}/visuals` %>" method="POST" class="form">
|
|
3
3
|
<%- include('../../_shared/_layout_input.ejs', { f }) %>
|
|
4
4
|
|
|
5
5
|
<div class="form-actions">
|
|
6
6
|
<div class="btn-toolbar">
|
|
7
7
|
<%- f.submit('Save', { class: 'btn-primary' }) %>
|
|
8
8
|
<%- f.submit('Save and publish', { class: 'btn-secondary', name: '_next', value: 'publish' }) %>
|
|
9
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
9
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.originalId}` %>" class="btn-text">Back</a>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</form>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= resource?.id ? `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form action="<%= resource?.id ? `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}` : `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}` %>" method="post" class="form">
|
|
3
3
|
<h2 class="heading-2 mb-4">General</h2>
|
|
4
4
|
|
|
5
5
|
<%- f.field('resource.title', { required: true }) %>
|
|
6
6
|
<%- f.field('resource.slug', { label: "URL", required: true, hint: "Only lowercase letters, numbers and dash allowed. Ex: celebrate-friday-13" }) %>
|
|
7
|
-
<%- f.field('resource.
|
|
8
|
-
<%- f.field('resource.
|
|
9
|
-
<%- f.field('resource.
|
|
7
|
+
<%- f.field('resource.settings.publish_at', { required: true, type: 'date', label: `${Inflector.capitalize(_context.resourceConfig.resourceType)} post date` }) %>
|
|
8
|
+
<%- f.field('resource.settings.starts_at', { required: true, type: 'datetime-local', label: 'Starts at (UTC)' }) %>
|
|
9
|
+
<%- f.field('resource.settings.ends_at', { required: true, type: 'datetime-local', label: 'Ends at (UTC)' }) %>
|
|
10
10
|
<%- f.field('resource.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
11
11
|
|
|
12
12
|
<%- include('../_shared/_credentials_input.ejs', { f, visibilityFieldId: "f_resource_visibility"}) %>
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
<div class="btn-toolbar">
|
|
31
31
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
32
32
|
|
|
33
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
33
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}` %>" class="btn-secondary">Back to list</a>
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
36
|
<% if (resource?.id) {%>
|
|
37
|
-
<button hx-delete="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
37
|
+
<button hx-delete="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}` %>" hx-confirm="Are you sure?" class="btn-danger has-icon">
|
|
38
38
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
39
39
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
40
40
|
</svg>
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
.map(([key, value]) => Array.isArray(value) ? value.map(v => `${key}=${encodeURIComponent(v)}`).join('&') : `${key}=${encodeURIComponent(value)}`)
|
|
6
6
|
.join('&');
|
|
7
7
|
%>
|
|
8
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
8
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/exports${queryString ? '?' + queryString : ''}` %>" class="btn-secondary">Export</a>
|
|
9
9
|
<% } %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="actions-toolbar justify-end">
|
|
2
|
-
<form method="POST" action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
2
|
+
<form method="POST" action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/${_context.resourceConfig.resourceType}_changes/reverts` %>" class="inline-block">
|
|
3
3
|
<input type="hidden" name="version" value="<%= change.version %>">
|
|
4
4
|
|
|
5
5
|
<% if (history.isChangeRevertable(change, maxVersion) && !(resource.revisionsCount >= _context.maxOpenRevisions)) { %>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<% } %>
|
|
14
14
|
</form>
|
|
15
15
|
|
|
16
|
-
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.
|
|
16
|
+
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.resourceTypePlural %>/<%= resource.id %>/changes/<%= change.version %>" class="btn-text has-icon">
|
|
17
17
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
18
18
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
|
19
19
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<div class="body-3 text-raketa-foreground/50">
|
|
2
|
+
<div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
|
|
3
|
+
<% if (revision.meta.operatorMeta.avatar) { %>
|
|
4
|
+
<img src="<%= revision.meta.operatorMeta.avatar %>" class="rounded-full size-4">
|
|
5
|
+
<% } %>
|
|
6
|
+
<%= revision.meta.operatorMeta.name %>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<div class="actions-toolbar justify-end">
|
|
2
|
-
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.
|
|
2
|
+
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.resourceType %>-revisions/<%= revision.id %>/builder" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
4
4
|
<path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
|
|
5
5
|
</svg>
|
|
6
6
|
Edit content
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
9
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${revision.id}/general/edit` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
10
10
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
11
11
|
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z" />
|
|
12
12
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Edit settings
|
|
16
16
|
</a>
|
|
17
17
|
|
|
18
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
18
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${revision.id}/publishes/new` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
19
19
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
20
20
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
|
|
21
21
|
</svg>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</summary>
|
|
32
32
|
|
|
33
33
|
<div class="absolute border bg-raketa-background p-4 right-4 z-20 mt-2 flex flex-col gap-4 shadow-md rounded dark:border-neutral-500">
|
|
34
|
-
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.
|
|
34
|
+
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.resourceType %>-revisions/<%= revision.id %>/preview" target="_blank" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
35
35
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
36
36
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
|
37
37
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
</a>
|
|
42
42
|
|
|
43
43
|
<% if (revision.meta && revision.meta.locked) { %>
|
|
44
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
44
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${revision.id}/unlocks` %>" method="post" class="inline-flex gap-2 items-center">
|
|
45
45
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
46
46
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 10.5V6.75a4.5 4.5 0 1 1 9 0v3.75M3.75 21.75h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H3.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" />
|
|
47
47
|
</svg>
|
|
48
48
|
<%- f.submit('Unlock', { class: 'btn-text' }) %>
|
|
49
49
|
</form>
|
|
50
50
|
<% } else { %>
|
|
51
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
51
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${revision.id}/locks/new` %>" class="btn-text has-icon">
|
|
52
52
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
53
53
|
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" />
|
|
54
54
|
</svg>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</a>
|
|
57
57
|
<% } %>
|
|
58
58
|
|
|
59
|
-
<button hx-delete="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
59
|
+
<button hx-delete="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${revision.id}` %>" hx-confirm="Are you sure?" type="button" class="btn-danger has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
60
60
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
61
61
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
62
62
|
</svg>
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<%= resource.title %>
|
|
4
4
|
|
|
5
5
|
<% if (resource.visibility !== "private") { %>
|
|
6
|
-
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.
|
|
6
|
+
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %>" target="_blank">
|
|
7
7
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6 text-raketa-primary">
|
|
8
8
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
|
|
9
9
|
</svg>
|
|
10
10
|
</a>
|
|
11
11
|
<% } %>
|
|
12
12
|
</h1>
|
|
13
|
-
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.
|
|
13
|
+
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %>" target="_blank" class="btn-text"><%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %></a>
|
|
14
14
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div>
|
|
2
2
|
<div class="actions-toolbar">
|
|
3
|
-
<form method="POST" action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
3
|
+
<form method="POST" action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/${_context.resourceConfig.resourceType}_revisions` %>" class="inline-block">
|
|
4
4
|
<% if (resource.revisionsCount >= _context?.maxOpenRevisions) { %>
|
|
5
5
|
<button type="submit" class="btn-primary" disabled style="opacity: 50%;">
|
|
6
6
|
Start revision
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<% } %>
|
|
13
13
|
</form>
|
|
14
14
|
|
|
15
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
15
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/urls/new` %>" class="btn-text has-icon">
|
|
16
16
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
17
17
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" />
|
|
18
18
|
</svg>
|
|
@@ -20,22 +20,22 @@
|
|
|
20
20
|
Change URL
|
|
21
21
|
</a>
|
|
22
22
|
|
|
23
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
23
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/clones` %>" method="post" class="inline-block">
|
|
24
24
|
<button type="submit" class="btn-text has-icon">
|
|
25
25
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
26
26
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" />
|
|
27
27
|
</svg>
|
|
28
28
|
|
|
29
|
-
Clone <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.
|
|
29
|
+
Clone <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.resourceType)) %>
|
|
30
30
|
</button>
|
|
31
31
|
</form>
|
|
32
32
|
|
|
33
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
33
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/deletes/new` %>" class="btn-danger has-icon">
|
|
34
34
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
35
35
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
36
36
|
</svg>
|
|
37
37
|
|
|
38
|
-
Delete <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.
|
|
38
|
+
Delete <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.resourceType)) %>
|
|
39
39
|
</a>
|
|
40
40
|
</div>
|
|
41
41
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">Create <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.
|
|
3
|
+
<h1 class="heading-1">Create <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.resourceType)) %></h1>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<div class="grid gap-4 md:grid-cols-3">
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
<div class="page-title">
|
|
3
3
|
<h1 class="heading-1">
|
|
4
4
|
<span class="opacity-50">Delete / </span>
|
|
5
|
-
<%=
|
|
5
|
+
<%= record.title %>
|
|
6
6
|
</h1>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div class="grid gap-4 md:grid-cols-3">
|
|
10
10
|
<div>
|
|
11
11
|
<% form_for({ resource }, errors, (f) => { %>
|
|
12
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
12
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/deletes` %>" method="POST" class="form">
|
|
13
13
|
<%- f.field('resource.redirect', { as: 'select', required: true,options: [['301', '301: Redirect to another page'], ['404', '404: Return an error'],['410', '410: Inform Google to remove the content from its index']] }) %>
|
|
14
14
|
<%- f.field('resource.destination', {label: 'Destination URL', required: true}) %>
|
|
15
15
|
|
|
16
16
|
<div class="form-actions">
|
|
17
17
|
<div class="btn-toolbar">
|
|
18
18
|
<%- f.submit('Proceed', { class: 'btn-primary' }) %>
|
|
19
|
-
<a href="<%=`/${_context.locale}/${_context.resourceConfig.
|
|
19
|
+
<a href="<%=`/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}`%>" class="btn-secondary">Back</a>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
</form>
|