Merge pull request #3268 from consul/budget-polish
[Backport] Budgets UI minor fixes
This commit is contained in:
@@ -1253,16 +1253,12 @@
|
||||
display: inline-block;
|
||||
margin-bottom: $line-height / 2;
|
||||
|
||||
&:hover {
|
||||
background: $highlight;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: $line-height / 2;
|
||||
|
||||
&:hover {
|
||||
background: $highlight;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,8 @@ module BudgetsHelper
|
||||
end
|
||||
|
||||
def css_for_ballot_heading(heading)
|
||||
return '' if current_ballot.blank?
|
||||
current_ballot.has_lines_in_heading?(heading) ? 'is-active' : ''
|
||||
return "" if current_ballot.blank? || @current_filter == "unfeasible"
|
||||
current_ballot.has_lines_in_heading?(heading) ? "is-active" : ""
|
||||
end
|
||||
|
||||
def current_ballot
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
</div>
|
||||
|
||||
<div class="float-right">
|
||||
<% if @budget.balloting_process? %>
|
||||
<%= link_to t("admin.budgets.winners.calculate"),
|
||||
<% if display_calculate_winners_button?(@budget) %>
|
||||
<%= link_to calculate_winner_button_text(@budget),
|
||||
calculate_winners_admin_budget_path(@budget),
|
||||
method: :put,
|
||||
class: "button hollow" %>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="row margin">
|
||||
<div id="select-district" class="small-12 medium-7 column select-district">
|
||||
<div id="headings" class="small-12 medium-7 column select-district">
|
||||
<div class="row">
|
||||
<% @group.headings.order_by_group_name.each_slice(7) do |slice| %>
|
||||
<div class="small-6 medium-4 column end">
|
||||
|
||||
@@ -94,22 +94,28 @@
|
||||
<%= render_map(nil, "budgets", false, nil, @budgets_coordinates) %>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<ul class="no-bullet margin-top">
|
||||
<% show_links = show_links_to_budget_investments(current_budget) %>
|
||||
<% if show_links %>
|
||||
<%= link_to budget_url(current_budget) do %>
|
||||
<small><%= t("budgets.index.investment_proyects") %></small>
|
||||
<% end %><br>
|
||||
<li>
|
||||
<%= link_to budget_url(current_budget) do %>
|
||||
<small><%= t("budgets.index.investment_proyects") %></small>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%= link_to budget_url(current_budget, filter: 'unfeasible') do %>
|
||||
<small><%= t("budgets.index.unfeasible_investment_proyects") %></small>
|
||||
<% end %><br>
|
||||
<% if show_links %>
|
||||
<%= link_to budget_url(current_budget, filter: 'unselected') do %>
|
||||
<small><%= t("budgets.index.not_selected_investment_proyects") %></small>
|
||||
<li>
|
||||
<%= link_to budget_url(current_budget, filter: "unfeasible") do %>
|
||||
<small><%= t("budgets.index.unfeasible_investment_proyects") %></small>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if show_links %>
|
||||
<li>
|
||||
<%= link_to budget_url(current_budget, filter: "unselected") do %>
|
||||
<small><%= t("budgets.index.not_selected_investment_proyects") %></small>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</p>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<div id="all_phases">
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
<div class="callout warning">
|
||||
<%= t("budgets.investments.show.project_unfeasible_html") %>
|
||||
</div>
|
||||
<% elsif investment.winner? %>
|
||||
<% elsif investment.winner? && @budget.finished? %>
|
||||
<div class="callout success">
|
||||
<strong><%= t("budgets.investments.show.project_winner") %></strong>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user