@raketa-cloud/admin 0.0.24 → 0.0.25
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/package.json +1 -1
- package/src/Adapter.js +16 -5
- package/src/HonoAdapter.js +3 -1
- package/src/routeArticlesModule.js +60 -69
- package/src/routeEventsModule.js +75 -69
- package/src/routePagesModule.js +59 -69
- package/src/views/article_revisions/_nav.ejs +5 -5
- package/src/views/article_revisions/codes/edit_form.ejs +2 -2
- package/src/views/article_revisions/general/edit_form.ejs +2 -3
- package/src/views/article_revisions/locks/create_form.ejs +2 -2
- package/src/views/article_revisions/meta/edit_form.ejs +2 -2
- package/src/views/article_revisions/publishes/_form.ejs +2 -2
- package/src/views/article_revisions/tags/edit_form.ejs +2 -28
- package/src/views/article_revisions/visuals/edit_form.ejs +2 -2
- package/src/views/articles/_form.ejs +4 -6
- package/src/views/articles/deletes/create_form.ejs +3 -3
- package/src/views/articles/index.ejs +7 -7
- package/src/views/articles/show.ejs +17 -17
- package/src/views/articles/translations/_form.ejs +2 -2
- package/src/views/articles/translations/create_form.ejs +1 -1
- package/src/views/articles/urls/create_form.ejs +2 -2
- package/src/views/event_revisions/_nav.ejs +5 -5
- package/src/views/event_revisions/codes/edit_form.ejs +2 -2
- package/src/views/event_revisions/general/edit_form.ejs +2 -3
- package/src/views/event_revisions/locks/create_form.ejs +2 -2
- package/src/views/event_revisions/meta/edit_form.ejs +2 -2
- package/src/views/event_revisions/publishes/_form.ejs +2 -2
- package/src/views/event_revisions/tags/edit_form.ejs +2 -28
- package/src/views/event_revisions/visuals/edit_form.ejs +2 -2
- package/src/views/events/_form.ejs +6 -8
- package/src/views/events/deletes/create_form.ejs +3 -3
- package/src/views/events/index.ejs +7 -7
- package/src/views/events/show.ejs +17 -17
- package/src/views/events/translations/_form.ejs +2 -3
- package/src/views/events/translations/create_form.ejs +1 -2
- package/src/views/events/urls/create_form.ejs +2 -2
- package/src/views/page_revisions/_nav.ejs +5 -5
- package/src/views/page_revisions/codes/edit_form.ejs +3 -3
- package/src/views/page_revisions/general/edit_form.ejs +3 -3
- package/src/views/page_revisions/locks/create_form.ejs +2 -2
- package/src/views/page_revisions/meta/edit_form.ejs +3 -3
- package/src/views/page_revisions/publishes/_form.ejs +2 -2
- package/src/views/page_revisions/tags/edit_form.ejs +2 -28
- package/src/views/page_revisions/visuals/edit_form.ejs +2 -2
- package/src/views/pages/_form.ejs +4 -8
- package/src/views/pages/deletes/create_form.ejs +3 -3
- package/src/views/pages/index.ejs +7 -7
- package/src/views/pages/show.ejs +17 -17
- package/src/views/pages/translations/_form.ejs +2 -2
- package/src/views/pages/translations/create_form.ejs +1 -1
- package/src/views/pages/urls/create_form.ejs +2 -2
- package/src/views/articles/edit_form.ejs +0 -3
- package/src/views/events/edit_form.ejs +0 -3
- package/src/views/pages/edit_form.ejs +0 -3
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= resource?.id ? `/${_context.locale}
|
|
2
|
+
<form action="<%= resource?.id ? `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}` : `/${_context.locale}/${_context.handlerOpts.eventTypePlural}` %>" method="post" class="form">
|
|
3
3
|
<%- f.field('resource.title', { required: true }) %>
|
|
4
4
|
<%- f.field('resource.slug', { label: "URL", required: true }) %>
|
|
5
|
-
<%- f.field('
|
|
6
|
-
<%- f.field('
|
|
7
|
-
<%- f.field('
|
|
8
|
-
|
|
5
|
+
<%- f.field('resource.publish_at', { required: true, type: 'datetime-local', label: 'Publish at (UTC)' }) %>
|
|
6
|
+
<%- f.field('resource.starts_at', { required: true, type: 'datetime-local', label: 'Starts at (UTC)' }) %>
|
|
7
|
+
<%- f.field('resource.ends_at', { required: true, type: 'datetime-local', label: 'Ends at (UTC)' }) %>
|
|
9
8
|
<%- f.field('resource.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
10
|
-
|
|
11
9
|
<%- f.field('resource.username', { required: true }) %>
|
|
12
10
|
<%- f.field('resource.password', { required: true }) %>
|
|
13
11
|
|
|
@@ -28,11 +26,11 @@
|
|
|
28
26
|
<div class="btn-toolbar">
|
|
29
27
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
30
28
|
|
|
31
|
-
<a href="<%= `/${_context.locale}
|
|
29
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}` %>" class="btn-secondary">Back to list</a>
|
|
32
30
|
</div>
|
|
33
31
|
|
|
34
32
|
<% if (resource?.id) {%>
|
|
35
|
-
<button hx-delete="<%= `/${_context.locale}
|
|
33
|
+
<button hx-delete="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}` %>" hx-confirm="Are you sure?" class="btn-danger has-icon">
|
|
36
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">
|
|
37
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" />
|
|
38
36
|
</svg>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">Delete an
|
|
3
|
+
<h1 class="heading-1">Delete an <%= _context.handlerOpts.eventType %></h1>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<div class="grid gap-4 md:grid-cols-3">
|
|
7
7
|
<div>
|
|
8
8
|
<% form_for({ deleteAction }, errors, (f) => { %>
|
|
9
|
-
<form action="<%= `/${_context.locale}
|
|
9
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${deleteAction.id}/deletes` %>" method="POST" class="form">
|
|
10
10
|
<%- f.field('deleteAction.redirect', { as: 'select', required: true,options: [['301', 'Redirect to another page'], ['404', 'Return 404'],['410', 'Return 410']] }) %>
|
|
11
11
|
<%- f.field('deleteAction.destination', {label: 'Destination URL', required: true}) %>
|
|
12
12
|
|
|
13
13
|
<div class="form-actions">
|
|
14
14
|
<div class="btn-toolbar">
|
|
15
15
|
<%- f.submit('Proceed', { class: 'btn-primary' }) %>
|
|
16
|
-
<a href="<%=`/${_context.locale}
|
|
16
|
+
<a href="<%=`/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${deleteAction.id}`%>" class="btn-secondary">Back</a>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
</form>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1"
|
|
3
|
+
<h1 class="heading-1"><%= _context.handlerOpts.eventTypePlural %></h1>
|
|
4
4
|
|
|
5
5
|
<div class="actions-toolbar">
|
|
6
|
-
<a href="<%= `/${_context.locale}/
|
|
6
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/new` %>" class="btn-primary">
|
|
7
7
|
Create new
|
|
8
8
|
</a>
|
|
9
9
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<% items.list.forEach((item, idx)=> { %>
|
|
30
30
|
<tr>
|
|
31
31
|
<td class="w-1/2">
|
|
32
|
-
<a href="<%= `/${_context.locale}
|
|
32
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${item.id}` %>" class="btn-text mr-1">
|
|
33
33
|
<%= item.title %>
|
|
34
34
|
</a>
|
|
35
35
|
<% if (item.revisionsCount > 0) { %>
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
<% if (key === _context.locale) { %>
|
|
99
99
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
100
100
|
<% } else if (item.translations[key]) { %>
|
|
101
|
-
<a href="<%= `/${key}
|
|
101
|
+
<a href="<%= `/${key}/${_context.handlerOpts.eventTypePlural}/${item.translations[key].id}` %>">
|
|
102
102
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
103
103
|
</a>
|
|
104
104
|
<% } else { %>
|
|
105
|
-
<a href="<%= `/${_context.locale}
|
|
105
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${item.id}/translations/new?target_locale=${key}` %>">
|
|
106
106
|
<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(" ") %>" />
|
|
107
107
|
</a>
|
|
108
108
|
<% } %>
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
<div data-sidebar="1" class="search-sidebar <%= Object.keys(_context.query).some(k => k.startsWith('f:')) ? '' : 'hidden' %>">
|
|
121
121
|
<span class="heading-2">Search by</span>
|
|
122
122
|
|
|
123
|
-
<form action="<%= `/${_context.locale}
|
|
123
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}` %>" method="GET" class="form mt-4">
|
|
124
124
|
<input type="hidden" name="order_direction" value="<%= _context.query.order_direction %>" />
|
|
125
125
|
<input type="hidden" name="order_by" value="<%= _context.query.order_by %>" />
|
|
126
126
|
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
|
|
148
148
|
<div class="btn-toolbar">
|
|
149
149
|
<button type="submit" class="btn-primary">Search</button>
|
|
150
|
-
<a href="<%= `/${_context.locale}
|
|
150
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}` %>" class="btn-text">Clear search</a>
|
|
151
151
|
</div>
|
|
152
152
|
</form>
|
|
153
153
|
</div>
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
<% if (key === _context.locale) { %>
|
|
9
9
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
10
10
|
<% } else if (resource.translations[key]) { %>
|
|
11
|
-
<a href="<%= `/${key}
|
|
11
|
+
<a href="<%= `/${key}/${_context.handlerOpts.eventTypePlural}/${resource.translations[key].id}` %>">
|
|
12
12
|
<img title="<%= name %>" src="<%= flag %>" alt="<%= name %>" class="size-6 rounded-full border dark:border-neutral-700" />
|
|
13
13
|
</a>
|
|
14
14
|
<% } else { %>
|
|
15
|
-
<a href="<%= `/${_context.locale}
|
|
15
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}/translations/new?target_locale=${key}` %>">
|
|
16
16
|
<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(" ") %>" />
|
|
17
17
|
</a>
|
|
18
18
|
<% } %>
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<div class="actions-toolbar">
|
|
24
|
-
<form method="POST" action="<%= `/${_context.locale}
|
|
24
|
+
<form method="POST" action="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}/${_context.handlerOpts.eventType}_revisions` %>" class="inline-block">
|
|
25
25
|
<button type="submit" class="btn-primary">
|
|
26
26
|
Start revision
|
|
27
27
|
</button>
|
|
28
28
|
</form>
|
|
29
29
|
|
|
30
|
-
<a href="<%= `/${_context.locale}
|
|
30
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}/urls/new` %>" class="btn-text has-icon">
|
|
31
31
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
32
32
|
<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" />
|
|
33
33
|
</svg>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
Change URL
|
|
36
36
|
</a>
|
|
37
37
|
|
|
38
|
-
<form action="<%= `/${_context.locale}
|
|
38
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}/clones` %>" method="post" class="inline-block">
|
|
39
39
|
<button type="submit" class="btn-text has-icon">
|
|
40
40
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
41
41
|
<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" />
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
</button>
|
|
46
46
|
</form>
|
|
47
47
|
|
|
48
|
-
<a href="<%= `/${_context.locale}
|
|
48
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}/deletes/new` %>" class="btn-danger has-icon">
|
|
49
49
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
50
50
|
<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" />
|
|
51
51
|
</svg>
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
</div>
|
|
90
90
|
<% } %>
|
|
91
91
|
|
|
92
|
-
<a href="/remote-login?redirect_to=/admin
|
|
92
|
+
<a href="/remote-login?redirect_to=/admin/<%= _context.handlerOpts.eventType %>-revisions/<%= revision.id %>/builder" target="_blank" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
93
93
|
<%= revision.title %>
|
|
94
94
|
</a>
|
|
95
95
|
</div>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
|
|
98
98
|
<td class="whitespace-nowrap">
|
|
99
99
|
<div class="body-3 text-raketa-foreground/50">
|
|
100
|
-
<div class="flex items-center gap-1" title="
|
|
100
|
+
<div class="flex items-center gap-1" title="<%= revision.meta.operatorMeta.name %>">
|
|
101
101
|
<img src="<%= revision.meta.operatorMeta.avatar %>" class="size-4 rounded-full">
|
|
102
102
|
<%= revision.meta.operatorMeta.name %>
|
|
103
103
|
</div>
|
|
@@ -118,14 +118,14 @@
|
|
|
118
118
|
|
|
119
119
|
<td class="whitespace-nowrap">
|
|
120
120
|
<div class="actions-toolbar justify-end">
|
|
121
|
-
<a href="/remote-login?redirect_to=/admin
|
|
121
|
+
<a href="/remote-login?redirect_to=/admin/<%= _context.handlerOpts.eventType %>-revisions/<%= revision.id %>/builder" target="_blank" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
122
122
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
123
123
|
<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" />
|
|
124
124
|
</svg>
|
|
125
125
|
Edit content
|
|
126
126
|
</a>
|
|
127
127
|
|
|
128
|
-
<a href="<%= `/${_context.locale}
|
|
128
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventType}_revisions/${revision.id}/publishes/new` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
129
129
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
130
130
|
<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" />
|
|
131
131
|
</svg>
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
</summary>
|
|
142
142
|
|
|
143
143
|
<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">
|
|
144
|
-
<a href="<%= `/${_context.locale}
|
|
144
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventType}_revisions/${revision.id}/general/edit` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
145
145
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
146
146
|
<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" />
|
|
147
147
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
Edit settings
|
|
151
151
|
</a>
|
|
152
152
|
|
|
153
|
-
<a href="/remote-login?redirect_to=/admin
|
|
153
|
+
<a href="/remote-login?redirect_to=/admin/<%= _context.handlerOpts.eventType %>-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' : '' %>">
|
|
154
154
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
155
155
|
<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" />
|
|
156
156
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
@@ -160,14 +160,14 @@
|
|
|
160
160
|
</a>
|
|
161
161
|
|
|
162
162
|
<% if (revision.meta && revision.meta.locked) { %>
|
|
163
|
-
<form action="<%= `/${_context.locale}
|
|
163
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.eventType}_revisions/${revision.id}/unlocks` %>" method="post" class="inline-flex gap-2 items-center">
|
|
164
164
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
165
165
|
<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" />
|
|
166
166
|
</svg>
|
|
167
167
|
<%- f.submit('Unlock', { class: 'btn-text' }) %>
|
|
168
168
|
</form>
|
|
169
169
|
<% } else { %>
|
|
170
|
-
<a href="<%= `/${_context.locale}
|
|
170
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventType}_revisions/${revision.id}/locks/new` %>" class="btn-text has-icon">
|
|
171
171
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
172
172
|
<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" />
|
|
173
173
|
</svg>
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
</a>
|
|
176
176
|
<% } %>
|
|
177
177
|
|
|
178
|
-
<button hx-delete="<%= `/${_context.locale}
|
|
178
|
+
<button hx-delete="<%= `/${_context.locale}/${_context.handlerOpts.eventType}_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' : '' %>">
|
|
179
179
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
180
180
|
<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" />
|
|
181
181
|
</svg>
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
|
|
242
242
|
<td class="whitespace-nowrap">
|
|
243
243
|
<div class="body-3 text-raketa-foreground/50">
|
|
244
|
-
<div class="flex items-center gap-1" title="
|
|
244
|
+
<div class="flex items-center gap-1" title="<%= change.operatorMeta.name %>">
|
|
245
245
|
<img src="<%= change.operatorMeta.avatar %>" class="size-4 rounded-full">
|
|
246
246
|
<%= change.operatorMeta.name %>
|
|
247
247
|
</div>
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
<td>
|
|
252
252
|
<div class="actions-toolbar justify-end">
|
|
253
253
|
<% if (maxVersion !== change.version) { %>
|
|
254
|
-
<form method="POST" action="<%= `/${_context.locale}
|
|
254
|
+
<form method="POST" action="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}/event_changes/reverts` %>" class="inline-block">
|
|
255
255
|
<input type="hidden" name="version" value=<%= change.version %>>
|
|
256
256
|
<button type="submit" class="btn-text has-icon">
|
|
257
257
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% form_for({ translation }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}/translations` %>" method="post" class="form">
|
|
3
3
|
<input type="hidden" name="target_locale" value="<%= targetLocale %>" />
|
|
4
4
|
|
|
5
5
|
<%- f.field('translation.title', { required: true }) %>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
<%- f.field('translation.starts_at', { required: true, type: 'datetime-local' }) %>
|
|
9
9
|
<%- f.field('translation.ends_at', { required: true, type: 'datetime-local' }) %>
|
|
10
10
|
<%- f.field('translation.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
11
|
-
|
|
12
11
|
<%- f.field('translation.username', { required: true }) %>
|
|
13
12
|
<%- f.field('translation.password', { required: true }) %>
|
|
14
13
|
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
<div class="btn-toolbar">
|
|
33
32
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
34
33
|
|
|
35
|
-
<a href="<%= `/${_context.locale}
|
|
34
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${resource.id}` %>" class="btn-secondary">Cancel</a>
|
|
36
35
|
</div>
|
|
37
36
|
</div>
|
|
38
37
|
</form>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">Create
|
|
3
|
+
<h1 class="heading-1">Create <%= _context.handlerOpts.eventType %> translation</h1>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<div class="grid gap-4 md:grid-cols-3">
|
|
7
7
|
<%- render_partial('events/translations/_form.ejs') %>
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
|
-
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
<div class="grid gap-4 md:grid-cols-3">
|
|
7
7
|
<% form_for({ change }, errors, (f) => { %>
|
|
8
|
-
<form action="<%= `/${_context.locale}
|
|
8
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${change.id}/urls` %>" method="post" class="form">
|
|
9
9
|
<%- f.field('change.slug', { label: "URL", required: true }) %>
|
|
10
10
|
<%- f.field('change.redirect', { as: "checkbox", value: "1", label: "Create 301 redirect for the old URL" }) %>
|
|
11
11
|
|
|
12
12
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
13
|
-
<a href="<%=`/${_context.locale}
|
|
13
|
+
<a href="<%=`/${_context.locale}/${_context.handlerOpts.eventTypePlural}/${change.id}`%>" class="btn-secondary">Back</a>
|
|
14
14
|
</form>
|
|
15
15
|
<% }) %>
|
|
16
16
|
|
|
@@ -7,31 +7,31 @@
|
|
|
7
7
|
<div class="flex items-center justify-between mb-4">
|
|
8
8
|
<div class="flex items-center border-b-2">
|
|
9
9
|
<div class=" <%= active === 'general' ? activeClass : inactiveClass %>">
|
|
10
|
-
<a href="<%= `/${_context.locale}
|
|
10
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${settings.id}/general/edit` %>" class="text-raketa-primary font-semibold">
|
|
11
11
|
General
|
|
12
12
|
</a>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<div class="<%= active === 'visuals' ? activeClass : inactiveClass %>">
|
|
16
|
-
<a href="<%= `/${_context.locale}
|
|
16
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${settings.id}/visuals/edit` %>" class="text-raketa-primary font-semibold">
|
|
17
17
|
Visuals
|
|
18
18
|
</a>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<div class="<%= active === 'codes' ? activeClass : inactiveClass %>">
|
|
22
|
-
<a href="<%= `/${_context.locale}
|
|
22
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${settings.id}/codes/edit` %>" class="text-raketa-primary font-semibold">
|
|
23
23
|
Code customizations
|
|
24
24
|
</a>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<div class="<%= active === 'meta' ? activeClass : inactiveClass %>">
|
|
28
|
-
<a href="<%= `/${_context.locale}
|
|
28
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${settings.id}/meta/edit` %>" class="text-raketa-primary font-semibold">
|
|
29
29
|
Open graph & meta tags
|
|
30
30
|
</a>
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
33
|
<div class="<%= active === 'tags' ? activeClass : inactiveClass %>">
|
|
34
|
-
<a href="<%= `/${_context.locale}
|
|
34
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${settings.id}/tags/edit` %>" class="text-raketa-primary font-semibold">
|
|
35
35
|
Content tags
|
|
36
36
|
</a>
|
|
37
37
|
</div>
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
<div class="grid gap-4 md:grid-cols-3">
|
|
9
9
|
<div>
|
|
10
10
|
<% form_for({ code_settings }, errors, (f) => { %>
|
|
11
|
-
<form action="<%= `/${_context.locale}
|
|
11
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${code_settings.id}/codes` %>" method="POST" class="form">
|
|
12
12
|
<%- f.field('code_settings.scripts', { as: 'textarea', }) %>
|
|
13
13
|
<%- f.field('code_settings.structured_data', { label: 'Structured data (JSON)', as: 'textarea', hint: 'Click here for a structured data verification tool' }) %>
|
|
14
14
|
|
|
15
15
|
<div class="form-actions">
|
|
16
16
|
<div class="btn-toolbar">
|
|
17
17
|
<%- f.submit('Save changes', { class: 'btn-primary' }) %>
|
|
18
|
-
<a href="<%= `/${_context.locale}
|
|
18
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${code_settings.originalId}` %>" class="btn-secondary">Back</a>
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
21
21
|
</form>
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
|
-
</div>
|
|
39
|
+
</div>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="grid gap-4 md:grid-cols-3">
|
|
9
9
|
<div>
|
|
10
10
|
<% form_for({ general_settings }, errors, (f) => { %>
|
|
11
|
-
<form action="<%= `/${_context.locale}
|
|
11
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${general_settings.id}/general` %>" method="POST" class="form">
|
|
12
12
|
<%- f.field('general_settings.title', { required: true }) %>
|
|
13
13
|
<%- f.field('general_settings.slug', { label: "URL", required: true }) %>
|
|
14
14
|
<%- f.field('general_settings.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<div class="form-actions">
|
|
20
20
|
<div class="btn-toolbar">
|
|
21
21
|
<%- f.submit('Save changes', { class: 'btn-primary' }) %>
|
|
22
|
-
<a href="<%= `/${_context.locale}
|
|
22
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${general_settings.originalId}` %>" class="btn-secondary">Back</a>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
</form>
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
})
|
|
67
67
|
|
|
68
68
|
document.getElementById("f_visibility").addEventListener("change", onVisibilityChange)
|
|
69
|
-
</script>
|
|
69
|
+
</script>
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
<div class="grid gap-4 md:grid-cols-3">
|
|
7
7
|
<div>
|
|
8
8
|
<% form_for({ lock_settings }, errors, (f) => { %>
|
|
9
|
-
<form action="<%= `/${_context.locale}
|
|
9
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${lock_settings.revision.id}/locks` %>" method="POST" class="form">
|
|
10
10
|
<%- f.field('lock_settings.message', { as: 'textarea', label: 'Lock Message', required: true }) %>
|
|
11
11
|
<div class="form-actions">
|
|
12
12
|
<div class="btn-toolbar">
|
|
13
13
|
<%- f.submit('Lock revision', { class: 'btn-primary' }) %>
|
|
14
|
-
<a href="<%= `/${_context.locale}
|
|
14
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${lock_settings.revision.originalId}` %>" class="btn-secondary">Cancel</a>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
</form>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="grid gap-4 md:grid-cols-3">
|
|
9
9
|
<div>
|
|
10
10
|
<% form_for({ meta_settings }, errors, (f) => { %>
|
|
11
|
-
<form action="<%= `/${_context.locale}
|
|
11
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${meta_settings.id}/meta` %>" method="POST" class="form">
|
|
12
12
|
<%- f.field('meta_settings.title', { required: true }) %>
|
|
13
13
|
<%- f.field('meta_settings.description', { as: 'textarea', required: true }) %>
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="form-actions">
|
|
18
18
|
<div class="btn-toolbar">
|
|
19
19
|
<%- f.submit('Save changes', { class: 'btn-primary' }) %>
|
|
20
|
-
<a href="<%= `/${_context.locale}
|
|
20
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${meta_settings.originalId}` %>" class="btn-secondary">Back</a>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
</form>
|
|
@@ -38,4 +38,4 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
41
|
-
</div>
|
|
41
|
+
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% form_for({ publishing }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= `/${_context.locale}
|
|
2
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${publishing.id}/publishes` %>" method="post" class="form">
|
|
3
3
|
<%- f.field('publishing.title'), { required: true } %>
|
|
4
4
|
<%- f.field('publishing.description', { as: "textarea" }) %>
|
|
5
5
|
<%- f.field('publishing.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<div class="btn-toolbar">
|
|
11
11
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
12
12
|
|
|
13
|
-
<a href="<%= `/${_context.locale}
|
|
13
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${publishing.originalId}` %>" class="btn-secondary">Back</a>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
</form>
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
<div class="grid gap-4 md:grid-cols-3">
|
|
9
9
|
<div>
|
|
10
10
|
<% form_for({ tag_settings }, errors, (f) => { %>
|
|
11
|
-
<form action="<%= `/${_context.locale}
|
|
11
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${tag_settings.id}/tags` %>" method="POST" class="form">
|
|
12
12
|
<%- f.field('tag_settings.tags', { as: 'checkbox_group', required: true, options: tags.map(tag => [tag.id, tag.name]) }) %>
|
|
13
13
|
|
|
14
14
|
<div class="form-actions">
|
|
15
15
|
<div class="btn-toolbar">
|
|
16
16
|
<%- f.submit('Save changes', { class: 'btn-primary' }) %>
|
|
17
|
-
<a href="<%= `/${_context.locale}
|
|
17
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${tag_settings.originalId}` %>" class="btn-secondary">Back</a>
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
</form>
|
|
@@ -36,29 +36,3 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
|
-
|
|
40
|
-
<script>
|
|
41
|
-
function onVisibilityChange(event) {
|
|
42
|
-
const newValue = event.target.value;
|
|
43
|
-
|
|
44
|
-
if (newValue === "protected") {
|
|
45
|
-
document.getElementById("f_username").parentElement.style.display = "block";
|
|
46
|
-
document.getElementById("f_username").required = true;
|
|
47
|
-
document.getElementById("f_password").parentElement.style.display = "block";
|
|
48
|
-
document.getElementById("f_password").required = true;
|
|
49
|
-
} else {
|
|
50
|
-
document.getElementById("f_username").parentElement.style.display = "none";
|
|
51
|
-
document.getElementById("f_username").required = false;
|
|
52
|
-
document.getElementById("f_password").parentElement.style.display = "none";
|
|
53
|
-
document.getElementById("f_password").required = false;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
onVisibilityChange({
|
|
58
|
-
target: {
|
|
59
|
-
value: '<%= tag_settings.visibility %>'
|
|
60
|
-
}
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
document.getElementById("f_visibility").addEventListener("change", onVisibilityChange)
|
|
64
|
-
</script>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="grid gap-4 md:grid-cols-3">
|
|
9
9
|
<div>
|
|
10
10
|
<% form_for({ visual_settings }, errors, (f) => { %>
|
|
11
|
-
<form action="<%= `/${_context.locale}
|
|
11
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.pageType}_revisions/${visual_settings.id}/visuals` %>" method="POST" class="form">
|
|
12
12
|
<%- f.field('visual_settings.layout', { as: 'select', required: true, options: [
|
|
13
13
|
["default", "Default"],
|
|
14
14
|
["landing", "Landing page"],
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<div class="form-actions">
|
|
19
19
|
<div class="btn-toolbar">
|
|
20
20
|
<%- f.submit('Save changes', { class: 'btn-primary' }) %>
|
|
21
|
-
<a href="<%= `/${_context.locale}
|
|
21
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${visual_settings.originalId}` %>" class="btn-secondary">Back</a>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
</form>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
|
-
<form action="<%= resource?.id ? `/${_context.locale}
|
|
2
|
+
<form action="<%= resource?.id ? `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${resource.id}` : `/${_context.locale}/${_context.handlerOpts.pageTypePlural}` %>" method="post" class="form">
|
|
3
3
|
<%- f.field('resource.title', { required: true }) %>
|
|
4
4
|
<%- f.field('resource.slug', { label: "URL", required: true }) %>
|
|
5
5
|
<%- f.field('resource.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
6
|
-
|
|
7
6
|
<%- f.field('resource.username', { required: true }) %>
|
|
8
7
|
<%- f.field('resource.password', { required: true }) %>
|
|
9
8
|
|
|
@@ -16,10 +15,7 @@
|
|
|
16
15
|
<%- f.field('resource.meta_title', { required: true }) %>
|
|
17
16
|
<%- f.field('resource.meta_description', { as: "textarea", required: true }) %>
|
|
18
17
|
|
|
19
|
-
<raketa-image-picker
|
|
20
|
-
name="resource[meta_image]"
|
|
21
|
-
value="<%= JSON.stringify(resource.meta_image) %>"
|
|
22
|
-
></raketa-image-picker>
|
|
18
|
+
<raketa-image-picker name="resource[meta_image]" value="<%= JSON.stringify(resource.meta_image) %>"></raketa-image-picker>
|
|
23
19
|
|
|
24
20
|
<%- f.field('resource.tags', { as: 'checkbox_group', required: true, options: tags.map(tag => [tag.id, tag.name]) }) %>
|
|
25
21
|
|
|
@@ -27,11 +23,11 @@
|
|
|
27
23
|
<div class="btn-toolbar">
|
|
28
24
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
29
25
|
|
|
30
|
-
<a href="<%= `/${_context.locale}
|
|
26
|
+
<a href="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}` %>" class="btn-secondary">Back to list</a>
|
|
31
27
|
</div>
|
|
32
28
|
|
|
33
29
|
<% if (resource?.id) {%>
|
|
34
|
-
<button hx-delete="<%= `/${_context.locale}
|
|
30
|
+
<button hx-delete="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${resource.id}` %>" hx-confirm="Are you sure?" class="btn-danger has-icon">
|
|
35
31
|
<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
32
|
<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
33
|
</svg>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">Delete a
|
|
3
|
+
<h1 class="heading-1">Delete a <%= _context.handlerOpts.pageType %></h1>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<div class="grid gap-4 md:grid-cols-3">
|
|
7
7
|
<div>
|
|
8
8
|
<% form_for({ deleteAction }, errors, (f) => { %>
|
|
9
|
-
<form action="<%= `/${_context.locale}
|
|
9
|
+
<form action="<%= `/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${deleteAction.id}/deletes` %>" method="POST" class="form">
|
|
10
10
|
<%- f.field('deleteAction.redirect', { as: 'select', required: true,options: [['301', 'Redirect to another page'], ['404', 'Return 404'],['410', 'Return 410']] }) %>
|
|
11
11
|
<%- f.field('deleteAction.destination', {label: 'Destination URL', required: true}) %>
|
|
12
12
|
|
|
13
13
|
<div class="form-actions">
|
|
14
14
|
<div class="btn-toolbar">
|
|
15
15
|
<%- f.submit('Proceed', { class: 'btn-primary' }) %>
|
|
16
|
-
<a href="<%=`/${_context.locale}
|
|
16
|
+
<a href="<%=`/${_context.locale}/${_context.handlerOpts.pageTypePlural}/${deleteAction.id}`%>" class="btn-secondary">Back</a>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
</form>
|