diff --git a/.gitignore b/.gitignore index a6f2826c3..7bb7a3090 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ public/sitemap.xml public/system/ + +#Netbeans projects files +/nbproject diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bcadd2a25..4704696e5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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' diff --git a/CUSTOMIZE_EN.md b/CUSTOMIZE_EN.md deleted file mode 100644 index 3a97b96de..000000000 --- a/CUSTOMIZE_EN.md +++ /dev/null @@ -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 -``` diff --git a/CUSTOMIZE_ES.md b/CUSTOMIZE_ES.md deleted file mode 100644 index 26204c4e4..000000000 --- a/CUSTOMIZE_ES.md +++ /dev/null @@ -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 -``` diff --git a/Gemfile b/Gemfile index a1a0ecf7a..3f17d753b 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index c33459f75..f15f0c6e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/README.md b/README.md index 6b8eed086..48f6bfcb8 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file diff --git a/README_ES.md b/README_ES.md index 155ab957f..b22312e29 100644 --- a/README_ES.md +++ b/README_ES.md @@ -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. \ No newline at end of file diff --git a/app/assets/javascripts/comments.js.coffee b/app/assets/javascripts/comments.js.coffee index fefe85544..94845ca78 100644 --- a/app/assets/javascripts/comments.js.coffee +++ b/app/assets/javascripts/comments.js.coffee @@ -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("
<%= t("proposals.form.proposal_video_url_note") %>
+ <%= f.text_field :video_url, placeholder: t("proposals.form.proposal_video_url"), label: false, + aria: {describedby: "video-url-help-text"} %> +
+ <%= t("admin.questions.show.video_url") %>
+
+ <%= @question.video_url %>
+
+ <%= t("admin.questions.show.documents") %>
+
+ <%= @question.documents.first.title %>
+
| <%= t("admin.poll_shifts.new.table_name") %> | +<%= t("admin.poll_shifts.new.table_email") %> | ++ <%= t("admin.poll_shifts.new.table_shift") %> + | +
|---|---|---|
| + <%= user.name %> + | ++ <%= user.email %> + | ++ <%= link_to t("admin.poll_shifts.new.edit_shifts"), + new_admin_booth_shift_path(officer_id: user.poll_officer.id), + class: "button hollow" %> + | +
| <%= t("admin.poll_shifts.new.date") %> | <%= t("admin.poll_shifts.new.officer") %> | -<%= t("admin.poll_shifts.new.assignment") %> | +<%= t("admin.poll_shifts.new.shift") %> | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= l(shift.date.to_date, format: :long) %> | -<%= shift.officer.name %> | +<%= shift.officer_name %> |
- <%= 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" %>
diff --git a/app/views/admin/poll/shifts/new.html.erb b/app/views/admin/poll/shifts/new.html.erb
index c997dc35f..b975c40a9 100644
--- a/app/views/admin/poll/shifts/new.html.erb
+++ b/app/views/admin/poll/shifts/new.html.erb
@@ -2,45 +2,21 @@
<%= @booth.name %>-<%= form_for @shift, as: :shift, url: admin_booth_shifts_path do |f| %> - <%= render "shared/errors", resource: @shift %> - - +<% if @officer.blank? %> ++ <%= t("admin.poll_shifts.new.search_officer_text") %> + + <%= render "search_officers" %> +<% else %> + <%= render "form" %> <% end %>
<% if @shifts.empty? %>
-
diff --git a/app/views/admin/poll/shifts/search_officers.js.erb b/app/views/admin/poll/shifts/search_officers.js.erb
new file mode 100644
index 000000000..ba621d8f7
--- /dev/null
+++ b/app/views/admin/poll/shifts/search_officers.js.erb
@@ -0,0 +1 @@
+$("#search-officers-results").html("<%= j render 'search_officers_results' %>");
\ No newline at end of file
diff --git a/app/views/admin/site_customization/pages/index.html.erb b/app/views/admin/site_customization/pages/index.html.erb
index dd9cfd3ad..897549caf 100644
--- a/app/views/admin/site_customization/pages/index.html.erb
+++ b/app/views/admin/site_customization/pages/index.html.erb
@@ -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 %>
- <%= t("admin.poll_shifts.new.no_assignments") %>
+
\ No newline at end of file
+
+ <%= t("admin.poll_shifts.new.no_shifts") %>
<% else %>
<%= render "shifts" %>
<% end %>
- |
diff --git a/app/views/admin/tags/index.html.erb b/app/views/admin/tags/index.html.erb
index 715479420..f22321f38 100644
--- a/app/views/admin/tags/index.html.erb
+++ b/app/views/admin/tags/index.html.erb
@@ -19,7 +19,7 @@
<%= t("officing.results.index.no_results") %>
-<% end %>
\ No newline at end of file
+<% end %>
diff --git a/app/views/officing/results/new.html.erb b/app/views/officing/results/new.html.erb
index 74af8af10..fa5f449fb 100644
--- a/app/views/officing/results/new.html.erb
+++ b/app/views/officing/results/new.html.erb
@@ -47,6 +47,11 @@
<%= t("officing.results.new.ballots_null") %><%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %> + +
+
<%= t("officing.results.new.ballots_total") %>+ <%= text_field_tag :total, params[:total].presence, placeholder: "0" %> +diff --git a/app/views/polls/_poll_group.html.erb b/app/views/polls/_poll_group.html.erb index 6e0b85f16..e3e5c5976 100644 --- a/app/views/polls/_poll_group.html.erb +++ b/app/views/polls/_poll_group.html.erb @@ -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 %> diff --git a/app/views/polls/index.html.erb b/app/views/polls/index.html.erb index 55cdae8e2..871b04953 100644 --- a/app/views/polls/index.html.erb +++ b/app/views/polls/index.html.erb @@ -27,10 +27,10 @@ <%= t("polls.index.section_footer.title") %> +<%= t("polls.index.section_footer.description") %> <%= t("polls.index.section_footer.help_text_1") %> <%= t("polls.index.section_footer.help_text_2", org: link_to(setting['org_name'], new_user_registration_path)).html_safe %> - diff --git a/app/views/polls/questions/_filter_subnav.html.erb b/app/views/polls/questions/_filter_subnav.html.erb new file mode 100644 index 000000000..738fc3700 --- /dev/null +++ b/app/views/polls/questions/_filter_subnav.html.erb @@ -0,0 +1,22 @@ +
+
diff --git a/app/views/polls/questions/show.html.erb b/app/views/polls/questions/show.html.erb
index da46ebbcc..f67633129 100644
--- a/app/views/polls/questions/show.html.erb
+++ b/app/views/polls/questions/show.html.erb
@@ -55,6 +55,21 @@
+<% if @question.video_url.present? %>
+
+
+
+
+
+<% end %>
+
+
+
+
+ + + <%= t('proposals.show.title_video_url') %> + + <%= text_with_links @question.video_url %> +<%= t('poll_questions.show.more_info') %>@@ -62,4 +77,16 @@
+ <%= render "polls/questions/filter_subnav" %>
+
+
diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb
index 154c5f43f..b5710dfc7 100644
--- a/app/views/proposals/index.html.erb
+++ b/app/views/proposals/index.html.erb
@@ -80,6 +80,7 @@
+ <%= render "polls/questions/comments" %>
+
+
+
+ <%= render 'documents/documents',
+ documents: @question.documents,
+ max_documents_allowed: Poll::Question.max_documents_allowed %>
+
+<%= t("proposals.index.section_footer.title") %> +<%= t("proposals.index.section_footer.description") %> <%= t("proposals.index.section_footer.help_text_1") %> <%= t("proposals.index.section_footer.help_text_2", org: link_to(setting['org_name'], new_user_registration_path)).html_safe %> diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index 177228d76..1dc918e8e 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -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 %> diff --git a/app/views/shared/_admin_login_items.html.erb b/app/views/shared/_admin_login_items.html.erb index 85a367e97..5ba498523 100644 --- a/app/views/shared/_admin_login_items.html.erb +++ b/app/views/shared/_admin_login_items.html.erb @@ -1,37 +1,37 @@ <% if show_admin_menu? %> -
+
-
diff --git a/app/views/shared/_subnavigation.html.erb b/app/views/shared/_subnavigation.html.erb
index 487edeb39..dd9809dd3 100644
--- a/app/views/shared/_subnavigation.html.erb
+++ b/app/views/shared/_subnavigation.html.erb
@@ -20,7 +20,7 @@
+
<%= image_tag "help/help_icon_#{image}.png", alt: t("#{i18n_namespace}.icon_alt"), class: "align-top" %>
<%= t("#{i18n_namespace}.title") %>-
- <%= t("#{i18n_namespace}.description") %> <%= t("community.show.create_first_community_topic.first_theme") %>+ +<% if user_signed_in? %> + <%= t("community.show.create_first_community_topic.first_theme_not_logged_in") %> +<% else %> +
+ <%= 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 %>
+
+<% end %>
diff --git a/app/views/topics/_topic.html.erb b/app/views/topics/_topic.html.erb
new file mode 100644
index 000000000..fe225d501
--- /dev/null
+++ b/app/views/topics/_topic.html.erb
@@ -0,0 +1,25 @@
+
+
+
diff --git a/app/views/topics/_topics.html.erb b/app/views/topics/_topics.html.erb
index f74fa573f..42fa4f319 100644
--- a/app/views/topics/_topics.html.erb
+++ b/app/views/topics/_topics.html.erb
@@ -1,48 +1,13 @@
<% if topics.any? %>
-
+
+
+
+ <%= link_to topic.title, community_topic_path(@community, topic) %>+ ++ + <%= link_to t("community.show.topic.comments", count: topic.comments_count), community_topic_path(@community, topic, anchor: "comments") %> + • + <%= I18n.l topic.created_at.to_date %> + • + <%= topic.author.name %> + + +
+ <% 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 %>
+
+
+
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
-
-
- <% end %>
-
<% else %>
-
-
-
-
- <%= link_to topic.title, community_topic_path(@community, topic) %>- -- - <%= link_to t("community.show.topic.comments", count: topic.comments_count), community_topic_path(@community, topic, anchor: "comments") %> - • - <%= I18n.l topic.created_at.to_date %> - • - <%= topic.author.name %> - - -
- <% 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 %>
-
-
- <%= t("community.show.create_first_community_topic.first_theme") %>- <% if user_signed_in? %> - <%= t("community.show.create_first_community_topic.first_theme_not_logged_in") %> - <% else %> -
- <%= 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 %>
-
- <% end %>
+ <%= render 'topics/informative_text', topics: topics %>
+<% end %>
+
+<% topics.each do |topic| %>
+ <%= render 'topics/topic', topic: topic %>
<% end %>
diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml
index 3986b1b89..9357927ba 100644
--- a/config/i18n-tasks.yml
+++ b/config/i18n-tasks.yml
@@ -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
diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml
index c91719104..91b493ffa 100644
--- a/config/locales/en/admin.yml
+++ b/config/locales/en/admin.yml
@@ -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:
diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml
index 59406499f..c1879df16 100644
--- a/config/locales/en/budgets.yml
+++ b/config/locales/en/budgets.yml
@@ -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."
diff --git a/config/locales/en/community.yml b/config/locales/en/community.yml
index 37b7ea74f..068c98998 100644
--- a/config/locales/en/community.yml
+++ b/config/locales/en/community.yml
@@ -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"
diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml
index 9681c4140..d8b9c2a78 100644
--- a/config/locales/en/general.yml
+++ b/config/locales/en/general.yml
@@ -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:
diff --git a/config/locales/en/legislation.yml b/config/locales/en/legislation.yml
index 7c3b4a236..37f9c02aa 100644
--- a/config/locales/en/legislation.yml
+++ b/config/locales/en/legislation.yml
@@ -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."
diff --git a/config/locales/en/officing.yml b/config/locales/en/officing.yml
index 897c51b2a..72b3812ea 100644
--- a/config/locales/en/officing.yml
+++ b/config/locales/en/officing.yml
@@ -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"
diff --git a/config/locales/en/pages.yml b/config/locales/en/pages.yml
index 83db1a8e4..d1884cbad 100644
--- a/config/locales/en/pages.yml
+++ b/config/locales/en/pages.yml
@@ -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
diff --git a/config/locales/en/responders.yml b/config/locales/en/responders.yml
index 17de27b74..203d5700e 100644
--- a/config/locales/en/responders.yml
+++ b/config/locales/en/responders.yml
@@ -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."
diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml
index 58fd31aa1..2db094999 100644
--- a/config/locales/es/admin.yml
+++ b/config/locales/es/admin.yml
@@ -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:
diff --git a/config/locales/es/budgets.yml b/config/locales/es/budgets.yml
index cc6b27e2f..78b81fbd3 100644
--- a/config/locales/es/budgets.yml
+++ b/config/locales/es/budgets.yml
@@ -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."
diff --git a/config/locales/es/community.yml b/config/locales/es/community.yml
index 196cd4c50..8013c116c 100644
--- a/config/locales/es/community.yml
+++ b/config/locales/es/community.yml
@@ -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"
diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml
index dc2af84bb..f90dbc25c 100644
--- a/config/locales/es/general.yml
+++ b/config/locales/es/general.yml
@@ -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:
diff --git a/config/locales/es/legislation.yml b/config/locales/es/legislation.yml
index 454422046..4d2a72cf5 100644
--- a/config/locales/es/legislation.yml
+++ b/config/locales/es/legislation.yml
@@ -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."
diff --git a/config/locales/es/officing.yml b/config/locales/es/officing.yml
index bd18f1ca7..81dd70492 100644
--- a/config/locales/es/officing.yml
+++ b/config/locales/es/officing.yml
@@ -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"
diff --git a/config/locales/es/pages.yml b/config/locales/es/pages.yml
index 81c916b5a..d67568b2d 100644
--- a/config/locales/es/pages.yml
+++ b/config/locales/es/pages.yml
@@ -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
\ No newline at end of file
+ title: Verifica tu cuenta
diff --git a/config/locales/es/responders.yml b/config/locales/es/responders.yml
index d3d4ff163..74e3ea20a 100644
--- a/config/locales/es/responders.yml
+++ b/config/locales/es/responders.yml
@@ -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."
diff --git a/config/locales/fr/general.yml b/config/locales/fr/general.yml
index e4d0f9a51..cf1488375 100644
--- a/config/locales/fr/general.yml
+++ b/config/locales/fr/general.yml
@@ -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 : ag.gobiernoabierto@consul.dev\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)
diff --git a/config/locales/fr/pages.yml b/config/locales/fr/pages.yml
index 42a4e3f2b..dcb57d400 100644
--- a/config/locales/fr/pages.yml
+++ b/config/locales/fr/pages.yml
@@ -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é
diff --git a/config/locales/nl/pages.yml b/config/locales/nl/pages.yml
index 71edb19fe..a07151243 100644
--- a/config/locales/nl/pages.yml
+++ b/config/locales/nl/pages.yml
@@ -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
\ No newline at end of file
+ title: Verifieer uw account
diff --git a/config/locales/pt-BR/general.yml b/config/locales/pt-BR/general.yml
index 69ca72c02..816c14fa2 100644
--- a/config/locales/pt-BR/general.yml
+++ b/config/locales/pt-BR/general.yml
@@ -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: ag.gobiernoabierto@consul.dev \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)
diff --git a/config/routes.rb b/config/routes.rb
index eaf6b98f4..a02384ced 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -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]
diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb
index 9c7eb800f..d41595683 100644
--- a/db/dev_seeds.rb
+++ b/db/dev_seeds.rb
@@ -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")
diff --git a/db/migrate/20170905111444_add_video_url_to_poll_questions.rb b/db/migrate/20170905111444_add_video_url_to_poll_questions.rb
new file mode 100644
index 000000000..800ca915e
--- /dev/null
+++ b/db/migrate/20170905111444_add_video_url_to_poll_questions.rb
@@ -0,0 +1,5 @@
+class AddVideoUrlToPollQuestions < ActiveRecord::Migration
+ def change
+ add_column :poll_questions, :video_url, :string
+ end
+end
diff --git a/db/migrate/20170908175149_add_officer_data_to_poll_shifts.rb b/db/migrate/20170908175149_add_officer_data_to_poll_shifts.rb
new file mode 100644
index 000000000..0982345b4
--- /dev/null
+++ b/db/migrate/20170908175149_add_officer_data_to_poll_shifts.rb
@@ -0,0 +1,6 @@
+class AddOfficerDataToPollShifts < ActiveRecord::Migration
+ def change
+ add_column :poll_shifts, :officer_name, :string
+ add_column :poll_shifts, :officer_email, :string
+ end
+end
diff --git a/db/migrate/20170914114427_create_poll_total_results.rb b/db/migrate/20170914114427_create_poll_total_results.rb
new file mode 100644
index 000000000..1a733dce4
--- /dev/null
+++ b/db/migrate/20170914114427_create_poll_total_results.rb
@@ -0,0 +1,18 @@
+class CreatePollTotalResults < ActiveRecord::Migration
+ def change
+ create_table :poll_total_results do |t|
+ t.integer :author_id
+ t.integer :amount
+ t.string :origin
+ t.date :date
+ t.integer :booth_assignment_id
+ t.integer :officer_assignment_id
+ t.text :amount_log, default: ""
+ t.text :officer_assignment_id_log, default: ""
+ t.text :author_id_log, default: ""
+ end
+
+ add_index :poll_total_results, :officer_assignment_id
+ add_index :poll_total_results, :booth_assignment_id
+ end
+end
diff --git a/db/migrate/20170914154743_fix_password_changed_at_default.rb b/db/migrate/20170914154743_fix_password_changed_at_default.rb
new file mode 100644
index 000000000..dd3eb9aea
--- /dev/null
+++ b/db/migrate/20170914154743_fix_password_changed_at_default.rb
@@ -0,0 +1,10 @@
+class FixPasswordChangedAtDefault < ActiveRecord::Migration
+ def up
+ change_column_default :users, :password_changed_at, Time.new(2015, 1, 1, 1, 1, 1)
+ end
+
+ def down
+ change_column_default :users, :password_changed_at, Time.now
+ end
+
+end
diff --git a/db/schema.rb b/db/schema.rb
index b87332817..45598ff4e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170822144743) do
+ActiveRecord::Schema.define(version: 20170914154743) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -669,6 +669,7 @@ ActiveRecord::Schema.define(version: 20170822144743) do
t.datetime "created_at"
t.datetime "updated_at"
t.tsvector "tsv"
+ t.string "video_url"
end
add_index "poll_questions", ["author_id"], name: "index_poll_questions_on_author_id", using: :btree
@@ -682,12 +683,29 @@ ActiveRecord::Schema.define(version: 20170822144743) do
t.date "date"
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "officer_name"
+ t.string "officer_email"
end
add_index "poll_shifts", ["booth_id", "officer_id"], name: "index_poll_shifts_on_booth_id_and_officer_id", using: :btree
add_index "poll_shifts", ["booth_id"], name: "index_poll_shifts_on_booth_id", using: :btree
add_index "poll_shifts", ["officer_id"], name: "index_poll_shifts_on_officer_id", using: :btree
+ create_table "poll_total_results", force: :cascade do |t|
+ t.integer "author_id"
+ t.integer "amount"
+ t.string "origin"
+ t.date "date"
+ t.integer "booth_assignment_id"
+ t.integer "officer_assignment_id"
+ t.text "amount_log", default: ""
+ t.text "officer_assignment_id_log", default: ""
+ t.text "author_id_log", default: ""
+ end
+
+ add_index "poll_total_results", ["booth_assignment_id"], name: "index_poll_total_results_on_booth_assignment_id", using: :btree
+ add_index "poll_total_results", ["officer_assignment_id"], name: "index_poll_total_results_on_officer_assignment_id", using: :btree
+
create_table "poll_voters", force: :cascade do |t|
t.string "document_number"
t.string "document_type"
@@ -971,7 +989,7 @@ ActiveRecord::Schema.define(version: 20170822144743) do
t.boolean "email_digest", default: true
t.boolean "email_on_direct_message", default: true
t.boolean "official_position_badge", default: false
- t.datetime "password_changed_at", default: '2017-08-07 11:14:09', null: false
+ t.datetime "password_changed_at", default: '2015-01-01 00:01:01', null: false
t.boolean "created_from_signature", default: false
t.integer "failed_email_digests_count", default: 0
t.text "former_users_data_log", default: ""
diff --git a/db/seeds.rb b/db/seeds.rb
index 478771474..e271e319a 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -39,10 +39,10 @@ Setting["months_to_archive_proposals"] = 12
Setting["email_domain_for_officials"] = ''
# Code to be included at the top (inside ) of every page (useful for tracking)
-Setting['per_page_code_head'] = ''
+Setting['per_page_code_head'] = ''
# Code to be included at the top (inside ) of every page
-Setting['per_page_code_body'] = ''
+Setting['per_page_code_body'] = ''
# Social settings
Setting["twitter_handle"] = nil
diff --git a/doc/en/dev_test_setup.md b/doc/en/dev_test_setup.md
deleted file mode 100644
index d5fa28fe0..000000000
--- a/doc/en/dev_test_setup.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Configuration for development and test environments (Mac OS X)
-
-## Linux
-
-See [here](dev_test_setup_linux.md)
-
-## Mac OS X
-
-See [here](dev_test_setup_osx.md)
-
-## Windows
diff --git a/doc/en/dev_test_setup_linux.md b/doc/en/dev_test_setup_linux.md
deleted file mode 100644
index 5cb89d166..000000000
--- a/doc/en/dev_test_setup_linux.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# Configuration for development and test environments (GNU/Linux)
-
-## Git
-
-Git is officially maintained in Debian/Ubuntu:
-
-```
-sudo apt-get install git
-```
-
-## Ruby
-
-Ruby versions packaged in official repositories are not suitable to work with consul (at least Debian 7 and 8), so we'll have to install it manually.
-
-The preferred method is via rvm:
-
-(only the multi user option installs all dependencies automatically, as we use 'sudo'.)
-
-### As local user
-
-```
-curl -L https://get.rvm.io | bash -s stable
-```
-
-### For all system users
-
-```
-curl -L https://get.rvm.io | sudo bash -s stable
-```
-
-and then add your user to rvm group
-
-```
-sudo usermod -a -G rvm |