@raketa-cloud/admin 1.8.6 → 1.8.8
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 +0 -4
- package/package.json +1 -1
- package/src/HonoAdapter.js +9 -22
- package/src/index.js +0 -3
- package/src/routeCategoriesModule.js +1 -1
- package/src/routeCollection.js +15 -8
- package/src/routeNestedCollection.js +1 -1
- package/src/routeNestedMember.js +1 -1
- package/src/routeResource.js +19 -21
- package/src/routeStandard.js +6 -6
- package/src/tests/HonoAdapter.coverage.test.js +15 -25
- package/src/tests/routeCategoriesModule.test.js +2 -2
- package/src/tests/routeResource.test.js +12 -37
- package/src/tests/routeStandard.test.js +13 -13
- package/src/views/_shared/_date_fields_input.ejs +13 -0
- package/src/views/{page_revisions → resource_revisions}/general/_form.ejs +1 -0
- package/src/views/{pages → resources}/_form.ejs +1 -0
- package/src/views/{pages → resources}/history/index.ejs +1 -1
- package/src/views/{articles → resources}/index.ejs +6 -0
- package/src/views/{pages → resources}/show.ejs +7 -7
- package/src/views/{articles → resources}/translations/create_form.ejs +2 -2
- package/src/routeArticlesModule.js +0 -15
- package/src/routeEventsModule.js +0 -15
- package/src/routePagesModule.js +0 -15
- package/src/tests/routeArticlesModule.test.js +0 -43
- package/src/tests/routeEventsModule.test.js +0 -43
- package/src/tests/routePagesModule.test.js +0 -43
- package/src/views/article_revisions/_nav.ejs +0 -53
- package/src/views/article_revisions/general/_form.ejs +0 -18
- package/src/views/article_revisions/tags/edit_form.ejs +0 -16
- package/src/views/articles/_form.ejs +0 -45
- package/src/views/articles/_shared/history_table.ejs +0 -74
- package/src/views/articles/deletes/create_form.ejs +0 -68
- package/src/views/articles/history/index.ejs +0 -80
- package/src/views/articles/show.ejs +0 -222
- package/src/views/articles/urls/create_form.ejs +0 -36
- package/src/views/event_revisions/codes/_form.ejs +0 -14
- package/src/views/event_revisions/codes/edit_form.ejs +0 -16
- package/src/views/event_revisions/general/_form.ejs +0 -20
- package/src/views/event_revisions/general/edit_form.ejs +0 -16
- package/src/views/event_revisions/locks/_form.ejs +0 -11
- package/src/views/event_revisions/locks/create_form.ejs +0 -27
- package/src/views/event_revisions/meta/_form.ejs +0 -16
- package/src/views/event_revisions/meta/edit_form.ejs +0 -16
- package/src/views/event_revisions/publishes/_form.ejs +0 -77
- package/src/views/event_revisions/publishes/create_form.ejs +0 -9
- package/src/views/event_revisions/tags/_form.ejs +0 -13
- package/src/views/event_revisions/tags/edit_form.ejs +0 -16
- package/src/views/event_revisions/visuals/_form.ejs +0 -13
- package/src/views/event_revisions/visuals/edit_form.ejs +0 -16
- package/src/views/events/_form.ejs +0 -47
- package/src/views/events/_shared/_addons.ejs +0 -0
- package/src/views/events/_shared/_export_button.ejs +0 -9
- package/src/views/events/_shared/_history_toolbar.ejs +0 -24
- package/src/views/events/_shared/_revision_operator.ejs +0 -8
- package/src/views/events/_shared/_revision_toolbar.ejs +0 -68
- package/src/views/events/_shared/_title.ejs +0 -14
- package/src/views/events/_shared/_toolbar.ejs +0 -45
- package/src/views/events/_shared/history_table.ejs +0 -74
- package/src/views/events/create_form.ejs +0 -9
- package/src/views/events/deletes/create_form.ejs +0 -68
- package/src/views/events/history/index.ejs +0 -80
- package/src/views/events/index.ejs +0 -190
- package/src/views/events/show.ejs +0 -222
- package/src/views/events/translations/_translation_toolbar.ejs +0 -18
- package/src/views/events/translations/create_form.ejs +0 -75
- package/src/views/events/translations/index.ejs +0 -39
- package/src/views/events/urls/create_form.ejs +0 -36
- package/src/views/page_revisions/_nav.ejs +0 -53
- package/src/views/page_revisions/codes/_form.ejs +0 -14
- package/src/views/page_revisions/codes/edit_form.ejs +0 -16
- package/src/views/page_revisions/general/edit_form.ejs +0 -16
- package/src/views/page_revisions/locks/_form.ejs +0 -11
- package/src/views/page_revisions/locks/create_form.ejs +0 -27
- package/src/views/page_revisions/meta/_form.ejs +0 -16
- package/src/views/page_revisions/meta/edit_form.ejs +0 -16
- package/src/views/page_revisions/publishes/_form.ejs +0 -76
- package/src/views/page_revisions/publishes/create_form.ejs +0 -9
- package/src/views/page_revisions/tags/_form.ejs +0 -13
- package/src/views/page_revisions/visuals/_form.ejs +0 -13
- package/src/views/page_revisions/visuals/edit_form.ejs +0 -16
- package/src/views/pages/_shared/_addons.ejs +0 -0
- package/src/views/pages/_shared/_export_button.ejs +0 -9
- package/src/views/pages/_shared/_history_toolbar.ejs +0 -24
- package/src/views/pages/_shared/_revision_operator.ejs +0 -8
- package/src/views/pages/_shared/_revision_toolbar.ejs +0 -68
- package/src/views/pages/_shared/_title.ejs +0 -14
- package/src/views/pages/_shared/_toolbar.ejs +0 -45
- package/src/views/pages/create_form.ejs +0 -9
- package/src/views/pages/index.ejs +0 -185
- package/src/views/pages/translations/_translation_toolbar.ejs +0 -18
- package/src/views/pages/translations/create_form.ejs +0 -75
- package/src/views/pages/translations/index.ejs +0 -39
- /package/src/views/{event_revisions → resource_revisions}/_nav.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/codes/_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/codes/edit_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/general/edit_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/locks/_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/locks/create_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/meta/_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/meta/edit_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/publishes/_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/publishes/create_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/tags/_form.ejs +0 -0
- /package/src/views/{page_revisions → resource_revisions}/tags/edit_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/visuals/_form.ejs +0 -0
- /package/src/views/{article_revisions → resource_revisions}/visuals/edit_form.ejs +0 -0
- /package/src/views/{articles → resources}/_shared/_addons.ejs +0 -0
- /package/src/views/{articles → resources}/_shared/_export_button.ejs +0 -0
- /package/src/views/{articles → resources}/_shared/_history_toolbar.ejs +0 -0
- /package/src/views/{articles → resources}/_shared/_revision_operator.ejs +0 -0
- /package/src/views/{articles → resources}/_shared/_revision_toolbar.ejs +0 -0
- /package/src/views/{articles → resources}/_shared/_title.ejs +0 -0
- /package/src/views/{articles → resources}/_shared/_toolbar.ejs +0 -0
- /package/src/views/{pages → resources}/_shared/history_table.ejs +0 -0
- /package/src/views/{articles → resources}/create_form.ejs +0 -0
- /package/src/views/{pages → resources}/deletes/create_form.ejs +0 -0
- /package/src/views/{articles → resources}/translations/_translation_toolbar.ejs +0 -0
- /package/src/views/{articles → resources}/translations/index.ejs +0 -0
- /package/src/views/{pages → resources}/urls/create_form.ejs +0 -0
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<div class="actions-toolbar justify-end">
|
|
2
|
-
<form method="POST" action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/${_context.resourceConfig.resourceType}_changes/reverts` %>" class="inline-block">
|
|
3
|
-
<input type="hidden" name="version" value="<%= change.version %>">
|
|
4
|
-
|
|
5
|
-
<% if (history.isChangeRevertable(change, maxVersion) && !(resource.revisionsCount >= _context.maxOpenRevisions)) { %>
|
|
6
|
-
<button type="submit" class="btn-text">
|
|
7
|
-
Revert
|
|
8
|
-
</button>
|
|
9
|
-
<% } else { %>
|
|
10
|
-
<button type="submit" disabled class="btn-text opacity-50 cursor-not-allowed">
|
|
11
|
-
Revert
|
|
12
|
-
</button>
|
|
13
|
-
<% } %>
|
|
14
|
-
</form>
|
|
15
|
-
|
|
16
|
-
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.resourceTypePlural %>/<%= resource.id %>/changes/<%= change.version %>" class="btn-text has-icon">
|
|
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
|
-
<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
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
20
|
-
</svg>
|
|
21
|
-
|
|
22
|
-
Preview
|
|
23
|
-
</a>
|
|
24
|
-
</div>
|
|
@@ -1,8 +0,0 @@
|
|
|
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,68 +0,0 @@
|
|
|
1
|
-
<div class="actions-toolbar justify-end">
|
|
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
|
-
<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
|
-
<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
|
-
</svg>
|
|
6
|
-
Edit content
|
|
7
|
-
</a>
|
|
8
|
-
|
|
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
|
-
<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
|
-
<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
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
13
|
-
</svg>
|
|
14
|
-
|
|
15
|
-
Edit settings
|
|
16
|
-
</a>
|
|
17
|
-
|
|
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
|
-
<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
|
-
<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
|
-
</svg>
|
|
22
|
-
|
|
23
|
-
Publish
|
|
24
|
-
</a>
|
|
25
|
-
|
|
26
|
-
<details class="unstyled-details">
|
|
27
|
-
<summary class="cursor-pointer">
|
|
28
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
|
|
29
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z" />
|
|
30
|
-
</svg>
|
|
31
|
-
</summary>
|
|
32
|
-
|
|
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.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
|
-
<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
|
-
<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
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
38
|
-
</svg>
|
|
39
|
-
|
|
40
|
-
Preview
|
|
41
|
-
</a>
|
|
42
|
-
|
|
43
|
-
<% if (revision.meta && revision.meta.locked) { %>
|
|
44
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${revision.id}/unlocks` %>" method="post" class="inline-flex gap-2 items-center">
|
|
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
|
-
<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
|
-
</svg>
|
|
48
|
-
<%- f.submit('Unlock', { class: 'btn-text' }) %>
|
|
49
|
-
</form>
|
|
50
|
-
<% } else { %>
|
|
51
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceType}_revisions/${revision.id}/locks/new` %>" class="btn-text has-icon">
|
|
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
|
-
<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
|
-
</svg>
|
|
55
|
-
Lock
|
|
56
|
-
</a>
|
|
57
|
-
<% } %>
|
|
58
|
-
|
|
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
|
-
<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
|
-
<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
|
-
</svg>
|
|
63
|
-
|
|
64
|
-
Delete
|
|
65
|
-
</button>
|
|
66
|
-
</div>
|
|
67
|
-
</details>
|
|
68
|
-
</div>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<div class="flex flex-col pb-4">
|
|
2
|
-
<h1 class="heading-1 flex items-center gap-2">
|
|
3
|
-
<%= resource.title %>
|
|
4
|
-
|
|
5
|
-
<% if (resource.visibility !== "private") { %>
|
|
6
|
-
<a href="<%= _context.remoteConfig.resourceUrl(resource, _context.resourceConfig.resourceType, _context.locale) %>" target="_blank">
|
|
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
|
-
<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
|
-
</svg>
|
|
10
|
-
</a>
|
|
11
|
-
<% } %>
|
|
12
|
-
</h1>
|
|
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
|
-
</div>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<div>
|
|
2
|
-
<div class="actions-toolbar">
|
|
3
|
-
<form method="POST" action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/${_context.resourceConfig.resourceType}_revisions` %>" class="inline-block">
|
|
4
|
-
<% if (resource.revisionsCount >= _context?.maxOpenRevisions) { %>
|
|
5
|
-
<button type="submit" class="btn-primary" disabled style="opacity: 50%;">
|
|
6
|
-
Start revision
|
|
7
|
-
</button>
|
|
8
|
-
<% } else {%>
|
|
9
|
-
<button type="submit" class="btn-primary">
|
|
10
|
-
Start revision
|
|
11
|
-
</button>
|
|
12
|
-
<% } %>
|
|
13
|
-
</form>
|
|
14
|
-
|
|
15
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/urls/new` %>" class="btn-text has-icon">
|
|
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
|
-
<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
|
-
</svg>
|
|
19
|
-
|
|
20
|
-
Change URL
|
|
21
|
-
</a>
|
|
22
|
-
|
|
23
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/clones` %>" method="post" class="inline-block">
|
|
24
|
-
<button type="submit" class="btn-text has-icon">
|
|
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
|
-
<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
|
-
</svg>
|
|
28
|
-
|
|
29
|
-
Clone <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.resourceType)) %>
|
|
30
|
-
</button>
|
|
31
|
-
</form>
|
|
32
|
-
|
|
33
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/deletes/new` %>" class="btn-danger has-icon">
|
|
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
|
-
<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
|
-
</svg>
|
|
37
|
-
|
|
38
|
-
Delete <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.resourceType)) %>
|
|
39
|
-
</a>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<% if (_context.query?.revisions_count_error) { %>
|
|
43
|
-
<div class="text-red-600">Cannot open a new revision. Current limit is <%= _context.maxOpenRevisions %>. </div>
|
|
44
|
-
<% } %>
|
|
45
|
-
</div>
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<% if (changes && changes.list.length > 0) { %>
|
|
2
|
-
<% const maxVersion = history.getMaxVersion(changes); %>
|
|
3
|
-
|
|
4
|
-
<div class="history-table-wrapper mb-4">
|
|
5
|
-
<table class="data-grid">
|
|
6
|
-
<thead>
|
|
7
|
-
<tr>
|
|
8
|
-
<th>#</th>
|
|
9
|
-
<th>Date of change</th>
|
|
10
|
-
<th>Editor</th>
|
|
11
|
-
<th>Action</th>
|
|
12
|
-
<th>Reason</th>
|
|
13
|
-
<th> </th>
|
|
14
|
-
</tr>
|
|
15
|
-
</thead>
|
|
16
|
-
|
|
17
|
-
<tbody>
|
|
18
|
-
<% changes.list.forEach((change)=> { %>
|
|
19
|
-
<tr class="border-b border-mono-25">
|
|
20
|
-
<td class="py-4 pl-2">
|
|
21
|
-
<div class="flex items-center gap-2">
|
|
22
|
-
<%= change.version %>
|
|
23
|
-
</div>
|
|
24
|
-
</td>
|
|
25
|
-
|
|
26
|
-
<td class="whitespace-nowrap">
|
|
27
|
-
<div class="body-3 text-raketa-foreground/50">
|
|
28
|
-
<div class="flex items-center gap-1">
|
|
29
|
-
<time data-pretty-datetime datetime="<%= change.insertedAt %>"><%= utils.formattedDateTime(change.insertedAt) %></time>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</td>
|
|
33
|
-
|
|
34
|
-
<td class="whitespace-nowrap">
|
|
35
|
-
<div class="body-3 text-raketa-foreground/50">
|
|
36
|
-
<div class="flex items-center gap-1" title="<%= change.operatorMeta.name %>">
|
|
37
|
-
<% if (change.operatorMeta.avatar) { %>
|
|
38
|
-
<img src="<%= change.operatorMeta.avatar %>" class="size-4 rounded-full">
|
|
39
|
-
<% } %>
|
|
40
|
-
|
|
41
|
-
<%= change.operatorMeta.name %>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</td>
|
|
45
|
-
|
|
46
|
-
<td class="py-4 pl-2">
|
|
47
|
-
<div class="flex items-center gap-2">
|
|
48
|
-
<%= history.changeAction(change, _context.resourceConfig.resourceType) %>
|
|
49
|
-
</div>
|
|
50
|
-
</td>
|
|
51
|
-
|
|
52
|
-
<td class="py-4 pl-2">
|
|
53
|
-
<div class="flex items-center gap-2">
|
|
54
|
-
<%= history.changeReason(change) %>
|
|
55
|
-
</div>
|
|
56
|
-
</td>
|
|
57
|
-
|
|
58
|
-
<td>
|
|
59
|
-
<%- render_partial(toolbarPath, { maxVersion, change }) %>
|
|
60
|
-
</td>
|
|
61
|
-
</tr>
|
|
62
|
-
<% }); %>
|
|
63
|
-
</tbody>
|
|
64
|
-
</table>
|
|
65
|
-
|
|
66
|
-
<% if (!skipPagination) { %>
|
|
67
|
-
<%- pagination(changes.pagination, _context) %>
|
|
68
|
-
<% } %>
|
|
69
|
-
</div>
|
|
70
|
-
<% } else { %>
|
|
71
|
-
<div class="history-table-wrapper mb-4">
|
|
72
|
-
<p class="text-center py-4">No changes, yet.</p>
|
|
73
|
-
</div>
|
|
74
|
-
<% } %>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<div class="page-wrapper">
|
|
2
|
-
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">Create <%= Inflector.humanize(Inflector.downcase(_context.resourceConfig.resourceType)) %></h1>
|
|
4
|
-
</div>
|
|
5
|
-
|
|
6
|
-
<div class="grid gap-4 md:grid-cols-3">
|
|
7
|
-
<%- render_partial('_form.ejs') %>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<div class="page-wrapper">
|
|
2
|
-
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
4
|
-
<span class="opacity-50">Delete / </span>
|
|
5
|
-
<%= record.title %>
|
|
6
|
-
</h1>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<div class="grid gap-4 md:grid-cols-3">
|
|
10
|
-
<div>
|
|
11
|
-
<% form_for({ resource }, errors, (f) => { %>
|
|
12
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/deletes` %>" method="POST" class="form">
|
|
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
|
-
<%- f.field('resource.destination', {label: 'Destination URL', required: true}) %>
|
|
15
|
-
|
|
16
|
-
<div class="form-actions">
|
|
17
|
-
<div class="btn-toolbar">
|
|
18
|
-
<%- f.submit('Proceed', { class: 'btn-primary' }) %>
|
|
19
|
-
<a href="<%=`/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}`%>" class="btn-secondary">Back</a>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</form>
|
|
23
|
-
<% }) %>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div>
|
|
27
|
-
<div class="help">
|
|
28
|
-
<div class="mb-2 flex items-center gap-1">
|
|
29
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
30
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" />
|
|
31
|
-
</svg>
|
|
32
|
-
|
|
33
|
-
<h3 class="heading-3">How to safely retire a page?</h3>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<div class="markdown">
|
|
37
|
-
<p>Warning: Deleting a page can break existing links. To mitigate this, choose one of these options:</p>
|
|
38
|
-
|
|
39
|
-
<ol>
|
|
40
|
-
<li>Create a redirect to another page</li>
|
|
41
|
-
<li>Set a 410 response to signal Google to remove the page from its index</li>
|
|
42
|
-
<li>Use a 404 response only if absolutely certain</li>
|
|
43
|
-
</ol>
|
|
44
|
-
|
|
45
|
-
<p>In all cases, the current content will be deleted and forgotten like tears in rain — a moment lost in time. You might also consider changing the visibility of the page to private, which will preserve the content but hide it from end users.</p>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<script>
|
|
53
|
-
function onDestinationChange(event) {
|
|
54
|
-
const newValue = event.target.value;
|
|
55
|
-
const requiresRedirect = newValue === "301"
|
|
56
|
-
|
|
57
|
-
document.getElementById("f_resource_destination").parentElement.style.display = requiresRedirect ? "block" : "none";
|
|
58
|
-
document.getElementById("f_resource_destination").required = requiresRedirect;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
onDestinationChange({
|
|
62
|
-
target: {
|
|
63
|
-
value: '<%= resource.redirect %>'
|
|
64
|
-
}
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
document.getElementById("f_resource_redirect").addEventListener("change", onDestinationChange)
|
|
68
|
-
</script>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<div class="page-wrapper">
|
|
2
|
-
<div class="page-title">
|
|
3
|
-
<div>
|
|
4
|
-
<h1 class="heading-1">Events / History of changes</h1>
|
|
5
|
-
<span class="body-2 opacity-50"><%= %></span>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<div class="actions-toolbar">
|
|
9
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}` %>" class="btn-text">Back</a>
|
|
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
|
-
<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
|
-
<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" />
|
|
13
|
-
</svg>
|
|
14
|
-
</button>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<%- render_partial('../_shared/history_table.ejs', {
|
|
19
|
-
changes,
|
|
20
|
-
resource,
|
|
21
|
-
_context,
|
|
22
|
-
render_partial,
|
|
23
|
-
skipPagination: false,
|
|
24
|
-
toolbarPath: '../_shared/_history_toolbar.ejs'
|
|
25
|
-
}) %>
|
|
26
|
-
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<div data-sidebar="1" class="search-sidebar <%= Object.keys(_context.query).some(k => k.startsWith('f:')) ? '' : 'hidden' %>">
|
|
30
|
-
<span class="heading-2">Search by</span>
|
|
31
|
-
|
|
32
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/history` %>" method="GET" class="form mt-4">
|
|
33
|
-
<input type="hidden" name="order_direction" value="<%= _context.query.order_direction %>" />
|
|
34
|
-
<input type="hidden" name="order_by" value="<%= _context.query.order_by %>" />
|
|
35
|
-
|
|
36
|
-
<div class="mb-4">
|
|
37
|
-
<label for="date_from" class="font-semibold hover:cursor-pointer body-3">From</label>
|
|
38
|
-
<input type="date" name="f:date_from" value="<%= _context.query["f:date_from"] %>" />
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="mb-4">
|
|
42
|
-
<label for="date_to" class="font-semibold hover:cursor-pointer body-3">To</label>
|
|
43
|
-
<input type="date" name="f:date_to" value="<%= _context.query["f:date_to"] %>" />
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div class="mb-4">
|
|
47
|
-
<%- f.field('f:operator', {
|
|
48
|
-
as: 'select',
|
|
49
|
-
options: editors.map(editor => [editor.id, editor.name]),
|
|
50
|
-
label: "Editor",
|
|
51
|
-
include_blank: 'All Editors',
|
|
52
|
-
value: _context.query["f:operator"]
|
|
53
|
-
}) %>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<div class="mb-4">
|
|
57
|
-
<label for="" class="font-semibold hover:cursor-pointer body-3">Changes</label>
|
|
58
|
-
<div class="checkbox-group mb-4">
|
|
59
|
-
<% Object.entries(history.changeTypes(_context.resourceConfig.resourceType)).forEach(([key, {label}])=> { %>
|
|
60
|
-
<div class="flex items-center gap-1">
|
|
61
|
-
<% if (utils.includedInCollection(key, _context.query["f:change_type"])) { %>
|
|
62
|
-
<input type="checkbox" name="f:change_type" id='change-<%= key %>' checked value="<%= key %>" class="hover:cursor-pointer">
|
|
63
|
-
<% } else { %>
|
|
64
|
-
<input type="checkbox" name="f:change_type" id='change-<%= key %>' value="<%= key %>" class="hover:cursor-pointer">
|
|
65
|
-
<% } %>
|
|
66
|
-
<label for='change-<%= key %>' class="body-2 hover:cursor-pointer">
|
|
67
|
-
<%= label %>
|
|
68
|
-
</label>
|
|
69
|
-
</div>
|
|
70
|
-
<% }); %>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div class="btn-toolbar">
|
|
75
|
-
<button type="submit" class="btn-primary">Search</button>
|
|
76
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${resource.id}/history` %>" class="btn-text">Clear search</a>
|
|
77
|
-
</div>
|
|
78
|
-
</form>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
<div class="page-wrapper">
|
|
2
|
-
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1"><%= Inflector.humanize(Inflector.capitalize(_context.resourceConfig.resourceTypePlural)) %></h1>
|
|
4
|
-
|
|
5
|
-
<div class="actions-toolbar">
|
|
6
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/new` %>" class="btn-primary">
|
|
7
|
-
Create new
|
|
8
|
-
</a>
|
|
9
|
-
|
|
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
|
-
<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
|
-
<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" />
|
|
13
|
-
</svg>
|
|
14
|
-
</button>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<table class="data-grid">
|
|
19
|
-
<thead>
|
|
20
|
-
<tr>
|
|
21
|
-
<th><%- sort_button("Title", "title", _context) %></th>
|
|
22
|
-
<th>Visibility</th>
|
|
23
|
-
<th><%- sort_button(`${Inflector.capitalize(_context.resourceConfig.resourceType)} post date`, "publish_at", _context) %></th>
|
|
24
|
-
<th><%- sort_button("Last change", "updated_at", _context) %></th>
|
|
25
|
-
<th>Translations</th>
|
|
26
|
-
</tr>
|
|
27
|
-
</thead>
|
|
28
|
-
|
|
29
|
-
<tbody>
|
|
30
|
-
<% items.list.forEach((item, idx)=> { %>
|
|
31
|
-
<tr>
|
|
32
|
-
<td class="w-1/2">
|
|
33
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${item.id}` %>" class="btn-text mr-1">
|
|
34
|
-
<%= item.title %>
|
|
35
|
-
</a>
|
|
36
|
-
<% if (item.revisionsCount > 0) { %>
|
|
37
|
-
<span class="bg-orange-100 chip text-orange-700 dark:bg-orange-900/50 dark:text-orange-300"><%= item.revisionsCount !== 1 ? `${item.revisionsCount} open revisions` : 'Open revision' %></span>
|
|
38
|
-
<% } %>
|
|
39
|
-
|
|
40
|
-
<% if (item.visibility !== "private") { %>
|
|
41
|
-
<div class="mt-1">
|
|
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
|
-
</a>
|
|
45
|
-
</div>
|
|
46
|
-
<% } %>
|
|
47
|
-
</td>
|
|
48
|
-
|
|
49
|
-
<td>
|
|
50
|
-
<div class="flex items-center gap-1 whitespace-nowrap">
|
|
51
|
-
<span class="text-raketa-foreground/30" title="<%= visibilityOptions.find(opt => opt[0] === item.visibility)[1] %>">
|
|
52
|
-
<% if (item.visibility === 'public') { %>
|
|
53
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
54
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418" />
|
|
55
|
-
</svg>
|
|
56
|
-
|
|
57
|
-
<% } %>
|
|
58
|
-
<% if (item.visibility === 'private') { %>
|
|
59
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="size-4">
|
|
60
|
-
<path d="M8.5 4.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM10.9 12.006c.11.542-.348.994-.9.994H2c-.553 0-1.01-.452-.902-.994a5.002 5.002 0 0 1 9.803 0ZM14.002 12h-1.59a2.556 2.556 0 0 0-.04-.29 6.476 6.476 0 0 0-1.167-2.603 3.002 3.002 0 0 1 3.633 1.911c.18.522-.283.982-.836.982ZM12 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" />
|
|
61
|
-
</svg>
|
|
62
|
-
<% } %>
|
|
63
|
-
<% if (item.visibility === 'unlisted') { %>
|
|
64
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="size-4">
|
|
65
|
-
<path fill-rule="evenodd" d="M3.28 2.22a.75.75 0 0 0-1.06 1.06l10.5 10.5a.75.75 0 1 0 1.06-1.06l-1.322-1.323a7.012 7.012 0 0 0 2.16-3.11.87.87 0 0 0 0-.567A7.003 7.003 0 0 0 4.82 3.76l-1.54-1.54Zm3.196 3.195 1.135 1.136A1.502 1.502 0 0 1 9.45 8.389l1.136 1.135a3 3 0 0 0-4.109-4.109Z" clip-rule="evenodd" />
|
|
66
|
-
<path d="m7.812 10.994 1.816 1.816A7.003 7.003 0 0 1 1.38 8.28a.87.87 0 0 1 0-.566 6.985 6.985 0 0 1 1.113-2.039l2.513 2.513a3 3 0 0 0 2.806 2.806Z" />
|
|
67
|
-
</svg>
|
|
68
|
-
<% } %>
|
|
69
|
-
<% if (item.visibility === 'protected') { %>
|
|
70
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="size-4">
|
|
71
|
-
<path fill-rule="evenodd" d="M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z" clip-rule="evenodd" />
|
|
72
|
-
</svg>
|
|
73
|
-
<% } %>
|
|
74
|
-
</span>
|
|
75
|
-
|
|
76
|
-
<%= visibilityOptions.find(opt => opt[0] === item.visibility)[1] %>
|
|
77
|
-
</div>
|
|
78
|
-
</td>
|
|
79
|
-
|
|
80
|
-
<td>
|
|
81
|
-
<time data-pretty-date datetime="<%= item.settings.publish_at %>"><%= utils.formattedDate(item.settings.publish_at) %></time>
|
|
82
|
-
</td>
|
|
83
|
-
|
|
84
|
-
<td>
|
|
85
|
-
<div class="body-3 text-raketa-foreground/50">
|
|
86
|
-
<div class="flex items-center gap-1 mb-0.5">
|
|
87
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4 text-raketa-foreground">
|
|
88
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
|
|
89
|
-
</svg>
|
|
90
|
-
<time data-pretty-datetime datetime="<%= item.updatedAt %>"><%= utils.formattedDateTime(item.updatedAt) %></time>
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<div class="flex items-center gap-1" title="<%= item.changes[0]?.operatorMeta?.name %>">
|
|
94
|
-
<% if (item.changes[0]?.operatorMeta?.avatar) { %>
|
|
95
|
-
<img src="<%= item.changes[0]?.operatorMeta?.avatar %>" class="size-4 rounded-full" alt="<%= item.changes[0]?.operatorMeta?.name %>">
|
|
96
|
-
<% } else { %>
|
|
97
|
-
<div class="size-4 rounded-full"></div>
|
|
98
|
-
<% } %>
|
|
99
|
-
<%= item.changes[0]?.operatorMeta?.name %>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
</td>
|
|
103
|
-
|
|
104
|
-
<td>
|
|
105
|
-
<div class="flex flex-wrap items-center gap-1">
|
|
106
|
-
<% Object.keys(_context.locales).forEach(key => { %>
|
|
107
|
-
<% const { name, _code, flag} = _context.locales[key] %>
|
|
108
|
-
<% if (key === _context.locale) { %>
|
|
109
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
110
|
-
<% } else if (item.translations[key]) { %>
|
|
111
|
-
<a href="<%= `/${key}/${_context.resourceConfig.resourceTypePlural}/${item.translations[key].id}` %>">
|
|
112
|
-
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
113
|
-
</a>
|
|
114
|
-
<% } else { %>
|
|
115
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}/${item.id}/translations/new?target_locale=${key}` %>">
|
|
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
|
-
</a>
|
|
118
|
-
<% } %>
|
|
119
|
-
<% }); %>
|
|
120
|
-
</div>
|
|
121
|
-
</td>
|
|
122
|
-
</tr>
|
|
123
|
-
<% }); %>
|
|
124
|
-
</tbody>
|
|
125
|
-
</table>
|
|
126
|
-
|
|
127
|
-
<%- pagination(items.pagination, _context) %>
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
<div data-sidebar="1" class="search-sidebar <%= Object.keys(_context.query).some(k => k.startsWith('f:')) ? '' : 'hidden' %>">
|
|
131
|
-
<span class="heading-2">Search by</span>
|
|
132
|
-
|
|
133
|
-
<form action="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}` %>" method="GET" class="form mt-4">
|
|
134
|
-
<input type="hidden" name="order_direction" value="<%= _context.query.order_direction %>" />
|
|
135
|
-
<input type="hidden" name="order_by" value="<%= _context.query.order_by %>" />
|
|
136
|
-
|
|
137
|
-
<div class="mb-4">
|
|
138
|
-
<label for="keyword" class="font-semibold hover:cursor-pointer body-3">Keyword</label>
|
|
139
|
-
<input type="text" name="f:keyword" value="<%= _context.query["f:keyword"] %>" />
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<%- include('./../_shared/_visibility_search_input.ejs') %>
|
|
143
|
-
|
|
144
|
-
<div class="mb-4">
|
|
145
|
-
<label for="widget" class="font-semibold hover:cursor-pointer body-3">Widget</label>
|
|
146
|
-
<select name="f:widget" data-widget-filter data-current-value="<%= _context.query['f:widget'] || '' %>">
|
|
147
|
-
<option value="">All widgets</option>
|
|
148
|
-
</select>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
<div class="mb-4">
|
|
152
|
-
<label for="widget_keyword" class="font-semibold hover:cursor-pointer body-3">Widget text keyword</label>
|
|
153
|
-
<input type="text" name="f:widget_keyword" value="<%= _context.query["f:widget_keyword"] %>" />
|
|
154
|
-
</div>
|
|
155
|
-
|
|
156
|
-
<div class="mb-4">
|
|
157
|
-
<label for="last_updated_from" class="font-semibold hover:cursor-pointer body-3">Last Updated from</label>
|
|
158
|
-
<input type="datetime-local" name="f:last_updated_from" value="<%= _context.query["f:last_updated_from"] %>" />
|
|
159
|
-
</div>
|
|
160
|
-
|
|
161
|
-
<div class="mb-4">
|
|
162
|
-
<label for="last_updated_to" class="font-semibold hover:cursor-pointer body-3">Last Updated to</label>
|
|
163
|
-
<input type="datetime-local" name="f:last_updated_to" value="<%= _context.query["f:last_updated_to"] %>" />
|
|
164
|
-
</div>
|
|
165
|
-
|
|
166
|
-
<%- include('./../_shared/_translations_search_input.ejs') %>
|
|
167
|
-
|
|
168
|
-
<div class="mb-4">
|
|
169
|
-
<label for="" class="font-semibold hover:cursor-pointer body-3">Tags</label>
|
|
170
|
-
<div class="checkbox-group mb-4">
|
|
171
|
-
<% tags.forEach((item,idx)=> { %>
|
|
172
|
-
<div class="flex items-center gap-1">
|
|
173
|
-
<% if (utils.includedInCollection(item.id, _context.query["f:tags"])) { %>
|
|
174
|
-
<input type="checkbox" name="f:tags" id='tag-<%= item.id %>' checked value="<%= item.id %>" class="hover:cursor-pointer">
|
|
175
|
-
<% } else { %>
|
|
176
|
-
<input type="checkbox" name="f:tags" id='tag-<%= item.id %>' value="<%= item.id %>" class="hover:cursor-pointer">
|
|
177
|
-
<% } %>
|
|
178
|
-
<label for='tag-<%= item.id %>' class="body-2 hover:cursor-pointer"><%= item.name %></label>
|
|
179
|
-
</div>
|
|
180
|
-
<% }); %>
|
|
181
|
-
</div>
|
|
182
|
-
</div>
|
|
183
|
-
|
|
184
|
-
<div class="btn-toolbar">
|
|
185
|
-
<button type="submit" class="btn-primary">Search</button>
|
|
186
|
-
<%- include('./_shared/_export_button.ejs') %>
|
|
187
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.resourceTypePlural}` %>" class="btn-text">Clear search</a>
|
|
188
|
-
</div>
|
|
189
|
-
</form>
|
|
190
|
-
</div>
|