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/new.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/new.html.erb')
| -rw-r--r-- | app/views/events/new.html.erb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb index cd892c5d..4e1ef53e 100644 --- a/app/views/events/new.html.erb +++ b/app/views/events/new.html.erb | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | <%= f.text_field :rrule %> | 16 | <%= f.text_field :rrule %> |
| 17 | </p> | 17 | </p> |
| 18 | <p> | 18 | <p> |
| 19 | <%= f.label :custom_rrule %><br /> | 19 | <%= f.label :tag_list, "Tags" %><br /> |
| 20 | <%= f.check_box :custom_rrule %> | 20 | <%= f.text_field :tag_list %> |
| 21 | </p> | 21 | </p> |
| 22 | <p> | 22 | <p> |
| 23 | <%= f.label :allday %><br /> | 23 | <%= f.label :allday %><br /> |
| @@ -37,10 +37,11 @@ | |||
| 37 | </p> | 37 | </p> |
| 38 | <p> | 38 | <p> |
| 39 | <%= f.hidden_field :node_id %> | 39 | <%= f.hidden_field :node_id %> |
| 40 | <%= hidden_field_tag :return_to, params[:return_to] %> | ||
| 40 | </p> | 41 | </p> |
| 41 | <p> | 42 | <p> |
| 42 | <%= f.submit 'Create' %> | 43 | <%= f.submit 'Create' %> |
| 43 | </p> | 44 | </p> |
| 44 | <% end %> | 45 | <% end %> |
| 45 | 46 | ||
| 46 | <%= link_to 'Back', events_path %> | 47 | <%= link_to 'Back', safe_return_to(params[:return_to] || events_path) %> |
