diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-02 00:12:02 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-02 00:12:02 +0200 |
| commit | b6416e86c9c58b8e886c14de55b01aeb863b8676 (patch) | |
| tree | 55a69ed46888e6a47ccc35a22cef45a33cddfd87 /app/views/events/edit.html.erb | |
| parent | bf68c8fed6776cd40d859e6e968a251b4b934c8b (diff) | |
Clean up events views: return_to, subnav, remove custom_rrule
- events_controller: wire return_to through show and new actions;
create respects return_to with fallback to node/event path;
new pre-populates node_id and tag_list from params
- events/edit: remove custom_rrule checkbox; node link removed from
subnav (use show for node navigation); destroy button added
- events/new: remove custom_rrule checkbox; add return_to hidden
field and back link; tag_list field added
- events/show: fix back link via safe_return_to; add node link to
subnav; add destroy button; remove custom_rrule display; show
humanized rrule below raw string
- events/index: destructive class on destroy button; node_id column
replaced with node link; show/edit links carry return_to
- nodes/show: add show/edit links to event entries with return_to
Diffstat (limited to 'app/views/events/edit.html.erb')
| -rw-r--r-- | app/views/events/edit.html.erb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb index 17457df4..5aee5019 100644 --- a/app/views/events/edit.html.erb +++ b/app/views/events/edit.html.erb | |||
| @@ -1,9 +1,6 @@ | |||
| 1 | <% content_for :subnavigation do %> | 1 | <% content_for :subnavigation do %> |
| 2 | <%= link_to 'back', safe_return_to(params[:return_to] || events_path) %> | 2 | <%= link_to 'back', safe_return_to(params[:return_to] || events_path) %> |
| 3 | <% if @event.node %> | 3 | <%= button_to 'destroy', event_path(@event), method: :delete, form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } %> |
| 4 | <%= link_to 'node', edit_node_path(@event.node) %> | ||
| 5 | <% end %> | ||
| 6 | <%= link_to 'show', @event %> | ||
| 7 | <% end %> | 4 | <% end %> |
| 8 | 5 | ||
| 9 | <h1>Editing event</h1> | 6 | <h1>Editing event</h1> |
| @@ -25,8 +22,8 @@ | |||
| 25 | <%= f.text_field :rrule %> | 22 | <%= f.text_field :rrule %> |
| 26 | </p> | 23 | </p> |
| 27 | <p> | 24 | <p> |
| 28 | <%= f.label :custom_rrule %><br /> | 25 | <%= f.label :tag_list, "Tags" %><br /> |
| 29 | <%= f.check_box :custom_rrule %> | 26 | <%= f.text_field :tag_list %> |
| 30 | </p> | 27 | </p> |
| 31 | <p> | 28 | <p> |
| 32 | <%= f.label :allday %><br /> | 29 | <%= f.label :allday %><br /> |
