From 8e2e5d806c646b211fb9f6aa606135543e6e24b2 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 8 Mar 2016 21:20:01 +0100 Subject: [PATCH 1/6] Changes the style of disabled inputs so they are visible --- app/assets/stylesheets/_settings.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/_settings.scss b/app/assets/stylesheets/_settings.scss index 2eacc202118..aa9eef1f9d1 100644 --- a/app/assets/stylesheets/_settings.scss +++ b/app/assets/stylesheets/_settings.scss @@ -240,7 +240,7 @@ $button-sizes: ( default: 0.9rem, large: 1.25rem, ); -$button-opacity-disabled: 0.25; +$button-opacity-disabled: 1; // 12. Button Group // ---------------- @@ -339,12 +339,12 @@ $input-font-family: inherit; $input-font-size: rem-calc(16); $input-background: $white; $input-background-focus: $white; -$input-background-disabled: $light-gray; +$input-background-disabled: $medium-gray; $input-border: 1px solid $medium-gray; $input-border-focus: 1px solid $dark-gray; $input-shadow: inset 0 1px 2px rgba($black, 0.1); $input-shadow-focus: 0 0 5px $medium-gray; -$input-cursor-disabled: default; +$input-cursor-disabled: not-allowed; $input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out; $input-number-spinners: true; $input-radius: $global-radius; From 97d8c9026ffda65a132e0c5ab5ba2e36a0d5ed08 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 8 Mar 2016 21:20:37 +0100 Subject: [PATCH 2/6] Disables write routes for encuesta_plaza_espana --- config/routes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 383a25dac09..683ae8ac13c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -256,12 +256,12 @@ resources :open_answers, only: [:show, :index] do member do - post :vote + # post :vote end end get "encuesta-plaza-espana", to: "survey_answers#new", as: :encuesta_plaza_espana - post "encuesta-plaza-espana/gracias", to: "survey_answers#create", as: :encuesta_plaza_espana_gracias + # post "encuesta-plaza-espana/gracias", to: "survey_answers#create", as: :encuesta_plaza_espana_gracias get "encuesta-plaza-espana/respuestas", to: "open_answers#index", as: :encuesta_plaza_espana_respuestas get "encuesta-plaza-espana/respuesta/:id", to: "open_answers#show", as: :encuesta_plaza_espana_respuesta From 877ff4d4e9a15fce56f5cbcf2f1277e1d65aa2a9 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 8 Mar 2016 21:21:00 +0100 Subject: [PATCH 3/6] disable the specs for encuesta_plaza_espana --- spec/features/spain_square_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/spain_square_spec.rb b/spec/features/spain_square_spec.rb index 4085af55e70..3e47bd7aa53 100644 --- a/spec/features/spain_square_spec.rb +++ b/spec/features/spain_square_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -feature 'Spain square' do +xfeature 'Spain square' do context "Fill out survey" do From 5c7477079942e1b2c325727bcc4111aef4c6d274 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 8 Mar 2016 21:31:20 +0100 Subject: [PATCH 4/6] Deactivates write permissions for surveys --- app/models/abilities/common.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/abilities/common.rb b/app/models/abilities/common.rb index 6cab024e2cb..9837963fb7a 100644 --- a/app/models/abilities/common.rb +++ b/app/models/abilities/common.rb @@ -25,7 +25,7 @@ def initialize(user) can :suggest, Debate can :suggest, Proposal - + can [:flag, :unflag], Comment cannot [:flag, :unflag], Comment, user_id: user.id @@ -46,11 +46,11 @@ def initialize(user) can :create, SpendingProposal can :read, SurveyAnswer - can :create, SurveyAnswer - can :vote, SurveyAnswer + # can :create, SurveyAnswer + # can :vote, SurveyAnswer can :read, OpenAnswer - can :vote, OpenAnswer + # can :vote, OpenAnswer end can :create, Annotation From da9c379e6dd251fb107cb1416cc808458a498e47 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 8 Mar 2016 21:32:59 +0100 Subject: [PATCH 5/6] Changes copy text of surveys --- app/views/pages/processes_plaza_espana.html.erb | 2 +- app/views/survey_answers/new.html.erb | 17 +++++------------ config/locales/pages.en.yml | 2 +- config/locales/pages.es.yml | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/app/views/pages/processes_plaza_espana.html.erb b/app/views/pages/processes_plaza_espana.html.erb index a96e36048c9..4d634b9335c 100644 --- a/app/views/pages/processes_plaza_espana.html.erb +++ b/app/views/pages/processes_plaza_espana.html.erb @@ -14,7 +14,7 @@

<%= t("pages.processes.process_2.title") %>

<%= markdown t("pages.processes.process_2.text") %> -

Lo que se decida mayoritariamente definirá de manera vinculante las bases del concurso de remodelación de la plaza.

+

La encuesta ha finalizado. Próximamente publicaremos los resultados, que definirán de manera vinculante las bases del concurso de remodelación de la plaza.

<%= link_to t("pages.processes.process_2.button"), encuesta_plaza_espana_path, class: "button expanded" %>
diff --git a/app/views/survey_answers/new.html.erb b/app/views/survey_answers/new.html.erb index 22bcc29d10f..3e4bfe43708 100644 --- a/app/views/survey_answers/new.html.erb +++ b/app/views/survey_answers/new.html.erb @@ -12,8 +12,8 @@ <% end %>

<%= t("pages.processes.process_2.title") %>

-

Contesta las preguntas que quieras (no tienen por qué ser todas) y pulsa "Enviar respuesta"

-

Puedes ver toda la información relacionada con el proceso, y mucha información útil para responder lo mejor posible a las siguientes preguntas.

+

La encuesta ha finalizado. Próximamente publicaremos los resultados. Entretanto, más abajo puedes leer las preguntas que se realizaron en la encuesta.

+

Puedes ver toda la información relacionada con el proceso, y mucha información útil sobre las preguntas del cuestionario.

¡Comparte esta encuesta!

@@ -26,19 +26,12 @@
- <%= form_tag encuesta_plaza_espana_gracias_path, class: "js-enter-disabled" %> + <%= form_tag class: "js-enter-disabled" %>

1a. ¿Crees necesario reformar la Plaza de España?

- +
diff --git a/config/locales/pages.en.yml b/config/locales/pages.en.yml index 166b61e0134..66d17f42c50 100755 --- a/config/locales/pages.en.yml +++ b/config/locales/pages.en.yml @@ -93,7 +93,7 @@ en: process_2: title: Remodeling of the Plaza de España text: We count on you for filling out a short survey decide how you want it this new space in your city. - button: Decides! + button: View survey titles: accessibility: Accessibility conditions: Terms of use diff --git a/config/locales/pages.es.yml b/config/locales/pages.es.yml index e166983fc5f..b4c3c27fb25 100644 --- a/config/locales/pages.es.yml +++ b/config/locales/pages.es.yml @@ -93,7 +93,7 @@ es: process_2: title: Remodelación de Plaza España text: Contamos contigo para que decidas cómo debe ser este nuevo espacio en tu ciudad. - button: Decide + button: Ver las preguntas de la encuesta titles: accessibility: Accesibilidad conditions: Condiciones de uso From 5561e3e0a9c7f70851f22577e0e6ec7057354e82 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 8 Mar 2016 21:46:03 +0100 Subject: [PATCH 6/6] replaces comments by their equivalent semantics --- app/models/abilities/common.rb | 3 --- config/routes.rb | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/models/abilities/common.rb b/app/models/abilities/common.rb index 9837963fb7a..aad9957a419 100644 --- a/app/models/abilities/common.rb +++ b/app/models/abilities/common.rb @@ -46,11 +46,8 @@ def initialize(user) can :create, SpendingProposal can :read, SurveyAnswer - # can :create, SurveyAnswer - # can :vote, SurveyAnswer can :read, OpenAnswer - # can :vote, OpenAnswer end can :create, Annotation diff --git a/config/routes.rb b/config/routes.rb index 683ae8ac13c..d93c6d75af7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -254,14 +254,9 @@ resources :survey_answers, only: [:new, :create] - resources :open_answers, only: [:show, :index] do - member do - # post :vote - end - end + resources :open_answers, only: [:show, :index] get "encuesta-plaza-espana", to: "survey_answers#new", as: :encuesta_plaza_espana - # post "encuesta-plaza-espana/gracias", to: "survey_answers#create", as: :encuesta_plaza_espana_gracias get "encuesta-plaza-espana/respuestas", to: "open_answers#index", as: :encuesta_plaza_espana_respuestas get "encuesta-plaza-espana/respuesta/:id", to: "open_answers#show", as: :encuesta_plaza_espana_respuesta