diff --git a/app/views/admin/budget_investments/edit.html.erb b/app/views/admin/budget_investments/edit.html.erb index e1f48f0c9..ef6540c9e 100644 --- a/app/views/admin/budget_investments/edit.html.erb +++ b/app/views/admin/budget_investments/edit.html.erb @@ -4,130 +4,132 @@ <%= render "shared/globalize_locales", resource: @investment %> -<%= translatable_form_for @investment, - url: admin_budget_budget_investment_path(@budget, @investment) do |f| %> +
+ <%= translatable_form_for @investment, + url: admin_budget_budget_investment_path(@budget, @investment) do |f| %> - <%= render "shared/errors", resource: @investment %> + <%= render "shared/errors", resource: @investment %> - <% Budget::Investment.filter_params(params).to_h.each do |filter_name, filter_value| %> - <%= hidden_field_tag filter_name, filter_value %> - <% end %> - -
- <%= f.translatable_fields do |translations_form| %> -
- <%= translations_form.text_field :title, - maxlength: Budget::Investment.title_max_length %> -
- -
- <%= translations_form.cktext_area :description, - maxlength: Budget::Investment.description_max_length, - ckeditor: { language: I18n.locale } %> -
+ <% Budget::Investment.filter_params(params).to_h.each do |filter_name, filter_value| %> + <%= hidden_field_tag filter_name, filter_value %> <% end %> -
- <%= f.label :tag_list, t("admin.budget_investments.edit.user_tags") %> - <%= f.text_field :tag_list, - value: @investment.tag_list.sort.join(","), - label: false %> -
+
+ <%= f.translatable_fields do |translations_form| %> +
+ <%= translations_form.text_field :title, + maxlength: Budget::Investment.title_max_length %> +
-
-
- <%= f.text_field :external_url %> +
+ <%= translations_form.cktext_area :description, + maxlength: Budget::Investment.description_max_length, + ckeditor: { language: I18n.locale } %> +
+ <% end %> + +
+ <%= f.label :tag_list, t("admin.budget_investments.edit.user_tags") %> + <%= f.text_field :tag_list, + value: @investment.tag_list.sort.join(","), + label: false %>
-
- <%= f.select :heading_id, budget_heading_select_options(@budget), include_blank: t("admin.budget_investments.edit.select_heading") %> -
-
-
+
+
+ <%= f.text_field :external_url %> +
-
- -
-

<%= t("admin.budget_investments.edit.classification") %>

- -
- <%= f.select(:administrator_id, - @admins.collect{ |a| [a.description_or_name_and_email, a.id ] }, - { include_blank: t("admin.budget_investments.edit.undefined") }) %> +
+ <%= f.select :heading_id, budget_heading_select_options(@budget), include_blank: t("admin.budget_investments.edit.select_heading") %> +
-
- <%= f.label :valuation_tag_list, t("admin.budget_investments.edit.tags") %> -
- <% @tags.each do |tag| %> - <%= tag.name %> +
+ +
+

<%= t("admin.budget_investments.edit.classification") %>

+ +
+ <%= f.select(:administrator_id, + @admins.collect{ |a| [a.description_or_name_and_email, a.id ] }, + { include_blank: t("admin.budget_investments.edit.undefined") }) %> +
+
+ +
+ <%= f.label :valuation_tag_list, t("admin.budget_investments.edit.tags") %> +
+ <% @tags.each do |tag| %> + <%= tag.name %> + <% end %> +
+ <%= f.text_field :valuation_tag_list, + value: @investment.valuation_tag_list.sort.join(","), + label: false, + placeholder: t("admin.budget_investments.edit.tags_placeholder"), + class: "js-tag-list" %> +
+ +
+ <%= f.label :valuator_ids, t("admin.budget_investments.edit.user_groups") %> +
    + <%= f.collection_check_boxes :valuator_group_ids, @valuator_groups, :id, :name do |group| %> +
  • <%= group.label(title: group.object.name) { group.check_box + truncate(group.object.name, length: 60) } %>
  • + <% end %> +
+
+ +
+
+ <%= f.label :valuator_ids, t("admin.budget_investments.edit.assigned_valuators") %> +
    + <%= f.collection_check_boxes :valuator_ids, @valuators, :id, :email do |b| %> +
  • <%= b.label(title: valuator_label(b.object)) { b.check_box + truncate(b.object.description_or_email, length: 60) } %>
  • + <% end %> +
+
+ +
+
+ <%= f.label :tracker_ids, t("admin.budget_investments.edit.assigned_trackers") %> +
    + <%= f.collection_check_boxes :tracker_ids, @trackers, :id, :email do |b| %> +
  • <%= b.label(title: tracker_label(b.object)) { b.check_box + truncate(b.object.description_or_email, length: 60) } %>
  • + <% end %> +
+
+
+ +
+ <% if @investment.incompatible? || @investment.winner? %> +
+

<%= t("admin.budget_investments.edit.compatibility") %>

+ <%= f.label :incompatible do %> + <%= f.check_box :incompatible, title: t("admin.budget_investments.edit.compatibility"), label: false %> + <%= t("admin.budget_investments.edit.mark_as_incompatible") %> + <% end %> +
+ <% end %> +
+

<%= t("admin.budget_investments.edit.selection") %>

+ <%= f.label :selected do %> + <%= f.check_box :selected, title: t("admin.budget_investments.edit.selection"), label: false %> + <%= t("admin.budget_investments.edit.mark_as_selected") %> <% end %>
- <%= f.text_field :valuation_tag_list, - value: @investment.valuation_tag_list.sort.join(","), - label: false, - placeholder: t("admin.budget_investments.edit.tags_placeholder"), - class: "js-tag-list" %>
+
+ <%= f.text_field :milestone_tag_list, + value: @investment.milestone_tag_list.sort.join(", "), + label: t("admin.budget_investments.edit.milestone_tags") %> +
+ +
- <%= f.label :valuator_ids, t("admin.budget_investments.edit.user_groups") %> -
    - <%= f.collection_check_boxes :valuator_group_ids, @valuator_groups, :id, :name do |group| %> -
  • <%= group.label(title: group.object.name) { group.check_box + truncate(group.object.name, length: 60) } %>
  • - <% end %> -
+ <%= f.submit(class: "button", value: t("admin.budget_investments.edit.submit_button")) %>
- -
-
- <%= f.label :valuator_ids, t("admin.budget_investments.edit.assigned_valuators") %> -
    - <%= f.collection_check_boxes :valuator_ids, @valuators, :id, :email do |b| %> -
  • <%= b.label(title: valuator_label(b.object)) { b.check_box + truncate(b.object.description_or_email, length: 60) } %>
  • - <% end %> -
-
- -
-
- <%= f.label :tracker_ids, t("admin.budget_investments.edit.assigned_trackers") %> -
    - <%= f.collection_check_boxes :tracker_ids, @trackers, :id, :email do |b| %> -
  • <%= b.label(title: tracker_label(b.object)) { b.check_box + truncate(b.object.description_or_email, length: 60) } %>
  • - <% end %> -
-
-
- -
- <% if @investment.incompatible? || @investment.winner? %> -
-

<%= t("admin.budget_investments.edit.compatibility") %>

- <%= f.label :incompatible do %> - <%= f.check_box :incompatible, title: t("admin.budget_investments.edit.compatibility"), label: false %> - <%= t("admin.budget_investments.edit.mark_as_incompatible") %> - <% end %> -
- <% end %> -
-

<%= t("admin.budget_investments.edit.selection") %>

- <%= f.label :selected do %> - <%= f.check_box :selected, title: t("admin.budget_investments.edit.selection"), label: false %> - <%= t("admin.budget_investments.edit.mark_as_selected") %> - <% end %> -
-
- -
- <%= f.text_field :milestone_tag_list, - value: @investment.milestone_tag_list.sort.join(", "), - label: t("admin.budget_investments.edit.milestone_tags") %> -
- - -
- <%= f.submit(class: "button", value: t("admin.budget_investments.edit.submit_button")) %> -
-<% end %> + <% end %> +