Add comments count on budget investments
This commit is contained in:
@@ -486,6 +486,7 @@
|
||||
.debate,
|
||||
.proposal,
|
||||
.budget-investment,
|
||||
.budget-investment-show,
|
||||
.legislation,
|
||||
.communities-show {
|
||||
margin: $line-height / 4 0;
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<p class="investment-project-info">
|
||||
<%= l investment.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
|
||||
<span class="icon-comments"></span>
|
||||
<%= link_to t("shared.comments", count: investment.comments_count),
|
||||
budget_investment_path(investment.budget, investment, anchor: "comments") %>
|
||||
|
||||
<% if investment.author.hidden? || investment.author.erased? %>
|
||||
<span class="bullet"> • </span>
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
<span class="bullet"> • </span>
|
||||
<%= l investment.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="icon-comments"></span>
|
||||
<%= link_to t("shared.comments", count: investment.comments_count), "#comments" %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= investment.heading.name %>
|
||||
<span class="bullet"> • </span>
|
||||
<% if local_assigns[:preview].nil? %>
|
||||
|
||||
@@ -763,6 +763,10 @@ en:
|
||||
other: "%{count} languages in use"
|
||||
optional: "Optional fields"
|
||||
required: "Required fields"
|
||||
comments:
|
||||
one: "1 comment"
|
||||
other: "%{count} comments"
|
||||
zero: "No comments"
|
||||
social:
|
||||
facebook: "%{org} Facebook"
|
||||
twitter: "%{org} Twitter"
|
||||
|
||||
@@ -763,6 +763,10 @@ es:
|
||||
other: "%{count} idiomas en uso"
|
||||
optional: "Campos opcionales"
|
||||
required: "Campos obligatorios"
|
||||
comments:
|
||||
one: "1 comentario"
|
||||
other: "%{count} comentarios"
|
||||
zero: "Sin comentarios"
|
||||
social:
|
||||
facebook: "Facebook de %{org}"
|
||||
twitter: "Twitter de %{org}"
|
||||
|
||||
@@ -62,7 +62,11 @@ describe "Budget Investments" do
|
||||
investments.each do |investment|
|
||||
within("#budget-investments") do
|
||||
expect(page).to have_content investment.title
|
||||
expect(page).to have_css("a[href='#{budget_investment_path(budget, id: investment.id)}']", text: investment.title)
|
||||
expect(page).to have_content investment.comments_count
|
||||
expect(page).to have_link "No comments", href: budget_investment_path(budget, id: investment.id,
|
||||
anchor: "comments")
|
||||
expect(page).to have_link investment.title, href: budget_investment_path(budget, id: investment.id)
|
||||
|
||||
expect(page).not_to have_content(unfeasible_investment.title)
|
||||
end
|
||||
end
|
||||
@@ -849,6 +853,7 @@ describe "Budget Investments" do
|
||||
expect(page).to have_content(investment.title)
|
||||
expect(page).to have_content(investment.description)
|
||||
expect(page).to have_content(investment.author.name)
|
||||
expect(page).to have_content(investment.comments_count)
|
||||
expect(page).to have_content(investment.heading.name)
|
||||
within("#investment_code") do
|
||||
expect(page).to have_content(investment.id)
|
||||
|
||||
Reference in New Issue
Block a user