diff --git a/app/views/admin/communication/websites/agenda/events/_dates.html.erb b/app/views/admin/communication/websites/agenda/events/_dates.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..3b51677715973ac61ce4da74932fb1f6bf68cc48 --- /dev/null +++ b/app/views/admin/communication/websites/agenda/events/_dates.html.erb @@ -0,0 +1,9 @@ +<i class="fas fa-play-circle"></i> +<%= l event.from_day %> +<%= l event.from_hour, format: "%H:%M" if event.from_hour %> +<% if event.to_day%> + <br> + <i class="fas fa-stop-circle"></i> + <%= l event.to_day %> + <%= l event.to_hour, format: "%H:%M" if event.to_hour %> +<% end %> \ No newline at end of file diff --git a/app/views/admin/communication/websites/agenda/events/_list.html.erb b/app/views/admin/communication/websites/agenda/events/_list.html.erb index a3624d30e9786cc728a9fdb218d8c6f952f09daa..a58354711c009ec69e5ed64ec7baa7d0b0573739 100644 --- a/app/views/admin/communication/websites/agenda/events/_list.html.erb +++ b/app/views/admin/communication/websites/agenda/events/_list.html.erb @@ -18,9 +18,7 @@ admin_communication_website_agenda_event_path(website_id: event.website.id, id: event.id), class: "#{'draft' unless event.published?}" %> </td> - <td> - - </td> + <td class="small"><%= render 'admin/communication/websites/agenda/events/dates', event: event %></td> <td><%= image_tag event.featured_image.representation(resize: '200x'), width: 100 if event.featured_image.attached? && event.featured_image.representable? %></td> </tr> diff --git a/app/views/admin/communication/websites/agenda/events/show.html.erb b/app/views/admin/communication/websites/agenda/events/show.html.erb index b7e6a24ea87cf0ba4581008f94db1774da98374d..3bd2fded9ad281eaf2eb25d37abff5c6a187a704 100644 --- a/app/views/admin/communication/websites/agenda/events/show.html.erb +++ b/app/views/admin/communication/websites/agenda/events/show.html.erb @@ -5,13 +5,7 @@ <div class="col-lg-7"> <%= osuny_panel Communication::Website::Agenda::Event.human_attribute_name(:title), small: true do %> <p class="lead"><%= @event.title %></p> - <p> - <%= l @event.from_day %> - <%= l @event.from_hour, format: "%H:%M" if @event.from_hour %> - <br> - → <%= l @event.to_day %> - <%= l @event.to_hour, format: "%H:%M" if @event.to_hour %> - </p> + <p><%= render 'admin/communication/websites/agenda/events/dates', event: @event %></p> <% end %> </div> <div class="offset-lg-1 col-lg-4"> @@ -41,7 +35,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @event %> <%= duplicate_link @event %> - <%= static_link static_admin_communication_website_post_path(@event) %> + <%= static_link static_admin_communication_website_agenda_event_path(@event) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/communication/websites/agenda/events/static.html.erb b/app/views/admin/communication/websites/agenda/events/static.html.erb index 8f4dc2b7e390a5c2b98e07484ca4e60a2da92ad0..a95e2cb5b53036ee33c8d5571a12da403294a3ff 100644 --- a/app/views/admin/communication/websites/agenda/events/static.html.erb +++ b/app/views/admin/communication/websites/agenda/events/static.html.erb @@ -1,25 +1,11 @@ --- title: "<%= @about.title %>" -date: "<%= @about.published_at&.iso8601 %>" +date: "<%= @about.from_day&.iso8601 %>" <%= render 'admin/application/static/permalink' %> <%= render 'admin/application/static/design', full_width: false, toc_offcanvas: false %> -<% if @about.pinned %> -weight: 1 -<% end %> -<% if @about.author %> -authors: - - "<%= @about.translated_author.slug %>" -<% end %> -<% if @about.categories.any? %> -categories: - <% @about.categories.each do |category| %> - - "<%= category.slug_with_ancestors_slugs %>" - <% end %> -<% end %> <%= render 'admin/application/i18n/static' %> <%= render 'admin/application/featured_image/static' %> <%= render 'admin/application/meta_description/static' %> <%= render 'admin/application/summary/static' %> <%= render 'admin/communication/blocks/content/static', about: @about %> --- -<%= prepare_html_for_static @about.text, @about.university %>