diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-30 19:52:09 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-30 19:52:09 +0200 |
| commit | bc116a2acfe2450d85229379d54c3344e485db6a (patch) | |
| tree | bd49c465f45bcec6251325d406c7de3cd6733ddf /config | |
| parent | 6a1102e69230ed62138b8e6aec8a6348e8571b23 (diff) | |
Replaces the grey slab and filled-box handle with the house card idiom,
a tabler grip and icon-only edit and delete actions. Shows each item's
non-default translations muted below the title, read from the
translation rows rather than the accessor so the fallback chain cannot
disguise a missing label as a translated one.
Adds move up/down buttons via acts_as_list, the single-pointer
alternative WCAG 2.5.7 requires: the jQuery UI sortable binds mouse
events only, so dragging works neither on touch nor from the keyboard.
The grip is hidden below the desktop breakpoint for the same reason.
The sort handler dropped dataType: "json" against a head :ok response,
which sent every success down the error path, and now reloads so the
disabled chevron states match the stored order after a drag.
Diffstat (limited to 'config')
| -rw-r--r-- | config/locales/de.yml | 4 | ||||
| -rw-r--r-- | config/locales/en.yml | 4 | ||||
| -rw-r--r-- | config/routes.rb | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/config/locales/de.yml b/config/locales/de.yml index 647caf57..2d5e9685 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml | |||
| @@ -669,6 +669,10 @@ de: | |||
| 669 | title: "Menüeinträge" | 669 | title: "Menüeinträge" |
| 670 | create_item: "Menüeintrag anlegen" | 670 | create_item: "Menüeintrag anlegen" |
| 671 | confirm_destroy: "Diesen Menüeintrag wirklich löschen?" | 671 | confirm_destroy: "Diesen Menüeintrag wirklich löschen?" |
| 672 | reorder_hint: "Die Einträge im Navi-Menü kann man draggen" | ||
| 673 | falls_back: "… Fallback auf deutsch" | ||
| 674 | move_up: "Nach oben" | ||
| 675 | move_down: "Nach unten" | ||
| 672 | new: | 676 | new: |
| 673 | title: "Menüeintrag hinzufügen" | 677 | title: "Menüeintrag hinzufügen" |
| 674 | edit: | 678 | edit: |
diff --git a/config/locales/en.yml b/config/locales/en.yml index 1b112e3d..da8282cf 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml | |||
| @@ -481,6 +481,10 @@ en: | |||
| 481 | title: "Menu Items" | 481 | title: "Menu Items" |
| 482 | create_item: "Create menu item" | 482 | create_item: "Create menu item" |
| 483 | confirm_destroy: "Do you really want to destroy the menu entry?" | 483 | confirm_destroy: "Do you really want to destroy the menu entry?" |
| 484 | reorder_hint: "Drag the handles to change the order" | ||
| 485 | falls_back: "… falls back to German" | ||
| 486 | move_up: "Move up" | ||
| 487 | move_down: "Move down" | ||
| 484 | new: | 488 | new: |
| 485 | title: "Add Menu Item" | 489 | title: "Add Menu Item" |
| 486 | edit: | 490 | edit: |
diff --git a/config/routes.rb b/config/routes.rb index 9793c6a6..4b5d15c9 100644 --- a/config/routes.rb +++ b/config/routes.rb | |||
| @@ -108,6 +108,8 @@ Cccms::Application.routes.draw do | |||
| 108 | resources :menu_items, :except => :show do | 108 | resources :menu_items, :except => :show do |
| 109 | member do | 109 | member do |
| 110 | post :sort | 110 | post :sort |
| 111 | post :move_up | ||
| 112 | post :move_down | ||
| 111 | end | 113 | end |
| 112 | end | 114 | end |
| 113 | 115 | ||
