diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-09 18:55:25 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-09 18:55:25 +0200 |
| commit | 83a74c6d01e0be50d5806d8253de9f2ad6d5c143 (patch) | |
| tree | 7bec8499b690d689e39dd0aa8050adadf421dbfd /app | |
| parent | 6dcbf019deda9ec2809f8735c8b10ba3a5701189 (diff) | |
Rework events#new with the new layout paradigm
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/events/new.html.erb | 89 |
1 files changed, 49 insertions, 40 deletions
diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb index 4e1ef53..b20fe48 100644 --- a/app/views/events/new.html.erb +++ b/app/views/events/new.html.erb | |||
| @@ -1,47 +1,56 @@ | |||
| 1 | <h1>New event</h1> | 1 | <h1>New event</h1> |
| 2 | 2 | ||
| 3 | <%= link_to 'Back', safe_return_to(params[:return_to] || events_path) %> | ||
| 4 | |||
| 3 | <%= form_for(@event) do |f| %> | 5 | <%= form_for(@event) do |f| %> |
| 4 | <%= form_error_messages(f) %> | 6 | <%= form_error_messages(f) %> |
| 5 | 7 | ||
| 6 | <p> | 8 | <div id="page_editor"> |
| 7 | <%= f.label :start_time %><br /> | 9 | <div id="content"> |
| 8 | <%= f.datetime_select :start_time %> | 10 | <div class="node_description">Node</div> |
| 9 | </p> | 11 | <div class="node_content"> |
| 10 | <p> | 12 | <%= text_field_tag :event_node_search_term %> |
| 11 | <%= f.label :end_time %><br /> | 13 | <div id="search_results"></div> |
| 12 | <%= f.datetime_select :end_time %> | 14 | <%= f.hidden_field :node_id %> |
| 13 | </p> | 15 | <span class="field_hint">Optional — search and pick a node to associate this event with a page.</span> |
| 14 | <p> | 16 | </div> |
| 15 | <%= f.label :rrule %><br /> | 17 | |
| 16 | <%= f.text_field :rrule %> | 18 | <div class="node_description">Start time</div> |
| 17 | </p> | 19 | <div class="node_content"><%= f.datetime_select :start_time %></div> |
| 18 | <p> | 20 | |
| 19 | <%= f.label :tag_list, "Tags" %><br /> | 21 | <div class="node_description">End time</div> |
| 20 | <%= f.text_field :tag_list %> | 22 | <div class="node_content"><%= f.datetime_select :end_time %></div> |
| 21 | </p> | 23 | |
| 22 | <p> | 24 | <div class="node_description">Rrule</div> |
| 23 | <%= f.label :allday %><br /> | 25 | <div class="node_content"><%= f.text_field :rrule %></div> |
| 24 | <%= f.check_box :allday %> | 26 | |
| 25 | </p> | 27 | <div class="node_description">Title</div> |
| 26 | <p> | 28 | <div class="node_content"> |
| 27 | <%= f.label :url %><br /> | 29 | <%= f.text_field :title %> |
| 28 | <%= f.text_field :url %> | 30 | <span id="event_title_hint" class="field_hint">Optional — if left blank, the associated node's title is used.</span> |
| 29 | </p> | 31 | </div> |
| 30 | <p> | 32 | |
| 31 | <%= f.label :latitude %><br /> | 33 | <div class="node_description">Tags</div> |
| 32 | <%= f.text_field :latitude %> | 34 | <div class="node_content"><%= f.text_field :tag_list %></div> |
| 33 | </p> | 35 | |
| 34 | <p> | 36 | <div class="node_description">Allday</div> |
| 35 | <%= f.label :longitude %><br /> | 37 | <div class="node_content"><%= f.check_box :allday %></div> |
| 36 | <%= f.text_field :longitude %> | 38 | |
| 37 | </p> | 39 | <div class="node_description">Url</div> |
| 38 | <p> | 40 | <div class="node_content"><%= f.text_field :url %></div> |
| 39 | <%= f.hidden_field :node_id %> | 41 | |
| 40 | <%= hidden_field_tag :return_to, params[:return_to] %> | 42 | <div class="node_description">Latitude</div> |
| 41 | </p> | 43 | <div class="node_content"><%= f.text_field :latitude %></div> |
| 42 | <p> | 44 | |
| 43 | <%= f.submit 'Create' %> | 45 | <div class="node_description">Longitude</div> |
| 44 | </p> | 46 | <div class="node_content"><%= f.text_field :longitude %></div> |
| 47 | |||
| 48 | <div class="node_description"></div> | ||
| 49 | <div class="node_content"><%= hidden_field_tag :return_to, params[:return_to] %></div> | ||
| 50 | |||
| 51 | <div class="node_description"></div> | ||
| 52 | <div class="node_content"><%= f.submit 'Create' %></div> | ||
| 53 | </div> | ||
| 54 | </div> | ||
| 45 | <% end %> | 55 | <% end %> |
| 46 | 56 | ||
| 47 | <%= link_to 'Back', safe_return_to(params[:return_to] || events_path) %> | ||
