adds tags to investment

This commit is contained in:
rgarcia
2017-01-08 11:37:02 +01:00
parent 864c703ac4
commit fd28f6c2b3
23 changed files with 823 additions and 348 deletions

View File

@@ -0,0 +1,11 @@
<div class="sidebar-divider"></div>
<h2 class="sidebar-title"><%= t("shared.tags_cloud.categories") %></h2>
<br>
<ul id="categories" class="no-bullet categories">
<% @categories.each do |category| %>
<li class="inline-block">
<%= link_to category.name,
budget_investments_path(@budget, search: category.name) %></li>
<% end %>
</ul>

View File

@@ -38,6 +38,7 @@
<p><%= link_to investment.description, namespaced_budget_investment_path(investment) %></p>
<div class="truncate"></div>
</div>
<%= render "shared/tags", taggable: investment, limit: 5 %>
<% end %>
</div>
</div>

View File

@@ -35,7 +35,7 @@
</p>
<% end %>
<%= render 'shared/tags', taggable: @investment, url: budget_investments_path(@budget) %>
<%= render 'shared/tags', taggable: @investment %>
<%= safe_html_with_links investment.description.html_safe %>

View File

@@ -9,6 +9,8 @@
verify: link_to(t("budget.investments.index.sidebar.verify_account"), verification_path)).html_safe %>
</div>
<% end %>
<%= render "shared/tag_cloud", taggable: 'budget/investment' %>
<%= render 'categories' %>
<% end %>
<div class="sidebar-divider"></div>