merges master and fixes conflicts
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,3 +25,4 @@
|
||||
|
||||
# Mac finder artifacts
|
||||
.DS_Store
|
||||
.ruby-gemset
|
||||
|
||||
2
Gemfile
2
Gemfile
@@ -52,7 +52,7 @@ group :development, :test do
|
||||
gem 'fuubar'
|
||||
gem 'launchy'
|
||||
gem 'quiet_assets'
|
||||
gem 'letter_opener_web', '~> 1.2.0'
|
||||
gem 'letter_opener_web', '~> 1.3.0'
|
||||
gem 'i18n-tasks'
|
||||
gem 'capistrano', '3.4.0', require: false
|
||||
gem "capistrano-bundler", '1.1.4', require: false
|
||||
|
||||
11
Gemfile.lock
11
Gemfile.lock
@@ -62,8 +62,7 @@ GEM
|
||||
debug_inspector (>= 0.0.1)
|
||||
browser (0.9.1)
|
||||
builder (3.2.2)
|
||||
byebug (5.0.0)
|
||||
columnize (= 0.9.0)
|
||||
byebug (6.0.2)
|
||||
cancancan (1.12.0)
|
||||
capistrano (3.4.0)
|
||||
i18n
|
||||
@@ -100,7 +99,6 @@ GEM
|
||||
execjs
|
||||
coffee-script-source (1.9.1.1)
|
||||
colorize (0.7.7)
|
||||
columnize (0.9.0)
|
||||
coveralls (0.8.2)
|
||||
json (~> 1.8)
|
||||
rest-client (>= 1.6.8, < 2)
|
||||
@@ -179,9 +177,10 @@ GEM
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.4.1)
|
||||
launchy (~> 2.2)
|
||||
letter_opener_web (1.2.3)
|
||||
letter_opener_web (1.3.0)
|
||||
actionmailer (>= 3.2)
|
||||
letter_opener (~> 1.0)
|
||||
rails (>= 3.2)
|
||||
railties (>= 3.2)
|
||||
loofah (2.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.6.3)
|
||||
@@ -362,7 +361,7 @@ DEPENDENCIES
|
||||
jquery-rails
|
||||
kaminari
|
||||
launchy
|
||||
letter_opener_web (~> 1.2.0)
|
||||
letter_opener_web (~> 1.3.0)
|
||||
paranoia
|
||||
pg
|
||||
poltergeist
|
||||
|
||||
@@ -20,7 +20,7 @@ Las herramientas utilizadas para el frontend no están cerradas aún. Los estilo
|
||||
|
||||
## Configuración para desarrollo y tests
|
||||
|
||||
Prerequisitos: tener instalado git, ImageMagick, Ruby 2.2.2, la gema `bundler`, y PostgreSQL (9.4 o superior).
|
||||
Prerequisitos: tener instalado git, ImageMagick, Ruby 2.2.2, la gema `bundler`, ghostscript y PostgreSQL (9.4 o superior).
|
||||
|
||||
```
|
||||
cd participacion
|
||||
|
||||
@@ -21,7 +21,7 @@ Frontend tools used include [SCSS](http://sass-lang.com/) over [Foundation](http
|
||||
|
||||
## Configuration for development and test environments
|
||||
|
||||
Prerequisites: install git, ImageMagick, Ruby 2.2.2, bundler gem and PostgreSQL (>=9.4).
|
||||
Prerequisites: install git, ImageMagick, Ruby 2.2.2, bundler gem, ghostscript and PostgreSQL (>=9.4).
|
||||
|
||||
```
|
||||
cd participacion
|
||||
|
||||
Binary file not shown.
@@ -20,11 +20,13 @@
|
||||
<glyph unicode="l" d="M477 350c0-7-2-14-8-19l-206-207-39-39c-6-5-12-8-20-8-7 0-14 3-19 8l-142 142c-6 6-8 12-8 20 0 7 2 14 8 19l38 39c6 5 12 8 20 8 7 0 14-3 19-8l84-84 188 188c5 5 12 8 19 8 8 0 14-3 20-8l38-39c6-6 8-12 8-20z"/>
|
||||
<glyph unicode="m" d="M140 73l26 26-67 67-26-26 0-30 37 0 0-37z m150 265c0 4-2 7-7 7-1 0-3-1-4-2l-155-155c-2-2-2-3-2-5 0-4 2-6 6-6 2 0 4 0 5 2l155 154c1 2 2 3 2 5z m-16 55l119-119-238-237-118 0 0 118z m195-27c0-10-3-19-10-26l-48-47-118 118 47 48c7 7 15 10 26 10 10 0 18-3 26-10l67-67c7-8 10-16 10-26z"/>
|
||||
<glyph unicode="n" d="M494 327c0-4-3-9-8-14l-103-101 24-143c0-1 0-3 0-5 0-4-1-8-3-10-2-3-4-5-8-5-4 0-8 2-12 4l-128 67-128-67c-4-2-8-4-12-4-4 0-7 2-9 5-2 2-3 6-3 10 0 1 0 3 1 5l24 143-104 101c-4 6-7 10-7 14 0 7 6 12 16 13l144 21 64 130c4 8 8 12 14 12 6 0 10-4 14-12l64-130 144-21c10-1 16-6 16-13z"/>
|
||||
<glyph unicode="p" d="M256 448c-96 0-208-64-256-192 48-96 144-160 256-160 112 0 208 64 256 160-48 128-160 192-256 192z m0-320c-96 0-176 64-192 128 16 64 96 128 192 128 96 0 176-64 192-128-16-64-96-128-192-128z m0 224c-10 0-19-2-28-5 17-7 28-24 28-43 0-27-21-48-48-48-19 0-36 11-43 28-3-9-5-18-5-28 0-53 43-96 96-96 53 0 96 43 96 96 0 53-43 96-96 96z"/>
|
||||
<glyph unicode="o" d="M410 203l-80 38-34 16c15 9 27 24 35 41 6 14 10 29 10 46 0 9-1 18-4 27-10 41-42 72-81 72-38 0-70-30-81-70-2-9-4-19-4-29 0-18 4-34 11-49 8-16 20-30 35-39l-32-15-83-38c-7-4-12-12-12-21l0-91c0-12 8-22 19-22l294 0c11 0 19 10 19 22l0 91c0 9-4 17-12 21z"/>
|
||||
<glyph unicode="q" d="M329 256c0 20-7 37-21 52-15 14-32 21-52 21-20 0-37-7-52-21-14-15-21-32-21-52 0-20 7-37 21-52 15-14 32-21 52-21 20 0 37 7 52 21 14 15 21 32 21 52z m146 31l0-63c0-3 0-5-2-7-1-2-3-3-6-4l-52-8c-4-10-8-19-12-26 7-9 17-22 31-39 2-2 3-5 3-7 0-3-1-5-3-7-5-7-14-17-28-31-14-13-23-20-27-20-2 0-5 1-7 3l-40 31c-8-5-17-8-26-11-3-26-6-44-8-53-1-6-5-8-10-8l-64 0c-2 0-5 0-7 2-2 2-3 4-3 6l-8 53c-9 3-18 6-26 10l-40-30c-2-2-4-3-7-3-3 0-5 1-7 3-24 22-40 38-47 48-2 2-2 4-2 7 0 2 0 4 2 6 3 4 8 11 14 19 7 9 12 16 16 21-5 9-9 19-12 28l-52 8c-3 0-5 1-6 3-2 2-2 4-2 7l0 63c0 3 0 5 2 7 1 2 3 3 5 4l53 8c3 8 7 17 12 26-8 11-18 24-31 39-2 3-3 5-3 7 0 2 1 4 3 7 5 7 14 17 28 30 14 14 23 21 27 21 2 0 5-1 7-3l40-31c8 5 17 8 26 11 3 26 6 44 8 53 1 6 5 8 10 8l64 0c2 0 5 0 7-2 2-2 3-4 3-6l8-53c9-3 18-6 26-10l40 30c2 2 4 3 7 3 3 0 5-1 7-3 25-23 41-39 47-49 2-1 2-3 2-6 0-2 0-4-2-6-3-4-8-11-14-19-7-9-12-16-16-21 5-9 9-18 12-28l52-8c3 0 5-1 6-3 2-2 2-4 2-7z"/>
|
||||
<glyph unicode="r" d="M17 222c-14 4-20 13-16 29 3 14 12 20 27 16 0 0 50-12 50-12 0 0-26-41-26-41 0 0-35 8-35 8m455-6c4 4 10 6 16 6 7-1 12-3 16-8 11-11 11-22-1-33 0 0-128-115-128-115-5-4-10-6-16-6-5 0-9 2-14 5 0 0-146 112-146 112 0 0-28 8-28 8 0 0 26 40 26 40 0 0 18-4 18-4 4-1 7-2 8-4 0 0 135-104 135-104 0 0 114 103 114 103m-251 112c0 0-178-280-178-280-4-8-11-12-20-12-4 0-8 2-12 5-5 3-9 8-10 14-1 7 0 12 3 17 0 0 191 300 191 300 3 6 7 9 14 11 6 2 12 1 19-3 0 0 125-80 125-80 0 0 115 166 115 166 4 6 9 9 15 10 6 1 12-1 17-5 13-8 15-18 6-31 0 0-128-185-128-185-9-12-19-14-32-6 0 0-125 79-125 79"/>
|
||||
<glyph unicode="h" d="M411 415l0 0 0 0c3 3 3 8 0 11l-10 10c-3 3-8 3-11 0l0 0-45-45c-3-3-3-7 0-10l11-11 0 0c2-3 7-3 10 0z m-162-2l0 0 14 0 0 0c4 0 8 3 8 7l0 0 0 64c0 5-3 8-8 8l0 0-14 0 0 0c-5 0-8-3-8-8l0-64 0 0c0-4 4-7 8-7z m220-106c0 4-3 7-7 8l0 0-64 0c-4 0-8-4-8-8l0-15c0-4 4-7 8-7l64 0 0 0c4 0 7 3 7 7z m-213 81c-60 0-109-49-109-109 0-23 8-45 20-63l0 0c17-25 27-59 27-96 2-2 4-4 7-4 0 0 0 0 1 0l0 0 108 0 0 0c0 0 1 0 1 0 3 0 5 2 7 5 0 38 12 73 29 99 11 17 18 37 18 59 0 60-49 109-109 109z m55-336c0 0-1 0-1 0l0 0-108 0 0 0c-1 0-1 0-1 0-4 0-8-3-8-7l0-17c0-5 4-8 8-8 0 0 0 0 1 0l0 0 108 0 0 0c0 0 1 0 1 0 4 0 7 3 7 8l0 17c0 4-3 7-7 7z m0 49c0 0-1 0-1 0l0 0-108 0 0 0c-1 0-1 0-1 0-4 0-7-4-8-8 0 0 0 0 0 0l0-17c0-4 4-8 8-8 0 0 0 0 1 1l0-1 108 0 0 1c0-1 1-1 1-1 4 0 7 4 7 8l0 17c0 4-3 8-7 8z m-197 208l0 0-64 0c-4 0-7-3-7-8l0-14c0-5 3-8 7-8l64 0 0 0c4 0 8 4 8 8l0 14c0 4-4 8-8 8z m-11 109l46-46 0 0c3-2 7-2 10 1l0 0 11 10c2 3 2 8 0 10l0 0-46 46c-2 3-7 3-10 0l-11-11c-2-3-2-7 0-10z"/>
|
||||
<glyph unicode="s" d="M492 217l-83 40c20 12 33 36 33 63 0 40-28 72-62 72-12 0-23-4-32-11 6-14 9-29 9-46 0-24-7-48-20-67 4-5 9-9 15-12l0 0 53-25c15-8 25-24 25-41l0-70 57 0c7 0 14 7 14 16l0 66c0 7-4 13-9 15z m-330 40c4 3 8 6 12 10-13 19-21 43-21 68 0 17 4 33 10 47-10 6-20 10-31 10-34 0-62-32-62-72 0-28 14-52 34-64l-84-39c-5-2-9-8-9-15l0-66c0-9 7-16 14-16l55 0 0 70c0 17 10 34 26 41z m232-49l-72 34-31 15c14 8 25 21 32 37 5 12 9 26 9 41 0 9-2 17-4 24-9 38-38 65-73 65-34 0-63-26-73-63-2-8-3-17-3-26 0-16 3-31 10-44 7-14 18-27 31-35l-29-13-75-35c-6-3-10-10-10-18l0-82c0-11 7-20 17-20l264 0c10 0 18 9 18 20l0 82c0 8-5 15-11 18z"/>
|
||||
<glyph unicode="t" d="M256 448c-106 0-192-86-192-192 0-106 86-192 192-192 106 0 192 86 192 192 0 106-86 192-192 192z m0-333c-78 0-141 63-141 141 0 34 12 66 33 90l198-198c-24-21-56-33-90-33z m108 51l-198 198c24 21 56 33 90 33 78 0 141-63 141-141 0-34-12-66-33-90z"/>
|
||||
<glyph unicode="u" d="M165 384c0 10-4 19-11 26-7 7-16 11-26 11-10 0-19-4-26-11-7-7-11-16-11-26 0-10 4-19 11-26 7-7 16-11 26-11 10 0 19 4 26 11 7 7 11 16 11 26z m304-165c0-10-3-18-10-25l-140-141c-8-7-17-10-26-10-11 0-19 3-26 10l-204 205c-8 7-14 16-19 29-5 12-7 23-7 33l0 119c0 10 3 18 10 26 8 7 16 10 26 10l119 0c10 0 21-2 33-7 13-5 22-11 30-19l204-204c7-7 10-16 10-26z"/>
|
||||
<glyph unicode="p" d="M475 238c-29 45-65 78-108 101 11-20 17-42 17-65 0-35-13-65-38-90-25-25-55-38-90-38-35 0-65 13-90 38-25 25-38 55-38 90 0 23 6 45 17 65-43-23-79-56-108-101 25-39 57-70 95-94 38-23 79-34 124-34 45 0 86 11 124 34 38 24 70 55 95 94z m-205 109c0 4-2 7-4 10-3 3-6 4-10 4-24 0-44-8-61-25-17-17-26-38-26-62 0-4 1-7 4-9 3-3 6-4 10-4 4 0 7 1 10 4 2 2 4 5 4 9 0 17 5 31 17 42 12 12 26 18 42 18 4 0 7 1 10 4 2 2 4 6 4 9z m242-109c0-7-2-13-6-20-26-44-62-79-107-105-45-27-93-40-143-40-50 0-98 13-143 40-45 26-81 61-107 105-4 7-6 13-6 20 0 6 2 13 6 19 26 44 62 79 107 106 45 26 93 39 143 39 50 0 98-13 143-39 45-27 81-62 107-106 4-6 6-13 6-19z"/>
|
||||
<glyph unicode="v" d="M426 134c0-7-3-14-8-19l-39-39c-5-5-12-8-20-8-7 0-14 3-19 8l-84 84-84-84c-5-5-12-8-19-8-8 0-15 3-20 8l-39 39c-5 5-8 12-8 19 0 8 3 14 8 20l84 84-84 84c-5 5-8 12-8 19 0 8 3 14 8 20l39 38c5 6 12 8 20 8 7 0 14-2 19-8l84-84 84 84c5 6 12 8 19 8 8 0 15-2 20-8l39-38c5-6 8-12 8-20 0-7-3-14-8-19l-84-84 84-84c5-6 8-12 8-20z"/>
|
||||
</font></defs></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
Binary file not shown.
BIN
app/assets/images/collective_avatar.png
Normal file
BIN
app/assets/images/collective_avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/assets/images/language_select.png
Normal file
BIN
app/assets/images/language_select.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -149,6 +149,20 @@ body.admin {
|
||||
}
|
||||
}
|
||||
|
||||
.verified {
|
||||
color: $check;
|
||||
}
|
||||
|
||||
.verified a {
|
||||
border-bottom: 1px dotted $check;
|
||||
color: $check;
|
||||
font-size: rem-calc(12);
|
||||
}
|
||||
|
||||
.rejected {
|
||||
color: #F04124;
|
||||
}
|
||||
|
||||
.level {
|
||||
font-size: rem-calc(12);
|
||||
}
|
||||
@@ -161,6 +175,10 @@ body.admin {
|
||||
padding: rem-calc(6) rem-calc(12);
|
||||
}
|
||||
|
||||
.button.tiny.success {
|
||||
margin-left: rem-calc(12);
|
||||
}
|
||||
|
||||
// 04. Stats
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.icon-comment-quotes {
|
||||
.icon-debates {
|
||||
color: $debates;
|
||||
font-size: rem-calc(36);
|
||||
line-height: $line-height;
|
||||
@@ -191,7 +191,7 @@
|
||||
font-weight: lighter;
|
||||
margin-bottom: 0;
|
||||
|
||||
.icon-chat-bubble-two {
|
||||
.icon-comments {
|
||||
font-size: rem-calc(16);
|
||||
vertical-align: top;
|
||||
}
|
||||
@@ -280,7 +280,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.icon-comment-quotes {
|
||||
.icon-debates {
|
||||
font-size: rem-calc(18);
|
||||
left: rem-calc(60);
|
||||
top: 0;
|
||||
@@ -450,7 +450,7 @@
|
||||
margin-bottom: rem-calc(24);
|
||||
}
|
||||
|
||||
.icon-comment-quotes {
|
||||
.icon-debates {
|
||||
color: $debates;
|
||||
font-size: rem-calc(60);
|
||||
line-height: $line-height;
|
||||
@@ -552,6 +552,10 @@
|
||||
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);
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
.icon-angle-up:before {
|
||||
content: "d";
|
||||
}
|
||||
.icon-chat-bubble-two:before {
|
||||
.icon-comments:before {
|
||||
content: "e";
|
||||
}
|
||||
.icon-twitter:before {
|
||||
@@ -58,7 +58,7 @@
|
||||
.icon-calendar:before {
|
||||
content: "g";
|
||||
}
|
||||
.icon-comment-quotes:before {
|
||||
.icon-debates:before {
|
||||
content: "i";
|
||||
}
|
||||
.icon-unlike:before {
|
||||
@@ -76,9 +76,6 @@
|
||||
.icon-star:before {
|
||||
content: "n";
|
||||
}
|
||||
.icon-eye:before {
|
||||
content: "p";
|
||||
}
|
||||
.icon-user:before {
|
||||
content: "o";
|
||||
}
|
||||
@@ -97,3 +94,12 @@
|
||||
.icon-deleted:before {
|
||||
content: "t";
|
||||
}
|
||||
.icon-tag:before {
|
||||
content: "u";
|
||||
}
|
||||
.icon-eye:before {
|
||||
content: "p";
|
||||
}
|
||||
.icon-x:before {
|
||||
content: "v";
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
// 11. Filters
|
||||
// 12. Official levels
|
||||
// 13. Pagination
|
||||
// 14. Tables
|
||||
//
|
||||
|
||||
// 01. Variables
|
||||
@@ -126,6 +127,29 @@ h1, h2, h3, h4, h5, h6 {
|
||||
}
|
||||
}
|
||||
|
||||
.sub-nav {
|
||||
background-color: #f2f2f2;
|
||||
border-radius: rem-calc(3);
|
||||
padding: rem-calc(10) rem-calc(10) rem-calc(10) 0;
|
||||
margin: rem-calc(12) 0;
|
||||
}
|
||||
|
||||
.sub-nav dt, .sub-nav dd, .sub-nav li {
|
||||
|
||||
&.active {
|
||||
background: #008CBA;
|
||||
border-radius: rem-calc(3);
|
||||
color: white;
|
||||
cursor: default;
|
||||
font-weight: normal;
|
||||
padding: 0.16667rem 0.88889rem;
|
||||
|
||||
a:hover {
|
||||
color: #737373;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 04. Header
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
@@ -136,7 +160,11 @@ header {
|
||||
min-height: rem-calc(480);
|
||||
|
||||
&.results {
|
||||
min-height: rem-calc(216);
|
||||
min-height: rem-calc(48);
|
||||
|
||||
@media (min-width: $small-breakpoint) {
|
||||
min-height: rem-calc(216);
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
@@ -181,7 +209,7 @@ header {
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
border-top-color: #fff;
|
||||
border-top-color: white;
|
||||
border-width: 8px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
@@ -189,6 +217,8 @@ header {
|
||||
|
||||
.locale {
|
||||
float: none;
|
||||
height: rem-calc(48);
|
||||
padding-top: rem-calc(3);
|
||||
text-align: center;
|
||||
|
||||
@media (min-width: 480px) {
|
||||
@@ -197,7 +227,9 @@ header {
|
||||
}
|
||||
|
||||
.external-links {
|
||||
@extend .locale;
|
||||
float: none;
|
||||
padding: rem-calc(12) 0;
|
||||
text-align: center;
|
||||
|
||||
@media (min-width: 480px) {
|
||||
float: right;
|
||||
@@ -212,54 +244,100 @@ header {
|
||||
.top-bar {
|
||||
background: rgba(0,0,0,.5);
|
||||
color: white;
|
||||
height: rem-calc(96);
|
||||
height: rem-calc(48);
|
||||
max-width: 1170px !important;
|
||||
|
||||
.name a {
|
||||
color: white;
|
||||
font-family: 'Lato';
|
||||
font-size: rem-calc(36);
|
||||
font-weight: lighter;
|
||||
line-height: $line-height*4;
|
||||
padding-left: 0;
|
||||
@media (min-width: $small-breakpoint) {
|
||||
height: rem-calc(96);
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: rem-calc(24);
|
||||
font-weight: normal;
|
||||
}
|
||||
.name {
|
||||
height: rem-calc(48);
|
||||
|
||||
img {
|
||||
margin-right: rem-calc(12);
|
||||
a {
|
||||
color: white;
|
||||
font-family: 'Lato';
|
||||
font-size: rem-calc(18);
|
||||
font-weight: lighter;
|
||||
line-height: $line-height*2;
|
||||
padding-left: 0;
|
||||
|
||||
span {
|
||||
font-size: rem-calc(14);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@media (min-width: $small-breakpoint) {
|
||||
line-height: $line-height*4;
|
||||
}
|
||||
|
||||
@media (min-width: $medium-breakpoint) {
|
||||
font-size: rem-calc(30);
|
||||
|
||||
span {
|
||||
font-size: rem-calc(20);
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
height: 48px;
|
||||
margin-right: rem-calc(6);
|
||||
width: 48px;
|
||||
|
||||
@media (min-width: $small-breakpoint) {
|
||||
height: 96px;
|
||||
margin-right: rem-calc(12);
|
||||
width: 96px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.top-bar-section {
|
||||
margin-right: rem-calc(24);
|
||||
width: 100%;
|
||||
|
||||
ul li > a {
|
||||
font-size: rem-calc(14);
|
||||
}
|
||||
|
||||
ul li, ul li:hover:not(.has-form) > a {
|
||||
background: none;
|
||||
ul li > a.button:hover, .top-bar-section ul li > a.button:focus {
|
||||
background-color: #007095 !important;
|
||||
}
|
||||
|
||||
li:not(.has-form) a:not(.button) {
|
||||
background: none;
|
||||
color: white;
|
||||
line-height: $line-height*4;
|
||||
ul li, ul li:hover:not(.has-form) > a:not(.button) {
|
||||
line-height: $line-height;
|
||||
|
||||
&:hover {
|
||||
@media (min-width: $small-breakpoint) {
|
||||
background: none;
|
||||
color: $link-hover;
|
||||
border: 0;
|
||||
line-height: $line-height*4;
|
||||
}
|
||||
}
|
||||
|
||||
li.active:not(.has-form) a:not(.button) {
|
||||
background: none;
|
||||
height: rem-calc(96);
|
||||
line-height: $line-height*4;
|
||||
ul {
|
||||
margin-right: rem-calc(12);
|
||||
|
||||
li:not(.has-form) a:not(.button) {
|
||||
background: none;
|
||||
color: white;
|
||||
|
||||
@media (min-width: $small-breakpoint) {
|
||||
line-height: $line-height*4;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
color: $link-hover;
|
||||
}
|
||||
}
|
||||
|
||||
li.active:not(.has-form) a:not(.button) {
|
||||
background: none;
|
||||
height: rem-calc(96);
|
||||
line-height: $line-height*4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +345,6 @@ header {
|
||||
color: white;
|
||||
font-size: rem-calc(14);
|
||||
height: rem-calc(72);
|
||||
padding: rem-calc(12) 0;
|
||||
|
||||
@media (min-width: 480px) {
|
||||
height: rem-calc(48);
|
||||
@@ -279,27 +356,31 @@ header {
|
||||
}
|
||||
|
||||
.subnavigation {
|
||||
background: white;
|
||||
border-bottom: 1px solid white;
|
||||
background: rgba(255,255,255,.95);
|
||||
clear: both;
|
||||
text-transform: lowercase;
|
||||
|
||||
@media (min-width: 480px) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $link;
|
||||
font-size: rem-calc(14);
|
||||
font-weight: bold;
|
||||
|
||||
&.active {
|
||||
color: $text;
|
||||
font-weight: bold;
|
||||
|
||||
&:after {
|
||||
bottom: -17px;
|
||||
bottom: -16px;
|
||||
left: 50%;
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
border-top-color: #fff;
|
||||
border-top-color: rgba(255,255,255,.95);
|
||||
border-width: 8px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
@@ -431,11 +512,35 @@ footer {
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
|
||||
form {
|
||||
.button {
|
||||
margin-top: rem-calc(24);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 08. Forms
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
form.locale-form {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
|
||||
select {
|
||||
background-image: url("language_select.png");
|
||||
|
||||
&.js-locale-switcher {
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
color: white;
|
||||
outline: none;
|
||||
padding-left: rem-calc(3);
|
||||
padding-right: rem-calc(24);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
form {
|
||||
|
||||
label {
|
||||
@@ -486,10 +591,6 @@ form {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
margin-top: rem-calc(24);
|
||||
}
|
||||
}
|
||||
|
||||
// 09. Alerts
|
||||
@@ -537,7 +638,7 @@ form {
|
||||
margin-bottom: rem-calc(24);
|
||||
}
|
||||
|
||||
.icon-comment-quotes {
|
||||
.icon-debates {
|
||||
color: $debates;
|
||||
font-size: rem-calc(60);
|
||||
line-height: $line-height;
|
||||
@@ -588,7 +689,7 @@ form {
|
||||
}
|
||||
}
|
||||
|
||||
img.initialjs-avatar {
|
||||
img.initialjs-avatar, img.avatar {
|
||||
border-radius: rem-calc(1000);
|
||||
position: relative;
|
||||
}
|
||||
@@ -685,3 +786,30 @@ ul.pagination {
|
||||
color: $text-medium;
|
||||
}
|
||||
}
|
||||
|
||||
// 14. Tables
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
|
||||
tr {
|
||||
|
||||
td {
|
||||
line-height: $line-height;
|
||||
padding: rem-calc(12) rem-calc(6);
|
||||
}
|
||||
|
||||
&:nth-child(odd) {
|
||||
background: #F0F2F6;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// 03. Forms
|
||||
// 04. Alerts
|
||||
// 05. Levels
|
||||
// 06. Responsive
|
||||
//
|
||||
|
||||
// 01. Fonts
|
||||
@@ -66,15 +67,29 @@ $alert-color: #A94442;
|
||||
// 05. Levels
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
$level-1: #43AC6A;
|
||||
$level-1: #1ABC9C;
|
||||
$level-2: #43AC6A;
|
||||
$level-3: #43AC6A;
|
||||
$level-4: #43AC6A;
|
||||
$level-5: #F08A24;
|
||||
|
||||
$author: #008CCF;
|
||||
$association: #222222;
|
||||
$association: #C0392B;
|
||||
|
||||
$comment-author: rgba(45,144,248,.15);
|
||||
$comment-official: rgba(70,219,145,.3);
|
||||
$comment-level-5: rgba(255,241,204,1);
|
||||
|
||||
// 06. Responsive
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
$small-breakpoint: em-calc(640);
|
||||
$medium-breakpoint: em-calc(1024);
|
||||
$large-breakpoint: em-calc(1440);
|
||||
$xlarge-breakpoint: em-calc(1920);
|
||||
|
||||
$small-range: (0, $small-breakpoint);
|
||||
$medium-range: ($small-breakpoint + em-calc(1), $medium-breakpoint);
|
||||
$large-range: ($medium-breakpoint + em-calc(1), $large-breakpoint);
|
||||
$xlarge-range: ($large-breakpoint + em-calc(1), $xlarge-breakpoint);
|
||||
$xxlarge-range: ($xlarge-breakpoint + em-calc(1), em-calc(99999999));
|
||||
|
||||
@@ -26,7 +26,7 @@ class AccountController < ApplicationController
|
||||
if @account.organization?
|
||||
params.require(:account).permit(:phone_number, :email_on_debate_comment, :email_on_comment_reply, organization_attributes: [:name])
|
||||
else
|
||||
params.require(:account).permit(:first_name, :last_name, :phone_number, :nickname, :use_nickname, :email_on_debate_comment, :email_on_comment_reply)
|
||||
params.require(:account).permit(:username, :email_on_debate_comment, :email_on_comment_reply)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ class DebatesController < ApplicationController
|
||||
respond_to :html, :js
|
||||
|
||||
def index
|
||||
@debates = Debate.includes(:tags).search(params).page(params[:page])
|
||||
@debates = Debate.includes(:tags).includes(:inappropiate_flags).search(params).page(params[:page])
|
||||
set_debate_votes(@debates)
|
||||
end
|
||||
|
||||
def show
|
||||
set_debate_votes(@debate)
|
||||
@comments = @debate.root_comments.with_hidden.recent.page(params[:page])
|
||||
@comments = @debate.root_comments.with_hidden.includes(:inappropiate_flags).recent.page(params[:page])
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
@@ -12,7 +12,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
|
||||
private
|
||||
|
||||
def sign_up_params
|
||||
params.require(:user).permit(:first_name, :last_name, :email, :phone_number, :password, :password_confirmation, :use_nickname, :nickname, :captcha, :captcha_key)
|
||||
params.require(:user).permit(:username, :email, :password, :password_confirmation, :captcha, :captcha_key)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@ class WelcomeController < ApplicationController
|
||||
skip_authorization_check
|
||||
|
||||
def index
|
||||
@featured_debates = Debate.includes(:tags).limit(9)
|
||||
@featured_debates = Debate.includes(:tags).limit(3)
|
||||
set_debate_votes(@featured_debates)
|
||||
end
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ class Mailer < ApplicationMailer
|
||||
@reply = reply
|
||||
@debate = @reply.debate
|
||||
parent = Comment.find(@reply.parent_id)
|
||||
mail(to: parent.author.email, subject: t('mailer.reply.subject'))
|
||||
@recipient = parent.author
|
||||
mail(to: @recipient.email, subject: t('mailer.reply.subject'))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -35,7 +35,7 @@ class InappropiateFlag < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.flagged?(user, flaggable)
|
||||
by_user_and_flaggable(user, flaggable).exists?
|
||||
!! by_user_and_flaggable(user, flaggable).try(:first)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -12,9 +12,7 @@ class User < ActiveRecord::Base
|
||||
has_one :organization
|
||||
has_many :inappropiate_flags
|
||||
|
||||
validates :first_name, presence: true, if: :use_first_name?
|
||||
validates :last_name, presence: true, if: :use_last_name?
|
||||
validates :nickname, presence: true, if: :use_nickname?
|
||||
validates :username, presence: true, unless: :organization?
|
||||
validates :official_level, inclusion: {in: 0..5}
|
||||
|
||||
validates_associated :organization, message: false
|
||||
@@ -28,9 +26,7 @@ class User < ActiveRecord::Base
|
||||
scope :officials, -> { where("official_level > 0") }
|
||||
|
||||
def name
|
||||
return nickname if use_nickname?
|
||||
return organization.name if organization?
|
||||
"#{first_name} #{last_name}"
|
||||
organization? ? organization.name : username
|
||||
end
|
||||
|
||||
def debate_votes(debates)
|
||||
@@ -71,12 +67,4 @@ class User < ActiveRecord::Base
|
||||
e.present? ? where(email: e) : none
|
||||
end
|
||||
|
||||
private
|
||||
def use_first_name?
|
||||
!organization? && !use_nickname?
|
||||
end
|
||||
|
||||
def use_last_name?
|
||||
use_first_name?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,19 +16,12 @@
|
||||
<%= f.fields_for :organization do |fo| %>
|
||||
<%= fo.text_field :name, autofocus: true, placeholder: t("account.show.organization_name_label") %>
|
||||
<% end %>
|
||||
<%= f.text_field :phone_number, placeholder: t("account.show.phone_number_label") %>
|
||||
|
||||
<% else %>
|
||||
|
||||
<%= f.text_field :first_name, placeholder: t("account.show.first_name_label") %>
|
||||
<%= f.text_field :last_name, placeholder: t("account.show.last_name_label") %>
|
||||
<%= f.text_field :nickname, placeholder: t("account.show.nickname_label") %>
|
||||
|
||||
<%= f.check_box :use_nickname, label: false %>
|
||||
<span class="checkbox"><%= t("account.show.use_nickname_label") %></span>
|
||||
|
||||
<%= f.text_field :username, placeholder: t("account.show.username_label") %>
|
||||
<% end %>
|
||||
|
||||
<%= f.text_field :phone_number, placeholder: t("account.show.phone_number_label") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
|
||||
@@ -4,59 +4,59 @@
|
||||
<%= t("admin.dashboard.index.title") %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'tags' %>>
|
||||
<li <%= "class=active" if controller_name == "tags" %>>
|
||||
<%= link_to admin_tags_path do %>
|
||||
<i class="icon-comment-quotes"></i>
|
||||
<%= t('admin.menu.debate_topics') %>
|
||||
<i class="icon-tag"></i>
|
||||
<%= t("admin.menu.debate_topics") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'debates' %>>
|
||||
<li <%= "class=active" if controller_name == "debates" %>>
|
||||
<%= link_to admin_debates_path do %>
|
||||
<i class="icon-eye"></i>
|
||||
<%= t('admin.menu.hidden_debates') %>
|
||||
<i class="icon-debates"></i>
|
||||
<%= t("admin.menu.hidden_debates") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'comments' %>>
|
||||
<li <%= "class=active" if controller_name == "comments" %>>
|
||||
<%= link_to admin_comments_path do %>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<%= t('admin.menu.hidden_comments') %>
|
||||
<i class="icon-comments"></i>
|
||||
<%= t("admin.menu.hidden_comments") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'users' %>>
|
||||
<li <%= "class=active" if controller_name == "users" %>>
|
||||
<%= link_to admin_users_path do %>
|
||||
<i class="icon-user"></i>
|
||||
<%= t('admin.menu.hidden_users') %>
|
||||
<i class="icon-eye"></i>
|
||||
<%= t("admin.menu.hidden_users") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'organizations' %>>
|
||||
<li <%= "class=active" if controller_name == "organizations" %>>
|
||||
<%= link_to admin_organizations_path do %>
|
||||
<i class="icon-comment-quotes"></i>
|
||||
<%= t('admin.menu.organizations') %>
|
||||
<i class="icon-organizations"></i>
|
||||
<%= t("admin.menu.organizations") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'officials' %>>
|
||||
<li <%= "class=active" if controller_name == "officials" %>>
|
||||
<%= link_to admin_officials_path do %>
|
||||
<i class="icon-user"></i>
|
||||
<%= t('admin.menu.officials') %>
|
||||
<%= t("admin.menu.officials") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'settings' %>>
|
||||
<li <%= "class=active" if controller_name == "settings" %>>
|
||||
<%= link_to admin_settings_path do %>
|
||||
<i class="icon-settings"></i>
|
||||
<%= t('admin.menu.settings') %>
|
||||
<%= t("admin.menu.settings") %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'stats' %>>
|
||||
<li <%= "class=active" if controller_name == "stats" %>>
|
||||
<%= link_to stats_path do %>
|
||||
<i class="icon-stats"></i>
|
||||
<%= t('admin.menu.stats') %>
|
||||
<%= t("admin.menu.stats") %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,18 +1,33 @@
|
||||
<h2><%= t("admin.comments.index.title") %></h2>
|
||||
|
||||
<!-- Filters for pending and archived comments (example on "/admin/organizations/index.html.erb")-->
|
||||
<dl class="sub-nav">
|
||||
<dt><%= t("admin.comments.index.filter") %>:</dt>
|
||||
<dd class="active"><%= t("admin.comments.filters.all") %></dd>
|
||||
<dd><%= t("admin.comments.filters.pending") %></dd>
|
||||
<dd><%= t("admin.comments.filters.archived") %></dd>
|
||||
</dl>
|
||||
<!-- Filters for pending and archived comments (example on "/admin/organizations/index.html.erb")-->
|
||||
|
||||
<h3><%= page_entries_info @comments %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<% @comments.each do |comment| %>
|
||||
<li id="<%= dom_id(comment) %>">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-10 column">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= comment.body %>
|
||||
<!-- Link to debate of this comment -->
|
||||
<%= link_to t("admin.comments.index.show_debate"), "#" %>
|
||||
<!-- /. Link to debate of this comment -->
|
||||
</div>
|
||||
<div class="small-12 medium-2 column">
|
||||
<div class="small-6 medium-4 column text-right">
|
||||
<!-- Link to archive this comment -->
|
||||
<%= link_to t("admin.actions.archive"), "#", class: "button radius tiny warning" %>
|
||||
<!-- /. Link to archive this comment -->
|
||||
<%= link_to t("admin.actions.restore"), restore_admin_comment_path(comment),
|
||||
method: :put, data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius small success right" %>
|
||||
class: "button radius tiny success" %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<h2><%= t("admin.debates.index.title") %></h2>
|
||||
|
||||
<!-- Filters for pending and archived debates (example on "/admin/organizations/index.html.erb")-->
|
||||
<dl class="sub-nav">
|
||||
<dt><%= t("admin.debates.index.filter") %>:</dt>
|
||||
<dd class="active"><%= t("admin.debates.filters.all") %></dd>
|
||||
<dd><%= t("admin.debates.filters.pending") %></dd>
|
||||
<dd><%= t("admin.debates.filters.archived") %></dd>
|
||||
</dl>
|
||||
<!-- Filters for pending and archived debates (example on "/admin/organizations/index.html.erb")-->
|
||||
|
||||
<h3><%= page_entries_info @debates %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
@@ -10,6 +19,10 @@
|
||||
<%= link_to t("admin.actions.restore"), restore_admin_debate_path(debate),
|
||||
method: :put, data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius tiny success right" %>
|
||||
|
||||
<!-- Link to archive this debate -->
|
||||
<%= link_to t("admin.actions.archive"), "#", class: "button radius tiny warning right" %>
|
||||
<!-- /. Link to archive this debate -->
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
@@ -1,17 +1,30 @@
|
||||
<h2><%= t('admin.organizations.index.title') %></h2>
|
||||
<h2><%= t("admin.organizations.index.title") %></h2>
|
||||
|
||||
<p>
|
||||
<%= t('admin.organizations.index.filter') %>:
|
||||
<!-- Search organizations -->
|
||||
<%= form_for(User.new, url: search_admin_officials_path, as: :user, method: :get) do |f| %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= text_field_tag :email, "", placeholder: t("admin.officials.index.search_email_placeholder") %>
|
||||
</div>
|
||||
<div class="form-inline small-12 medium-6 column">
|
||||
<%= f.submit t("admin.officials.index.search"), class: "button radius success" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- /. Search organizations -->
|
||||
|
||||
<dl class="sub-nav">
|
||||
<dt><%= t("admin.organizations.index.filter") %>:</dt>
|
||||
|
||||
<% @valid_filters.each do |filter| %>
|
||||
<% if @filter == filter %>
|
||||
<%= t("admin.organizations.index.filters.#{filter}") %>
|
||||
<dd class="active"><%= t("admin.organizations.index.filters.#{filter}") %></dd>
|
||||
<% else %>
|
||||
<%= link_to t("admin.organizations.index.filters.#{filter}"),
|
||||
admin_organizations_path(filter: filter) %>
|
||||
<dd><%= link_to t("admin.organizations.index.filters.#{filter}"),
|
||||
admin_organizations_path(filter: filter) %></dd>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
</dl>
|
||||
|
||||
<h3><%= page_entries_info @organizations %></h3>
|
||||
|
||||
@@ -21,23 +34,38 @@
|
||||
<td><%= organization.name %></td>
|
||||
<td><%= organization.email %></td>
|
||||
<td><%= organization.phone_number %></td>
|
||||
<!-- Badge collective name, "collective" by default -->
|
||||
<td>Colectivo</td>
|
||||
<!-- /. Badge collective name, "collective" by default -->
|
||||
<% if organization.verified? %>
|
||||
<td><%= t('admin.organizations.index.verified') %></td>
|
||||
<% end %>
|
||||
<% if can? :verify, organization %>
|
||||
<td><%= link_to t('admin.organizations.index.verify'),
|
||||
verify_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put
|
||||
%>
|
||||
<td class="verified">
|
||||
<i class="icon-check"></i>
|
||||
<%= t("admin.organizations.index.verified") %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% if organization.rejected? %>
|
||||
<td><%= t('admin.organizations.index.rejected') %></td>
|
||||
<td class="rejected">
|
||||
<i class="icon-x"></i>
|
||||
<%= t("admin.organizations.index.rejected") %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td>
|
||||
<!-- Edit collective bagde, "collective" by default -->
|
||||
<%= link_to t("admin.organizations.index.edit"), "", class: "button radius tiny secondary" %>
|
||||
<!-- /. Edit collective bagde, "collective" by default -->
|
||||
</td>
|
||||
<% if can? :verify, organization %>
|
||||
<td>
|
||||
<%= link_to t("admin.organizations.index.verify"),
|
||||
verify_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put, class: "button radius tiny success"
|
||||
%>
|
||||
</td>
|
||||
<% end %>
|
||||
<% if can? :reject, organization %>
|
||||
<td><%= link_to t('admin.organizations.index.reject'),
|
||||
<td><%= link_to t("admin.organizations.index.reject"),
|
||||
reject_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put
|
||||
method: :put, class: "button radius tiny alert"
|
||||
%>
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
@@ -5,7 +5,11 @@
|
||||
<%= t("debates.comment.deleted") %>
|
||||
<% else %>
|
||||
|
||||
<%= avatar_image(comment.user, size: 32, class: 'left') %>
|
||||
<% if comment.user.organization? %>
|
||||
<%= image_tag("collective_avatar.png", size: 32, class: "avatar left") %>
|
||||
<% else %>
|
||||
<%= avatar_image(comment.user, size: 32, class: "left") %>
|
||||
<% end %>
|
||||
<% if comment.user.hidden? %>
|
||||
<i class="icon-deleted user-deleted"></i>
|
||||
<% end %>
|
||||
@@ -27,7 +31,7 @@
|
||||
<% if comment.user.verified_organization? %>
|
||||
•
|
||||
<span class="label round is-association">
|
||||
<%= t("shared.organization") %>
|
||||
<%= t("shared.collective") %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if comment.user_id == @debate.author_id %>
|
||||
@@ -44,7 +48,9 @@
|
||||
|
||||
</div>
|
||||
|
||||
<% if comment.user.official? %>
|
||||
<% if comment.user.official? && comment.user_id == @debate.author_id %>
|
||||
<p class="comment-user level-<%= comment.user.official_level %> is-author"><%= comment.body %></p>
|
||||
<% elsif comment.user.official? %>
|
||||
<p class="comment-user level-<%= comment.user.official_level %>"><%= comment.body %></p>
|
||||
<% elsif comment.user_id == @debate.author_id %>
|
||||
<p class="comment-user is-author"><%= comment.body %></p>
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<div class="small-12 medium-9 column">
|
||||
<div class="debate-content">
|
||||
<span class="label left"><%= t("debates.debate.debate") %></span>
|
||||
<i class="icon-comment-quotes"></i>
|
||||
<i class="icon-debates"></i>
|
||||
<h3><%= link_to debate.title, debate %></h3>
|
||||
<p class="debate-info">
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<i class="icon-comments"></i>
|
||||
<%= link_to t("debates.debate.comments", count: debate.comment_threads.count), debate_path(debate, anchor: "comments") %>
|
||||
</p>
|
||||
<div class="debate-description">
|
||||
|
||||
@@ -5,18 +5,6 @@
|
||||
<div class="small-12 column">
|
||||
<h2><%= t("debates.index.showing") %></h2>
|
||||
|
||||
<select class="inline-block">
|
||||
<option value="filter_debates">
|
||||
<%= t("debates.index.filter_debates") %>
|
||||
</option>
|
||||
<option value="filter_initiatives">
|
||||
<%= t("debates.index.filter_initiatives") %>
|
||||
</option>
|
||||
<option value="filter_debates_and_initiatives">
|
||||
<%= t("debates.index.filter_debates_and_initiatives") %>
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<select class="inline-block">
|
||||
<option value="filter_news">
|
||||
<%= t("debates.index.filter_news") %>
|
||||
@@ -35,39 +23,11 @@
|
||||
<!-- Filter topic results -->
|
||||
<div class="filters row">
|
||||
<div class="small-12 column">
|
||||
<h2><%= t("debates.index.showing") %></h2>
|
||||
|
||||
<select class="inline-block">
|
||||
<option value="filter_debates">
|
||||
<%= t("debates.index.filter_debates") %>
|
||||
</option>
|
||||
<option value="filter_initiatives">
|
||||
<%= t("debates.index.filter_initiatives") %>
|
||||
</option>
|
||||
<option value="filter_debates_and_initiatives">
|
||||
<%= t("debates.index.filter_debates_and_initiatives") %>
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<select class="inline-block">
|
||||
<option value="filter_news">
|
||||
<%= t("debates.index.filter_news") %>
|
||||
</option>
|
||||
<option value="filter_votes">
|
||||
<%= t("debates.index.filter_votes") %>
|
||||
</option>
|
||||
<option value="filter_rated">
|
||||
<%= t("debates.index.filter_rated") %>
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<h2><%= t("debates.index.tag") %></h2>
|
||||
|
||||
<select class="inline-block">
|
||||
<option value="">Lista de temas</option>
|
||||
</select>
|
||||
|
||||
<h2>(43)</h2>
|
||||
<h2>
|
||||
<%= t("debates.index.filter_topic",
|
||||
number: "N",
|
||||
topic: "topic").html_safe %>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /. Filter topic results -->
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<i class="icon-comment-quotes right"></i>
|
||||
<i class="icon-debates right"></i>
|
||||
<h2><%= t("debates.new.recommendations_title") %></h2>
|
||||
<ul class="recommendations">
|
||||
<li><%= t("debates.new.recommendation_one") %></li>
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
<% if @debate.author.verified_organization? %>
|
||||
•
|
||||
<span class="label round is-association">
|
||||
<%= t("shared.organization") %>
|
||||
<%= t("shared.collective") %>
|
||||
</span>
|
||||
<% end %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= l @debate.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<i class="icon-comments"></i>
|
||||
<%= link_to t("debates.show.comments", count: @debate.comment_threads.count), "#comments" %>
|
||||
|
||||
<span class='right js-flag-as-inappropiate-actions'>
|
||||
@@ -69,12 +69,6 @@
|
||||
<div class="sidebar-divider"></div>
|
||||
<h3><%= t("debates.show.share") %></h3>
|
||||
<%= social_share_button_tag(@debate.title) %>
|
||||
|
||||
<% if user_signed_in? %>
|
||||
<%= link_to t("debates.show.leave_comment"), "#comments", class: "leave-comment" %>
|
||||
<% else %>
|
||||
<%= link_to t("debates.show.login_to_comment"), new_user_session_path, class: "leave-comment" %>
|
||||
<% end %>
|
||||
</aside>
|
||||
</div>
|
||||
</section>
|
||||
@@ -89,6 +83,13 @@
|
||||
</h2>
|
||||
<% if user_signed_in? %>
|
||||
<%= render 'comments/form', {parent: @debate, toggeable: false} %>
|
||||
<% else %>
|
||||
<br>
|
||||
<div class="alert-box radius info">
|
||||
<%= t("debates.show.login_to_comment",
|
||||
signin: link_to(t("votes.signin"), new_user_session_path),
|
||||
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render @comments %>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<header class="<%= header_css %>">
|
||||
<section class="top-links">
|
||||
<section class="top-links show-for-medium-up">
|
||||
<div class="row">
|
||||
<%= render 'shared/locale_switcher' %>
|
||||
<%= render "shared/locale_switcher" %>
|
||||
<div class="external-links">
|
||||
<%= link_to t("layouts.header.participation"), root_path, class: "selected" %> |
|
||||
<%= link_to t("layouts.header.external_link_transparency"), "#" %> |
|
||||
<%= link_to t("layouts.header.external_link_opendata"), "#" %> |
|
||||
<%= link_to t("layouts.header.external_link_blog"), "#" %>
|
||||
<%= link_to t("layouts.header.external_link_opendata"), "#" %>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -14,33 +13,36 @@
|
||||
<div class="contain-to-grid clear">
|
||||
<nav class="top-bar" data-topbar role="navigation">
|
||||
<ul class="title-area">
|
||||
<li class="toggle-topbar menu-icon"><a href="#"><span><%= t("layouts.header.menu") %></span></a></li>
|
||||
<li class="name">
|
||||
<%= link_to root_path do %>
|
||||
<%= image_tag('header_logo_madrid.png', class: 'left', size: '96x96') %>
|
||||
<%= t("layouts.header.open_gov", open: "<strong>#{t('layouts.header.open')}</strong>").html_safe %> | <span><%= t("layouts.header.participation") %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="toggle-topbar menu-icon"><a href="#"><span><%= t("layouts.header.menu") %></span></a></li>
|
||||
</ul>
|
||||
|
||||
<section class="top-bar-section">
|
||||
<%= render 'devise/menu/login_items' %>
|
||||
<%= render 'shared/admin_login_items' %>
|
||||
<%= render "devise/menu/login_items" %>
|
||||
<%= render "shared/admin_login_items" %>
|
||||
</section>
|
||||
|
||||
<section class="subnavigation row text-center">
|
||||
<div class="small-12 medium-3 column end">
|
||||
<%= link_to t("layouts.header.welcome"), root_path, class: ("active" if current_page?(root_path)) %>
|
||||
<section class="subnavigation row">
|
||||
<div class="small-12 medium-2 medium-offset-1 column end">
|
||||
<%= link_to t("layouts.header.welcome"), root_path %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column end">
|
||||
<%= link_to t("layouts.header.news"), "#" %>
|
||||
<div class="small-12 medium-2 column end">
|
||||
<%= link_to t("layouts.header.debates"), debates_path, class: ("active" if current_page?(controller: "debates")) %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column end">
|
||||
<%= link_to t("layouts.header.debates"), debates_path, class: ("active" if current_page?(controller: 'debates')) %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column end">
|
||||
<div class="small-12 medium-2 column end">
|
||||
<%= link_to t("layouts.header.initiatives"), "#" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column end">
|
||||
<%= link_to t("layouts.header.how_it_works"), "#" %>
|
||||
</div>
|
||||
<div class="small-12 medium-2 column end">
|
||||
<%= link_to t("layouts.header.external_link_blog"), "#" %>
|
||||
</div>
|
||||
</section>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -50,7 +52,7 @@
|
||||
<div class="small-12 column text-center">
|
||||
<h1><%= t("layouts.header.open_city") %></h1>
|
||||
<h2><%= t("layouts.header.open_city_slogan") %></h2>
|
||||
<%= link_to t("layouts.header.see_all_debates"), debates_path, class: 'button radius' %>
|
||||
<%= link_to t("layouts.header.see_all_debates"), debates_path, class: "button radius" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Hello,
|
||||
<%= t('mailers.comment.hi', recipient: @debate.author.name) %>
|
||||
|
||||
<div><%= @comment.author.name %></div>
|
||||
<div><%= link_to @debate.title, debate_url(@debate) %></div>
|
||||
<div><%= t('mailers.comment.new_comment_by', commenter: @comment.author.name) %></div>
|
||||
|
||||
<div><%= @comment.body %></div>
|
||||
|
||||
<div><%= link_to @debate.title, debate_url(@debate) %></div>
|
||||
@@ -1,7 +1,6 @@
|
||||
Hello,
|
||||
<%= t('mailers.reply.hi', recipient: @recipient.name) %>
|
||||
|
||||
<div><%= @reply.author.name %></div>
|
||||
<div><%= link_to @debate.title, debate_url(@debate) %></div>
|
||||
<div><%= t('mailers.reply.new_reply_by', commenter: @reply.author.name) %></div>
|
||||
|
||||
<div><%= @reply.body %></div>
|
||||
|
||||
<div><%= link_to @debate.title, debate_url(@debate) %></div>
|
||||
@@ -1,10 +1,8 @@
|
||||
<div class="locale">
|
||||
<span>
|
||||
<%= t("layouts.header.language") %>
|
||||
<form>
|
||||
<select class="js-locale-switcher" name='locale-switcher'>
|
||||
<%= available_locale_options_for_select %>
|
||||
</select>
|
||||
</form>
|
||||
</span>
|
||||
<span class="inline-block"><%= t("layouts.header.locale") %></span>
|
||||
<form class="locale-form">
|
||||
<select class="js-locale-switcher" name="locale-switcher">
|
||||
<%= available_locale_options_for_select %>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -4,17 +4,14 @@
|
||||
<h2><%= t("devise_views.users.registrations.new.title") %></h2>
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= render 'shared/errors', resource: resource %>
|
||||
|
||||
<%= link_to t("devise_views.users.registrations.new.organization_signup"), new_organization_registration_path %><br>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :first_name, autofocus: true,
|
||||
placeholder: t("devise_views.users.registrations.new.first_name_label") %>
|
||||
<%= f.text_field :last_name, placeholder: t("devise_views.users.registrations.new.last_name_label") %>
|
||||
<%= f.text_field :username, placeholder: t("devise_views.users.registrations.new.username_label") %>
|
||||
<%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %>
|
||||
<%= f.text_field :nickname, placeholder: t("devise_views.users.registrations.new.nickname_label") %>
|
||||
|
||||
<%= f.check_box :use_nickname, label: t("devise_views.users.registrations.new.use_nickname_label") %>
|
||||
|
||||
<%= f.text_field :phone_number, placeholder: t("devise_views.users.registrations.new.phone_number_label") %>
|
||||
|
||||
<%= f.password_field :password, autocomplete: "off",
|
||||
placeholder: t("devise_views.users.registrations.new.password_label") %>
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
<div class="debate-content">
|
||||
<span class="label left"><%= t("debates.debate.debate") %></span>
|
||||
<i class="icon-comment-quotes right"></i>
|
||||
<i class="icon-debates right"></i>
|
||||
<h3><%= link_to featured_debate.title, featured_debate %></h3>
|
||||
<p class="debate-info">
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<i class="icon-comments"></i>
|
||||
<%= link_to t("debates.show.comments", count: featured_debate.comment_threads.count), debate_path(featured_debate, anchor: "comments") %>
|
||||
</p>
|
||||
<div class="debate-description">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section role="main">
|
||||
<div class="filters row">
|
||||
<div class="small-12 column">
|
||||
<h2><%= t("welcome.featured_debates") %></h2>
|
||||
<h2><%= t("welcome.last_debates") %></h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id="featured-debates" class="row">
|
||||
|
||||
@@ -3,18 +3,23 @@ staging:
|
||||
ssh_port: 21
|
||||
server: staging.participacion.madrid.es
|
||||
user: xxxxx
|
||||
full_app_name: participacion
|
||||
server_name: staging.participacion.madrid.es
|
||||
db_server: postgre.participacion.madrid.es
|
||||
|
||||
preproduction:
|
||||
deploy_to: "/var/www/participacion"
|
||||
ssh_port: 2222
|
||||
server: xxx.xxx.xxx.xxx
|
||||
server1: xxx.xxx.xxx.xxx
|
||||
server2: xxx.xxx.xxx.xxx
|
||||
user: xxxxx
|
||||
full_app_name: participacion
|
||||
db_server: xxx.xxx.xxx.xxx
|
||||
|
||||
production:
|
||||
deploy_to: "/var/www/participacion"
|
||||
ssh_port: 2222
|
||||
server: xxx.xxx.xxx.xxx
|
||||
user: xxxxx
|
||||
full_app_name: participacion
|
||||
|
||||
|
||||
@@ -6,11 +6,14 @@ def deploysecret(key)
|
||||
@deploy_secrets_yml[key.to_s]
|
||||
end
|
||||
|
||||
|
||||
set :rails_env, fetch(:stage)
|
||||
set :rvm_ruby_version, '2.2.2'
|
||||
set :rvm_type, :user
|
||||
|
||||
set :application, 'participacion'
|
||||
set :full_app_name, deploysecret(:full_app_name)
|
||||
|
||||
set :server_name, deploysecret(:server_name)
|
||||
#set :repo_url, 'git@github.com:AyuntamientoMadrid/participacion.git'
|
||||
# If ssh access is restricted, probably you need to use https access
|
||||
@@ -45,9 +48,9 @@ set(:config_files, %w(
|
||||
|
||||
namespace :deploy do
|
||||
# Check right version of deploy branch
|
||||
before :deploy, "deploy:check_revision"
|
||||
# before :deploy, "deploy:check_revision"
|
||||
# Run test aund continue only if passed
|
||||
before :deploy, "deploy:run_tests"
|
||||
# before :deploy, "deploy:run_tests"
|
||||
# Compile assets locally and then rsync
|
||||
after 'deploy:symlink:shared', 'deploy:compile_assets_locally'
|
||||
after :finishing, 'deploy:cleanup'
|
||||
|
||||
@@ -6,4 +6,5 @@ set :ssh_options, port: deploysecret(:ssh_port)
|
||||
set :stage, :production
|
||||
set :rails_env, :production
|
||||
|
||||
server deploysecret(:server), user: deploysecret(:user), roles: %w(web app db importer)
|
||||
server deploysecret(:server1), user: deploysecret(:user), roles: %w(web app db importer)
|
||||
server deploysecret(:server2), user: deploysecret(:user), roles: %w(web app db importer)
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
recaptcha_public_key: <%= ENV["MADRID_RECAPTCHA_PUBLIC_KEY"] %>
|
||||
recaptcha_private_key: <%= ENV["MADRID_RECAPTCHA_PRIVATE_KEY"] %>
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
server_name: <%= fetch(:server_name) %>
|
||||
@@ -62,7 +62,8 @@ Rails.application.configure do
|
||||
|
||||
# Ignore bad email addresses and do not raise email delivery errors.
|
||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.raise_delivery_errors = true
|
||||
config.action_mailer.default_url_options = { host: Rails.application.secrets.server_name }
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
|
||||
@@ -62,7 +62,8 @@ Rails.application.configure do
|
||||
|
||||
# Ignore bad email addresses and do not raise email delivery errors.
|
||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.raise_delivery_errors = true
|
||||
config.action_mailer.default_url_options = { host: Rails.application.secrets.server_name }
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
|
||||
@@ -24,6 +24,7 @@ data:
|
||||
- config/locales/%{locale}.yml
|
||||
- config/locales/admin.%{locale}.yml
|
||||
- config/locales/moderation.%{locale}.yml
|
||||
- config/locales/mailers.%{locale}.yml
|
||||
- config/locales/devise_views.%{locale}.yml
|
||||
- config/locales/responders.%{locale}.yml
|
||||
- config/locales/kaminari.%{locale}.yml
|
||||
|
||||
@@ -18,9 +18,7 @@ en:
|
||||
title: Title
|
||||
user:
|
||||
email: Email
|
||||
first_name: "First name"
|
||||
last_name: "Last name"
|
||||
nickname: Nickname
|
||||
username: Username
|
||||
password: Password
|
||||
phone_number: Phone number
|
||||
official_position: Official position
|
||||
|
||||
@@ -18,9 +18,7 @@ es:
|
||||
title: Título
|
||||
user:
|
||||
email: Correo electrónico
|
||||
first_name: Nombre
|
||||
last_name: Apellidos
|
||||
nickname: Pseudónimo
|
||||
username: Nombre de usuario
|
||||
password: Contraseña
|
||||
phone_number: Teléfono
|
||||
official_position: Cargo público
|
||||
|
||||
@@ -25,6 +25,7 @@ en:
|
||||
verified: Verified
|
||||
rejected: Rejected
|
||||
filter: Filter
|
||||
edit: Edit
|
||||
filters:
|
||||
all: All
|
||||
pending: Pending
|
||||
@@ -35,26 +36,38 @@ en:
|
||||
hide_author: Ban author
|
||||
restore: Restore
|
||||
confirm: 'Are you sure?'
|
||||
archive: Archive
|
||||
tags:
|
||||
index:
|
||||
title: 'Debate topics'
|
||||
add_tag: 'Add a new debate topic'
|
||||
mark_as_featured: 'Mark as featured'
|
||||
mark_as_featured: 'Propose topic to create debate'
|
||||
name:
|
||||
placeholder: 'Write a topic'
|
||||
destroy: Delete Tag
|
||||
comments:
|
||||
index:
|
||||
title: Hidden comments
|
||||
show_debate: Show debate
|
||||
filter: Filter
|
||||
restore:
|
||||
success: The comment has been restored
|
||||
filters:
|
||||
all: All
|
||||
pending: Pending
|
||||
archived: Archived
|
||||
debates:
|
||||
index:
|
||||
title: Hidden debates
|
||||
filter: Filter
|
||||
show:
|
||||
back: Back
|
||||
restore:
|
||||
success: The debate has been restored
|
||||
filters:
|
||||
all: All
|
||||
pending: Pending
|
||||
archived: Archived
|
||||
users:
|
||||
index:
|
||||
title: Banned users
|
||||
|
||||
@@ -25,6 +25,7 @@ es:
|
||||
verified: Verificada
|
||||
rejected: Rechazada
|
||||
filter: Filtro
|
||||
edit: Editar
|
||||
filters:
|
||||
all: Todas
|
||||
pending: Pendientes
|
||||
@@ -33,28 +34,40 @@ es:
|
||||
actions:
|
||||
hide: Ocultar
|
||||
hide_author: Bloquear al autor
|
||||
restore: Permitir
|
||||
restore: Volver a mostrar
|
||||
confirm: '¿Estás seguro?'
|
||||
archive: Archivar
|
||||
tags:
|
||||
index:
|
||||
title: 'Temas de debate'
|
||||
add_tag: 'Añade un nuevo tema de debate'
|
||||
mark_as_featured: 'Marcar como destacado'
|
||||
mark_as_featured: 'Proponer tema al crear debate'
|
||||
name:
|
||||
placeholder: 'Escribe el nombre del tema'
|
||||
destroy: Elimina la etiqueta
|
||||
comments:
|
||||
index:
|
||||
title: Comentarios ocultos
|
||||
show_debate: Ver debate
|
||||
filter: Filtro
|
||||
restore:
|
||||
success: El comentario ha sido permitido
|
||||
filters:
|
||||
all: Todos
|
||||
pending: Pendientes
|
||||
archived: Archivados
|
||||
debates:
|
||||
index:
|
||||
title: Debates ocultos
|
||||
filter: Filtro
|
||||
show:
|
||||
back: Volver
|
||||
restore:
|
||||
success: El debate ha sido permitido
|
||||
filters:
|
||||
all: Todos
|
||||
pending: Pendientes
|
||||
archived: Archivados
|
||||
users:
|
||||
index:
|
||||
title: Usuarios bloqueados
|
||||
|
||||
@@ -50,19 +50,16 @@ en:
|
||||
back_link: "Back"
|
||||
new:
|
||||
title: "Sign up"
|
||||
first_name_label: "First name"
|
||||
last_name_label: "Last name"
|
||||
nickname_label: "Nickname"
|
||||
use_nickname_label: "Use nickname"
|
||||
username_label: "Username to use publicly"
|
||||
email_label: "Email"
|
||||
phone_number_label: "Phone number"
|
||||
password_label: "Password"
|
||||
password_confirmation_label: "Confirm password"
|
||||
submit: "Sign up"
|
||||
organization_signup: "Do you represent an organization / group?"
|
||||
organizations:
|
||||
registrations:
|
||||
new:
|
||||
title: "Sign up as organization"
|
||||
title: "Sign up as organization / collective"
|
||||
organization_name_label: "Organization name"
|
||||
email_label: "Email"
|
||||
password_label: "Password"
|
||||
@@ -86,7 +83,7 @@ en:
|
||||
login: "Log in"
|
||||
signup: "Sign up"
|
||||
signin_with_provider: "Sign in with %{provider}"
|
||||
organization_signup: "Sign up as an organization"
|
||||
organization_signup: "Sign up as an organization / collective"
|
||||
new_password: "Forgot your password?"
|
||||
new_confirmation: "Didn't receive confirmation instructions?"
|
||||
new_unlock: "Didn't receive unlock instructions?"
|
||||
|
||||
@@ -50,19 +50,16 @@ es:
|
||||
back_link: "Atrás"
|
||||
new:
|
||||
title: "Registrarse"
|
||||
first_name_label: "Nombre"
|
||||
last_name_label: "Apellidos"
|
||||
nickname_label: "Pseudónimo"
|
||||
use_nickname_label: "Usar pseudónimo"
|
||||
username_label: "Nombre a utilizar públicamente"
|
||||
email_label: "Email"
|
||||
phone_number_label: "Teléfono"
|
||||
password_label: "Contraseña"
|
||||
password_confirmation_label: "Confirmar contraseña"
|
||||
submit: "Registrarse"
|
||||
organization_signup: "¿Representas a una organización / colectivo?"
|
||||
organizations:
|
||||
registrations:
|
||||
new:
|
||||
title: "Registrarse como organización"
|
||||
title: "Registrarse como organización / colectivo"
|
||||
organization_name_label: "Nombre de la organización"
|
||||
email_label: "Email"
|
||||
password_label: "Contraseña"
|
||||
@@ -85,7 +82,7 @@ es:
|
||||
links:
|
||||
login: "Entrar"
|
||||
signup: "Registrarse"
|
||||
organization_signup: "Registro para organizaciones"
|
||||
organization_signup: "Registro para organizaciones / colectivos"
|
||||
signin_with_provider: "Entrar con %{provider}"
|
||||
new_password: "¿Olvidaste tu contraseña?"
|
||||
new_confirmation: "¿No has recibido instrucciones para confirmar tu cuenta?"
|
||||
|
||||
@@ -13,11 +13,11 @@ en:
|
||||
open_city_slogan: So the citizens can decide what kind of city they want.
|
||||
see_all_debates: See all debates
|
||||
my_account_link: My account
|
||||
language: Site language
|
||||
locale: "Site language:"
|
||||
administration: Administration
|
||||
moderation: Moderation
|
||||
welcome: Welcome
|
||||
news: News
|
||||
how_it_works: How it works
|
||||
debates: Debates
|
||||
initiatives: Initiatives
|
||||
footer:
|
||||
@@ -32,14 +32,11 @@ en:
|
||||
debates:
|
||||
index:
|
||||
create_debate: Create a debate
|
||||
showing: You are seeing
|
||||
tag: with the topic
|
||||
filter_debates: debates
|
||||
filter_initiatives: initiatives
|
||||
filter_debates_and_initiatives: debates and initiatives
|
||||
showing: You are seeing debates
|
||||
filter_news: the newest
|
||||
filter_votes: the most voted
|
||||
filter_rated: the best rated
|
||||
filter_topic: "You are seeing %{number} debates with the topic '%{topic}'"
|
||||
debate:
|
||||
debate: Debate
|
||||
comments:
|
||||
@@ -81,8 +78,7 @@ en:
|
||||
zero: No comments
|
||||
one: 1 Comment
|
||||
other: "%{count} Comments"
|
||||
leave_comment: Write a comment
|
||||
login_to_comment: Log in to participate
|
||||
login_to_comment: "You need to %{signin} or %{signup} to comment."
|
||||
edit_debate_link: Edit
|
||||
share: Share
|
||||
edit:
|
||||
@@ -120,12 +116,9 @@ en:
|
||||
change_credentials_link: "Change my credentials"
|
||||
avatar: "Avatar"
|
||||
personal: "Personal data"
|
||||
first_name_label: "First Name"
|
||||
last_name_label: "Last Name"
|
||||
username_label: "Username"
|
||||
phone_number_label: "Phone number"
|
||||
organization_name_label: "Organization name"
|
||||
use_nickname_label: "Use nickname"
|
||||
nickname_label: "Nickname"
|
||||
notifications: Notifications
|
||||
simple_captcha:
|
||||
placeholder: "Enter the image value"
|
||||
@@ -137,9 +130,9 @@ en:
|
||||
shared:
|
||||
tags_cloud:
|
||||
tags: Topics
|
||||
organization: Organization
|
||||
flag_as_inappropiate: Flag as inappropiate
|
||||
undo_flag_as_inappropiate: Undo flag as inappropiate
|
||||
collective: Collective
|
||||
mailer:
|
||||
comment:
|
||||
subject: Someone has commented on your debate
|
||||
@@ -150,4 +143,4 @@ en:
|
||||
manage:
|
||||
all: "You are not authorized to %{action} %{subject}."
|
||||
welcome:
|
||||
featured_debates: Features debates
|
||||
last_debates: Last debates
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
es:
|
||||
locale: 'Español'
|
||||
locale: "Español"
|
||||
layouts:
|
||||
header:
|
||||
external_link_transparency: Transparencia
|
||||
@@ -13,11 +13,11 @@ es:
|
||||
open_city_slogan: Para que todos los madrileños decidamos que ciudad queremos tener.
|
||||
see_all_debates: Ver todos los debates
|
||||
my_account_link: Mi cuenta
|
||||
language: Idioma de la página
|
||||
locale: "Idioma de la página:"
|
||||
administration: Administrar
|
||||
moderation: Moderar
|
||||
welcome: Portada
|
||||
news: Novedades
|
||||
how_it_works: "Cómo funciona"
|
||||
debates: Debates
|
||||
initiatives: Iniciativas
|
||||
footer:
|
||||
@@ -32,14 +32,11 @@ es:
|
||||
debates:
|
||||
index:
|
||||
create_debate: Crea un debate
|
||||
showing: "Estás viendo"
|
||||
tag: "con el tema"
|
||||
filter_debates: debates
|
||||
filter_initiatives: iniciativas
|
||||
filter_debates_and_initiatives: debates e iniciativas
|
||||
showing: "Estás viendo los debates"
|
||||
filter_news: "más nuevos"
|
||||
filter_votes: "más votados"
|
||||
filter_rated: mejor valorados
|
||||
filter_topic: "Estás viendo %{number} debates con el tema '%{topic}'"
|
||||
debate:
|
||||
debate: Debate
|
||||
comments:
|
||||
@@ -81,8 +78,7 @@ es:
|
||||
zero: Sin comentarios
|
||||
one: 1 Comentario
|
||||
other: "%{count} Comentarios"
|
||||
leave_comment: Deja tu comentario
|
||||
login_to_comment: Entra para participar
|
||||
login_to_comment: "Necesitas %{signin} o %{signup} para comentar."
|
||||
edit_debate_link: Editar
|
||||
share: Compartir
|
||||
edit:
|
||||
@@ -115,17 +111,14 @@ es:
|
||||
show:
|
||||
title: "Mi cuenta"
|
||||
save_changes_submit: "Guardar cambios"
|
||||
change_credentials_link: "Cambiar mis credenciales"
|
||||
change_credentials_link: "Cambiar mis datos de acceso"
|
||||
email_on_debate_comment_label: "Recibir un email cuando alguien comenta en mis debates"
|
||||
email_on_comment_reply_label: "Recibir un email cuando alguien contesta a mis comentarios"
|
||||
avatar: "Avatar"
|
||||
personal: "Datos personales"
|
||||
first_name_label: "Nombre"
|
||||
last_name_label: "Apellidos"
|
||||
username_label: "Nombre de usuario"
|
||||
phone_number_label: "Teléfono"
|
||||
organization_name_label: "Nombre de la organización"
|
||||
use_nickname_label: "Usar pseudónimo"
|
||||
nickname_label: "Pseudónimo"
|
||||
notifications: Notificaciones
|
||||
simple_captcha:
|
||||
placeholder: "Introduce el texto de la imagen"
|
||||
@@ -137,9 +130,9 @@ es:
|
||||
shared:
|
||||
tags_cloud:
|
||||
tags: Temas
|
||||
organization: Organización
|
||||
flag_as_inappropiate: Denunciar como inapropiado
|
||||
undo_flag_as_inappropiate: Deshacer denunciar como inapropiado
|
||||
collective: Colectivo
|
||||
mailer:
|
||||
comment:
|
||||
subject: Alguien ha comentado en tu debate
|
||||
@@ -150,4 +143,4 @@ es:
|
||||
manage:
|
||||
all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}."
|
||||
welcome:
|
||||
featured_debates: Debates destacados
|
||||
last_debates: Úlitmos debates
|
||||
|
||||
8
config/locales/mailers.en.yml
Normal file
8
config/locales/mailers.en.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
en:
|
||||
mailers:
|
||||
comment:
|
||||
hi: "Hello, %{recipient}"
|
||||
new_comment_by: "There'is a new comment by %{commenter}"
|
||||
reply:
|
||||
hi: "Hello, %{recipient}"
|
||||
new_reply_by: "There'is a new reply by %{commenter} to your comment"
|
||||
8
config/locales/mailers.es.yml
Normal file
8
config/locales/mailers.es.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
es:
|
||||
mailers:
|
||||
comment:
|
||||
hi: "Hola, %{recipient}"
|
||||
new_comment_by: "Hay un nuevo comentario de %{commenter}"
|
||||
reply:
|
||||
hi: "Hola, %{recipient}"
|
||||
new_reply_by: "Hay una nueva respuesta de %{commenter} a tu comentario"
|
||||
@@ -0,0 +1,10 @@
|
||||
class ChangesUserRegistrationsFields < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :username, :string
|
||||
|
||||
remove_column :users, :first_name, :string
|
||||
remove_column :users, :last_name, :string
|
||||
remove_column :users, :nickname, :string
|
||||
remove_column :users, :use_nickname, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
||||
@@ -148,20 +148,17 @@ ActiveRecord::Schema.define(version: 20150821180155) do
|
||||
t.string "last_sign_in_ip"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "first_name"
|
||||
t.string "last_name"
|
||||
t.string "confirmation_token"
|
||||
t.datetime "confirmed_at"
|
||||
t.datetime "confirmation_sent_at"
|
||||
t.string "unconfirmed_email"
|
||||
t.string "nickname"
|
||||
t.string "phone_number", limit: 30
|
||||
t.boolean "use_nickname", default: false, null: false
|
||||
t.boolean "email_on_debate_comment", default: false
|
||||
t.boolean "email_on_comment_reply", default: false
|
||||
t.string "official_position"
|
||||
t.integer "official_level", default: 0
|
||||
t.datetime "hidden_at"
|
||||
t.string "phone_number", limit: 30
|
||||
t.string "username"
|
||||
end
|
||||
|
||||
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Names for the moderation console, as a hint for moderators
|
||||
# to know better how to assign users with official positions
|
||||
Setting.create(key: 'official_level_0_name', value: 'No cargo público')
|
||||
Setting.create(key: 'official_level_1_name', value: 'Organización Municipal')
|
||||
Setting.create(key: 'official_level_2_name', value: 'Funcionariado')
|
||||
Setting.create(key: 'official_level_1_name', value: 'Funcionariado')
|
||||
Setting.create(key: 'official_level_2_name', value: 'Organización Municipal')
|
||||
Setting.create(key: 'official_level_3_name', value: 'Directores generales')
|
||||
Setting.create(key: 'official_level_4_name', value: 'Concejales')
|
||||
Setting.create(key: 'official_level_5_name', value: 'Alcaldes')
|
||||
Setting.create(key: 'official_level_5_name', value: 'Alcaldesa')
|
||||
@@ -3,7 +3,7 @@ namespace :deploy do
|
||||
%w(start stop force-stop restart upgrade reopen-logs).each do |command|
|
||||
task command.to_sym do
|
||||
on roles(:app), in: :sequence, wait: 5 do
|
||||
sudo "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}"
|
||||
execute "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
FactoryGirl.define do
|
||||
|
||||
factory :user do
|
||||
first_name 'Manuela'
|
||||
last_name 'Carmena'
|
||||
username 'Manuela'
|
||||
sequence(:email) { |n| "manuela#{n}@madrid.es" }
|
||||
password 'judgmentday'
|
||||
confirmed_at { Time.now }
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'rails_helper'
|
||||
feature 'Account' do
|
||||
|
||||
background do
|
||||
@user = create(:user, first_name: "Manuela", last_name: "Colau")
|
||||
@user = create(:user, username: "Manuela Colau")
|
||||
login_as(@user)
|
||||
end
|
||||
|
||||
@@ -14,8 +14,7 @@ feature 'Account' do
|
||||
|
||||
expect(current_path).to eq(account_path)
|
||||
|
||||
expect(page).to have_selector("input[value='Manuela']")
|
||||
expect(page).to have_selector("input[value='Colau']")
|
||||
expect(page).to have_selector("input[value='Manuela Colau']")
|
||||
expect(page).to have_selector(avatar('Manuela Colau'), count: 1)
|
||||
end
|
||||
|
||||
@@ -25,8 +24,7 @@ feature 'Account' do
|
||||
visit account_path
|
||||
|
||||
expect(page).to have_selector("input[value='Manuela Corp']")
|
||||
expect(page).to_not have_selector("input[value='Manuela']")
|
||||
expect(page).to_not have_selector("input[value='Colau']")
|
||||
expect(page).to_not have_selector("input[value='Manuela Colau']")
|
||||
|
||||
expect(page).to have_selector(avatar('Manuela Corp'), count: 1)
|
||||
end
|
||||
@@ -34,8 +32,7 @@ feature 'Account' do
|
||||
scenario 'Edit' do
|
||||
visit account_path
|
||||
|
||||
fill_in 'account_first_name', with: 'Larry'
|
||||
fill_in 'account_last_name', with: 'Bird'
|
||||
fill_in 'account_username', with: 'Larry Bird'
|
||||
check 'account_email_on_debate_comment'
|
||||
check 'account_email_on_comment_reply'
|
||||
click_button 'Save changes'
|
||||
@@ -44,8 +41,7 @@ feature 'Account' do
|
||||
|
||||
visit account_path
|
||||
|
||||
expect(page).to have_selector("input[value='Larry']")
|
||||
expect(page).to have_selector("input[value='Bird']")
|
||||
expect(page).to have_selector("input[value='Larry Bird']")
|
||||
expect(page).to have_selector("input[id='account_email_on_debate_comment'][value='1']")
|
||||
expect(page).to have_selector("input[id='account_email_on_comment_reply'][value='1']")
|
||||
end
|
||||
@@ -71,7 +67,7 @@ feature 'Account' do
|
||||
scenario "Errors on edit" do
|
||||
visit account_path
|
||||
|
||||
fill_in 'account_first_name', with: ''
|
||||
fill_in 'account_username', with: ''
|
||||
click_button 'Save changes'
|
||||
|
||||
expect(page).to have_content error_message
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'rails_helper'
|
||||
feature 'Admin officials' do
|
||||
|
||||
background do
|
||||
@citizen = create(:user, first_name: "Citizen", last_name: "Kane")
|
||||
@citizen = create(:user, username: "Citizen Kane")
|
||||
@official = create(:user, official_position: "Mayor", official_level: 5)
|
||||
@admin = create(:administrator)
|
||||
login_as(@admin.user)
|
||||
|
||||
@@ -43,7 +43,7 @@ feature 'Comments' do
|
||||
create(:comment, commentable: debate)
|
||||
visit debate_path(debate)
|
||||
|
||||
expect(page).to have_content 'Log in to participate'
|
||||
expect(page).to have_content 'You need to sign in or sign up to comment'
|
||||
within('#comments') do
|
||||
expect(page).to_not have_content 'Write a comment'
|
||||
expect(page).to_not have_content 'Reply'
|
||||
@@ -80,8 +80,8 @@ feature 'Comments' do
|
||||
end
|
||||
|
||||
scenario 'Reply', :js do
|
||||
citizen = create(:user, first_name: 'Ana')
|
||||
manuela = create(:user, first_name: 'Manuela')
|
||||
citizen = create(:user, username: 'Ana')
|
||||
manuela = create(:user, username: 'Manuela')
|
||||
debate = create(:debate)
|
||||
comment = create(:comment, commentable: debate, user: citizen)
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ feature 'Users' do
|
||||
visit '/'
|
||||
click_link 'Sign up'
|
||||
|
||||
fill_in 'user_first_name', with: 'Manuela'
|
||||
fill_in 'user_last_name', with: 'Carmena'
|
||||
fill_in 'user_username', with: 'Manuela Carmena'
|
||||
fill_in 'user_email', with: 'manuela@madrid.es'
|
||||
fill_in 'user_password', with: 'judgementday'
|
||||
fill_in 'user_password_confirmation', with: 'judgementday'
|
||||
|
||||
@@ -30,6 +30,12 @@ describe User do
|
||||
expect(subject).to be_valid
|
||||
end
|
||||
|
||||
describe "#name" do
|
||||
it "is the username when the user is not an organization" do
|
||||
expect(subject.name).to eq(subject.username)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'preferences' do
|
||||
describe 'email_on_debate_comment' do
|
||||
it 'should be false by default' do
|
||||
@@ -44,45 +50,6 @@ describe User do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'use_nickname' do
|
||||
describe 'when true' do
|
||||
before { subject.use_nickname = true }
|
||||
|
||||
it "activates the validation of nickname" do
|
||||
subject.nickname = nil
|
||||
expect(subject).to_not be_valid
|
||||
|
||||
subject.nickname = "dredd"
|
||||
expect(subject).to be_valid
|
||||
end
|
||||
|
||||
it "calculates the name using the nickname" do
|
||||
subject.nickname = "dredd"
|
||||
expect(subject.name).to eq("dredd")
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when false' do
|
||||
before { subject.use_nickname = false }
|
||||
|
||||
it "activates the validation of first_name and last_name" do
|
||||
subject.first_name = nil
|
||||
subject.last_name = nil
|
||||
expect(subject).to_not be_valid
|
||||
|
||||
subject.first_name = "Joseph"
|
||||
subject.last_name = "Dredd"
|
||||
expect(subject).to be_valid
|
||||
end
|
||||
|
||||
it "calculates the name using first_name and last_name" do
|
||||
subject.first_name = "Joseph"
|
||||
subject.last_name = "Dredd"
|
||||
expect(subject.name).to eq("Joseph Dredd")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "administrator?" do
|
||||
it "is false when the user is not an admin" do
|
||||
expect(subject.administrator?).to be false
|
||||
@@ -152,9 +119,8 @@ describe User do
|
||||
expect(subject.organization.name).to eq('org')
|
||||
end
|
||||
|
||||
it "deactivates the validation of first_name and last_name, and activates the validation of organization" do
|
||||
subject.first_name = nil
|
||||
subject.last_name = nil
|
||||
it "deactivates the validation of username, and activates the validation of organization" do
|
||||
subject.username = nil
|
||||
expect(subject).to be_valid
|
||||
|
||||
subject.organization.name= nil
|
||||
|
||||
@@ -4,8 +4,7 @@ module CommonActions
|
||||
visit '/'
|
||||
click_link 'Sign up'
|
||||
|
||||
fill_in 'user_first_name', with: 'Manuela'
|
||||
fill_in 'user_last_name', with: 'Carmena'
|
||||
fill_in 'user_username', with: 'Manuela Carmena'
|
||||
fill_in 'user_email', with: 'manuela@madrid.es'
|
||||
fill_in 'user_password', with: 'judgementday'
|
||||
fill_in 'user_password_confirmation', with: 'judgementday'
|
||||
|
||||
Reference in New Issue
Block a user