Skip to content

Commit

Permalink
Fix plan author presenting if the author is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
ahukkanen committed Sep 26, 2023
1 parent ce8dc71 commit 269b413
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions app/views/decidim/plans/plans/_linked_plans.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@
<%= link_to resource_locator(plan).path, class: "card__link" do %>
<h5 class="card--list__heading"><%== decidim_html_escape(present(plan).title) %></h5>
<% end %>
<% present(plan) do |plan| %>
<% author = present(plan.author) %>
<div class="author">
<span class="author__avatar">
<%= image_tag author.avatar_url %>
</span>
<span class="author__name">
<strong><%= author.name %></strong>
<%= author.nickname %>
</span>
</div>
<% present(plan) do |presenter| %>
<% author = present(presenter.author) %>
<% if author.present? %>
<div class="author">
<span class="author__avatar">
<%= image_tag author.avatar_url %>
</span>
<span class="author__name">
<strong><%= author.name %></strong>
<%= author.nickname %>
</span>
</div>
<% end %>
<% end %>
</div>
</div>
Expand Down

0 comments on commit 269b413

Please sign in to comment.