diff --git a/Gemfile b/Gemfile
index d4153dc0f..4559c4f57 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,26 +3,27 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.7.1'
# Use PostgreSQL
-gem 'pg'
+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', '>= 1.3.0'
+gem 'uglifier', '>= 3.0.3'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2.1'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
-gem 'jquery-rails'
+gem 'jquery-rails', '~> 4.2.1'
gem 'jquery-ui-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Fix sprockets on the
-gem 'sprockets', '~> 3.6.3'
+gem 'sprockets', '~> 3.7.0'
gem 'devise', '~> 3.5.7'
+gem 'devise_security_extension'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'omniauth'
@@ -31,11 +32,11 @@ gem 'omniauth-facebook', '~> 3.0.0'
gem 'omniauth-google-oauth2', '~> 0.4.0'
gem 'kaminari'
-gem 'ancestry'
+gem 'ancestry', '~> 2.2.1'
gem 'acts-as-taggable-on'
-gem 'responders'
-gem 'foundation-rails'
-gem 'foundation_rails_helper'
+gem 'responders', '~> 2.3.0'
+gem 'foundation-rails', '~> 6.2.4.0'
+gem 'foundation_rails_helper', '~> 2.0.0'
gem 'acts_as_votable'
gem 'ckeditor', '~> 4.2.0'
gem 'invisible_captcha', '~> 0.9.1'
@@ -43,24 +44,24 @@ gem 'cancancan'
gem 'social-share-button'
gem 'initialjs-rails', '0.2.0.4'
gem 'unicorn', '~> 5.1.0'
-gem 'paranoia'
-gem 'rinku', require: 'rails_rinku'
+gem 'paranoia', '~> 2.2.0'
+gem 'rinku', '~> 2.0.2', require: 'rails_rinku'
gem 'savon'
gem 'dalli'
-gem 'rollbar', '~> 2.12.0'
+gem 'rollbar', '~> 2.13.3'
gem 'delayed_job_active_record', '~> 4.1.0'
gem 'daemons'
gem 'devise-async'
-gem 'newrelic_rpm', '~> 3.16'
+gem 'newrelic_rpm', '~> 3.17.0.325'
gem 'whenever', require: false
gem 'pg_search'
-gem 'ahoy_matey', '~> 1.4.0'
-gem 'groupdate' # group temporary data
-gem 'tolk' # Web interface for translations
+gem 'ahoy_matey', '~> 1.4.2'
+gem 'groupdate', '~> 3.1.0' # group temporary data
+gem 'tolk', '~> 2.0.0' # Web interface for translations
gem 'browser'
-gem 'turnout'
+gem 'turnout', '~> 2.4.0'
gem 'redcarpet'
gem 'graphql'
diff --git a/Gemfile.lock b/Gemfile.lock
index b36245a4d..b872cf8f5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -56,7 +56,7 @@ GEM
akami (1.3.1)
gyoku (>= 0.4.0)
nokogiri
- ancestry (2.1.0)
+ ancestry (2.2.1)
activerecord (>= 3.0.0)
arel (6.0.3)
ast (2.2.0)
@@ -138,6 +138,9 @@ GEM
warden (~> 1.2.3)
devise-async (0.10.2)
devise (>= 3.2, < 4.0)
+ devise_security_extension (0.10.0)
+ devise (>= 3.0.0, < 4.0)
+ railties (>= 3.2.6, < 5.0)
diff-lcs (1.2.5)
docile (1.1.5)
easy_translate (0.5.0)
@@ -160,11 +163,11 @@ GEM
i18n (~> 0.5)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
- foundation-rails (6.2.3.0)
+ foundation-rails (6.2.4.0)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
sprockets-es6 (>= 0.9.0)
- foundation_rails_helper (1.2.1)
+ foundation_rails_helper (2.0.0)
actionpack (>= 4.1)
activemodel (>= 4.1)
activesupport (>= 4.1)
@@ -173,13 +176,13 @@ GEM
fuubar (2.1.1)
rspec (~> 3.0)
ruby-progressbar (~> 1.4)
- geocoder (1.3.7)
+ geocoder (1.4.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
graphiql-rails (1.3.0)
rails
graphql (0.18.11)
- groupdate (3.0.2)
+ groupdate (3.1.1)
activesupport (>= 3)
gyoku (1.3.1)
builder (>= 2.1.2)
@@ -203,7 +206,7 @@ GEM
railties (>= 3.1, < 6.0)
invisible_captcha (0.9.1)
rails
- jquery-rails (4.1.1)
+ jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
@@ -238,10 +241,9 @@ GEM
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.2.0)
- newrelic_rpm (3.16.3.323)
- nokogiri (1.6.8)
+ newrelic_rpm (3.17.0.325)
+ nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
- pkg-config (~> 1.1.7)
nori (2.6.0)
oauth (0.5.0)
oauth2 (1.0.0)
@@ -270,16 +272,15 @@ GEM
json (~> 1.3)
omniauth-oauth (~> 1.1)
orm_adapter (0.5.0)
- paranoia (2.1.5)
- activerecord (~> 4.0)
+ paranoia (2.2.0)
+ activerecord (>= 4.0, < 5.1)
parser (2.3.0.6)
ast (~> 2.2)
- pg (0.18.4)
+ pg (0.19.0)
pg_search (1.0.6)
activerecord (>= 3.1)
activesupport (>= 3.1)
arel
- pkg-config (1.1.7)
poltergeist (1.10.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
@@ -289,7 +290,7 @@ GEM
rack (1.6.4)
rack-accept (0.4.5)
rack (>= 0.4)
- rack-attack (4.4.1)
+ rack-attack (5.0.1)
rack
rack-test (0.6.3)
rack (>= 1.0)
@@ -322,10 +323,10 @@ GEM
redcarpet (3.3.4)
referer-parser (0.3.0)
request_store (1.3.1)
- responders (2.2.0)
+ responders (2.3.0)
railties (>= 4.2.0, < 5.1)
- rinku (2.0.0)
- rollbar (2.12.0)
+ rinku (2.0.2)
+ rollbar (2.13.3)
multi_json
rspec (3.5.0)
rspec-core (~> 3.5.0)
@@ -378,14 +379,14 @@ GEM
spring (1.7.2)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
- sprockets (3.6.3)
+ sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
- sprockets-es6 (0.9.0)
+ sprockets-es6 (0.9.2)
babel-source (>= 5.8.11)
babel-transpiler
sprockets (>= 3.0.0)
- sprockets-rails (3.1.1)
+ sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
@@ -400,18 +401,19 @@ GEM
thread_safe (0.3.5)
tilt (2.0.5)
tins (1.11.0)
- tolk (1.9.3)
- rails (>= 4.0, < 4.3)
+ tolk (2.0.0)
+ rails (>= 4.0)
safe_yaml (>= 0.8.6)
turbolinks (2.5.3)
coffee-rails
- turnout (2.3.1)
- rack (~> 1.3)
+ turnout (2.4.0)
+ i18n (~> 0.7)
+ rack (>= 1.3, < 3)
rack-accept (~> 0.4)
tilt (>= 1.4, < 3)
tzinfo (1.2.2)
thread_safe (~> 0.1)
- uglifier (3.0.2)
+ uglifier (3.0.3)
execjs (>= 0.3.0, < 3)
unicorn (5.1.0)
kgio (~> 2.6)
@@ -442,8 +444,8 @@ PLATFORMS
DEPENDENCIES
acts-as-taggable-on
acts_as_votable
- ahoy_matey (~> 1.4.0)
- ancestry
+ ahoy_matey (~> 1.4.2)
+ ancestry (~> 2.2.1)
browser
bullet
byebug
@@ -463,49 +465,50 @@ DEPENDENCIES
delayed_job_active_record (~> 4.1.0)
devise (~> 3.5.7)
devise-async
+ devise_security_extension
email_spec
factory_girl_rails
faker
- foundation-rails
- foundation_rails_helper
+ foundation-rails (~> 6.2.4.0)
+ foundation_rails_helper (~> 2.0.0)
fuubar
graphiql-rails
graphql
- groupdate
+ groupdate (~> 3.1.0)
i18n-tasks
initialjs-rails (= 0.2.0.4)
invisible_captcha (~> 0.9.1)
- jquery-rails
+ jquery-rails (~> 4.2.1)
jquery-ui-rails
kaminari
launchy
letter_opener_web (~> 1.3.0)
- newrelic_rpm (~> 3.16)
+ newrelic_rpm (~> 3.17.0.325)
omniauth
omniauth-facebook (~> 3.0.0)
omniauth-google-oauth2 (~> 0.4.0)
omniauth-twitter
- paranoia
- pg
+ paranoia (~> 2.2.0)
+ pg (~> 0.19.0)
pg_search
poltergeist
quiet_assets
rails (= 4.2.7.1)
redcarpet
- responders
- rinku
- rollbar (~> 2.12.0)
+ responders (~> 2.3.0)
+ rinku (~> 2.0.2)
+ rollbar (~> 2.13.3)
rspec-rails (~> 3.5)
sass-rails (~> 5.0, >= 5.0.4)
savon
social-share-button
spring
spring-commands-rspec
- sprockets (~> 3.6.3)
- tolk
+ sprockets (~> 3.7.0)
+ tolk (~> 2.0.0)
turbolinks
- turnout
- uglifier (>= 1.3.0)
+ turnout (~> 2.4.0)
+ uglifier (>= 3.0.3)
unicorn (~> 5.1.0)
web-console (= 3.3.0)
whenever
diff --git a/README.md b/README.md
index 2690b84a7..b6c10b878 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,6 @@ cd consul
bundle install
cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.yml
-rake db:create
bin/rake db:setup
bin/rake db:dev_seed
RAILS_ENV=test rake db:setup
diff --git a/README_ES.md b/README_ES.md
index 6051f1343..6f0f413ec 100644
--- a/README_ES.md
+++ b/README_ES.md
@@ -34,7 +34,6 @@ cd consul
bundle install
cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.yml
-rake db:create
bin/rake db:setup
bin/rake db:dev_seed
RAILS_ENV=test rake db:setup
diff --git a/app/assets/javascripts/votes.js.coffee b/app/assets/javascripts/votes.js.coffee
index 030b9cf46..b842c3ffc 100644
--- a/app/assets/javascripts/votes.js.coffee
+++ b/app/assets/javascripts/votes.js.coffee
@@ -3,17 +3,11 @@ App.Votes =
hoverize: (votes) ->
$(document).on {
'mouseenter focus': ->
- $("div.anonymous-votes", this).show();
- $("div.organizations-votes", this).show();
- $("div.not-logged", this).show();
- $("div.no-supports-allowed", this).show();
- $("div.logged", this).hide();
+ $("div.participation-not-allowed", this).show();
+ $("div.participation-allowed", this).hide();
mouseleave: ->
- $("div.anonymous-votes", this).hide();
- $("div.organizations-votes", this).hide();
- $("div.not-logged", this).hide();
- $("div.no-supports-allowed", this).hide();
- $("div.logged", this).show();
+ $("div.participation-not-allowed", this).hide();
+ $("div.participation-allowed", this).show();
}, votes
initialize: ->
diff --git a/app/assets/stylesheets/_settings.scss b/app/assets/stylesheets/_settings.scss
index 44433938b..242a03b82 100644
--- a/app/assets/stylesheets/_settings.scss
+++ b/app/assets/stylesheets/_settings.scss
@@ -48,37 +48,32 @@
// --------------------
$base-font-size: rem-calc(17);
-$base-line-height: rem-calc(26);
+$base-line: rem-calc(26);
$small-font-size: rem-calc(14);
$line-height: rem-calc(24);
$brand: #004A83;
-$body: #E9E9E9;
-$background: #EDEFF0;
-$border: #DEE0E3;
$dark: darken($brand, 10%);
$text: #222222;
$text-medium: #999999;
$text-light: #CCCCCC;
+$border: #DEE0E3;
+
$link: #2895F1;
-$link-hover: #2178BF;
+$link-hover: darken($link, 20%);
$debates: #008CCF;
-$votes-bg: #26AEEE;
-$votes-border: #1F94CB;
-$votes-like: #7BD2A8;
-$votes-like-act: #5D9E7F;
-$votes-unlike: #EF8585;
-$votes-unlike-act: #BD6A6A;
+$votes: #26AEEE;
+$like: #7BD2A8;
+$unlike: #EF8585;
$delete: #F04124;
$check: #46DB91;
$proposals: #FFA42D;
-$proposals-border: #CC8425;
$budget: #454372;
$budget-hover: #7571BF;
@@ -86,9 +81,6 @@ $budget-hover: #7571BF;
$highlight: #E7F2FC;
$featured: #FED900;
-$footer-bg: #DEE0E2;
-$footer-color: #171819;
-$footer-link: #454A4C;
$footer-border: #BFC1C3;
$success-bg: #DFF0D8;
diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss
index cd8241fca..4968983f0 100644
--- a/app/assets/stylesheets/admin.scss
+++ b/app/assets/stylesheets/admin.scss
@@ -82,7 +82,7 @@ body.admin {
.admin-content {
- .proposal-new, .proposal-edit {
+ .proposal-form {
padding-top: 0;
}
diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss
index b99f0300a..c3dded973 100644
--- a/app/assets/stylesheets/layout.scss
+++ b/app/assets/stylesheets/layout.scss
@@ -23,6 +23,11 @@
// 01. Global styles
// -----------------
+::selection {
+ color: white;
+ background-color: $brand;
+}
+
body {
font-size: $base-font-size;
}
@@ -35,7 +40,7 @@ h1, h2, h3, h4, h5, h6 {
p {
font-size: $base-font-size;
font-weight: 400;
- line-height: $base-line-height;
+ line-height: $base-line;
}
a {
@@ -148,10 +153,6 @@ a {
height: 100%;
}
-.wrap {
- background: white;
-}
-
.footer, .push {
clear: both;
min-height: $line-height*12;
@@ -486,7 +487,7 @@ header {
// ----------
footer {
- color: $footer-color;
+ color: $text;
.logo a {
font-family: 'Lato' !important;
@@ -506,10 +507,11 @@ footer {
}
a, a:active, a:focus {
- color: $footer-link;
+ color: $text;
+ text-decoration: underline;
&:hover {
- color: $footer-color;
+ color: $text-medium;
}
}
@@ -518,7 +520,7 @@ footer {
}
h2 a {
- border-bottom: 1px solid $footer-border;
+ border-bottom: 1px solid $text-light;
display: block;
font-size: rem-calc(24);
line-height: rem-calc(31);
@@ -528,14 +530,14 @@ footer {
}
.footer {
- background: $footer-bg;
+ background: $border;
border-top: 6px solid $brand;
margin-top: $line-height*2;
padding-top: $line-height;
}
.subfooter {
- border-top: 1px solid $footer-border;
+ border-top: 1px solid $text-light;
padding-top: $line-height/2;
}
@@ -562,8 +564,8 @@ footer {
color: $link;
&:hover {
- background: $highlight;
- color: $link-hover;
+ background: $brand;
+ color: white;
}
}
@@ -732,6 +734,56 @@ form {
// 07. Callout
// -----------
+.callout-slide {
+ animation-duration: 1s;
+ -webkit-animation-duration: 1s;
+ animation-fill-mode: both;
+ -webkit-animation-fill-mode: both;
+ animation-name: slide;
+ -webkit-animation-name: slide;
+}
+
+@-webkit-keyframes slide {
+ from {
+ -webkit-transform: translate3d(100%, 0, 0);
+ transform: translate3d(100%, 0, 0);
+ visibility: visible;
+ }
+
+ to {
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+ }
+}
+
+@keyframes slide {
+ from {
+ -webkit-transform: translate3d(100%, 0, 0);
+ transform: translate3d(100%, 0, 0);
+ visibility: visible;
+ }
+
+ to {
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+ }
+}
+
+.notice-container {
+ min-width: $line-height*12;
+ position: absolute;
+ right: 24px;
+ top: 24px;
+
+ .notice {
+ height: $line-height*4;
+
+ .notice-text {
+ width: 95%;
+ }
+ }
+}
+
.callout {
font-size: $small-font-size;
@@ -951,15 +1003,6 @@ img.avatar, img.admin-avatar, img.moderator-avatar, img.initialjs-avatar {
// 09. Search
// ----------
-.search-form h3 {
- border-top: 1px solid $votes-border;
- display: inline-block;
- font-size: rem-calc(16);
- margin: -1px 0 $line-height/2;
- padding-top: $line-height/4;
- text-transform: uppercase;
-}
-
.search-results h2 {
margin-bottom: 0;
}
@@ -1537,6 +1580,7 @@ table {
font-size: $small-font-size;
margin: rem-calc(6) 0;
padding: rem-calc(6);
+ position: relative;
[class^="icon-arrow"] {
font-size: rem-calc(18);
diff --git a/app/assets/stylesheets/mixins.scss b/app/assets/stylesheets/mixins.scss
index d772b8ace..5ffc534cb 100644
--- a/app/assets/stylesheets/mixins.scss
+++ b/app/assets/stylesheets/mixins.scss
@@ -13,7 +13,7 @@
font-size: rem-calc(24);
font-weight: lighter;
- @include breakpoint(small) {
+ @include breakpoint(medium) {
line-height: $line-height*2;
margin-top: 0;
}
@@ -22,7 +22,7 @@
height: 48px;
width: 48px;
- @include breakpoint(small) {
+ @include breakpoint(medium) {
height: 80px;
margin-right: $line-height/2;
margin-top: 0;
diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss
index efd385c19..1ab1eb726 100644
--- a/app/assets/stylesheets/participation.scss
+++ b/app/assets/stylesheets/participation.scss
@@ -12,15 +12,14 @@
// ----------------------
@mixin votes {
- background: $votes-bg;
- border-top: 1px solid $votes-border;
+ background: $votes;
margin: 0 rem-calc(-12);
padding: rem-calc(14) rem-calc(12);
position: relative;
- .icon-like {
+ .icon-like, .icon-unlike {
background: white;
- border: 2px solid $votes-border;
+ border: 2px solid $votes;
border-radius: rem-calc(3);
color: $text-light;
display: inline-block;
@@ -29,40 +28,25 @@
padding: rem-calc(3) rem-calc(6);
position: relative;
- &:hover {
- background: $votes-like;
+ &:hover, &:active {
border-color: white;
color: white;
cursor: pointer;
opacity: 1 !important;
}
+ }
- &:active {
- border-color: $votes-like-act;
+ .icon-like {
+
+ &:hover, &:active {
+ background: $like;
}
}
.icon-unlike {
- background: white;
- border: 2px solid $votes-border;
- border-radius: rem-calc(3);
- color: $text-light;
- display: inline-block;
- font-size: rem-calc(30);
- line-height: rem-calc(30);
- padding: rem-calc(3) rem-calc(6);
- position: relative;
- &:hover {
- background: $votes-unlike;
- border-color: white;
- color: white;
- cursor: pointer;
- opacity: 1 !important;
- }
-
- &:active {
- border-color: $votes-unlike-act;
+ &:hover, &:active {
+ background: $unlike;
}
}
@@ -81,20 +65,23 @@
}
.voted {
- .icon-like {
- background: $votes-like;
+
+ .icon-like, .icon-unlike {
border-color: white;
color: white;
}
+ .icon-like {
+ background: $like;
+ }
+
.icon-unlike {
- background: $votes-unlike;
- border-color: white;
- color: white;
+ background: $unlike;
}
}
.no-voted {
+
.icon-like, .icon-unlike {
opacity: .5;
}
@@ -109,54 +96,10 @@
.divider {
margin: 0 rem-calc(6);
}
-
- .not-logged {
- background: rgba(22,99,135,.9);
- color: white;
- font-size: $small-font-size;
- height: 100%;
- left: 0;
- position: absolute;
- text-align: center;
- top: 0;
- width: 100%;
- filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#222222', endColorstr='#222222'); /* IE */
-
- a {
- color: white;
- text-decoration: underline;
- }
- }
-
- .anonymous-votes, .organizations-votes {
- background: $warning-bg;
- color: $color-warning;
- height: 100%;
- left: 0;
- line-height: $line-height;
- padding-top: rem-calc(12);
- position: absolute;
- text-align: center;
- top: 0;
- width: 100%;
-
- p {
- color: $color-warning;
- margin: 0 rem-calc(12);
- text-align: left;
- }
-
- a {
- color: $color-warning;
- font-weight: bold;
- text-decoration: underline;
- }
- }
}
@mixin supports {
background: $proposals;
- border-top: 1px solid $proposals-border;
margin: 0 rem-calc(-12);
padding: rem-calc(14) rem-calc(12);
position: relative;
@@ -166,7 +109,7 @@
height: $line-height/2;
.meter {
- background: $votes-like;
+ background: $like;
display: block;
height: $line-height/2;
}
@@ -197,7 +140,7 @@
margin-top: rem-calc(12);
&:hover {
- background: $proposals-border;
+ background: darken($proposals, 35%);
color: white;
cursor: pointer;
}
@@ -221,49 +164,6 @@
margin: 0 rem-calc(6);
}
- .not-logged {
- background: rgba(255,164,45,.9);
- color: white;
- font-size: $small-font-size;
- height: 100%;
- left: 0;
- position: absolute;
- text-align: center;
- top: 0;
- width: 100%;
- filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#222222', endColorstr='#222222'); /* IE */
-
- a {
- color: white;
- text-decoration: underline;
- }
- }
-
- .anonymous-votes, .organizations-votes, .no-supports-allowed {
- background: $warning-bg;
- color: $color-warning;
- height: 100%;
- left: 0;
- line-height: $line-height;
- padding-top: rem-calc(12);
- position: absolute;
- text-align: center;
- top: 0;
- width: 100%;
-
- p {
- color: $color-warning;
- margin: 0 rem-calc(12);
- text-align: left;
- }
-
- a {
- color: $color-warning;
- font-weight: bold;
- text-decoration: underline;
- }
- }
-
.supported {
color: white;
margin-top: rem-calc(12);
@@ -285,32 +185,61 @@
}
}
+.participation-not-allowed {
+ background: $warning-bg;
+ color: $color-warning;
+ height: 100%;
+ left: 0;
+ line-height: $line-height;
+ padding: $line-height $line-height/2;
+ position: absolute;
+ text-align: center;
+ top: 0;
+ width: 100%;
+ z-index: 2;
+
+ p {
+ color: $color-warning !important;
+ margin: 0 rem-calc(12);
+ text-align: left;
+ }
+
+ a {
+ color: $color-warning !important;
+ font-weight: bold;
+ text-decoration: underline;
+ }
+}
+
+.reply .participation-not-allowed {
+ padding-right: $line-height/2;
+ padding-top: $line-height/6;
+ text-align: right;
+}
+
// 02. New participation
// ---------------------
-.debate-new, .debate-edit,
-.proposal-new, .proposal-edit,
-.spending-proposal-new, .spending-proposal-edit {
+.debate-form,
+.proposal-form,
+.spending-proposal-form {
+
+ .icon-debates, .icon-proposals, .icon-budget {
+ font-size: rem-calc(50);
+ line-height: $line-height;
+ opacity: .5;
+ }
.icon-debates {
color: $debates;
- font-size: rem-calc(60);
- line-height: $line-height;
- opacity: .5;
}
.icon-proposals {
color: $proposals;
- font-size: rem-calc(50);
- line-height: $line-height;
- opacity: .5;
}
.icon-budget {
color: $budget;
- font-size: rem-calc(50);
- line-height: $line-height;
- opacity: .5;
}
.recommendations {
@@ -330,14 +259,14 @@
}
}
-.debate-new, .debate-edit {
+.debate-form {
.recommendations li:before {
color: $debates;
}
}
-.proposal-new, .proposal-edit {
+.proposal-form {
.recommendations li:before {
color: $proposals;
@@ -496,11 +425,6 @@
line-height: $line-height;
}
- .not-logged {
- line-height: $line-height;
- padding: rem-calc(24);
- }
-
@include breakpoint(small + rem-calc(1) and medium down) {
.in-favor, .against {
text-align: left;
@@ -530,11 +454,6 @@
float: none;
line-height: $line-height;
}
-
- .not-logged {
- line-height: $line-height;
- padding: rem-calc(24);
- }
}
.leave-comment {
@@ -711,15 +630,6 @@
}
}
- .not-logged {
- line-height: $line-height;
- padding-top: rem-calc(24);
- }
-
- .anonymous-votes, .organizations-votes {
- padding-top: rem-calc(24);
- }
-
.divider {
display: none;
}
@@ -745,7 +655,7 @@
.votes {
@include votes;
- border: 1px solid $votes-border;
+ border: 1px solid $votes;
margin: 0 rem-calc(-12);
@include breakpoint(medium) {
@@ -803,7 +713,7 @@
.supports {
@include supports;
- border: 1px solid $proposals-border;
+ border: 1px solid $proposals;
margin: 0 rem-calc(-12);
@include breakpoint(medium) {
@@ -904,16 +814,6 @@
line-height: rem-calc(70);
}
- .no-supports-allowed {
- background: rgba(69,67,114,.96);
- color: white;
- padding: rem-calc(12);
- }
-
- .no-supports-allowed p, .no-supports-allowed a {
- color: white;
- }
-
.share-supported {
.ssb-twitter,
@@ -1006,18 +906,13 @@
margin-top: 0;
}
- .not-logged,
- .organizations-votes,
- .anonymous-votes {
+ .participation-not-allowed {
background: $featured;
- color: $color-warning;
font-size: $small-font-size;
- line-height: $line-height;
padding-top: 0;
a {
color: $color-warning;
- font-weight: bold;
}
p {
diff --git a/app/helpers/locales_helper.rb b/app/helpers/locales_helper.rb
new file mode 100644
index 000000000..7954cc908
--- /dev/null
+++ b/app/helpers/locales_helper.rb
@@ -0,0 +1,8 @@
+module LocalesHelper
+
+ def name_for_locale(locale)
+ default = I18n.t("locale", locale: locale)
+ I18n.backend.translate(locale, "i18n.language.name", default: default)
+ end
+
+end
diff --git a/app/models/user.rb b/app/models/user.rb
index 60bc2364a..916c3d0b9 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -2,8 +2,8 @@ class User < ActiveRecord::Base
include Verification
- devise :database_authenticatable, :registerable, :confirmable,
- :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :async
+ devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable,
+ :trackable, :validatable, :omniauthable, :async, :password_expirable, :secure_validatable
acts_as_voter
acts_as_paranoid column: :hidden_at
diff --git a/app/views/comments/_votes.html.erb b/app/views/comments/_votes.html.erb
index 8ee315e35..0de92a675 100644
--- a/app/views/comments/_votes.html.erb
+++ b/app/views/comments/_votes.html.erb
@@ -33,7 +33,7 @@
<% elsif !user_signed_in? %>
-
+
<%= t('comments.comment.votes', count: comment.total_votes) %>
|
@@ -60,7 +60,7 @@
<%= comment.total_dislikes %>
-
+
<%= t("votes.comment_unauthenticated",
signin: link_to(t("votes.signin"), new_user_session_path),
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb
index 4c5f5a9b7..cc59a3f3a 100644
--- a/app/views/debates/_votes.html.erb
+++ b/app/views/debates/_votes.html.erb
@@ -26,23 +26,23 @@
<% if user_signed_in? && current_user.organization? %>
-
-
- <%= t("votes.organizations") %>
-
-
+
+
+ <%= t("votes.organizations") %>
+
+
<% elsif user_signed_in? && !debate.votable_by?(current_user)%>
-
-
- <%= t("votes.anonymous",
- verify_account: link_to(t("votes.verify_account"), verification_path )).html_safe %>
-
-
+
+
+ <%= t("votes.anonymous",
+ verify_account: link_to(t("votes.verify_account"), verification_path )).html_safe %>
+
+
<% elsif !user_signed_in? %>
-
- <%= t("votes.unauthenticated",
- signin: link_to(t("votes.signin"), new_user_session_path),
- signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
-
+
+ <%= t("votes.unauthenticated",
+ signin: link_to(t("votes.signin"), new_user_session_path),
+ signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
+
<% end %>
diff --git a/app/views/debates/edit.html.erb b/app/views/debates/edit.html.erb
index eea353438..13a2aa625 100644
--- a/app/views/debates/edit.html.erb
+++ b/app/views/debates/edit.html.erb
@@ -1,4 +1,4 @@
-