Merge pull request #1738 from basecamp/done-column-expand-fix
Fix that 'closed'->'done' change broke this route
This commit is contained in:
@@ -17,6 +17,15 @@ class User::DayTimeline::Column
|
||||
safe_join(parts, " ")
|
||||
end
|
||||
|
||||
def base_title_for_route
|
||||
case base_title
|
||||
when "Done"
|
||||
"closed"
|
||||
else
|
||||
base_title.downcase
|
||||
end
|
||||
end
|
||||
|
||||
def events_by_hour
|
||||
limited_events.group_by { it.created_at.hour }
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<%= column.title %>
|
||||
|
||||
<% if column.events_by_hour.any? %>
|
||||
<%= link_to events_day_timeline_column_path(id: column.base_title.downcase, day: column.day_timeline.day.to_date), class: "events__maximize-button btn btn--circle txt-x-small borderless", data: { turbo_frame: "_top" } do %>
|
||||
<%= link_to events_day_timeline_column_path(id: column.base_title_for_route, day: column.day_timeline.day.to_date), class: "events__maximize-button btn btn--circle txt-x-small borderless", data: { turbo_frame: "_top" } do %>
|
||||
<%= icon_tag "grid", class: "translucent" %>
|
||||
<span class="for-screen-reader">Expand column</span>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user