Merge branch 'master' into user-recomendations

This commit is contained in:
BertoCQ
2017-09-14 23:45:56 +02:00
committed by GitHub
141 changed files with 1552 additions and 1701 deletions

3
.gitignore vendored
View File

@@ -32,3 +32,6 @@
public/sitemap.xml
public/system/
#Netbeans projects files
/nbproject

View File

@@ -42,7 +42,6 @@ Layout/DotPosition:
- 'app/controllers/admin/poll/officer_assignments_controller.rb'
- 'app/controllers/admin/poll/polls_controller.rb'
- 'app/controllers/admin/poll/recounts_controller.rb'
- 'app/controllers/officing/final_recounts_controller.rb'
- 'app/controllers/officing/residence_controller.rb'
- 'app/controllers/officing/results_controller.rb'
- 'app/models/poll/officer.rb'
@@ -191,7 +190,6 @@ Layout/MultilineMethodCallIndentation:
- 'app/controllers/admin/poll/officer_assignments_controller.rb'
- 'app/controllers/admin/poll/polls_controller.rb'
- 'app/controllers/admin/poll/recounts_controller.rb'
- 'app/controllers/officing/final_recounts_controller.rb'
- 'app/controllers/officing/residence_controller.rb'
- 'app/controllers/officing/results_controller.rb'
- 'app/models/poll/officer.rb'
@@ -289,6 +287,7 @@ Lint/StringConversionInInterpolation:
- 'app/models/poll/null_result.rb'
- 'app/models/poll/partial_result.rb'
- 'app/models/poll/white_result.rb'
- 'app/models/poll/total_result.rb'
# Offense count: 15
# Cop supports --auto-correct.
@@ -473,7 +472,6 @@ Style/ConditionalAssignment:
- 'app/controllers/admin/poll/questions_controller.rb'
- 'app/controllers/comments_controller.rb'
- 'app/controllers/management/spending_proposals_controller.rb'
- 'app/controllers/officing/final_recounts_controller.rb'
- 'app/controllers/spending_proposals_controller.rb'
- 'app/controllers/verification/sms_controller.rb'
- 'lib/graph_ql/api_types_creator.rb'
@@ -565,6 +563,7 @@ Style/MutableConstant:
- 'app/models/poll/null_result.rb'
- 'app/models/poll/partial_result.rb'
- 'app/models/poll/white_result.rb'
- 'app/models/poll/total_result.rb'
- 'app/models/proposal.rb'
- 'app/models/signature_sheet.rb'
- 'app/models/site_customization/content_block.rb'

View File

@@ -1,221 +0,0 @@
# Customization
You can modify your own CONSUL to have your custom visual style, but first you'll have to create a fork from [https://github.com/consul/consul](https://github.com/consul/consul) using Github's "fork" button on top right corner. You can use any other service like Gitlab, but don't forget to put a reference link back to CONSUL on the footer to comply with project's license (GPL Affero 3).
We've created an specific structure where you can overwrite and customize the application in a way that will let you keep updating it from CONSUL's main repository, without having conflicts on code merging or risking loosing your customization changes. We try to make CONSUL as vanilla as possible to help other developers onboard the codebase.
## Special Folders and Files
In order to customize your CONSUL fork, you'll make use of some `custom` folders on the following paths:
* `config/locales/custom/`
* `app/assets/images/custom/`
* `app/views/custom/`
* `app/controllers/custom/`
* `app/models/custom/`
Also these are the files where you can apply some customization:
* `app/assets/stylesheets/custom.css`
* `app/assets/stylesheets/_custom_settings.css`
* `app/assets/javascripts/custom.js`
* `Gemfile_custom`
* `config/application.custom.rb`
### Internationalization
If you want to add a new language translation of the user-facing texts you can find them organized in YML files under `config/locales/` folder. Take a look at the official Ruby on Rails [internationalization guide](http://guides.rubyonrails.org/i18n.html) to better understand the translations system.
If you just want to change some of the existing texts, you can just drop your changes at the `config/locales/custom/` folder, we strongly recommend to include only those text that you want to change instead of a whole copy of the original file. For example if you want to customize the text "Ayuntamiento de Madrid, 2016" that appears on every page's footer, firstly you want to locate where it's used (`app/views/layouts/_footer.html.erb`), we can see code is:
```ruby
<%= t("layouts.footer.copyright", year: Time.current.year) %>
```
And that the text its located at the file `config/locales/es/general.yml` following this structure (we're only displaying in the following snippet the relevant parts):
```yml
es:
layouts:
footer:
copyright: Ayuntamiento de Madrid, %{year}
```
So in order to customize it, we would create a new file `config/locales/custom/es/general.yml` with just that content, and change "Ayuntamiento de Madrid" for our organization name. We strongly recommend to make copies from `config/locales/` and modify or delete the lines as needed to keep the indentation structure and avoid issues.
### Images
If you want to overwrite any image, firstly you need to findout the filename, and by defaul it will be located under `app/assets/images`. For example if you want to change the header logo (`app/assets/images/logo_header.png`) you must create another file with the exact same file name under `app/assets/images/custom` folder. The images and icons that you will most likely want to change are:
* apple-touch-icon-200.png
* icon_home.png
* logo_email.png
* logo_header.png
* map.jpg
* social_media_icon.png
* social_media_icon_twitter.png
### Views (HTML)
If you want to change any page HTML you can just find the correct file under the `app/views` folder and put a copy at `app/views/custom` keeping as well any sub-folder structure, and then apply your customizations. For example if you want to customize `app/views/pages/conditions.html` you'll have to make a copy at `app/views/custom/pages/conditions.html.erb` (note the `pages` subdirectory).
### CSS
In order to make changes to any CSS selector (custom style sheets), you can add them directly at `app/assets/stylesheets/custom.scss`. For example to change the header color (`.top-links`) you can just add:
```css
.top-links {
background: red;
}
```
If you want to change any [foundation](http://foundation.zurb.com/) variable, you can do it at the `app/assets/stylesheets/_custom_settings.scss` file. For example to change the main application color just add:
```css
$brand: #446336;
```
We use [SASS, with SCSS syntax](http://sass-lang.com/guide) as CSS preprocessor.
### Javascript
If you want to add some custom Javascript code, `app/assets/javascripts/custom.js` is the file to do it. For example to create a new alert just add:
```js
$(function(){
alert('foobar');
});
```
### Models
If you need to create new models or customize existent ones, you can do it so at the `app/models/custom` folder. Keep in mind that for old models you'll need to firstly require the dependency.
For example for Madrid's City Hall fork its required to check the zip code's format (it always starts with 280 followed by 2 digits). That check is at `app/models/custom/verification/residence.rb`:
```ruby
require_dependency Rails.root.join('app', 'models', 'verification', 'residence').to_s
class Verification::Residence
validate :postal_code_in_madrid
validate :residence_in_madrid
def postal_code_in_madrid
errors.add(:postal_code, I18n.t('verification.residence.new.error_not_allowed_postal_code')) unless valid_postal_code?
end
def residence_in_madrid
return if errors.any?
unless residency_valid?
errors.add(:residence_in_madrid, false)
store_failed_attempt
Lock.increase_tries(user)
end
end
private
def valid_postal_code?
postal_code =~ /^280/
end
end
```
Do not forget to cover your changes with a test at the `spec/models/custom` folder. Following the example we could create `spec/models/custom/residence_spec.rb`:
```ruby
require 'rails_helper'
describe Verification::Residence do
let(:residence) { build(:verification_residence, document_number: "12345678Z") }
describe "verification" do
describe "postal code" do
it "should be valid with postal codes starting with 280" do
residence.postal_code = "28012"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(0)
residence.postal_code = "28023"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(0)
end
it "should not be valid with postal codes not starting with 280" do
residence.postal_code = "12345"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(1)
residence.postal_code = "13280"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(1)
expect(residence.errors[:postal_code]).to include("In order to be verified, you must be registered in the municipality of Madrid.")
end
end
end
end
```
### Controllers
TODO!
### Gemfile
To add new gems (libraries) you can edit the `Gemfile_custom` file. For example to add [rails-footnotes](https://github.com/josevalim/rails-footnotes) gem you would just add:
```ruby
gem 'rails-footnotes', '~> 4.0'
```
And then just do the classic Ruby on Rails flow `bundle install` and following any gem specific install steps from it's own documentation.
### application.rb
If you need to extend or modify the `config/application.rb` just do it at the `config/application_custom.rb` file. For example if you want to change de default language to English, just add:
```ruby
module Consul
class Application < Rails::Application
config.i18n.default_locale = :en
config.i18n.available_locales = [:en, :es]
end
end
```
Remeber that in order to see this changes live you'll need to restart the server.
### lib/
TODO
### public/
TODO
### Seeds
TODO
## Updating
We recommend you to add CONSUL as remote:
```
git remote add consul https://github.com/consul/consul
```
And then just grab lastest changes on to a branch of your own repo with:
```
git checkout -b consul_update
git pull consul master
```

View File

@@ -1,221 +0,0 @@
# Personalización
Puedes modificar CONSUL y ponerle tu propia imagen, para esto debes primero hacer un fork de [https://github.com/consul/consul](https://github.com/consul/consul) creando un repositorio nuevo en Github. Puedes usar otro servicio como Gitlab, pero no te olvides de poner el enlace en el footer a tu repositorio en cumplimiento con la licencia de este proyecto (GPL Affero 3).
Hemos creado una estructura específica donde puedes sobreescribir y personalizar la aplicación para que puedas actualizar sin que tengas problemas al hacer merge y se sobreescriban por error tus cambios. Intentamos que CONSUL sea una aplicación Ruby on Rails lo más plain vanilla posible para facilitar el acceso de nuevas desarrolladoras.
## Ficheros y directorios especiales
Para adaptar tu fork de CONSUL puedes utilizar alguno de los directorios `custom` que están en las rutas:
* `config/locales/custom/`
* `app/assets/images/custom/`
* `app/views/custom/`
* `app/controllers/custom/`
* `app/models/custom/`
Aparte de estos directorios también cuentas con ciertos ficheros para:
* `app/assets/stylesheets/custom.css`
* `app/assets/stylesheets/_custom_settings.css`
* `app/assets/javascripts/custom.js`
* `Gemfile_custom`
* `config/application.custom.rb`
### Internacionalización
Si quieres modificar algún texto de la web deberías encontrarlos en los ficheros formato YML disponibles en `config/locales/`. Puedes leer la [guía de internacionalización](http://guides.rubyonrails.org/i18n.html) de Ruby on Rails sobre como funciona este sistema.
Las adaptaciones los debes poner en el directorio `config/locales/custom/`, recomendamos poner solo los textos que quieras personalizar. Por ejemplo si quieres personalizar el texto de "Ayuntamiento de Madrid, 2016" que se encuentra en el footer en todas las páginas, primero debemos ubicar en que plantilla se encuentra (`app/views/layouts/_footer.html.erb`), vemos que en el código pone lo siguiente:
```ruby
<%= t("layouts.footer.copyright", year: Time.current.year) %>
```
Y que en el fichero `config/locales/es/general.yml` sigue esta estructura (solo ponemos lo relevante para este caso):
```yml
es:
layouts:
footer:
copyright: Ayuntamiento de Madrid, %{year}
```
Si creamos el fichero `config/locales/custom/es/general.yml` y modificamos "Ayuntamiento de Madrid" por el nombre de la organización que se este haciendo la modificación. Recomendamos directamente copiar los ficheros `config/locales/` e ir revisando y corrigiendo las que querramos, borrando las líneas que no querramos traducir.
### Imágenes
Si quieres sobreescribir alguna imagen debes primero fijarte el nombre que tiene, por defecto se encuentran en `app/assets/images`. Por ejemplo si quieres modificar `app/assets/images/logo_header.png` debes poner otra con ese mismo nombre en el directorio `app/assets/images/custom`. Los iconos que seguramente quieras modificar son:
* apple-touch-icon-200.png
* icon_home.png
* logo_email.png
* logo_header.png
* map.jpg
* social_media_icon.png
* social_media_icon_twitter.png
### Vistas (HTML)
Si quieres modificar el HTML de alguna página puedes hacerlo copiando el HTML de `app/views` y poniendolo en `app/views/custom` respetando los subdirectorios que encuentres ahí. Por ejemplo si quieres modificar `app/views/pages/conditions.html` debes copiarlo y modificarla en `app/views/custom/pages/conditions.html.erb`
### CSS
Si quieres cambiar algun selector CSS (de las hojas de estilo) puedes hacerlo en el fichero `app/assets/stylesheets/custom.scss`. Por ejemplo si quieres cambiar el color del header (`.top-links`) puedes hacerlo agregando:
```css
.top-links {
background: red;
}
```
Si quieres cambiar alguna variable de [foundation](http://foundation.zurb.com/) puedes hacerlo en el fichero `app/assets/stylesheets/_custom_settings.scss`. Por ejemplo para cambiar el color general de la aplicación puedes hacerlo agregando:
```css
$brand: #446336;
```
Usamos un preprocesador de CSS, [SASS, con la sintaxis SCSS](http://sass-lang.com/guide).
### Javascript
Si quieres agregar código Javascript puedes hacerlo en el fichero `app/assets/javascripts/custom.js`. Por ejemplo si quieres que salga una alerta puedes poner lo siguiente:
```js
$(function(){
alert('foobar');
});
```
### Modelos
Si quieres agregar modelos nuevos, o modificar o agregar métodos a uno ya existente puedes hacerlo en `app/models/custom`. En el caso de los modelos antiguos debes primero hacer un require de la dependencia.
Por ejemplo en el caso del Ayuntamiento de Madrid se requiere comprobar que el código postal durante la verificación sigue un cierto formato (empieza con 280). Esto se realiza creando este fichero en `app/models/custom/verification/residence.rb`:
```ruby
require_dependency Rails.root.join('app', 'models', 'verification', 'residence').to_s
class Verification::Residence
validate :postal_code_in_madrid
validate :residence_in_madrid
def postal_code_in_madrid
errors.add(:postal_code, I18n.t('verification.residence.new.error_not_allowed_postal_code')) unless valid_postal_code?
end
def residence_in_madrid
return if errors.any?
unless residency_valid?
errors.add(:residence_in_madrid, false)
store_failed_attempt
Lock.increase_tries(user)
end
end
private
def valid_postal_code?
postal_code =~ /^280/
end
end
```
No olvides poner los tests relevantes en `spec/models/custom`, siguiendo con el ejemplo pondriamos lo siguiente en `spec/models/custom/residence_spec.rb`:
```ruby
require 'rails_helper'
describe Verification::Residence do
let(:residence) { build(:verification_residence, document_number: "12345678Z") }
describe "verification" do
describe "postal code" do
it "should be valid with postal codes starting with 280" do
residence.postal_code = "28012"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(0)
residence.postal_code = "28023"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(0)
end
it "should not be valid with postal codes not starting with 280" do
residence.postal_code = "12345"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(1)
residence.postal_code = "13280"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(1)
expect(residence.errors[:postal_code]).to include("In order to be verified, you must be registered in the municipality of Madrid.")
end
end
end
end
```
### Controladores
TODO
### Gemfile
Para agregar librerías (gems) nuevas puedes hacerlo en el fichero `Gemfile_custom`. Por ejemplo si quieres agregar la gema [rails-footnotes](https://github.com/josevalim/rails-footnotes) debes hacerlo agregandole
```ruby
gem 'rails-footnotes', '~> 4.0'
```
Y siguiendo el flujo clásico en Ruby on Rails (`bundle install` y seguir con los pasos específicos de la gema en la documentación)
### application.rb
Cuando necesites extender o modificar el `config/application.rb` puedes hacerlo a través del fichero `config/application_custom.rb`. Por ejemplo si quieres modificar el idioma por defecto al inglés pondrías lo siguiente:
```ruby
module Consul
class Application < Rails::Application
config.i18n.default_locale = :en
config.i18n.available_locales = [:en, :es]
end
end
```
Recuerda que para ver reflejado estos cambios debes reiniciar el servidor de desarrollo.
### lib/
TODO
### public/
TODO
### Seeds
TODO
## Actualizar
Te recomendamos que agregues el remote de CONSUL para facilitar este proceso de merge:
```
git remote add consul https://github.com/consul/consul
```
Con esto puedes actualizarte con
```
git checkout -b consul_update
git pull consul master
```

View File

@@ -35,7 +35,7 @@ gem 'omniauth-twitter', '~> 1.4.0'
gem 'paperclip', '~> 5.1.0'
gem 'jquery-fileupload-rails'
gem 'paranoia', '~> 2.3.1'
gem 'pg', '~> 0.20.0'
gem 'pg', '~> 0.21.0'
gem 'pg_search', '~> 2.0.1'
gem 'rails-assets-markdown-it', '~> 8.2.1', source: 'https://rails-assets.org'
gem 'redcarpet', '~> 3.4.0'
@@ -72,7 +72,7 @@ end
group :test do
gem 'capybara', '~> 2.14.0'
gem 'coveralls', '~> 0.8.21', require: false
gem 'database_cleaner', '~> 1.5.3'
gem 'database_cleaner', '~> 1.6.1'
gem 'email_spec', '~> 2.1.0'
gem 'poltergeist', '~> 1.15.0'
gem 'rspec-rails', '~> 3.6'
@@ -85,7 +85,7 @@ group :development do
gem 'capistrano3-delayed-job', '~> 1.7.3'
gem 'mdl', '~> 0.4.0', require: false
gem 'rvm1-capistrano3', '~> 1.4.0', require: false
gem 'scss_lint', '~> 0.53.0', require: false
gem 'scss_lint', '~> 0.54.0', require: false
gem 'web-console', '~> 3.3.0'
end

View File

@@ -119,7 +119,7 @@ GEM
tins (~> 1.6)
daemons (1.2.4)
dalli (2.7.6)
database_cleaner (1.5.3)
database_cleaner (1.6.1)
debug_inspector (0.0.3)
delayed_job (4.1.3)
activesupport (>= 3.0, < 5.2)
@@ -149,6 +149,7 @@ GEM
launchy (~> 2.1)
mail (~> 2.6)
errbase (0.0.3)
erubi (1.6.1)
erubis (2.7.0)
execjs (2.7.0)
factory_girl (4.8.0)
@@ -187,11 +188,11 @@ GEM
rack
socksify
i18n (0.8.6)
i18n-tasks (0.9.15)
i18n-tasks (0.9.18)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
easy_translate (>= 0.5.0)
erubis
erubi
highline (>= 1.7.3)
i18n
parser (>= 2.2.3.0)
@@ -302,7 +303,7 @@ GEM
activerecord (>= 4.0, < 5.2)
parser (2.4.0.0)
ast (~> 2.2)
pg (0.20.0)
pg (0.21.0)
pg_search (2.0.1)
activerecord (>= 4.2)
activesupport (>= 4.2)
@@ -357,7 +358,7 @@ GEM
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rinku (2.0.2)
rinku (2.0.3)
rollbar (2.14.1)
multi_json
rspec-core (3.6.0)
@@ -406,7 +407,7 @@ GEM
nokogiri (>= 1.4.0)
nori (~> 2.4)
wasabi (~> 3.4)
scss_lint (0.53.0)
scss_lint (0.54.0)
rake (>= 0.9, < 13)
sass (~> 3.4.20)
simplecov (0.14.1)
@@ -505,7 +506,7 @@ DEPENDENCIES
coveralls (~> 0.8.21)
daemons (~> 1.2.4)
dalli (~> 2.7.6)
database_cleaner (~> 1.5.3)
database_cleaner (~> 1.6.1)
delayed_job_active_record (~> 4.1.0)
devise (~> 3.5.7)
devise-async (~> 0.10.2)
@@ -536,7 +537,7 @@ DEPENDENCIES
omniauth-twitter (~> 1.4.0)
paperclip (~> 5.1.0)
paranoia (~> 2.3.1)
pg (~> 0.20.0)
pg (~> 0.21.0)
pg_search (~> 2.0.1)
poltergeist (~> 1.15.0)
quiet_assets (~> 1.1.0)
@@ -552,7 +553,7 @@ DEPENDENCIES
rvm1-capistrano3 (~> 1.4.0)
sass-rails (~> 5.0, >= 5.0.4)
savon (~> 2.11.1)
scss_lint (~> 0.53.0)
scss_lint (~> 0.54.0)
sitemap_generator (~> 5.3.1)
social-share-button (~> 0.10)
spring (~> 2.0.1)

View File

@@ -23,25 +23,20 @@ This is the opensource code repository of the eParticipation website CONSUL, ori
Development started on [2015 July 15th](https://github.com/consul/consul/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6). Code was deployed to production on 2015 september 7th to [decide.madrid.es](https://decide.madrid.es). Since then new features are added often. You can take a look at the current features in [features]( http://www.decide.es/en/) or [docs](https://github.com/consul/consul/tree/master/doc) and future features in the [open issues list](https://github.com/consul/consul/issues). For current status on upcoming features go to [Roadmap](https://github.com/consul/consul/projects/6)
## Tech stack
The application backend is written in the [Ruby language](https://www.ruby-lang.org/) using the [Ruby on Rails](http://rubyonrails.org/) framework.
Frontend tools used include [SCSS](http://sass-lang.com/) over [Foundation](http://foundation.zurb.com/) for the styles.
## Configuration for development and test environments
**NOTE**: For more detailed instructions check the [docs](https://github.com/consul/consul/tree/master/doc/en/dev_test_setup.md)
**NOTE**: For more detailed instructions check the [docs](https://github.com/consul/docs/tree/master/en/getting_started/prerequisites)
Prerequisites: install git, Ruby 2.3.2, bundler gem, and PostgreSQL (>=9.4).
```
```bash
git clone https://github.com/consul/consul.git
cd consul
bundle install
cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.yml
bin/rake db:setup
bin/rake db:create
bin/rake db:migrate
bin/rake db:dev_seed
RAILS_ENV=test rake db:setup
```
@@ -60,20 +55,6 @@ Run the tests with:
bin/rspec
```
If you add SCSS code you can check it with:
```
scss-lint
```
To maintain accesibility level, if you add new colors use a [Color contrast checker](http://webaim.org/resources/contrastchecker/) (WCAG AA is mandatory, WCAG AAA is recommended)
If you work on Coffeescript code you can check it with [coffeelint](http://www.coffeelint.org/) (install with `npm install -g coffeelint`) :
```
coffeelint .
```
You can use the default admin user from the seeds file:
**user:** admin@consul.dev
@@ -84,18 +65,9 @@ But for some actions like voting, you will need a verified user, the seeds file
**user:** verified@consul.dev
**pass:** 12345678
### Customization
## Documentation
Read more on documentation:
* English: [CUSTOMIZE_EN.md](CUSTOMIZE_EN.md)
* Spanish: [CUSTOMIZE_ES.md](CUSTOMIZE_ES.md)
### OAuth
To test authentication services with external OAuth suppliers - right now Twitter, Facebook and Google - you'll need to create an "application" in each of the supported platforms and set the *key* and *secret* provided in your *secrets.yml*
In the case of Google, verify that the APIs *Contacts API* and *Google+ API* are enabled for the application.
Please check the ongoing documentation at https://consul_docs.gitbooks.io/docs/content/ to learn more about how to start your own CONSUL fork, install it, customize it and learn to use it from an administrator/maintainer perspective. You can contribute to it at https://github.com/consul/docs
## License
@@ -104,7 +76,3 @@ Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt)
## Contributions
See [CONTRIBUTING.md](CONTRIBUTING.md)
## Brand guidelines
If you want to use CONSUL logo you can [download the guidelines](https://raw.githubusercontent.com/consul/consul/master/public/consul_brand.zip) which contains a use guide and different versions and sizes of the logo.

View File

@@ -23,14 +23,9 @@ Este es el repositorio de código abierto de la Aplicación de Participación Ci
El desarrollo de esta aplicación comenzó el [15 de Julio de 2015](https://github.com/consul/consul/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6) y el código fue puesto en producción el día 7 de Septiembre de 2015 en [decide.madrid.es](https://decide.madrid.es). Desde entonces se le añaden mejoras y funcionalidades constantemente. Las funcionalidades actuales se pueden consultar en [características](http://www.decide.es/es/) o en la [documentación](https://github.com/consul/consul/tree/master/doc) y las siguientes funcionaliades en la lista de [tareas por hacer](https://github.com/consul/consul/issues). Para conocer el estado actual de las próximas caracteristicas, vaya a [Roadmap](https://github.com/consul/consul/projects/6)
## Tecnología
El backend de esta aplicación se desarrolla con el lenguaje de programación [Ruby](https://www.ruby-lang.org/) sobre el *framework* [Ruby on Rails](http://rubyonrails.org/).
Las herramientas utilizadas para el frontend no están cerradas aún. Los estilos de la página usan [SCSS](http://sass-lang.com/) sobre [Foundation](http://foundation.zurb.com/)
## Configuración para desarrollo y tests
**NOTA**: para unas instrucciones más detalladas consulta la [documentación](https://github.com/consul/consul/tree/master/doc/es/dev_test_setup.md)
**NOTA**: para unas instrucciones más detalladas consulta la [documentación](https://github.com/consul/docs/tree/master/es/getting_started/prerequisites)
Prerequisitos: tener instalado git, Ruby 2.3.2, la gema `bundler` y PostgreSQL (9.4 o superior).
@@ -41,7 +36,8 @@ cd consul
bundle install
cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.yml
bin/rake db:setup
bin/rake db:create
bin/rake db:migrate
bin/rake db:dev_seed
RAILS_ENV=test rake db:setup
```
@@ -60,20 +56,6 @@ Para ejecutar los tests:
bin/rspec
```
Si añades código SCSS puedes revisarlo con:
```
scss-lint
```
Para mantener el nivel de accesibilidad, si añades colores nuevos utiliza un [Comprobador de contraste de color](http://webaim.org/resources/contrastchecker/) (WCAG AA es obligatorio, WCAG AAA es recomendable)
Si trabajas en código coffeescript puedes revisarlo con [coffeelint](http://www.coffeelint.org/) (instalalo con `npm install -g coffeelint`) :
```
coffeelint .
```
Puedes usar el usuario administrador por defecto del fichero seeds:
**user:** admin@consul.dev
@@ -84,15 +66,9 @@ Pero para ciertas acciones, como apoyar, necesitarás un usuario verificado, el
**user:** verified@consul.dev
**pass:** 12345678
### Customización
## Documentación
Ver fichero [CUSTOMIZE_ES.md](CUSTOMIZE_ES.md)
### OAuth
Para probar los servicios de autenticación mediante proveedores externos OAuth — en este momento Twitter, Facebook y Google —, necesitas crear una "aplicación" en cada una de las plataformas soportadas y configurar la *key* y el *secret* proporcionados en tu *secrets.yml*
En el caso de Google, comprueba que las APIs *Contacts API* y *Google+ API* están habilitadas para la aplicación.
Por favor visita la documentación que está siendo completada en https://consul_docs.gitbooks.io/docs/content/ para conocer más sobre este proyecto, como comenzar tu propio fork, instalarlo, customizarlo y usarlo como administrador/mantenedor. Puedes colaborar en ella en https://github.com/consul/docs
## Licencia
@@ -101,7 +77,3 @@ El código de este proyecto está publicado bajo la licencia AFFERO GPL v3 (ver
## Contribuciones
Ver fichero [CONTRIBUTING_ES.md](CONTRIBUTING_ES.md)
## Guía de estilo
Si quieres usar el logo de CONSUL puedes [descargar la guía de estilo](https://raw.githubusercontent.com/consul/consul/master/public/consul_brand.zip) que contiene una guía de uso y diferentes versiones y tamaños del logo.

View File

@@ -5,6 +5,8 @@ App.Comments =
this.update_comments_count()
add_reply: (parent_id, response_html) ->
if $("##{parent_id} .comment-children").length == 0
$("##{parent_id}").append("<li><ul id='#{parent_id}_children' class='no-bullet comment-children'></ul></li>")
$("##{parent_id} .comment-children:first").prepend($(response_html))
this.update_comments_count()

View File

@@ -1,7 +1,6 @@
App.EmbedVideo =
initialize: ->
$('#js-embedded-video').each ->
code = $(this).data("video-code")
code = $(this).data("video-code")
$('#js-embedded-video').html(code)

View File

@@ -54,7 +54,7 @@ $admin-color: #cf3638;
}
}
th {
th, td {
text-align: left;
&.text-center {

View File

@@ -206,7 +206,7 @@ a {
.menu.simple {
border-bottom: 1px solid $border;
margin: $line-height 0;
margin-bottom: $line-height;
li {
padding-bottom: rem-calc(7);

View File

@@ -314,6 +314,7 @@
.debate-show,
.proposal-show,
.poll-question-show,
.investment-project-show,
.budget-investment-show,
.polls-show,
@@ -895,9 +896,14 @@
}
.help-header {
background: #fafafa;
border-bottom: 1px solid #eee;
padding-bottom: $line-height / 2;
padding-top: $line-height;
h1 {
font-size: rem-calc(24);
text-transform: uppercase;
}
}

View File

@@ -48,7 +48,7 @@ class Admin::BudgetInvestmentMilestonesController < Admin::BaseController
end
def load_budget_investment_milestone
@milestone = Budget::Investment::Milestone.find params[:id]
@milestone = Budget::Investment::Milestone.find params[:id]
end

View File

@@ -30,6 +30,11 @@ class Admin::Poll::BoothsController < Admin::BaseController
end
end
def available
@booths = Poll::Booth.available.order(name: :asc).page(params[:page])
render :index
end
private
def booth_params

View File

@@ -1,4 +1,6 @@
class Admin::Poll::QuestionsController < Admin::BaseController
include CommentableActions
load_and_authorize_resource :poll
load_and_authorize_resource :question, class: 'Poll::Question'
@@ -20,6 +22,7 @@ class Admin::Poll::QuestionsController < Admin::BaseController
def create
@question.author = @question.proposal.try(:author) || current_user
recover_documents_from_cache(@question)
if @question.save
redirect_to admin_question_path(@question)
@@ -29,6 +32,7 @@ class Admin::Poll::QuestionsController < Admin::BaseController
end
def show
@document = Document.new(documentable: @question)
end
def edit
@@ -54,7 +58,8 @@ class Admin::Poll::QuestionsController < Admin::BaseController
private
def question_params
params.require(:poll_question).permit(:poll_id, :title, :question, :description, :proposal_id, :valid_answers)
params.require(:poll_question).permit(:poll_id, :title, :question, :description, :proposal_id, :valid_answers, :video_url,
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id])
end
def search_params

View File

@@ -2,20 +2,21 @@ class Admin::Poll::ShiftsController < Admin::BaseController
before_action :load_booth
before_action :load_polls
before_action :load_officer
def new
load_officers
load_shifts
@shift = ::Poll::Shift.new
end
def create
@shift = ::Poll::Shift.new(shift_params)
@officer = @shift.officer
if @shift.save
notice = t("admin.poll_shifts.flash.create")
redirect_to new_admin_booth_shift_path(@shift.booth), notice: notice
else
load_officers
load_shifts
render :new
end
@@ -28,6 +29,10 @@ class Admin::Poll::ShiftsController < Admin::BaseController
redirect_to new_admin_booth_shift_path(@booth), notice: notice
end
def search_officers
@officers = User.search(params[:search]).order(username: :asc)
end
private
def load_booth
@@ -38,14 +43,16 @@ class Admin::Poll::ShiftsController < Admin::BaseController
@polls = ::Poll.current_or_incoming
end
def load_officers
@officers = ::Poll::Officer.all
end
def load_shifts
@shifts = @booth.shifts
end
def load_officer
if params[:officer_id].present?
@officer = ::Poll::Officer.find(params[:officer_id])
end
end
def shift_params
params.require(:shift).permit(:booth_id, :officer_id, :date)
end

View File

@@ -1,8 +1,8 @@
class CommunitiesController < ApplicationController
TOPIC_ORDERS = %w{newest most_commented oldest}.freeze
before_action :set_order, :set_community, :load_topics, :load_participants
before_action :set_order, :set_community, :load_topics, :load_participants, only: :show
has_orders %w{newest most_commented oldest}, only: :show
has_orders TOPIC_ORDERS
skip_authorization_check
@@ -13,7 +13,7 @@ class CommunitiesController < ApplicationController
private
def set_order
@order = params[:order].present? ? params[:order] : "newest"
@order = valid_order? ? params[:order] : "newest"
end
def set_community
@@ -27,4 +27,8 @@ class CommunitiesController < ApplicationController
def load_participants
@participants = @community.participants
end
def valid_order?
params[:order].present? && TOPIC_ORDERS.include?(params[:order])
end
end

View File

@@ -20,7 +20,7 @@ class Management::SessionsController < ActionController::Base
def destroy_session
session[:manager] = nil
session[:document_type] = nil
session[:document_type] = nil
session[:document_number] = nil
end

View File

@@ -1,49 +0,0 @@
class Officing::FinalRecountsController < Officing::BaseController
before_action :load_poll
before_action :load_officer_assignment, only: :create
def new
@officer_assignments = ::Poll::OfficerAssignment.
includes(:final_recounts, booth_assignment: [:booth]).
joins(:booth_assignment).
final.
where(id: current_user.poll_officer.officer_assignment_ids).
where("poll_booth_assignments.poll_id = ?", @poll.id).
order(date: :asc)
@final_recounts = @officer_assignments.select {|oa| oa.final_recounts.any?}.map(&:final_recounts).flatten
end
def create
@final_recount = ::Poll::FinalRecount.find_or_initialize_by(booth_assignment_id: @officer_assignment.booth_assignment_id,
date: final_recount_params[:date])
@final_recount.officer_assignment_id = @officer_assignment.id
@final_recount.count = final_recount_params[:count]
if @final_recount.save
msg = { notice: t("officing.final_recounts.flash.create") }
else
msg = { alert: t("officing.final_recounts.flash.error_create") }
end
redirect_to new_officing_poll_final_recount_path(@poll), msg
end
private
def load_poll
@poll = Poll.expired.find(params[:poll_id])
end
def load_officer_assignment
@officer_assignment = current_user.poll_officer.
officer_assignments.final.find_by(id: final_recount_params[:officer_assignment_id])
if @officer_assignment.blank?
redirect_to new_officing_poll_final_recount_path(@poll), alert: t("officing.final_recounts.flash.error_create")
end
end
def final_recount_params
params.permit(:officer_assignment_id, :count, :date)
end
end

View File

@@ -6,10 +6,11 @@ class Officing::PollsController < Officing::BaseController
end
def final
@polls = current_user.poll_officer? ? current_user.poll_officer.final_days_assigned_polls : []
return unless current_user.poll_officer?
@polls = @polls.select {|poll| poll.ends_at > 1.week.ago && poll.expired?}
@polls = if current_user.poll_officer?
current_user.poll_officer.final_days_assigned_polls.select {|poll| poll.ends_at > 1.week.ago && poll.expired?}
else
[]
end
end
end
end

View File

@@ -28,6 +28,7 @@ class Officing::ResultsController < Officing::BaseController
where(date: index_params[:date])
@whites = ::Poll::WhiteResult.where(booth_assignment_id: @booth_assignment.id, date: index_params[:date]).sum(:amount)
@nulls = ::Poll::NullResult.where(booth_assignment_id: @booth_assignment.id, date: index_params[:date]).sum(:amount)
@total = ::Poll::TotalResult.where(booth_assignment_id: @booth_assignment.id, date: index_params[:date]).sum(:amount)
end
end
@@ -70,6 +71,7 @@ class Officing::ResultsController < Officing::BaseController
build_white_results
build_null_results
build_total_results
end
def build_white_results
@@ -96,6 +98,18 @@ class Officing::ResultsController < Officing::BaseController
end
end
def build_total_results
if results_params[:total].present?
total_result = ::Poll::TotalResult.find_or_initialize_by(booth_assignment_id: @officer_assignment.booth_assignment_id,
date: results_params[:date])
total_result.officer_assignment_id = @officer_assignment.id
total_result.amount = results_params[:total].to_i
total_result.author = current_user
total_result.origin = 'booth'
@results << total_result
end
end
def go_back_to_new(alert = nil)
params[:d] = results_params[:date]
params[:oa] = results_params[:officer_assignment_id]
@@ -132,7 +146,7 @@ class Officing::ResultsController < Officing::BaseController
end
def results_params
params.permit(:officer_assignment_id, :date, :questions, :whites, :nulls)
params.permit(:officer_assignment_id, :date, :questions, :whites, :nulls, :total)
end
def index_params

View File

@@ -10,6 +10,8 @@ class Polls::QuestionsController < ApplicationController
@comment_tree = CommentTree.new(@commentable, params[:page], @current_order)
set_comment_flags(@comment_tree.comments)
@document = Document.new(documentable: @question)
question_answer = @question.answers.where(author_id: current_user.try(:id)).first
@answers_by_question_id = {@question.id => question_answer.try(:answer)}
end

View File

@@ -1,13 +1,13 @@
class TopicsController < ApplicationController
include CommentableActions
include FlagActions
before_action :load_community
before_action :load_topic, only: [:show, :edit, :update]
before_action :load_topic, only: [:show, :edit, :update, :destroy]
has_orders %w{most_voted newest oldest}, only: :show
skip_authorization_check
skip_authorization_check only: :show
load_and_authorize_resource except: :show
def new
@topic = Topic.new
@@ -39,6 +39,11 @@ class TopicsController < ApplicationController
end
end
def destroy
@topic.destroy
redirect_to community_path(@community), notice: I18n.t('flash.actions.destroy.topic')
end
private
def topic_params

View File

@@ -44,7 +44,7 @@ class Verification::LetterController < ApplicationController
end
def verify_phone!
unless current_user.confirmed_phone?
unless current_user.sms_verified?
redirect_to verified_user_path, alert: t('verification.letter.alert.unconfirmed_code')
end
end

View File

@@ -25,7 +25,7 @@ module AdminHelper
end
def menu_polls?
["polls", "questions", "officers", "booths", "officer_assignments", "booth_assignments", "recounts", "results"].include? controller_name
["polls", "questions", "officers", "booths", "officer_assignments", "booth_assignments", "recounts", "results", "shifts"].include? controller_name
end
def menu_profiles?

View File

@@ -42,7 +42,7 @@ module CommentsHelper
def commentable_path(comment)
commentable = comment.commentable
case comment.commentable_type
when "Budget::Investment"
budget_investment_path(commentable.budget_id, commentable)
@@ -51,7 +51,7 @@ module CommentsHelper
when "Legislation::Annotation"
legislation_process_draft_version_annotation_path(commentable.draft_version.process, commentable.draft_version, commentable)
when "Topic"
community_topic_path(comment.commentable.community, comment.commentable)
community_topic_path(commentable.community, commentable)
else
commentable
end

View File

@@ -1,12 +1,7 @@
module CommunitiesHelper
def community_title(community)
if community.from_proposal?
community.proposal.title
else
investment = Budget::Investment.where(community_id: community.id).first
investment.title
end
community.from_proposal? ? community.proposal.title : community.investment.title
end
def community_text(community)
@@ -21,8 +16,7 @@ module CommunitiesHelper
if community.from_proposal?
community.proposal.author_id == participant.id
else
investment = Budget::Investment.where(community_id: community.id).first
investment.author_id == participant.id
community.investment.author_id == participant.id
end
end
@@ -30,8 +24,7 @@ module CommunitiesHelper
if community.from_proposal?
proposal_path(community.proposal)
else
investment = Budget::Investment.where(community_id: community.id).first
budget_investment_path(investment.budget_id, investment)
budget_investment_path(community.investment.budget_id, community.investment)
end
end

View File

@@ -1,5 +1,8 @@
module EmbedVideosHelper
VIMEO_REGEX = /vimeo.*(staffpicks\/|channels\/|videos\/|video\/|\/)([^#\&\?]*).*/
YOUTUBE_REGEX = /youtu.*(be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/
def embedded_video_code
link = @proposal.video_url
title = t('proposals.show.embed_video_title', proposal: @proposal.title)
@@ -10,10 +13,10 @@ module EmbedVideosHelper
end
if server == "Vimeo"
reg_exp = /vimeo.*(staffpicks\/|channels\/|videos\/|video\/|\/)([^#\&\?]*).*/
reg_exp = VIMEO_REGEX
src = "https://player.vimeo.com/video/"
elsif server == "YouTube"
reg_exp = /youtu.*(be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/
reg_exp = YOUTUBE_REGEX
src = "https://www.youtube.com/embed/"
end
@@ -28,4 +31,11 @@ module EmbedVideosHelper
end
end
end
def valid_video_url?
return if video_url.blank?
return if video_url.match(VIMEO_REGEX)
return if video_url.match(YOUTUBE_REGEX)
errors.add(:video_url, :invalid)
end
end

View File

@@ -57,7 +57,7 @@ module Abilities
can [:index, :create, :edit, :update, :destroy], Geozone
can [:read, :create, :update, :destroy, :add_question, :remove_question, :search_booths, :search_questions, :search_officers], Poll
can [:read, :create, :update, :destroy], Poll::Booth
can [:read, :create, :update, :destroy, :available], Poll::Booth
can [:search, :create, :index, :destroy], ::Poll::Officer
can [:create, :destroy], ::Poll::BoothAssignment
can [:create, :destroy], ::Poll::OfficerAssignment

View File

@@ -71,6 +71,9 @@ module Abilities
can :create, Annotation
can [:update, :destroy], Annotation, user_id: user.id
can [:create], Topic
can [:update, :destroy], Topic, author_id: user.id
end
end
end

View File

@@ -1,11 +1,11 @@
class Community < ActiveRecord::Base
has_one :proposal
has_one :investment
has_one :investment, class_name: Budget::Investment
has_many :topics
def participants
users_participants = users_who_commented_by +
users_who_topics_author_by +
users_participants = users_who_commented +
users_who_topics_author +
author_from_community
users_participants.uniq
end
@@ -16,24 +16,19 @@ class Community < ActiveRecord::Base
private
def users_who_commented_by
def users_who_commented
topics_ids = topics.pluck(:id)
query = "comments.commentable_id IN (?)and comments.commentable_type = 'Topic'"
User.by_comments(query, topics_ids)
end
def users_who_topics_author_by
def users_who_topics_author
author_ids = topics.pluck(:author_id)
User.by_authors(author_ids)
end
def author_from_community
if from_proposal?
User.where(id: proposal.author_id)
else
investment = Budget::Investment.where(community_id: id).first
User.where(id: investment.author_id)
end
from_proposal? ? User.where(id: proposal.author_id) : User.where(id: investment.author_id)
end
end

View File

@@ -7,8 +7,8 @@ module Communitable
end
def associate_community
community = Community.create
self.community_id = community.id
community = Community.create
self.community_id = community.id
end
end

View File

@@ -4,6 +4,7 @@ class Poll < ActiveRecord::Base
has_many :partial_results, through: :booth_assignments
has_many :white_results, through: :booth_assignments
has_many :null_results, through: :booth_assignments
has_many :total_results, through: :booth_assignments
has_many :voters
has_many :officer_assignments, through: :booth_assignments
has_many :officers, through: :officer_assignments

View File

@@ -5,10 +5,15 @@ class Poll
has_many :shifts
validates :name, presence: true, uniqueness: true
def self.search(terms)
return Booth.none if terms.blank?
Booth.where("name ILIKE ? OR location ILIKE ?", "%#{terms}%", "%#{terms}%")
end
def self.available
where(polls: { id: Poll.current_or_incoming }).includes(:polls)
end
end
end

View File

@@ -10,5 +10,6 @@ class Poll
has_many :partial_results
has_many :white_results
has_many :null_results
has_many :total_results
end
end

View File

@@ -1,6 +1,11 @@
class Poll::Question < ActiveRecord::Base
include Measurable
include Searchable
include Documentable
documentable max_documents_allowed: 1,
max_file_size: 3.megabytes,
accepted_content_types: [ "application/pdf" ]
accepts_nested_attributes_for :documents, allow_destroy: true
acts_as_paranoid column: :hidden_at
include ActsAsParanoidAliases

View File

@@ -8,6 +8,7 @@ class Poll
validates :date, presence: true
validates :date, uniqueness: { scope: [:officer_id, :booth_id] }
before_create :persist_data
after_create :create_officer_assignments
def create_officer_assignments
@@ -18,5 +19,11 @@ class Poll
Poll::OfficerAssignment.create!(attrs)
end
end
def persist_data
self.officer_name = officer.name
self.officer_email = officer.email
end
end
end

View File

@@ -0,0 +1,23 @@
class Poll::TotalResult < ActiveRecord::Base
VALID_ORIGINS = %w{web booth}
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
belongs_to :booth_assignment
belongs_to :officer_assignment
validates :author, presence: true
validates :origin, inclusion: {in: VALID_ORIGINS}
scope :by_author, ->(author_id) { where(author_id: author_id) }
before_save :update_logs
def update_logs
if amount_changed? && amount_was.present?
self.amount_log += ":#{amount_was.to_s}"
self.officer_assignment_id_log += ":#{officer_assignment_id_was.to_s}"
self.author_id_log += ":#{author_id_was.to_s}"
end
end
end

View File

@@ -15,6 +15,7 @@ class Proposal < ActiveRecord::Base
max_file_size: 3.megabytes,
accepted_content_types: [ "application/pdf" ]
accepts_nested_attributes_for :documents, allow_destroy: true
include EmbedVideosHelper
acts_as_votable
acts_as_paranoid column: :hidden_at
@@ -41,6 +42,8 @@ class Proposal < ActiveRecord::Base
validates :terms_of_service, acceptance: { allow_nil: false }, on: :create
validate :valid_video_url?
before_validation :set_responsible_name
before_save :calculate_hot_score, :calculate_confidence_score

View File

@@ -1,6 +1,4 @@
class Topic < ActiveRecord::Base
include Flaggable
acts_as_paranoid column: :hidden_at
include ActsAsParanoidAliases

View File

@@ -73,12 +73,15 @@
<%= link_to t('admin.menu.poll_officers'), admin_officers_path %>
</li>
<li <%# "class=active" if controller_name == "booths" %>>
<li <%= "class=active" if controller_name == "booths" &&
action_name != "available" %>>
<%= link_to t('admin.menu.poll_booths'), admin_booths_path %>
</li>
<li <%= "class=active" if controller_name == "booths" %>>
<%= link_to t('admin.menu.poll_shifts'), admin_booths_path %>
<li <%= "class=active" if controller_name == "shifts" ||
controller_name == "booths" &&
action_name == "available" %>>
<%= link_to t('admin.menu.poll_shifts'), available_admin_booths_path %>
</li>
</ul>
</li>

View File

@@ -15,8 +15,7 @@
<thead>
<th><%= t("admin.booths.index.name") %></th>
<th><%= t("admin.booths.index.location") %></th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th class="text-right"><%= t("admin.actions.actions") %></th>
</thead>
<tbody>
<% @booths.each do |booth| %>

View File

@@ -15,7 +15,6 @@
<thead>
<th><%= t("admin.poll_officer_assignments.index.table_name") %></th>
<th><%= t("admin.poll_officer_assignments.index.table_email") %></th>
<th class="text-right"><%= t("admin.actions.actions") %></th>
</thead>
<tbody>
<% @officers.each do |officer| %>
@@ -28,11 +27,6 @@
<td>
<%= officer.email %>
</td>
<td class="text-right">
<%= link_to t("admin.poll_officer_assignments.index.edit_officer_assignments"),
by_officer_admin_poll_officer_assignments_path(@poll, officer_id: officer.id),
class: "button hollow" %>
</td>
</tr>
<% end %>
</tbody>
@@ -40,4 +34,4 @@
<%= paginate @officers %>
<% end %>
</div>
</div>

View File

@@ -26,6 +26,17 @@
ckeditor: { language: I18n.locale } %>
</div>
<div class="documents small-12" data-max-documents="<%= Poll::Question.max_documents_allowed %>">
<%= render 'documents/nested_documents', documentable: @question %>
</div>
<div class="small-12">
<%= f.label :video_url, t("proposals.form.proposal_video_url") %>
<p class="help-text" id="video-url-help-text"><%= t("proposals.form.proposal_video_url_note") %></p>
<%= f.text_field :video_url, placeholder: t("proposals.form.proposal_video_url"), label: false,
aria: {describedby: "video-url-help-text"} %>
</div>
<div class="row">
<div class="actions small-12 medium-4 column margin-top">
<%= f.submit(class: "button expanded", value: t("shared.save")) %>

View File

@@ -40,6 +40,21 @@
<%= @question.description %>
</p>
<% if @question.video_url.present? %>
<p>
<strong><%= t("admin.questions.show.video_url") %></strong>
<br>
<a href="<%= @question.video_url %>"><%= @question.video_url %></a>
</p>
<% end %>
<% if @question.documents.any? %>
<p>
<strong><%= t("admin.questions.show.documents") %></strong>
<br>
<a href="<%= @question.documents.first.attachment.url %>"><%= @question.documents.first.title %></a>
</p>
<% end %>
<%= link_to t("admin.questions.show.preview"), question_path(@question) %>
</div>

View File

@@ -14,11 +14,13 @@
<thead>
<th><%= t("admin.results.index.table_whites") %></th>
<th><%= t("admin.results.index.table_nulls") %></th>
<th><%= t("admin.results.index.table_total") %></th>
</thead>
<tbody>
<tr>
<td id="white_results"><%= @poll.white_results.sum(:amount) %></td>
<td id="null_results"><%= @poll.null_results.sum(:amount) %></td>
<td id="total_results"><%= @poll.total_results.sum(:amount) %></td>
</tr>
</tbody>
</table>
@@ -47,4 +49,4 @@
<% end %>
<% end %>
</div>
</div>

View File

@@ -0,0 +1,30 @@
<%= form_for @shift, as: :shift, url: admin_booth_shifts_path do |f| %>
<%= render "shared/errors", resource: @shift %>
<fieldset class="fieldset">
<legend>
<%= t("admin.poll_shifts.new.new_shift") %>
</legend>
<div class="small-12 medium-4 column highlight padding">
<strong><%= t("admin.poll_shifts.new.officer") %></strong>
<br><%= @officer.name %>
<%= f.hidden_field :officer_id, value: @officer.id %>
</div>
<div class="small-12 medium-4 column">
<label><%= t("admin.poll_shifts.new.date") %></label>
<%= f.select :date,
shift_dates_select_options(@polls),
prompt: t("admin.poll_shifts.new.select_date"),
label: false %>
</div>
<%= f.hidden_field :booth_id, value: @booth.id %>
<div class="small-12 medium-4 column">
<%= f.submit t("admin.poll_shifts.new.add_shift"),
class: "button expanded margin-top" %>
</div>
</fieldset>
<% end %>

View File

@@ -0,0 +1,19 @@
<div class="row">
<div class="small-12 medium-6 column">
<%= form_tag search_officers_admin_booth_shifts_path,
method: :get, remote: true do |f| %>
<div class="input-group">
<%= text_field_tag :search,
@search,
placeholder: t("admin.poll_shifts.new.search_officer_placeholder"),
id: "search-officers" %>
<div class="input-group-button">
<%= submit_tag t("admin.poll_shifts.new.search_officer_button"),
class: "button" %>
</div>
</div>
<% end %>
</div>
</div>
<div id="search-officers-results"></div>

View File

@@ -0,0 +1,36 @@
<% if @officers.blank? %>
<div class="callout alert margin-bottom">
<%= t('admin.shared.no_search_results') %>
</div>
<% else %>
<h3><%= t('admin.shared.search_results') %></h3>
<table>
<thead>
<tr>
<th><%= t("admin.poll_shifts.new.table_name") %></th>
<th><%= t("admin.poll_shifts.new.table_email") %></th>
<th class="text-right">
<%= t("admin.poll_shifts.new.table_shift") %>
</th>
</tr>
</thead>
<tbody>
<% @officers.each do |user| %>
<tr>
<td>
<%= user.name %>
</td>
<td>
<%= user.email %>
</td>
<td class="text-right">
<%= link_to t("admin.poll_shifts.new.edit_shifts"),
new_admin_booth_shift_path(officer_id: user.poll_officer.id),
class: "button hollow" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>

View File

@@ -1,19 +1,19 @@
<h3><%= t("admin.poll_shifts.new.assignments") %></h3>
<h3><%= t("admin.poll_shifts.new.shifts") %></h3>
<table class="fixed">
<thead>
<tr>
<th><%= t("admin.poll_shifts.new.date") %></th>
<th><%= t("admin.poll_shifts.new.officer") %></th>
<th class="text-right"><%= t("admin.poll_shifts.new.assignment") %></th>
<th class="text-right"><%= t("admin.poll_shifts.new.shift") %></th>
</tr>
</thead>
<tbody>
<% @shifts.each do |shift| %>
<tr id="shift_<%= shift.id %>" class="shift">
<td><%= l(shift.date.to_date, format: :long) %></td>
<td><%= shift.officer.name %></td>
<td><%= shift.officer_name %></td>
<td class="text-right">
<%= link_to t("admin.poll_shifts.new.remove_assignment"),
<%= link_to t("admin.poll_shifts.new.remove_shift"),
admin_booth_shift_path(@booth, shift),
method: :delete,
class: "button hollow alert" %>

View File

@@ -2,45 +2,21 @@
<h2><%= @booth.name %></h2>
<%= form_for @shift, as: :shift, url: admin_booth_shifts_path do |f| %>
<%= render "shared/errors", resource: @shift %>
<fieldset class="fieldset">
<legend>
<%= t("admin.poll_shifts.new.new_assignment") %>
</legend>
<div class="small-12 medium-4 column">
<label><%= t("admin.poll_shifts.new.date") %></label>
<%= f.select :date,
shift_dates_select_options(@polls),
prompt: t("admin.poll_shifts.new.select_date"),
label: false %>
</div>
<div class="small-12 medium-4 column">
<label><%= t("admin.poll_shifts.new.officer") %></label>
<%= f.select :officer_id,
officer_select_options(@officers),
prompt: t("admin.poll_shifts.new.select_officer"),
label: false %>
</div>
<%= f.hidden_field :booth_id, value: @booth.id %>
<div class="small-12 medium-4 column">
<%= f.submit t("admin.poll_shifts.new.add_assignment"),
class: "button expanded hollow margin-top" %>
</div>
</fieldset>
<% if @officer.blank? %>
<p>
<%= t("admin.poll_shifts.new.search_officer_text") %>
</p>
<%= render "search_officers" %>
<% else %>
<%= render "form" %>
<% end %>
<div id="shifts">
<% if @shifts.empty? %>
<div class="callout primary margin-top">
<%= t("admin.poll_shifts.new.no_assignments") %>
<div class="callout primary">
<%= t("admin.poll_shifts.new.no_shifts") %>
</div>
<% else %>
<%= render "shifts" %>
<% end %>
</div>
</div>

View File

@@ -0,0 +1 @@
$("#search-officers-results").html("<%= j render 'search_officers_results' %>");

View File

@@ -34,7 +34,7 @@
<% if page.status == "published" %>
<%= link_to t("admin.site_customization.pages.index.see_page"), page.url, target: "_blank" %>
<% else %>
<%= t("admin.site_customization.pages.index.see_page") %>
<%= t("admin.site_customization.pages.index.see_page") %>
<% end %>
</td>
<td class="small delete">

View File

@@ -19,7 +19,7 @@
<table>
<% @tags.each do |tag| %>
<tr>
<td>
<td class="with-button">
<%= form_for(tag,
url: admin_tag_path(tag),
as: :tag,

View File

@@ -32,6 +32,7 @@
<p class="lead">
<strong><%= t("budgets.index.section_footer.title") %></strong>
</p>
<p><%= t("budgets.index.section_footer.description") %></p>
<p><%= t("budgets.index.section_footer.help_text_1") %></p>
<p><%= t("budgets.index.section_footer.help_text_2") %></p>
<p><%= t("budgets.index.section_footer.help_text_3",

View File

@@ -93,6 +93,7 @@
</div>
<% end %>
</li>
<% unless child_comments_of(comment).empty? %>
<li>
<ul id="<%= dom_id(comment) %>_children" class="no-bullet comment-children">
<% child_comments_of(comment).each do |child| %>
@@ -102,5 +103,6 @@
<% end %>
</ul>
</li>
<% end %>
</ul>
<% end %>

View File

@@ -0,0 +1,22 @@
<div class="comment-body">
<div class="comment-info">
<%= avatar_image( participant, seed: participant.id, size: 32, class: 'author-photo') %>
<div class="comment-info">
<span class="user-name">
<%= link_to participant.name, user_path(participant)%>
</span>
<% if is_author?(@community, participant) %>
&nbsp;&bull;&nbsp;
<span class="label round is-author">
<%= t("comments.comment.author") %>
</span>
<% end %>
</div>
</div>
</div>

View File

@@ -14,28 +14,7 @@
</ul>
<% @participants.each do |participant| %>
<div class="comment-body">
<div class="comment-info">
<%= avatar_image( participant, seed: participant.id, size: 32, class: 'author-photo') %>
<div class="comment-info">
<span class="user-name">
<%= link_to participant.name, user_path(participant)%>
</span>
<% if is_author?(@community, participant) %>
&nbsp;&bull;&nbsp;
<span class="label round is-author">
<%= t("comments.comment.author") %>
</span>
<% end %>
</div>
</div>
</div>
<%= render 'participant', participant: participant %>
<% end %>
</div>

View File

@@ -66,6 +66,7 @@
<p class="lead">
<strong><%= t("debates.index.section_footer.title") %></strong>
</p>
<p><%= t("debates.index.section_footer.description") %></p>
<p><%= t("debates.index.section_footer.help_text_1") %></p>
<p><%= t("debates.index.section_footer.help_text_2",
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>

View File

@@ -23,6 +23,7 @@
<p class="lead">
<strong><%= t("legislation.processes.index.section_footer.title") %></strong>
</p>
<p><%= t("legislation.processes.index.section_footer.description") %></p>
<p><%= t("legislation.processes.index.section_footer.help_text_1") %></p>
<p><%= t("legislation.processes.index.section_footer.help_text_2",
org: setting['org_name']) %></p>

View File

@@ -1,80 +0,0 @@
<% if @officer_assignments.any? %>
<h2><%= t("officing.final_recounts.new.title", poll: @poll.name) %></h2>
<%= form_tag(officing_poll_final_recounts_path(@poll), {id: "officer_assignment_form"}) do %>
<div class="row">
<div class="small-12 medium-6 column">
<label><%= t("officing.final_recounts.new.booth") %></label>
<%= select_tag :officer_assignment_id,
booths_for_officer_select_options(@officer_assignments),
{ prompt: t("officing.final_recounts.new.select_booth"),
label: false } %>
</div>
</div>
<div class="row">
<div class="small-12 medium-6 column">
<label><%= t("officing.final_recounts.new.date") %></label>
<%= select_tag :date,
poll_dates_select_options(@poll),
{ prompt: t("officing.final_recounts.new.select_date"),
label: false } %>
</div>
</div>
<div class="row">
<div class="small-12 medium-6 large-4 column">
<label><%= t("officing.final_recounts.new.count") %></label>
<%= text_field_tag :count, nil, placeholder: t("officing.final_recounts.new.count_placeholder") %>
</div>
</div>
<div class="row">
<div class="small-12 medium-6 large-4 column">
<%= submit_tag t("officing.final_recounts.new.submit"), class: "button expanded" %>
</div>
</div>
<% end %>
<% else %>
<h2><%= @poll.name %></h2>
<div class="callout alert">
<%= t("officing.final_recounts.new.not_allowed") %>
</div>
<% end %>
<% if @final_recounts.any? %>
<hr>
<h3><%= t("officing.final_recounts.new.final_recount_list") %></h3>
<table>
<thead>
<th><%= t("officing.final_recounts.new.date") %></th>
<th><%= t("officing.final_recounts.new.booth") %></th>
<th><%= t("officing.final_recounts.new.count") %></th>
<th><%= t("officing.final_recounts.new.system_count") %></th>
<th>&nbsp;</th>
</thead>
<tbody>
<% @final_recounts.each do |final_recount| %>
<tr id="<%= dom_id(final_recount) %>">
<td>
<%= l(final_recount.date.to_date, format: :long) %>
</td>
<td>
<%= final_recount.booth_assignment.booth.name %>
</td>
<td>
<strong><%= final_recount.count %></strong>
</td>
<td>
<strong><%= system_recount_to_compare_with_final_recount final_recount %></strong>
</td>
<td>
<%= link_to t("officing.final_recounts.new.add_results"), new_officing_poll_result_path(@poll, oa: final_recount.officer_assignment.id, d: l(final_recount.date.to_date) )%>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>

View File

@@ -14,9 +14,6 @@
</strong>
</td>
<td class="text-right">
<%= link_to t("officing.polls.final.add_recount"),
new_officing_poll_final_recount_path(poll),
class: "button hollow" %>
<%= link_to t("officing.polls.final.add_results"),
new_officing_poll_result_path(poll),
class: "button hollow" %>
@@ -29,4 +26,4 @@
<div class="callout primary">
<%= t("officing.polls.final.no_polls") %>
</div>
<% end %>
<% end %>

View File

@@ -16,12 +16,14 @@
<tr>
<th><%= t("officing.results.index.table_whites") %></th>
<th><%= t("officing.results.index.table_nulls") %></th>
<th><%= t("officing.results.index.table_total") %></th>
</tr>
</thead>
<tbody>
<tr>
<td id="white_results"><%= @whites %></td>
<td id="null_results"><%= @nulls %></td>
<td id="total_results"><%= @total %></td>
</tr>
</tbody>
</table>
@@ -54,4 +56,4 @@
<div class="callout primary">
<%= t("officing.results.index.no_results") %>
</div>
<% end %>
<% end %>

View File

@@ -47,6 +47,11 @@
<h3><%= t("officing.results.new.ballots_null") %></h3>
<%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %>
</div>
<div class="small-12 medium-6 large-3 column end">
<h3><%= t("officing.results.new.ballots_total") %></h3>
<%= text_field_tag :total, params[:total].presence, placeholder: "0" %>
</div>
</div>
<hr>

View File

@@ -64,7 +64,7 @@
<% if poll.expired? %>
<%= t("polls.index.participate_button_expired") %>
<% elsif poll.incoming? %>
<%= t("polls.index.participate_button_incoming") %>
<%= t("polls.index.participate_button_incoming") %>
<% else %>
<%= t("polls.index.participate_button") %>
<% end %>

View File

@@ -27,10 +27,10 @@
<p class="lead">
<strong><%= t("polls.index.section_footer.title") %></strong>
</p>
<p><%= t("polls.index.section_footer.description") %></p>
<p><%= t("polls.index.section_footer.help_text_1") %></p>
<p><%= t("polls.index.section_footer.help_text_2",
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
</p>
</div>
</div>
</div>

View File

@@ -0,0 +1,22 @@
<div class="row">
<div class="small-12 column">
<ul class="tabs" data-tabs id="questions-tabs">
<li class="tabs-title is-active">
<%= link_to "#tab-comments" do %>
<h3>
<%= t("proposals.show.comments_tab") %>
<span class="js-comments-count">(<%= @question.comments_count %>)</span>
</h3>
<% end %>
</li>
<li class="tabs-title">
<%= link_to "#tab-documents" do %>
<h3>
<%= t("documents.tab") %>
(<%= @question.documents.count %>)
</h3>
<% end %>
</li>
</ul>
</div>
</div>

View File

@@ -55,6 +55,21 @@
</div>
</div>
<% if @question.video_url.present? %>
<div class="row margin-top poll-question-show">
<div class="small-12 medium-9 column">
<div class="video-link">
<p>
<span class="icon-video"></span>&nbsp;
<strong><%= t('proposals.show.title_video_url') %></strong>
</p>
<%= text_with_links @question.video_url %>
</div>
</div>
</div>
<% end %>
<div class="row margin-top">
<div class="small-12 medium-9 column">
<h3><%= t('poll_questions.show.more_info') %></h3>
@@ -62,4 +77,16 @@
</div>
</div>
<%= render "comments" %>
<div class="tabs-content" data-tabs-content="questions-tabs" role="tablist">
<%= render "polls/questions/filter_subnav" %>
<div class="tabs-panel is-active" id="tab-comments">
<%= render "polls/questions/comments" %>
</div>
<div class="tabs-panel" id="tab-documents">
<%= render 'documents/documents',
documents: @question.documents,
max_documents_allowed: Poll::Question.max_documents_allowed %>
</div>
</div>

View File

@@ -80,6 +80,7 @@
<p class="lead">
<strong><%= t("proposals.index.section_footer.title") %></strong>
</p>
<p><%= t("proposals.index.section_footer.description") %></p>
<p><%= t("proposals.index.section_footer.help_text_1") %></p>
<p><%= t("proposals.index.section_footer.help_text_2",
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>

View File

@@ -23,7 +23,8 @@
<% end %>
<% if author_of?(@proposal, current_user) %>
<%= link_to t("proposals.show.send_notification"), new_proposal_notification_path(proposal_id: @proposal.id),
<%= link_to t("proposals.show.send_notification"),
new_proposal_notification_path(proposal_id: @proposal.id),
class: 'button hollow float-right' %>
<% end %>

View File

@@ -1,37 +1,37 @@
<% if show_admin_menu? %>
<li>
<%= link_to t("layouts.header.administration_menu"), "#", rel: "nofollow" %>
<ul class="menu">
<% if current_user.administrator? %>
<li>
<%= link_to t("layouts.header.administration"), admin_root_path %>
</li>
<% end %>
<li>
<%= link_to t("layouts.header.administration_menu"), "#", rel: "nofollow" %>
<ul class="menu">
<% if current_user.administrator? %>
<li>
<%= link_to t("layouts.header.administration"), admin_root_path %>
</li>
<% end %>
<% if current_user.administrator? || current_user.moderator? %>
<li>
<%= link_to t("layouts.header.moderation"), moderation_root_path %>
</li>
<% end %>
<% if current_user.administrator? || current_user.moderator? %>
<li>
<%= link_to t("layouts.header.moderation"), moderation_root_path %>
</li>
<% end %>
<% if (feature?(:spending_proposals) || feature?(:budgets)) &&
(current_user.administrator? || current_user.valuator?) %>
<li>
<%= link_to t("layouts.header.valuation"), valuation_root_path %>
</li>
<% end %>
<% if (feature?(:spending_proposals) || feature?(:budgets)) &&
(current_user.administrator? || current_user.valuator?) %>
<li>
<%= link_to t("layouts.header.valuation"), valuation_root_path %>
</li>
<% end %>
<% if current_user.administrator? || current_user.manager? %>
<li>
<%= link_to t("layouts.header.management"), management_sign_in_path %>
</li>
<% end %>
<% if current_user.administrator? || current_user.manager? %>
<li>
<%= link_to t("layouts.header.management"), management_sign_in_path %>
</li>
<% end %>
<% if current_user.administrator? || current_user.poll_officer? %>
<li>
<%= link_to t("layouts.header.officing"), officing_root_path %>
</li>
<% end %>
</ul>
</li>
<% if current_user.administrator? || current_user.poll_officer? %>
<li>
<%= link_to t("layouts.header.officing"), officing_root_path %>
</li>
<% end %>
</ul>
</li>
<% end %>

View File

@@ -1,12 +1,9 @@
<div class="highlight jumbo help-header">
<div class="help-header no-margin-top margin-bottom">
<div class="row">
<div class="small-12 medium-9 column" data-magellan>
<div class="small-12 column" data-magellan>
<%= image_tag "help/help_icon_#{image}.png", alt: t("#{i18n_namespace}.icon_alt"), class: "align-top" %>
<h1 class="inline-block"><%= t("#{i18n_namespace}.title") %></h1>
<p>
<%= t("#{i18n_namespace}.description") %><br>
<%= link_to t("#{i18n_namespace}.help"), "#section_help" %>
</p>
<%= link_to t("#{i18n_namespace}.help"), "#section_help", class: "float-right" %>
</div>
</div>
</div>

View File

@@ -20,7 +20,7 @@
<li>
<%= layout_menu_link_to t("layouts.header.poll_questions"),
polls_path,
controller_name == "polls",
controller_name == "polls" || controller_name == "questions",
accesskey: "3",
title: t("shared.go_to_page") + t("layouts.header.poll_questions") %>
</li>

View File

@@ -0,0 +1,11 @@
<h3><%= t("community.show.create_first_community_topic.first_theme") %></h3>
<% if user_signed_in? %>
<%= t("community.show.create_first_community_topic.first_theme_not_logged_in") %>
<% else %>
<div class="callout primary">
<%= t("community.show.create_first_community_topic.sub_first_theme",
link: link_to(t("community.show.create_first_community_topic.sign_link",
org_name: setting['org_name']), new_user_session_path)).html_safe %>
</div>
<% end %>

View File

@@ -0,0 +1,25 @@
<div id="<%= dom_id(topic) %>" class="panel column">
<div class="small-8 column">
<h3><%= link_to topic.title, community_topic_path(@community, topic) %></h3>
<p class="topic-info">
<span class="icon-comments"></span>&nbsp;
<%= link_to t("community.show.topic.comments", count: topic.comments_count), community_topic_path(@community, topic, anchor: "comments") %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= I18n.l topic.created_at.to_date %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= topic.author.name %>
</p>
</div>
<div class="small-4 column text-right">
<% if topic.author == current_user %>
<%= link_to t("community.show.topic.edit_button"), edit_community_topic_path(@community.id, topic), class: 'button small hollow' %>
<%= link_to t("community.show.topic.destroy_button"), community_topic_path(@community.id, topic), method: :delete, class: 'button hollow alert small' %>
<% end %>
</div>
</div>

View File

@@ -1,48 +1,13 @@
<% if topics.any? %>
<div class="row column">
<div class="order">
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
</div>
</div>
<% topics.each do |topic| %>
<div id="<%= dom_id(topic) %>" class="panel column">
<div class="small-10 column">
<h3><%= link_to topic.title, community_topic_path(@community, topic) %></h3>
<p class="topic-info">
<span class="icon-comments"></span>&nbsp;
<%= link_to t("community.show.topic.comments", count: topic.comments_count), community_topic_path(@community, topic, anchor: "comments") %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= I18n.l topic.created_at.to_date %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= topic.author.name %>
</p>
</div>
<div class="small-2 column text-right">
<% if topic.author == current_user %>
<%= link_to t("community.show.topic.edit_button"), edit_community_topic_path(@community.id, topic), class: 'button small hollow' %>
<% end %>
</div>
</div>
<% end %>
<% else %>
<h3><%= t("community.show.create_first_community_topic.first_theme") %></h3>
<% if user_signed_in? %>
<%= t("community.show.create_first_community_topic.first_theme_not_logged_in") %>
<% else %>
<div class="callout primary">
<%= t("community.show.create_first_community_topic.sub_first_theme",
link: link_to(t("community.show.create_first_community_topic.sign_link",
org_name: setting['org_name']), new_user_session_path)).html_safe %>
</div>
<% end %>
<%= render 'topics/informative_text', topics: topics %>
<% end %>
<% topics.each do |topic| %>
<%= render 'topics/topic', topic: topic %>
<% end %>

View File

@@ -21,6 +21,7 @@ data:
# - config/locales/**/*.%{locale}.yml
## Another gem (replace %#= with %=):
# - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
- config/locales/custom/%{locale}/custom.yml
- config/locales/%{locale}/general.yml
- config/locales/%{locale}/activerecord.yml
- config/locales/%{locale}/activemodel.yml

View File

@@ -498,16 +498,22 @@ en:
final_recount: "Final recount (by officer)"
poll_shifts:
new:
new_assignment: "New shift"
add_shift: "Add shift"
shift: "Assignment"
shifts: "Shifts in this booth"
date: "Date"
edit_shifts: Edit shifts
new_shift: "New shift"
no_shifts: "This booth has no shifts"
officer: "Officer"
assignment: "Assignment"
remove_shift: "Remove"
search_officer_button: Search
search_officer_placeholder: Search officer
search_officer_text: Search for an officer to assign a new shift
select_date: "Select day"
select_officer: "Select officer"
add_assignment: "Add shift"
remove_assignment: "Remove"
assignments: "Shifts in this booth"
no_assignments: "This booth has no shifts"
table_shift: "Shift"
table_email: "Email"
table_name: "Name"
flash:
create: "Shift added"
destroy: "Shift removed"
@@ -590,6 +596,8 @@ en:
title: Title
valid_answers: Valid answers
description: Description
video_url: External video
documents: Documents
preview: View on website
recounts:
index:
@@ -604,6 +612,7 @@ en:
no_results: "There are no results"
table_whites: "Blank ballots"
table_nulls: "Invalid ballots"
table_total: "Total ballots"
table_answer: Answer
table_votes: Votes
booths:

View File

@@ -41,10 +41,10 @@ en:
section_header:
icon_alt: Participatory budgets icon
title: Participatory budgets
description: With the participatory budgets the citizens decide to which projects presented by the neighbors is destined a part of the municipal budget.
help: Help about participatory budgets
section_footer:
title: Help about participatory budgets
description: With the participatory budgets the citizens decide to which projects presented by the neighbors is destined a part of the municipal budget.
help_text_1: "Participatory budgets are processes in which citizens decide directly on what is spent part of the municipal budget. Any registered person over 16 years old can propose an investment project that is preselected in a phase of citizen supports."
help_text_2: "The most voted projects are evaluated and passed to a final vote in which they decide the actions to be carried out by the City Council once the municipal budgets of the next year are approved."
help_text_3: "The presentation of participatory budgeting projects takes place from January and over a period of one and a half months. To participate and propose proposals for the entire city and / or districts, you must sign up on %{org} and verify your account."

View File

@@ -26,6 +26,7 @@ en:
disabled_info_title: You need to be logged to create a new topic
topic:
edit_button: Edit
destroy_button: Destroy
comments:
one: 1 comment
other: "%{count} comments"

View File

@@ -126,10 +126,10 @@ en:
section_header:
icon_alt: Debates icon
title: Debates
description: Start a debate to share opinions with others about the topics you are concerned about.
help: Help about debates
section_footer:
title: Help about debates
description: Start a debate to share opinions with others about the topics you are concerned about.
help_text_1: "The space for citizen debates is aimed at anyone who can expose issues of their concern and those who want to share opinions with other people."
help_text_2: 'To open a debate you need to sign up on %{org}. Users can also comment on open debates and rate them with the "I agree" or "I disagree" buttons found in each of them.'
help_text_3: "Keep in mind that a debate does not start any specific action. If you want to make a %{proposal} for the city or raise a investment project of %{budget} when the phase is open, go to the corresponding section."
@@ -179,6 +179,7 @@ en:
proposal_notification: "Notification"
spending_proposal: Spending proposal
budget/investment: Investment
poll/shift: Shift
user: Account
verification/sms: phone
signature_sheet: Signature sheet
@@ -376,10 +377,10 @@ en:
section_header:
icon_alt: Proposals icon
title: Proposals
description: Make a citizen proposal. If it gets enough supports it will go to voting phase, so you can get all the citizens to decide how they want their city to be.
help: Help about proposals
section_footer:
title: Help about proposals
description: Make a citizen proposal. If it gets enough supports it will go to voting phase, so you can get all the citizens to decide how they want their city to be.
help_text_1: "The citizen proposals are an opportunity for neighbours and collectives to decide directly how they want to shape their city. Any person can make a proposal about a topic or concern of their interest, for the City Council to make it, after it gets enough supports to be put to a citizens vote."
help_text_2: "To create a proposal, you must sign up on %{org}. The proposals that get the support of 1% of the users in the web, goes to voting phase. To support proposals it is necessary to have a verified account."
help_text_3: "A citizen vote is celebrated when the proposals get the necessary supports. Once celebrated, if there are more people in favor than against, the City Council assumes the proposal and carries it out."
@@ -468,10 +469,10 @@ en:
section_header:
icon_alt: Voting icon
title: Voting
description: Sign up to vote on citizen proposals and questions the City Council ask to the neighbors. Make municipal decisions directly.
help: Help about voting
section_footer:
title: Help about voting
description: Sign up to vote on citizen proposals and questions the City Council ask to the neighbors. Make municipal decisions directly.
help_text_1: "Voting takes place when a citizen proposal supports reaches 1% of the census with voting rights. Voting can also include questions that the City Council ask to the citizens decision."
help_text_2: "To participate in the next vote you have to sign up on %{org} and verify your account. All registered voters in the city over 16 years old can vote. The results of all votes are binding on the government."
show:

View File

@@ -66,10 +66,10 @@ en:
section_header:
icon_alt: Legislation processes icon
title: Legislation processes
description: Participate in the debates and processes prior to the approval of a ordinance or a municipal action. Your opinion will be consider by the City Council.
help: Help about legislation processes
section_footer:
title: Help about legislation processes
description: Participate in the debates and processes prior to the approval of a ordinance or a municipal action. Your opinion will be consider by the City Council.
help_text_1: "In participatory processes, the City Council offers to its citizens the opportunity to participate in the drafting and modification of regulations, affecting the city and to be able to give their opinion on certain actions that it plans to carry out."
help_text_2: "People registered in %{org} can participate with contributions in the public consultation of new ordinances, regulations and guidelines, among others. Your comments are analyzed by the corresponding area and considered for the final drafting of the ordinances."
help_text_3: "The City Council also opens processes to receive contributions and opinions on municipal actions."

View File

@@ -15,25 +15,7 @@ en:
title: Polls ready for final recounting
no_polls: You are not officing final recounts in any active poll
select_poll: Select poll
add_recount: Add final recount
add_results: Add results
final_recounts:
flash:
create: "Data added"
error_create: "Final counts NOT added. Error in data."
new:
title: "%{poll} - Add final recount"
not_allowed: "You are allowed to add final recounts for this poll"
booth: "Booth"
date: "Date"
select_booth: "Select booth"
select_date: "Select date"
count: "Final vote count"
count_placeholder: "Final vote count"
submit: Save
final_recount_list: "Your final recounts"
system_count: "System recount"
add_results: "Add results"
results:
flash:
create: "Results saved"
@@ -49,6 +31,7 @@ en:
select_date: "Select date"
ballots_white: "Blank ballots"
ballots_null: "Invalid ballots"
ballots_total: "Total ballots"
submit: "Save"
results_list: "Your results"
see_results: "See results"
@@ -59,6 +42,7 @@ en:
table_votes: Votes
table_whites: "Blank ballots"
table_nulls: "Invalid ballots"
table_total: "Total ballots"
residence:
flash:
create: "Document verified with Census"

View File

@@ -63,9 +63,9 @@ en:
text: |-
Use it in your local government or help us to improve it, it is free software.
This Open Government Portal use the [CONSUL app](https://github.com/ayuntamientomadrid 'consul github') that is free software, with [licence AGPLv3](http://www.gnu.org/licenses/agpl-3.0.html 'AGPLv3 gnu' ), that means in simple words that anyone can use the code freely, copy it, see it in detail, modify it and redistribute it to the word with the modifications he wants (allowing others to do the same). Because we think culture is better and richer when it is released.
This Open Government Portal use the [CONSUL app](https://github.com/consul/consul 'consul github') that is free software, with [licence AGPLv3](http://www.gnu.org/licenses/agpl-3.0.html 'AGPLv3 gnu' ), that means in simple words that anyone can use the code freely, copy it, see it in detail, modify it and redistribute it to the word with the modifications he wants (allowing others to do the same). Because we think culture is better and richer when it is released.
If you are a programmer, you can see the code and help us to improve it at [CONSUL app](https://github.com/ayuntamientomadrid 'consul github').
If you are a programmer, you can see the code and help us to improve it at [CONSUL app](https://github.com/consul/consul 'consul github').
titles:
how_to_use: Use it in your local government
privacy: Privacy Policy

View File

@@ -29,3 +29,4 @@ en:
spending_proposal: "Spending proposal deleted succesfully."
budget_investment: "Investment project deleted succesfully."
error: "Could not delete"
topic: "Topic deleted successfully."

View File

@@ -498,18 +498,24 @@ es:
final_recount: "Recuento final (presidente de mesa)"
poll_shifts:
new:
new_assignment: "Nuevo turno"
add_shift: "Añadir turno"
shift: "Asignación"
shifts: "Turnos en esta urna"
date: "Fecha"
edit_shifts: Asignar turno
new_shift: "Nuevo turno"
no_shifts: "Esta urna no tiene turnos asignados"
officer: "Presidente de mesa"
assignment: "Asignación"
remove_shift: "Eliminar turno"
search_officer_button: Buscar
search_officer_placeholder: Buscar presidentes de mesa
search_officer_text: Busca al presidente de mesa para asignar un turno
select_date: "Seleccionar día"
select_officer: "Seleccionar presidente de mesa"
add_assignment: "Añadir turno"
remove_assignment: "Eliminar turno"
assignments: "Turnos en esta urna"
no_assignments: "Esta urna no tiene turnos asignados"
table_shift: "Turno"
table_email: "Email"
table_name: "Nombre"
flash:
create: "Añadido turno de presidente de mesa"
create: "Añadido turno de presidente de mesa"
destroy: "Eliminado turno de presidente de mesa"
poll_booth_assignments:
flash:
@@ -590,6 +596,8 @@ es:
title: Título
valid_answers: Respuestas válidas
description: Descripción
video_url: Video externo
documents: Documentos
preview: Ver en la web
recounts:
index:
@@ -604,6 +612,7 @@ es:
no_results: "No hay resultados"
table_whites: Papeletas en blanco
table_nulls: Papeletas nulas
table_total: Papeletas totales
table_answer: Respuesta
table_votes: Votos
booths:

View File

@@ -41,10 +41,10 @@ es:
section_header:
icon_alt: Icono de Presupuestos participativos
title: Presupuestos participativos
description: Con los presupuestos participativos la ciudadanía decide a qué proyectos presentados por los vecinos y vecinas va destinada una parte del presupuesto municipal.
help: Ayuda sobre presupuestos participativos
section_footer:
title: Ayuda sobre presupuestos participativos
description: Con los presupuestos participativos la ciudadanía decide a qué proyectos presentados por los vecinos y vecinas va destinada una parte del presupuesto municipal.
help_text_1: "Los presupuestos participativos son unos procesos en los que la ciudadanía decide de forma directa en qué se gasta una parte del presupuesto municipal. Cualquier persona empadronada mayor de 16 años puede proponer un proyecto de gasto que se preselecciona en una fase de apoyos ciudadanos."
help_text_2: "Los proyectos más votados se evalúan y pasan a una votación final en la que se deciden las actuaciones que llevará a cabo el Ayuntamiento una vez se aprueben los presupuestos municipales del año próximo."
help_text_3: "La presentación de proyectos de presupuestos participativos se lleva a cabo desde enero y a lo largo de un periodo de mes y medio, aproximadamente. Para participar y plantear propuestas para toda la ciudad y/ los distritos hay que registrarse en %{org} y verificar la cuenta."

View File

@@ -26,6 +26,7 @@ es:
disabled_info_title: Necesitas estar logueado para crear un nuevo tema
topic:
edit_button: Editar
destroy_button: Eliminar
comments:
one: 1 Comentario
other: "%{count} Comentarios"

View File

@@ -126,10 +126,10 @@ es:
section_header:
icon_alt: Icono de Debates
title: Debates
description: Inicia un debate para compartir puntos de vista con otras personas sobre los temas que te preocupan.
help: Ayuda sobre los debates
section_footer:
title: Ayuda sobre los debates
description: Inicia un debate para compartir puntos de vista con otras personas sobre los temas que te preocupan.
help_text_1: "El espacio de debates ciudadanos está dirigido a que cualquier persona pueda exponer temas que le preocupan y sobre los que quiera compartir puntos de vista con otras personas."
help_text_2: 'Para abrir un debate es necesario registrarse en %{org}. Los usuarios ya registrados también pueden comentar los debates abiertos y valorarlos con los botones de "Estoy de acuerdo" o "No estoy de acuerdo" que se encuentran en cada uno de ellos.'
help_text_3: "Ten en cuenta que un debate no activa ningún mecanismo de actuación concreto. Si quieres hacer una %{proposal} para la ciudad o plantear un proyecto de %{budget} cuando se abra la convocatoria, ve a la sección correspondiente."
@@ -179,6 +179,7 @@ es:
proposal_notification: "la notificación"
spending_proposal: la propuesta de gasto
budget/investment: la propuesta de inversión
poll/shift: el turno
user: la cuenta
verification/sms: el teléfono
signature_sheet: la hoja de firmas
@@ -376,10 +377,10 @@ es:
section_header:
icon_alt: Icono de Propuestas
title: Propuestas
description: Haz una propuesta ciudadana. Si obtiene los apoyos suficientes y pasa a votación, puedes conseguir que todos los habitantes decidan cómo quieren que sea nuestra ciudad.
help: Ayuda sobre las propuestas
section_footer:
title: Ayuda sobre las propuestas
description: Haz una propuesta ciudadana. Si obtiene los apoyos suficientes y pasa a votación, puedes conseguir que todos los habitantes decidan cómo quieren que sea nuestra ciudad.
help_text_1: "Las propuestas ciudadanas son una oportunidad para que los vecinos y colectivos decidan directamente cómo quieren que sea su ciudad. Cualquier persona puede hacer una propuesta sobre un tema que le interese o preocupe para que el ayuntamiento la lleve a cabo, después de conseguir los apoyos suficientes y de someterse a votación ciudadana."
help_text_2: "Para crear una propuesta hay que registrarse en %{org}. Las propuestas que consigan el apoyo del 1% de la gente en la web, pasan a votación. Para apoyar propuestas es necesario tener una cuenta verificada."
help_text_3: "Se convoca una votación ciudadana cuando las propuestas consiguen los apoyos necesarios. Una vez celebrada, si hay más gente a favor que en contra, el Consistorio asume la propuesta y la lleva a cabo."
@@ -468,10 +469,10 @@ es:
section_header:
icon_alt: Icono de Votaciones
title: Votaciones
description: Regístrate para poder votar propuestas ciudadanas y las cuestiones que pregunta a sus vecinos el Ayuntamiento. Toma decisiones municipales de forma directa.
help: Ayuda sobre las votaciones
section_footer:
title: Ayuda sobre las votaciones
description: Regístrate para poder votar propuestas ciudadanas y las cuestiones que pregunta a sus vecinos el Ayuntamiento. Toma decisiones municipales de forma directa.
help_text_1: "Las votaciones se convocan cuando una propuesta ciudadana alcanza el 1% de apoyos del censo con derecho a voto. En las votaciones también se pueden incluir cuestiones que el Ayuntamiento somete a decisión directa de la ciudadanía."
help_text_2: "Para participar en la próxima votación tienes que registrarte en %{org} y verificar tu cuenta. Pueden votar todas las personas empadronadas en la ciudad mayores de 16 años. Los resultados de todas las votaciones serán vinculantes para el gobierno."
show:

View File

@@ -66,10 +66,10 @@ es:
section_header:
icon_alt: Icono de Procesos legislativos
title: Procesos legislativos
description: Participa en los debates y procesos previos a la aprobación de una norma o de una actuación municipal. Tu opinión será tenida en cuenta por el Ayuntamiento.
help: Ayuda sobre procesos legislativos
section_footer:
title: Ayuda sobre procesos legislativos
description: Participa en los debates y procesos previos a la aprobación de una norma o de una actuación municipal. Tu opinión será tenida en cuenta por el Ayuntamiento.
help_text_1: "En los procesos participativos, el Ayuntamiento ofrece a la ciudadanía la oportunidad de participar en la elaboración y modificación de normativa que afecta a la ciudad y de dar su opinión sobre ciertas actuaciones que tiene previsto llevar a cabo."
help_text_2: "Las personas registradas en %{org} pueden participar con aportaciones en la consulta pública de nuevas ordenanzas, reglamentos y directrices, entre otros. Sus comentarios son analizados por el área correspondiente y tenidos en cuenta de cara a la redacción final de las normas."
help_text_3: "El Ayuntamiento también abre procesos para recibir aportaciones y opiniones sobre actuaciones municipales."

View File

@@ -15,24 +15,6 @@ es:
title: "Listado de votaciones finalizadas"
no_polls: "No tienes permiso para recuento final en ninguna votación reciente"
select_poll: "Selecciona votación"
add_recount: "Añadir recuentos finales"
add_results: "Añadir resultados"
final_recounts:
flash:
create: "Datos añadidos"
error_create: "Recuento final NO añadido. Error en los datos"
new:
title: "%{poll} - Añadir recuento final"
not_allowed: "No tienes permiso para introducir recountos finales"
booth: "Urna"
date: "Día"
select_booth: "Elige urna"
select_date: "Elige día"
count: "Recuento final"
count_placeholder: "Número final de votos"
submit: "Guardar"
final_recount_list: "Tus recuentos finales"
system_count: "Recuento del sistema"
add_results: "Añadir resultados"
results:
flash:
@@ -49,6 +31,7 @@ es:
select_date: "Elige día"
ballots_white: "Papeletas en blanco"
ballots_null: "Papeletas nulas"
ballots_total: "Papeletas totales"
submit: "Guardar"
results_list: "Tus resultados"
see_results: "Ver resultados"
@@ -59,6 +42,7 @@ es:
table_votes: Votos
table_whites: Papeletas en blanco
table_nulls: Papeletas nulas
table_total: Papeletas totales
residence:
flash:
create: "Documento verificado con el Padrón"

View File

@@ -63,9 +63,9 @@ es:
text: |-
Utilízalo en tu municipio libremente o ayúdanos a mejorarlo, es software libre.
Este Portal de Gobierno Abierto usa la [aplicación CONSUL](https://github.com/ayuntamientomadrid 'github consul') que es software libre, con [licencia AGPLv3](http://www.gnu.org/licenses/agpl-3.0.html 'AGPLv3 gnu' ), esto significa en palabras sencillas, que cualquiera puede libremente usar el código, copiarlo, verlo en detalle, modificarlo, y redistribuirlo al mundo con las modificaciones que quiera (manteniendo el que otros puedan a su vez hacer lo mismo). Porque creemos que la cultura es mejor y más rica cuando se libera.
Este Portal de Gobierno Abierto usa la [aplicación CONSUL](https://github.com/consul/consul 'github consul') que es software libre, con [licencia AGPLv3](http://www.gnu.org/licenses/agpl-3.0.html 'AGPLv3 gnu' ), esto significa en palabras sencillas, que cualquiera puede libremente usar el código, copiarlo, verlo en detalle, modificarlo, y redistribuirlo al mundo con las modificaciones que quiera (manteniendo el que otros puedan a su vez hacer lo mismo). Porque creemos que la cultura es mejor y más rica cuando se libera.
Si eres programador, puedes ver el código y ayudarnos a mejorarlo en [aplicación CONSUL](https://github.com/ayuntamientomadrid 'github consul').
Si eres programador, puedes ver el código y ayudarnos a mejorarlo en [aplicación CONSUL](https://github.com/consul/consul 'github consul').
titles:
how_to_use: Utilízalo en tu municipio
privacy: Política de Privacidad
@@ -81,4 +81,4 @@ es:
info_code: 'Ahora introduce el código que has recibido en tu carta:'
password: Contraseña
submit: Verificar mi cuenta
title: Verifica tu cuenta
title: Verifica tu cuenta

View File

@@ -29,3 +29,4 @@ es:
spending_proposal: "Propuesta de inversión eliminada."
budget_investment: "Propuesta de inversión eliminada."
error: "No se pudo borrar"
topic: "Tema eliminado."

View File

@@ -1196,7 +1196,7 @@ fr:
how_to_use:
text: "Utilisez cet outil dans votre collectivité ou aidez-nous àl'améliorer,
c'est un logiciel libre.\r\n\r\nCe portail de gouvernement ouvert utilise
cette [application Consul ](https://github.com/ayuntamientomadrid 'consul
cette [application Consul ](https://github.com/consul/consul 'consul
github') qui est un logiciel libre, avec une [license AGPLv3](http://www.gnu.org/licenses/agpl-3.0.html
'AGPLv3 gnu' ), ce qui signifie en fait que n'importe qui peut utiliser
le code librement, le copier, l'étudier en détail, le modifier et le redistribuer
@@ -1207,7 +1207,7 @@ fr:
la Mairie de Madrid autant que possible pour le faire. Si vous êtes intéressé,
n'hésitez pas à nous contacter : <a href='mailto:ag.gobiernoabierto@consul.dev'>ag.gobiernoabierto@consul.dev</a>\r\n\r\nSi
vous êtes développeur, vous pouvez voir le code et nous aider à l'améliorer
sur [Consul app](https://github.com/ayuntamientomadrid 'consul github '
sur [Consul app](https://github.com/consul/consul 'consul github '
)."
titles:
faq: Solution pour les problèmes techniques (FAQ)

View File

@@ -59,9 +59,9 @@ fr:
text: |-
Utilisez le librement pour votre gouvernement ou aider nous à l'améliorer, c'est un logiciel libre.
Ce portail de Gouvernement Ouvert utilise l'[application Consul](https://github.com/ayuntamientomadrid 'consul github') qui est un logiciel libre, sous [licence AGPLv3](http://www.gnu.org/licenses/agpl-3.0.html 'AGPLv3 gnu' ), ce qui, en quelques mots, signifie que tout le monde peut utiliser le code librement, le copier, le voir en détail, le modifier et le redistribuer avec ces modifications (permettant à d'autres d'en faire de même). Car nous pensons que la culture est meilleure et plus riche quand elle est libre.
Ce portail de Gouvernement Ouvert utilise l'[application Consul](https://github.com/consul/consul 'consul github') qui est un logiciel libre, sous [licence AGPLv3](http://www.gnu.org/licenses/agpl-3.0.html 'AGPLv3 gnu' ), ce qui, en quelques mots, signifie que tout le monde peut utiliser le code librement, le copier, le voir en détail, le modifier et le redistribuer avec ces modifications (permettant à d'autres d'en faire de même). Car nous pensons que la culture est meilleure et plus riche quand elle est libre.
Si vous êtes un développeur, vous pouvez voir le code et nous aider à l'améliorer en allant sur l'[applicationConsul](https://github.com/ayuntamientomadrid 'consul github').
Si vous êtes un développeur, vous pouvez voir le code et nous aider à l'améliorer en allant sur l'[applicationConsul](https://github.com/consul/consul 'consul github').
titles:
how_to_use: Utilisez-le pour votre gouvernement
privacy: Politique de confidentialité

View File

@@ -60,9 +60,9 @@ nl:
text: |-
Gebruik het in uw gemeente en help ons het te verbeteren, het is gratis software.
Deze Open Overheid site gebruikt de [Consul web-app](https://github.com/ayuntamientomadrid 'consul github'). Gratis software, onder de [AGPLv3 Licentie](http://www.gnu.org/licenses/agpl-3.0.html 'AGPLv3 gnu' ). Simpel gezegd betekend dit dat u de app kunt inspecteren, gebruiken, aanpassen en herdistribueren (onder voorwaarde dat anderen hetzelfde kunnen doen met uw versie).
Deze Open Overheid site gebruikt de [Consul web-app](https://github.com/consul/consul 'consul github'). Gratis software, onder de [AGPLv3 Licentie](http://www.gnu.org/licenses/agpl-3.0.html 'AGPLv3 gnu' ). Simpel gezegd betekend dit dat u de app kunt inspecteren, gebruiken, aanpassen en herdistribueren (onder voorwaarde dat anderen hetzelfde kunnen doen met uw versie).
Voor programmeurs: help ons het te verbeteren via [Consul app](https://github.com/ayuntamientomadrid 'consul github').
Voor programmeurs: help ons het te verbeteren via [Consul app](https://github.com/consul/consul 'consul github').
titles:
how_to_use: Gebruik het in uw gemeente
privacy: Privacy Verklaring
@@ -78,4 +78,4 @@ nl:
info_code: 'en de code die u heeft ontvangen:'
password: Wachtwoord
submit: Verifieer mijn account
title: Verifieer uw account
title: Verifieer uw account

View File

@@ -1212,7 +1212,7 @@ pt-BR:
how_to_use:
text: "Use este programa em seu governo local ou nos ajude a melhorá-lo, ele
é um software livre.\r\n\r\nEste Portal de Governo Aberto usa o [app Consul]
(https://github.com/ayuntamientomadrid 'cônsul github'), que é um software
(https://github.com/consul/consul 'cônsul github'), que é um software
livre, com [licença AGPLv3] (http://www.gnu.org/licenses/agpl- 3.0.html
'AGPLv3 gnu'), o que significa, em palavras simples que qualquer um pode
usar o código livremente, copiá-lo, vê-lo em detalhes, modificá-lo e redistribuí-lo
@@ -1223,7 +1223,7 @@ pt-BR:
Madrid, o tanto quanto possível para fazê-lo, por isso, se você estiver
interessado escreva-nos: <a href = \"mailto: ag.gobiernoabierto@consul.dev
'> ag.gobiernoabierto@consul.dev </a>\r\n\r\nSe você é um programador, você
pode ver o código e nos ajudar a melhorá-lo em [app Consul] (https://github.com/ayuntamientomadrid
pode ver o código e nos ajudar a melhorá-lo em [app Consul] (https://github.com/consul/consul
'cônsul github')."
titles:
faq: Solução para problemas técnicos (FAQ)

View File

@@ -287,7 +287,11 @@ Rails.application.routes.draw do
end
resources :booths do
resources :shifts
get :available, on: :collection
resources :shifts do
get :search_officers, on: :collection
end
end
resources :questions
@@ -416,7 +420,6 @@ Rails.application.routes.draw do
resources :polls, only: [:index] do
get :final, on: :collection
resources :final_recounts, only: [:new, :create]
resources :results, only: [:new, :create, :index]
end
resource :residence, controller: "residence", only: [:new, :create]

View File

@@ -90,6 +90,7 @@ valuator.update(residence_verified_at: Time.current, confirmed_phone: Faker::Pho
poll_officer = create_user('poll_officer@consul.dev', 'Paul O. Fisher')
poll_officer.create_poll_officer
poll_officer.update(residence_verified_at: Time.current, confirmed_phone: Faker::PhoneNumber.phone_number, document_type: "1", verified_at: Time.current, document_number: "2211111111")
level_2 = create_user('leveltwo@consul.dev', 'level 2')
level_2.update(residence_verified_at: Time.current, confirmed_phone: Faker::PhoneNumber.phone_number, document_number: "2222222222", document_type: "1")

Some files were not shown because too many files have changed in this diff Show More