From 7b57d898da07811bb35ec088cb12505783a55214 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 9 Jul 2026 18:54:39 +0200 Subject: Add an events view for events without node --- app/views/events/without_node.html.erb | 28 ++++++++++++++++++++++++++++ config/routes.rb | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 app/views/events/without_node.html.erb diff --git a/app/views/events/without_node.html.erb b/app/views/events/without_node.html.erb new file mode 100644 index 0000000..52514ab --- /dev/null +++ b/app/views/events/without_node.html.erb @@ -0,0 +1,28 @@ +

Events without a node

+ +<%= link_to '← All events', events_path %> +<%= link_to 'New event', new_event_path, class: 'action_button' %> + +<%= will_paginate @events %> + + + + + + + + + + + +<% @events.each do |event| %> + + + + + + + + +<% end %> +
TitleStart timeEnd timeAlldayUrl
<%= link_to event.display_title, event %><%=h event.start_time %><%=h event.end_time %><%=h event.allday %><%=h event.url %><%= link_to 'edit', edit_event_path(event) %>
diff --git a/config/routes.rb b/config/routes.rb index 5d68828..c0aef2f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -20,7 +20,12 @@ Cccms::Application.routes.draw do scope '(:locale)', locale: /de|en/ do resources :tags - resources :events + + resources :events do + collection do + get :without_node + end + end get 'pages/:id/preview', to: 'pages#preview', as: :preview_page put 'pages/:id/sort_images', to: 'pages#sort_images', as: :sort_images_page -- cgit v1.3