diff --git a/app/helpers/budget_helper.rb b/app/helpers/budget_helper.rb
index 47dbbca98..8c19516e8 100644
--- a/app/helpers/budget_helper.rb
+++ b/app/helpers/budget_helper.rb
@@ -5,4 +5,19 @@ module BudgetHelper
locale: I18n.default_locale,
unit: budget.currency_symbol)
end
+
+ def heading_name(heading)
+ heading.present? ? heading.name : t("budget.headings.none")
+ end
+
+ def namespaced_budget_investment_path(investment, options={})
+ @namespaced_budget_investment_path ||= namespace
+ options[:budget_id] ||= investment.budget.id
+ case @namespace_budget_investment_path
+ when "management"
+ management_budget_investment_path(investment, options)
+ else
+ budget_investment_path(investment, options)
+ end
+ end
end
diff --git a/app/views/budgets/investments/_form.html.erb b/app/views/budgets/investments/_form.html.erb
new file mode 100644
index 000000000..249637d40
--- /dev/null
+++ b/app/views/budgets/investments/_form.html.erb
@@ -0,0 +1,49 @@
+<%= form_for(@investment, url: form_url) do |f| %>
+ <%= render 'shared/errors', resource: @investment %>
+
+
+
+ <%= f.label :title, t("budget.investments.form.title") %>
+ <%= f.text_field :title, maxlength: SpendingProposal.title_max_length, placeholder: t("budget.investments.form.title"), label: false %>
+
+
+ <%= f.invisible_captcha :subtitle %>
+
+
+ <%= f.label :description, t("budget.investments.form.description") %>
+ <%= f.cktext_area :description, maxlength: SpendingProposal.description_max_length, ckeditor: { language: I18n.locale }, label: false %>
+
+
+
+ <%= f.label :external_url, t("budget.investments.form.external_url") %>
+ <%= f.text_field :external_url, placeholder: t("budget.investments.form.external_url"), label: false %>
+
+
+
+ <%= f.label :heading_id, t("budget.investments.form.heading") %>
+ <%= f.select :heading_id, heading_select_options, {include_blank: t("budget.headings.none"), label: false} %>
+
+
+
+ <%= f.label :association_name, t("budget.investments.form.association_name_label") %>
+ <%= f.text_field :association_name, placeholder: t("budget.investments.form.association_name"), label: false %>
+
+
+
+ <% if @investment.new_record? %>
+ <%= f.label :terms_of_service do %>
+ <%= f.check_box :terms_of_service, title: t('form.accept_terms_title'), label: false %>
+
+ <%= t("form.accept_terms",
+ policy: link_to(t("form.policy"), "/privacy", target: "blank"),
+ conditions: link_to(t("form.conditions"), "/conditions", target: "blank")).html_safe %>
+
+ <% end %>
+ <% end %>
+
+
+
+ <%= f.submit(class: "button", value: t("budget.investments.form.submit_buttons.#{action_name}")) %>
+
+
+<% end %>
diff --git a/app/views/budgets/investments/_header.html.erb b/app/views/budgets/investments/_header.html.erb
new file mode 100644
index 000000000..ae5dbd318
--- /dev/null
+++ b/app/views/budgets/investments/_header.html.erb
@@ -0,0 +1,56 @@
+<% if @filter_heading_name.present? %>
+