@raketa-cloud/admin 0.0.59 → 0.0.64
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/cloud/Articles.js +3 -42
- package/src/cloud/Events.js +3 -29
- package/src/cloud/Pages.js +3 -29
- package/src/cloud/documents/articlesDocuments.js +11 -14
- package/src/cloud/documents/common.js +14 -0
- package/src/cloud/documents/eventsDocuments.js +13 -14
- package/src/cloud/documents/pagesDocuments.js +10 -14
- package/src/handlers/articles/DeletesHandler.js +1 -0
- package/src/handlers/articles/URLsHandler.js +1 -0
- package/src/handlers/events/DeletesHandler.js +1 -0
- package/src/handlers/events/URLsHandler.js +1 -0
- package/src/handlers/page_revisions/TagHandler.js +40 -0
- package/src/handlers/pages/DeletesHandler.js +1 -0
- package/src/handlers/pages/URLsHandler.js +1 -0
- package/src/helpers/FormBuilder.js +2 -2
- package/src/styles/application.css +4 -0
- package/src/tests/handlers/articles/DeletesHandler.test/create_form.test.js +2 -1
- package/src/tests/handlers/articles/URLsHandler.test/create_form.test.js +2 -1
- package/src/tests/handlers/events/DeletesHandler.test/create_form.test.js +2 -1
- package/src/tests/handlers/events/URLsHandler.test/create_form.test.js +2 -1
- package/src/tests/handlers/page_revisions/TagHandler.test/edit_form.test.js +38 -3
- package/src/tests/handlers/page_revisions/TagHandler.test/update.test.js +39 -3
- package/src/tests/handlers/pages/DeletesHandler.test/create.test.js +1 -1
- package/src/tests/handlers/pages/DeletesHandler.test/create_form.test.js +1 -0
- package/src/tests/handlers/pages/URLsHandler.test/create_form.test.js +1 -0
- package/src/views/article_revisions/codes/edit_form.ejs +5 -16
- package/src/views/article_revisions/general/_form.ejs +2 -2
- package/src/views/article_revisions/general/edit_form.ejs +5 -16
- package/src/views/article_revisions/locks/create_form.ejs +5 -3
- package/src/views/article_revisions/meta/edit_form.ejs +8 -19
- package/src/views/article_revisions/publishes/_form.ejs +19 -36
- package/src/views/article_revisions/tags/edit_form.ejs +5 -16
- package/src/views/article_revisions/visuals/edit_form.ejs +5 -16
- package/src/views/articles/_form.ejs +14 -19
- package/src/views/articles/deletes/create_form.ejs +18 -5
- package/src/views/articles/index.ejs +1 -19
- package/src/views/articles/show.ejs +1 -1
- package/src/views/articles/translations/_form.ejs +1 -15
- package/src/views/articles/urls/create_form.ejs +10 -5
- package/src/views/categories/_form.ejs +1 -15
- package/src/views/event_revisions/_nav.ejs +1 -1
- package/src/views/event_revisions/codes/edit_form.ejs +5 -16
- package/src/views/event_revisions/general/_form.ejs +2 -2
- package/src/views/event_revisions/general/edit_form.ejs +5 -16
- package/src/views/event_revisions/locks/create_form.ejs +5 -3
- package/src/views/event_revisions/meta/edit_form.ejs +8 -19
- package/src/views/event_revisions/publishes/_form.ejs +19 -36
- package/src/views/event_revisions/tags/edit_form.ejs +5 -16
- package/src/views/event_revisions/visuals/edit_form.ejs +5 -16
- package/src/views/events/_form.ejs +14 -19
- package/src/views/events/deletes/create_form.ejs +18 -5
- package/src/views/events/index.ejs +1 -19
- package/src/views/events/show.ejs +1 -1
- package/src/views/events/translations/_form.ejs +1 -15
- package/src/views/events/urls/create_form.ejs +10 -5
- package/src/views/page_revisions/_nav.ejs +1 -1
- package/src/views/page_revisions/codes/edit_form.ejs +4 -15
- package/src/views/page_revisions/general/_form.ejs +1 -1
- package/src/views/page_revisions/general/edit_form.ejs +4 -15
- package/src/views/page_revisions/locks/create_form.ejs +5 -3
- package/src/views/page_revisions/meta/edit_form.ejs +7 -18
- package/src/views/page_revisions/publishes/_form.ejs +19 -36
- package/src/views/page_revisions/tags/edit_form.ejs +9 -15
- package/src/views/page_revisions/visuals/edit_form.ejs +4 -15
- package/src/views/pages/_form.ejs +13 -18
- package/src/views/pages/deletes/create_form.ejs +17 -4
- package/src/views/pages/index.ejs +1 -19
- package/src/views/pages/show.ejs +3 -3
- package/src/views/pages/translations/create_form.ejs +13 -5
- package/src/views/pages/translations/index.ejs +6 -4
- package/src/views/pages/urls/create_form.ejs +9 -4
- package/src/views/redirects/_form.ejs +5 -19
- package/src/views/settings/meta/edit_form.ejs +4 -18
- package/src/views/tags/_form.ejs +2 -16
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">Code customizations / </span>
|
|
5
|
+
<%= resource.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<%- render_partial('../_nav.ejs', { resource, active: 'codes' }) %>
|
|
@@ -32,19 +35,5 @@
|
|
|
32
35
|
</form>
|
|
33
36
|
<% }) %>
|
|
34
37
|
</div>
|
|
35
|
-
|
|
36
|
-
<div>
|
|
37
|
-
<div class="help">
|
|
38
|
-
<div class="flex items-center gap-1 mb-2">
|
|
39
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
40
|
-
<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" />
|
|
41
|
-
</svg>
|
|
42
|
-
|
|
43
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
38
|
</div>
|
|
50
|
-
</div>
|
|
39
|
+
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
2
|
<form action="<%= `/${_context.locale}/${_context.resourceConfig.eventType}_revisions/${resource.id}/general` %>" method="POST" class="form">
|
|
3
3
|
<%- f.field('resource.title', { required: true }) %>
|
|
4
|
-
<%- f.field('resource.slug', { label: "URL", required: true }) %>
|
|
4
|
+
<%- f.field('resource.slug', { label: "URL", required: true, hint: "Only lowercase letters, numbers and dash allowed. E.g: celebrate-friday-13" }) %>
|
|
5
5
|
<%- f.field('resource.publishAt', { required: true, type: 'datetime-local', label: 'Publish at (UTC)' }) %>
|
|
6
6
|
<%- f.field('resource.startsAt', { required: true, type: 'datetime-local', label: 'Starts at (UTC)' }) %>
|
|
7
7
|
<%- f.field('resource.endsAt', { required: true, type: 'datetime-local', label: 'Ends at (UTC)' }) %>
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
</form>
|
|
19
|
-
<% }) %>
|
|
19
|
+
<% }) %>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">General / </span>
|
|
5
|
+
<%= resource.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<%- render_partial('../_nav.ejs', { resource, active: 'general' }) %>
|
|
@@ -9,19 +12,5 @@
|
|
|
9
12
|
<div>
|
|
10
13
|
<%- render_partial('_form.ejs') %>
|
|
11
14
|
</div>
|
|
12
|
-
|
|
13
|
-
<div>
|
|
14
|
-
<div class="help">
|
|
15
|
-
<div class="flex items-center gap-1 mb-2">
|
|
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="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" />
|
|
18
|
-
</svg>
|
|
19
|
-
|
|
20
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
15
|
</div>
|
|
27
|
-
</div>
|
|
16
|
+
</div>
|
|
@@ -25,11 +25,13 @@
|
|
|
25
25
|
<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" />
|
|
26
26
|
</svg>
|
|
27
27
|
|
|
28
|
-
<h3 class="heading-3">
|
|
28
|
+
<h3 class="heading-3">How to lock a revision?</h3>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
-
<
|
|
31
|
+
<div class="markdown">
|
|
32
|
+
<p>You can lock a revision to prevent publishing or deletion by anyone, including yourself. When locking, provide a clear, informative message explaining the reason. Remember that while this feature is designed to facilitate collaboration, any user can still unlock the revision.</p>
|
|
33
|
+
</div>
|
|
32
34
|
</div>
|
|
33
35
|
</div>
|
|
34
36
|
</div>
|
|
35
|
-
</div>
|
|
37
|
+
</div>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">OpenGraph & Meta tags / </span>
|
|
5
|
+
<%= resource.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<%- render_partial('../_nav.ejs', { resource, active: 'meta' }) %>
|
|
@@ -9,10 +12,10 @@
|
|
|
9
12
|
<div>
|
|
10
13
|
<% form_for({ resource }, errors, (f) => { %>
|
|
11
14
|
<form action="<%= `/${_context.locale}/${_context.resourceConfig.eventType}_revisions/${resource.id}/meta` %>" method="POST" class="form">
|
|
12
|
-
<%- f.field('resource.settings.meta.title', { required: true, label: "Meta title" }) %>
|
|
13
|
-
<%- f.field('resource.settings.meta.description', { as: "textarea", required: true, label: "Meta description" }) %>
|
|
15
|
+
<%- f.field('resource.settings.meta.title', { required: true, label: "Meta title", hint: "Used for both meta and OpenGraph" }) %>
|
|
16
|
+
<%- f.field('resource.settings.meta.description', { as: "textarea", required: true, label: "Meta description", hint: "Used for both meta and OpenGraph" }) %>
|
|
14
17
|
|
|
15
|
-
<raketa-image-picker name="resource[settings][meta][image]" value="<%= JSON.stringify(resource.settings?.meta?.image || {}) %>" label="
|
|
18
|
+
<raketa-image-picker name="resource[settings][meta][image]" value="<%= JSON.stringify(resource.settings?.meta?.image || {}) %>" label="OpenGraph image"></raketa-image-picker>
|
|
16
19
|
|
|
17
20
|
<div class="form-actions">
|
|
18
21
|
<div class="btn-toolbar">
|
|
@@ -23,19 +26,5 @@
|
|
|
23
26
|
</form>
|
|
24
27
|
<% }) %>
|
|
25
28
|
</div>
|
|
26
|
-
|
|
27
|
-
<div>
|
|
28
|
-
<div class="help">
|
|
29
|
-
<div class="flex items-center gap-1 mb-2">
|
|
30
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
31
|
-
<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" />
|
|
32
|
-
</svg>
|
|
33
|
-
|
|
34
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
29
|
</div>
|
|
41
|
-
</div>
|
|
30
|
+
</div>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<% form_for({ publishing }, errors, (f) => { %>
|
|
2
2
|
<form action="<%= `/${_context.locale}/${_context.resourceConfig.eventType}_revisions/${publishing.id}/publishes` %>" method="post" class="form">
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
<% if (errors.slug) { %>
|
|
4
|
+
<div class="mb-4 text-red-500">A page with this URL already exists</div>
|
|
5
|
+
<% } %>
|
|
6
|
+
|
|
7
|
+
<%- f.field('publishing.title'), { required: true, hint: "Appears in the history of changes" } %>
|
|
8
|
+
<%- f.field('publishing.description', { as: "textarea", hint: "Provide optional details" }) %>
|
|
5
9
|
<%- f.field('publishing.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
6
10
|
<%- f.field('publishing.username', { required: true }) %>
|
|
7
11
|
<%- f.field('publishing.password', { required: true }) %>
|
|
@@ -16,42 +20,21 @@
|
|
|
16
20
|
</form>
|
|
17
21
|
<% }) %>
|
|
18
22
|
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<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" />
|
|
24
|
-
</svg>
|
|
23
|
+
<script>
|
|
24
|
+
const visibilityEl = document.getElementById("f_publishing_visibility");
|
|
25
|
+
const usernameEl = document.getElementById("f_publishing_username").parentElement;
|
|
26
|
+
const passwordEl = document.getElementById("f_publishing_password").parentElement;
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
function handleVisibilityChange(value) {
|
|
29
|
+
const isHidden = value !== "protected";
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</div>
|
|
31
|
+
usernameEl.classList.toggle('hidden', isHidden);
|
|
32
|
+
passwordEl.classList.toggle('hidden', isHidden);
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const newValue = event.target.value;
|
|
36
|
-
|
|
37
|
-
if (newValue === "protected") {
|
|
38
|
-
document.getElementById("f_username").parentElement.style.display = "block";
|
|
39
|
-
document.getElementById("f_username").required = true;
|
|
40
|
-
document.getElementById("f_password").parentElement.style.display = "block";
|
|
41
|
-
document.getElementById("f_password").required = true;
|
|
42
|
-
} else {
|
|
43
|
-
document.getElementById("f_username").parentElement.style.display = "none";
|
|
44
|
-
document.getElementById("f_username").required = false;
|
|
45
|
-
document.getElementById("f_password").parentElement.style.display = "none";
|
|
46
|
-
document.getElementById("f_password").required = false;
|
|
47
|
-
}
|
|
34
|
+
usernameEl.querySelector('input').toggleAttribute('required', !isHidden);
|
|
35
|
+
passwordEl.querySelector('input').toggleAttribute('required', !isHidden);
|
|
48
36
|
}
|
|
49
37
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
document.getElementById("f_visibility").addEventListener("change", onVisibilityChange)
|
|
57
|
-
</script>
|
|
38
|
+
visibilityEl.addEventListener("change", (e) => handleVisibilityChange(e.target.value));
|
|
39
|
+
handleVisibilityChange(visibilityEl.value);
|
|
40
|
+
</script>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">Tags / </span>
|
|
5
|
+
<%= resource.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<%- render_partial('../_nav.ejs', { resource, active: 'tags' }) %>
|
|
@@ -20,19 +23,5 @@
|
|
|
20
23
|
</form>
|
|
21
24
|
<% }) %>
|
|
22
25
|
</div>
|
|
23
|
-
|
|
24
|
-
<div>
|
|
25
|
-
<div class="help">
|
|
26
|
-
<div class="flex items-center gap-1 mb-2">
|
|
27
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
28
|
-
<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" />
|
|
29
|
-
</svg>
|
|
30
|
-
|
|
31
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
26
|
</div>
|
|
38
|
-
</div>
|
|
27
|
+
</div>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">Visuals / </span>
|
|
5
|
+
<%= resource.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<%- render_partial('../_nav.ejs', { resource, active: 'visuals' }) %>
|
|
@@ -20,19 +23,5 @@
|
|
|
20
23
|
</form>
|
|
21
24
|
<% }) %>
|
|
22
25
|
</div>
|
|
23
|
-
|
|
24
|
-
<div>
|
|
25
|
-
<div class="help">
|
|
26
|
-
<div class="flex items-center gap-1 mb-2">
|
|
27
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
28
|
-
<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" />
|
|
29
|
-
</svg>
|
|
30
|
-
|
|
31
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
26
|
</div>
|
|
38
|
-
</div>
|
|
27
|
+
</div>
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
2
|
<form action="<%= resource?.id ? `/${_context.locale}/${_context.resourceConfig.eventTypePlural}/${resource.id}` : `/${_context.locale}/${_context.resourceConfig.eventTypePlural}` %>" method="post" class="form">
|
|
3
|
+
<h2 class="heading-2 mb-4">General</h2>
|
|
4
|
+
|
|
3
5
|
<%- f.field('resource.title', { required: true }) %>
|
|
4
|
-
<%- f.field('resource.slug', { label: "URL", required: true }) %>
|
|
6
|
+
<%- f.field('resource.slug', { label: "URL", required: true, hint: "Only lowercase letters, numbers and dash allowed. Ex: celebrate-friday-13" }) %>
|
|
5
7
|
<%- f.field('resource.publishAt', { required: true, type: 'datetime-local', label: 'Publish at (UTC)' }) %>
|
|
6
8
|
<%- f.field('resource.startsAt', { required: true, type: 'datetime-local', label: 'Starts at (UTC)' }) %>
|
|
7
9
|
<%- f.field('resource.endsAt', { required: true, type: 'datetime-local', label: 'Ends at (UTC)' }) %>
|
|
8
10
|
<%- f.field('resource.visibility', { as: 'select', required: true, options: visibilityOptions }) %>
|
|
9
11
|
|
|
10
12
|
<%- include('../_shared/_credentials_input.ejs', { f, visibilityFieldId: "f_resource_visibility"}) %>
|
|
13
|
+
|
|
14
|
+
<h2 class="heading-2 my-4">Visuals</h2>
|
|
15
|
+
|
|
11
16
|
<%- include('../_shared/_layout_input.ejs', { f }) %>
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
<%- f.field('resource.settings.meta.description', { as: "textarea", required: true, label: "Meta description" }) %>
|
|
18
|
+
<h2 class="heading-2 my-4">OpenGraph & Meta tags</h2>
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
<%- f.field('resource.settings.meta.title', { required: true, label: "Meta title", hint: "Used for both meta and OpenGraph" }) %>
|
|
21
|
+
<%- f.field('resource.settings.meta.description', { as: "textarea", required: true, label: "Meta description", hint: "Used for both meta and OpenGraph" }) %>
|
|
22
|
+
|
|
23
|
+
<raketa-image-picker name="resource[settings][meta][image]" value="<%= JSON.stringify(resource.settings?.meta?.image || {}) %>" label="OpenGraph image"></raketa-image-picker>
|
|
24
|
+
|
|
25
|
+
<h2 class="heading-2 my-4">Content tags</h2>
|
|
17
26
|
|
|
18
27
|
<%- f.field('resource.tags', { as: 'checkbox_group', options: tags.map(tag => [tag.id, tag.name]) }) %>
|
|
19
28
|
|
|
@@ -35,18 +44,4 @@
|
|
|
35
44
|
<% } %>
|
|
36
45
|
</div>
|
|
37
46
|
</form>
|
|
38
|
-
<% }) %>
|
|
39
|
-
|
|
40
|
-
<div>
|
|
41
|
-
<div class="help">
|
|
42
|
-
<div class="flex items-center gap-1 mb-2">
|
|
43
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
44
|
-
<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" />
|
|
45
|
-
</svg>
|
|
46
|
-
|
|
47
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
47
|
+
<% }) %>
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">Delete / </span>
|
|
5
|
+
<%= event.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<div class="grid gap-4 md:grid-cols-3">
|
|
7
10
|
<div>
|
|
8
11
|
<% form_for({ resource }, errors, (f) => { %>
|
|
9
12
|
<form action="<%= `/${_context.locale}/${_context.resourceConfig.eventTypePlural}/${resource.id}/deletes` %>" method="POST" class="form">
|
|
10
|
-
<%- f.field('resource.redirect', { as: 'select', required: true,options: [['301', 'Redirect to another page'], ['404', 'Return
|
|
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']] }) %>
|
|
11
14
|
<%- f.field('resource.destination', {label: 'Destination URL', required: true}) %>
|
|
12
15
|
|
|
13
16
|
<div class="form-actions">
|
|
@@ -27,10 +30,20 @@
|
|
|
27
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" />
|
|
28
31
|
</svg>
|
|
29
32
|
|
|
30
|
-
<h3 class="heading-3">
|
|
33
|
+
<h3 class="heading-3">How to safely retire a page?</h3>
|
|
31
34
|
</div>
|
|
32
35
|
|
|
33
|
-
<
|
|
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>
|
|
34
47
|
</div>
|
|
35
48
|
</div>
|
|
36
49
|
</div>
|
|
@@ -52,4 +65,4 @@
|
|
|
52
65
|
})
|
|
53
66
|
|
|
54
67
|
document.getElementById("f_resource_redirect").addEventListener("change", onDestinationChange)
|
|
55
|
-
</script>
|
|
68
|
+
</script>
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
<tr>
|
|
21
21
|
<th><%- sort_button("Title", "title", _context) %></th>
|
|
22
22
|
<th>Visibility</th>
|
|
23
|
-
<th><%- sort_button("Last change", "updated_at", _context) %></th>
|
|
24
23
|
<th>Translations</th>
|
|
25
24
|
</tr>
|
|
26
25
|
</thead>
|
|
@@ -76,23 +75,6 @@
|
|
|
76
75
|
</div>
|
|
77
76
|
</td>
|
|
78
77
|
|
|
79
|
-
<td>
|
|
80
|
-
<div class="body-3 text-raketa-foreground/50">
|
|
81
|
-
<div class="flex items-center gap-1 mb-0.5">
|
|
82
|
-
<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">
|
|
83
|
-
<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" />
|
|
84
|
-
</svg>
|
|
85
|
-
|
|
86
|
-
Jan 20, 2024
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<div class="flex items-center gap-1" title="Yana Dimitrova">
|
|
90
|
-
<img src="https://lh3.googleusercontent.com/a/ACg8ocLRrXdEsbxWg9AMWcgEY9Gfs75-xp7dYsnanB9-u-ZS3A=s96-c" class="size-4 rounded-full" alt="Yana Dimitrova">
|
|
91
|
-
Yana D.
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</td>
|
|
95
|
-
|
|
96
78
|
<td>
|
|
97
79
|
<div class="flex flex-wrap items-center gap-1">
|
|
98
80
|
<% Object.keys(_context.locales).forEach(key => { %>
|
|
@@ -160,4 +142,4 @@
|
|
|
160
142
|
searchToggle.addEventListener('click', () => {
|
|
161
143
|
sidebar.classList.toggle('hidden');
|
|
162
144
|
});
|
|
163
|
-
</script>
|
|
145
|
+
</script>
|
|
@@ -30,18 +30,4 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
32
|
</form>
|
|
33
|
-
<% }) %>
|
|
34
|
-
|
|
35
|
-
<div>
|
|
36
|
-
<div class="help">
|
|
37
|
-
<div class="flex items-center gap-1 mb-2">
|
|
38
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
39
|
-
<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" />
|
|
40
|
-
</svg>
|
|
41
|
-
|
|
42
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
33
|
+
<% }) %>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">Change URL / </span>
|
|
5
|
+
<%= event.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<div class="grid gap-4 md:grid-cols-3">
|
|
7
10
|
<% form_for({ resource }, errors, (f) => { %>
|
|
8
11
|
<form action="<%= `/${_context.locale}/${_context.resourceConfig.eventTypePlural}/${resource.id}/urls` %>" method="post" class="form">
|
|
9
|
-
<%- f.field('resource.slug', { label: "URL", required: true }) %>
|
|
12
|
+
<%- f.field('resource.slug', { label: "URL", required: true, hint: "Only lowercase letters, numbers and dash allowed. Ex: celebrate/friday-13" }) %>
|
|
10
13
|
<%- f.field('resource.redirect', { as: "checkbox", value: "1", label: "Create 301 redirect for the old URL" }) %>
|
|
11
14
|
|
|
12
15
|
<%- f.submit('Save record', { class: 'btn-primary' }) %>
|
|
@@ -21,11 +24,13 @@
|
|
|
21
24
|
<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" />
|
|
22
25
|
</svg>
|
|
23
26
|
|
|
24
|
-
<h3 class="heading-3">
|
|
27
|
+
<h3 class="heading-3">Changing URL</h3>
|
|
25
28
|
</div>
|
|
26
29
|
|
|
27
|
-
<
|
|
30
|
+
<div class="markdown">
|
|
31
|
+
<p>Caution: Changing a page's URL may create broken links from existing references. If needed, use the redirect checkbox to automatically forward traffic from the old address to the new one, preserving link integrity.</p>
|
|
32
|
+
</div>
|
|
28
33
|
</div>
|
|
29
34
|
</div>
|
|
30
35
|
</div>
|
|
31
|
-
</div>
|
|
36
|
+
</div>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
<div class="<%= active === 'meta' ? activeClass : inactiveClass %>">
|
|
32
32
|
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${resource.id}/meta/edit` %>" class="text-raketa-primary font-semibold">
|
|
33
|
-
|
|
33
|
+
OpenGraph & meta tags
|
|
34
34
|
</a>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">Code customizations / </span>
|
|
5
|
+
<%= resource.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<%- render_partial('../_nav.ejs', { resource, active: 'codes' }) %>
|
|
@@ -32,19 +35,5 @@
|
|
|
32
35
|
</form>
|
|
33
36
|
<% }) %>
|
|
34
37
|
</div>
|
|
35
|
-
|
|
36
|
-
<div>
|
|
37
|
-
<div class="help">
|
|
38
|
-
<div class="flex items-center gap-1 mb-2">
|
|
39
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
40
|
-
<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" />
|
|
41
|
-
</svg>
|
|
42
|
-
|
|
43
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
38
|
</div>
|
|
50
39
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% form_for({ resource }, errors, (f) => { %>
|
|
2
2
|
<form action="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${resource.id}/general` %>" method="POST" class="form">
|
|
3
3
|
<%- f.field('resource.title', { required: true }) %>
|
|
4
|
-
<%- f.field('resource.slug', { label: "URL", required: true }) %>
|
|
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 }) %>
|
|
6
6
|
|
|
7
7
|
<%- include('../../_shared/_credentials_input.ejs', { f, visibilityFieldId: "f_resource_visibility"}) %>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">General / </span>
|
|
5
|
+
<%= resource.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<%- render_partial('../_nav.ejs', { resource, active: 'general' }) %>
|
|
@@ -9,19 +12,5 @@
|
|
|
9
12
|
<div>
|
|
10
13
|
<%- render_partial('_form.ejs') %>
|
|
11
14
|
</div>
|
|
12
|
-
|
|
13
|
-
<div>
|
|
14
|
-
<div class="help">
|
|
15
|
-
<div class="flex items-center gap-1 mb-2">
|
|
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="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" />
|
|
18
|
-
</svg>
|
|
19
|
-
|
|
20
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
15
|
</div>
|
|
27
16
|
</div>
|
|
@@ -25,11 +25,13 @@
|
|
|
25
25
|
<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" />
|
|
26
26
|
</svg>
|
|
27
27
|
|
|
28
|
-
<h3 class="heading-3">
|
|
28
|
+
<h3 class="heading-3">How to lock a revision?</h3>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
-
<
|
|
31
|
+
<div class="markdown">
|
|
32
|
+
<p>You can lock a revision to prevent publishing or deletion by anyone, including yourself. When locking, provide a clear, informative message explaining the reason. Remember that while this feature is designed to facilitate collaboration, any user can still unlock the revision.</p>
|
|
33
|
+
</div>
|
|
32
34
|
</div>
|
|
33
35
|
</div>
|
|
34
36
|
</div>
|
|
35
|
-
</div>
|
|
37
|
+
</div>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<div class="page-wrapper">
|
|
2
2
|
<div class="page-title">
|
|
3
|
-
<h1 class="heading-1">
|
|
3
|
+
<h1 class="heading-1">
|
|
4
|
+
<span class="opacity-50">OpenGraph & Meta tags / </span>
|
|
5
|
+
<%= resource.title %>
|
|
6
|
+
</h1>
|
|
4
7
|
</div>
|
|
5
8
|
|
|
6
9
|
<%- render_partial('../_nav.ejs', { resource, active: 'meta' }) %>
|
|
@@ -9,10 +12,10 @@
|
|
|
9
12
|
<div>
|
|
10
13
|
<% form_for({ resource }, errors, (f) => { %>
|
|
11
14
|
<form action="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${resource.id}/meta` %>" method="POST" class="form">
|
|
12
|
-
<%- f.field('resource.settings.meta.title', { required: true, label: "Meta title" }) %>
|
|
13
|
-
<%- f.field('resource.settings.meta.description', { as: "textarea", required: true, label: "Meta description" }) %>
|
|
15
|
+
<%- f.field('resource.settings.meta.title', { required: true, label: "Meta title", hint: "Used for both meta and OpenGraph" }) %>
|
|
16
|
+
<%- f.field('resource.settings.meta.description', { as: "textarea", required: true, label: "Meta description", hint: "Used for both meta and OpenGraph" }) %>
|
|
14
17
|
|
|
15
|
-
<raketa-image-picker name="resource[settings][meta][image]" value="<%= JSON.stringify(resource.settings?.meta?.image || {}) %>" label="
|
|
18
|
+
<raketa-image-picker name="resource[settings][meta][image]" value="<%= JSON.stringify(resource.settings?.meta?.image || {}) %>" label="OpenGraph image"></raketa-image-picker>
|
|
16
19
|
|
|
17
20
|
<div class="form-actions">
|
|
18
21
|
<div class="btn-toolbar">
|
|
@@ -23,19 +26,5 @@
|
|
|
23
26
|
</form>
|
|
24
27
|
<% }) %>
|
|
25
28
|
</div>
|
|
26
|
-
|
|
27
|
-
<div>
|
|
28
|
-
<div class="help">
|
|
29
|
-
<div class="flex items-center gap-1 mb-2">
|
|
30
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
31
|
-
<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" />
|
|
32
|
-
</svg>
|
|
33
|
-
|
|
34
|
-
<h3 class="heading-3">Contextual help</h3>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
29
|
</div>
|
|
41
30
|
</div>
|