Editing event

<%= link_to 'Back', safe_return_to(params[:return_to] || events_path) %> <%= button_to event_path(@event), method: :delete, form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } do %> <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy <% end %>
<%= form_for(@event) do |f| %> <%= hidden_field_tag :return_to, @return_to %> <%= form_error_messages(f) %>
Node
<% if @event.node %> <%= link_to @event.node.title, node_path(@event.node) %>
Change node <%= text_field_tag :event_node_search_term %>
This will re-link the event to a different node — rarely needed.
<% else %> <%= text_field_tag :event_node_search_term %>
Optional — search and pick a node to associate this event with a page. <% end %> <%= f.hidden_field :node_id %>
Start time
<%= f.datetime_select :start_time %>
End time
<%= f.datetime_select :end_time %>
Recurrence

<% %w[MO TU WE TH FR SA SU].each do |code| %> <% end %>

<%= select_tag "rrule_excluded_month", options_for_select((1..12).map { |m| [RruleHumanizer::MONTH_NAMES[:de][m-1], m] }), style: "display: none;" %>

Builds the field below automatically. If your pattern is more complex than this covers, just edit it directly below - these controls won't touch it unless you use them.
<%= f.text_field :rrule, id: "event_rrule" %>
Title
<%= f.text_field :title %> Optional — if left blank, the associated node's title is used.
Tags
<%= f.text_field :tag_list %>
Allday
<%= f.check_box :allday %>
Url
<%= f.text_field :url %>
Latitude
<%= f.text_field :latitude %>
Longitude
<%= f.text_field :longitude %>
<%= f.submit 'Update' %>
<% end %>