Skip to content

Commit

Permalink
Merge pull request #519 from amatsuda/admin_events
Browse files Browse the repository at this point in the history
Show status rather than state at admin/events
  • Loading branch information
amatsuda authored Mar 6, 2025
2 parents 232f8f7 + 7cca5b9 commit e5674cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions app/controllers/admin/events_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
class Admin::EventsController < Admin::ApplicationController
before_action :require_event, only: [:destroy, :archive, :unarchive]

def index
@events = Event.order(:archived, id: :desc)
end

def new
@event = Event.new
end
Expand Down Expand Up @@ -39,9 +43,4 @@ def unarchive
end
redirect_to admin_events_path
end

def index
@events = Event.order(:archived, id: :desc)
end

end
2 changes: 1 addition & 1 deletion app/views/admin/events/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
%tr
%td= link_to event.name, event_staff_edit_path(event_slug: event.slug)
%td= "#{event.start_date.to_fs(:month_day) unless event.start_date.blank?} - #{event.end_date.to_fs(:month_day_year) unless event.end_date.blank?}"
%td= event.state
%td= event.status
%td= event.opens_at.to_fs(:long_with_zone) unless event.opens_at.blank?
%td= event.closes_at.to_fs(:long_with_zone) unless event.closes_at.blank?
- if event.current?
Expand Down

0 comments on commit e5674cd

Please sign in to comment.