diff --git a/app/views/admin/budget_investments/_search_form.html.erb b/app/views/admin/budget_investments/_search_form.html.erb index dc3269443..94ae8fc0b 100644 --- a/app/views/admin/budget_investments/_search_form.html.erb +++ b/app/views/admin/budget_investments/_search_form.html.erb @@ -1,61 +1,61 @@ <% init_advanced_menu %> <%= form_tag(admin_budget_budget_investments_path(budget: @budget), method: :get, enforce_utf8: false) do %> -
-
- <%= link_to "#advanced_filters_content", - data: {toggle: "advanced_filters"}, - class: "advanced-filters float-right clear" do %> - <%= t("admin.budget_investments.index.advanced_filters") %> - <% end %> -
+
+ <%= link_to "#advanced_filters_content", + data: {toggle: "advanced_filters"}, + class: "advanced-filters float-right clear" do %> + <%= t("admin.budget_investments.index.advanced_filters") %> + <% end %>
-
-
- <% ["feasible", "selected", "undecided", "unfeasible"].each do |option| %> + +
+
+
+ <% ["feasible", "selected", "undecided", "unfeasible"].each do |option| %> +
+ <%= check_box_tag "advanced_filters[]", option, params[:advanced_filters].index(option), id: "advanced_filters_#{option}" %> + <%= t("admin.budget_investments.index.filters.#{option}") %> +
+ <% end %>
- <%= check_box_tag "advanced_filters[]", option, params[:advanced_filters].index(option), id: "advanced_filters_#{option}" %> - <%= t("admin.budget_investments.index.filters.#{option}") %> + <%= text_field_tag :min_total_supports, params["min_total_supports"], placeholder: t("admin.budget_investments.index.filters.min_total_supports") %>
- <% end %> -
- <%= text_field_tag :min_total_supports, params["min_total_supports"], placeholder: t("admin.budget_investments.index.filters.min_total_supports") %>
-
-
- <%= select_tag :administrator_id, - options_for_select(admin_select_options, params[:administrator_id]), - { prompt: t("admin.budget_investments.index.administrator_filter_all"), - label: false} %> -
-
- <%= select_tag :valuator_or_group_id, - options_for_select(valuator_or_group_select_options, params[:valuator_or_group_id]), - { prompt: t("admin.budget_investments.index.valuator_filter_all"), - label: false} %> -
-
- <%= select_tag :heading_id, - options_for_select(budget_heading_select_options(@budget), params[:heading_id]), - { prompt: t("admin.budget_investments.index.heading_filter_all"), - label: false} %> -
-
- <%= select_tag :tag_name, - options_for_select(investment_tags_select_options(@budget), params[:tag_name]), - { prompt: t("admin.budget_investments.index.tags_filter_all"), - label: false} %> + +
+ <%= select_tag :administrator_id, + options_for_select(admin_select_options, params[:administrator_id]), + { prompt: t("admin.budget_investments.index.administrator_filter_all"), + label: false} %> +
+
+ <%= select_tag :valuator_or_group_id, + options_for_select(valuator_or_group_select_options, params[:valuator_or_group_id]), + { prompt: t("admin.budget_investments.index.valuator_filter_all"), + label: false} %> +
+
+ <%= select_tag :heading_id, + options_for_select(budget_heading_select_options(@budget), params[:heading_id]), + { prompt: t("admin.budget_investments.index.heading_filter_all"), + label: false} %> +
+
+ <%= select_tag :tag_name, + options_for_select(investment_tags_select_options(@budget), params[:tag_name]), + { prompt: t("admin.budget_investments.index.tags_filter_all"), + label: false} %> +
+ +
+
+ <%= text_field_tag :title_or_id, params["title_or_id"], placeholder: t("admin.budget_investments.index.placeholder") %>
-
-
-
- <%= text_field_tag :title_or_id, params["title_or_id"], placeholder: t("admin.budget_investments.index.placeholder") %> -
-
-
- <%= submit_tag t("admin.budget_investments.index.buttons.filter"), class: "button expanded" %> -
+ +
+ <%= submit_tag t("admin.budget_investments.index.buttons.filter"), class: "button expanded" %>
<% end %> diff --git a/app/views/admin/budget_phases/_form.html.erb b/app/views/admin/budget_phases/_form.html.erb index 3119ba3f1..a962353af 100644 --- a/app/views/admin/budget_phases/_form.html.erb +++ b/app/views/admin/budget_phases/_form.html.erb @@ -1,67 +1,59 @@ <%= form_for [:admin, @phase.budget, @phase] do |f| %> -
-
-
- <%= f.label :starts_at, t("admin.budget_phases.edit.start_date") %> - <%= f.text_field :starts_at, - value: format_date_for_calendar_form(@phase.starts_at), - class: "js-calendar-full", - id: "start_date", - label: false %> -
-
- <%= f.label :ends_at, t("admin.budget_phases.edit.end_date") %> - <%= f.text_field :ends_at, - value: format_date_for_calendar_form(@phase.ends_at), - class: "js-calendar-full", - id: "end_date", - label: false %> -
-
- -
-
- <%= f.label :description, t("admin.budget_phases.edit.description") %> - -

- <%= t("admin.budget_phases.edit.description_help_text") %> -

- - <%= f.cktext_area :description, - maxlength: Budget::Phase::DESCRIPTION_MAX_LENGTH, - ckeditor: { language: I18n.locale }, - label: false %> -
-
- -
-
- <%= f.label :summary, t("admin.budget_phases.edit.summary") %> - -

- <%= t("admin.budget_phases.edit.summary_help_text") %> -

- - <%= f.cktext_area :summary, - maxlength: Budget::Phase::SUMMARY_MAX_LENGTH, - ckeditor: { language: I18n.locale }, - label: false %> -
-
- -
-
- <%= f.check_box :enabled, label: t("admin.budget_phases.edit.enabled") %> - -

- <%= t("admin.budget_phases.edit.enabled_help_text") %> -

-
-
- -
- <%= f.submit t("admin.budget_phases.edit.save_changes"), class: "button success" %> -
+
+ <%= f.label :starts_at, t("admin.budget_phases.edit.start_date") %> + <%= f.text_field :starts_at, + value: format_date_for_calendar_form(@phase.starts_at), + class: "js-calendar-full", + id: "start_date", + label: false %>
+
+ <%= f.label :ends_at, t("admin.budget_phases.edit.end_date") %> + <%= f.text_field :ends_at, + value: format_date_for_calendar_form(@phase.ends_at), + class: "js-calendar-full", + id: "end_date", + label: false %> +
+ +
+ <%= f.label :description, t("admin.budget_phases.edit.description") %> + + + <%= t("admin.budget_phases.edit.description_help_text") %> + + + <%= f.cktext_area :description, + maxlength: Budget::Phase::DESCRIPTION_MAX_LENGTH, + ckeditor: { language: I18n.locale }, + label: false %> +
+ +
+ <%= f.label :summary, t("admin.budget_phases.edit.summary") %> + + + <%= t("admin.budget_phases.edit.summary_help_text") %> + + + <%= f.cktext_area :summary, + maxlength: Budget::Phase::SUMMARY_MAX_LENGTH, + ckeditor: { language: I18n.locale }, + label: false %> +
+ + +
+ <%= f.check_box :enabled, label: t("admin.budget_phases.edit.enabled") %> + + + <%= t("admin.budget_phases.edit.enabled_help_text") %> + +
+ +
+ <%= f.submit t("admin.budget_phases.edit.save_changes"), class: "button success expanded" %> +
+ <% end %> diff --git a/app/views/admin/budget_phases/edit.html.erb b/app/views/admin/budget_phases/edit.html.erb index 2d9659c7b..634f10c9f 100644 --- a/app/views/admin/budget_phases/edit.html.erb +++ b/app/views/admin/budget_phases/edit.html.erb @@ -1,5 +1,7 @@ <%= back_link_to edit_admin_budget_path(@phase.budget) %> -

<%= t("admin.budgets.edit.title") %> - <%= t("budgets.phase.#{@phase.kind}") %>

+
+

<%= t("admin.budgets.edit.title") %> - <%= t("budgets.phase.#{@phase.kind}") %>

+
<%= render '/admin/budget_phases/form' %> diff --git a/app/views/admin/budgets/_form.html.erb b/app/views/admin/budgets/_form.html.erb index 8de6deae0..9a31c6cd2 100644 --- a/app/views/admin/budgets/_form.html.erb +++ b/app/views/admin/budgets/_form.html.erb @@ -1,59 +1,65 @@ <%= form_for [:admin, @budget] do |f| %> - <%= f.text_field :name, maxlength: Budget.title_max_length %> +
+ <%= f.text_field :name, maxlength: Budget.title_max_length %> +
-
-
+
+
<%= f.select :phase, budget_phases_select_options, selected: "drafting" %>
-
+
<%= f.select :currency_symbol, budget_currency_symbol_select_options %>
<% if @budget.phases.present? %> - - - - - - - - - +
+
<%= t("admin.budgets.edit.phase") %><%= t("admin.budgets.edit.dates") %><%= t("admin.budgets.edit.enabled") %><%= t("admin.budgets.edit.actions") %>
+ + + + + + + + - <% @budget.phases.order(:id).each do |phase| %> - - - - - - - <% end %> -
<%= t("admin.budgets.edit.phase") %><%= t("admin.budgets.edit.dates") %><%= t("admin.budgets.edit.enabled") %><%= t("admin.budgets.edit.actions") %>
- <%= t("budgets.phase.#{phase.kind}") %> - <% if @budget.current_phase == phase %> - <%= t("admin.budgets.edit.active") %> - <% end %> - - <% if phase.starts_at.present? || phase.ends_at.present? %> - <%= l(phase.starts_at.to_date) if phase.starts_at.present? %> - - - <%= l(phase.ends_at.to_date) if phase.ends_at.present? %> - <% else %> - <%= t("admin.budgets.edit.blank_dates") %> - <% end %> - - - - <%= link_to t("admin.budgets.edit.edit_phase"), - edit_admin_budget_budget_phase_path(@budget, phase), - method: :get, class: "button hollow" %> -
+ <% @budget.phases.order(:id).each do |phase| %> + + + <%= t("budgets.phase.#{phase.kind}") %> + <% if @budget.current_phase == phase %> + <%= t("admin.budgets.edit.active") %> + <% end %> + + + <% if phase.starts_at.present? || phase.ends_at.present? %> + <%= l(phase.starts_at.to_date) if phase.starts_at.present? %> + - + <%= l(phase.ends_at.to_date) if phase.ends_at.present? %> + <% else %> + <%= t("admin.budgets.edit.blank_dates") %> + <% end %> + + + + + + <%= link_to t("admin.budgets.edit.edit_phase"), + edit_admin_budget_budget_phase_path(@budget, phase), + method: :get, class: "button hollow expanded" %> + + + <% end %> + +
<% end %> -
- <%= f.submit nil, class: "button success" %> +
+
+ <%= f.submit nil, class: "button success" %> +
<% if @budget.balloting_process? %> @@ -72,9 +78,9 @@ <%= link_to t("admin.budgets.edit.delete"), admin_budget_path(@budget), method: :delete, - class: "button hollow alert float-right margin-left" %> + class: "delete float-right margin-left" %> <% end %>
-
+ <% end %> diff --git a/app/views/admin/budgets/_max_headings_label.html.erb b/app/views/admin/budgets/_max_headings_label.html.erb index 61bf98dc7..0bf1cbcbb 100644 --- a/app/views/admin/budgets/_max_headings_label.html.erb +++ b/app/views/admin/budgets/_max_headings_label.html.erb @@ -1,5 +1,4 @@ <%= t("admin.budgets.form.max_votable_headings")%> <%= content_tag(:strong, - t('admin.budgets.form.current_of_max_headings', current: current, max: max ), - class:"current-of-max-headings") %> - + t("admin.budgets.form.current_of_max_headings", current: current, max: max), + class: "current-of-max-headings") %> diff --git a/app/views/admin/budgets/edit.html.erb b/app/views/admin/budgets/edit.html.erb index 6c54cc75b..a4a9c2729 100644 --- a/app/views/admin/budgets/edit.html.erb +++ b/app/views/admin/budgets/edit.html.erb @@ -1,5 +1,7 @@ <%= back_link_to admin_budgets_path %> -

<%= t("admin.budgets.edit.title") %>

+
+

<%= t("admin.budgets.edit.title") %>

+
<%= render '/admin/budgets/form' %> diff --git a/app/views/admin/budgets/index.html.erb b/app/views/admin/budgets/index.html.erb index d585a9891..b93a65103 100644 --- a/app/views/admin/budgets/index.html.erb +++ b/app/views/admin/budgets/index.html.erb @@ -2,7 +2,7 @@ <%= link_to t("admin.budgets.index.new_link"), new_admin_budget_path, - class: "button float-right margin-right" %> + class: "button float-right" %> <%= render 'shared/filter_subnav', i18n_namespace: "admin.budgets.index" %> diff --git a/app/views/admin/budgets/new.html.erb b/app/views/admin/budgets/new.html.erb index 3fa0fac89..efe1a47e2 100644 --- a/app/views/admin/budgets/new.html.erb +++ b/app/views/admin/budgets/new.html.erb @@ -1,7 +1,5 @@ -
-
-

<%= t("admin.budgets.new.title") %>

- - <%= render '/admin/budgets/form' %> -
+
+

<%= t("admin.budgets.new.title") %>

+ +<%= render '/admin/budgets/form' %>