diff --git a/Gemfile b/Gemfile index d5a704569..6eb34093c 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'pg', '~> 0.19.0' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0', '>= 5.0.4' # Use Uglifier as compressor for JavaScript assets -gem 'uglifier', '>= 3.0.3' +gem 'uglifier', '>= 3.0.4' # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2.1' # See https://github.com/rails/execjs#readme for more supported runtimes @@ -52,7 +52,7 @@ gem 'rollbar', '~> 2.13.3' gem 'delayed_job_active_record', '~> 4.1.0' gem 'daemons' gem 'devise-async' -gem 'newrelic_rpm', '~> 3.17.0.325' +gem 'newrelic_rpm', '~> 3.17.1.326' gem 'whenever', require: false gem 'pg_search' gem 'sitemap_generator' diff --git a/Gemfile.lock b/Gemfile.lock index 836550667..fb6eeb62f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -68,7 +68,7 @@ GEM bcrypt (3.1.11) browser (2.3.0) builder (3.2.2) - bullet (5.2.0) + bullet (5.4.2) activesupport (>= 3.0.0) uniform_notifier (~> 1.10.0) byebug (9.0.6) @@ -112,12 +112,12 @@ GEM execjs coffee-script-source (1.10.0) concurrent-ruby (1.0.2) - coveralls (0.8.15) + coveralls (0.8.17) json (>= 1.8, < 3) simplecov (~> 0.12.0) term-ansicolor (~> 1.3) thor (~> 0.19.1) - tins (>= 1.6.0, < 2) + tins (~> 1.6) daemons (1.2.4) dalli (2.7.6) database_cleaner (1.5.3) @@ -171,8 +171,8 @@ GEM activesupport (>= 4.1) railties (>= 4.1) tzinfo (~> 1.2, >= 1.2.2) - fuubar (2.1.1) - rspec (~> 3.0) + fuubar (2.2.0) + rspec-core (~> 3.0) ruby-progressbar (~> 1.4) geocoder (1.4.0) globalid (0.3.7) @@ -187,7 +187,7 @@ GEM httpi (2.4.1) rack i18n (0.7.0) - i18n-tasks (0.9.5) + i18n-tasks (0.9.6) activesupport (>= 4.0.2) ast (>= 2.1.0) easy_translate (>= 0.5.0) @@ -213,7 +213,7 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.10.0) - knapsack (1.13.0) + knapsack (1.13.1) rake timecop (>= 0.1.0) launchy (2.4.3) @@ -232,14 +232,14 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_portile2 (2.1.0) - minitest (5.9.1) + minitest (5.10.1) multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (3.2.0) - newrelic_rpm (3.17.0.325) + newrelic_rpm (3.17.1.326) nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) nori (2.6.0) @@ -272,7 +272,7 @@ GEM orm_adapter (0.5.0) paranoia (2.2.0) activerecord (>= 4.0, < 5.1) - parser (2.3.1.4) + parser (2.3.3.1) ast (~> 2.2) pg (0.19.0) pg_search (1.0.6) @@ -320,7 +320,7 @@ GEM thor (>= 0.18.1, < 2.0) rainbow (2.1.0) raindrops (0.17.0) - rake (11.3.0) + rake (12.0.0) redcarpet (3.3.4) referer-parser (0.3.0) request_store (1.3.1) @@ -329,10 +329,6 @@ GEM rinku (2.0.2) rollbar (2.13.3) multi_json - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) rspec-core (3.5.4) rspec-support (~> 3.5.0) rspec-expectations (3.5.0) @@ -405,15 +401,16 @@ GEM sshkit (1.11.4) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - term-ansicolor (1.3.2) + term-ansicolor (1.4.0) tins (~> 1.0) - terminal-table (1.5.2) - thor (0.19.1) + terminal-table (1.7.3) + unicode-display_width (~> 1.1.1) + thor (0.19.4) thread (0.2.2) thread_safe (0.3.5) tilt (2.0.5) timecop (0.8.1) - tins (1.11.0) + tins (1.13.0) tolk (2.0.0) rails (>= 4.0) safe_yaml (>= 0.8.6) @@ -426,7 +423,7 @@ GEM tilt (>= 1.4, < 3) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (3.0.3) + uglifier (3.0.4) execjs (>= 0.3.0, < 3) unicode-display_width (1.1.1) unicorn (5.1.0) @@ -495,7 +492,7 @@ DEPENDENCIES knapsack launchy letter_opener_web (~> 1.3.0) - newrelic_rpm (~> 3.17.0.325) + newrelic_rpm (~> 3.17.1.326) omniauth omniauth-facebook (~> 3.0.0) omniauth-google-oauth2 (~> 0.4.0) @@ -524,7 +521,7 @@ DEPENDENCIES tolk (~> 2.0.0) turbolinks turnout (~> 2.4.0) - uglifier (>= 3.0.3) + uglifier (>= 3.0.4) unicorn (~> 5.1.0) web-console (= 3.3.0) whenever diff --git a/README.md b/README.md index 8c95f3648..c62fcfeec 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Citizen Participation and Open Government Application +[![Join the chat at https://gitter.im/consul/consul](https://badges.gitter.im/consul/consul.svg)](https://gitter.im/consul/consul?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/consul/consul.svg?branch=master)](https://travis-ci.org/consul/consul) [![Code Climate](https://codeclimate.com/github/consul/consul/badges/gpa.svg)](https://codeclimate.com/github/consul/consul) [![Dependency Status](https://gemnasium.com/consul/consul.svg)](https://gemnasium.com/consul/consul) diff --git a/README_ES.md b/README_ES.md index a18b7d241..1b197e983 100644 --- a/README_ES.md +++ b/README_ES.md @@ -5,6 +5,7 @@ Aplicación de Participación Ciudadana y Gobierno Abierto +[![Join the chat at https://gitter.im/consul/consul](https://badges.gitter.im/consul/consul.svg)](https://gitter.im/consul/consul?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/consul/consul.svg?branch=master)](https://travis-ci.org/consul/consul) [![Code Climate](https://codeclimate.com/github/consul/consul/badges/gpa.svg)](https://codeclimate.com/github/consul/consul) [![Dependency Status](https://gemnasium.com/consul/consul.svg)](https://gemnasium.com/consul/consul) diff --git a/app/assets/stylesheets/_settings.scss b/app/assets/stylesheets/_settings.scss index 4149020fa..3821f22c7 100644 --- a/app/assets/stylesheets/_settings.scss +++ b/app/assets/stylesheets/_settings.scss @@ -57,15 +57,15 @@ $brand: #004A83; $dark: darken($brand, 10%); $text: #222222; -$text-medium: #999999; -$text-light: #CCCCCC; +$text-medium: #515151; +$text-light: #BFBFBF; $border: #DEE0E3; -$link: #2895F1; +$link: $brand; $link-hover: darken($link, 20%); -$debates: #008CCF; +$debates: $brand; $like: #7BD2A8; $unlike: #EF8585; @@ -74,6 +74,7 @@ $delete: #F04124; $check: #46DB91; $proposals: #FFA42D; +$proposals-dark: #794500; $budget: #454372; $budget-hover: #7571BF; diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 4c447479f..8c4549ffd 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -56,6 +56,7 @@ a { } &:focus { + color: $link-hover; outline: 3px solid #ffbf47; } } @@ -258,6 +259,10 @@ a { margin: 0 $line-height/2; } +.pagination .current { + background: $brand; +} + // 02. Header // ---------- @@ -1160,7 +1165,7 @@ table { top: 0; } - &:hover { + &:hover, &:focus { background: white; color: #40A2D1; } @@ -1200,7 +1205,7 @@ table { top: 0; } - &:hover { + &:hover, &:focus { background: white; color: #354F88; } @@ -1240,7 +1245,7 @@ table { top: 0; } - &:hover { + &:hover, &:focus { background: white; color: #CE3E26; } @@ -1284,7 +1289,8 @@ table { top: 0; } - &:hover { + &:hover, &:focus { + background: white; color: #40A2D1; } } @@ -1307,7 +1313,8 @@ table { top: 0; } - &:hover { + &:hover, &:focus { + background: white; color: #354F88; } } @@ -1330,7 +1337,8 @@ table { top: 0; } - &:hover { + &:hover, &:focus { + background: white; color: #CE3E26; } } diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index c299d59cb..a5e1d7df2 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -528,7 +528,7 @@ } .label-proposal { - color: $proposals; + color: $proposals-dark; } .label-investment-project { @@ -566,7 +566,7 @@ } .icon-proposals { - color: $proposals; + color: $proposals-dark; } .icon-budget { diff --git a/app/models/user.rb b/app/models/user.rb index 3ca79cedf..03f2db27b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -163,7 +163,6 @@ class User < ActiveRecord::Base username: nil, email: nil, unconfirmed_email: nil, - document_number: nil, phone_number: nil, encrypted_password: "", confirmation_token: nil, diff --git a/app/models/verification/management/document.rb b/app/models/verification/management/document.rb index f01c132bb..17ea065bd 100644 --- a/app/models/verification/management/document.rb +++ b/app/models/verification/management/document.rb @@ -10,7 +10,7 @@ class Verification::Management::Document delegate :username, :email, to: :user, allow_nil: true def user - @user = User.by_document(document_type, document_number).first + @user = User.active.by_document(document_type, document_number).first end def user? diff --git a/app/views/debates/_debate.html.erb b/app/views/debates/_debate.html.erb index fdb975c79..d084a0241 100644 --- a/app/views/debates/_debate.html.erb +++ b/app/views/debates/_debate.html.erb @@ -41,7 +41,7 @@

- <%= link_to debate.description, debate %> + <%= debate.description %>
<%= render "shared/tags", taggable: debate, limit: 5 %> diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb index cc59a3f3a..9bc3ca555 100644 --- a/app/views/debates/_votes.html.erb +++ b/app/views/debates/_votes.html.erb @@ -1,23 +1,41 @@ <% voted_classes = css_classes_for_vote(@debate_votes, debate) %>
- <%= link_to vote_debate_path(debate, value: 'yes'), - class: "like #{voted_classes[:in_favor]}", title: t('votes.agree'), method: "post", remote: true do %> - - <%= t('votes.agree') %> - - <%= votes_percentage('likes', debate) %> + <% if user_signed_in? %> + <%= link_to vote_debate_path(debate, value: 'yes'), + class: "like #{voted_classes[:in_favor]}", title: t('votes.agree'), method: "post", remote: true do %> + + <%= t('votes.agree') %> + + <%= votes_percentage('likes', debate) %> + <% end %> + <% else %> + <% end %>
- <%= link_to vote_debate_path(debate, value: 'no'), class: "unlike #{voted_classes[:against]}", title: t('votes.disagree'), method: "post", remote: true do %> - - <%= t('votes.disagree') %> - - <%= votes_percentage('dislikes', debate) %> + <% if user_signed_in? %> + <%= link_to vote_debate_path(debate, value: 'no'), class: "unlike #{voted_classes[:against]}", title: t('votes.disagree'), method: "post", remote: true do %> + + <%= t('votes.disagree') %> + + <%= votes_percentage('dislikes', debate) %> + <% end %> + <% else %> +
+ + <%= t('votes.disagree') %> + + <%= votes_percentage('dislikes', debate) %> +
<% end %>
@@ -39,10 +57,12 @@

<% elsif !user_signed_in? %> - diff --git a/app/views/kaminari/_paginator.html.erb b/app/views/kaminari/_paginator.html.erb index ee5371ce5..de9e89c93 100644 --- a/app/views/kaminari/_paginator.html.erb +++ b/app/views/kaminari/_paginator.html.erb @@ -1,22 +1,19 @@ <%= paginator.render do -%>
- + <%= next_page_tag unless current_page.last? %> + <%= last_page_tag unless current_page.last? %> +
<% end -%> diff --git a/app/views/pages/accessibility.html.erb b/app/views/pages/accessibility.html.erb index 8d8d6a34d..a2c2eff30 100644 --- a/app/views/pages/accessibility.html.erb +++ b/app/views/pages/accessibility.html.erb @@ -40,7 +40,7 @@ S - Presupuestos ciudadanos + Presupuestos participativos I diff --git a/app/views/pages/spending_proposals_info.html.erb b/app/views/pages/spending_proposals_info.html.erb index 60e947343..41332bb96 100644 --- a/app/views/pages/spending_proposals_info.html.erb +++ b/app/views/pages/spending_proposals_info.html.erb @@ -8,8 +8,8 @@
-

¿Cómo funcionan los presupuestos ciudadanos?

+

¿Cómo funcionan los Presupuestos participativos?

Explicación detallada del proceso

-

Próximamente se podrá encontrar aquí una descripción del proceso de participación ciudadana en los presupuestos.

+

Descripción del proceso de participación ciudadana en los presupuestos.

diff --git a/app/views/proposal_ballots/index.html.erb b/app/views/proposal_ballots/index.html.erb index e05f8514a..fe5bdef70 100644 --- a/app/views/proposal_ballots/index.html.erb +++ b/app/views/proposal_ballots/index.html.erb @@ -1,3 +1,4 @@ +<% provide :title do %><%= t("proposal_ballots.title") %><% end %>
diff --git a/app/views/proposals/_proposal.html.erb b/app/views/proposals/_proposal.html.erb index dc37934d5..69bf8d164 100644 --- a/app/views/proposals/_proposal.html.erb +++ b/app/views/proposals/_proposal.html.erb @@ -44,7 +44,7 @@ <% end %>

-

<%= link_to proposal.summary, namespaced_proposal_path(proposal) %>

+

<%= proposal.summary %>

<% end %> @@ -53,20 +53,22 @@
-
- <% if proposal.successfull? %> + <% if proposal.successfull? %> +

<%= t("proposal_ballots.successfull", voting: link_to(t("proposal_ballots.voting"), proposal_ballots_path)).html_safe %>

- <% elsif proposal.archived? %> +
+ <% elsif proposal.archived? %> +
<%= t("proposals.proposal.supports", count: proposal.total_votes) %>

<%= t("proposals.proposal.archived") %>

- <% else %> - <%= render 'votes', - { proposal: proposal, vote_url: vote_proposal_path(proposal, value: 'yes') } %> - <% end %> -
+
+ <% else %> + <%= render 'votes', + { proposal: proposal, vote_url: vote_proposal_path(proposal, value: 'yes') } %> + <% end %>
diff --git a/app/views/proposals/_votes.html.erb b/app/views/proposals/_votes.html.erb index 4c2a348ca..fb41357af 100644 --- a/app/views/proposals/_votes.html.erb +++ b/app/views/proposals/_votes.html.erb @@ -1,56 +1,66 @@ -
- - - <%= supports_percentage(proposal) %> / <%= t("proposals.proposal.total_percent") %> - -
+
+
+ + + <%= supports_percentage(proposal) %> / <%= t("proposals.proposal.total_percent") %> + +
- - <%= t("proposals.proposal.supports", count: proposal.total_votes) %>  - - "> - <%= t("proposals.proposal.supports_necessary", number: number_with_delimiter(Proposal.votes_needed_for_success)) %> - + + <%= t("proposals.proposal.supports", count: proposal.total_votes) %>  + + "> + <%= t("proposals.proposal.supports_necessary", number: number_with_delimiter(Proposal.votes_needed_for_success)) %> + + - -
- <% if voted_for?(@proposal_votes, proposal) %> -
- <%= t("proposals.proposal.already_supported") %> -
- <% else %> - <%= link_to vote_url, - class: "button button-support small expanded", - title: t('proposals.proposal.support_title'), method: "post", remote: true do %> - <%= t("proposals.proposal.support") %> +
+ <% if voted_for?(@proposal_votes, proposal) %> +
+ <%= t("proposals.proposal.already_supported") %> +
+ <% elsif user_signed_in? && proposal.votable_by?(current_user) %> + <%= link_to vote_url, + class: "button button-support small expanded", + title: t('proposals.proposal.support_title'), method: "post", remote: true do %> + <%= t("proposals.proposal.support") %> + <% end %> + <% else %> +
+ <%= t("proposals.proposal.support") %> +
<% end %> +
+ + <% if user_signed_in? && current_user.organization? %> + + <% elsif user_signed_in? && !proposal.votable_by?(current_user) %> +
+ +
+ <% elsif !user_signed_in? %> +
+ +
+ <% end %> + + <% if voted_for?(@proposal_votes, proposal) && setting['twitter_handle'] %> + <% end %>
- -<% if user_signed_in? && current_user.organization? %> - -<% elsif user_signed_in? && !proposal.votable_by?(current_user)%> - -<% elsif !user_signed_in? %> - -<% end %> - -<% if voted_for?(@proposal_votes, proposal) && setting['twitter_handle'] %> - -<% end %> diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index 920565d11..ba6cb677f 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -102,17 +102,21 @@