Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ Use these exact translations for headlines on the pages:
| Empfehlungen | Recommendations | Recommandations |
| Quellen | Sources | Sources |

## CMS

- The CMS is [Sveltia CMS](https://github.com/sveltia/sveltia-cms), configured in `assets/admin/static/config.yml`.
- `public/admin/` (including `public/admin/config.yml`) is a gitignored build output generated from `assets/admin/` via `npm run build:admin`. ALWAYS edit the source files under `assets/admin/`, never the generated `public/admin/` files.

## Development Guidelines

### Build/Test Commands
Expand Down
29 changes: 19 additions & 10 deletions assets/admin/shortcodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,15 +630,6 @@ var bookingFields = [
},
},
},
{
name: "booking_data_link",
label: "Booking Platform Link",
widget: "cms-edit-link",
static: true,
required: false,
href: "#/collections/booking",
label_template: "Manage Booking Platforms \u2192",
},
{
name: "subtitle",
label: "Subtitle",
Expand Down Expand Up @@ -752,7 +743,6 @@ CMS.registerEditorComponent({
var rawId = p.id ? String(p.id) : "";
return {
id: rawId,
booking_data_link: rawId,
subtitle: String(p.subtitle || ""),
classes_first: String(p["classes.first"] || ""),
classes_second: String(p["classes.second"] || ""),
Expand Down Expand Up @@ -1155,6 +1145,25 @@ CMS.registerEditorComponent({
},
});

CMS.registerEditorComponent({
id: "border-points",
label: "Border Points",
icon: "share_location",
fields: [],
pattern: selfClosingPattern("border-points"),
fromBlock: function () {
return {};
},
toBlock: makeToBlock("border-points", {
bracket: "<",
fields: [],
bodyMode: "none",
}),
toPreview: function () {
return "";
},
});

CMS.registerEditorComponent({
id: "children-discount",
label: "Children Discount Notice",
Expand Down
77 changes: 42 additions & 35 deletions assets/admin/static/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ x_border_side: &border_side
value_field: "{{slug}}"
display_fields: ["title"]
required: false
i18n: duplicate
i18n: sync
- label: "Label"
name: "label"
widget: "string"
Expand All @@ -129,7 +129,7 @@ x_border_side: &border_side
value_field: "{{slug}}"
display_fields: ["title"]
required: false
i18n: duplicate
i18n: sync
- label: "Label"
name: "label"
widget: "string"
Expand Down Expand Up @@ -164,11 +164,11 @@ collections:
name: "date"
widget: "datetime"
type: "date"
i18n: duplicate
i18n: sync
- label: "Author"
name: "author"
widget: "string"
i18n: duplicate
i18n: sync
required: false
- label: "Title"
name: "title"
Expand All @@ -188,7 +188,7 @@ collections:
display_fields: ["title"]
multiple: true
required: false
i18n: duplicate
i18n: sync
hint: "List of countries this news article is about."
- label: "Operators"
name: "operator"
Expand All @@ -199,14 +199,14 @@ collections:
display_fields: ["title"]
multiple: true
required: false
i18n: duplicate
i18n: sync
hint: "List of operators this news article is about."
- label: "Content Images"
name: "content_images"
widget: "image"
multiple: true
required: false
i18n: duplicate
i18n: sync
hint: "Images shown for this page. Prefer .webp images."
accept: "image/webp"
- label: "Body"
Expand Down Expand Up @@ -271,7 +271,7 @@ collections:
search_fields: ["{{borders.*.id}}"]
multiple: true
required: false
i18n: duplicate
i18n: sync
hint: "Border IDs in clockwise order, starting in the north of the country. To add or edit borders, see the [Border Points](/admin/#/collections/_singletons/entries/borderpoints) singleton."
- label: "Border Points Footnotes"
name: "border_points_footnotes"
Expand All @@ -284,7 +284,7 @@ collections:
widget: "image"
multiple: true
required: false
i18n: duplicate
i18n: sync
hint: "Images shown for this page. Prefer .webp images."
accept: "image/webp"
- label: "Body"
Expand Down Expand Up @@ -339,21 +339,21 @@ collections:
value_field: "{{slug}}"
display_fields: ["title"]
multiple: true
i18n: duplicate
i18n: sync
hint: "List of countries the operator operates in."
- label: "Content Images"
name: "content_images"
widget: "image"
multiple: true
required: false
i18n: duplicate
i18n: sync
hint: "Images shown for this page. Prefer .webp images."
accept: "image/webp"
- label: "Aliases"
name: "aliases"
widget: "hidden"
default: []
i18n: duplicate
i18n: sync
- label: "Body"
name: "body"
widget: "markdown"
Expand Down Expand Up @@ -580,7 +580,7 @@ collections:
name: "aliases"
widget: "hidden"
default: []
i18n: duplicate
i18n: sync
- name: params
label: "Parameters"
widget: object
Expand Down Expand Up @@ -609,7 +609,7 @@ collections:
- label: "No"
value: false
required: false
i18n: duplicate
i18n: sync
- label: "FIP Coupon"
name: fip_coupon
widget: select
Expand All @@ -619,7 +619,7 @@ collections:
- label: "No"
value: false
required: false
i18n: duplicate
i18n: sync
- label: "FIP Global Fare"
name: fip_global_fare
widget: select
Expand All @@ -629,7 +629,7 @@ collections:
- label: "No"
value: false
required: false
i18n: duplicate
i18n: sync
- label: "FIP 75"
name: fip_75
widget: select
Expand All @@ -639,7 +639,7 @@ collections:
- label: "No"
value: false
required: false
i18n: duplicate
i18n: sync
- label: "Reservations"
name: reservations
widget: select
Expand All @@ -649,22 +649,22 @@ collections:
- label: "No"
value: false
required: false
i18n: duplicate
i18n: sync
- label: "Booking Link"
name: booking_link
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Additional Info Link"
name: additional_info_link
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Fee"
name: fee
widget: string
required: false
i18n: duplicate
i18n: sync
hint: 'Fee for booking, e.g. "€ 5" or "5 %".'
- label: "Type"
name: type
Expand All @@ -684,7 +684,7 @@ collections:
value: "socialmedia"
- label: "Ticket Machine"
value: "machine"
i18n: duplicate
i18n: sync
- label: "Email Templates"
name: email_templates
widget: object
Expand All @@ -702,12 +702,12 @@ collections:
name: to
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Subject"
name: subject
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Body"
name: body
widget: text
Expand All @@ -723,12 +723,12 @@ collections:
name: to
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Subject"
name: subject
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Body"
name: body
widget: text
Expand All @@ -744,12 +744,12 @@ collections:
name: to
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Subject"
name: subject
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Body"
name: body
widget: text
Expand All @@ -765,12 +765,12 @@ collections:
name: to
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Subject"
name: subject
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Body"
name: body
widget: text
Expand Down Expand Up @@ -885,7 +885,7 @@ collections:
name: "aliases"
widget: "hidden"
default: []
i18n: duplicate
i18n: sync
- label: "Body"
name: "body"
widget: "markdown"
Expand Down Expand Up @@ -926,7 +926,7 @@ collections:
name: "aliases"
widget: "hidden"
default: []
i18n: duplicate
i18n: sync
- label: "Body"
name: "body"
widget: "markdown"
Expand Down Expand Up @@ -958,6 +958,13 @@ collections:
create: true
delete: false
i18n: true
reorder:
key: "weight"
sortable_fields:
fields: ["weight", "title"]
default:
field: "weight"
direction: "ascending"
fields:
- label: "Title"
name: "title"
Expand All @@ -968,7 +975,7 @@ collections:
widget: "number"
required: false
min: 0
i18n: duplicate
i18n: sync
- label: "Body"
name: "body"
widget: "markdown"
Expand Down Expand Up @@ -1014,7 +1021,7 @@ collections:
name: url
widget: string
required: false
i18n: duplicate
i18n: sync
- label: "Body"
name: "body"
widget: "markdown"
Expand Down Expand Up @@ -1058,7 +1065,7 @@ singletons:
widget: "string"
pattern:
["^[a-z0-9-]+$", "Use lowercase letters, digits and hyphens only"]
i18n: duplicate
i18n: sync
hint: 'Unique identifier, e.g. "at-cz". Referenced in the Border Points field on each Country page.'
- label: "Side A"
name: "a"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
aliases:
- /de/general/faq/dbf0f4be7fe0/
title: Verfallen meine Freifahrtscheine, wenn ich zurück im Bahnnetz der Ausgabebahn bin?
weight: 20
---

Grundsätzlich gilt folgende Regel:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
aliases:
- /en/general/faq/dbf0f4be7fe0/
title: Do my FIP Coupons expire when I return to the issuing railway’s network?
weight: 20
---

The following rule generally applies:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
aliases:
- /fr/general/faq/dbf0f4be7fe0/
title: Mes Coupons FIP expirent-ils lorsque je retourne sur le réseau ferroviaire de l’entreprise émettrice ?
weight: 20
---

En règle générale, la règle suivante s’applique :
Expand Down
Loading
Loading