Merge branch 'master' into 1856-legislation_processes_proposals_phase
This commit is contained in:
@@ -42,7 +42,6 @@ Layout/DotPosition:
|
|||||||
- 'app/controllers/admin/poll/officer_assignments_controller.rb'
|
- 'app/controllers/admin/poll/officer_assignments_controller.rb'
|
||||||
- 'app/controllers/admin/poll/polls_controller.rb'
|
- 'app/controllers/admin/poll/polls_controller.rb'
|
||||||
- 'app/controllers/admin/poll/recounts_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/residence_controller.rb'
|
||||||
- 'app/controllers/officing/results_controller.rb'
|
- 'app/controllers/officing/results_controller.rb'
|
||||||
- 'app/models/poll/officer.rb'
|
- 'app/models/poll/officer.rb'
|
||||||
@@ -191,7 +190,6 @@ Layout/MultilineMethodCallIndentation:
|
|||||||
- 'app/controllers/admin/poll/officer_assignments_controller.rb'
|
- 'app/controllers/admin/poll/officer_assignments_controller.rb'
|
||||||
- 'app/controllers/admin/poll/polls_controller.rb'
|
- 'app/controllers/admin/poll/polls_controller.rb'
|
||||||
- 'app/controllers/admin/poll/recounts_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/residence_controller.rb'
|
||||||
- 'app/controllers/officing/results_controller.rb'
|
- 'app/controllers/officing/results_controller.rb'
|
||||||
- 'app/models/poll/officer.rb'
|
- 'app/models/poll/officer.rb'
|
||||||
@@ -285,10 +283,10 @@ Lint/ParenthesesAsGroupedExpression:
|
|||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Lint/StringConversionInInterpolation:
|
Lint/StringConversionInInterpolation:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/models/poll/final_recount.rb'
|
|
||||||
- 'app/models/poll/null_result.rb'
|
- 'app/models/poll/null_result.rb'
|
||||||
- 'app/models/poll/partial_result.rb'
|
- 'app/models/poll/partial_result.rb'
|
||||||
- 'app/models/poll/white_result.rb'
|
- 'app/models/poll/white_result.rb'
|
||||||
|
- 'app/models/poll/total_result.rb'
|
||||||
|
|
||||||
# Offense count: 15
|
# Offense count: 15
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
@@ -473,7 +471,6 @@ Style/ConditionalAssignment:
|
|||||||
- 'app/controllers/admin/poll/questions_controller.rb'
|
- 'app/controllers/admin/poll/questions_controller.rb'
|
||||||
- 'app/controllers/comments_controller.rb'
|
- 'app/controllers/comments_controller.rb'
|
||||||
- 'app/controllers/management/spending_proposals_controller.rb'
|
- 'app/controllers/management/spending_proposals_controller.rb'
|
||||||
- 'app/controllers/officing/final_recounts_controller.rb'
|
|
||||||
- 'app/controllers/spending_proposals_controller.rb'
|
- 'app/controllers/spending_proposals_controller.rb'
|
||||||
- 'app/controllers/verification/sms_controller.rb'
|
- 'app/controllers/verification/sms_controller.rb'
|
||||||
- 'lib/graph_ql/api_types_creator.rb'
|
- 'lib/graph_ql/api_types_creator.rb'
|
||||||
@@ -565,6 +562,7 @@ Style/MutableConstant:
|
|||||||
- 'app/models/poll/null_result.rb'
|
- 'app/models/poll/null_result.rb'
|
||||||
- 'app/models/poll/partial_result.rb'
|
- 'app/models/poll/partial_result.rb'
|
||||||
- 'app/models/poll/white_result.rb'
|
- 'app/models/poll/white_result.rb'
|
||||||
|
- 'app/models/poll/total_result.rb'
|
||||||
- 'app/models/proposal.rb'
|
- 'app/models/proposal.rb'
|
||||||
- 'app/models/signature_sheet.rb'
|
- 'app/models/signature_sheet.rb'
|
||||||
- 'app/models/site_customization/content_block.rb'
|
- 'app/models/site_customization/content_block.rb'
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ before_script:
|
|||||||
- "for i in config/*.example; do cp \"$i\" \"${i/.example}\"; done"
|
- "for i in config/*.example; do cp \"$i\" \"${i/.example}\"; done"
|
||||||
- bundle exec rake db:setup
|
- bundle exec rake db:setup
|
||||||
script:
|
script:
|
||||||
|
- "bundle exec rake assets:precompile RAILS_ENV=test"
|
||||||
- "bundle exec rake knapsack:rspec"
|
- "bundle exec rake knapsack:rspec"
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
|||||||
221
CUSTOMIZE_EN.md
221
CUSTOMIZE_EN.md
@@ -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
|
|
||||||
```
|
|
||||||
221
CUSTOMIZE_ES.md
221
CUSTOMIZE_ES.md
@@ -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
|
|
||||||
```
|
|
||||||
2
Gemfile
2
Gemfile
@@ -24,6 +24,7 @@ gem 'graphql', '~> 1.6.3'
|
|||||||
gem 'groupdate', '~> 3.2.0'
|
gem 'groupdate', '~> 3.2.0'
|
||||||
gem 'initialjs-rails', '~> 0.2.0.5'
|
gem 'initialjs-rails', '~> 0.2.0.5'
|
||||||
gem 'invisible_captcha', '~> 0.9.2'
|
gem 'invisible_captcha', '~> 0.9.2'
|
||||||
|
gem 'jquery-fileupload-rails'
|
||||||
gem 'jquery-rails', '~> 4.3.1'
|
gem 'jquery-rails', '~> 4.3.1'
|
||||||
gem 'jquery-ui-rails', '~> 6.0.1'
|
gem 'jquery-ui-rails', '~> 6.0.1'
|
||||||
gem 'kaminari', '~> 1.0.1'
|
gem 'kaminari', '~> 1.0.1'
|
||||||
@@ -33,7 +34,6 @@ gem 'omniauth-facebook', '~> 4.0.0'
|
|||||||
gem 'omniauth-google-oauth2', '~> 0.4.0'
|
gem 'omniauth-google-oauth2', '~> 0.4.0'
|
||||||
gem 'omniauth-twitter', '~> 1.4.0'
|
gem 'omniauth-twitter', '~> 1.4.0'
|
||||||
gem 'paperclip', '~> 5.1.0'
|
gem 'paperclip', '~> 5.1.0'
|
||||||
gem 'jquery-fileupload-rails'
|
|
||||||
gem 'paranoia', '~> 2.3.1'
|
gem 'paranoia', '~> 2.3.1'
|
||||||
gem 'pg', '~> 0.21.0'
|
gem 'pg', '~> 0.21.0'
|
||||||
gem 'pg_search', '~> 2.0.1'
|
gem 'pg_search', '~> 2.0.1'
|
||||||
|
|||||||
44
README.md
44
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)
|
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
|
## 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).
|
Prerequisites: install git, Ruby 2.3.2, bundler gem, and PostgreSQL (>=9.4).
|
||||||
|
|
||||||
```
|
```bash
|
||||||
git clone https://github.com/consul/consul.git
|
git clone https://github.com/consul/consul.git
|
||||||
cd consul
|
cd consul
|
||||||
bundle install
|
bundle install
|
||||||
cp config/database.yml.example config/database.yml
|
cp config/database.yml.example config/database.yml
|
||||||
cp config/secrets.yml.example config/secrets.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
|
bin/rake db:dev_seed
|
||||||
RAILS_ENV=test rake db:setup
|
RAILS_ENV=test rake db:setup
|
||||||
```
|
```
|
||||||
@@ -60,20 +55,6 @@ Run the tests with:
|
|||||||
bin/rspec
|
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:
|
You can use the default admin user from the seeds file:
|
||||||
|
|
||||||
**user:** admin@consul.dev
|
**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
|
**user:** verified@consul.dev
|
||||||
**pass:** 12345678
|
**pass:** 12345678
|
||||||
|
|
||||||
### Customization
|
## Documentation
|
||||||
|
|
||||||
Read more on documentation:
|
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
|
||||||
|
|
||||||
* 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.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
@@ -104,7 +76,3 @@ Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt)
|
|||||||
## Contributions
|
## Contributions
|
||||||
|
|
||||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
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.
|
|
||||||
38
README_ES.md
38
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)
|
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
|
## 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).
|
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
|
bundle install
|
||||||
cp config/database.yml.example config/database.yml
|
cp config/database.yml.example config/database.yml
|
||||||
cp config/secrets.yml.example config/secrets.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
|
bin/rake db:dev_seed
|
||||||
RAILS_ENV=test rake db:setup
|
RAILS_ENV=test rake db:setup
|
||||||
```
|
```
|
||||||
@@ -60,20 +56,6 @@ Para ejecutar los tests:
|
|||||||
bin/rspec
|
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:
|
Puedes usar el usuario administrador por defecto del fichero seeds:
|
||||||
|
|
||||||
**user:** admin@consul.dev
|
**user:** admin@consul.dev
|
||||||
@@ -84,15 +66,9 @@ Pero para ciertas acciones, como apoyar, necesitarás un usuario verificado, el
|
|||||||
**user:** verified@consul.dev
|
**user:** verified@consul.dev
|
||||||
**pass:** 12345678
|
**pass:** 12345678
|
||||||
|
|
||||||
### Customización
|
## Documentación
|
||||||
|
|
||||||
Ver fichero [CUSTOMIZE_ES.md](CUSTOMIZE_ES.md)
|
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
|
||||||
|
|
||||||
### 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.
|
|
||||||
|
|
||||||
## Licencia
|
## Licencia
|
||||||
|
|
||||||
@@ -101,7 +77,3 @@ El código de este proyecto está publicado bajo la licencia AFFERO GPL v3 (ver
|
|||||||
## Contribuciones
|
## Contribuciones
|
||||||
|
|
||||||
Ver fichero [CONTRIBUTING_ES.md](CONTRIBUTING_ES.md)
|
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.
|
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
//= require legislation_annotatable
|
//= require legislation_annotatable
|
||||||
//= require watch_form_changes
|
//= require watch_form_changes
|
||||||
//= require followable
|
//= require followable
|
||||||
|
//= require flaggable
|
||||||
//= require documentable
|
//= require documentable
|
||||||
//= require tree_navigator
|
//= require tree_navigator
|
||||||
//= require custom
|
//= require custom
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ App.Comments =
|
|||||||
this.update_comments_count()
|
this.update_comments_count()
|
||||||
|
|
||||||
add_reply: (parent_id, response_html) ->
|
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))
|
$("##{parent_id} .comment-children:first").prepend($(response_html))
|
||||||
this.update_comments_count()
|
this.update_comments_count()
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ App.Documentable =
|
|||||||
|
|
||||||
initializeDirectUploads: ->
|
initializeDirectUploads: ->
|
||||||
|
|
||||||
$('input.document_ajax_attachment[type=file]').fileupload
|
$('input.js-document-attachment[type=file]').fileupload
|
||||||
|
|
||||||
paramName: "document[attachment]"
|
paramName: "document[attachment]"
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ App.Documentable =
|
|||||||
return
|
return
|
||||||
|
|
||||||
initializeInterface: ->
|
initializeInterface: ->
|
||||||
input_files = $('input.document_ajax_attachment[type=file]')
|
input_files = $('input.js-document-attachment[type=file]')
|
||||||
|
|
||||||
$.each input_files, (index, file) ->
|
$.each input_files, (index, file) ->
|
||||||
wrapper = $(file).parent()
|
wrapper = $(file).parent()
|
||||||
|
|||||||
4
app/assets/javascripts/flaggable.js.coffee
Normal file
4
app/assets/javascripts/flaggable.js.coffee
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
App.Flaggable =
|
||||||
|
|
||||||
|
update: (resource_id, button) ->
|
||||||
|
$("#" + resource_id + " .js-flag-actions").html(button).foundation()
|
||||||
@@ -54,7 +54,7 @@ $admin-color: #cf3638;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th, td {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
&.text-center {
|
&.text-center {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
.communities-show {
|
.communities-show {
|
||||||
.button.disabled, .button[disabled] {
|
.button.disabled,
|
||||||
|
.button[disabled] {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,22 +32,30 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
z-index: 4 !important;
|
z-index: 4 !important;
|
||||||
|
|
||||||
.ui-datepicker-prev {
|
|
||||||
left: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-datepicker-next {
|
|
||||||
right: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-datepicker-prev,
|
.ui-datepicker-prev,
|
||||||
.ui-datepicker-next {
|
.ui-datepicker-next {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
font-family: "icons" !important;
|
||||||
|
font-size: rem-calc(24);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: $small-font-size;
|
height: rem-calc(30);
|
||||||
line-height: $line-height;
|
line-height: $line-height;
|
||||||
top: 0;
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
width: rem-calc(30);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-datepicker-prev::after {
|
||||||
|
content: '\62';
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-datepicker-next::after {
|
||||||
|
content: '\63';
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
|
|||||||
@@ -3,18 +3,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.document-form {
|
.document-form {
|
||||||
|
|
||||||
.document .file-name {
|
.document .file-name {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar-placeholder {
|
.progress-bar-placeholder {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.document .loading-bar.errors {
|
.document .loading-bar.errors {
|
||||||
margin-top: $line-height * 2;
|
margin-top: $line-height * 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.document {
|
.document {
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
@@ -24,7 +28,7 @@
|
|||||||
background-color: $light-gray;
|
background-color: $light-gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.document_ajax_attachment[type=file]{
|
.js-document-attachment {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ a {
|
|||||||
|
|
||||||
.menu.simple {
|
.menu.simple {
|
||||||
border-bottom: 1px solid $border;
|
border-bottom: 1px solid $border;
|
||||||
margin: $line-height 0;
|
margin-bottom: $line-height;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
padding-bottom: rem-calc(7);
|
padding-bottom: rem-calc(7);
|
||||||
@@ -312,10 +312,6 @@ a {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-max-width {
|
|
||||||
max-width: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button.float-right ~ .button.float-right {
|
.button.float-right ~ .button.float-right {
|
||||||
margin: 0 $line-height / 2;
|
margin: 0 $line-height / 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,7 +251,7 @@
|
|||||||
.spending-proposal-form,
|
.spending-proposal-form,
|
||||||
.document-form,
|
.document-form,
|
||||||
.topic-new,
|
.topic-new,
|
||||||
.topic-form {
|
.topic-form {
|
||||||
|
|
||||||
.icon-debates,
|
.icon-debates,
|
||||||
.icon-proposals,
|
.icon-proposals,
|
||||||
@@ -395,8 +395,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tags,
|
.tags,
|
||||||
&.geozone {
|
.geozone {
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -478,6 +478,7 @@
|
|||||||
|
|
||||||
.tags {
|
.tags {
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
margin-right: rem-calc(6);
|
margin-right: rem-calc(6);
|
||||||
@@ -610,6 +611,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.show-actions-menu {
|
||||||
|
|
||||||
|
[class^="icon-"] {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 04. List participation
|
// 04. List participation
|
||||||
// ----------------------
|
// ----------------------
|
||||||
|
|
||||||
@@ -760,7 +769,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.document-form{
|
.document-form {
|
||||||
max-width: 75rem;
|
max-width: 75rem;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
@@ -896,9 +905,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.help-header {
|
.help-header {
|
||||||
|
background: #fafafa;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
padding-bottom: $line-height / 2;
|
||||||
|
padding-top: $line-height;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: rem-calc(24);
|
font-size: rem-calc(24);
|
||||||
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
app/controllers/admin/poll/base_controller.rb
Normal file
10
app/controllers/admin/poll/base_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
class Admin::Poll::BaseController < Admin::BaseController
|
||||||
|
helper_method :namespace
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def namespace
|
||||||
|
"admin"
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class Admin::Poll::BoothAssignmentsController < Admin::BaseController
|
class Admin::Poll::BoothAssignmentsController < Admin::Poll::BaseController
|
||||||
|
|
||||||
before_action :load_poll, except: [:create, :destroy]
|
before_action :load_poll, except: [:create, :destroy]
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ class Admin::Poll::BoothAssignmentsController < Admin::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@booth_assignment = @poll.booth_assignments.includes(:final_recounts, :voters,
|
@booth_assignment = @poll.booth_assignments.includes(:total_results, :voters,
|
||||||
officer_assignments: [officer: [:user]]).find(params[:id])
|
officer_assignments: [officer: [:user]]).find(params[:id])
|
||||||
@voters_by_date = @booth_assignment.voters.group_by {|v| v.created_at.to_date}
|
@voters_by_date = @booth_assignment.voters.group_by {|v| v.created_at.to_date}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Admin::Poll::BoothsController < Admin::BaseController
|
class Admin::Poll::BoothsController < Admin::Poll::BaseController
|
||||||
load_and_authorize_resource class: 'Poll::Booth'
|
load_and_authorize_resource class: 'Poll::Booth'
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@@ -41,4 +41,4 @@ class Admin::Poll::BoothsController < Admin::BaseController
|
|||||||
params.require(:poll_booth).permit(:name, :location)
|
params.require(:poll_booth).permit(:name, :location)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Admin::Poll::OfficerAssignmentsController < Admin::BaseController
|
class Admin::Poll::OfficerAssignmentsController < Admin::Poll::BaseController
|
||||||
|
|
||||||
before_action :load_poll
|
before_action :load_poll
|
||||||
before_action :redirect_if_blank_required_params, only: [:by_officer]
|
before_action :redirect_if_blank_required_params, only: [:by_officer]
|
||||||
@@ -18,7 +18,7 @@ class Admin::Poll::OfficerAssignmentsController < Admin::BaseController
|
|||||||
@officer = ::Poll::Officer.includes(:user).find(officer_assignment_params[:officer_id])
|
@officer = ::Poll::Officer.includes(:user).find(officer_assignment_params[:officer_id])
|
||||||
@officer_assignments = ::Poll::OfficerAssignment.
|
@officer_assignments = ::Poll::OfficerAssignment.
|
||||||
joins(:booth_assignment).
|
joins(:booth_assignment).
|
||||||
includes(:final_recounts, booth_assignment: :booth).
|
includes(:total_results, booth_assignment: :booth).
|
||||||
where("officer_id = ? AND poll_booth_assignments.poll_id = ?", @officer.id, @poll.id).
|
where("officer_id = ? AND poll_booth_assignments.poll_id = ?", @officer.id, @poll.id).
|
||||||
order(:date)
|
order(:date)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Admin::Poll::OfficersController < Admin::BaseController
|
class Admin::Poll::OfficersController < Admin::Poll::BaseController
|
||||||
load_and_authorize_resource :officer, class: "Poll::Officer", except: [:edit, :show]
|
load_and_authorize_resource :officer, class: "Poll::Officer", except: [:edit, :show]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@@ -36,4 +36,4 @@ class Admin::Poll::OfficersController < Admin::BaseController
|
|||||||
def edit
|
def edit
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Admin::Poll::PollsController < Admin::BaseController
|
class Admin::Poll::PollsController < Admin::Poll::BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
before_action :load_search, only: [:search_booths, :search_questions, :search_officers]
|
before_action :load_search, only: [:search_booths, :search_questions, :search_officers]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Admin::Poll::QuestionsController < Admin::BaseController
|
class Admin::Poll::QuestionsController < Admin::Poll::BaseController
|
||||||
include CommentableActions
|
include CommentableActions
|
||||||
|
|
||||||
load_and_authorize_resource :poll
|
load_and_authorize_resource :poll
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
class Admin::Poll::RecountsController < Admin::BaseController
|
class Admin::Poll::RecountsController < Admin::Poll::BaseController
|
||||||
before_action :load_poll
|
before_action :load_poll
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@booth_assignments = @poll.booth_assignments.
|
@booth_assignments = @poll.booth_assignments.
|
||||||
includes(:booth, :final_recounts, :voters).
|
includes(:booth, :total_results, :voters).
|
||||||
order("poll_booths.name").
|
order("poll_booths.name").
|
||||||
page(params[:page]).per(50)
|
page(params[:page]).per(50)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Admin::Poll::ResultsController < Admin::BaseController
|
class Admin::Poll::ResultsController < Admin::Poll::BaseController
|
||||||
before_action :load_poll
|
before_action :load_poll
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@@ -10,4 +10,4 @@ class Admin::Poll::ResultsController < Admin::BaseController
|
|||||||
def load_poll
|
def load_poll
|
||||||
@poll = ::Poll.includes(:questions).find(params[:poll_id])
|
@poll = ::Poll.includes(:questions).find(params[:poll_id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Admin::Poll::ShiftsController < Admin::BaseController
|
class Admin::Poll::ShiftsController < Admin::Poll::BaseController
|
||||||
|
|
||||||
before_action :load_booth
|
before_action :load_booth
|
||||||
before_action :load_polls
|
before_action :load_polls
|
||||||
before_action :load_officer
|
before_action :load_officer
|
||||||
@@ -57,4 +57,4 @@ class Admin::Poll::ShiftsController < Admin::BaseController
|
|||||||
params.require(:shift).permit(:booth_id, :officer_id, :date)
|
params.require(:shift).permit(:booth_id, :officer_id, :date)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class CommunitiesController < ApplicationController
|
|||||||
skip_authorization_check
|
skip_authorization_check
|
||||||
|
|
||||||
def show
|
def show
|
||||||
redirect_to root_path unless Setting['feature.community'].present?
|
redirect_to root_path if Setting['feature.community'].blank?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
class DocumentsController < ApplicationController
|
class DocumentsController < ApplicationController
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
before_filter :find_documentable, except: :destroy
|
before_action :find_documentable, except: :destroy
|
||||||
before_filter :prepare_new_document, only: [:new, :new_nested]
|
before_action :prepare_new_document, only: [:new, :new_nested]
|
||||||
before_filter :prepare_document_for_creation, only: :create
|
before_action :prepare_document_for_creation, only: :create
|
||||||
|
|
||||||
load_and_authorize_resource except: :upload
|
load_and_authorize_resource except: :upload
|
||||||
skip_authorization_check only: :upload
|
skip_authorization_check only: :upload
|
||||||
@@ -48,6 +48,7 @@ class DocumentsController < ApplicationController
|
|||||||
def destroy_upload
|
def destroy_upload
|
||||||
@document = Document.new(cached_attachment: params[:path])
|
@document = Document.new(cached_attachment: params[:path])
|
||||||
@document.set_attachment_from_cached_attachment
|
@document.set_attachment_from_cached_attachment
|
||||||
|
@document.cached_attachment = nil
|
||||||
@document.documentable = @documentable
|
@document.documentable = @documentable
|
||||||
|
|
||||||
if @document.attachment.destroy
|
if @document.attachment.destroy
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -6,10 +6,11 @@ class Officing::PollsController < Officing::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def final
|
def final
|
||||||
@polls = current_user.poll_officer? ? current_user.poll_officer.final_days_assigned_polls : []
|
@polls = if current_user.poll_officer?
|
||||||
return unless current_user.poll_officer?
|
current_user.poll_officer.final_days_assigned_polls.select {|poll| poll.ends_at > 2.week.ago && poll.expired?}
|
||||||
|
else
|
||||||
@polls = @polls.select {|poll| poll.ends_at > 1.week.ago && poll.expired?}
|
[]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class Officing::ResultsController < Officing::BaseController
|
|||||||
where(date: index_params[:date])
|
where(date: index_params[:date])
|
||||||
@whites = ::Poll::WhiteResult.where(booth_assignment_id: @booth_assignment.id, date: index_params[:date]).sum(:amount)
|
@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)
|
@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
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@ class Officing::ResultsController < Officing::BaseController
|
|||||||
|
|
||||||
build_white_results
|
build_white_results
|
||||||
build_null_results
|
build_null_results
|
||||||
|
build_total_results
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_white_results
|
def build_white_results
|
||||||
@@ -96,6 +98,18 @@ class Officing::ResultsController < Officing::BaseController
|
|||||||
end
|
end
|
||||||
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)
|
def go_back_to_new(alert = nil)
|
||||||
params[:d] = results_params[:date]
|
params[:d] = results_params[:date]
|
||||||
params[:oa] = results_params[:officer_assignment_id]
|
params[:oa] = results_params[:officer_assignment_id]
|
||||||
@@ -132,7 +146,7 @@ class Officing::ResultsController < Officing::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def results_params
|
def results_params
|
||||||
params.permit(:officer_assignment_id, :date, :questions, :whites, :nulls)
|
params.permit(:officer_assignment_id, :date, :questions, :whites, :nulls, :total)
|
||||||
end
|
end
|
||||||
|
|
||||||
def index_params
|
def index_params
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class ProposalsController < ApplicationController
|
|||||||
def proposal_params
|
def proposal_params
|
||||||
params.require(:proposal).permit(:title, :question, :summary, :description, :external_url, :video_url,
|
params.require(:proposal).permit(:title, :question, :summary, :description, :external_url, :video_url,
|
||||||
:responsible_name, :tag_list, :terms_of_service, :geozone_id,
|
:responsible_name, :tag_list, :terms_of_service, :geozone_id,
|
||||||
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id] )
|
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id])
|
||||||
end
|
end
|
||||||
|
|
||||||
def retired_params
|
def retired_params
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ module AdminHelper
|
|||||||
["banners"].include? controller_name
|
["banners"].include? controller_name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def menu_customization?
|
||||||
|
["pages", "images", "content_blocks"].include? controller_name
|
||||||
|
end
|
||||||
|
|
||||||
def official_level_options
|
def official_level_options
|
||||||
options = [["", 0]]
|
options = [["", 0]]
|
||||||
(1..5).each do |i|
|
(1..5).each do |i|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ module CommunitiesHelper
|
|||||||
community.from_proposal? ? t("community.show.description.proposal") : t("community.show.description.investment")
|
community.from_proposal? ? t("community.show.description.proposal") : t("community.show.description.investment")
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_author?(community, participant)
|
def author?(community, participant)
|
||||||
if community.from_proposal?
|
if community.from_proposal?
|
||||||
community.proposal.author_id == participant.id
|
community.proposal.author_id == participant.id
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ module DocumentablesHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def max_file_size(documentable)
|
def max_file_size(documentable)
|
||||||
bytesToMeg(documentable.class.max_file_size)
|
bytes_to_mega(documentable.class.max_file_size)
|
||||||
end
|
end
|
||||||
|
|
||||||
def accepted_content_types(documentable)
|
def accepted_content_types(documentable)
|
||||||
@@ -18,8 +18,8 @@ module DocumentablesHelper
|
|||||||
|
|
||||||
def accepted_content_types_extensions(documentable_class)
|
def accepted_content_types_extensions(documentable_class)
|
||||||
documentable_class.accepted_content_types
|
documentable_class.accepted_content_types
|
||||||
.collect{ |content_type| ".#{content_type.split("/").last}" }
|
.collect{ |content_type| ".#{content_type.split('/').last}" }
|
||||||
.join(",")
|
.join(",")
|
||||||
end
|
end
|
||||||
|
|
||||||
def humanized_accepted_content_types(documentable)
|
def humanized_accepted_content_types(documentable)
|
||||||
@@ -38,4 +38,4 @@ module DocumentablesHelper
|
|||||||
documentable.documents.count >= documentable.class.max_documents_allowed
|
documentable.documents.count >= documentable.class.max_documents_allowed
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ module DocumentsHelper
|
|||||||
document.errors[:attachment].join(', ') if document.errors.key?(:attachment)
|
document.errors[:attachment].join(', ') if document.errors.key?(:attachment)
|
||||||
end
|
end
|
||||||
|
|
||||||
def bytesToMeg(bytes)
|
def bytes_to_mega(bytes)
|
||||||
bytes / Numeric::MEGABYTE
|
bytes / Numeric::MEGABYTE
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ module DocumentsHelper
|
|||||||
def render_attachment(document, index)
|
def render_attachment(document, index)
|
||||||
html = file_field_tag :attachment,
|
html = file_field_tag :attachment,
|
||||||
accept: accepted_content_types_extensions(document.documentable_type.constantize),
|
accept: accepted_content_types_extensions(document.documentable_type.constantize),
|
||||||
class: 'document_ajax_attachment',
|
class: 'js-document-attachment',
|
||||||
data: {
|
data: {
|
||||||
url: document_direct_upload_url(document),
|
url: document_direct_upload_url(document),
|
||||||
cached_attachment_input_field: document_nested_field_id(document, index, :cached_attachment),
|
cached_attachment_input_field: document_nested_field_id(document, index, :cached_attachment),
|
||||||
@@ -80,10 +80,10 @@ module DocumentsHelper
|
|||||||
|
|
||||||
def document_direct_upload_url(document)
|
def document_direct_upload_url(document)
|
||||||
upload_documents_url(
|
upload_documents_url(
|
||||||
documentable_type: document.documentable_type,
|
documentable_type: document.documentable_type,
|
||||||
documentable_id: document.documentable_id,
|
documentable_id: document.documentable_id,
|
||||||
format: :js
|
format: :js
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
module EmbedVideosHelper
|
module EmbedVideosHelper
|
||||||
|
|
||||||
|
VIMEO_REGEX = /vimeo.*(staffpicks\/|channels\/|videos\/|video\/|\/)([^#\&\?]*).*/
|
||||||
|
YOUTUBE_REGEX = /youtu.*(be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/
|
||||||
|
|
||||||
def embedded_video_code
|
def embedded_video_code
|
||||||
link = @proposal.video_url
|
link = @proposal.video_url
|
||||||
title = t('proposals.show.embed_video_title', proposal: @proposal.title)
|
title = t('proposals.show.embed_video_title', proposal: @proposal.title)
|
||||||
@@ -10,10 +13,10 @@ module EmbedVideosHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
if server == "Vimeo"
|
if server == "Vimeo"
|
||||||
reg_exp = /vimeo.*(staffpicks\/|channels\/|videos\/|video\/|\/)([^#\&\?]*).*/
|
reg_exp = VIMEO_REGEX
|
||||||
src = "https://player.vimeo.com/video/"
|
src = "https://player.vimeo.com/video/"
|
||||||
elsif server == "YouTube"
|
elsif server == "YouTube"
|
||||||
reg_exp = /youtu.*(be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/
|
reg_exp = YOUTUBE_REGEX
|
||||||
src = "https://www.youtube.com/embed/"
|
src = "https://www.youtube.com/embed/"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -28,4 +31,11 @@ module EmbedVideosHelper
|
|||||||
end
|
end
|
||||||
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
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
module OfficingHelper
|
module OfficingHelper
|
||||||
|
|
||||||
def officer_assignments_select_options(officer_assignments)
|
|
||||||
options = []
|
|
||||||
officer_assignments.each do |oa|
|
|
||||||
options << ["#{oa.booth_assignment.booth.name}: #{l(oa.date.to_date, format: :long)}", oa.id]
|
|
||||||
end
|
|
||||||
options_for_select(options)
|
|
||||||
end
|
|
||||||
|
|
||||||
def booths_for_officer_select_options(officer_assignments)
|
def booths_for_officer_select_options(officer_assignments)
|
||||||
options = []
|
options = []
|
||||||
officer_assignments.each do |oa|
|
officer_assignments.each do |oa|
|
||||||
@@ -17,10 +9,6 @@ module OfficingHelper
|
|||||||
options_for_select(options, params[:oa])
|
options_for_select(options, params[:oa])
|
||||||
end
|
end
|
||||||
|
|
||||||
def system_recount_to_compare_with_final_recount(final_recount)
|
|
||||||
final_recount.booth_assignment.voters.select {|v| v.created_at.to_date == final_recount.date}.size
|
|
||||||
end
|
|
||||||
|
|
||||||
def answer_result_value(question_id, answer_index)
|
def answer_result_value(question_id, answer_index)
|
||||||
return nil if params.blank?
|
return nil if params.blank?
|
||||||
return nil if params[:questions].blank?
|
return nil if params[:questions].blank?
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
module PollFinalRecountsHelper
|
|
||||||
|
|
||||||
def final_recount_for_date(final_recounts, date)
|
|
||||||
final_recounts.select {|f| f.date == date}.first
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
module PollRecountsHelper
|
module PollRecountsHelper
|
||||||
|
|
||||||
def booth_assignment_sum_final_recounts(ba)
|
def total_recounts_by_booth(booth_assignment)
|
||||||
ba.final_recounts.any? ? ba.final_recounts.to_a.sum(&:count) : nil
|
booth_assignment.total_results.any? ? booth_assignment.total_results.to_a.sum(&:amount) : nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -28,11 +28,6 @@ module PollsHelper
|
|||||||
options_for_select(options, params[:d])
|
options_for_select(options, params[:d])
|
||||||
end
|
end
|
||||||
|
|
||||||
def poll_final_recount_option(poll)
|
|
||||||
final_date = poll.ends_at.to_date + 1.day
|
|
||||||
options_for_select([[I18n.t("polls.final_date"), l(final_date)]])
|
|
||||||
end
|
|
||||||
|
|
||||||
def poll_booths_select_options(poll)
|
def poll_booths_select_options(poll)
|
||||||
options = []
|
options = []
|
||||||
poll.booths.each do |booth|
|
poll.booths.each do |booth|
|
||||||
@@ -46,4 +41,4 @@ module PollsHelper
|
|||||||
booth.name + location
|
booth.name + location
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -32,4 +32,16 @@ module ProposalsHelper
|
|||||||
Proposal::RETIRE_OPTIONS.collect { |option| [ t("proposals.retire_options.#{option}"), option ] }
|
Proposal::RETIRE_OPTIONS.collect { |option| [ t("proposals.retire_options.#{option}"), option ] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def can_create_document?(document, proposal)
|
||||||
|
can?(:create, document) && proposal.documents.size < Proposal.max_documents_allowed
|
||||||
|
end
|
||||||
|
|
||||||
|
def author_of_proposal?(proposal)
|
||||||
|
author_of?(proposal, current_user)
|
||||||
|
end
|
||||||
|
|
||||||
|
def current_editable?(proposal)
|
||||||
|
current_user && proposal.editable_by?(current_user)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -11,7 +11,7 @@ class Community < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def from_proposal?
|
def from_proposal?
|
||||||
self.proposal.present?
|
proposal.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ module Documentable
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def documentable(options= {})
|
def documentable(options = {})
|
||||||
@max_documents_allowed = options[:max_documents_allowed]
|
@max_documents_allowed = options[:max_documents_allowed]
|
||||||
@max_file_size = options[:max_file_size]
|
@max_file_size = options[:max_file_size]
|
||||||
@accepted_content_types = options[:accepted_content_types]
|
@accepted_content_types = options[:accepted_content_types]
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class Document < ActiveRecord::Base
|
|||||||
attachment.instance.prefix(attachment, style)
|
attachment.instance.prefix(attachment, style)
|
||||||
end
|
end
|
||||||
|
|
||||||
def prefix(attachment, style)
|
def prefix(attachment, _style)
|
||||||
if !attachment.instance.persisted?
|
if !attachment.instance.persisted?
|
||||||
"cached_attachments/user/#{attachment.instance.user_id}"
|
"cached_attachments/user/#{attachment.instance.user_id}"
|
||||||
else
|
else
|
||||||
@@ -75,7 +75,7 @@ class Document < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def remove_cached_document
|
def remove_cached_document
|
||||||
File.delete(cached_attachment) if File.exists?(cached_attachment)
|
File.delete(cached_attachment) if File.exist?(cached_attachment)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ class Poll < ActiveRecord::Base
|
|||||||
has_many :partial_results, through: :booth_assignments
|
has_many :partial_results, through: :booth_assignments
|
||||||
has_many :white_results, through: :booth_assignments
|
has_many :white_results, through: :booth_assignments
|
||||||
has_many :null_results, through: :booth_assignments
|
has_many :null_results, through: :booth_assignments
|
||||||
|
has_many :total_results, through: :booth_assignments
|
||||||
has_many :voters
|
has_many :voters
|
||||||
has_many :officer_assignments, through: :booth_assignments
|
has_many :officer_assignments, through: :booth_assignments
|
||||||
has_many :officers, through: :officer_assignments
|
has_many :officers, through: :officer_assignments
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Poll
|
|||||||
has_many :shifts
|
has_many :shifts
|
||||||
|
|
||||||
validates :name, presence: true, uniqueness: true
|
validates :name, presence: true, uniqueness: true
|
||||||
|
|
||||||
def self.search(terms)
|
def self.search(terms)
|
||||||
return Booth.none if terms.blank?
|
return Booth.none if terms.blank?
|
||||||
Booth.where("name ILIKE ? OR location ILIKE ?", "%#{terms}%", "%#{terms}%")
|
Booth.where("name ILIKE ? OR location ILIKE ?", "%#{terms}%", "%#{terms}%")
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ class Poll
|
|||||||
belongs_to :poll
|
belongs_to :poll
|
||||||
|
|
||||||
has_many :officer_assignments, class_name: "Poll::OfficerAssignment", dependent: :destroy
|
has_many :officer_assignments, class_name: "Poll::OfficerAssignment", dependent: :destroy
|
||||||
has_many :final_recounts, class_name: "Poll::FinalRecount", dependent: :destroy
|
|
||||||
has_many :officers, through: :officer_assignments
|
has_many :officers, through: :officer_assignments
|
||||||
has_many :voters
|
has_many :voters
|
||||||
has_many :partial_results
|
has_many :partial_results
|
||||||
has_many :white_results
|
has_many :white_results
|
||||||
has_many :null_results
|
has_many :null_results
|
||||||
|
has_many :total_results
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
class Poll
|
|
||||||
class FinalRecount < ActiveRecord::Base
|
|
||||||
belongs_to :booth_assignment, class_name: "Poll::BoothAssignment"
|
|
||||||
belongs_to :officer_assignment, class_name: "Poll::OfficerAssignment"
|
|
||||||
|
|
||||||
validates :booth_assignment_id, presence: true
|
|
||||||
validates :date, presence: true, uniqueness: {scope: :booth_assignment_id}
|
|
||||||
validates :count, presence: true, numericality: {only_integer: true}
|
|
||||||
|
|
||||||
before_save :update_logs
|
|
||||||
|
|
||||||
def update_logs
|
|
||||||
if count_changed? && count_was.present?
|
|
||||||
self.count_log += ":#{count_was.to_s}"
|
|
||||||
self.officer_assignment_id_log += ":#{officer_assignment_id_was.to_s}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -2,8 +2,10 @@ class Poll
|
|||||||
class OfficerAssignment < ActiveRecord::Base
|
class OfficerAssignment < ActiveRecord::Base
|
||||||
belongs_to :officer
|
belongs_to :officer
|
||||||
belongs_to :booth_assignment
|
belongs_to :booth_assignment
|
||||||
has_many :final_recounts
|
|
||||||
has_many :partial_results
|
has_many :partial_results
|
||||||
|
has_many :white_results
|
||||||
|
has_many :null_results
|
||||||
|
has_many :total_results
|
||||||
has_many :voters
|
has_many :voters
|
||||||
|
|
||||||
validates :officer_id, presence: true
|
validates :officer_id, presence: true
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class Poll::Question < ActiveRecord::Base
|
|||||||
|
|
||||||
validates :title, presence: true
|
validates :title, presence: true
|
||||||
validates :author, presence: true
|
validates :author, presence: true
|
||||||
|
validates :poll_id, presence: true
|
||||||
|
|
||||||
validates :title, length: { minimum: 4 }
|
validates :title, length: { minimum: 4 }
|
||||||
validates :description, length: { maximum: Poll::Question.description_max_length }
|
validates :description, length: { maximum: Poll::Question.description_max_length }
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
class Poll
|
class Poll
|
||||||
class Shift < ActiveRecord::Base
|
class Shift < ActiveRecord::Base
|
||||||
belongs_to :booth
|
belongs_to :booth
|
||||||
belongs_to :officer
|
belongs_to :officer
|
||||||
|
|
||||||
validates :booth_id, presence: true
|
validates :booth_id, presence: true
|
||||||
validates :officer_id, presence: true
|
validates :officer_id, presence: true
|
||||||
validates :date, presence: true
|
validates :date, presence: true
|
||||||
validates :date, uniqueness: { scope: [:officer_id, :booth_id] }
|
validates :date, uniqueness: { scope: [:officer_id, :booth_id] }
|
||||||
|
|
||||||
before_create :persist_data
|
before_create :persist_data
|
||||||
after_create :create_officer_assignments
|
after_create :create_officer_assignments
|
||||||
|
|
||||||
@@ -20,10 +20,10 @@ class Poll
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def persist_data
|
def persist_data
|
||||||
self.officer_name = officer.name
|
self.officer_name = officer.name
|
||||||
self.officer_email = officer.email
|
self.officer_email = officer.email
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
23
app/models/poll/total_result.rb
Normal file
23
app/models/poll/total_result.rb
Normal 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
|
||||||
@@ -15,6 +15,7 @@ class Proposal < ActiveRecord::Base
|
|||||||
max_file_size: 3.megabytes,
|
max_file_size: 3.megabytes,
|
||||||
accepted_content_types: [ "application/pdf" ]
|
accepted_content_types: [ "application/pdf" ]
|
||||||
accepts_nested_attributes_for :documents, allow_destroy: true
|
accepts_nested_attributes_for :documents, allow_destroy: true
|
||||||
|
include EmbedVideosHelper
|
||||||
|
|
||||||
acts_as_votable
|
acts_as_votable
|
||||||
acts_as_paranoid column: :hidden_at
|
acts_as_paranoid column: :hidden_at
|
||||||
@@ -41,6 +42,8 @@ class Proposal < ActiveRecord::Base
|
|||||||
|
|
||||||
validates :terms_of_service, acceptance: { allow_nil: false }, on: :create
|
validates :terms_of_service, acceptance: { allow_nil: false }, on: :create
|
||||||
|
|
||||||
|
validate :valid_video_url?
|
||||||
|
|
||||||
before_validation :set_responsible_name
|
before_validation :set_responsible_name
|
||||||
|
|
||||||
before_save :calculate_hot_score, :calculate_confidence_score
|
before_save :calculate_hot_score, :calculate_confidence_score
|
||||||
|
|||||||
@@ -13,6 +13,6 @@ class Topic < ActiveRecord::Base
|
|||||||
|
|
||||||
scope :sort_by_newest, -> { order(created_at: :desc) }
|
scope :sort_by_newest, -> { order(created_at: :desc) }
|
||||||
scope :sort_by_oldest, -> { order(created_at: :asc) }
|
scope :sort_by_oldest, -> { order(created_at: :asc) }
|
||||||
scope :sort_by_most_commented, -> { reorder(comments_count: :desc) }
|
scope :sort_by_most_commented, -> { reorder(comments_count: :desc) }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -57,13 +57,13 @@ class User < ActiveRecord::Base
|
|||||||
scope :officials, -> { where("official_level > 0") }
|
scope :officials, -> { where("official_level > 0") }
|
||||||
scope :newsletter, -> { where(newsletter: true) }
|
scope :newsletter, -> { where(newsletter: true) }
|
||||||
scope :for_render, -> { includes(:organization) }
|
scope :for_render, -> { includes(:organization) }
|
||||||
scope :by_document, -> (document_type, document_number) { where(document_type: document_type, document_number: document_number) }
|
scope :by_document, ->(document_type, document_number) { where(document_type: document_type, document_number: document_number) }
|
||||||
scope :email_digest, -> { where(email_digest: true) }
|
scope :email_digest, -> { where(email_digest: true) }
|
||||||
scope :active, -> { where(erased_at: nil) }
|
scope :active, -> { where(erased_at: nil) }
|
||||||
scope :erased, -> { where.not(erased_at: nil) }
|
scope :erased, -> { where.not(erased_at: nil) }
|
||||||
scope :public_for_api, -> { all }
|
scope :public_for_api, -> { all }
|
||||||
scope :by_comments, -> (query, topics_ids) { joins(:comments).where(query, topics_ids).uniq }
|
scope :by_comments, ->(query, topics_ids) { joins(:comments).where(query, topics_ids).uniq }
|
||||||
scope :by_authors, -> (author_ids) { where("users.id IN (?)", author_ids) }
|
scope :by_authors, ->(author_ids) { where("users.id IN (?)", author_ids) }
|
||||||
|
|
||||||
before_validation :clean_document_number
|
before_validation :clean_document_number
|
||||||
|
|
||||||
|
|||||||
@@ -60,12 +60,12 @@
|
|||||||
<span class="icon-checkmark-circle"></span>
|
<span class="icon-checkmark-circle"></span>
|
||||||
<strong><%= t("admin.menu.title_polls") %></strong>
|
<strong><%= t("admin.menu.title_polls") %></strong>
|
||||||
</a>
|
</a>
|
||||||
<ul id="polls_menu" <%= "class=is-active" if menu_polls? %>>
|
<ul id="polls_menu" <%= "class=is-active" if menu_polls? && controller.class.parent == Admin::Poll::QuestionsController %>>
|
||||||
<li <%= "class=active" if ["polls", "officer_assignments", "booth_assignments", "recounts", "results"].include? controller_name %>>
|
<li <%= "class=active" if ["polls", "officer_assignments", "booth_assignments", "recounts", "results"].include? controller_name %>>
|
||||||
<%= link_to t('admin.menu.polls'), admin_polls_path %>
|
<%= link_to t('admin.menu.polls'), admin_polls_path %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li <%= "class=active" if controller_name == "questions" %>>
|
<li <%= "class=active" if controller_name == "questions" && controller.class.parent == Admin::Poll::QuestionsController %>>
|
||||||
<%= link_to t("admin.menu.poll_questions"), admin_questions_path %>
|
<%= link_to t("admin.menu.poll_questions"), admin_questions_path %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@@ -73,13 +73,13 @@
|
|||||||
<%= link_to t('admin.menu.poll_officers'), admin_officers_path %>
|
<%= link_to t('admin.menu.poll_officers'), admin_officers_path %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li <%= "class=active" if controller_name == "booths" &&
|
<li <%= "class=active" if controller_name == "booths" &&
|
||||||
action_name != "available" %>>
|
action_name != "available" %>>
|
||||||
<%= link_to t('admin.menu.poll_booths'), admin_booths_path %>
|
<%= link_to t('admin.menu.poll_booths'), admin_booths_path %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li <%= "class=active" if controller_name == "shifts" ||
|
<li <%= "class=active" if controller_name == "shifts" ||
|
||||||
controller_name == "booths" &&
|
controller_name == "booths" &&
|
||||||
action_name == "available" %>>
|
action_name == "available" %>>
|
||||||
<%= link_to t('admin.menu.poll_shifts'), available_admin_booths_path %>
|
<%= link_to t('admin.menu.poll_shifts'), available_admin_booths_path %>
|
||||||
</li>
|
</li>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
<span class="icon-settings"></span>
|
<span class="icon-settings"></span>
|
||||||
<strong><%= t("admin.menu.title_site_customization") %></strong>
|
<strong><%= t("admin.menu.title_site_customization") %></strong>
|
||||||
</a>
|
</a>
|
||||||
<ul <%= "class=is-active" if menu_profiles? %>>
|
<ul <%= "class=is-active" if menu_customization? %>>
|
||||||
<li <%= "class=active" if controller_name == "pages" %>>
|
<li <%= "class=active" if controller_name == "pages" %>>
|
||||||
<%= link_to t("admin.menu.site_customization.pages"), admin_site_customization_pages_path %>
|
<%= link_to t("admin.menu.site_customization.pages"), admin_site_customization_pages_path %>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -49,18 +49,18 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.poll_booth_assignments.show.date") %></th>
|
<th><%= t("admin.poll_booth_assignments.show.date") %></th>
|
||||||
<th class="text-center"><%= t("admin.poll_booth_assignments.show.count_final") %></th>
|
<th class="text-center"><%= t("admin.poll_booth_assignments.show.total_recount") %></th>
|
||||||
<th class="text-center"><%= t("admin.poll_booth_assignments.show.count_by_system") %></th>
|
<th class="text-center"><%= t("admin.poll_booth_assignments.show.count_by_system") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% (@poll.starts_at.to_date..@poll.ends_at.to_date).each do |voting_date| %>
|
<% (@poll.starts_at.to_date..@poll.ends_at.to_date).each do |voting_date| %>
|
||||||
<% final_recount = final_recount_for_date(@booth_assignment.final_recounts, voting_date) %>
|
<% total_recount = @booth_assignment.total_results.where(date: voting_date).first %>
|
||||||
<% system_count = @voters_by_date[voting_date].present? ? @voters_by_date[voting_date].size : 0 %>
|
<% system_count = @voters_by_date[voting_date].present? ? @voters_by_date[voting_date].size : 0 %>
|
||||||
<tr id="recounting_<%= voting_date.strftime('%Y%m%d') %>">
|
<tr id="recounting_<%= voting_date.strftime('%Y%m%d') %>">
|
||||||
<td><%= l voting_date %></td>
|
<td><%= l voting_date %></td>
|
||||||
<% if final_recount.present? %>
|
<% if total_recount.present? %>
|
||||||
<td class="text-center <%= 'count-error' if final_recount.count != system_count %>" title="<%= final_recount.officer_assignment.officer.name %>"><%= final_recount.count %></td>
|
<td class="text-center <%= 'count-error' if total_recount.amount != system_count %>" title="<%= total_recount.officer_assignment.officer.name %>"><%= total_recount.amount %></td>
|
||||||
<% else %>
|
<% else %>
|
||||||
<td class="text-center" title=""> - </td>
|
<td class="text-center" title=""> - </td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -27,27 +27,24 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% final_officer_assignments = @officer_assignments.select{|oa| oa.final == true} %>
|
<h3><%= t("admin.poll_officer_assignments.by_officer.total_recounts") %></h3>
|
||||||
<% if final_officer_assignments.any? %>
|
<table id="total_recount_list" class="fixed">
|
||||||
<h3><%= t("admin.poll_officer_assignments.by_officer.final_recounts") %></h3>
|
|
||||||
<table id="final_recount_list" class="fixed">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.poll_officer_assignments.by_officer.date") %></th>
|
<th><%= t("admin.poll_officer_assignments.by_officer.date") %></th>
|
||||||
<th><%= t("admin.poll_officer_assignments.by_officer.booth") %></th>
|
<th><%= t("admin.poll_officer_assignments.by_officer.booth") %></th>
|
||||||
<th class="text-right"><%= t("admin.poll_officer_assignments.by_officer.final_recount") %></th>
|
<th class="text-right"><%= t("admin.poll_officer_assignments.by_officer.total_recount") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% final_officer_assignments.each do |officer_assignment| %>
|
<% @officer_assignments.each do |officer_assignment| %>
|
||||||
<tr id="final_recount_<%= officer_assignment.date.to_date.strftime('%Y%m%d') %>">
|
<tr id="total_recount_<%= officer_assignment.date.to_date.strftime('%Y%m%d') %>">
|
||||||
<td><%= l(officer_assignment.date.to_date) %></td>
|
<td><%= l(officer_assignment.date.to_date) %></td>
|
||||||
<td><%= booth_name_with_location(officer_assignment.booth_assignment.booth) %></td>
|
<td><%= booth_name_with_location(officer_assignment.booth_assignment.booth) %></td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<% if officer_assignment.final_recounts.any? %>
|
<% if officer_assignment.total_results.any? %>
|
||||||
<%= officer_assignment.final_recounts.to_a.sum(&:count) %>
|
<%= officer_assignment.total_results.to_a.sum(&:amount) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
<table class="fixed margin">
|
<table class="fixed margin">
|
||||||
<thead>
|
<thead>
|
||||||
<th><%= t("admin.recounts.index.table_booth_name") %></th>
|
<th><%= t("admin.recounts.index.table_booth_name") %></th>
|
||||||
<th class="text-center"><%= t("admin.recounts.index.table_final_recount") %></th>
|
<th class="text-center"><%= t("admin.recounts.index.table_total_recount") %></th>
|
||||||
<th class="text-center"><%= t("admin.recounts.index.table_system_count") %></th>
|
<th class="text-center"><%= t("admin.recounts.index.table_system_count") %></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @booth_assignments.each do |booth_assignment| %>
|
<% @booth_assignments.each do |booth_assignment| %>
|
||||||
<% final_recount = booth_assignment_sum_final_recounts(booth_assignment) %>
|
<% total_recounts = total_recounts_by_booth(booth_assignment) %>
|
||||||
<% system_count = booth_assignment.voters.size %>
|
<% system_count = booth_assignment.voters.size %>
|
||||||
<tr id="<%= dom_id(booth_assignment) %>_recounts" class="booth_recounts">
|
<tr id="<%= dom_id(booth_assignment) %>_recounts" class="booth_recounts">
|
||||||
<td>
|
<td>
|
||||||
@@ -25,9 +25,9 @@
|
|||||||
<%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: 'tab-recounts') %>
|
<%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: 'tab-recounts') %>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center <%= 'count-error' if final_recount.to_i != system_count %>">
|
<td class="text-center <%= 'count-error' if total_recounts.to_i != system_count %>">
|
||||||
<% if final_recount.present? %>
|
<% if total_recounts.present? %>
|
||||||
<strong><%= final_recount %></strong>
|
<strong><%= total_recounts %></strong>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -14,11 +14,13 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<th><%= t("admin.results.index.table_whites") %></th>
|
<th><%= t("admin.results.index.table_whites") %></th>
|
||||||
<th><%= t("admin.results.index.table_nulls") %></th>
|
<th><%= t("admin.results.index.table_nulls") %></th>
|
||||||
|
<th><%= t("admin.results.index.table_total") %></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="white_results"><%= @poll.white_results.sum(:amount) %></td>
|
<td id="white_results"><%= @poll.white_results.sum(:amount) %></td>
|
||||||
<td id="null_results"><%= @poll.null_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>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -47,4 +49,4 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<% @tags.each do |tag| %>
|
<% @tags.each do |tag| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td class="with-button">
|
||||||
<%= form_for(tag,
|
<%= form_for(tag,
|
||||||
url: admin_tag_path(tag),
|
url: admin_tag_path(tag),
|
||||||
as: :tag,
|
as: :tag,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
<p class="lead">
|
<p class="lead">
|
||||||
<strong><%= t("budgets.index.section_footer.title") %></strong>
|
<strong><%= t("budgets.index.section_footer.title") %></strong>
|
||||||
</p>
|
</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_1") %></p>
|
||||||
<p><%= t("budgets.index.section_footer.help_text_2") %></p>
|
<p><%= t("budgets.index.section_footer.help_text_2") %></p>
|
||||||
<p><%= t("budgets.index.section_footer.help_text_3",
|
<p><%= t("budgets.index.section_footer.help_text_3",
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
<div class="comment-info">
|
<div class="comment-info">
|
||||||
|
|
||||||
<% if comment.as_administrator? %>
|
<% if comment.as_administrator? %>
|
||||||
<span class="user-name"><%= t("comments.comment.admin") %> #<%= comment.administrator_id%></span>
|
<span class="user-name"><%= t("comments.comment.admin") %> #<%= comment.administrator_id %></span>
|
||||||
<% elsif comment.as_moderator? %>
|
<% elsif comment.as_moderator? %>
|
||||||
<span class="user-name"><%= t("comments.comment.moderator") %> #<%= comment.moderator_id%></span>
|
<span class="user-name"><%= t("comments.comment.moderator") %> #<%= comment.moderator_id %></span>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<% if comment.user.hidden? || comment.user.erased? %>
|
<% if comment.user.hidden? || comment.user.erased? %>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if comment.children.size > 0 %>
|
<% if comment.children.size > 0 %>
|
||||||
<%= link_to "#{dom_id(comment)}", class: "js-toggle-children relative", data: {'id': "#{dom_id(comment)}"} do %>
|
<%= link_to "", class: "js-toggle-children relative", data: {'id': "#{dom_id(comment)}"} do %>
|
||||||
<span class="show-for-sr js-child-toggle" style="display: none;"><%= t("shared.show") %></span>
|
<span class="show-for-sr js-child-toggle" style="display: none;"><%= t("shared.show") %></span>
|
||||||
<span class="show-for-sr js-child-toggle"><%= t("shared.hide") %></span>
|
<span class="show-for-sr js-child-toggle"><%= t("shared.hide") %></span>
|
||||||
<span id="<%= dom_id(comment) %>_children_arrow" class="icon-arrow-down"></span> <%= t("comments.comment.responses", count: comment.children.size) %>
|
<span id="<%= dom_id(comment) %>_children_arrow" class="icon-arrow-down"></span> <%= t("comments.comment.responses", count: comment.children.size) %>
|
||||||
@@ -93,6 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
<% unless child_comments_of(comment).empty? %>
|
||||||
<li>
|
<li>
|
||||||
<ul id="<%= dom_id(comment) %>_children" class="no-bullet comment-children">
|
<ul id="<%= dom_id(comment) %>_children" class="no-bullet comment-children">
|
||||||
<% child_comments_of(comment).each do |child| %>
|
<% child_comments_of(comment).each do |child| %>
|
||||||
@@ -102,5 +103,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<%= link_to participant.name, user_path(participant)%>
|
<%= link_to participant.name, user_path(participant)%>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% if is_author?(@community, participant) %>
|
<% if author?(@community, participant) %>
|
||||||
•
|
•
|
||||||
<span class="label round is-author">
|
<span class="label round is-author">
|
||||||
<%= t("comments.comment.author") %>
|
<%= t("comments.comment.author") %>
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
<p class="lead">
|
<p class="lead">
|
||||||
<strong><%= t("debates.index.section_footer.title") %></strong>
|
<strong><%= t("debates.index.section_footer.title") %></strong>
|
||||||
</p>
|
</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_1") %></p>
|
||||||
<p><%= t("debates.index.section_footer.help_text_2",
|
<p><%= t("debates.index.section_footer.help_text_2",
|
||||||
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
|
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<%= file_field_tag :attachment,
|
<%= file_field_tag :attachment,
|
||||||
accept: accepted_content_types_extensions(document.documentable.class),
|
accept: accepted_content_types_extensions(document.documentable.class),
|
||||||
label: false,
|
label: false,
|
||||||
class: 'document_ajax_attachment',
|
class: 'js-document-attachment',
|
||||||
data: {
|
data: {
|
||||||
url: upload_documents_url(documentable_type: document.documentable_type, documentable_id: document.documentable_id),
|
url: upload_documents_url(documentable_type: document.documentable_type, documentable_id: document.documentable_id),
|
||||||
cached_attachment_input_field: "document_cached_attachment",
|
cached_attachment_input_field: "document_cached_attachment",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<div class="off-canvas-content" data-off-canvas-content>
|
<div class="off-canvas-content" data-off-canvas-content>
|
||||||
<%= render 'layouts/admin_header' %>
|
<%= render 'layouts/admin_header' %>
|
||||||
|
|
||||||
<div class="no-margin-top row no-max-width collapse" data-equalizer>
|
<div class="no-margin-top row expanded collapse" data-equalizer>
|
||||||
<div class="small-12 medium-3 column" data-equalizer-watch>
|
<div class="small-12 medium-3 column" data-equalizer-watch>
|
||||||
|
|
||||||
<div class="show-for-small-only">
|
<div class="show-for-small-only">
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="no-margin-top row no-max-width collapse">
|
<main class="no-margin-top row expanded collapse">
|
||||||
<div class="small-12 medium-3 column">
|
<div class="small-12 medium-3 column">
|
||||||
<%= render "/management/menu" %>
|
<%= render "/management/menu" %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<p class="lead">
|
<p class="lead">
|
||||||
<strong><%= t("legislation.processes.index.section_footer.title") %></strong>
|
<strong><%= t("legislation.processes.index.section_footer.title") %></strong>
|
||||||
</p>
|
</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_1") %></p>
|
||||||
<p><%= t("legislation.processes.index.section_footer.help_text_2",
|
<p><%= t("legislation.processes.index.section_footer.help_text_2",
|
||||||
org: setting['org_name']) %></p>
|
org: setting['org_name']) %></p>
|
||||||
|
|||||||
@@ -8,10 +8,10 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li <%= "class=active" if ["final_recounts", "results"].include?(controller_name) || (controller_name == "polls" && action_name == "final") %>>
|
<li <%= "class=active" if ["results"].include?(controller_name) || (controller_name == "polls" && action_name == "final") %>>
|
||||||
<%= link_to final_officing_polls_path do %>
|
<%= link_to final_officing_polls_path do %>
|
||||||
<span class="icon-user"></span>
|
<span class="icon-user"></span>
|
||||||
<%= t("officing.menu.final_recounts") %>
|
<%= t("officing.menu.total_recounts") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -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> </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 %>
|
|
||||||
@@ -14,9 +14,6 @@
|
|||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<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"),
|
<%= link_to t("officing.polls.final.add_results"),
|
||||||
new_officing_poll_result_path(poll),
|
new_officing_poll_result_path(poll),
|
||||||
class: "button hollow" %>
|
class: "button hollow" %>
|
||||||
@@ -29,4 +26,4 @@
|
|||||||
<div class="callout primary">
|
<div class="callout primary">
|
||||||
<%= t("officing.polls.final.no_polls") %>
|
<%= t("officing.polls.final.no_polls") %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -16,12 +16,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><%= t("officing.results.index.table_whites") %></th>
|
<th><%= t("officing.results.index.table_whites") %></th>
|
||||||
<th><%= t("officing.results.index.table_nulls") %></th>
|
<th><%= t("officing.results.index.table_nulls") %></th>
|
||||||
|
<th><%= t("officing.results.index.table_total") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="white_results"><%= @whites %></td>
|
<td id="white_results"><%= @whites %></td>
|
||||||
<td id="null_results"><%= @nulls %></td>
|
<td id="null_results"><%= @nulls %></td>
|
||||||
|
<td id="total_results"><%= @total %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -54,4 +56,4 @@
|
|||||||
<div class="callout primary">
|
<div class="callout primary">
|
||||||
<%= t("officing.results.index.no_results") %>
|
<%= t("officing.results.index.no_results") %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -47,6 +47,11 @@
|
|||||||
<h3><%= t("officing.results.new.ballots_null") %></h3>
|
<h3><%= t("officing.results.new.ballots_null") %></h3>
|
||||||
<%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %>
|
<%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
<p class="lead">
|
<p class="lead">
|
||||||
<strong><%= t("polls.index.section_footer.title") %></strong>
|
<strong><%= t("polls.index.section_footer.title") %></strong>
|
||||||
</p>
|
</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_1") %></p>
|
||||||
<p><%= t("polls.index.section_footer.help_text_2",
|
<p><%= t("polls.index.section_footer.help_text_2",
|
||||||
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
|
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
<span class="js-flag-actions">
|
<span class="flag-content">
|
||||||
<span class="flag-content">
|
<% if show_flag_action? proposal %>
|
||||||
<% if show_flag_action? proposal %>
|
<a id="flag-expand-proposal-<%= proposal.id %>" data-toggle="flag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.flag') %>">
|
||||||
<a id="flag-expand-proposal-<%= proposal.id %>" data-toggle="flag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.flag') %>">
|
<span class="icon-flag flag-disable"></span>
|
||||||
<span class="icon-flag flag-disable"></span>
|
</a>
|
||||||
</a>
|
<span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
|
||||||
<span class="dropdown-pane" id="flag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
|
<%= link_to t('shared.flag'), flag_proposal_path(proposal), method: :put, remote: true, id: "flag-proposal-#{ proposal.id }" %>
|
||||||
<%= link_to t('shared.flag'), flag_proposal_path(proposal), method: :put, remote: true, id: "flag-proposal-#{ proposal.id }" %>
|
</span>
|
||||||
</span>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if show_unflag_action? proposal %>
|
<% if show_unflag_action? proposal %>
|
||||||
<a id="unflag-expand-proposal-<%= proposal.id %>" data-toggle="unflag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.unflag') %>">
|
<a id="unflag-expand-proposal-<%= proposal.id %>" data-toggle="unflag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.unflag') %>">
|
||||||
<span class="icon-flag flag-active"></span>
|
<span class="icon-flag flag-active"></span>
|
||||||
</a>
|
</a>
|
||||||
<span class="dropdown-pane" id="unflag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
|
<span class="dropdown-pane" id="unflag-drop-proposal-<%= proposal.id %>" data-dropdown data-auto-focus="true">
|
||||||
<%= link_to t('shared.unflag'), unflag_proposal_path(proposal), method: :put, remote: true, id: "unflag-proposal-#{ proposal.id }" %>
|
<%= link_to t('shared.unflag'), unflag_proposal_path(proposal), method: :put, remote: true, id: "unflag-proposal-#{ proposal.id }" %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
$("#<%= dom_id(@proposal) %> .js-flag-actions").html('<%= j render("proposals/flag_actions", proposal: @proposal) %>');
|
App.Flaggable.update("<%= dom_id(@proposal) %>",
|
||||||
|
"<%= j render("proposals/flag_actions", proposal: @proposal) %>")
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
<p class="lead">
|
<p class="lead">
|
||||||
<strong><%= t("proposals.index.section_footer.title") %></strong>
|
<strong><%= t("proposals.index.section_footer.title") %></strong>
|
||||||
</p>
|
</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_1") %></p>
|
||||||
<p><%= t("proposals.index.section_footer.help_text_2",
|
<p><%= t("proposals.index.section_footer.help_text_2",
|
||||||
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
|
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
|
||||||
|
|||||||
@@ -16,24 +16,6 @@
|
|||||||
<div class="small-12 medium-9 column">
|
<div class="small-12 medium-9 column">
|
||||||
<%= back_link_to %>
|
<%= back_link_to %>
|
||||||
|
|
||||||
<% if can?(:create, @document) && @proposal.documents.size < Proposal.max_documents_allowed %>
|
|
||||||
<%= link_to t("documents.upload_document"),
|
|
||||||
new_document_path(documentable_id: @proposal, documentable_type: @proposal.class.name, from: request.url),
|
|
||||||
class: 'button hollow float-right' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if author_of?(@proposal, current_user) %>
|
|
||||||
<%= link_to t("proposals.show.send_notification"),
|
|
||||||
new_proposal_notification_path(proposal_id: @proposal.id),
|
|
||||||
class: 'button hollow float-right' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if current_user && @proposal.editable_by?(current_user) %>
|
|
||||||
<%= link_to edit_proposal_path(@proposal), class: 'edit-proposal button hollow float-right' do %>
|
|
||||||
<%= t("proposals.show.edit_proposal_link") %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<h1><%= @proposal.title %></h1>
|
<h1><%= @proposal.title %></h1>
|
||||||
<% if @proposal.retired? %>
|
<% if @proposal.retired? %>
|
||||||
<div data-alert class="callout alert margin-top proposal-retired">
|
<div data-alert class="callout alert margin-top proposal-retired">
|
||||||
@@ -59,7 +41,9 @@
|
|||||||
|
|
||||||
<% if current_user %>
|
<% if current_user %>
|
||||||
<span class="bullet"> • </span>
|
<span class="bullet"> • </span>
|
||||||
<%= render 'proposals/flag_actions', proposal: @proposal %>
|
<span class="js-flag-actions">
|
||||||
|
<%= render 'proposals/flag_actions', proposal: @proposal %>
|
||||||
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -122,6 +106,35 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside class="small-12 medium-3 column">
|
<aside class="small-12 medium-3 column">
|
||||||
|
<% if can_create_document?(@document, @proposal) || author_of_proposal?(@proposal) || current_editable?(@proposal) %>
|
||||||
|
<div class="sidebar-divider"></div>
|
||||||
|
<h2><%= t("proposals.show.author") %></h2>
|
||||||
|
<div class="show-actions-menu">
|
||||||
|
<% if can_create_document?(@document, @proposal) %>
|
||||||
|
<%= link_to new_document_path(documentable_id: @proposal, documentable_type: @proposal.class.name, from: request.url),
|
||||||
|
class: 'button hollow expanded' do %>
|
||||||
|
<span class="icon-document"></span>
|
||||||
|
<%= t("documents.upload_document") %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if author_of_proposal?(@proposal) %>
|
||||||
|
<%= link_to new_proposal_notification_path(proposal_id: @proposal.id),
|
||||||
|
class: 'button hollow expanded' do %>
|
||||||
|
<span class="icon-no-notification"></span>
|
||||||
|
<%= t("proposals.show.send_notification") %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if current_editable?(@proposal) %>
|
||||||
|
<%= link_to edit_proposal_path(@proposal), class: 'edit-proposal button hollow expanded' do %>
|
||||||
|
<span class="icon-edit"></span>
|
||||||
|
<%= t("proposals.show.edit_proposal_link") %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="sidebar-divider"></div>
|
<div class="sidebar-divider"></div>
|
||||||
<h2><%= t("votes.supports") %></h2>
|
<h2><%= t("votes.supports") %></h2>
|
||||||
<div id="<%= dom_id(@proposal) %>_votes">
|
<div id="<%= dom_id(@proposal) %>_votes">
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
<div class="highlight jumbo help-header">
|
<div class="help-header no-margin-top margin-bottom">
|
||||||
<div class="row">
|
<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" %>
|
<%= 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>
|
<h1 class="inline-block"><%= t("#{i18n_namespace}.title") %></h1>
|
||||||
<p>
|
<%= link_to t("#{i18n_namespace}.help"), "#section_help", class: "float-right" %>
|
||||||
<%= t("#{i18n_namespace}.description") %><br>
|
|
||||||
<%= link_to t("#{i18n_namespace}.help"), "#section_help" %>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<%= layout_menu_link_to t("layouts.header.poll_questions"),
|
<%= layout_menu_link_to t("layouts.header.poll_questions"),
|
||||||
polls_path,
|
polls_path,
|
||||||
controller_name == "polls" || controller_name == "questions",
|
controller_name == "polls" || (controller_name == "questions" && controller.class.parent == Polls),
|
||||||
accesskey: "3",
|
accesskey: "3",
|
||||||
title: t("shared.go_to_page") + t("layouts.header.poll_questions") %>
|
title: t("shared.go_to_page") + t("layouts.header.poll_questions") %>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ data:
|
|||||||
# - config/locales/**/*.%{locale}.yml
|
# - config/locales/**/*.%{locale}.yml
|
||||||
## Another gem (replace %#= with %=):
|
## Another gem (replace %#= with %=):
|
||||||
# - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
|
# - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
|
||||||
- config/locales/custom/%{locale}/custom.yml
|
- config/locales/custom/%{locale}/*.yml
|
||||||
- config/locales/%{locale}/general.yml
|
- config/locales/%{locale}/general.yml
|
||||||
- config/locales/%{locale}/activerecord.yml
|
- config/locales/%{locale}/activerecord.yml
|
||||||
- config/locales/%{locale}/activemodel.yml
|
- config/locales/%{locale}/activemodel.yml
|
||||||
|
|||||||
@@ -504,8 +504,8 @@ en:
|
|||||||
booth: "Booth"
|
booth: "Booth"
|
||||||
assignments: "Officing shifts in this poll"
|
assignments: "Officing shifts in this poll"
|
||||||
no_assignments: "This user has no officing shifts in this poll."
|
no_assignments: "This user has no officing shifts in this poll."
|
||||||
final_recounts: "Final recounts"
|
total_recounts: "Total recounts"
|
||||||
final_recount: "Final recount (by officer)"
|
total_recount: "Total recount (by officer)"
|
||||||
poll_shifts:
|
poll_shifts:
|
||||||
new:
|
new:
|
||||||
add_shift: "Add shift"
|
add_shift: "Add shift"
|
||||||
@@ -541,7 +541,7 @@ en:
|
|||||||
recounts: "Recounts"
|
recounts: "Recounts"
|
||||||
recounts_list: "Recount list for this booth"
|
recounts_list: "Recount list for this booth"
|
||||||
date: "Date"
|
date: "Date"
|
||||||
count_final: "Final recount (by officer)"
|
total_recount: "Total recount (by officer)"
|
||||||
count_by_system: "Votes (automatic)"
|
count_by_system: "Votes (automatic)"
|
||||||
index:
|
index:
|
||||||
booths_title: "List of booths"
|
booths_title: "List of booths"
|
||||||
@@ -614,7 +614,7 @@ en:
|
|||||||
title: "Recounts"
|
title: "Recounts"
|
||||||
no_recounts: "There is nothing to be recounted"
|
no_recounts: "There is nothing to be recounted"
|
||||||
table_booth_name: "Booth"
|
table_booth_name: "Booth"
|
||||||
table_final_recount: "Final recount (by officer)"
|
table_total_recount: "Total recount (by officer)"
|
||||||
table_system_count: "Votes (automatic)"
|
table_system_count: "Votes (automatic)"
|
||||||
results:
|
results:
|
||||||
index:
|
index:
|
||||||
@@ -622,6 +622,7 @@ en:
|
|||||||
no_results: "There are no results"
|
no_results: "There are no results"
|
||||||
table_whites: "Blank ballots"
|
table_whites: "Blank ballots"
|
||||||
table_nulls: "Invalid ballots"
|
table_nulls: "Invalid ballots"
|
||||||
|
table_total: "Total ballots"
|
||||||
table_answer: Answer
|
table_answer: Answer
|
||||||
table_votes: Votes
|
table_votes: Votes
|
||||||
booths:
|
booths:
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ en:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Participatory budgets icon
|
icon_alt: Participatory budgets icon
|
||||||
title: Participatory budgets
|
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
|
help: Help about participatory budgets
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Help about participatory budgets
|
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_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_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."
|
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."
|
||||||
|
|||||||
@@ -122,10 +122,10 @@ en:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Debates icon
|
icon_alt: Debates icon
|
||||||
title: Debates
|
title: Debates
|
||||||
description: Start a debate to share opinions with others about the topics you are concerned about.
|
|
||||||
help: Help about debates
|
help: Help about debates
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Help about debates
|
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_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_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."
|
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."
|
||||||
@@ -369,10 +369,10 @@ en:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Proposals icon
|
icon_alt: Proposals icon
|
||||||
title: Proposals
|
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
|
help: Help about proposals
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Help about proposals
|
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_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_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."
|
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."
|
||||||
@@ -433,6 +433,7 @@ en:
|
|||||||
embed_video_title: "Video on %{proposal}"
|
embed_video_title: "Video on %{proposal}"
|
||||||
title_external_url: "Additional documentation"
|
title_external_url: "Additional documentation"
|
||||||
title_video_url: "External video"
|
title_video_url: "External video"
|
||||||
|
author: Author
|
||||||
update:
|
update:
|
||||||
form:
|
form:
|
||||||
submit_button: Save changes
|
submit_button: Save changes
|
||||||
@@ -461,10 +462,10 @@ en:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Voting icon
|
icon_alt: Voting icon
|
||||||
title: Voting
|
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
|
help: Help about voting
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Help about voting
|
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_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."
|
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:
|
show:
|
||||||
|
|||||||
@@ -66,10 +66,10 @@ en:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Legislation processes icon
|
icon_alt: Legislation processes icon
|
||||||
title: Legislation processes
|
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
|
help: Help about legislation processes
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Help about legislation processes
|
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_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_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."
|
help_text_3: "The City Council also opens processes to receive contributions and opinions on municipal actions."
|
||||||
|
|||||||
@@ -9,31 +9,13 @@ en:
|
|||||||
info: Here you can validate user documents and store voting results
|
info: Here you can validate user documents and store voting results
|
||||||
menu:
|
menu:
|
||||||
voters: Validate document
|
voters: Validate document
|
||||||
final_recounts: Final recounts and results
|
total_recounts: Total recounts and results
|
||||||
polls:
|
polls:
|
||||||
final:
|
final:
|
||||||
title: Polls ready for final recounting
|
title: Polls ready for final recounting
|
||||||
no_polls: You are not officing final recounts in any active poll
|
no_polls: You are not officing final recounts in any active poll
|
||||||
select_poll: Select poll
|
select_poll: Select poll
|
||||||
add_recount: Add final recount
|
|
||||||
add_results: Add results
|
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:
|
results:
|
||||||
flash:
|
flash:
|
||||||
create: "Results saved"
|
create: "Results saved"
|
||||||
@@ -49,6 +31,7 @@ en:
|
|||||||
select_date: "Select date"
|
select_date: "Select date"
|
||||||
ballots_white: "Blank ballots"
|
ballots_white: "Blank ballots"
|
||||||
ballots_null: "Invalid ballots"
|
ballots_null: "Invalid ballots"
|
||||||
|
ballots_total: "Total ballots"
|
||||||
submit: "Save"
|
submit: "Save"
|
||||||
results_list: "Your results"
|
results_list: "Your results"
|
||||||
see_results: "See results"
|
see_results: "See results"
|
||||||
@@ -59,6 +42,7 @@ en:
|
|||||||
table_votes: Votes
|
table_votes: Votes
|
||||||
table_whites: "Blank ballots"
|
table_whites: "Blank ballots"
|
||||||
table_nulls: "Invalid ballots"
|
table_nulls: "Invalid ballots"
|
||||||
|
table_total: "Total ballots"
|
||||||
residence:
|
residence:
|
||||||
flash:
|
flash:
|
||||||
create: "Document verified with Census"
|
create: "Document verified with Census"
|
||||||
|
|||||||
@@ -504,8 +504,8 @@ es:
|
|||||||
booth: "Urna"
|
booth: "Urna"
|
||||||
assignments: "Turnos como presidente de mesa en esta votación"
|
assignments: "Turnos como presidente de mesa en esta votación"
|
||||||
no_assignments: "No tiene turnos como presidente de mesa en esta votación."
|
no_assignments: "No tiene turnos como presidente de mesa en esta votación."
|
||||||
final_recounts: "Recuentos finales"
|
total_recounts: "Recuentos totales"
|
||||||
final_recount: "Recuento final (presidente de mesa)"
|
total_recount: "Recuento total (presidente de mesa)"
|
||||||
poll_shifts:
|
poll_shifts:
|
||||||
new:
|
new:
|
||||||
add_shift: "Añadir turno"
|
add_shift: "Añadir turno"
|
||||||
@@ -541,7 +541,7 @@ es:
|
|||||||
recounts: "Recuentos"
|
recounts: "Recuentos"
|
||||||
recounts_list: "Lista de recuentos de esta urna"
|
recounts_list: "Lista de recuentos de esta urna"
|
||||||
date: "Fecha"
|
date: "Fecha"
|
||||||
count_final: "Recuento final (presidente de mesa)"
|
total_recount: "Recuento total (presidente de mesa)"
|
||||||
count_by_system: "Votos (automático)"
|
count_by_system: "Votos (automático)"
|
||||||
index:
|
index:
|
||||||
booths_title: "Listado de urnas asignadas"
|
booths_title: "Listado de urnas asignadas"
|
||||||
@@ -614,7 +614,7 @@ es:
|
|||||||
title: "Recuentos"
|
title: "Recuentos"
|
||||||
no_recounts: "No hay nada de lo que hacer recuento"
|
no_recounts: "No hay nada de lo que hacer recuento"
|
||||||
table_booth_name: "Urna"
|
table_booth_name: "Urna"
|
||||||
table_final_recount: "Recuento final (presidente de mesa)"
|
table_total_recount: "Recuento total (presidente de mesa)"
|
||||||
table_system_count: "Votos (automático)"
|
table_system_count: "Votos (automático)"
|
||||||
results:
|
results:
|
||||||
index:
|
index:
|
||||||
@@ -622,6 +622,7 @@ es:
|
|||||||
no_results: "No hay resultados"
|
no_results: "No hay resultados"
|
||||||
table_whites: Papeletas en blanco
|
table_whites: Papeletas en blanco
|
||||||
table_nulls: Papeletas nulas
|
table_nulls: Papeletas nulas
|
||||||
|
table_total: Papeletas totales
|
||||||
table_answer: Respuesta
|
table_answer: Respuesta
|
||||||
table_votes: Votos
|
table_votes: Votos
|
||||||
booths:
|
booths:
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ es:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Icono de Presupuestos participativos
|
icon_alt: Icono de Presupuestos participativos
|
||||||
title: 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
|
help: Ayuda sobre presupuestos participativos
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Ayuda sobre presupuestos participativos
|
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_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_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."
|
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."
|
||||||
|
|||||||
@@ -122,10 +122,10 @@ es:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Icono de Debates
|
icon_alt: Icono de Debates
|
||||||
title: 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
|
help: Ayuda sobre los debates
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Ayuda sobre los debates
|
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_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_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."
|
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."
|
||||||
@@ -369,10 +369,10 @@ es:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Icono de Propuestas
|
icon_alt: Icono de Propuestas
|
||||||
title: 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
|
help: Ayuda sobre las propuestas
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Ayuda sobre las propuestas
|
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_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_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."
|
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."
|
||||||
@@ -433,6 +433,7 @@ es:
|
|||||||
embed_video_title: "Vídeo en %{proposal}"
|
embed_video_title: "Vídeo en %{proposal}"
|
||||||
title_external_url: "Documentación adicional"
|
title_external_url: "Documentación adicional"
|
||||||
title_video_url: "Vídeo externo"
|
title_video_url: "Vídeo externo"
|
||||||
|
author: Autor
|
||||||
update:
|
update:
|
||||||
form:
|
form:
|
||||||
submit_button: Guardar cambios
|
submit_button: Guardar cambios
|
||||||
@@ -461,10 +462,10 @@ es:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Icono de Votaciones
|
icon_alt: Icono de Votaciones
|
||||||
title: 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
|
help: Ayuda sobre las votaciones
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Ayuda sobre las votaciones
|
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_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."
|
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:
|
show:
|
||||||
|
|||||||
@@ -66,10 +66,10 @@ es:
|
|||||||
section_header:
|
section_header:
|
||||||
icon_alt: Icono de Procesos legislativos
|
icon_alt: Icono de Procesos legislativos
|
||||||
title: 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
|
help: Ayuda sobre procesos legislativos
|
||||||
section_footer:
|
section_footer:
|
||||||
title: Ayuda sobre procesos legislativos
|
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_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_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."
|
help_text_3: "El Ayuntamiento también abre procesos para recibir aportaciones y opiniones sobre actuaciones municipales."
|
||||||
|
|||||||
@@ -9,30 +9,12 @@ es:
|
|||||||
info: Aquí puedes validar documentos de ciudadanos y guardar los resultados de las urnas
|
info: Aquí puedes validar documentos de ciudadanos y guardar los resultados de las urnas
|
||||||
menu:
|
menu:
|
||||||
voters: "Validar documento y votar"
|
voters: "Validar documento y votar"
|
||||||
final_recounts: "Recuento final y escrutinio"
|
total_recounts: "Recuento total y escrutinio"
|
||||||
polls:
|
polls:
|
||||||
final:
|
final:
|
||||||
title: "Listado de votaciones finalizadas"
|
title: "Listado de votaciones finalizadas"
|
||||||
no_polls: "No tienes permiso para recuento final en ninguna votación reciente"
|
no_polls: "No tienes permiso para recuento final en ninguna votación reciente"
|
||||||
select_poll: "Selecciona votación"
|
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"
|
add_results: "Añadir resultados"
|
||||||
results:
|
results:
|
||||||
flash:
|
flash:
|
||||||
@@ -49,6 +31,7 @@ es:
|
|||||||
select_date: "Elige día"
|
select_date: "Elige día"
|
||||||
ballots_white: "Papeletas en blanco"
|
ballots_white: "Papeletas en blanco"
|
||||||
ballots_null: "Papeletas nulas"
|
ballots_null: "Papeletas nulas"
|
||||||
|
ballots_total: "Papeletas totales"
|
||||||
submit: "Guardar"
|
submit: "Guardar"
|
||||||
results_list: "Tus resultados"
|
results_list: "Tus resultados"
|
||||||
see_results: "Ver resultados"
|
see_results: "Ver resultados"
|
||||||
@@ -59,6 +42,7 @@ es:
|
|||||||
table_votes: Votos
|
table_votes: Votos
|
||||||
table_whites: Papeletas en blanco
|
table_whites: Papeletas en blanco
|
||||||
table_nulls: Papeletas nulas
|
table_nulls: Papeletas nulas
|
||||||
|
table_total: Papeletas totales
|
||||||
residence:
|
residence:
|
||||||
flash:
|
flash:
|
||||||
create: "Documento verificado con el Padrón"
|
create: "Documento verificado con el Padrón"
|
||||||
|
|||||||
@@ -301,8 +301,8 @@ fr:
|
|||||||
no_assignments: "Cet utilisateur n'a pas d'affectation pour ce vote."
|
no_assignments: "Cet utilisateur n'a pas d'affectation pour ce vote."
|
||||||
recounts: "Dépouillement journalier"
|
recounts: "Dépouillement journalier"
|
||||||
recount: "Dépouillement journalier (par président)"
|
recount: "Dépouillement journalier (par président)"
|
||||||
final_recounts: "Dépouillement final"
|
total_recounts: "Dépouillement final"
|
||||||
final_recount: "Dépouillement final (par président)"
|
total_recount: "Dépouillement final (par président)"
|
||||||
poll_booth_assignments:
|
poll_booth_assignments:
|
||||||
flash:
|
flash:
|
||||||
destroy: "Ce bureau de vote n'est plus affecté"
|
destroy: "Ce bureau de vote n'est plus affecté"
|
||||||
@@ -319,7 +319,7 @@ fr:
|
|||||||
no_recounts: "Il n'y a pas encore de dépouillements journaliers pour ce bureau de vote."
|
no_recounts: "Il n'y a pas encore de dépouillements journaliers pour ce bureau de vote."
|
||||||
date: "Date"
|
date: "Date"
|
||||||
count_by_officer: "Dépouillement journalier (par président)"
|
count_by_officer: "Dépouillement journalier (par président)"
|
||||||
count_final: "Dépouillement final (par président)"
|
total_count: "Dépouillement final (par président)"
|
||||||
count_by_system: "Votes (automatique)"
|
count_by_system: "Votes (automatique)"
|
||||||
index:
|
index:
|
||||||
booths_title: "Liste des bureaux de vote"
|
booths_title: "Liste des bureaux de vote"
|
||||||
@@ -391,7 +391,7 @@ fr:
|
|||||||
no_recounts: "Il n'y a rien à dépouiller"
|
no_recounts: "Il n'y a rien à dépouiller"
|
||||||
table_booth_name: "Bureau de vote"
|
table_booth_name: "Bureau de vote"
|
||||||
table_recounts: "Accumulation des dépouillements journaliers (par président)"
|
table_recounts: "Accumulation des dépouillements journaliers (par président)"
|
||||||
table_final_recount: "Dépouillement final (par président)"
|
table_total_recount: "Dépouillement final (par président)"
|
||||||
table_system_count: "Votes (automatique)"
|
table_system_count: "Votes (automatique)"
|
||||||
results:
|
results:
|
||||||
index:
|
index:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ fr:
|
|||||||
menu:
|
menu:
|
||||||
voters: "Valider un document"
|
voters: "Valider un document"
|
||||||
recounts: "Enregistrer le dépouillement"
|
recounts: "Enregistrer le dépouillement"
|
||||||
final_recounts: "Dépouillements finaux et résultats"
|
total_recounts: "Dépouillements finaux et résultats"
|
||||||
polls:
|
polls:
|
||||||
index:
|
index:
|
||||||
title: "Liste des votes"
|
title: "Liste des votes"
|
||||||
@@ -38,23 +38,6 @@ fr:
|
|||||||
recount_list: "Vos dépouillements"
|
recount_list: "Vos dépouillements"
|
||||||
booth: "Urne"
|
booth: "Urne"
|
||||||
date: "Date"
|
date: "Date"
|
||||||
final_recounts:
|
|
||||||
flash:
|
|
||||||
create: "Données ajoutées"
|
|
||||||
error_create: "Décompte final NON ajouté. Erreur dans les données."
|
|
||||||
new:
|
|
||||||
title: "%{poll} - Ajouter le dépouillement final"
|
|
||||||
not_allowed: "Vous n'êtes pas autorisés à ajouter les dépouillements finaux pour ce vote"
|
|
||||||
booth: "Bureau de vote"
|
|
||||||
date: "Date"
|
|
||||||
select_booth: "Sélectionner un bureau de vote"
|
|
||||||
select_date: "Sélectionner une date"
|
|
||||||
count: "Décompte final des votes"
|
|
||||||
count_placeholder: "Décompte final des votes"
|
|
||||||
submit: "Sauvegarder"
|
|
||||||
final_recount_list: "Vos dépouillements finaux"
|
|
||||||
system_count: "Dépouillement par le système"
|
|
||||||
add_results: "Ajouter les résultats"
|
|
||||||
results:
|
results:
|
||||||
flash:
|
flash:
|
||||||
create: "Résultats sauvegardés"
|
create: "Résultats sauvegardés"
|
||||||
|
|||||||
@@ -301,8 +301,8 @@ nl:
|
|||||||
no_assignments: "This user has no officing shifts in this poll."
|
no_assignments: "This user has no officing shifts in this poll."
|
||||||
recounts: "Daily recounts"
|
recounts: "Daily recounts"
|
||||||
recount: "Daily recount (by officer)"
|
recount: "Daily recount (by officer)"
|
||||||
final_recounts: "Final recounts"
|
total_recounts: "Final recounts"
|
||||||
final_recount: "Final recount (by officer)"
|
total_recount: "Final recount (by officer)"
|
||||||
poll_booth_assignments:
|
poll_booth_assignments:
|
||||||
flash:
|
flash:
|
||||||
destroy: "Booth not assigned anymore"
|
destroy: "Booth not assigned anymore"
|
||||||
@@ -319,7 +319,7 @@ nl:
|
|||||||
no_recounts: "There are not daily recounts of this booth yet"
|
no_recounts: "There are not daily recounts of this booth yet"
|
||||||
date: "Date"
|
date: "Date"
|
||||||
count_by_officer: "Daily recount (by officer)"
|
count_by_officer: "Daily recount (by officer)"
|
||||||
count_final: "Final recount (by officer)"
|
total_count: "Final recount (by officer)"
|
||||||
count_by_system: "Votes (automatic)"
|
count_by_system: "Votes (automatic)"
|
||||||
index:
|
index:
|
||||||
booths_title: "List of booths"
|
booths_title: "List of booths"
|
||||||
@@ -391,7 +391,7 @@ nl:
|
|||||||
no_recounts: "There is nothing to be recounted"
|
no_recounts: "There is nothing to be recounted"
|
||||||
table_booth_name: "Booth"
|
table_booth_name: "Booth"
|
||||||
table_recounts: "Accumulated daily recounts (by officer)"
|
table_recounts: "Accumulated daily recounts (by officer)"
|
||||||
table_final_recount: "Final recount (by officer)"
|
table_total_recount: "Final recount (by officer)"
|
||||||
table_system_count: "Votes (automatic)"
|
table_system_count: "Votes (automatic)"
|
||||||
results:
|
results:
|
||||||
index:
|
index:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ nl:
|
|||||||
menu:
|
menu:
|
||||||
voters: Validate document
|
voters: Validate document
|
||||||
recounts: Store recount
|
recounts: Store recount
|
||||||
final_recounts: Final recounts and results
|
total_recounts: Total recounts and results
|
||||||
polls:
|
polls:
|
||||||
index:
|
index:
|
||||||
title: Poll list
|
title: Poll list
|
||||||
@@ -38,23 +38,6 @@ nl:
|
|||||||
recount_list: "Your recounts"
|
recount_list: "Your recounts"
|
||||||
booth: "Booth"
|
booth: "Booth"
|
||||||
date: "Date"
|
date: "Date"
|
||||||
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:
|
results:
|
||||||
flash:
|
flash:
|
||||||
create: "Results saved"
|
create: "Results saved"
|
||||||
|
|||||||
@@ -434,7 +434,6 @@ Rails.application.routes.draw do
|
|||||||
resources :polls, only: [:index] do
|
resources :polls, only: [:index] do
|
||||||
get :final, on: :collection
|
get :final, on: :collection
|
||||||
|
|
||||||
resources :final_recounts, only: [:new, :create]
|
|
||||||
resources :results, only: [:new, :create, :index]
|
resources :results, only: [:new, :create, :index]
|
||||||
end
|
end
|
||||||
resource :residence, controller: "residence", only: [:new, :create]
|
resource :residence, controller: "residence", only: [:new, :create]
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ poll_officer = create_user('poll_officer@consul.dev', 'Paul O. Fisher')
|
|||||||
poll_officer.create_poll_officer
|
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")
|
poll_officer.update(residence_verified_at: Time.current, confirmed_phone: Faker::PhoneNumber.phone_number, document_type: "1", verified_at: Time.current, document_number: "2211111111")
|
||||||
|
|
||||||
|
create_user('unverified@consul.dev', 'unverified')
|
||||||
|
|
||||||
level_2 = create_user('leveltwo@consul.dev', 'level 2')
|
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")
|
level_2.update(residence_verified_at: Time.current, confirmed_phone: Faker::PhoneNumber.phone_number, document_number: "2222222222", document_type: "1")
|
||||||
|
|
||||||
@@ -502,7 +504,7 @@ Proposal.last(3).each do |proposal|
|
|||||||
end
|
end
|
||||||
|
|
||||||
puts " ✅"
|
puts " ✅"
|
||||||
puts "Creating proposal notifications"
|
print "Creating proposal notifications"
|
||||||
|
|
||||||
100.times do |i|
|
100.times do |i|
|
||||||
ProposalNotification.create!(title: "Proposal notification title #{i}",
|
ProposalNotification.create!(title: "Proposal notification title #{i}",
|
||||||
@@ -585,7 +587,7 @@ print "Creating Poll Questions from Proposals"
|
|||||||
3.times do
|
3.times do
|
||||||
proposal = Proposal.reorder("RANDOM()").first
|
proposal = Proposal.reorder("RANDOM()").first
|
||||||
poll = Poll.current.first
|
poll = Poll.current.first
|
||||||
question = Poll::Question.create(valid_answers: "Yes, No")
|
question = Poll::Question.create(valid_answers: "Yes, No", poll: poll)
|
||||||
question.copy_attributes_from_proposal(proposal)
|
question.copy_attributes_from_proposal(proposal)
|
||||||
question.save!
|
question.save!
|
||||||
end
|
end
|
||||||
@@ -596,7 +598,7 @@ print "Creating Successful Proposals"
|
|||||||
10.times do
|
10.times do
|
||||||
proposal = Proposal.reorder("RANDOM()").first
|
proposal = Proposal.reorder("RANDOM()").first
|
||||||
poll = Poll.current.first
|
poll = Poll.current.first
|
||||||
question = Poll::Question.create(valid_answers: "Yes, No")
|
question = Poll::Question.create(valid_answers: "Yes, No", poll: poll)
|
||||||
question.copy_attributes_from_proposal(proposal)
|
question.copy_attributes_from_proposal(proposal)
|
||||||
question.save!
|
question.save!
|
||||||
end
|
end
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user