Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/views/ach_transfers/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h1>Send an ACH transfer</h1>

<%= render "callout", type: "warning", title: "Important info about ACH transfers", footer: :questions do %>
<%= render "application/callout", type: "warning", title: "Important info about ACH transfers", footer: :questions do %>
<ul>
<li><strong>Sending via ACH is irreversible</strong>—you cannot cancel.</li>
<li>If you enter the wrong destination here, the money will permanently leave your account regardless.</li>
Expand All @@ -17,4 +17,4 @@
<%= render partial: "events/unauthorized_callout", locals: { action: "send an ACH" } %>
<% end %>

<%= render "form", ach_transfer: @ach_transfer %>
<%= render "ach_transfers/form", ach_transfer: @ach_transfer %>
2 changes: 1 addition & 1 deletion app/views/admin/balances.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="inline-block">
<%= form.text_field :q, value: params[:q], style: "vertical-align: top;", placeholder: "Search" %>
<%= button_tag("Search") %>
<%= render partial: "events_filter", locals: { form:, submit_disable_with_false: true, show_new: false } %>
<%= render partial: "admin/events_filter", locals: { form:, submit_disable_with_false: true, show_new: false } %>
<br><br>

<div style="display: flex; justify-content: space-between; align-items: center; column-gap: 0.5rem;">
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/events.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<button type="button" class="bg-muted ml2" <%= "disabled" if @events.total_count == 0 %>>Export <%= pluralize @events.total_count, "record" %></button>
<% end %>
<% end %>
<%= render partial: "events_filter", locals: { form:, action_buttons: export_button } %>
<%= render partial: "admin/events_filter", locals: { form:, action_buttons: export_button } %>
</div>
<% end %>

Expand Down
2 changes: 1 addition & 1 deletion app/views/announcements/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<h1>Create a new announcement</h1>

<%= turbo_frame_tag :create_announcement do %>
<%= render "announcement_form", announcement: @announcement, autosave: false, show_announcement_explanation: @show_announcement_explanation %>
<%= render "announcements/announcement_form", announcement: @announcement, autosave: false, show_announcement_explanation: @show_announcement_explanation %>
<% end %>
4 changes: 2 additions & 2 deletions app/views/announcements/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@

<%= turbo_frame_tag :post_editor do %>
<% if editing %>
<%= render partial: "announcement_form", locals: { announcement: @announcement } %>
<%= render partial: "announcements/announcement_form", locals: { announcement: @announcement } %>
<% else %>
<div class="card">
<%= render partial: "announcement_body", locals: { announcement: @announcement } %>
<%= render partial: "announcements/announcement_body", locals: { announcement: @announcement } %>
</div>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/application/_docs_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<% end %>
<% end %>

<%= render partial: "logo" %>
<%= render partial: "application/logo" %>

<%= render "application/command_bar" %>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
A charge of <%= render_money @cpt.amount_cents %> at '<%= @cpt.memo %>' occurred on your card for <%= @cpt.stripe_card.event.name %> ending in <%= @cpt.stripe_card.last4 %>.

<%= render partial: "attach_receipt", locals: { hcb_code: @cpt.local_hcb_code, upload_url: @upload_url } %>
<%= render partial: "canonical_pending_transaction_mailer/attach_receipt", locals: { hcb_code: @cpt.local_hcb_code, upload_url: @upload_url } %>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%= @cpt.memo %> has settled at <%= render_money @ct.amount_cents %>; this was a charge on your card ending in <%= @cpt.stripe_card.last4 %> that previously was <%= render_money @cpt.amount_cents %>.

<%= render partial: "attach_receipt", locals: { hcb_code: @cpt.local_hcb_code, upload_url: @upload_url } if @cpt.local_hcb_code.missing_receipt? %>
<%= render partial: "canonical_pending_transaction_mailer/attach_receipt", locals: { hcb_code: @cpt.local_hcb_code, upload_url: @upload_url } if @cpt.local_hcb_code.missing_receipt? %>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<span class="muted">No data</span>
<% end %>

<%= render "callout", type: "info", title: "Fraud prevention information", class: "mb-4" do %>
<%= render "application/callout", type: "info", title: "Fraud prevention information", class: "mb-4" do %>
<p class="m-0">Here's some information about the fraud check process as part of this card grant's pre-authorization configuration.</p>
<section class="details details--wide details--tall mt-3">
<p>
Expand Down
6 changes: 3 additions & 3 deletions app/views/card_grant/pre_authorizations/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@

<div class="flex justify-start flex-row gap-4">
<% if @pre_authorization.draft? %>
<%= render partial: "screenshot_form", locals: {
<%= render partial: "card_grant/pre_authorizations/screenshot_form", locals: {
upload_method: "attach_receipt_page",
turbo: true
} %>
<% end %>

<%= render partial: "screenshot_list", locals: {
<%= render partial: "card_grant/pre_authorizations/screenshot_list", locals: {
screenshots: @pre_authorization.screenshots.attachments,
shimmer:
} %>
</div>

<%= render partial: "screenshot_count", locals: {
<%= render partial: "card_grant/pre_authorizations/screenshot_count", locals: {
count: @pre_authorization.screenshots.count,
card_grant: @card_grant,
disabled: !@pre_authorization.draft?
Expand Down
2 changes: 1 addition & 1 deletion app/views/card_grants/edit_actions.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<turbo-frame id="edit_<%= @card_grant.id %>" autoscroll data-autoscroll-behavior="smooth">
<%= render "edit_nav", active: "actions" %>
<%= render "card_grants/edit_nav", active: "actions" %>

<% if @card_grant.active? %>
<div class="mt3 grid gap-8 *:self-center max-lg:!grid-cols-[1fr] lg:!grid-cols-[max-content 1fr]">
Expand Down
2 changes: 1 addition & 1 deletion app/views/card_grants/edit_overview.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<turbo-frame id="edit_<%= @card_grant.id %>" autoscroll data-autoscroll-behavior="smooth">
<%= render "edit_nav", active: "overview" %>
<%= render "card_grants/edit_nav", active: "overview" %>

<section class="details details--wide pb2 details--tall">
<p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/card_grants/edit_purpose.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<turbo-frame id="edit_<%= @card_grant.id %>" autoscroll data-autoscroll-behavior="smooth">
<%= render "edit_nav", active: "purpose" %>
<%= render "card_grants/edit_nav", active: "purpose" %>

<div class="flex gap-3">
<div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/card_grants/edit_usage_restrictions.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<turbo-frame id="edit_<%= @card_grant.id %>" autoscroll data-autoscroll-behavior="smooth">
<%= render "edit_nav", active: "usage" %>
<%= render "card_grants/edit_nav", active: "usage" %>

<div class="flex gap-3">
<div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/card_grants/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<% title "Send a card grant" %>
<h1>Send a card grant</h1>

<%= render "create_form", card_grant: @card_grant %>
<%= render "card_grants/create_form", card_grant: @card_grant %>
20 changes: 10 additions & 10 deletions app/views/card_grants/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<%= render partial: "card_grants/header_banner", locals: { card_grant: @card_grant, footer: } %>

<% if @card_grant.instructions.present? %>
<%= render "callout", title: "Instructions from #{@card_grant.event.name}", type: "info", class: "mb-4" do %>
<%= render "application/callout", title: "Instructions from #{@card_grant.event.name}", type: "info", class: "mb-4" do %>
<p class="m-0">
<%= @card_grant.instructions %>
</p>
Expand All @@ -32,32 +32,32 @@
<% if @card_grant.canceled? %>
<%= blankslate "Sorry, this grant was canceled!", class: "flex-grow" %>
<% else %>
<%= render partial: "invitation", locals: { card_grant: @card_grant } %>
<%= render partial: "card_grants/invitation", locals: { card_grant: @card_grant } %>
<% end %>
<%# Grantee has accepted invite %>
<% elsif @card_grant.user.admin? || organizer_signed_in? || @card_grant.user == current_user %>
<div class="justify-center grid grid-cols-1 <%= "md:grid-cols-2" if @card_grant.stripe_card.present? %>">
<% if @card_grant.stripe_card %>
<div>
<%= render @card_grant.stripe_card, headless: true %>
<%= render partial: "balance", locals: { card_grant: @card_grant } %>
<%= render partial: "canceled_warning", locals: { card_grant: @card_grant } %>
<%= render partial: "actions", locals: { card_grant: @card_grant } %>
<%= render "stripe_cards/stripe_card", stripe_card: @card_grant.stripe_card, headless: true %>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is changing this necessary? If you call render on a model is there more than one place it could live?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think changing it will make it faster

<%= render partial: "card_grants/balance", locals: { card_grant: @card_grant } %>
<%= render partial: "card_grants/canceled_warning", locals: { card_grant: @card_grant } %>
<%= render partial: "card_grants/actions", locals: { card_grant: @card_grant } %>
</div>
<% end %>
<div class="flex flex-col g2">
<% if @card_grant.stripe_card %>
<% admin_tool_if @card_grant.user != current_user do %>
<%= render partial: "card_details", locals: { card_grant: @card_grant } %>
<%= render partial: "card_grants/card_details", locals: { card_grant: @card_grant } %>
<% end %>
<% end %>
<%= render partial: "grant_details", locals: { card_grant: @card_grant } %>
<%= render partial: "card_grants/grant_details", locals: { card_grant: @card_grant } %>

<%= render partial: "card_grant/pre_authorizations/organizer_info", locals: { pre_authorization: @card_grant.pre_authorization, link_to_pre_authorization: true } if @card_grant.pre_authorization.present? && organizer_signed_in? %>

</div>
<div class="flex flex-col g2">
<%= render partial: "canceled_warning", locals: { card_grant: @card_grant } unless @card_grant.stripe_card %>
<%= render partial: "card_grants/canceled_warning", locals: { card_grant: @card_grant } unless @card_grant.stripe_card %>
</div>
</div>
<% end %>
Expand All @@ -66,7 +66,7 @@
<hr>

<% unless @card_grant.user == current_user && @card_grant.pending_invite? %>
<%= render partial: "transactions", locals: { hcb_codes: @hcb_codes } %>
<%= render partial: "card_grants/transactions", locals: { hcb_codes: @hcb_codes } %>
<% end %>

<% if policy(@card_grant.comments.build).create? %>
Expand Down
8 changes: 4 additions & 4 deletions app/views/card_grants/spending.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<%= turbo_frame_tag "spending_#{@card_grant.public_id}" do %>
<div class="mt4 mb4 check--form flex justify-center" style="gap: 3rem">
<div>
<%= render @card_grant.stripe_card if @card_grant.stripe_card.present? %>
<%= render partial: "balance", locals: { card_grant: @card_grant } %>
<%= render "stripe_cards/stripe_card", stripe_card: @card_grant.stripe_card if @card_grant.stripe_card.present? %>
<%= render partial: "card_grants/balance", locals: { card_grant: @card_grant } %>
</div>
</div>

<%= render partial: "details", locals: { card_grant: @card_grant } if organizer_signed_in? %>
<%= render partial: "card_grants/details", locals: { card_grant: @card_grant } if organizer_signed_in? %>

<hr>

<%= render partial: "transactions", locals: { hcb_codes: @hcb_codes, public: true } %>
<%= render partial: "card_grants/transactions", locals: { hcb_codes: @hcb_codes, public: true } %>
<% end %>
4 changes: 2 additions & 2 deletions app/views/check_deposits/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<h1 class="heading">Deposit a check</h1>

<div class="grid grid--spacious lg:grid-columns-[3fr_2fr]">
<%= render "new", event: @event %>
<%= render "callout", type: "info", title: "Check deposit basics", footer: :questions do %>
<%= render "check_deposits/new", event: @event %>
<%= render "application/callout", type: "info", title: "Check deposit basics", footer: :questions do %>
<ul class="pl-4">
<li>
The check must be made out to
Expand Down
2 changes: 1 addition & 1 deletion app/views/comments/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

<h1>Edit note</h1>

<%= render "form", comment: @comment, commentable: @commentable %>
<%= render "comments/form", comment: @comment, commentable: @commentable %>
4 changes: 2 additions & 2 deletions app/views/disbursements/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<%= form_with(model: disbursement, local: true, url: disbursements_path, html: { "x-data" => "{fee: null, event_id: null}" }) do |form| %>
<%= form_errors(disbursement, "Disbursements") %>

<%= render partial: "select_organization", locals: { form: form, field_name: "source_event_id", disabled: disabled, events: allowed_source_events, default_event: source_event, sending: true } %>
<%= render partial: "select_organization", locals: { form: form, field_name: "event_id", disabled: disabled, events: allowed_destination_events, default_event: destination_event, receiving: true, allow_custom_events: source_event&.plan&.unrestricted_disbursements_enabled? } %>
<%= render partial: "disbursements/select_organization", locals: { form: form, field_name: "source_event_id", disabled: disabled, events: allowed_source_events, default_event: source_event, sending: true } %>
<%= render partial: "disbursements/select_organization", locals: { form: form, field_name: "event_id", disabled: disabled, events: allowed_destination_events, default_event: destination_event, receiving: true, allow_custom_events: source_event&.plan&.unrestricted_disbursements_enabled? } %>

<% if auditor_signed_in? %>
<div class="admin-tools field field--checkbox">
Expand Down
2 changes: 1 addition & 1 deletion app/views/disbursements/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

<h1>Edit disbursement</h1>

<%= render "form", disbursement: @disbursement, event: @event, source_event: @source_event, allowed_source_events: @allowed_source_events, allowed_destination_events: @allowed_destination_events %>
<%= render "disbursements/form", disbursement: @disbursement, event: @event, source_event: @source_event, allowed_source_events: @allowed_source_events, allowed_destination_events: @allowed_destination_events %>
4 changes: 2 additions & 2 deletions app/views/disbursements/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h1>Send a HCB transfer</h1>

<%= render "callout", type: "warning", title: "Important info about transfers", footer: :questions do %>
<%= render "application/callout", type: "warning", title: "Important info about transfers", footer: :questions do %>
<p>Transfers are reviewed by the HCB team and process within 24 hours on weekdays.</p>
<% end %>

Expand All @@ -26,4 +26,4 @@
<% end %>
<% end %>

<%= render "form", disbursement: @disbursement, event: @event, source_event: @source_event, destination_event: @destination_event, allowed_source_events: @allowed_source_events, allowed_destination_events: @allowed_destination_events %>
<%= render "disbursements/form", disbursement: @disbursement, event: @event, source_event: @source_event, destination_event: @destination_event, allowed_source_events: @allowed_source_events, allowed_destination_events: @allowed_destination_events %>
2 changes: 1 addition & 1 deletion app/views/documents/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

<h1>Editing Document</h1>

<%= render "form", document: @document %>
<%= render "documents/form", document: @document %>
20 changes: 10 additions & 10 deletions app/views/documents/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,26 @@
</li>
<% end %>
<% end %>
<%= render partial: "document", collection: @active_documents&.general %>
<%= render partial: "document", collection: @active_common_documents.general %>
<%= render partial: "documents/document", collection: @active_documents&.general %>
<%= render partial: "documents/document", collection: @active_common_documents.general %>
</div>

<h3>Nonprofit status</h3>
<div class="grid grid-cols-3 gap-4">
<%= render partial: "document", collection: @active_documents&.nonprofit_status %>
<%= render partial: "document", collection: @active_common_documents.nonprofit_status %>
<%= render partial: "documents/document", collection: @active_documents&.nonprofit_status %>
<%= render partial: "documents/document", collection: @active_common_documents.nonprofit_status %>
</div>

<h3>Tax-exemption documents</h3>
<div class="grid grid-cols-3 gap-4">
<%= render partial: "document", collection: @active_documents&.tax_exemption %>
<%= render partial: "document", collection: @active_common_documents.tax_exemption %>
<%= render partial: "documents/document", collection: @active_documents&.tax_exemption %>
<%= render partial: "documents/document", collection: @active_common_documents.tax_exemption %>
</div>

<h3>Forms</h3>
<div class="grid grid-cols-3 gap-4">
<%= render partial: "document", collection: @active_documents&.forms %>
<%= render partial: "document", collection: @active_common_documents.forms %>
<%= render partial: "documents/document", collection: @active_documents&.forms %>
<%= render partial: "documents/document", collection: @active_common_documents.forms %>
</div>
</div>
</ul>
Expand All @@ -78,8 +78,8 @@
</summary>
<article>
<ul class="grid">
<%= render partial: "document", collection: @archived_documents %>
<%= render partial: "document", collection: @archived_common_documents %>
<%= render partial: "documents/document", collection: @archived_documents %>
<%= render partial: "documents/document", collection: @archived_common_documents %>
</ul>
</article>
</details>
Expand Down
2 changes: 1 addition & 1 deletion app/views/documents/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

<h1>New Document</h1>

<%= render "form", document: @document %>
<%= render "documents/form", document: @document %>
4 changes: 2 additions & 2 deletions app/views/donations/finish_donation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% page_sm %>
<% no_app_shell %>

<%= render "header" %>
<%= render "events/landing/header" %>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the correct partial but I don't understand how it was getting inferred before. From my understanding, events/landing would not have been on the path and it would have rendered from application.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has always confused me too


<%= turbo_frame_tag :donation do %>
<div class="card mb3 mt3">
Expand Down Expand Up @@ -37,4 +37,4 @@
</div>
<% end %>

<%= render "footer" %>
<%= render "events/landing/footer" %>
2 changes: 1 addition & 1 deletion app/views/donations/finished.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
</style>
<% end %>

<%= render "footer" %>
<%= render "events/landing/footer" %>
2 changes: 1 addition & 1 deletion app/views/donations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1>New Donation</h1>

<%= render "form", donation: @donation %>
<%= render "donations/form", donation: @donation %>

<%= link_to "Back", donations_path %>
2 changes: 1 addition & 1 deletion app/views/emburse_cards/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<article class="check--form flex align-start justify-center mt2">
<section class="center mt0 mx-auto" style="width: 400px; max-width: 100%;">
<%= render @emburse_card %>
<%= render "emburse_cards/emburse_card", emburse_card: @emburse_card %>
<%= link_to @emburse_card.emburse_path, target: "_blank", class: "btn bg-info mt2 md-mt3" do %>
<%= inline_icon "external" %>
View on Emburse
Expand Down
2 changes: 1 addition & 1 deletion app/views/emburse_transactions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= render "events/nav" if @event %>

<% if @emburse_card %>
<%= render @emburse_card %>
<%= render "emburse_cards/emburse_card", emburse_card: @emburse_card %>
<% end %>

<% admin_tool("mt3 mb0") do %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/emburse_transfers/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

<h1>Editing Transfer Request</h1>

<%= render "form", emburse_transfer: @emburse_transfer %>
<%= render "emburse_transfers/form", emburse_transfer: @emburse_transfer %>
2 changes: 1 addition & 1 deletion app/views/employees/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</h1>

<% if @employee.onboarding? %>
<%= render "callout", type: "warning", title: "#{@employee.user.name} is currently being onboarded" do %>
<%= render "application/callout", type: "warning", title: "#{@employee.user.name} is currently being onboarded" do %>
<div>
<span class="bold">They will only be able to submit invoices after being onboarded.</span>
To complete their onboarding, they must email a W-9 or W-8 BEN
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/_filter_cards.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="flex items-center filter-menu">
<%= render partial: "filter_cards_menu" %>
<%= render partial: "events/filter_cards_menu" %>

<% if @status || @user %>
<%= link_to nil, class: "-ml-2 pop muted tooltipped tooltipped--s", aria: { label: "Clear filters" }, data: { turbo_prefetch: "false" } do %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/_transfer_modal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

<%= render partial: "events/unauthorized_callout", locals: { action: "transfer money" } unless policy(@event).create_transfer? %>

<%= render "transfer_form" %>
<%= render "events/transfer_form" %>
<% end %>
</section>
Loading
Loading