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:
Javi Martín
2021-03-27 14:07:15 +01:00
parent 45693e084b
commit 5831f190ba
3 changed files with 3 additions and 2 deletions

View File

@@ -1,5 +1,3 @@
<%= back_link_to %>
<div id="graph" class="small-12 column">
<h2><%= t "admin.stats.graph.#{name || event}" %> (<%= count %>)</h2>
<%= chart_tag id: name, event: event %>

View File

@@ -2,4 +2,6 @@
<%= javascript_include_tag "stat_graphs", "data-turbolinks-track" => "reload" %>
<% end %>
<%= back_link_to admin_stats_path %>
<%= render "graph", name: @name, event: @event, count: @count %>

View File

@@ -109,6 +109,7 @@ describe "Stats", :admin do
end
expect(page).to have_content "Votes 3"
expect(page).to have_link "Go back", count: 1
end
scenario "Number of users that have supported an investment project" do