Skip to content

Commit

Permalink
Show all the relations a partner has
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-kocienski-gfsc committed Feb 1, 2024
1 parent aa83379 commit 78e5d5a
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions app/views/admin/partners/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<% content_for :title do %>Editing <%= @partner.name %><% end %>
<h1 class="page-header">Edit Partner: <em><%= @partner.name %></em></h1>

<% if current_user.root? -%>
<p>ID: <%= @partner.id %></p>
<%# Show the Neighbourhood the partner is related to via Address %>
<% if @partner.address&.neighbourhood&.present? -%>
<p>Address in neighbourhood <%= link_to_neighbourhood(@partner.address.neighbourhood) %>.</p>
<% end -%>
<p>ID: <%= @partner.id %></p>
<%# Show the Neighbourhood the partner is related to via Address %>
<% if @partner.address&.neighbourhood&.present? -%>
<p>Address in neighbourhood <%= link_to_neighbourhood(@partner.address.neighbourhood) %>.</p>
<% end -%>

<%# Show a list of Service Areas that the partner is related to %>
<% if @partner.service_areas.any? -%>
<p>In service areas <%= service_area_links(@partner) %>.</p>
<% end -%>
<% end %>
<%# Show a list of Service Areas that the partner is related to %>
<% if @partner.service_areas.any? -%>
<p>In service areas <%= service_area_links(@partner) %>.</p>
<% end -%>

<%# Show a list of sites that the partner is related to %>
<span id="partner-sites">
Expand Down

0 comments on commit 78e5d5a

Please sign in to comment.