Merge pull request #976 from consul/valuation-changes
Valuation changes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%= link_to admin_spending_proposals_path, class: 'back' do %>
|
||||
<%= link_to :back, class: 'back' do %>
|
||||
<i class="icon-angle-left"></i> <%= t("admin.spending_proposals.show.back") %>
|
||||
<% end %>
|
||||
|
||||
@@ -32,4 +32,9 @@
|
||||
<hr>
|
||||
|
||||
<h2><%= t("admin.spending_proposals.show.dossier") %></h2>
|
||||
|
||||
<p>
|
||||
<%= link_to t("admin.spending_proposals.show.edit_dossier"), edit_valuation_spending_proposal_path(@spending_proposal) %>
|
||||
</p>
|
||||
|
||||
<%= render 'valuation/spending_proposals/written_by_valuators' %>
|
||||
|
||||
@@ -3,25 +3,6 @@
|
||||
|
||||
<%= form_for(@spending_proposal, url: valuate_valuation_spending_proposal_path(@spending_proposal)) do |f| %>
|
||||
<%= render 'shared/errors', resource: @spending_proposal %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :price, "#{t('valuation.spending_proposals.edit.price')} (#{t('valuation.spending_proposals.edit.currency')})" %>
|
||||
<%= f.number_field :price, label: false %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 column end">
|
||||
<%= f.label :price_first_year, "#{t('valuation.spending_proposals.edit.price_first_year')} ( #{t('valuation.spending_proposals.edit.currency')})" %>
|
||||
<%= f.number_field :price_first_year, label: false %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.label :price_explanation, t("valuation.spending_proposals.edit.price_explanation") %>
|
||||
<%= f.text_area :price_explanation, label: false, rows: 3 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<fieldset class="fieldset">
|
||||
@@ -45,14 +26,33 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.label :feasible_explanation, t("valuation.spending_proposals.edit.feasible_explanation") %>
|
||||
<%= f.label :feasible_explanation, t("valuation.spending_proposals.edit.feasible_explanation_html") %>
|
||||
<%= f.text_area :feasible_explanation, label: false, rows: 3 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :price, "#{t('valuation.spending_proposals.edit.price_html', currency: t('valuation.spending_proposals.edit.currency'))}" %>
|
||||
<%= f.number_field :price, label: false, max: 1000000000000000 %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 column end">
|
||||
<%= f.label :price_first_year, "#{t('valuation.spending_proposals.edit.price_first_year_html', currency: t('valuation.spending_proposals.edit.currency'))}" %>
|
||||
<%= f.number_field :price_first_year, label: false, max: 1000000000000000 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.label :time_scope, t("valuation.spending_proposals.edit.time_scope") %>
|
||||
<%= f.label :price_explanation, t("valuation.spending_proposals.edit.price_explanation_html") %>
|
||||
<%= f.text_area :price_explanation, label: false, rows: 3 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.label :time_scope, t("valuation.spending_proposals.edit.time_scope_html") %>
|
||||
<%= f.text_field :time_scope, label: false %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.label :internal_comments, t("valuation.spending_proposals.edit.internal_comments") %>
|
||||
<%= f.label :internal_comments, t("valuation.spending_proposals.edit.internal_comments_html") %>
|
||||
<%= f.text_area :internal_comments, label: false, rows: 3 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<%= link_to t("valuation.spending_proposals.show.back"), :back, class: 'back' %>
|
||||
<%= link_to :back, class: 'back' do %>
|
||||
<i class="icon-angle-left"></i> <%= t("valuation.spending_proposals.show.back") %>
|
||||
<% end %>
|
||||
|
||||
<h2><%= t("valuation.spending_proposals.show.heading") %> <%= @spending_proposal.id %> </h2>
|
||||
<h1><%= @spending_proposal.title %></h1>
|
||||
|
||||
|
||||
@@ -173,6 +173,7 @@ en:
|
||||
sent: Sent
|
||||
geozone: Scope
|
||||
dossier: Dossier
|
||||
edit_dossier: Edit dossier
|
||||
tags: Tags
|
||||
undefined: Undefined
|
||||
edit:
|
||||
|
||||
@@ -153,7 +153,7 @@ es:
|
||||
tags_filter_all: Todas las etiquetas
|
||||
filters:
|
||||
valuation_open: Abiertas
|
||||
without_admin: Sin administrador asignado
|
||||
without_admin: Sin administrador
|
||||
managed: Gestionando
|
||||
valuating: En evaluación
|
||||
valuation_finished: Evaluación finalizada
|
||||
@@ -173,6 +173,7 @@ es:
|
||||
sent: Fecha
|
||||
geozone: Ámbito
|
||||
dossier: Informe
|
||||
edit_dossier: Editar informe
|
||||
tags: Etiquetas
|
||||
undefined: Sin definir
|
||||
edit:
|
||||
|
||||
@@ -42,17 +42,17 @@ en:
|
||||
assigned_valuators: Assigned valuators
|
||||
edit:
|
||||
dossier: Dossier
|
||||
price: Price
|
||||
price_first_year: Cost during the first year
|
||||
price_html: "Price (%{currency})"
|
||||
price_first_year_html: "Cost during the first year (%{currency})"
|
||||
currency: "€"
|
||||
price_explanation: Price explanation
|
||||
price_explanation_html: Price explanation
|
||||
feasibility: Feasibility
|
||||
feasible: Feasible
|
||||
not_feasible: Not feasible
|
||||
feasible_explanation: Feasibility explanation
|
||||
feasible_explanation_html: Feasibility explanation
|
||||
valuation_finished: Valuation finished
|
||||
time_scope: Time scope
|
||||
internal_comments: Internal comments
|
||||
time_scope_html: Time scope
|
||||
internal_comments_html: Internal comments
|
||||
save: Save changes
|
||||
notice:
|
||||
valuate: "Dossier updated"
|
||||
|
||||
@@ -42,17 +42,17 @@ es:
|
||||
assigned_valuators: Evaluadores asignados
|
||||
edit:
|
||||
dossier: Informe
|
||||
price: Coste
|
||||
price_first_year: Coste en el primer año
|
||||
price_html: "Coste (%{currency}) <small>(dato público)</small>"
|
||||
price_first_year_html: "Coste en el primer año (%{currency}) <small>(opcional, privado)</small>"
|
||||
currency: "€"
|
||||
price_explanation: Justificación del precio
|
||||
price_explanation_html: "Informe de coste <small>(opcional, dato público)</small>"
|
||||
feasibility: Viabilidad
|
||||
feasible: Viable
|
||||
not_feasible: No viable
|
||||
feasible_explanation: Justificación de la viabilidad
|
||||
feasible_explanation_html: "Informe de inviabilidad <small>(en caso de que lo sea, dato público)</small>"
|
||||
valuation_finished: Informe finalizado
|
||||
time_scope: Plazo de ejecución
|
||||
internal_comments: Comentarios internos
|
||||
time_scope_html: "Plazo de ejecución <small>(opcional, dato no público)</small>"
|
||||
internal_comments_html: "Comentarios y observaciones <small>(para responsables internos, dato no público)</small>"
|
||||
save: Guardar cambios
|
||||
notice:
|
||||
valuate: "Informe actualizado"
|
||||
|
||||
11
db/migrate/20160308184050_change_price_fields_to_bigint.rb
Normal file
11
db/migrate/20160308184050_change_price_fields_to_bigint.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class ChangePriceFieldsToBigint < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :spending_proposals, :price, :bigint
|
||||
change_column :spending_proposals, :price_first_year, :bigint
|
||||
end
|
||||
|
||||
def down
|
||||
change_column :spending_proposals, :price, :integer
|
||||
change_column :spending_proposals, :price_first_year, :integer
|
||||
end
|
||||
end
|
||||
14
db/schema.rb
14
db/schema.rb
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20160308103548) do
|
||||
ActiveRecord::Schema.define(version: 20160308184050) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -296,20 +296,20 @@ ActiveRecord::Schema.define(version: 20160308103548) do
|
||||
t.text "description"
|
||||
t.integer "author_id"
|
||||
t.string "external_url"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "geozone_id"
|
||||
t.integer "price"
|
||||
t.integer "price", limit: 8
|
||||
t.boolean "feasible"
|
||||
t.string "association_name"
|
||||
t.text "price_explanation"
|
||||
t.text "feasible_explanation"
|
||||
t.text "internal_comments"
|
||||
t.boolean "valuation_finished", default: false
|
||||
t.boolean "valuation_finished", default: false
|
||||
t.text "explanations_log"
|
||||
t.integer "administrator_id"
|
||||
t.integer "valuation_assignments_count", default: 0
|
||||
t.integer "price_first_year"
|
||||
t.integer "valuation_assignments_count", default: 0
|
||||
t.integer "price_first_year", limit: 8
|
||||
t.string "time_scope"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user