@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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div class="actions-toolbar">
|
|
9
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
9
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}` %>" class="btn-text">Back</a>
|
|
10
10
|
<button type="button" data-toggle-sidebar="1" class="p-2.5 rounded hover:bg-neutral-200 transition-all duration-300 ease-in-out dark:hover:bg-neutral-700">
|
|
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="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<div data-sidebar="1" class="search-sidebar <%= Object.keys(_context.query).some(k => k.startsWith('f:')) ? '' : 'hidden' %>">
|
|
30
30
|
<span class="heading-2">Search by</span>
|
|
31
31
|
|
|
32
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
32
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/history` %>" method="GET" class="form mt-4">
|
|
33
33
|
<input type="hidden" name="order_direction" value="<%= _context.query.order_direction %>" />
|
|
34
34
|
<input type="hidden" name="order_by" value="<%= _context.query.order_by %>" />
|
|
35
35
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<div class="mb-4">
|
|
57
57
|
<label for="" class="font-semibold hover:cursor-pointer body-3">Changes</label>
|
|
58
58
|
<div class="checkbox-group mb-4">
|
|
59
|
-
<% Object.entries(history.changeTypes(_context.resourceConfig.
|
|
59
|
+
<% Object.entries(history.changeTypes(_context.resourceConfig.resourceType)).forEach(([key, {label}])=> { %>
|
|
60
60
|
<div class="flex items-center gap-1">
|
|
61
61
|
<% if (utils.includedInCollection(key, _context.query["f:change_type"])) { %>
|
|
62
62
|
<input type="checkbox" name="f:change_type" id='change-<%= key %>' checked value="<%= key %>" class="hover:cursor-pointer">
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
|
|
74
74
|
<div class="btn-toolbar">
|
|
75
75
|
<button type="submit" class="btn-primary">Search</button>
|
|
76
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
76
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/history` %>" class="btn-text">Clear search</a>
|
|
77
77
|
</div>
|
|
78
78
|
</form>
|
|
79
79
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1"><%= Inflector.humanize(Inflector.capitalize(_context.resourceConfig.
|
|
3
|
+
<h1 class="heading-1"><%= Inflector.humanize(Inflector.capitalize(_context.resourceConfig.resourceTypePlural)) %></h1>
|
|
4
4
|
|
|
5
5
|
<div class="actions-toolbar">
|
|
6
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
6
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/new` %>" class="btn-primary">
|
|
7
7
|
Create new
|
|
8
8
|
</a>
|
|
9
9
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<tr>
|
|
21
21
|
<th><%- sort_button("Title", "title", _context) %></th>
|
|
22
22
|
<th>Visibility</th>
|
|
23
|
-
<th><%- sort_button(`${Inflector.capitalize(_context.resourceConfig.
|
|
23
|
+
<th><%- sort_button(`${Inflector.capitalize(_context.resourceConfig.resourceType)} post date`, "publish_at", _context) %></th>
|
|
24
24
|
<th><%- sort_button("Last change", "updated_at", _context) %></th>
|
|
25
25
|
<th>Translations</th>
|
|
26
26
|
</tr>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<% items.list.forEach((item, idx)=> { %>
|
|
31
31
|
<tr>
|
|
32
32
|
<td class="w-1/2">
|
|
33
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
33
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${item.id}` %>" class="btn-text mr-1">
|
|
34
34
|
<%= item.title %>
|
|
35
35
|
</a>
|
|
36
36
|
<% if (item.revisionsCount > 0) { %>
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
|
|
40
40
|
<% if (item.visibility !== "private") { %>
|
|
41
41
|
<div class="mt-1">
|
|
42
|
-
<a href="<%= _context.remoteConfig.resourceUrl(item, _context.resourceConfig.
|
|
43
|
-
<%= _context.remoteConfig.resourcePath(item, _context.resourceConfig.
|
|
42
|
+
<a href="<%= _context.remoteConfig.resourceUrl(item, _context.resourceConfig.resourceType, _context.locale) %>" class="body-3 text-raketa-foreground/50" target="_blank">
|
|
43
|
+
<%= _context.remoteConfig.resourcePath(item, _context.resourceConfig.resourceType, _context.locale) %>
|
|
44
44
|
</a>
|
|
45
45
|
</div>
|
|
46
46
|
<% } %>
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
</td>
|
|
79
79
|
|
|
80
80
|
<td>
|
|
81
|
-
<time data-pretty-date datetime="<%= item.
|
|
81
|
+
<time data-pretty-date datetime="<%= item.settings.publish_at %>"><%= utils.formattedDate(item.settings.publish_at) %></time>
|
|
82
82
|
</td>
|
|
83
83
|
|
|
84
84
|
<td>
|
|
@@ -108,11 +108,11 @@
|
|
|
108
108
|
<% if (key === _context.locale) { %>
|
|
109
109
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
110
110
|
<% } else if (item.translations[key]) { %>
|
|
111
|
-
<a href="<%= `/${key}/${_context.resourceConfig.
|
|
111
|
+
<a href="<%= `/${key}/${_context.resourceConfig.resourceTypePlural}/${item.translations[key].id}` %>">
|
|
112
112
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
113
113
|
</a>
|
|
114
114
|
<% } else { %>
|
|
115
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
115
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${item.id}/translations/new?target_locale=${key}` %>">
|
|
116
116
|
<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(" ") %>" />
|
|
117
117
|
</a>
|
|
118
118
|
<% } %>
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
<div data-sidebar="1" class="search-sidebar <%= Object.keys(_context.query).some(k => k.startsWith('f:')) ? '' : 'hidden' %>">
|
|
131
131
|
<span class="heading-2">Search by</span>
|
|
132
132
|
|
|
133
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
133
|
+
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}` %>" method="GET" class="form mt-4">
|
|
134
134
|
<input type="hidden" name="order_direction" value="<%= _context.query.order_direction %>" />
|
|
135
135
|
<input type="hidden" name="order_by" value="<%= _context.query.order_by %>" />
|
|
136
136
|
|
|
@@ -143,7 +143,9 @@
|
|
|
143
143
|
|
|
144
144
|
<div class="mb-4">
|
|
145
145
|
<label for="widget" class="font-semibold hover:cursor-pointer body-3">Widget</label>
|
|
146
|
-
<
|
|
146
|
+
<select name="f:widget" data-widget-filter data-current-value="<%= _context.query['f:widget'] || '' %>">
|
|
147
|
+
<option value="">All widgets</option>
|
|
148
|
+
</select>
|
|
147
149
|
</div>
|
|
148
150
|
|
|
149
151
|
<div class="mb-4">
|
|
@@ -182,7 +184,7 @@
|
|
|
182
184
|
<div class="btn-toolbar">
|
|
183
185
|
<button type="submit" class="btn-primary">Search</button>
|
|
184
186
|
<%- include('./_shared/_export_button.ejs') %>
|
|
185
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
187
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}` %>" class="btn-text">Clear search</a>
|
|
186
188
|
</div>
|
|
187
189
|
</form>
|
|
188
190
|
</div>
|
|
@@ -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
|
|
|
@@ -38,6 +38,9 @@
|
|
|
38
38
|
var FILE_PICKER_GATEWAY_PROJECT = "<%= _context.globalConfig.cloud.gateway_project %>";
|
|
39
39
|
var FILE_PICKER_DXP_PRIVATE_SERVICE = "<%= _context.globalConfig.cloud.dxp_service_private %>";
|
|
40
40
|
var FILE_PICKER_JWT_TOKEN = "<%= _context.adminJwt %>";
|
|
41
|
+
var FRONTEND_URL = (function() {
|
|
42
|
+
try { return new URL("<%= _context.globalConfig.remoteConfig.remoteLogin %>").origin; } catch(e) { return ""; }
|
|
43
|
+
})();
|
|
41
44
|
</script>
|
|
42
45
|
|
|
43
46
|
<script src="https://storage.googleapis.com/cdn-raketa-cloud/js/raketa-file-picker-webcomponent.umd.js"></script>
|
|
@@ -281,6 +284,33 @@
|
|
|
281
284
|
}
|
|
282
285
|
</script>
|
|
283
286
|
|
|
287
|
+
<script>
|
|
288
|
+
function initWidgetFilter() {
|
|
289
|
+
var selects = document.querySelectorAll('select[data-widget-filter]');
|
|
290
|
+
if (!selects.length || !FRONTEND_URL) return;
|
|
291
|
+
|
|
292
|
+
fetch(FRONTEND_URL + '/dxp__/widgets/list.json')
|
|
293
|
+
.then(function(response) { return response.text(); })
|
|
294
|
+
.then(function(html) {
|
|
295
|
+
var doc = new DOMParser().parseFromString(html, 'text/html');
|
|
296
|
+
var widgets = JSON.parse(doc.querySelector('pre').textContent);
|
|
297
|
+
selects.forEach(function(select) {
|
|
298
|
+
var currentValue = select.dataset.currentValue;
|
|
299
|
+
widgets.forEach(function(widget) {
|
|
300
|
+
var option = document.createElement('option');
|
|
301
|
+
option.value = widget[0];
|
|
302
|
+
option.textContent = widget[1];
|
|
303
|
+
if (widget[0] === currentValue) option.selected = true;
|
|
304
|
+
select.appendChild(option);
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
})
|
|
308
|
+
.catch(function(err) { console.error('[initWidgetFilter] failed:', err); });
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
initWidgetFilter();
|
|
312
|
+
</script>
|
|
313
|
+
|
|
284
314
|
<script>
|
|
285
315
|
const forms = document.querySelectorAll('form');
|
|
286
316
|
|
|
@@ -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,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}/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, slash and dash allowed. E.g: celebrate/friday-13" }) %>
|
|
5
5
|
<%- f.field('resource.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<div class="btn-toolbar">
|
|
11
11
|
<%- f.submit('Save', { class: 'btn-primary' }) %>
|
|
12
12
|
<%- f.submit('Save and publish', { class: 'btn-secondary', name: '_next', value: 'publish' }) %>
|
|
13
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
13
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.originalId}` %>" class="btn-text">Back</a>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
</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,5 +1,5 @@
|
|
|
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 }) %>
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
<div class="btn-toolbar">
|
|
28
28
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
29
29
|
|
|
30
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
30
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}` %>" class="btn-secondary">Back to list</a>
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
33
|
<% if (resource?.id) {%>
|
|
34
|
-
<button hx-delete="<%= `/${_context.locale}/${_context.resourceConfig.
|
|
34
|
+
<button hx-delete="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}` %>" hx-confirm="Are you sure?" class="btn-danger has-icon">
|
|
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="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" />
|
|
37
37
|
</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>
|