Skip to content

Commit

Permalink
fix: runs erb lint on project
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticspoon committed Jan 24, 2024
1 parent 9b66463 commit b4a690b
Show file tree
Hide file tree
Showing 155 changed files with 301 additions and 424 deletions.
17 changes: 8 additions & 9 deletions app/views/account_request_mailer/confirmation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,15 @@
<p>
Finally, we've made a series of getting started videos with detailed directions on setting up your essentials bank in Human Essentials, check them out:
<br>
<a href='https://youtu.be/w53iaJtlQUo'>Part 1</a><br/>
<a href='https://youtu.be/3-CF0wsG0h4'>Part 2</a><br/>
<a href='https://youtu.be/WkJahWsdZzc'>Part 3</a><br/>
<a href='https://youtu.be/STl0MfLQYbc'>Part 4</a><br/>
<a href='https://youtu.be/oREioR1Qg6c'>Part 5</a><br/>
<a href='https://youtu.be/feg59oW6V3M'>Part 6</a><br/>
<a href='https://youtu.be/wyD034nvqag'>Part 7</a><br/>
<a href='https://youtu.be/v3AyrL0pHw0'>Part 8</a><br/>
<a href='https://youtu.be/w53iaJtlQUo'>Part 1</a><br>
<a href='https://youtu.be/3-CF0wsG0h4'>Part 2</a><br>
<a href='https://youtu.be/WkJahWsdZzc'>Part 3</a><br>
<a href='https://youtu.be/STl0MfLQYbc'>Part 4</a><br>
<a href='https://youtu.be/oREioR1Qg6c'>Part 5</a><br>
<a href='https://youtu.be/feg59oW6V3M'>Part 6</a><br>
<a href='https://youtu.be/wyD034nvqag'>Part 7</a><br>
<a href='https://youtu.be/v3AyrL0pHw0'>Part 8</a><br>
Please let us know when you would like to begin using Human Essentials and we will set you up and send you a welcome email.
</p>

<p>Human Essential Team</p>

2 changes: 1 addition & 1 deletion app/views/account_request_mailer/rejection.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
</head>
<body>
<p>Greetings from the Human Essentials Team,</p>
Expand Down
1 change: 0 additions & 1 deletion app/views/account_requests/confirm.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
</div>
</div>
</div>

1 change: 0 additions & 1 deletion app/views/account_requests/invalid_token.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
</div>
</div>
</div>

4 changes: 2 additions & 2 deletions app/views/account_requests/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<%= radio_button_tag(:account, :partner, false, class: 'form-check-input account_type') %>
<%= label_tag(:account, "I am a Partner Agency to an Essentials Bank. I distribute the diapers/period supplies that I receive from essentials banks directly to the public.", class: 'form-check-label') %>
</div>

<% if @bank_selected %>
<script type="module">
$(document).ready(function() {
Expand Down Expand Up @@ -60,7 +60,7 @@
<%= simple_form_for(@account_request) do |f| %>
<%= f.error_notification %>
<%= render partial: "shared/flash" %>

<div class="form-inputs">
<div class="form-inputs">
<%= f.input :name, autofocus: true %>
Expand Down
1 change: 0 additions & 1 deletion app/views/account_requests/received.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
<p style="color: #ff0505;">Please check your spam filters for a email from <strong>no-reply@humanessentials.app</strong></p>
</div>
</div>

6 changes: 3 additions & 3 deletions app/views/adjustments/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="row">
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
<%= filter_select(label: "Filter by Storage Location", scope: :at_location, collection: @storage_locations, key: :id, value: :name, selected: @selected_location) %>

</div>
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
<%= filter_select(scope: :by_user, collection: @users, key: :id, value: :name, selected: @selected_user) %>
Expand All @@ -53,7 +53,7 @@
adjustments_path(format: :csv, filters: filter_params.merge(date_range: date_range_params)),
text: "Export Adjustments"
) if @adjustments.any? %>

<%= new_button_to new_adjustment_path(organization_id: current_organization), {text: "New Adjustment"} %>
</span>
</div>
Expand Down Expand Up @@ -107,4 +107,4 @@
</div>
</div>
</div>
</section>
</section>
2 changes: 1 addition & 1 deletion app/views/adjustments/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</tr>
</thead>
<tbody>
<% @adjustment.line_items.each do |line_item| %>
<% @adjustment.line_items.each do |line_item| %>
<tr class="<%= line_item.quantity > 0 ? "positive" : "negative" %>">
<td><%= (line_item.quantity > 0) ? "Added " : "Removed " %></td>
<td><%= line_item.item.name %></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<td><%= open_account_request.created_at&.strftime("%m/%d/%Y") %></td>
<td>
<%= open_account_request.organization_name %>
<br/><%= open_account_request.organization_website %>
<br><%= open_account_request.organization_website %>
</td>
<td><%= open_account_request.request_details %></td>
<td><%= open_account_request.status.titleize %></td>
<td>
<%= open_account_request.name %>
<br/><%= open_account_request.email %>
<br><%= open_account_request.email %>
</td>
<td><%= js_button(text: 'Reject',
icon: 'ban',
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/account_requests/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@
<tr>
<td>
<%= account_request.organization_name %>
<br/><%= account_request.organization_website %>
<br><%= account_request.organization_website %>
</td>
<td><%= account_request.request_details %></td>
<td><%= account_request.name %>
<br/><%= account_request.email %>
<br><%= account_request.email %>
</td>
<td><%= account_request.status.titleize %></td>
<td><%= account_request.confirmed_at&.strftime("%m/%d/%Y") || "N/A" %></td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/barcode_items/_barcode_modal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<% end %>
</div><!-- /.row -->
</div><!-- /.box-body -->
<input type="hidden" value="" id="trigger-field-id"/>
<input type="hidden" value="" id="trigger-field-id">
</div>
<div class="modal-footer justify-content-between">

Expand Down
1 change: 0 additions & 1 deletion app/views/admin/barcode_items/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
</div><!-- /.container-fluid -->
</section>


<section class="content">
<div class="container-fluid">
<div class="row">
Expand Down
3 changes: 1 addition & 2 deletions app/views/admin/barcode_items/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% content_for :title, "Admin - Inventory - Barcode Items - #{@barcode_item.item.name}" %>
<h1>
Barcode Information
<small>for <%= @barcode_item.item.name %></small>
<small>for <%= @barcode_item.item.name %></small>
</h1>
</div>
<div class="col-sm-6">
Expand All @@ -22,7 +22,6 @@
</div><!-- /.container-fluid -->
</section>


<section class="content">
<div class="container-fluid">
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/base_items/_dropdown.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
collection: @base_items,
label: "Base Item",
error: "Please choose what kind of basic item this is",
wrapper: :input_group %>
wrapper: :input_group %>
2 changes: 1 addition & 1 deletion app/views/admin/base_items/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
</div>
</div>
</div>
</section>
</section>
2 changes: 1 addition & 1 deletion app/views/admin/base_items/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
</div>
</div>
</div>
</section>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<td><%= link_to broadcast_announcement.link, broadcast_announcement.link %></td>
<td><%= broadcast_announcement.user&.name || "N/A" %></td>
<td><%= broadcast_announcement.expiry %>
<% if broadcast_announcement.expired? %>
<% if broadcast_announcement.expired? %>
<span class="badge badge-danger bg-danger">Expired</span>
<% end %>
</td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/broadcast_announcements/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="col-sm-6">
<% content_for :title, "Send broadcast announcement" %>
<h1>
Broadcast Announcement to Banks
Broadcast Announcement to Banks
</h1>
</div>
<div class="col-sm-6">
Expand Down
3 changes: 1 addition & 2 deletions app/views/admin/dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@
<ul class="users-list clearfix">
<% @recent_organizations.each do |org| %>
<li>
<%#= image_tag(org&.logo)
%>
<%#= image_tag(org&.logo) %>
<%= link_to org.name, admin_organization_path(org.id), class: "users-list-name" %>
<span class="users-list-date"><%= time_ago_in_words(org.created_at) %></span>
</li>
Expand Down
1 change: 0 additions & 1 deletion app/views/admin/organizations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<%= f.rich_text_area :default_email_text %>
<% end %>


<%= f.input :logo, wrapper: :input_group do %>

<% if @organization.logo.attached? %>
Expand Down
9 changes: 0 additions & 9 deletions app/views/admin/partners/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
</div><!-- /.container-fluid -->
</section>






<section class="content">
<div class="container-fluid">
<div class="row">
Expand Down Expand Up @@ -60,7 +55,3 @@
</div>
</div>
</section>




3 changes: 1 addition & 2 deletions app/views/admin/users/_roles.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
class: 'select form-control',
data: { 'double-select-target': 'source',
'action': 'double-select#sourceChanged'
}
%>
} %>
</div>
</div>
<div class="form-group">
Expand Down
1 change: 0 additions & 1 deletion app/views/admin/users/_user_form_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
<span class="input-group-text"><%= fa_icon "envelope" %></span>
<%= f.input_field :email, class: "form-control" %>
<% end %>

1 change: 0 additions & 1 deletion app/views/admin/users/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@
<% unless @user == current_user %>
<%= render partial: 'roles', object: @user, as: :user %>
<% end %>

2 changes: 0 additions & 2 deletions app/views/admin/users/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
</div><!-- /.container-fluid -->
</section>



<section class="content">
<div class="container-fluid">
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion app/views/audits/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="card-footer">
<%= filter_button %>
<%= clear_filter_button %>

<div class="btn-group pull-right">
<%= new_button_to new_audit_path(organization_id: current_organization), {text: "New Audit"} %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/audits/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</tr>
</thead>
<tbody>
<% @inventory_items.each do |inventory_item| %>
<% @inventory_items.each do |inventory_item| %>
<% line_item = @audit.line_items.find_by(item: inventory_item.item) %>
<tr class="<%= line_item.nil? ? "negative" : (line_item.quantity.equal?(inventory_item.quantity) ? "positive" : "highlight") %>">
<td><%= inventory_item.item.name %></td>
Expand Down
4 changes: 2 additions & 2 deletions app/views/barcode_items/_barcode_item_lookup.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<% # Increment a counter on how many we've seen so that we can create a unique ID -- really only necessary for test hooks # %>
<input type="text" id=<%= "_barcode-lookup-#{index}" %> class="__barcode_item_lookup form-control" value="" placeholder="Barcode Entry" data-organization-id="<%= params[:organization_id] %>" />
<%# Increment a counter on how many we've seen so that we can create a unique ID -- really only necessary for test hooks %>
<input type="text" id="<%= "_barcode-lookup-#{index}" %>" class="__barcode_item_lookup form-control" value="" placeholder="Barcode Entry" data-organization-id="<%= params[:organization_id] %>" autocomplete="none">
2 changes: 1 addition & 1 deletion app/views/barcode_items/_barcode_item_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<td><%= barcode_item_row.value %></td>
<td class="text-right">
<%= view_button_to barcode_item_path(barcode_item_row) %>
<%= edit_button_to edit_barcode_item_path(barcode_item_row) %>
<%= edit_button_to edit_barcode_item_path(barcode_item_row) %>
<%= delete_button_to barcode_item_path(barcode_item_row), { confirm: confirm_delete_msg(barcode_item_row.item.name) } %>
</tr>
4 changes: 2 additions & 2 deletions app/views/barcode_items/_barcode_modal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<% end %>
</div><!-- /.row -->
</div><!-- /.box-body -->
<input type="hidden" value="" id="trigger-field-id"/>
<input type="hidden" value="" id="trigger-field-id">
</div>
<div class="modal-footer justify-content-between">

Expand All @@ -39,4 +39,4 @@
<% end #form %>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/barcode_items/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/barcode_items/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@
</div>
</div>
</div>
</section>
</section>
4 changes: 2 additions & 2 deletions app/views/barcode_items/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% content_for :title, "Barcode Items - #{@barcode_item.item.name} - Inventory - #{current_organization.name}" %>
<h1>
Barcode Information
<small>for <%= @barcode_item.item.name %></small>
<small>for <%= @barcode_item.item.name %></small>
</h1>
</div>
<div class="col-sm-6">
Expand Down Expand Up @@ -54,4 +54,4 @@
</div>
</div>
</div>
</section>
</section>
2 changes: 1 addition & 1 deletion app/views/base_items/_dropdown.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
value_method: :partner_key,
label: "Base Item",
error: "Please choose what kind of basic item this is",
wrapper: :input_group %>
wrapper: :input_group %>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<td><%= link_to broadcast_announcement.link, broadcast_announcement.link %></td>
<td><%= broadcast_announcement.user&.name || "N/A" %></td>
<td><%= broadcast_announcement.expiry %>
<% if broadcast_announcement.expired? %>
<% if broadcast_announcement.expired? %>
<span class="badge badge-danger bg-danger">Expired</span>
<% end %>
</td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/dashboard/_donation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
</div>
<div class="pull-right">
<%= distance_of_time_in_words_to_now donation.created_at %> ago
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/dashboard/_getting_started_prompt.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<p>
As an essentials bank, you might already have inventory on hand. These items might have come from previous donations/purchases. If you have multiple sources or want to add inventory to multiple storage locations, you can create multiple donations or purchases while specifying the correct date, source, and location.
</p>
</div >
</div>

<div id="org-stats-call-to-action-inventory">
<%= new_button_to new_donation_path, { text: "Add past donation", size: "md" } %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<th>Total On Hand</th>
</tr>
</thead>
<% # Ordering from highest distributed to lowest %>
<%# Ordering from highest distributed to lowest %>
<% (local_assigns[:itemized_breakdown] || []).each do |item| %>
<tbody>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion app/views/dashboard/_itemized_donations_partial.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<th>Total On Hand</th>
</tr>
</thead>
<% # Ordering from highest distributed to lowest %>
<%# Ordering from highest distributed to lowest %>
<% (local_assigns[:itemized_breakdown] || []).each do |item| %>
<tbody>
<tr>
Expand Down
Loading

0 comments on commit b4a690b

Please sign in to comment.