Skip to content

Commit

Permalink
Adds helper for link
Browse files Browse the repository at this point in the history
  • Loading branch information
armahillo committed Sep 5, 2020
1 parent eb0dd28 commit f352e06
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions app/helpers/ui_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module UiHelper
def return_to_dashboard_button
link_to 'Return to Dashboard', root_path, { class: "btn btn-info pull-right" }
end
end
2 changes: 1 addition & 1 deletion app/views/casa_cases/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<div class="actions">
<%= form.submit "Create CASA Case", class: "btn btn-primary" %>
<%= link_to 'Return to Dashboard', { controller: "dashboard", action: :show}, { class: "btn btn-info pull-right" } %>
<%= return_to_dashboard_button %>
</div>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/case_contacts/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@

<div class="actions">
<%= form.submit "Submit", class: "btn btn-primary", id: "case-contact-submit" %>
<%= link_to 'Return to Dashboard', { controller: "dashboard", action: :show}, { class: "btn btn-info pull-right" } %>
<%= return_to_dashboard_button %>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/supervisors/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<div class="actions">
<%= form.submit "Create Supervisor", class: "btn btn-primary" %>
<%= link_to 'Return to Dashboard', { controller: "dashboard", action: :show}, { class: "btn btn-info pull-right" } %>
<%= return_to_dashboard_button %>
</div>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/volunteers/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

<div class="actions">
<%= form.submit "Create User", class: "btn btn-primary" %>
<%= link_to 'Return to Dashboard', { controller: "dashboard", action: :show}, { class: "btn btn-info pull-right" } %>
<%= return_to_dashboard_button %>
</div>
<% end %>

0 comments on commit f352e06

Please sign in to comment.