Skip to content

Commit

Permalink
Merge pull request #38 from toronto-ruby/crespire/add-humi-logo
Browse files Browse the repository at this point in the history
Add Humi logo asset and various admin improvements
  • Loading branch information
crespire authored Jul 18, 2024
2 parents 23da45f + d00e36e commit d10f41e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Binary file added app/assets/images/sponsors/humi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/views/admin/events/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<%= form.label :sponsor_logo %>
<%= form.text_field :sponsor_logo %>
<%= form.label :start_at %>
<%= form.datetime_field :start_at, value: event&.start_at&.in_time_zone("Eastern Time (US & Canada)").presence || Time.zone.now.in_time_zone("Eastern Time (US & Canada)") %>
<%= form.datetime_field :start_at, include_seconds: false, value: event&.start_at&.in_time_zone("Eastern Time (US & Canada)").presence || Time.zone.now.in_time_zone("Eastern Time (US & Canada)") %>
<%= form.label :status %>
<%= form.select :status, options_for_select(Event.statuses_for_select, event.status) %>
<%= form.submit %>
Expand Down
9 changes: 6 additions & 3 deletions app/views/admin/events/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<h2>Event List</h2>
<%= link_to "New Event", new_admin_event_path %>
<%= link_to "New Event", new_admin_event_path, class: "rounded bg-ruby px-2 py-1 text-xs text-white" %>
<div class="flow-root">
<ul role="list" class="-mb-8">
<% @events.each do |event| %>
<li class="flex justify-between mb-2 w-72">
<%= event.name %>
<li class="flex gap-2 justify-between mb-2 w-72">
<span class="flex-grow">
<%= event.name %>
</span>
<%= link_to "Edit", edit_admin_event_path(event), class: "text-underline" %>
<%= button_to "Delete", admin_event_path(event), method: :delete, class: "rounded bg-red-600 px-2 py-1 text-xs font-semibold text-white shadow-sm hover:bg-red-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-600", data: {turbo_confirm: "Are you sure?"} %>
</li>
<% end %>
Expand Down

0 comments on commit d10f41e

Please sign in to comment.