diff --git a/Gemfile b/Gemfile
index 819f3194c..9e2b370c0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -43,7 +43,7 @@ gem 'paranoia'
gem 'rinku', require: 'rails_rinku'
gem 'savon'
gem 'dalli'
-gem 'rollbar', '~> 2.3.0'
+gem 'rollbar', '~> 2.4.0'
gem 'delayed_job_active_record', '~> 4.1.0'
gem 'daemons'
gem 'devise-async'
@@ -72,7 +72,7 @@ group :development, :test do
gem 'i18n-tasks'
gem 'capistrano', '3.4.0', require: false
gem "capistrano-bundler", '1.1.4', require: false
- gem "capistrano-rails", '1.1.3', require: false
+ gem "capistrano-rails", '1.1.4', require: false
gem "capistrano-rvm", require: false
gem 'capistrano3-delayed-job', '~> 1.0'
gem "bullet"
diff --git a/Gemfile.lock b/Gemfile.lock
index 032d466cb..78af59ad9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -70,11 +70,11 @@ GEM
debug_inspector (>= 0.0.1)
browser (1.0.1)
builder (3.2.2)
- bullet (4.14.7)
+ bullet (4.14.9)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.9.0)
byebug (6.0.2)
- cancancan (1.12.0)
+ cancancan (1.13.1)
capistrano (3.4.0)
i18n
rake (>= 10.0.0)
@@ -82,13 +82,13 @@ GEM
capistrano-bundler (1.1.4)
capistrano (~> 3.1)
sshkit (~> 1.2)
- capistrano-rails (1.1.3)
+ capistrano-rails (1.1.4)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
- capistrano3-delayed-job (1.4.0)
+ capistrano3-delayed-job (1.4.1)
capistrano (>= 3.0.0)
capybara (2.5.0)
mime-types (>= 1.16)
@@ -97,7 +97,7 @@ GEM
rack-test (>= 0.5.4)
xpath (~> 2.0)
chronic (0.10.2)
- ckeditor (4.1.3)
+ ckeditor (4.1.4)
cocaine
orm_adapter (~> 0.5.0)
climate_control (0.0.3)
@@ -113,7 +113,7 @@ GEM
execjs
coffee-script-source (1.9.1.1)
colorize (0.7.7)
- coveralls (0.8.2)
+ coveralls (0.8.3)
json (~> 1.8)
rest-client (>= 1.6.8, < 2)
simplecov (~> 0.10.0)
@@ -139,7 +139,7 @@ GEM
devise (~> 3.2)
diff-lcs (1.2.5)
docile (1.1.5)
- domain_name (0.5.24)
+ domain_name (0.5.25)
unf (>= 0.0.5, < 1.0.0)
easy_translate (0.5.0)
json
@@ -158,9 +158,9 @@ GEM
railties (>= 3.0.0)
faker (1.5.0)
i18n (~> 0.5)
- faraday (0.9.1)
+ faraday (0.9.2)
multipart-post (>= 1.2, < 3)
- foundation-rails (5.5.2.1)
+ foundation-rails (5.5.3.2)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
foundation_rails_helper (1.0.0)
@@ -175,12 +175,12 @@ GEM
geocoder (1.2.11)
globalid (0.3.6)
activesupport (>= 4.1.0)
- groupdate (2.4.0)
+ groupdate (2.5.0)
activesupport (>= 3)
gyoku (1.3.1)
builder (>= 2.1.2)
hashie (3.4.2)
- highline (1.7.6)
+ highline (1.7.8)
http-cookie (1.0.2)
domain_name (~> 0.5)
httpi (2.4.1)
@@ -220,13 +220,13 @@ GEM
mime-types (>= 1.16, < 3)
mime-types (2.6.2)
mini_portile (0.6.2)
- minitest (5.8.0)
+ minitest (5.8.1)
multi_json (1.11.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
- net-ssh (2.9.2)
+ net-ssh (3.0.1)
netrc (0.10.3)
newrelic_rpm (3.13.2.302)
nokogiri (1.6.6.2)
@@ -239,13 +239,12 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
- oj (2.12.14)
omniauth (1.2.2)
hashie (>= 1.2, < 4)
rack (~> 1.0)
omniauth-facebook (2.0.1)
omniauth-oauth2 (~> 1.2)
- omniauth-google-oauth2 (0.2.7)
+ omniauth-google-oauth2 (0.2.8)
addressable (~> 2.3)
jwt (~> 1.0)
multi_json (~> 1.3)
@@ -264,7 +263,7 @@ GEM
paranoia (2.1.3)
activerecord (~> 4.0)
pg (0.18.3)
- poltergeist (1.6.0)
+ poltergeist (1.7.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
@@ -309,8 +308,8 @@ GEM
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rinku (1.7.3)
- rollbar (2.3.0)
- oj (~> 2.12.14)
+ rollbar (2.4.0)
+ multi_json
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
@@ -333,7 +332,7 @@ GEM
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
ruby-progressbar (1.7.5)
- sass (3.4.18)
+ sass (3.4.19)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
@@ -356,8 +355,8 @@ GEM
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
spring (1.4.0)
- sprockets (3.3.4)
- rack (~> 1.0)
+ sprockets (3.4.0)
+ rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
@@ -389,7 +388,7 @@ GEM
rack
raindrops (~> 0.7)
uniform_notifier (1.9.0)
- user_agent_parser (2.2.0)
+ user_agent_parser (2.3.0)
uuidtools (2.1.5)
warden (1.2.3)
rack (>= 1.0)
@@ -423,7 +422,7 @@ DEPENDENCIES
cancancan
capistrano (= 3.4.0)
capistrano-bundler (= 1.1.4)
- capistrano-rails (= 1.1.3)
+ capistrano-rails (= 1.1.4)
capistrano-rvm
capistrano3-delayed-job (~> 1.0)
capybara
@@ -461,7 +460,7 @@ DEPENDENCIES
rails (= 4.2.4)
responders
rinku
- rollbar (~> 2.3.0)
+ rollbar (~> 2.4.0)
rspec-rails (~> 3.0)
sass-rails (~> 5.0)
savon
diff --git a/README.md b/README.md
index 85cce257b..d9f01dfb1 100644
--- a/README.md
+++ b/README.md
@@ -11,9 +11,7 @@ Este es el repositorio de código abierto de la Aplicación de Participación Ci
## Estado del proyecto
-El desarrollo de esta aplicación comenzó el [15 de Julio de 2015](https://github.com/AyuntamientoMadrid/participacion/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6)
-
-Este proyecto está en las primeras fases de su desarrollo. Las funcionalidades actualmente presentes en el código, así como sus nombres, deben considerarse como provisionales.
+El desarrollo de esta aplicación comenzó el [15 de Julio de 2015](https://github.com/AyuntamientoMadrid/participacion/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. La evolución y futura lista de funcionalidades a implementar se pueden consultar en la lista de [tareas por hacer](https://github.com/AyuntamientoMadrid/participacion/issues).
## Tecnología
diff --git a/README_EN.md b/README_EN.md
index d2d196799..a1ba149a4 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -11,9 +11,7 @@ This is the opensource code repository of Madrid City government eParticipation
## Current state
-Development started on [2015 July 15th](https://github.com/AyuntamientoMadrid/participacion/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6)
-
-The project is in its early stages. Features currently present in the code (and their names) are subject to change.
+Development started on [2015 July 15th](https://github.com/AyuntamientoMadrid/participacion/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 a roadmap and future features in the [open issues list](https://github.com/AyuntamientoMadrid/participacion/issues).
## Tech stack
diff --git a/app/assets/fonts/icons.svg b/app/assets/fonts/icons.svg
index 76a8ea744..31e98dac3 100644
--- a/app/assets/fonts/icons.svg
+++ b/app/assets/fonts/icons.svg
@@ -7,38 +7,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+icons.eot
diff --git a/app/assets/images/icon_home_debate.png b/app/assets/images/icon_home_debate.png
new file mode 100644
index 000000000..77fc23ff0
Binary files /dev/null and b/app/assets/images/icon_home_debate.png differ
diff --git a/app/assets/images/icon_home_debate.svg b/app/assets/images/icon_home_debate.svg
deleted file mode 100644
index 01c932130..000000000
--- a/app/assets/images/icon_home_debate.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
\ No newline at end of file
diff --git a/app/assets/images/icon_home_decide.png b/app/assets/images/icon_home_decide.png
new file mode 100644
index 000000000..93f4c516a
Binary files /dev/null and b/app/assets/images/icon_home_decide.png differ
diff --git a/app/assets/images/icon_home_decide.svg b/app/assets/images/icon_home_decide.svg
deleted file mode 100644
index 13fe845a9..000000000
--- a/app/assets/images/icon_home_decide.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
\ No newline at end of file
diff --git a/app/assets/images/icon_home_do.png b/app/assets/images/icon_home_do.png
new file mode 100644
index 000000000..3dc089706
Binary files /dev/null and b/app/assets/images/icon_home_do.png differ
diff --git a/app/assets/images/icon_home_done.svg b/app/assets/images/icon_home_done.svg
deleted file mode 100644
index 7a39b8106..000000000
--- a/app/assets/images/icon_home_done.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
\ No newline at end of file
diff --git a/app/assets/images/icon_home_proposal.png b/app/assets/images/icon_home_proposal.png
new file mode 100644
index 000000000..bcf3c3825
Binary files /dev/null and b/app/assets/images/icon_home_proposal.png differ
diff --git a/app/assets/images/icon_home_proposal.svg b/app/assets/images/icon_home_proposal.svg
deleted file mode 100644
index 0ed3f28eb..000000000
--- a/app/assets/images/icon_home_proposal.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
\ No newline at end of file
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 4bf184c2c..b9f9ca39e 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -4,7 +4,6 @@
@import "icons";
@import "variables";
@import "admin";
-@import "participacion";
-@import "debates";
-@import "proposals";
+@import "layout";
+@import "participation";
@import "c3";
\ No newline at end of file
diff --git a/app/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss
index a02fead2a..93f7ebcf3 100644
--- a/app/assets/stylesheets/icons.scss
+++ b/app/assets/stylesheets/icons.scss
@@ -138,4 +138,13 @@
}
.icon-print:before {
content: "H";
-}
\ No newline at end of file
+}
+.icon-blog:before {
+ content: "J";
+}
+.icon-box:before {
+ content: "I";
+}
+.icon-youtube:before {
+ content: "K";
+}
diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/layout.scss
similarity index 81%
rename from app/assets/stylesheets/participacion.scss
rename to app/assets/stylesheets/layout.scss
index 3449da54e..1afa5cea2 100644
--- a/app/assets/stylesheets/participacion.scss
+++ b/app/assets/stylesheets/layout.scss
@@ -17,6 +17,9 @@
// 15. Social
// 16. Pages
// 17. Verification
+// 18. Comments
+// 19. Flags
+// 20. Accesibility
//
// 01. Variables
@@ -277,6 +280,10 @@ h6 {
margin: rem-calc(24) 0;
}
+.text-medium {
+ font-size: rem-calc(16) !important;
+}
+
// 04. Header
// - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -304,10 +311,11 @@ header {
padding: 0;
}
- p {
+ h2 {
color: white;
font-size: rem-calc(16);
- line-height: rem-calc(30);
+ font-weight: normal;
+ line-height: rem-calc(30);
}
.button {
@@ -438,7 +446,7 @@ header {
}
.contain-to-grid {
- background: rgba(0,0,0,.5);
+ background: #112E51;
}
.top-bar {
@@ -763,21 +771,19 @@ footer {
opacity: .75;
margin-top: rem-calc(24);
padding-top: rem-calc(12);
-
}
// 06. Tags
// - - - - - - - - - - - - - - - - - - - - - - - - -
-.tags {
+.tags, .tag-cloud {
a {
background: $border;
- border-radius: rem-calc(30);
+ border-radius: rem-calc(6);
color: #4d4d4d;
display: inline-block;
font-size: rem-calc(13);
- font-weight: bold;
line-height: rem-calc(22);
margin-bottom: rem-calc(8);
padding: 0 rem-calc(8);
@@ -791,7 +797,6 @@ footer {
}
.tag-cloud {
- @extend .tags;
h3 {
border-top: 2px solid $brand;
@@ -941,14 +946,13 @@ form {
margin: rem-calc(12) 0 rem-calc(12) rem-calc(6);
}
- .note {
+ .note, .note-marked {
display: block;
font-size: rem-calc(13);
margin-bottom: rem-calc(12);
}
.note-marked {
- @extend .note;
background: yellow;
display: inline-block;
@@ -1075,6 +1079,10 @@ label.error, label.error a {
margin-bottom: $line-height;
}
+ h1.avatar {
+ margin-left: rem-calc(12);
+ }
+
h3 {
clear: both;
font-size: rem-calc(20);
@@ -1109,18 +1117,33 @@ label.error, label.error a {
.verify-account {
padding-right: rem-calc(12);
}
+
+ .final-votes-info {
+ background: $warning-bg;
+ border: 1px solid $warning-border;
+ color: $warning-color;
+ margin-top: rem-calc(24);
+ padding: rem-calc(12);
+
+ ul li {
+ margin: rem-calc(12) 0;
+ }
+
+ .icon-box {
+ color: #D4A26D;
+ font-size: rem-calc(120);
+ line-height: rem-calc(120);
+ vertical-align: top;
+ }
+ }
}
-img.avatar, img.admin-avatar, img.moderator-avatar {
+img.avatar, img.admin-avatar, img.moderator-avatar, img.initialjs-avatar {
border-radius: rem-calc(1000);
position: relative;
}
-img.initialjs-avatar {
- @extend .avatar;
-}
-
-.author-deleted {
+.author-deleted, .user-deleted {
background-color: rgba(255,255,255,.5);
color: rgba(0,0,0,.4);
font-size: rem-calc(40);
@@ -1130,14 +1153,47 @@ img.initialjs-avatar {
}
.user-deleted {
- @extend .author-deleted;
top: -9px;
}
+.user-permissions {
+
+ p {
+ span {
+ color: $text-medium;
+ font-size: rem-calc(12);
+ }
+ }
+
+ ul {
+ list-style-type: none;
+ margin-bottom: 0;
+ margin-left: 0;
+
+ li {
+ font-size: rem-calc(14);
+ margin-bottom: rem-calc(12);
+
+ span {
+ color: $text-medium;
+ font-size: rem-calc(12);
+ }
+
+ .icon-check {
+ color: $check;
+ }
+
+ .icon-x {
+ color: $delete;
+ }
+ }
+ }
+}
+
// 11. Filters & search
// - - - - - - - - - - - - - - - - - - - - - - - - -
-.filters {
+.filters, .search-results {
h2 {
display: inline-block;
@@ -1188,10 +1244,6 @@ img.initialjs-avatar {
}
}
-.search-results {
- @extend .filters;
-}
-
.search-form {
h3 {
@@ -1318,6 +1370,7 @@ table {
}
&:hover {
+ background: white;
color: #40A2D1;
}
}
@@ -1357,6 +1410,7 @@ table {
}
&:hover {
+ background: white;
color: #354F88;
}
}
@@ -1396,10 +1450,42 @@ table {
}
&:hover {
+ background: white;
color: #CE3E26;
}
}
+.social {
+ margin-top: rem-calc(24);
+ text-align: center;
+
+ @media (min-width: $small-breakpoint) {
+ margin-top: 0;
+ text-align: right;
+ }
+
+ a {
+ font-size: rem-calc(24);
+ line-height: rem-calc(24);
+ margin: 0 rem-calc(12);
+ text-decoration: none;
+ vertical-align: middle;
+
+ &:hover {
+ opacity: .5;
+ text-decoration: none;
+ }
+
+ @media (min-width: $small-breakpoint) {
+ font-size: rem-calc(18);
+ }
+
+ &:last-child {
+ margin-right: 0;
+ }
+ }
+}
+
.share-supported {
.social-share-button {
@@ -1407,27 +1493,72 @@ table {
}
.social-share-button-twitter {
- @extend .social-share-button-twitter;
background: none;
color: white;
height: rem-calc(24);
+ position: relative;
width: rem-calc(48);
+
+ &:before {
+ content: "f";
+ font-family: "icons" !important;
+ font-size: rem-calc(24);
+ left: 50%;
+ line-height: $line-height*2;
+ margin-left: rem-calc(-11);
+ position: absolute;
+ top: 0;
+ }
+
+ &:hover {
+ color: #40A2D1;
+ }
}
.social-share-button-facebook {
- @extend .social-share-button-facebook;
background: none;
color: white;
height: rem-calc(24);
+ position: relative;
width: rem-calc(48);
+
+ &:before {
+ content: "A";
+ font-family: "icons" !important;
+ font-size: rem-calc(24);
+ left: 50%;
+ line-height: $line-height*2;
+ margin-left: rem-calc(-11);
+ position: absolute;
+ top: 0;
+ }
+
+ &:hover {
+ color: #354F88;
+ }
}
.social-share-button-google_plus {
- @extend .social-share-button-google_plus;
background: none;
color: white;
height: rem-calc(24);
+ position: relative;
width: rem-calc(48);
+
+ &:before {
+ content: "B";
+ font-family: "icons" !important;
+ font-size: rem-calc(24);
+ left: 50%;
+ line-height: $line-height*2;
+ margin-left: rem-calc(-11);
+ position: absolute;
+ top: 0;
+ }
+
+ &:hover {
+ color: #CE3E26;
+ }
}
}
@@ -1513,7 +1644,7 @@ table {
font-family: "icons" !important;
position: absolute;
right: 0;
- top: rem-calc(6);
+ top: rem-calc(12);
@media (min-width: $small-breakpoint) {
content: 'c';
@@ -1636,3 +1767,184 @@ table {
}
}
}
+
+// 18. Comments
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+.comments {
+ background: $white;
+ background-repeat: repeat-x;
+ padding-top: rem-calc(24);
+ padding-bottom: rem-calc(96);
+
+ h2 {
+ margin: 0;
+ font-weight: bold;
+
+ span {
+ font-size: rem-calc(18);
+ font-weight: normal;
+ opacity: .8;
+ }
+ }
+
+ .comment {
+ margin: rem-calc(6) 0;
+
+ p {
+ margin-bottom: 0;
+ }
+
+ .comment-votes {
+ color: $text-medium;
+ font-weight: lighter;
+ line-height: rem-calc(24);
+ margin: rem-calc(10) rem-calc(12) rem-calc(6) 0;
+
+ a {
+ color: $text-light;
+ display: inline-block;
+ vertical-align: top;
+
+ &:hover {
+ color: $text-medium;
+ }
+ }
+
+ [class^="icon-"] {
+ font-size: rem-calc(20);
+ vertical-align: middle;
+ }
+ }
+
+ .comment-body {
+ margin-left: rem-calc(42);
+
+ p {
+ font-size: rem-calc(14);
+ }
+
+ .reply {
+ background: white;
+ border: 1px solid $border;
+ font-size: rem-calc(12);
+ margin: rem-calc(6) 0;
+ padding: rem-calc(6);
+
+ .divider {
+ color: $text-light;
+ }
+ }
+
+ .comment-user {
+ margin-top: rem-calc(6);
+ padding: rem-calc(6) 0;
+ overflow: hidden;
+
+ @each $n in ("1", "2", "3","4", "5") {
+ &.level-#{$n} {
+ @if $n == "5" {
+ background: $comment-level-5;
+ padding: rem-calc(6) rem-calc(12);
+ }
+ @elseif $n == "1" {
+ background: none;
+ padding: rem-calc(6) rem-calc(12);
+ }
+ @else {
+ background: $comment-official;
+ padding: rem-calc(6) rem-calc(12);
+ }
+ }
+ }
+
+ &.is-author {
+ background: $comment-author;
+ padding: rem-calc(6) rem-calc(12);
+ }
+
+ &.is-admin, &.is-moderator {
+ background: $comment-admin;
+ padding: rem-calc(6) rem-calc(12);
+ }
+
+ &.level-5 {
+ background: $comment-level-5;
+ padding: rem-calc(6) rem-calc(12);
+ }
+ }
+ }
+
+ .is-deleted {
+ background: $deleted;
+ margin-left: rem-calc(42);
+ padding: rem-calc(6) rem-calc(12);
+ }
+
+ .comment-children {
+ border-left: 1px dashed $border;
+ margin-left: rem-calc(42);
+ padding-left: rem-calc(6);
+
+ @media only screen and (max-width: 40em) {
+ margin-left: rem-calc(16);
+ }
+ }
+
+ .comment-info {
+ color: $text-light;
+ font-size: rem-calc(13);
+ font-weight: lighter;
+ margin-top: rem-calc(6);
+ vertical-align: middle;
+
+ span.user-name {
+ color: $text;
+ font-weight: bold;
+ }
+ }
+ }
+}
+
+.faded {
+ opacity: 0.4;
+}
+
+// 19. Flags
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+.flag-content {
+
+ .button {
+ background: none;
+ margin-bottom: 0;
+ padding: 0;
+ }
+}
+
+.flag-disable, .flag-active {
+ line-height: rem-calc(24);
+ vertical-align: middle;
+}
+
+.flag-disable {
+ color: $text-medium;
+}
+
+.flag-active {
+ color: $delete;
+}
+
+// 20. Accesibility
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/participation.scss
similarity index 64%
rename from app/assets/stylesheets/debates.scss
rename to app/assets/stylesheets/participation.scss
index 6e0f142bd..9aa06dd04 100644
--- a/app/assets/stylesheets/debates.scss
+++ b/app/assets/stylesheets/participation.scss
@@ -1,16 +1,12 @@
-// Table of Contents
+// Table of Contents - Styles for debates and proposals
//
-// 01. Debates
-// 02. Index
-// 02.1. Featured
-// 02.2. List
-// 03. Show
-// 04. New
-// 05. Comments
-// 06. Flags
+// 01. Votes and supports
+// 02. New participation
+// 03. Show participation
+// 04. List participation
//
-// 01. Debates
+// 01. Votes and supports
// - - - - - - - - - - - - - - - - - - - - - - - - -
@mixin votes {
@@ -68,7 +64,7 @@
}
}
- .like {
+ .like, .unlike {
line-height: rem-calc(48);
vertical-align: super;
@@ -83,20 +79,14 @@
}
}
- .unlike {
- @extend .like;
- }
-
.voted {
.icon-like {
- @extend .icon-like;
background: $votes-like;
border-color: white;
color: white;
}
.icon-unlike {
- @extend .icon-unlike;
background: $votes-unlike;
border-color: white;
color: white;
@@ -164,51 +154,447 @@
}
}
-// 02. Index
+@mixin supports {
+ background: $proposals;
+ border-top: 1px solid $proposals-border;
+ margin: 0 rem-calc(-12);
+ padding: rem-calc(14) rem-calc(12);
+ position: relative;
+
+ .progress {
+ background-color: rgba(255,255,255,.8);
+ height: rem-calc(12);
+ margin-bottom: rem-calc(6);
+ margin-top: rem-calc(4);
+
+ .meter {
+ background: $votes-like;
+ }
+ }
+
+ .percentage {
+ font-size: rem-calc(10);
+ color: $brand;
+ vertical-align: top;
+ position: absolute;
+ top: 17px;
+ right: 18px;
+ }
+
+ abbr {
+ color: white;
+
+ &[title] {
+ border-bottom: 1px dotted white;
+ }
+ }
+
+ .button-support {
+ background: white;
+ color: $proposals;
+ display: inline-block;
+ font-size: rem-calc(14);
+ margin-top: rem-calc(12);
+
+ &:hover {
+ background: $proposals-border;
+ color: white;
+ cursor: pointer;
+ }
+
+ &:active {
+ opacity: .75;
+ }
+ }
+
+ .total-supports {
+ color: white;
+ text-align: center;
+ font-size: rem-calc(14);
+
+ span {
+ display: block;
+ font-size: rem-calc(11);
+ opacity: .75;
+ }
+ }
+
+ .divider {
+ margin: 0 rem-calc(6);
+ }
+
+ .not-logged {
+ background: rgba(255,164,45,.9);
+ color: white;
+ height: 100%;
+ left: 0;
+ line-height: $line-height*2;
+ padding-top: rem-calc(12);
+ 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: $warning-color;
+ height: 100%;
+ left: 0;
+ line-height: $line-height;
+ padding-top: rem-calc(12);
+ position: absolute;
+ text-align: center;
+ top: 0;
+ width: 100%;
+
+ p {
+ color: $warning-color;
+ margin: 0 rem-calc(12);
+ text-align: left;
+ }
+
+ a {
+ color: $warning-color;
+ font-weight: bold;
+ text-decoration: underline;
+ }
+ }
+
+ .supported {
+ color: white;
+ margin-top: rem-calc(12);
+ }
+}
+
+// 02. New participation
// - - - - - - - - - - - - - - - - - - - - - - - - -
-// 02.1. Featured
-// - - - - - - - - - - - - -
+.debate-new, .debate-edit, .proposal-new, .proposal-edit, {
+ background: white;
+ padding-top: rem-calc(24);
-.debate-featured {
+ .back {
+ @include back;
+ }
+
+ h1 {
+ clear: both;
+ font-size: rem-calc(36);
+ font-weight: bold;
+ line-height: $line-height*2;
+ margin-bottom: rem-calc(24);
+ }
+
+ .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;
+ }
+
+ h2 {
+ clear: both;
+ font-size: rem-calc(20);
+ font-weight: bold;
+ line-height: $line-height;
+ margin: 0;
+ }
+
+ .recommendations {
+ list-style-type: none;
+ margin-left: 0;
+ margin-top: rem-calc(24);
+
+ li {
+ font-size: rem-calc(12);
+ margin: rem-calc(12) 0;
+
+ &:before {
+ content: "l ";
+ font-family: "icons" !important;
+ }
+ }
+ }
+}
+
+.debate-new, .debate-edit {
+
+ .recommendations li:before {
+ color: $debates;
+ }
+}
+
+.proposal-new, .proposal-edit {
+
+ .recommendations li:before {
+ color: $proposals;
+ }
+}
+
+// 02. Show participation
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+.debate-show, .proposal-show {
+ padding-top: rem-calc(12);
+
+ .back, .icon-angle-left {
+ @include back;
+ }
+
+ h1 {
+ clear: both;
+ font-size: rem-calc(30);
+ font-weight: bold;
+ margin: 0;
+ text-transform: lowercase;
+
+ &:first-letter {
+ text-transform: uppercase;
+ }
+ }
+
+ h4 {
+ margin: rem-calc(12) 0;
+ }
+
+ .edit-debate, .edit-proposal {
+ margin-bottom: 0;
+ }
+
+ .debate-info, .proposal-info {
+ clear: both;
+ color: $text-medium;
+ font-weight: lighter;
+ line-height: $line-height*2;
+ text-align: justify;
+
+ a {
+ color: $text-medium;
+ }
+
+ p {
+ font-size: rem-calc(15);
+ line-height: $line-height;
+ margin-bottom: 0;
+ }
+ }
+
+ .debate-description, .proposal-description {
+ font-size: rem-calc(15);
+ line-height: rem-calc(30);
+ }
+
+ ul, ol {
+ margin: rem-calc(12) 0;
+
+ li {
+ font-size: rem-calc(15);
+ margin-bottom: rem-calc(15);
+ }
+ }
+
+ .author-photo {
+ line-height: $line-height*2;
+ margin-right: rem-calc(6);
+ vertical-align: middle;
+ width: 32px;
+ }
+
+ .author {
+ color: $text;
+ font-weight: bold;
+ }
+
+ aside {
+
+ h3 {
+ border-top: 2px solid $brand;
+ display: inline-block;
+ font-size: rem-calc(16);
+ margin: -1px 0 rem-calc(12);
+ padding-top: rem-calc(6);
+ text-transform: uppercase;
+ }
+ }
+
+ blockquote {
+ margin-top: rem-calc(12);
+ padding-top: 0;
+ font-size: rem-calc(15);
+ line-height: rem-calc(30);
+ }
+
+ .document-link, .video-link {
+ border: 1px solid $border;
+ display: block;
+ margin-top: rem-calc(12);
+ padding: rem-calc(12);
+ position: relative;
+
+ a {
+ padding-left: rem-calc(24);
+ }
+
+ :before {
+ color: #007BB7;
+ content: "G";
+ font-family: "icons" !important;
+ font-size: rem-calc(24);
+ left: rem-calc(6);
+ padding-top: rem-calc(3);
+ position: absolute;
+ top: 0;
+ }
+ }
+
+ .video-link {
+
+ :before {
+ color: #CC181E;
+ content: "D";
+ }
+ }
+
+ .votes {
+ @include votes;
+ border: 0;
+ border-radius: 0;
+ margin: 0;
+
+ .total-votes {
+ display: block;
+ float: none;
+ line-height: $line-height;
+ }
+
+ .not-logged {
+ line-height: $line-height;
+ padding: rem-calc(24);
+ }
+
+ @media (min-width: $small-breakpoint + em-calc(1)) and (max-width:$medium-breakpoint) {
+ .in-favor, .against {
+ text-align: left;
+ width: rem-calc(100);
+ }
+ }
+
+ .divider {
+ display: none;
+ }
+
+ @media (min-width: $medium-breakpoint) {
+ .divider {
+ display: inline-block;
+ }
+ }
+ }
+
+ .supports {
+ @include supports;
+ border: 0;
+ border-radius: 0;
+ margin: 0;
+
+ .total-supports {
+ display: block;
+ float: none;
+ line-height: $line-height;
+ }
+
+ .not-logged {
+ line-height: $line-height;
+ padding: rem-calc(24);
+ }
+ }
+
+ .leave-comment {
+ display: inline-block;
+ margin-top: rem-calc(24);
+ }
+
+ .tags {
+ display: block;
+ margin: rem-calc(24) 0;
+
+ a {
+ margin-right: rem-calc(6);
+ }
+ }
+}
+
+.bullet {
+ color: $border;
+}
+
+// 04. List participation
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+.debates-list, .proposals-list {
+
+ @media (min-width: $small-breakpoint) {
+ margin-bottom: rem-calc(48);
+ }
+}
+
+.debate, .proposal {
+ margin-bottom: 0;
+ margin-top: 0;
.panel {
background: white;
border: 1px solid;
border-color: #e5e6e9 #dfe0e4 #d0d1d5;
- border-radius: rem-calc(3);
- margin-bottom: rem-calc(24);
- padding: rem-calc(24) rem-calc(12) 0 rem-calc(12);
+ border-radius: 0;
+ box-shadow: 0px 1px 3px 0 $border;
+ margin-bottom: rem-calc(12);
+ min-height: rem-calc(192);
+ padding: rem-calc(12) rem-calc(12) 0 rem-calc(12);
- .debate-content {
- min-height: rem-calc(353);
+ @media (min-width: $small-breakpoint) {
+ margin-bottom: rem-calc(-1);
+ padding-bottom: rem-calc(12);
}
- .label-debate {
+ .label-debate, .label-proposal {
background: none;
clear: both;
- color: $debates;
display: block;
font-size: rem-calc(12);
font-weight: bold;
- text-transform: uppercase;
+ line-height: $line-height;
+ padding-bottom: 0;
padding-left: 0;
padding-top: 0;
+ text-transform: uppercase;
}
- .icon-debates {
+ .label-debate {
color: $debates;
- font-size: rem-calc(36);
- line-height: $line-height;
- position: absolute;
- right: rem-calc(18);
- top: rem-calc(12);
+ }
+
+ .label-proposal {
+ color: $proposals;
}
h3 {
font-weight: bold;
- margin: rem-calc(8) 0 0 0;
- min-height: rem-calc(65);
+ margin: 0;
+ min-height: rem-calc(48);
a {
clear: both;
@@ -224,7 +610,33 @@
}
}
- .debate-info {
+ .debate-content, .proposal-content {
+ margin: 0;
+ min-height: rem-calc(180);
+
+ .tags {
+ display: block;
+ }
+ }
+
+ .icon-debates, .icon-proposals {
+ font-size: rem-calc(18);
+ line-height: $line-height;
+ position: absolute;
+ top: 0;
+ }
+
+ .icon-debates {
+ color: $debates;
+ left: rem-calc(60);
+ }
+
+ .icon-proposals {
+ color: $proposals;
+ left: rem-calc(88);
+ }
+
+ .debate-info, .proposal-info {
color: $text-medium;
font-weight: lighter;
margin-bottom: 0;
@@ -239,13 +651,13 @@
}
}
- .debate-description {
+ .debate-description, .proposal-description {
color: $text;
font-size: rem-calc(13);
- height: rem-calc(156);
+ height: rem-calc(72);
line-height: $line-height;
margin-bottom: rem-calc(12);
- margin-top: rem-calc(24);
+ margin-top: 0;
overflow: hidden;
position: relative;
@@ -283,70 +695,30 @@
}
}
- .votes {
- @include votes;
+ .not-logged {
+ line-height: $line-height;
+ padding-top: rem-calc(24);
}
-}
-// 02.2. List
-// - - - - - - - - - - - - -
+ .anonymous-votes, .organizations-votes {
+ padding-top: rem-calc(24);
+ }
-.debates-list {
+ .divider {
+ display: none;
+ }
- @media (min-width: $small-breakpoint) {
- margin-bottom: rem-calc(48);
+ @media (min-width: $medium-breakpoint) {
+ .divider {
+ display: inline-block;
+ }
}
}
.debate {
- @extend .debate-featured;
- margin-bottom: 0;
- margin-top: 0;
-
- .panel {
- border-radius: 0;
- box-shadow: 0px 1px 3px 0 $border;
- margin-bottom: rem-calc(12);
- min-height: rem-calc(192);
- padding-top: rem-calc(12);
-
- @media (min-width: $small-breakpoint) {
- margin-bottom: rem-calc(-1);
- padding-bottom: rem-calc(12);
- }
-
- .label-debate {
- line-height: $line-height;
- padding-bottom: 0;
- }
-
- h3 {
- margin-top: 0;
- min-height: rem-calc(48);
- }
-
- .debate-content {
- margin: 0;
- min-height: rem-calc(180);
-
- .tags {
- display: block;
- }
- }
-
- .icon-debates {
- font-size: rem-calc(18);
- left: rem-calc(60);
- top: 0;
- }
-
- .debate-description {
- height: rem-calc(72);
- margin-top: 0;
- }
- }
.votes {
+ @include votes;
border: 1px solid $votes-border;
margin: 0 rem-calc(-12);
@@ -390,7 +762,7 @@
}
@media (min-width: $small-breakpoint) {
- .like {
+ .like, .unlike {
span {
display: block;
@@ -398,388 +770,51 @@
}
}
}
-
- .not-logged {
- line-height: $line-height;
- padding-top: rem-calc(24);
- }
-
- .anonymous-votes, .organizations-votes {
- padding-top: rem-calc(24);
- }
-
- .divider {
- display: none;
- }
-
- @media (min-width: $medium-breakpoint) {
- .divider {
- display: inline-block;
- }
- }
}
}
-// 03. Show
-// - - - - - - - - - - - - - - - - - - - - - - - - -
+.proposal {
-.debate-show {
- padding-top: rem-calc(12);
+ .supports {
+ @include supports;
+ border: 1px solid $proposals-border;
+ margin: 0 rem-calc(-12);
- .back {
- @include back;
- }
-
- .icon-angle-left {
- @extend .back;
- }
-
- h1 {
- clear: both;
- font-size: rem-calc(30);
- font-weight: bold;
- margin: 0;
- text-transform: lowercase;
-
- &:first-letter {
- text-transform: uppercase;
- }
- }
-
- .edit-debate {
- margin-bottom: 0;
- }
-
- .debate-info {
- clear: both;
- color: $text-medium;
- font-weight: lighter;
- line-height: $line-height*2;
- text-align: justify;
-
- a {
- color: $text-medium;
+ @media (min-width: $small-breakpoint) {
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ margin: 0 rem-calc(-25) 0 rem-calc(12);
}
- p {
- font-size: rem-calc(15);
- line-height: $line-height;
- margin-bottom: 0;
- }
- }
-
- .debate-description {
- font-size: rem-calc(15);
- line-height: rem-calc(30);
- }
-
- ul, ol {
- margin: rem-calc(12) 0;
-
- li {
- font-size: rem-calc(15);
- margin-bottom: rem-calc(15);
- }
- }
-
- .author-photo {
- line-height: $line-height*2;
- margin-right: rem-calc(6);
- vertical-align: middle;
- width: 32px;
- }
-
- .author {
- color: $text;
- font-weight: bold;
- }
-
- aside {
-
- h3 {
- border-top: 2px solid $brand;
- display: inline-block;
- font-size: rem-calc(16);
- margin: -1px 0 rem-calc(12);
- padding-top: rem-calc(6);
- text-transform: uppercase;
- }
- }
-
- .votes {
- @include votes;
- border: 0;
- border-radius: 0;
- margin: 0;
-
- .total-votes {
+ &:after {
+ content: none;
+ position: absolute;
display: block;
- float: none;
+ border-style: solid;
+ border-color: #664212 transparent transparent transparent;
+ bottom: rem-calc(-14);
+ border-left-width: 0;
+ border-right-color: transparent;
+ right: rem-calc(-1);
+ border-width: 1em 1em 0 0;
+
+ @media (min-width: $small-breakpoint) {
+ content: "";
+ }
+ }
+
+ .total-supports {
+ display: inline-block;
line-height: $line-height;
- }
+ padding-top: rem-calc(12);
+ vertical-align: top;
- .not-logged {
- line-height: $line-height;
- padding: rem-calc(24);
- }
-
- @media (min-width: $small-breakpoint + em-calc(1)) and (max-width:$medium-breakpoint) {
- .in-favor, .against {
- text-align: left;
- width: rem-calc(100);
- }
- }
-
- .divider {
- display: none;
- }
-
- @media (min-width: $medium-breakpoint) {
- .divider {
- display: inline-block;
- }
- }
- }
-
- .leave-comment {
- display: inline-block;
- margin-top: rem-calc(24);
- }
-
- .tags {
- display: block;
- margin: rem-calc(24) 0;
-
- a {
- margin-right: rem-calc(6);
- }
- }
-}
-
-.bullet {
- color: $border;
-}
-
-// 04. New
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-.debate-new {
- background: white;
- padding-top: rem-calc(24);
-
- .back {
- @include back;
- }
-
- h1 {
- clear: both;
- font-size: rem-calc(36);
- font-weight: bold;
- line-height: $line-height*2;
- margin-bottom: rem-calc(24);
- }
-
- .icon-debates {
- color: $debates;
- font-size: rem-calc(60);
- line-height: $line-height;
- opacity: .5;
- }
-
- h2 {
- clear: both;
- font-size: rem-calc(20);
- font-weight: bold;
- line-height: $line-height;
- margin: 0;
- }
-
- .recommendations {
- list-style-type: none;
- margin-left: 0;
- margin-top: rem-calc(24);
-
- li {
- font-size: rem-calc(12);
- margin: rem-calc(12) 0;
-
- &:before {
- color: $debates;
- content: "l ";
- font-family: "icons" !important;
+ @media (min-width: $small-breakpoint) {
+ display: block;
+ float: none;
+ margin-left: 0;
+ padding-top: 0;
}
}
}
}
-
-.debate-edit {
- @extend .debate-new;
-}
-
-// 05. Comments
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-.comments {
- background: $white;
- background-repeat: repeat-x;
- padding-top: rem-calc(24);
- padding-bottom: rem-calc(96);
-
- h2 {
- margin: 0;
- font-weight: bold;
-
- span {
- font-size: rem-calc(18);
- font-weight: normal;
- opacity: .8;
- }
- }
-
- .comment {
- margin: rem-calc(6) 0;
-
- p {
- margin-bottom: 0;
- }
-
- .comment-votes {
- color: $text-medium;
- font-weight: lighter;
- margin: rem-calc(8) rem-calc(12) rem-calc(6) 0;
-
- a {
- color: $text-light;
- display: inline-block;
- vertical-align: top;
-
- &:hover {
- color: $text-medium;
- }
- }
-
- [class^="icon-"] {
- font-size: rem-calc(20);
- vertical-align: middle;
- }
- }
-
- .comment-body {
- margin-left: rem-calc(42);
-
- p {
- font-size: rem-calc(14);
- }
-
- .reply {
- background: white;
- border: 1px solid $border;
- font-size: rem-calc(12);
- margin: rem-calc(6) 0;
- padding: rem-calc(6);
-
- .divider {
- color: $text-light;
- }
- }
-
- .comment-user {
- margin-top: rem-calc(6);
- padding: rem-calc(6) 0;
- overflow: hidden;
-
- @each $n in ("1", "2", "3","4", "5") {
- &.level-#{$n} {
- @if $n == "5" {
- background: $comment-level-5;
- padding: rem-calc(6) rem-calc(12);
- }
- @elseif $n == "1" {
- background: none;
- padding: rem-calc(6) rem-calc(12);
- }
- @else {
- background: $comment-official;
- padding: rem-calc(6) rem-calc(12);
- }
- }
- }
-
- &.is-author {
- background: $comment-author;
- padding: rem-calc(6) rem-calc(12);
- }
-
- &.is-admin {
- background: $comment-admin;
- padding: rem-calc(6) rem-calc(12);
- }
-
- &.is-moderator {
- @extend .is-admin;
- }
-
- &.level-5 {
- background: $comment-level-5;
- padding: rem-calc(6) rem-calc(12);
- }
- }
- }
-
- .is-deleted {
- background: $deleted;
- margin-left: rem-calc(42);
- padding: rem-calc(6) rem-calc(12);
- }
-
- .comment-children {
- border-left: 1px dashed $border;
- margin-left: rem-calc(42);
- padding-left: rem-calc(6);
-
- @media only screen and (max-width: 40em) {
- margin-left: rem-calc(16);
- }
- }
-
- .comment-info {
- color: $text-light;
- font-size: rem-calc(13);
- font-weight: lighter;
- margin-top: rem-calc(6);
- vertical-align: middle;
-
- span.user-name {
- color: $text;
- font-weight: bold;
- }
- }
- }
-}
-
-.faded {
- opacity: 0.4;
-}
-
-// 06. Flags
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-.flag-content {
-
- .button {
- background: none;
- margin-bottom: 0;
- padding: 0;
- }
-}
-
-.flag-disable {
- color: $text-medium;
- line-height: rem-calc(24);
- vertical-align: middle;
-}
-
-.flag-active {
- @extend .flag-disable;
- color: $delete;
-}
diff --git a/app/assets/stylesheets/proposals.scss b/app/assets/stylesheets/proposals.scss
deleted file mode 100644
index d82d57013..000000000
--- a/app/assets/stylesheets/proposals.scss
+++ /dev/null
@@ -1,775 +0,0 @@
-// Table of Contents
-//
-// 01. Debates
-// 02. Index
-// 02.1. Featured
-// 02.2. List
-// 03. Show
-// 04. New
-// 05. Comments
-// 06. Flags
-//
-
-// 01. Proposals
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-.button-proposal {
- background: $proposals;
-
- &:hover {
- background: $proposals-border;
- }
-}
-
-@mixin supports {
- background: $proposals;
- border-top: 1px solid $proposals-border;
- margin: 0 rem-calc(-12);
- padding: rem-calc(14) rem-calc(12);
- position: relative;
-
- .progress {
- background-color: rgba(255,255,255,.8);
- height: rem-calc(12);
- margin-bottom: rem-calc(6);
- margin-top: rem-calc(4);
-
- .meter {
- background: $votes-like;
- }
- }
-
- .percentage {
- font-size: rem-calc(10);
- color: $brand;
- vertical-align: top;
- position: absolute;
- top: 17px;
- right: 18px;
- }
-
- abbr {
- color: white;
-
- &[title] {
- border-bottom: 1px dotted white;
- }
- }
-
- .button-support {
- background: white;
- color: $proposals;
- display: inline-block;
- font-size: rem-calc(14);
- margin-top: rem-calc(12);
-
- &:hover {
- background: $proposals-border;
- color: white;
- cursor: pointer;
- }
-
- &:active {
- opacity: .75;
- }
- }
-
- .total-supports {
- color: white;
- text-align: center;
- font-size: rem-calc(14);
-
- span {
- display: block;
- font-size: rem-calc(11);
- opacity: .75;
- }
- }
-
- .divider {
- margin: 0 rem-calc(6);
- }
-
- .not-logged {
- background: rgba(255,164,45,.9);
- color: white;
- height: 100%;
- left: 0;
- line-height: $line-height*2;
- padding-top: rem-calc(12);
- 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: $warning-color;
- height: 100%;
- left: 0;
- line-height: $line-height;
- padding-top: rem-calc(12);
- position: absolute;
- text-align: center;
- top: 0;
- width: 100%;
-
- p {
- color: $warning-color;
- margin: 0 rem-calc(12);
- text-align: left;
- }
-
- a {
- color: $warning-color;
- font-weight: bold;
- text-decoration: underline;
- }
- }
-
- .supported {
- color: white;
- margin-top: rem-calc(12);
- }
-}
-
-// 02. Index
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-// 02.1. Featured
-// - - - - - - - - - - - - -
-
-.proposal-featured {
-
- .panel {
- background: white;
- border: 1px solid;
- border-color: #e5e6e9 #dfe0e4 #d0d1d5;
- border-radius: rem-calc(3);
- margin-bottom: rem-calc(24);
- padding: rem-calc(24) rem-calc(12) 0 rem-calc(12);
-
- .proposal-content {
- min-height: rem-calc(353);
- }
-
- .label-proposal {
- background: none;
- clear: both;
- color: $proposals;
- display: block;
- font-size: rem-calc(12);
- font-weight: bold;
- text-transform: uppercase;
- padding-left: 0;
- padding-top: 0;
- }
-
- .icon-proposals {
- color: $proposals;
- font-size: rem-calc(36);
- line-height: $line-height;
- position: absolute;
- right: rem-calc(18);
- top: rem-calc(12);
- }
-
- h3 {
- font-weight: bold;
- margin: rem-calc(8) 0 0 0;
- min-height: rem-calc(65);
-
- a {
- clear: both;
- color: $text;
- display: block;
- font-size: rem-calc(16);
- line-height: $line-height;
- text-transform: lowercase;
-
- &:first-letter {
- text-transform: uppercase;
- }
- }
- }
-
- .proposal-info {
- color: $text-medium;
- font-weight: lighter;
- margin-bottom: 0;
-
- .icon-comments {
- font-size: rem-calc(16);
- vertical-align: top;
- }
-
- a {
- color: $text-medium;
- }
- }
-
- .proposal-description {
- color: $text;
- font-size: rem-calc(13);
- height: rem-calc(156);
- line-height: $line-height;
- margin-bottom: rem-calc(12);
- margin-top: rem-calc(24);
- overflow: hidden;
- position: relative;
-
- a {
- color: $text;
- }
-
- ul, ol {
-
- li {
- font-size: rem-calc(13);
- margin-bottom: rem-calc(12);
- }
- }
- }
-
- .truncate {
- background: image-url('truncate.png');
- background-repeat: repeat-x;
- bottom: 0;
- height: 24px;
- position: absolute;
- width: 100%;
- }
-
- p {
- color: $text;
- font-size: rem-calc(14);
- line-height: $line-height;
- margin-bottom: rem-calc(12);
-
- &.debate-info {
- font-size: rem-calc(13);
- }
- }
- }
-
- .supports {
- @include supports;
- }
-}
-
-// 02.2. List
-// - - - - - - - - - - - - -
-
-.proposals-list {
-
- @media (min-width: $small-breakpoint) {
- margin-bottom: rem-calc(48);
- }
-}
-
-.proposal {
- @extend .proposal-featured;
- margin-bottom: 0;
- margin-top: 0;
-
- .panel {
- border-radius: 0;
- box-shadow: 0px 1px 3px 0 $border;
- margin-bottom: rem-calc(12);
- min-height: rem-calc(192);
- padding-top: rem-calc(12);
-
- @media (min-width: $small-breakpoint) {
- margin-bottom: rem-calc(-1);
- padding-bottom: rem-calc(12);
- }
-
- .label-proposal {
- line-height: $line-height;
- padding-bottom: 0;
- }
-
- h3 {
- margin-top: 0;
- min-height: rem-calc(48);
- }
-
- .proposal-content {
- margin: 0;
- min-height: rem-calc(180);
-
- .tags {
- display: block;
- }
- }
-
- .icon-proposals {
- font-size: rem-calc(18);
- left: rem-calc(88);
- top: 0;
- }
-
- .proposal-description {
- height: rem-calc(72);
- margin-top: 0;
- }
- }
-
- .supports {
- border: 1px solid $proposals-border;
- margin: 0 rem-calc(-12);
-
- @media (min-width: $small-breakpoint) {
- border-top-left-radius: 3px;
- border-bottom-left-radius: 3px;
- margin: 0 rem-calc(-25) 0 rem-calc(12);
- }
-
- &:after {
- content: none;
- position: absolute;
- display: block;
- border-style: solid;
- border-color: #664212 transparent transparent transparent;
- bottom: rem-calc(-14);
- border-left-width: 0;
- border-right-color: transparent;
- right: rem-calc(-1);
- border-width: 1em 1em 0 0;
-
- @media (min-width: $small-breakpoint) {
- content: "";
- }
- }
-
- .total-supports {
- display: inline-block;
- line-height: $line-height;
- padding-top: rem-calc(12);
- vertical-align: top;
-
- @media (min-width: $small-breakpoint) {
- display: block;
- float: none;
- margin-left: 0;
- padding-top: 0;
- }
- }
-
- .not-logged {
- line-height: $line-height;
- padding-top: rem-calc(24);
- }
-
- .anonymous-votes, .organizations-votes {
- padding-top: rem-calc(24);
- }
-
- .divider {
- display: none;
- }
-
- @media (min-width: $medium-breakpoint) {
- .divider {
- display: inline-block;
- }
- }
- }
-}
-
-// 03. Show
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-.proposal-show {
- padding-top: rem-calc(12);
-
- .back {
- @include back;
- }
-
- .icon-angle-left {
- @extend .back;
- }
-
- h1 {
- clear: both;
- font-size: rem-calc(30);
- font-weight: bold;
- margin: 0;
- text-transform: lowercase;
-
- &:first-letter {
- text-transform: uppercase;
- }
- }
-
- h4 {
- margin: rem-calc(12) 0;
- }
-
- .edit-proposal {
- margin-bottom: 0;
- }
-
- .proposal-info {
- clear: both;
- color: $text-medium;
- font-weight: lighter;
- line-height: $line-height*2;
- text-align: justify;
-
- a {
- color: $text-medium;
- }
-
- p {
- font-size: rem-calc(15);
- line-height: $line-height;
- margin-bottom: 0;
- }
- }
-
- .proposal-description {
- font-size: rem-calc(15);
- line-height: rem-calc(30);
- }
-
- ul, ol {
- margin: rem-calc(12) 0;
-
- li {
- font-size: rem-calc(15);
- margin-bottom: rem-calc(15);
- }
- }
-
- .author-photo {
- line-height: $line-height*2;
- margin-right: rem-calc(6);
- vertical-align: middle;
- width: 32px;
- }
-
- .author {
- color: $text;
- font-weight: bold;
- }
-
- aside {
-
- h3 {
- border-top: 2px solid $brand;
- display: inline-block;
- font-size: rem-calc(16);
- margin: -1px 0 rem-calc(12);
- padding-top: rem-calc(6);
- text-transform: uppercase;
- }
- }
-
- blockquote {
- margin-top: rem-calc(12);
- padding-top: 0;
- font-size: rem-calc(15);
- line-height: rem-calc(30);
- }
-
- .document-link {
- border: 1px solid $border;
- display: block;
- margin-top: rem-calc(12);
- padding: rem-calc(12);
- position: relative;
-
- a {
- padding-left: rem-calc(24);
- }
-
- :before {
- color: #007BB7;
- content: "G";
- font-family: "icons" !important;
- font-size: rem-calc(24);
- left: rem-calc(6);
- padding-top: rem-calc(3);
- position: absolute;
- top: 0;
- }
- }
-
- .video-link {
- @extend .document-link;
-
- :before {
- color: #CC181E;
- content: "D";
- }
- }
-
- .supports {
- @include supports;
- border: 0;
- border-radius: 0;
- margin: 0;
-
- .total-supports {
- display: block;
- float: none;
- line-height: $line-height;
- }
-
- .not-logged {
- line-height: $line-height;
- padding: rem-calc(24);
- }
- }
-
- .leave-comment {
- display: inline-block;
- margin-top: rem-calc(24);
- }
-
- .tags {
- display: block;
- margin: rem-calc(24) 0;
-
- a {
- margin-right: rem-calc(6);
- }
- }
-}
-
-.bullet {
- color: $border;
-}
-
-// 04. New
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-.proposal-new {
- background: white;
- padding-top: rem-calc(24);
-
- .back {
- @include back;
- }
-
- h1 {
- clear: both;
- font-size: rem-calc(36);
- font-weight: bold;
- line-height: $line-height*2;
- margin-bottom: rem-calc(24);
- }
-
- .icon-proposals {
- color: $proposals;
- font-size: rem-calc(50);
- line-height: $line-height;
- opacity: .5;
- }
-
- h2 {
- clear: both;
- font-size: rem-calc(20);
- font-weight: bold;
- line-height: $line-height;
- margin: 0;
- }
-
- .recommendations {
- list-style-type: none;
- margin-left: 0;
- margin-top: rem-calc(24);
-
- li {
- font-size: rem-calc(12);
- margin: rem-calc(12) 0;
-
- &:before {
- color: $proposals;
- content: "l ";
- font-family: "icons" !important;
- }
- }
- }
-}
-
-.proposal-edit {
- @extend .proposal-new;
-}
-
-// 05. Comments
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-.comments {
- background: $white;
- background-repeat: repeat-x;
- padding-top: rem-calc(24);
- padding-bottom: rem-calc(96);
-
- h2 {
- margin: 0;
- font-weight: bold;
-
- span {
- font-size: rem-calc(18);
- font-weight: normal;
- opacity: .8;
- }
- }
-
- .comment {
- margin: rem-calc(6) 0;
-
- p {
- margin-bottom: 0;
- }
-
- .comment-votes {
- color: $text-medium;
- font-weight: lighter;
- margin: rem-calc(8) rem-calc(12) rem-calc(6) 0;
-
- a {
- color: $text-light;
- display: inline-block;
- vertical-align: top;
-
- &:hover {
- color: $text-medium;
- }
- }
-
- [class^="icon-"] {
- font-size: rem-calc(20);
- vertical-align: middle;
- }
- }
-
- .comment-body {
- margin-left: rem-calc(42);
-
- p {
- font-size: rem-calc(14);
- }
-
- .reply {
- background: white;
- border: 1px solid $border;
- font-size: rem-calc(12);
- margin: rem-calc(6) 0;
- padding: rem-calc(6);
-
- .divider {
- color: $text-light;
- }
- }
-
- .comment-user {
- margin-top: rem-calc(6);
- padding: rem-calc(6) 0;
- overflow: hidden;
-
- @each $n in ("1", "2", "3","4", "5") {
- &.level-#{$n} {
- @if $n == "5" {
- background: $comment-level-5;
- padding: rem-calc(6) rem-calc(12);
- }
- @elseif $n == "1" {
- background: none;
- padding: rem-calc(6) rem-calc(12);
- }
- @else {
- background: $comment-official;
- padding: rem-calc(6) rem-calc(12);
- }
- }
- }
-
- &.is-author {
- background: $comment-author;
- padding: rem-calc(6) rem-calc(12);
- }
-
- &.is-admin {
- background: $comment-admin;
- padding: rem-calc(6) rem-calc(12);
- }
-
- &.is-moderator {
- @extend .is-admin;
- }
-
- &.level-5 {
- background: $comment-level-5;
- padding: rem-calc(6) rem-calc(12);
- }
- }
- }
-
- .is-deleted {
- background: $deleted;
- margin-left: rem-calc(42);
- padding: rem-calc(6) rem-calc(12);
- }
-
- .comment-children {
- border-left: 1px dashed $border;
- margin-left: rem-calc(42);
- padding-left: rem-calc(6);
-
- @media only screen and (max-width: 40em) {
- margin-left: rem-calc(16);
- }
- }
-
- .comment-info {
- color: $text-light;
- font-size: rem-calc(13);
- font-weight: lighter;
- margin-top: rem-calc(6);
- vertical-align: middle;
-
- span.user-name {
- color: $text;
- font-weight: bold;
- }
- }
- }
-}
-
-.faded {
- opacity: 0.4;
-}
-
-// 06. Flags
-// - - - - - - - - - - - - - - - - - - - - - - - - -
-
-.flag-content {
-
- .button {
- background: none;
- margin-bottom: 0;
- padding: 0;
- }
-}
-
-.flag-disable {
- color: $text-medium;
- line-height: rem-calc(24);
- vertical-align: middle;
-}
-
-.flag-active {
- @extend .flag-disable;
- color: $delete;
-}
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb
index 2267c2360..daa90c7da 100644
--- a/app/controllers/pages_controller.rb
+++ b/app/controllers/pages_controller.rb
@@ -47,6 +47,6 @@ class PagesController < ApplicationController
end
def blog
- redirect_to "http://diario.madrid.es/blog/category/gobiernoabierto/"
+ redirect_to "http://diario.madrid.es/participa/"
end
end
diff --git a/app/models/concerns/taggable.rb b/app/models/concerns/taggable.rb
index 1cce0152d..52efc04a7 100644
--- a/app/models/concerns/taggable.rb
+++ b/app/models/concerns/taggable.rb
@@ -3,6 +3,7 @@ module Taggable
included do
acts_as_taggable
+ validate :max_number_of_tags
end
def tag_list_with_limit(limit = nil)
@@ -17,4 +18,8 @@ module Taggable
count = tags.size - limit
count < 0 ? 0 : count
end
+
+ def max_number_of_tags
+ errors.add(:tag_list, :less_than_or_equal_to, count: 6) if tag_list.count > 6
+ end
end
diff --git a/app/models/proposal.rb b/app/models/proposal.rb
index b14d2e194..f7c1c5078 100644
--- a/app/models/proposal.rb
+++ b/app/models/proposal.rb
@@ -65,7 +65,7 @@ class Proposal < ActiveRecord::Base
end
def code
- "#{Setting.value_for("proposal_code_prefix")}-#{created_at.strftime('%Y-%M')}-#{id}"
+ "#{Setting.value_for("proposal_code_prefix")}-#{created_at.strftime('%Y-%m')}-#{id}"
end
def after_commented
diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb
index ce8732845..c52219955 100644
--- a/app/views/account/show.html.erb
+++ b/app/views/account/show.html.erb
@@ -1,35 +1,20 @@
<%= link_to t("account.show.change_credentials_link"), edit_user_registration_path, class: "button radius small secondary right" %>
- <% unless @account.organization? %>
-
-
- <% if current_user.level_three_verified? %>
-
-
- <%= t("account.show.verified_account") %>
-
- <% elsif current_user.level_two_verified? %>
- <%= link_to t("account.show.finish_verification"), verification_path, class: "button radius small success right" %>
- <% else %>
- <%= link_to t("account.show.verify_my_account"), verification_path, class: "button radius small success right" %>
- <% end %>
-
-
- <% end %>
-
<%= t("account.show.title") %>
+
+ <%= avatar_image(@account, seed: @account.id, size: 60) %>
+
+
<%= t("account.show.title") %>
<%= form_for @account, as: :account, url: account_path do |f| %>
<%= render "shared/errors", resource: @account %>
-
-
<%= t("account.show.avatar")%>
- <%= avatar_image(@account, seed: @account.id, size: 60) %>
+
<%= t("account.show.personal")%>
-
+
<% if @account.organization? %>
<%= f.fields_for :organization do |fo| %>
<%= fo.text_field :name, autofocus: true, maxlength: Organization.name_max_length, placeholder: t("account.show.organization_name_label") %>
@@ -57,10 +42,58 @@
<%= t("account.show.email_on_comment_reply_label") %>
<% end %>
+
+ <%= f.submit t("account.show.save_changes_submit"), class: "button radius" %>
-
- <%= f.submit t("account.show.save_changes_submit"), class: "button radius" %>
+
+
<%= t("account.show.user_permission_title") %>
+
+
<%= t("account.show.user_permission_info") %>
+
+
+ - <%= t("account.show.user_permission_debates") %>
+ - <%= t("account.show.user_permission_proposal") %>
+ -
+ <% if current_user.level_two_verified? || current_user.level_three_verified? %>
+
+ <% else %>
+
+ <% end %>
+ <%= t("account.show.user_permission_support_proposal") %>
+
+ -
+ <% if current_user.level_three_verified? %>
+
+ <% else %>
+
+ <% end %>
+ <%= t("account.show.user_permission_votes") %>
+
+
+
+
+ <%= t("account.show.user_permission_verify_info") %>
+
+ <%= t("account.show.user_permission_verify") %>
+
+
+ <% unless @account.organization? %>
+
+
+ <% if current_user.level_three_verified? %>
+
+
+ <%= t("account.show.verified_account") %>
+
+ <% elsif current_user.level_two_verified? %>
+ <%= link_to t("account.show.finish_verification"), verification_path, class: "button radius small success" %>
+ <% else %>
+ <%= link_to t("account.show.verify_my_account"), verification_path, class: "button radius small success" %>
+ <% end %>
+
+
+ <% end %>
<% end %>
diff --git a/app/views/admin/stats/show.html.erb b/app/views/admin/stats/show.html.erb
index 31a0dbf2c..ae404f8ad 100644
--- a/app/views/admin/stats/show.html.erb
+++ b/app/views/admin/stats/show.html.erb
@@ -80,12 +80,12 @@
-
<%= t "admin.stats.show.combined_title" %>
+ <%= t "admin.stats.show.visits_title" %>
<%= visits_chart_tag id: "visits" %>
-
<%= t "admin.stats.show.visits_title" %>
+ <%= t "admin.stats.show.combined_title" %>
<%= events_chart_tag @event_types.keys, id: 'combined' %>
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb
index f552272e2..e06517e75 100644
--- a/app/views/devise/confirmations/new.html.erb
+++ b/app/views/devise/confirmations/new.html.erb
@@ -1,5 +1,6 @@
<% provide :title do %><%= t("devise_views.confirmations.new.title") %><% end %>
-
<%= t("devise_views.confirmations.new.title") %>
+
<%= t("devise_views.confirmations.new.title") %>
+
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= render 'shared/errors', resource: resource %>
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index c82774991..5f381555a 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -1,5 +1,5 @@
<% provide :title do %><%= t("devise_views.passwords.new.title") %><% end %>
-
<%= t("devise_views.passwords.new.title") %>
+
<%= t("devise_views.passwords.new.title") %>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<%= render 'shared/errors', resource: resource %>
diff --git a/app/views/kaminari/_paginator.html.erb b/app/views/kaminari/_paginator.html.erb
index 6e15a545d..9e7c906cd 100644
--- a/app/views/kaminari/_paginator.html.erb
+++ b/app/views/kaminari/_paginator.html.erb
@@ -1,6 +1,6 @@
<%= paginator.render do -%>