Using the name instead of using the name and the price is IMHO more consistent with the rest of the application, particularly for screen reader users. Writing texts clicking those links is also easier. I think the main reason why we used the price as part of the link was so the clickable area was bigger. We can accomplish the same result with CSS.
19 lines
569 B
Plaintext
19 lines
569 B
Plaintext
<div id="groups_and_headings" class="groups-and-headings">
|
|
<% budget.groups.each do |group| %>
|
|
<h2 id="<%= group.name.parameterize %>"><%= group.name %></h2>
|
|
<ul class="headings-list">
|
|
<% group.headings.sort_by_name.each do |heading| %>
|
|
<li class="heading">
|
|
<%= link_to_unless(
|
|
(budget.informing? || budget.finished?),
|
|
heading.name,
|
|
budget_investments_path(budget.id, heading_id: heading.id)
|
|
) %>
|
|
|
|
<%= price(heading) %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|
|
</div>
|