Skip to content

Commit

Permalink
Changes stomped because of a wreckless force push (#78)
Browse files Browse the repository at this point in the history
* Changes stomped because of a wreckless force push

* Fix HTML ent Admin Show
  • Loading branch information
crespire authored Nov 17, 2024
1 parent d39ee7c commit 7f8cd91
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 76 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/events/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<%= render partial: "layouts/event_layout" %>

<% content_for :page_title do %>
<%= @event.name %>
<%== @event.name %>
<% end %>
14 changes: 0 additions & 14 deletions app/views/events/_event.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,16 @@
<div class="flex flex-col gap-3">
<p class="mb-2"><%= event.start_time %></p>
<%= event.location %>
<p>Food and drinks provided by our sponsor.</p>
</div>
</div>

<div class="w-full md:w-1/2 my-8 pl-1">
<h2 class="mb-2">Agenda</h2>

<p class="mb-0"><em>6pm</em></p>
<p class="ml-4">
Arrive, chat, and get pizza
</p>

<p class="mb-0"><em>7pm</em></p>
<div class="ml-4">
<div class="w-4/5 mt-2">
<%= event.description %>
</div>
</div>

<p class="mb-0"><em>remainder of time until 9pm</em></p>
<p class="ml-4">
Networking and drinks
</p>

</div>
</div>
<div class="mx-auto text-center">
Expand Down
45 changes: 0 additions & 45 deletions app/views/events/_event2.html.erb

This file was deleted.

12 changes: 6 additions & 6 deletions app/views/events/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<%= content_for :event_content do %>
<%= render partial: "event2", collection: @events %>

<h2 class="hidden only:block">We're planning our next outing, stay tuned!</h2>
<% end %>

<% content_for :page_title do %>
Home
<% end %>
Expand All @@ -14,4 +8,10 @@
looking forward to seeing you!
<% end %>

<%= content_for :event_content do %>
<%= render partial: "event", collection: @events %>

<h2 class="hidden only:block">We're planning our next outing, stay tuned!</h2>
<% end %>

<%= render partial: "layouts/event_layout" %>
4 changes: 2 additions & 2 deletions app/views/events/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<% content_for :page_title do %>
<%= @event.name %>
<%== @event.name %>
<% end %>

<%= content_for :event_content do %>
<%= render partial: "events/event2", locals: { event2: @event } %>
<%= render partial: "events/event", locals: { event: @event } %>
<% end %>

<%= render partial: "layouts/event_layout" %>
17 changes: 9 additions & 8 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
Rails.application.routes.draw do
resources :events, only: %i[index show], param: :slug do
collection do
get 'past', to: 'events#past'
get 'all', to: 'events#all', as: :all
get 'next', to: 'events#next'
end
end

namespace :admin do
root to: redirect('/admin/events')
resources :events
end

Expand All @@ -27,4 +20,12 @@
get 'about', to: 'static#about'
get 'calendar', to: 'static#calendar'
get 'code-of-conduct', to: 'static#coc'

resources :events, only: %i[index show], param: :slug do
collection do
get 'past', to: 'events#past'
get 'all', to: 'events#all', as: :all
get 'next', to: 'events#next'
end
end
end

0 comments on commit 7f8cd91

Please sign in to comment.