Adds budget investment location
This commit is contained in:
@@ -80,7 +80,7 @@ module Budgets
|
||||
end
|
||||
|
||||
def investment_params
|
||||
params.require(:budget_investment).permit(:title, :description, :external_url, :heading_id, :terms_of_service)
|
||||
params.require(:budget_investment).permit(:title, :description, :external_url, :heading_id, :terms_of_service, :location)
|
||||
end
|
||||
|
||||
def load_ballot
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
<%= f.text_field :external_url, placeholder: t("budget.investments.form.external_url"), label: false %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :location, t("budget.investments.form.location") %>
|
||||
<%= f.text_field :location, placeholder: t("budget.investments.form.location"), label: false %>
|
||||
</div>
|
||||
|
||||
<% unless current_user.manager? %>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -26,10 +26,15 @@
|
||||
|
||||
<br>
|
||||
<p id="investment_code">
|
||||
<%= t("budget.investments.show.code") %>
|
||||
<strong><%= investment.id %></strong>
|
||||
<%= t("budget.investments.show.code_html", code: investment.id) %>
|
||||
</p>
|
||||
|
||||
<% if investment.location.present? %>
|
||||
<p id="investment_code">
|
||||
<%= t("budget.investments.show.location_html", location: investment.location) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= safe_html_with_links investment.description.html_safe %>
|
||||
|
||||
<% if investment.external_url.present? %>
|
||||
|
||||
Reference in New Issue
Block a user