\ No newline at end of file
diff --git a/app/views/valuation/budget_investments/index.html.erb b/app/views/valuation/budget_investments/index.html.erb
new file mode 100644
index 000000000..1eea49493
--- /dev/null
+++ b/app/views/valuation/budget_investments/index.html.erb
@@ -0,0 +1,54 @@
+
+
+<%= paginate @budgets %>
diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml
index 822fe9e1d..1ddf4f67c 100644
--- a/config/i18n-tasks.yml
+++ b/config/i18n-tasks.yml
@@ -32,6 +32,7 @@ data:
- config/locales/devise_views.%{locale}.yml
- config/locales/responders.%{locale}.yml
- config/locales/kaminari.%{locale}.yml
+ - config/locales/budgets.%{locale}.yml
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
# `i18n-tasks normalize -p` will force move the keys according to these rules
@@ -107,6 +108,8 @@ ignore_missing:
## Consider these keys used:
ignore_unused:
+ - 'budgets.phase.*'
+ - 'budgets.investments.index.orders.*'
- 'activerecord.*'
- 'activemodel.*'
- 'unauthorized.*'
@@ -115,6 +118,8 @@ ignore_unused:
- 'admin.banners.index.filters.*'
- 'admin.debates.index.filter*'
- 'admin.proposals.index.filter*'
+ - 'admin.budgets.index.filter*'
+ - 'admin.budget_investments.index.filter*'
- 'admin.spending_proposals.index.filter*'
- 'admin.organizations.index.filter*'
- 'admin.users.index.filter*'
@@ -133,14 +138,15 @@ ignore_unused:
- 'moderation.debates.index.filter*'
- 'moderation.debates.index.order*'
- 'valuation.spending_proposals.index.filter*'
+ - 'valuation.budgets.index.filter*'
+ - 'valuation.budget_investments.index.filter*'
- 'users.show.filters.*'
- 'debates.index.select_order'
- 'debates.index.orders.*'
- - 'debates.index.search_form.*'
- 'proposals.index.select_order'
- 'proposals.index.orders.*'
- - 'proposals.index.search_form.*'
- 'spending_proposals.index.search_form.*'
+ - '*.index.search_form.*'
- 'notifications.index.comments_on*'
- 'notifications.index.replies_to*'
- 'notifications.index.proposal_notification*'
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 2cc09084f..a0b6ac249 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -15,7 +15,7 @@ Devise.setup do |config|
if Rails.env.test? || !ActiveRecord::Base.connection.table_exists?('settings')
config.mailer_sender = "noreply@consul.dev"
else
- config.mailer_sender = "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>"
+ config.mailer_sender = "'#{Setting['mailer_from_name']}' <#{Setting['mailer_from_address']}>"
end
# Configure the class responsible to send e-mails.
diff --git a/config/initializers/vote_extensions.rb b/config/initializers/vote_extensions.rb
index fce7b49eb..06d3dde5b 100644
--- a/config/initializers/vote_extensions.rb
+++ b/config/initializers/vote_extensions.rb
@@ -13,6 +13,10 @@ ActsAsVotable::Vote.class_eval do
where(votable_type: 'SpendingProposal', votable_id: spending_proposals)
end
+ def self.for_budget_investments(budget_investments)
+ where(votable_type: 'Budget::Investment', votable_id: budget_investments)
+ end
+
def value
vote_flag
end
diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml
index e99979143..e873abc26 100644
--- a/config/locales/activerecord.en.yml
+++ b/config/locales/activerecord.en.yml
@@ -4,6 +4,12 @@ en:
activity:
one: "activity"
other: "activities"
+ budget:
+ one: "Participatory budget"
+ other: "Participatory budgets"
+ budget/investment:
+ one: "Investment"
+ other: "Investments"
comment:
one: "Comment"
other: "Comments"
@@ -50,6 +56,30 @@ en:
one: "Answer"
other: "Answers"
attributes:
+ budget:
+ name: "Name"
+ description_accepting: "Description during Accepting phase"
+ description_reviewing: "Description during Reviewing phase"
+ description_selecting: "Description during Selecting phase"
+ description_valuating: "Description during Valuating phase"
+ description_balloting: "Description during Balloting phase"
+ description_reviewing_ballots: "Description during Reviewing Ballots phase"
+ description_finished: "Description when the budget is finished"
+ phase: "Phase"
+ currency_symbol: "Currency"
+ budget/investment:
+ heading_id: "Sección de presupuesto"
+ title: "Title"
+ description: "Description"
+ external_url: "External url"
+ location: "Location"
+ administrator_id: "Administrator"
+ description: "Description"
+ external_url: "Link to additional documentation"
+ heading_id: "Heading"
+ title: "Title"
+ location: "Location"
+ organization_name: "If you are proposing in the name of a collective/organization, write its name"
comment:
body: "Comment"
user: "User"
@@ -139,6 +169,10 @@ en:
attributes:
tag_list:
less_than_or_equal_to: "tags must be less than or equal to %{count}"
+ budget/investment:
+ attributes:
+ tag_list:
+ less_than_or_equal_to: "tags must be less than or equal to %{count}"
proposal_notification:
attributes:
minimum_interval:
diff --git a/config/locales/activerecord.es.yml b/config/locales/activerecord.es.yml
index 3894e4b08..e8f2a42eb 100644
--- a/config/locales/activerecord.es.yml
+++ b/config/locales/activerecord.es.yml
@@ -4,6 +4,12 @@ es:
activity:
one: "actividad"
other: "actividades"
+ budget:
+ one: "Presupuesto participativo"
+ other: "Presupuestos participativos"
+ budget/investment:
+ one: "Propuesta de inversión"
+ other: "Propuestas de inversión"
comment:
one: "Comentario"
other: "Comentarios"
@@ -50,6 +56,25 @@ es:
one: "Respuesta"
other: "Respuestas"
attributes:
+ budget:
+ name: "Nombre"
+ description_accepting: "Descripción durante la fase de aceptación"
+ description_reviewing: "Descripción durante la fase de revisión"
+ description_selecting: "Descripción durante la fase de selección"
+ description_valuating: "Descripción durante la fase de evaluación"
+ description_balloting: "Descripción durante la fase de votación"
+ description_reviewing_ballots: "Descripción durante la fase de revisión de votos"
+ description_finished: "Descripción cuando el presupuesto ha finalizado"
+ phase: "Fase"
+ currency_symbol: "Divisa"
+ budget/investment:
+ administrator_id: "Administrador"
+ description: "Descripción"
+ external_url: "Enlace a documentación adicional"
+ heading_id: "Partida presupuestaria"
+ title: "Título"
+ location: "Ubicación"
+ organization_name: "Si estás proponiendo en nombre de una organización o colectivo, escribe su nombre"
comment:
body: "Comentario"
user: "Usuario"
diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml
index 6362828bd..f259cd0f7 100755
--- a/config/locales/admin.en.yml
+++ b/config/locales/admin.en.yml
@@ -32,8 +32,6 @@ en:
editing: Edit banner
form:
submit_button: Save changes
- errors:
- form:
errors:
form:
error:
@@ -60,6 +58,101 @@ en:
on_users: Users
title: Moderator activity
type: Type
+ budgets:
+ index:
+ title: Participatory budgets
+ new_link: Create new budget
+ filters:
+ current: Open
+ finished: Finished
+ budget_investments: See budget investments
+ table_name: Name
+ table_phase: Phase
+ table_investments: Investments
+ table_edit_groups: Headings groups
+ table_edit_budget: Edit
+ edit_groups: Edit headings groups
+ edit_budget: Edit budget
+ create:
+ notice: New participatory budget created successfully!
+ update:
+ notice: Participatory budget updated successfully
+ edit:
+ title: Edit Participatory budget
+ new:
+ title: New participatory budget
+ show:
+ groups:
+ one: 1 Group of budget headings
+ other: "%{count} Groups of budget headings"
+ form:
+ group: Group name
+ no_groups: No groups created yet. Each user will be able to vote in only one heading per group.
+ add_group: Add new group
+ create_group: Create group
+ heading: Heading name
+ add_heading: Add heading
+ amount: Amount
+ save_heading: Save heading
+ no_heading: This group has no assigned heading.
+ table_heading: Heading
+ table_amount: Amount
+ budget_investments:
+ index:
+ heading_filter_all: All headings
+ administrator_filter_all: All administrators
+ valuator_filter_all: All valuators
+ tags_filter_all: All tags
+ filters:
+ valuation_open: Open
+ without_admin: Without assigned admin
+ managed: Managed
+ valuating: Under valuation
+ valuation_finished: Valuation finished
+ valuation_finished_feasible: Val. fin. Feasible
+ selected: Selected
+ all: All
+ title: Investment projects
+ assigned_admin: Assigned administrator
+ no_admin_assigned: No admin assigned
+ no_valuators_assigned: No valuators assigned
+ feasibility:
+ feasible: "Feasible (%{price})"
+ unfeasible: "Unfeasible"
+ undecided: "Undecided"
+ selected: "Selected"
+ select: "Select"
+ table_id: "ID"
+ table_title: "Title"
+ table_admin: "Administrator"
+ table_valuator: "Valuator"
+ table_geozone: "Scope of operation"
+ table_feasibility: "Feasibility"
+ table_valuation_finished: "Val. Fin."
+ table_selection: "Selection"
+ show:
+ assigned_admin: Assigned administrator
+ assigned_valuators: Assigned valuators
+ classification: Clasification
+ info: "%{budget_name} - Group: %{group_name} - Investment project %{id}"
+ edit: Edit
+ edit_classification: Edit classification
+ by: By
+ sent: Sent
+ group: Grupo
+ heading: Partida
+ dossier: Dossier
+ edit_dossier: Edit dossier
+ tags: Tags
+ undefined: Undefined
+ edit:
+ classification: Clasification
+ assigned_valuators: Valuators
+ select_heading: Select heading
+ submit_button: Update
+ tags: Tags
+ tags_placeholder: "Write the tags you want separated by commas (,)"
+ undefined: Undefined
comments:
index:
filter: Filter
@@ -220,6 +313,7 @@ en:
activity: Moderator activity
admin: Admin menu
banner: Manage banners
+ budgets: Participatory budgets
debate_topics: Debate topics
geozones: Manage geozones
hidden_comments: Hidden comments
diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml
index 1b5bf4ffe..de228e0c6 100644
--- a/config/locales/admin.es.yml
+++ b/config/locales/admin.es.yml
@@ -58,6 +58,101 @@ es:
on_users: Usuarios
title: Actividad de los Moderadores
type: Tipo
+ budgets:
+ index:
+ title: Presupuestos participativos
+ new_link: Crear nuevo presupuesto
+ filters:
+ current: Abiertos
+ finished: Terminados
+ budget_investments: Ver propuestas de inversión
+ table_name: Nombre
+ table_phase: Fase
+ table_investments: Propuestas de inversión
+ table_edit_groups: Grupos de partidas
+ table_edit_budget: Editar
+ edit_groups: Editar grupos de partidas
+ edit_budget: Editar presupuesto
+ create:
+ notice: ¡Nueva campaña de presupuestos participativos creada con éxito!
+ update:
+ notice: Campaña de presupuestos participativos actualizada
+ edit:
+ title: Editar campaña de presupuestos participativos
+ new:
+ title: Nuevo presupuesto ciudadano
+ show:
+ groups:
+ one: 1 Grupo de partidas presupuestarias
+ other: "%{count} Grupos de partidas presupuestarias"
+ form:
+ group: Nombre del grupo
+ no_groups: No hay grupos creados todavía. Cada usuario podrá votar en una sola partida de cada grupo.
+ add_group: Añadir nuevo grupo
+ create_group: Crear grupo
+ heading: Nombre de la partida
+ add_heading: Añadir partida
+ amount: Cantidad
+ save_heading: Guardar partida
+ no_heading: Este grupo no tiene ninguna partida asignada.
+ table_heading: Partida
+ table_amount: Cantidad
+ budget_investments:
+ index:
+ heading_filter_all: Todas las partidas
+ administrator_filter_all: Todos los administradores
+ valuator_filter_all: Todos los evaluadores
+ tags_filter_all: Todas las etiquetas
+ filters:
+ valuation_open: Abiertas
+ without_admin: Sin administrador
+ managed: Gestionando
+ valuating: En evaluación
+ valuation_finished: Evaluación finalizada
+ valuation_finished_feasible: Viables
+ selected: Seleccionadas
+ all: Todas
+ title: Propuestas de inversión
+ assigned_admin: Administrador asignado
+ no_admin_assigned: Sin admin asignado
+ no_valuators_assigned: Sin evaluador
+ feasibility:
+ feasible: "Viable (%{price})"
+ unfeasible: "Inviable"
+ undecided: "Sin decidir"
+ selected: "Seleccionada"
+ select: "Seleccionar"
+ table_id: "ID"
+ table_title: "Título"
+ table_admin: "Administrador"
+ table_valuator: "Evaluador"
+ table_geozone: "Ámbito de actuación"
+ table_feasibility: "Viabilidad"
+ table_valuation_finished: "Ev. Fin."
+ table_selection: "Selección"
+ show:
+ assigned_admin: Administrador asignado
+ assigned_valuators: Evaluadores asignados
+ classification: Clasificación
+ info: "%{budget_name} - Grupo: %{group_name} - Propuesta de inversión %{id}"
+ edit: Editar
+ edit_classification: Editar clasificación
+ by: Autor
+ sent: Fecha
+ group: Grupo
+ heading: Partida
+ dossier: Informe
+ edit_dossier: Editar informe
+ tags: Etiquetas
+ undefined: Sin definir
+ edit:
+ classification: Clasificación
+ assigned_valuators: Evaluadores
+ select_heading: Seleccionar partida
+ submit_button: Actualizar
+ tags: Etiquetas
+ tags_placeholder: "Escribe las etiquetas que desees separadas por comas (,)"
+ undefined: Sin definir
comments:
index:
filter: Filtro
@@ -218,6 +313,7 @@ es:
activity: Actividad de moderadores
admin: Menú de administración
banner: Gestionar banners
+ budgets: Presupuestos participativos
debate_topics: Temas de debate
geozones: Gestionar distritos
hidden_comments: Comentarios ocultos
diff --git a/config/locales/budgets.en.yml b/config/locales/budgets.en.yml
new file mode 100644
index 000000000..3ce0bb3ee
--- /dev/null
+++ b/config/locales/budgets.en.yml
@@ -0,0 +1,99 @@
+en:
+ budgets:
+ ballots:
+ show:
+ title: Your ballot
+ amount_spent: Amount spent
+ remaining: "You still have %{amount} to invest."
+ remove: Remove vote
+ voted_html:
+ one: "You have voted one proposal."
+ other: "You have voted %{count} proposals."
+ voted_info_html: "You can change your vote at any time until the close of this phase. No need to invest all the money available."
+ zero: You have not voted any investment project.
+ reasons_for_not_balloting:
+ not_logged_in: You must %{signin} or %{signup} to continue.
+ not_verified: Only verified users can vote on proposals; %{verify_account}.
+ organization: Organizations are not permitted to vote
+ not_selected: Unselected investment projects can not be supported
+ not_enough_money: "Price is higher than the available amount left."
+ no_ballots_allowed: Selecting phase is closed
+ different_heading_assigned: You have already voted a different heading
+ groups:
+ show:
+ title: Select an option
+ phase:
+ accepting: Accepting proposals
+ reviewing: Reviewing proposals
+ selecting: Selecting proposals
+ valuating: Valuating proposals
+ balloting: Balloting proposals
+ reviewing_ballots: Reviewing Ballots
+ finished: Finished budget
+ index:
+ title: Participatory budgets
+ investments:
+ form:
+ tag_category_label: "Categories"
+ tags_instructions: "Tag this proposal. You can choose from proposed categories or add your own"
+ tags_label: Tags
+ tags_placeholder: "Enter the tags you would like to use, separated by commas (',')"
+ index:
+ title: Participatory budgeting
+ unfeasible: Unfeasible investment projects
+ unfeasible_text: "The proposals must meet a number of criteria (legality, concreteness, be the responsibility of the city, not exceed the limit of the budget; %{definitions}) to be declared viable and reach the stage of final vote. All proposals don't meet these criteria are marked as unfeasible and published in the following list, along with its report of infeasibility."
+ unfeasible_text_definitions: see definitions here
+ by_heading: "Investment projects with scope: %{heading}"
+ search_form:
+ button: Search
+ placeholder: Search investment projects...
+ title: Search
+ search_results:
+ one: " containing the term '%{search_term}'"
+ other: " containing the term '%{search_term}'"
+ sidebar:
+ my_ballot: My ballot
+ voted_html:
+ one: "You voted one proposal with a cost of %{amount_spent}"
+ other: "You voted %{count} proposals with a cost of %{amount_spent}"
+ voted_info: You can change your vote at any time until the close of this phase. No need to spend all the money available.
+ zero: You have not voted any investment project.
+ verified_only: "To create a new budget investment %{verify}."
+ verify_account: "verify your account"
+ create: "Create budget investment"
+ not_logged_in: "To create a new budget investment you must %{sign_in} or %{sign_up}."
+ sign_in: "sign in"
+ sign_up: "sign up"
+ orders:
+ random: random
+ confidence_score: highest rated
+ price: by price
+ show:
+ author_deleted: User deleted
+ price_explanation: Price explanation
+ unfeasibility_explanation: Unfeasibility explanation
+ code_html: 'Investment project code: %{code}'
+ location_html: 'Location: %{location}'
+ organization_name_html: 'Organization: %{name}'
+ share: Share
+ title: Investment project
+ wrong_price_format: Only integer numbers
+ investment:
+ title: Investment project
+ add: Add
+ already_added: You have already added this investment project
+ already_supported: You have already supported this. Share it!
+ support_title: Support this project
+ supports:
+ one: 1 support
+ other: "%{count} supports"
+ zero: No supports
+ give_support: Support
+ header:
+ check_ballot: Check my ballot
+ different_heading_assigned_html: "You have active votes in another heading: %{heading_link}"
+ progress_bar:
+ available: "Available: "
+ show:
+ group: Group
+ phase: Actual phase
diff --git a/config/locales/budgets.es.yml b/config/locales/budgets.es.yml
new file mode 100644
index 000000000..d558d5edd
--- /dev/null
+++ b/config/locales/budgets.es.yml
@@ -0,0 +1,99 @@
+es:
+ budgets:
+ ballots:
+ show:
+ title: Mis votos
+ amount_spent: Coste total
+ remaining: "Te quedan %{amount} para invertir"
+ remove: Quitar voto
+ voted_html:
+ one: "Has votado una propuesta."
+ other: "Has votado %{count} propuestas."
+ voted_info_html: "Puedes cambiar tus votos en cualquier momento hasta el cierre de esta fase. No hace falta que inviertas todo el dinero disponible."
+ zero: "Todavía no has votado ninguna propuesta de inversión."
+ reasons_for_not_balloting:
+ not_logged_in: Necesitas %{signin} o %{signup} para continuar.
+ not_verified: Las propuestas de inversión sólo pueden ser apoyadas por usuarios verificados, %{verify_account}.
+ organization: Las organizaciones no pueden votar.
+ not_selected: No se pueden votar propuestas inviables.
+ not_enough_money: No hay fondos suficientes.
+ no_ballots_allowed: El periodo de votación está cerrado.
+ different_heading_assigned: Ya votaste en una sección distinta del presupuesto.
+ groups:
+ show:
+ title: Selecciona una opción
+ phase:
+ accepting: Aceptando propuestas
+ reviewing: Revisando propuestas
+ selecting: Selección de propuestas
+ valuating: Evaluación de propuestas
+ balloting: Votación de propuestas
+ reviewing_ballots: Contando resultados
+ finished: Presupuesto terminado
+ index:
+ title: Presupuestos participativos
+ investments:
+ form:
+ tags_instructions: "Etiqueta esta propuesta. Puedes elegir entre las categorías propuestas o introducir las que desees"
+ tags_label: Temas
+ tag_category_label: "Categorías"
+ tags_placeholder: "Escribe las etiquetas que desees separadas por una coma (',')"
+ index:
+ title: Presupuestos participativos
+ unfeasible: Propuestas de inversión no viables
+ unfeasible_text: Las propuestas presentadas deben cumplir una serie de criterios (legalidad, concreción, ser competencia del Ayuntamiento, no superar el tope del presupuesto; %{definitions}) para ser declaradas viables y llegar hasta la fase de votación final. Todas las propuestas que no cumplen estos criterios son marcadas como inviables y publicadas en la siguiente lista, junto con su informe de inviabilidad.
+ unfeasible_text_definitions: ver definiciones aquí
+ by_heading: "Propuestas de inversión con ámbito: %{heading}"
+ search_form:
+ button: Buscar
+ placeholder: Buscar propuestas de inversión...
+ title: Buscar
+ search_results:
+ one: " que contiene '%{search_term}'"
+ other: " que contienen '%{search_term}'"
+ sidebar:
+ my_ballot: Mis votos
+ voted_html:
+ one: "Has votado una propuesta por un valor de %{amount_spent}"
+ other: "Has votado %{count} propuestas por un valor de %{amount_spent}"
+ voted_info: Puedes cambiar tus votos en cualquier momento hasta el cierre de esta fase. No hace falta que gastes todo el dinero disponible.
+ zero: "Todavía no has votado ninguna propuesta de inversión."
+ verified_only: "Para crear una nueva propuesta de inversión %{verify}."
+ verify_account: "verifica tu cuenta"
+ create: "Crear propuesta de inversión"
+ not_logged_in: "Para crear una nueva propuesta de inversión debes %{sign_in} o %{sign_up}."
+ sign_in: "iniciar sesión"
+ sign_up: "registrarte"
+ orders:
+ random: Aleatorias
+ confidence_score: Mejor valoradas
+ price: Por coste
+ show:
+ author_deleted: Usuario eliminado
+ price_explanation: Informe de coste
+ unfeasibility_explanation: Informe de inviabilidad
+ code_html: 'Código propuesta de gasto: %{code}'
+ location_html: 'Ubicación: %{location}'
+ organization_name_html: 'Organización: %{name}'
+ share: Compartir
+ title: Propuesta de inversión
+ wrong_price_format: Solo puede incluir caracteres numéricos
+ investment:
+ title: Propuesta de inversión
+ add: Añadir
+ already_added: "Ya has añadido esta propuesta de inversión"
+ already_supported: Ya has apoyado esta propuesta. ¡Compártelo!
+ support_title: Apoyar esta propuesta
+ supports:
+ one: 1 apoyo
+ other: "%{count} apoyos"
+ zero: Sin apoyos
+ give_support: Apoyar
+ header:
+ check_ballot: Revisar mis votos
+ different_heading_assigned_html: "Ya apoyaste propuestas de otra sección del presupuesto: %{heading_link}"
+ progress_bar:
+ available: "Disponible: "
+ show:
+ group: Grupo
+ phase: Fase actual
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 0e6831657..760fa67c8 100755
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -8,8 +8,8 @@ en:
erase_account_link: Erase my account
finish_verification: Complete verification
notifications: Notifications
- organization_name_label: Name of organisation
- organization_responsible_name_placeholder: Representative of the organisation/collective
+ organization_name_label: Name of organization
+ organization_responsible_name_placeholder: Representative of the organization/collective
personal: Personal details
phone_number_label: Phone number
public_activity_label: Keep my list of activities public
@@ -152,6 +152,7 @@ en:
proposal: Proposal
proposal_notification: "Notification"
spending_proposal: Spending proposal
+ budget/investment: Investment
user: Account
verification/sms: phone
signature_sheet: Signature sheet
@@ -206,7 +207,7 @@ en:
new_notifications:
one: You have a new notification
other: You have %{count} new notifications
- no_notifications: You don't have new notifications
+ no_notifications: "You don't have new notifications"
open: open
open_city_slogan_html: There are cities that are governed directly by their inhabitants, who discuss the topics they are concerned about, propose ideas to improve their lives and decide among themselves which ones will be carried out.
open_city_title: Love the city, and it will become a city you love.
@@ -214,7 +215,8 @@ en:
proposals: Proposals
proposal_ballot: Voting
see_all: See proposals
- spending_proposals: Spending proposals
+ budgets: Participatory budgeting
+ spending_proposals: Spending Proposals
legacy_legislation:
help:
alt: Select the text you want to comment and press the button with the pencil.
@@ -346,14 +348,23 @@ en:
facebook:
sign_in: Sign in with Facebook
sign_up: Sign up with Facebook
+ name: Facebook
finish_signup:
title: Add your email address
google_oauth2:
sign_in: Sign in with Google
sign_up: Sign up with Google
+ name: Google
twitter:
sign_in: Sign in with Twitter
sign_up: Sign up with Twitter
+ name: Twitter
+ info_sign_in: "Sign in with:"
+ info_sign_up: "Sign up with:"
+ or_fill: "Or fill the following form:"
+ finish_signup:
+ title: "Additional details"
+ username_warning: "Due to a change in the way we interact with social networks, it is possible that your username now appears as 'already in use'. If that is your case, please choose a different username."
proposals:
create:
form:
@@ -499,6 +510,8 @@ en:
show:
back: "Go back to my activity"
shared:
+ "yes": "Yes"
+ "no": "No"
advanced_search:
author_type: 'By author category'
author_type_blank: 'Select a category'
@@ -532,6 +545,7 @@ en:
hide: Hide
print:
print_button: Print this info
+ search: Search
show: Show
suggest:
debate:
@@ -647,8 +661,7 @@ en:
deleted: Deleted
deleted_debate: This debate has been deleted
deleted_proposal: This proposal has been deleted
- delete_spending_proposal: Delete
- confirm_deletion_spending_proposal: Are you sure? This action can not be undone
+ deleted_budget_investment: This investment has been deleted
filters:
comments:
one: 1 Comment
@@ -659,9 +672,9 @@ en:
proposals:
one: 1 Proposal
other: "%{count} Proposals"
- spending_proposals:
- one: 1 Spending proposal
- other: "%{count} Spending proposals"
+ budget_investments:
+ one: 1 Investment
+ other: "%{count} Investments"
no_activity: User has no public activity
no_private_messages: "This user doesn't accept private messages."
private_activity: This user decided to keep the activity list private
@@ -675,7 +688,7 @@ en:
anonymous: Too many anonymous votes to admit vote %{verify_account}.
comment_unauthenticated: You must %{signin} or %{signup} to vote.
disagree: I disagree
- organizations: Organisations are not permitted to vote
+ organizations: Organizations are not permitted to vote
signin: Sign in
signup: Sign up
supports: Supports
@@ -685,7 +698,7 @@ en:
spending_proposals:
not_logged_in: You must %{signin} or %{signup} to continue.
not_verified: Only verified users can vote on proposals; %{verify_account}.
- organization: Organisations are not permitted to vote
+ organization: Organizations are not permitted to vote
unfeasible: Unfeasible investment projects can not be supported
not_voting_allowed: Voting phase is closed
welcome:
@@ -717,19 +730,6 @@ en:
user_permission_verify_info: "* Only for users on Census."
user_permission_verify_my_account: Verify my account
user_permission_votes: Participate on final voting
- omniauth:
- finish_signup:
- title: "Additional details"
- username_warning: "Due to a change in the way we interact with social networks, it is possible that your username now appears as 'already in use'. If that is your case, please choose a different username."
- twitter:
- sign_in: "Sign in with Twitter"
- sign_up: "Sign up with Twitter"
- facebook:
- sign_in: "Sign in with Facebook"
- sign_up: "Sign up with Facebook"
- google_oauth2:
- sign_in: "Sign in with Google"
- sign_up: "Sign up with Google"
invisible_captcha:
sentence_for_humans: "If you are human, ignore this field"
timestamp_error_message: "Sorry, that was too quick! Please resubmit."
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 6afbc6820..81716214b 100755
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -152,12 +152,13 @@ es:
proposal: la propuesta
proposal_notification: "la notificación"
spending_proposal: la propuesta de gasto
+ budget/investment: la propuesta de inversión
user: la cuenta
verification/sms: el teléfono
signature_sheet: la hoja de firmas
geozones:
none: Toda la ciudad
- all: Todos los ámbitos
+ all: Todos los ámbitos de actuación
layouts:
application:
chrome: Google Chrome
@@ -214,7 +215,8 @@ es:
proposals: Propuestas
proposal_ballot: Votaciones
see_all: Ver propuestas
- spending_proposals: Presupuestos participativos
+ budgets: Presupuestos ciudadanos
+ spending_proposals: "Propuestas de inversión"
legacy_legislation:
help:
alt: Selecciona el texto que quieres comentar y pulsa en el botón con el lápiz.
@@ -346,14 +348,23 @@ es:
facebook:
sign_in: Entra con Facebook
sign_up: Regístrate con Facebook
+ name: Facebook
finish_signup:
title: Añade tu email
google_oauth2:
sign_in: Entra con Google
sign_up: Regístrate con Google
+ name: Google
twitter:
sign_in: Entra con Twitter
sign_up: Regístrate con Twitter
+ name: Twitter
+ info_sign_in: "Entra con:"
+ info_sign_up: "Regístrate con:"
+ or_fill: "O rellena el siguiente formulario:"
+ finish_signup:
+ title: "Detalles adicionales de tu cuenta"
+ username_warning: "Debido a que hemos cambiado la forma en la que nos conectamos con redes sociales y es posible que tu nombre de usuario aparezca como 'ya en uso', incluso si antes podías acceder con él. Si es tu caso, por favor elige un nombre de usuario distinto."
proposals:
create:
form:
@@ -499,6 +510,8 @@ es:
show:
back: "Volver a mi actividad"
shared:
+ "yes": "Sí"
+ "no": "No"
advanced_search:
author_type: 'Por categoría de autor'
author_type_blank: 'Elige una categoría'
@@ -532,6 +545,7 @@ es:
hide: Ocultar
print:
print_button: Imprimir esta información
+ search: Buscar
show: Mostrar
suggest:
debate:
@@ -647,8 +661,7 @@ es:
deleted: Eliminado
deleted_debate: Este debate ha sido eliminado
deleted_proposal: Este propuesta ha sido eliminada
- delete_spending_proposal: Eliminar
- confirm_deletion_spending_proposal: "¿Seguro que desea eliminar esta propuesta?"
+ deleted_budget_investment: Este propuesta de inversión ha sido eliminada
filters:
comments:
one: 1 Comentario
@@ -659,7 +672,7 @@ es:
proposals:
one: 1 Propuesta
other: "%{count} Propuestas"
- spending_proposals:
+ budget_investments:
one: 1 Propuesta de inversión
other: "%{count} Propuestas de inversión"
no_activity: Usuario sin actividad pública
@@ -717,19 +730,6 @@ es:
user_permission_verify_info: "* Sólo usuarios empadronados."
user_permission_verify_my_account: Verificar mi cuenta
user_permission_votes: Participar en las votaciones finales*
- omniauth:
- finish_signup:
- title: "Detalles adicionales de tu cuenta"
- username_warning: "Debido a que hemos cambiado la forma en la que nos conectamos con redes sociales y es posible que tu nombre de usuario aparezca como 'ya en uso', incluso si antes podías acceder con él. Si es tu caso, por favor elige un nombre de usuario distinto."
- twitter:
- sign_in: "Entra con Twitter"
- sign_up: "Regístrate con Twitter"
- facebook:
- sign_in: "Entra con Facebook"
- sign_up: "Regístrate con Facebook"
- google_oauth2:
- sign_in: "Entra con Google"
- sign_up: "Regístrate con Google"
invisible_captcha:
sentence_for_humans: "Si eres humano, por favor ignora este campo"
timestamp_error_message: "Eso ha sido demasiado rápido. Por favor, reenvía el formulario."
diff --git a/config/locales/management.en.yml b/config/locales/management.en.yml
index fa02e5bc3..25032010e 100644
--- a/config/locales/management.en.yml
+++ b/config/locales/management.en.yml
@@ -29,7 +29,7 @@ en:
not_in_census_info: 'Citizens not in the Census can participate in the website with the following permissions:'
please_check_account_data: Please check that the account data above are correct.
title: User management
- under_age: You must be over 16 to verify your account.
+ under_age: "You don't have the required age to verify your account."
verify: Verify
email_label: Email
email_verifications:
@@ -50,6 +50,9 @@ en:
create_spending_proposal: Create spending proposal
print_spending_proposals: Print spending proposals
support_spending_proposals: Support spending proposals
+ create_budget_investment: Create budget investment
+ print_budget_investments: Print Budget Investments
+ support_budget_investments: Support Budget Investments
users: Users
edit_user_accounts: Edit user account
user_invites: User's invites
@@ -63,7 +66,9 @@ en:
proposals_note: The proposals more supported will be voted. If are accepted by a majority, the city Council shall be carried out.
proposals_title: 'Proposals:'
spending_proposals_info: Participate at http://url.consul
- spending_proposals_note: Participatory budget will be assigned to the most votes spending proposals.
+ spending_proposals_note: Participatory budget will be assigned to the most voted budget investment.
+ budget_investments_info: Participate at http://url.consul
+ budget_investments_note: Participatory budget will be assigned to the most voted budget investment.
print_info: Print this info
proposals:
alert:
@@ -71,6 +76,22 @@ en:
create_proposal: Create proposal
print:
print_button: Print
+ budgets:
+ create_new_investment: Create New Investment
+ print_investments: Print Budget Investments
+ support_investments: Support Budget Investments
+ budget_investments:
+ alert:
+ unverified_user: User is not verified
+ create: Create budget investment
+ filters:
+ heading: Concepto
+ unfeasible: Unfeasible investment
+ print:
+ print_button: Print
+ search_results:
+ one: " containing the term '%{search_term}'"
+ other: " containing the term '%{search_term}'"
spending_proposals:
alert:
unverified_user: User is not verified
@@ -106,4 +127,4 @@ en:
title: User's invites
create:
success_html: %{count} invitations have been sent.
- title: User's invites
\ No newline at end of file
+ title: User's invites
diff --git a/config/locales/management.es.yml b/config/locales/management.es.yml
index fe3d08697..9ac276f3a 100644
--- a/config/locales/management.es.yml
+++ b/config/locales/management.es.yml
@@ -29,7 +29,7 @@ es:
not_in_census_info: 'Las personas no empadronadas pueden participar en el Portal de Gobierno Abierto con las siguientes posibilidades:'
please_check_account_data: Compruebe que los datos anteriores son correctos para proceder a verificar la cuenta completamente.
title: Gestión de usuarios
- under_age: Debes ser mayor de 16 años para verificar tu cuenta.
+ under_age: No tienes edad suficiente para verificar tu cuenta.
verify: Verificar usuario
email_label: Email
email_verifications:
@@ -50,6 +50,9 @@ es:
create_spending_proposal: Crear propuesta de inversión
print_spending_proposals: Imprimir propts. de inversión
support_spending_proposals: Apoyar propts. de inversión
+ create_budget_investment: Crear proyectos de inversión
+ print_budget_investments: Imprimir proyectos de inversión
+ support_budget_investments: Apoyar proyectos de inversión
users: Usuarios
edit_user_accounts: Editar cuenta de usuario
user_invites: Invitaciones para usuarios
@@ -64,6 +67,8 @@ es:
proposals_title: 'Propuestas:'
spending_proposals_info: Participa en http://url.consul
spending_proposals_note: Los presupuestos participativos se invertirán en las propuestas de inversión más apoyadas.
+ budget_investments_info: Participa en http://url.consul
+ budget_investments_note: Los presupuestos participativos se invertirán en las propuestas de inversión más apoyadas.
print_info: Imprimir esta información
proposals:
alert:
@@ -71,6 +76,22 @@ es:
create_proposal: Crear propuesta
print:
print_button: Imprimir
+ budgets:
+ create_new_investment: Crear nuevo proyecto
+ print_investments: Imprimir proyectos
+ support_investments: Apoyar proyectos
+ budget_investments:
+ alert:
+ unverified_user: Usuario no verificado
+ create: Crear nuevo proyecto
+ filters:
+ heading: Concepto
+ unfeasible: Proyectos no factibles
+ print:
+ print_button: Imprimir
+ search_results:
+ one: " contiene el término '%{search_term}'"
+ other: " contienen el término '%{search_term}'"
spending_proposals:
alert:
unverified_user: Este usuario no está verificado
@@ -106,4 +127,4 @@ es:
title: Invitaciones para usuarios
create:
success_html: Se han enviado %{count} invitaciones.
- title: Invitaciones para usuarios
\ No newline at end of file
+ title: Invitaciones para usuarios
diff --git a/config/locales/responders.en.yml b/config/locales/responders.en.yml
index f69d95c5f..100ae5f41 100755
--- a/config/locales/responders.en.yml
+++ b/config/locales/responders.en.yml
@@ -9,6 +9,7 @@ en:
proposal: "Proposal created successfully."
proposal_notification: "Your message has been sent correctly."
spending_proposal: "Spending proposal created successfully. You can access it from %{activity}"
+ budget_investment: "Budget Investment created successfully."
signature_sheet: "Signature sheet created successfully"
save_changes:
notice: Changes saved
@@ -17,5 +18,7 @@ en:
debate: "Debate updated successfully."
proposal: "Proposal updated successfully."
spending_proposal: "Investment project updated succesfully."
+ budget_investment: "Investment project updated succesfully."
destroy:
- spending_proposal: "Spending proposal deleted succesfully."
\ No newline at end of file
+ spending_proposal: "Spending proposal deleted succesfully."
+ budget_investment: "Investment project deleted succesfully."
diff --git a/config/locales/responders.es.yml b/config/locales/responders.es.yml
index 4aeb969d9..43eb00669 100644
--- a/config/locales/responders.es.yml
+++ b/config/locales/responders.es.yml
@@ -9,6 +9,7 @@ es:
proposal: "Propuesta creada correctamente."
proposal_notification: "Tu message ha sido enviado correctamente."
spending_proposal: "Propuesta de inversión creada correctamente. Puedes acceder a ella desde %{activity}"
+ budget_investment: "Propuesta de inversión creada correctamente."
signature_sheet: "Hoja de firmas creada correctamente"
save_changes:
notice: Cambios guardados
@@ -17,5 +18,7 @@ es:
debate: "Debate actualizado correctamente."
proposal: "Propuesta actualizada correctamente."
spending_proposal: "Propuesta de inversión actualizada correctamente."
+ budget_investment: "Propuesta de inversión actualizada correctamente"
destroy:
- spending_proposal: "Propuesta de inversión eliminada."
\ No newline at end of file
+ spending_proposal: "Propuesta de inversión eliminada."
+ budget_investment: "Propuesta de inversión eliminada."
diff --git a/config/locales/settings.en.yml b/config/locales/settings.en.yml
index 9f9144a44..f596da796 100755
--- a/config/locales/settings.en.yml
+++ b/config/locales/settings.en.yml
@@ -23,6 +23,7 @@ en:
org_name: "Organization"
place_name: "Place"
feature:
+ budgets: Participatory budgeting
twitter_login: Twitter login
facebook_login: Facebook login
google_login: Google login
@@ -37,3 +38,4 @@ en:
meta_description: "Site description (SEO)"
meta_keywords: "Keywords (SEO)"
verification_offices_url: Verification offices URL
+ min_age_to_participate: Minimum age needed to participate
diff --git a/config/locales/settings.es.yml b/config/locales/settings.es.yml
index 3efc8aa62..0bf6d7f6a 100644
--- a/config/locales/settings.es.yml
+++ b/config/locales/settings.es.yml
@@ -23,6 +23,7 @@ es:
org_name: "Nombre de la organización"
place_name: "Nombre del lugar"
feature:
+ budgets: Presupuestos participativos
twitter_login: Registro con Twitter
facebook_login: Registro con Facebook
google_login: Registro con Google
@@ -30,10 +31,11 @@ es:
signature_sheets: Hojas de firmas
spending_proposals: Propuestas de inversión
spending_proposal_features:
- voting_allowed: Votaciones sobre propuestas de inversión.
+ voting_allowed: Votaciones sobre propuestas de inversión
legislation: Legislación
mailer_from_name: Nombre email remitente
mailer_from_address: Dirección email remitente
meta_description: "Descripción del sitio (SEO)"
meta_keywords: "Palabras clave (SEO)"
verification_offices_url: URL oficinas verificación
+ min_age_to_participate: Edad mínima para participar
diff --git a/config/locales/valuation.en.yml b/config/locales/valuation.en.yml
index e136562f4..de19fea09 100644
--- a/config/locales/valuation.en.yml
+++ b/config/locales/valuation.en.yml
@@ -3,7 +3,75 @@ en:
valuation:
menu:
title: Valuation
+ budgets: Participatory budgets
spending_proposals: Spending proposals
+ budgets:
+ index:
+ title: Participatory budgets
+ filters:
+ current: Open
+ finished: Finished
+ table_name: Name
+ table_phase: Phase
+ table_assigned_investments_valuation_open: Investment projects assigned with valuation open
+ table_actions: Actions
+ evaluate: Evaluate
+ budget_investments:
+ index:
+ headings_filter_all: All headings
+ filters:
+ valuation_open: Open
+ valuating: Under valuation
+ valuation_finished: Valuation finished
+ assigned_to: "Assigned to %{valuator}"
+ title: Investment projects
+ edit: Edit dossier
+ valuators_assigned:
+ one: Assigned valuator
+ other: "%{count} valuators assigned"
+ no_valuators_assigned: No valuators assigned
+ table_id: ID
+ table_title: Title
+ table_heading_name: Heading name
+ table_actions: Actions
+ show:
+ back: Back
+ title: Investment project
+ info: Author info
+ by: Sent by
+ sent: Sent at
+ heading: Heading
+ dossier: Dossier
+ edit_dossier: Edit dossier
+ price: Price
+ price_first_year: Cost during the first year
+ currency: "€"
+ feasibility: Feasibility
+ feasible: Feasible
+ unfeasible: Unfeasible
+ undefined: Undefined
+ valuation_finished: Valuation finished
+ duration: Time scope
+ internal_comments: Internal comments
+ responsibles: Responsibles
+ assigned_admin: Assigned admin
+ assigned_valuators: Assigned valuators
+ edit:
+ dossier: Dossier
+ price_html: "Price (%{currency})"
+ price_first_year_html: "Cost during the first year (%{currency})"
+ price_explanation_html: Price explanation
+ feasibility: Feasibility
+ feasible: Feasible
+ unfeasible: Not feasible
+ undefined_feasible: Pending
+ feasible_explanation_html: Feasibility explanation
+ valuation_finished: Valuation finished
+ duration_html: Time scope
+ internal_comments_html: Internal comments
+ save: Save changes
+ notice:
+ valuate: "Dossier updated"
spending_proposals:
index:
geozone_filter_all: All zones
@@ -13,10 +81,6 @@ en:
valuation_finished: Valuation finished
title: Investment projects for participatory budgeting
edit: Edit
- valuators_assigned:
- one: Assigned valuator
- other: "%{count} valuators assigned"
- no_valuators_assigned: No valuators assigned
show:
back: Back
heading: Investment project
diff --git a/config/locales/valuation.es.yml b/config/locales/valuation.es.yml
index 7d4ff5ed6..b588c8521 100644
--- a/config/locales/valuation.es.yml
+++ b/config/locales/valuation.es.yml
@@ -3,7 +3,75 @@ es:
valuation:
menu:
title: Evaluación
+ budgets: Presupuestos participativos
spending_proposals: Propuestas de inversión
+ budgets:
+ index:
+ title: Presupuestos participativos
+ filters:
+ current: Abiertos
+ finished: Terminados
+ table_name: Nombre
+ table_phase: Fase
+ table_assigned_investments_valuation_open: Prop. Inv. asignadas en evaluación
+ table_actions: Acciones
+ evaluate: Evaluar
+ budget_investments:
+ index:
+ headings_filter_all: Todas las partidas
+ filters:
+ valuation_open: Abiertas
+ valuating: En evaluación
+ valuation_finished: Evaluación finalizada
+ title: Propuestas de inversión
+ assigned_to: "Asignadas a %{valuator}"
+ edit: Editar informe
+ valuators_assigned:
+ one: Evaluador asignado
+ other: "%{count} evaluadores asignados"
+ no_valuators_assigned: Sin evaluador
+ table_id: ID
+ table_title: Título
+ table_heading_name: Nombre de la partida
+ table_actions: Acciones
+ show:
+ back: Volver
+ title: Propuesta de inversión
+ info: Datos de envío
+ by: Enviada por
+ sent: Fecha de creación
+ heading: Partida
+ dossier: Informe
+ edit_dossier: Editar informe
+ price: Coste
+ price_first_year: Coste en el primer año
+ currency: "€"
+ feasibility: Viabilidad
+ feasible: Viable
+ unfeasible: Inviable
+ undefined: Sin definir
+ valuation_finished: Informe finalizado
+ duration: Plazo de ejecución
+ internal_comments: Comentarios internos
+ responsibles: Responsables
+ assigned_admin: Administrador asignado
+ assigned_valuators: Evaluadores asignados
+ edit:
+ dossier: Informe
+ price_html: "Coste (%{currency}) (dato público)"
+ price_first_year_html: "Coste en el primer año (%{currency}) (opcional, privado)"
+ price_explanation_html: "Informe de coste (opcional, dato público)"
+ feasibility: Viabilidad
+ feasible: Viable
+ unfeasible: Inviable
+ undefined_feasible: Sin decidir
+ feasible_explanation_html: "Informe de inviabilidad (en caso de que lo sea, dato público)"
+ valuation_finished: Informe finalizado
+ duration_html: "Plazo de ejecución (opcional, dato no público)"
+ internal_comments_html: "Comentarios y observaciones (para responsables internos, dato no público)"
+ save: Guardar cambios
+ notice:
+ valuate: "Dossier actualizado"
spending_proposals:
index:
geozone_filter_all: Todos los ámbitos de actuación
@@ -13,10 +81,6 @@ es:
valuation_finished: Evaluación finalizada
title: Propuestas de inversión para presupuestos participativos
edit: Editar
- valuators_assigned:
- one: Evaluador asignado
- other: "%{count} evaluadores asignados"
- no_valuators_assigned: Sin evaluador
show:
back: Volver
heading: Propuesta de inversión
diff --git a/config/locales/verification.en.yml b/config/locales/verification.en.yml
index b6a89f939..598532354 100755
--- a/config/locales/verification.en.yml
+++ b/config/locales/verification.en.yml
@@ -59,7 +59,7 @@ en:
residence_card: Residence card
spanish_id: DNI
document_type_label: Document type
- error_not_allowed_age: You must be at least 16 years old
+ error_not_allowed_age: You don't have the required age to participate
error_not_allowed_postal_code: In order to be verified, you must be registered.
error_verifying_census: The Census was unable to verify your information. Please confirm that your census details are correct by calling to City Council or visit one %{offices}.
error_verifying_census_offices: Citizen Support Office
diff --git a/config/locales/verification.es.yml b/config/locales/verification.es.yml
index 65cfead6b..c08900cdf 100644
--- a/config/locales/verification.es.yml
+++ b/config/locales/verification.es.yml
@@ -59,7 +59,7 @@ es:
residence_card: Tarjeta de residencia
spanish_id: DNI
document_type_label: Tipo de documento
- error_not_allowed_age: Hay que tener al menos 16 años
+ error_not_allowed_age: No tienes la edad mínima para participar
error_not_allowed_postal_code: Para verificarte debes estar empadronado.
error_verifying_census: El Padrón no pudo verificar tu información. Por favor, confirma que tus datos de empadronamiento sean correctos llamando al Ayuntamiento o visitando una %{offices}.
error_verifying_census_offices: oficina de Atención al ciudadano
diff --git a/config/routes.rb b/config/routes.rb
index 315ab1d6b..774efb37c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -76,6 +76,16 @@ Rails.application.routes.draw do
end
end
+ resources :budgets, only: [:show, :index] do
+ resources :groups, controller: "budgets/groups", only: [:show]
+ resources :investments, controller: "budgets/investments", only: [:index, :new, :create, :show, :destroy] do
+ member { post :vote }
+ end
+ resource :ballot, only: :show, controller: "budgets/ballots" do
+ resources :lines, controller: "budgets/ballot/lines", only: [:create, :destroy]
+ end
+ end
+
scope '/participatory_budget' do
resources :spending_proposals, only: [:index, :new, :create, :show, :destroy], path: 'investment_projects' do
post :vote, on: :member
@@ -173,6 +183,17 @@ Rails.application.routes.draw do
get :summary, on: :collection
end
+ resources :budgets do
+ resources :budget_groups do
+ resources :budget_headings do
+ end
+ end
+
+ resources :budget_investments, only: [:index, :show, :edit, :update] do
+ member { patch :toggle_selection }
+ end
+ end
+
resources :signature_sheets, only: [:index, :new, :create, :show]
resources :banners, only: [:index, :new, :create, :edit, :update, :destroy] do
@@ -256,11 +277,17 @@ Rails.application.routes.draw do
end
namespace :valuation do
- root to: "spending_proposals#index"
+ root to: "budgets#index"
resources :spending_proposals, only: [:index, :show, :edit] do
patch :valuate, on: :member
end
+
+ resources :budgets, only: :index do
+ resources :budget_investments, only: [:index, :show, :edit] do
+ patch :valuate, on: :member
+ end
+ end
end
namespace :management do
@@ -295,6 +322,18 @@ Rails.application.routes.draw do
post :vote, on: :member
get :print, on: :collection
end
+
+ resources :budgets, only: :index do
+ collection do
+ get :create_investments
+ get :support_investments
+ get :print_investments
+ end
+ resources :investments, only: [:index, :new, :create, :show], controller: 'budgets/investments' do
+ post :vote, on: :member
+ get :print, on: :collection
+ end
+ end
end
if Rails.env.development?
diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb
index e510fe7c6..33e239515 100644
--- a/db/dev_seeds.rb
+++ b/db/dev_seeds.rb
@@ -25,8 +25,9 @@ Setting.create(key: 'url', value: 'http://localhost:3000')
Setting.create(key: 'org_name', value: 'Consul')
Setting.create(key: 'place_name', value: 'City')
Setting.create(key: 'feature.debates', value: "true")
-Setting.create(key: 'feature.spending_proposals', value: "true")
-Setting.create(key: 'feature.spending_proposal_features.voting_allowed', value: "true")
+Setting.create(key: 'feature.spending_proposals', value: nil)
+Setting.create(key: 'feature.spending_proposal_features.voting_allowed', value: nil)
+Setting.create(key: 'feature.budgets', value: "true")
Setting.create(key: 'feature.twitter_login', value: "true")
Setting.create(key: 'feature.facebook_login', value: "true")
Setting.create(key: 'feature.google_login', value: "true")
@@ -39,6 +40,7 @@ Setting.create(key: 'mailer_from_address', value: 'noreply@consul.dev')
Setting.create(key: 'meta_description', value: 'Citizen Participation and Open Government Application')
Setting.create(key: 'meta_keywords', value: 'citizen participation, open government')
Setting.create(key: 'verification_offices_url', value: 'http://oficinas-atencion-ciudadano.url/')
+Setting.create(key: 'min_age_to_participate', value: '16')
puts "Creating Geozones"
('A'..'Z').each { |i| Geozone.create(name: "District #{i}", external_code: i.ord, census_code: i.ord) }
@@ -57,6 +59,9 @@ admin.create_administrator
moderator = create_user('mod@consul.dev', 'mod')
moderator.create_moderator
+manager = create_user('manager@consul.dev', 'manager')
+manager.create_manager
+
valuator = create_user('valuator@consul.dev', 'valuator')
valuator.create_valuator
@@ -324,6 +329,71 @@ puts "Creating Valuation Assignments"
end
+puts "Creating Budgets"
+
+Budget::PHASES.each_with_index do |phase, i|
+ descriptions = Hash[Budget::PHASES.map{ |p| ["description_#{p}",
+ "
+ <%= t("debates.show.comments_title") %> + (<%= commentable.comments_count %>) +
+ + <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> + + <% if user_signed_in? %> + <%= render 'comments/form', {commentable: commentable, parent_id: nil, toggeable: false} %> + <% else %> ++ +