Fix "Go back" link in stat graphs
The link appeared twice when visiting stats for a budget's supporting phase.
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
<%= back_link_to %>
|
|
||||||
|
|
||||||
<div id="graph" class="small-12 column">
|
<div id="graph" class="small-12 column">
|
||||||
<h2><%= t "admin.stats.graph.#{name || event}" %> (<%= count %>)</h2>
|
<h2><%= t "admin.stats.graph.#{name || event}" %> (<%= count %>)</h2>
|
||||||
<%= chart_tag id: name, event: event %>
|
<%= chart_tag id: name, event: event %>
|
||||||
|
|||||||
@@ -2,4 +2,6 @@
|
|||||||
<%= javascript_include_tag "stat_graphs", "data-turbolinks-track" => "reload" %>
|
<%= javascript_include_tag "stat_graphs", "data-turbolinks-track" => "reload" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= back_link_to admin_stats_path %>
|
||||||
|
|
||||||
<%= render "graph", name: @name, event: @event, count: @count %>
|
<%= render "graph", name: @name, event: @event, count: @count %>
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ describe "Stats", :admin do
|
|||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "Votes 3"
|
expect(page).to have_content "Votes 3"
|
||||||
|
expect(page).to have_link "Go back", count: 1
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Number of users that have supported an investment project" do
|
scenario "Number of users that have supported an investment project" do
|
||||||
|
|||||||
Reference in New Issue
Block a user