Replace collection with board in the code, tests green
This commit is contained in:
|
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
@@ -12,7 +12,7 @@ module AccessesHelper
|
|||||||
|
|
||||||
def access_toggles_for(users, selected:)
|
def access_toggles_for(users, selected:)
|
||||||
render partial: "boards/access_toggle",
|
render partial: "boards/access_toggle",
|
||||||
board: users, as: :user,
|
collection: users, as: :user,
|
||||||
locals: { selected: selected },
|
locals: { selected: selected },
|
||||||
cached: ->(user) { [ user, selected ] }
|
cached: ->(user) { [ user, selected ] }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<input placeholder="Filter…" class="input input--transparent full-width txt-small" type="search" autocorrect="off" autocomplete="off" data-1p-ignore="true" data-filter-target="input" data-action="input->filter#filter">
|
<input placeholder="Filter…" class="input input--transparent full-width txt-small" type="search" autocorrect="off" autocomplete="off" data-1p-ignore="true" data-filter-target="input" data-action="input->filter#filter">
|
||||||
|
|
||||||
<ul class="settings__user-list margin-block-half" data-filter-target="list">
|
<ul class="settings__user-list margin-block-half" data-filter-target="list">
|
||||||
<%= render partial: "account/settings/user", board: users %>
|
<%= render partial: "account/settings/user", collection: users %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
<%= turbo_stream.replace([ @board, :entropy ], partial: "boards/edit/auto_close", locals: { board: @board }) %>
|
<%= turbo_stream.replace([ @board, :entropy ], partial: "boards/edit/auto_close", locals:{ board: @board }) %>
|
||||||
<%= turbo_stream_flash(notice: "Saved") %>
|
<%= turbo_stream_flash(notice: "Saved") %>
|
||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
<%= turbo_stream.replace([ @board, :publication ], partial: "boards/edit/publication", locals: { board: @board }) %>
|
<%= turbo_stream.replace([ @board, :publication ], partial: "boards/edit/publication", locals:{ board: @board }) %>
|
||||||
<%= turbo_stream_flash(notice: "Saved") %>
|
<%= turbo_stream_flash(notice: "Saved") %>
|
||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
<%= turbo_stream.replace([ @board, :publication ], partial: "boards/edit/publication", locals: { board: @board }) %>
|
<%= turbo_stream.replace([ @board, :publication ], partial: "boards/edit/publication", locals:{ board: @board }) %>
|
||||||
<%= turbo_stream_flash(notice: "Saved") %>
|
<%= turbo_stream_flash(notice: "Saved") %>
|
||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
<%= render "boards/show/stream", board: board, page: page %>
|
<%= render "boards/show/stream", board: board, page: page %>
|
||||||
|
|
||||||
<div class="card-columns__right">
|
<div class="card-columns__right">
|
||||||
<%= render partial: "boards/show/column", board: board.columns.sorted, cached: ->(column){ [ column, column.leftmost?, column.rightmost? ] } %>
|
<%= render partial: "boards/show/column", collection: board.columns.sorted, cached: ->(column){ [ column, column.leftmost?, column.rightmost? ] } %>
|
||||||
<%= render "boards/show/closed", board: board %>
|
<%= render "boards/show/closed", board: board %>
|
||||||
|
|
||||||
<%= render "boards/show/menu/columns", board: board %>
|
<%= render "boards/show/menu/columns", board: board %>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<%= messages_tag(card) do %>
|
<%= messages_tag(card) do %>
|
||||||
<% if card.published? %>
|
<% if card.published? %>
|
||||||
<%= render partial: "cards/comments/comment", board: card.comments.chronologically, cached: true %>
|
<%= render partial: "cards/comments/comment", collection: card.comments.chronologically, cached: true %>
|
||||||
<%= render "cards/comments/new", card: card %>
|
<%= render "cards/comments/new", card: card %>
|
||||||
|
|
||||||
<%= render "cards/comments/watchers", card: card %>
|
<%= render "cards/comments/watchers", card: card %>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<%= turbo_frame_tag comment, :reacting do %>
|
<%= turbo_frame_tag comment, :reacting do %>
|
||||||
<div class="reactions">
|
<div class="reactions">
|
||||||
<div id="<%= dom_id(comment, :reactions) %>" class="reactions__list">
|
<div id="<%= dom_id(comment, :reactions) %>" class="reactions__list">
|
||||||
<%= render partial: "cards/comments/reactions/reaction", board: comment.reactions.includes(:reacter).ordered %>
|
<%= render partial: "cards/comments/reactions/reaction", collection: comment.reactions.includes(:reacter).ordered %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= turbo_frame_tag comment, :new_reaction do %>
|
<%= turbo_frame_tag comment, :new_reaction do %>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%= render partial: "cards/display/preview", board: cards, as: :card, locals: { draggable: local_assigns.fetch(:draggable, false) }, cached: true %>
|
<%= render partial: "cards/display/preview", collection: cards, as: :card, locals: { draggable: local_assigns.fetch(:draggable, false) }, cached: true %>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%= render partial: "cards/display/public_preview", board: cards, as: :card, cached: true %>
|
<%= render partial: "cards/display/public_preview", collection: cards, as: :card, cached: true %>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<ol class="steps txt-small margin-block-start-auto">
|
<ol class="steps txt-small margin-block-start-auto">
|
||||||
<%= render partial: "cards/steps/step", board: card.steps, as: :step %>
|
<%= render partial: "cards/steps/step", collection: card.steps, as: :step %>
|
||||||
|
|
||||||
<li id="<%= dom_id(card, :new_step) %>" class="step">
|
<li id="<%= dom_id(card, :new_step) %>" class="step">
|
||||||
<input type="checkbox" class="step__checkbox" disabled>
|
<input type="checkbox" class="step__checkbox" disabled>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<%= turbo_stream.remove "#{params[:target]}-load-page-#{@page.number}" %>
|
<%= turbo_stream.remove "#{params[:target]}-load-page-#{@page.number}" %>
|
||||||
|
|
||||||
<%= turbo_stream.append params[:target] do %>
|
<%= turbo_stream.append params[:target] do %>
|
||||||
<%= render partial: "cards/display/preview", board: @page.records, as: :card, cached: true %>
|
<%= render partial: "cards/display/preview", collection: @page.records, as: :card, cached: true %>
|
||||||
|
|
||||||
<% unless @page.last? %>
|
<% unless @page.last? %>
|
||||||
<%= cards_next_page_link params[:target], page: @page, filter: @filter, fetch_on_visible: @filter.indexed_by.closed? %>
|
<%= cards_next_page_link params[:target], page: @page, filter: @filter, fetch_on_visible: @filter.indexed_by.closed? %>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%= turbo_stream.replace("closed-cards", partial: "boards/show/closed", method: :morph, locals: { board: @card.board }) %>
|
<%= turbo_stream.replace("closed-cards", partial: "boards/show/closed", method: :morph, locals:{ board: @card.board }) %>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%= turbo_stream.replace("not-now", partial: "boards/show/not_now", method: :morph, locals: { board: @card.board }) %>
|
<%= turbo_stream.replace("not-now", partial: "boards/show/not_now", method: :morph, locals:{ board: @card.board }) %>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%= turbo_stream.replace("the-stream", partial: "boards/show/stream", method: :morph, locals: { board: @card.board, page: @page }) %>
|
<%= turbo_stream.replace("the-stream", partial: "boards/show/stream", method: :morph, locals:{ board: @card.board, page: @page }) %>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<% day_timeline.events.group_by { it.created_at.hour }.each do |hour, events_grouped_by_hour| %>
|
<% day_timeline.events.group_by { it.created_at.hour }.each do |hour, events_grouped_by_hour| %>
|
||||||
<% events_grouped_by_hour.group_by { event_column(it) }.each do |column, events| %>
|
<% events_grouped_by_hour.group_by { event_column(it) }.each do |column, events| %>
|
||||||
<%= event_cluster_tag(hour, column) do %>
|
<%= event_cluster_tag(hour, column) do %>
|
||||||
<%= render partial: "events/event", board: events %>
|
<%= render partial: "events/event", collection: events %>
|
||||||
<%= local_datetime_tag events.first.created_at, class: "event__timestamp txt-small translucent" %>
|
<%= local_datetime_tag events.first.created_at, class: "event__timestamp txt-small translucent" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<h3 class="events__column-header"><%= column[:title] %></h3>
|
<h3 class="events__column-header"><%= column[:title] %></h3>
|
||||||
<% column[:events].group_by { it.created_at.hour }.each do |hour, events| %>
|
<% column[:events].group_by { it.created_at.hour }.each do |hour, events| %>
|
||||||
<%= event_cluster_tag(hour, column[:index]) do %>
|
<%= event_cluster_tag(hour, column[:index]) do %>
|
||||||
<%= render partial: "events/event", board: events, cached: true %>
|
<%= render partial: "events/event", collection: events, cached: true %>
|
||||||
<%= local_datetime_tag events.first.created_at, class: "event__timestamp txt-small translucent" %>
|
<%= local_datetime_tag events.first.created_at, class: "event__timestamp txt-small translucent" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<% if eventable&.has_attachments? || eventable&.has_remote_images? || eventable&.has_remote_videos? %>
|
<% if eventable&.has_attachments? || eventable&.has_remote_images? || eventable&.has_remote_videos? %>
|
||||||
<span class="event_attachments margin-block-half flex align-center gap-half">
|
<span class="event_attachments margin-block-half flex align-center gap-half">
|
||||||
<%= render partial: "events/event/attachments/attachment", board: eventable.attachments %>
|
<%= render partial: "events/event/attachments/attachment", collection: eventable.attachments %>
|
||||||
<%= render partial: "events/event/attachments/remote_image", board: eventable.remote_images %>
|
<%= render partial: "events/event/attachments/remote_image", collection: eventable.remote_images %>
|
||||||
<%= render partial: "events/event/attachments/remote_video", board: eventable.remote_videos %>
|
<%= render partial: "events/event/attachments/remote_video", collection: eventable.remote_videos %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<h1 class="title">Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %></h1>
|
<h1 class="title">Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %></h1>
|
||||||
<p class="subtitle margin-block-end-double">You have <%= link_to pluralize(@notifications.count, "new notification"), notifications_url %>.</p>
|
<p class="subtitle margin-block-end-double">You have <%= link_to pluralize(@notifications.count, "new notification"), notifications_url %>.</p>
|
||||||
<%= render partial: "notification/bundle_mailer/notification", board: @notifications, as: :notification %>
|
<%= render partial: "notification/bundle_mailer/notification", collection: @notifications, as: :notification %>
|
||||||
<p class="footer">Fizzy emails you about new notifications every few hours. <br>
|
<p class="footer">Fizzy emails you about new notifications every few hours. <br>
|
||||||
<%= link_to "Change how often you get these", notifications_settings_url %>
|
<%= link_to "Change how often you get these", notifications_settings_url %>
|
||||||
or <%= link_to "unsubscribe from all email notifications", new_notifications_unsubscribe_url(access_token: @unsubscribe_token) %>.
|
or <%= link_to "unsubscribe from all email notifications", new_notifications_unsubscribe_url(access_token: @unsubscribe_token) %>.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %>
|
Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %>
|
||||||
You have <%= pluralize @notifications.count, "new notification" %>.
|
You have <%= pluralize @notifications.count, "new notification" %>.
|
||||||
|
|
||||||
<%= render partial: "notification/bundle_mailer/notification", board: @notifications, as: :notification %>
|
<%= render partial: "notification/bundle_mailer/notification", collection: @notifications, as: :notification %>
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Fizzy emails you about new notifications every few hours.
|
Fizzy emails you about new notifications every few hours.
|
||||||
|
|||||||
@@ -7,6 +7,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<% if user_filtering.boards.any? %>
|
<% if user_filtering.boards.any? %>
|
||||||
<%= render partial: "my/menus/boards/board", board: user_filtering.boards, as: :board %>
|
<%= render partial: "my/menus/boards/board", collection: user_filtering.boards, as: :board %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<%= collapsible_nav_section "Saved filters", id: "my-filters" do %>
|
<%= collapsible_nav_section "Saved filters", id: "my-filters" do %>
|
||||||
<%= form_with url: cards_path, method: :get, data: { controller: "form" } do |form| %>
|
<%= form_with url: cards_path, method: :get, data: { controller: "form" } do |form| %>
|
||||||
<%= render "my/menus/saved_filter/create" %>
|
<%= render "my/menus/saved_filter/create" %>
|
||||||
<%= render partial: "my/menus/saved_filter/filter", board: filters, as: :filter %>
|
<%= render partial: "my/menus/saved_filter/filter", collection: filters, as: :filter %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<%= collapsible_nav_section "Tags" do %>
|
<%= collapsible_nav_section "Tags" do %>
|
||||||
<%= render partial: "my/menus/tags/tag", board: user_filtering.tags, as: :tag %>
|
<%= render partial: "my/menus/tags/tag", collection: user_filtering.tags, as: :tag %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<%= render partial: "my/menus/users/user", board: user_filtering.users, as: :user %>
|
<%= render partial: "my/menus/users/user", collection: user_filtering.users, as: :user %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<%= turbo_frame_tag "pins" do %>
|
<%= turbo_frame_tag "pins" do %>
|
||||||
<%= render partial: "my/pins/pin", board: @pins %>
|
<%= render partial: "my/pins/pin", collection: @pins %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="notifications_list" contents>
|
<div id="notifications_list" contents>
|
||||||
<%= render partial: "notifications/notification", board: @unread, cached: true %>
|
<%= render partial: "notifications/notification", collection: @unread, cached: true %>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<h2 class="txt-medium margin-block-start-double margin-block-end-half txt-uppercase translucent">Previously seen</h2>
|
<h2 class="txt-medium margin-block-start-double margin-block-end-half txt-uppercase translucent">Previously seen</h2>
|
||||||
|
|
||||||
<div id="notifications_list_read" contents>
|
<div id="notifications_list_read" contents>
|
||||||
<%= render partial: "notifications/notification", board: @page.records, cached: true %>
|
<%= render partial: "notifications/notification", collection: @page.records, cached: true %>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<%= turbo_stream.append :notifications_list_read, partial: "notifications/notification", board: @page.records %>
|
<%= turbo_stream.append :notifications_list_read, partial: "notifications/notification", collection: @page.records %>
|
||||||
<%= turbo_stream.replace :next_page, notifications_next_page_link(@page) %>
|
<%= turbo_stream.replace :next_page, notifications_next_page_link(@page) %>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="settings__panel settings__panel--users panel shadow center">
|
<div class="settings__panel settings__panel--users panel shadow center">
|
||||||
<h2 class="txt-medium txt-uppercase divider">Boards</h2>
|
<h2 class="txt-medium txt-uppercase divider">Boards</h2>
|
||||||
<div class="settings__user-list flex flex-column gap-half">
|
<div class="settings__user-list flex flex-column gap-half">
|
||||||
<%= render partial: "notifications/settings/board", board: @boards, locals: { user: Current.user } %>
|
<%= render partial: "notifications/settings/board", collection: @boards, locals: { user: Current.user } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<%= turbo_frame_tag "notifications" do %>
|
<%= turbo_frame_tag "notifications" do %>
|
||||||
<%= render partial: "notifications/notification", board: @notifications, cached: true %>
|
<%= render partial: "notifications/notification", collection: @notifications, cached: true %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<%= render partial: "prompts/boards/users/user", collection: @users %>
|
||||||
@@ -1 +1 @@
|
|||||||
<%= render partial: "prompts/cards/card", board: @cards %>
|
<%= render partial: "prompts/cards/card", collection: @cards %>
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<%= render partial: "prompts/boards/users/user", board: @users %>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user