Merge branch 'master' into legislation-module-stable

This commit is contained in:
Amaia Castro
2016-12-27 16:43:43 +01:00
40 changed files with 779 additions and 22 deletions

View File

@@ -95,6 +95,8 @@ search:
# - '{devise,simple_form}.*'
ignore_missing:
- 'unauthorized.*'
- 'activerecord.models.proposal'
- 'activerecord.models.spending_proposal'
- 'activerecord.errors.models.proposal_notification.*'
- 'activerecord.errors.models.direct_message.*'
- 'errors.messages.blank'

View File

@@ -12,7 +12,11 @@ Devise.setup do |config|
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = 'noreply@consul.es'
if Rails.env.test?
config.mailer_sender = "noreply@example.org"
else
config.mailer_sender = "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>"
end
# Configure the class responsible to send e-mails.
config.mailer = 'DeviseMailer'

View File

@@ -1,4 +1,6 @@
ActsAsVotable::Vote.class_eval do
belongs_to :signature
def self.for_debates(debates)
where(votable_type: 'Debate', votable_id: debates)
end
@@ -14,4 +16,5 @@ ActsAsVotable::Vote.class_eval do
def value
vote_flag
end
end

View File

@@ -75,6 +75,10 @@ en:
external_url: "Link to additional documentation"
geozone_id: "Scope of operation"
title: "Title"
signature_sheet:
signable_type: "Signable type"
signable_id: "Signable ID"
document_numbers: "Documents numbers"
legislation/process:
title: Process Title
description: Description
@@ -117,3 +121,8 @@ en:
attributes:
minimum_interval:
invalid: "You have to wait a minium of %{interval} days between notifications"
signature:
attributes:
document_number:
not_in_census: 'Not verified by Census'
already_voted: 'Already voted this proposal'

View File

@@ -75,6 +75,10 @@ es:
external_url: "Enlace a documentación adicional"
geozone_id: "Ámbito de actuación"
title: "Título"
signature_sheet:
signable_type: "Tipo de hoja de firmas"
signable_id: "ID Propuesta ciudadana/Propuesta inversión"
document_numbers: "Números de documentos"
legislation/process:
title: Título del proceso
description: En qué consiste
@@ -117,3 +121,8 @@ es:
attributes:
minimum_interval:
invalid: "Debes esperar un mínimo de %{interval} días entre notificaciones"
signature:
attributes:
document_number:
not_in_census: 'No verificado por Padrón'
already_voted: 'Ya ha votado esta propuesta'

View File

@@ -187,6 +187,7 @@ en:
settings: Configuration settings
spending_proposals: Spending proposals
stats: Statistics
signature_sheets: Signature Sheets
legislation: Collaborative Legislation
moderators:
index:
@@ -372,6 +373,30 @@ en:
delete:
success: Geozone successfully deleted
error: This geozone can't be deleted since there are elements attached to it
signature_sheets:
author: Author
created_at: Creation date
name: Name
no_signature_sheets: "There are not signature_sheets"
index:
title: Signature sheets
new: New signature sheets
new:
title: New signature sheets
document_numbers_note: "Write the numbers separated by commas (,)"
submit: Create signature sheet
show:
created_at: Created
author: Author
documents: Documents
verified:
one: "There is %{count} valid signature"
other: "There are %{count} valid signatures"
unverified:
one: "There is %{count} invalid signature"
other: "There are %{count} invalid signatures"
unverified_error: (Not verified by Census)
loading: "There are still signatures that are being verified by the Census, please refresh the page in a few moments"
stats:
show:
stats_title: Stats

View File

@@ -185,6 +185,7 @@ es:
settings: Configuración global
spending_proposals: Propuestas de inversión
stats: Estadísticas
signature_sheets: Hojas de firmas
legislation: Legislación colaborativa
moderators:
index:
@@ -370,6 +371,30 @@ es:
delete:
success: Distrito borrado correctamente
error: No se puede borrar el distrito porque ya tiene elementos asociados
signature_sheets:
author: Autor
created_at: Fecha de creación
name: Nombre
no_signature_sheets: "No existen hojas de firmas"
index:
title: Hojas de firmas
new: Nueva hoja de firmas
new:
title: Nueva hoja de firmas
document_numbers_note: "Introduce los números separados por comas (,)"
submit: Crear hoja de firmas
show:
created_at: Creado
author: Autor
documents: Documentos
verified:
one: "Hay %{count} firma válida"
other: "Hay %{count} firmas válidas"
unverified:
one: "Hay %{count} firma inválida"
other: "Hay %{count} firmas inválidas"
unverified_error: (No verificadas por el Padrón)
loading: "Aún hay firmas que se están verificando por el Padrón, por favor refresca la página en unos instantes"
stats:
show:
stats_title: Estadísticas

View File

@@ -154,6 +154,7 @@ en:
spending_proposal: Spending proposal
user: Account
verification/sms: phone
signature_sheet: Signature sheet
geozones:
none: All city
all: All scopes

View File

@@ -154,6 +154,7 @@ es:
spending_proposal: la propuesta de gasto
user: la cuenta
verification/sms: el teléfono
signature_sheet: la hoja de firmas
geozones:
none: Toda la ciudad
all: Todos los ámbitos

View File

@@ -9,7 +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}"
signature_sheet: "Signature sheet created successfully"
save_changes:
notice: Changes saved
update:

View File

@@ -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}"
signature_sheet: "Hoja de firmas creada correctamente"
save_changes:
notice: Cambios guardados
update:

View File

@@ -27,7 +27,10 @@ en:
facebook_login: Facebook login
google_login: Google login
debates: Debates
signature_sheets: Signature sheets
spending_proposals: Investment projects
spending_proposal_features:
voting_allowed: Voting on investment projects
legislation: Legislation
mailer_from_name: Origin email name
mailer_from_address: Origin email address

View File

@@ -27,7 +27,10 @@ es:
facebook_login: Registro con Facebook
google_login: Registro con Google
debates: Debates
signature_sheets: Hojas de firmas
spending_proposals: Propuestas de inversión
spending_proposal_features:
voting_allowed: Votaciones sobre propuestas de inversión.
legislation: Legislación
mailer_from_name: Nombre email remitente
mailer_from_address: Dirección email remitente

View File

@@ -169,6 +169,8 @@ Rails.application.routes.draw do
get :summary, on: :collection
end
resources :signature_sheets, only: [:index, :new, :create, :show]
resources :banners, only: [:index, :new, :create, :edit, :update, :destroy] do
collection { get :search}
end