decidim-core 0.0.1.alpha2 → 0.0.1.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +11 -6
  3. data/app/assets/config/decidim_core_manifest.js +1 -0
  4. data/app/assets/images/decidim/badge-ajuntament-footer.png +0 -0
  5. data/app/assets/images/decidim/badge-ajuntament-header.svg +60 -0
  6. data/app/assets/images/decidim/cc-badge.png +0 -0
  7. data/app/assets/images/decidim/hero-home.jpg +0 -0
  8. data/app/assets/images/decidim/icons.svg +1 -0
  9. data/app/assets/javascripts/decidim.js +12 -1
  10. data/app/assets/stylesheets/{decidim.css → decidim.scss} +2 -1
  11. data/app/assets/stylesheets/decidim/application.sass +7 -0
  12. data/app/assets/stylesheets/decidim/layouts/_home.scss +244 -0
  13. data/app/assets/stylesheets/decidim/layouts/_user.scss +24 -0
  14. data/app/assets/stylesheets/decidim/layouts/_view.scss +22 -0
  15. data/app/assets/stylesheets/decidim/modules/_address.scss +26 -0
  16. data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +119 -0
  17. data/app/assets/stylesheets/decidim/modules/_buttons.scss +120 -0
  18. data/app/assets/stylesheets/decidim/modules/_callout.scss +25 -0
  19. data/app/assets/stylesheets/decidim/modules/_card-grid.scss +22 -0
  20. data/app/assets/stylesheets/decidim/modules/_cards.scss +520 -0
  21. data/app/assets/stylesheets/decidim/modules/_comments.scss +119 -0
  22. data/app/assets/stylesheets/decidim/modules/_defintion-data.scss +54 -0
  23. data/app/assets/stylesheets/decidim/modules/_extra.scss +43 -0
  24. data/app/assets/stylesheets/decidim/modules/_filters.scss +96 -0
  25. data/app/assets/stylesheets/decidim/modules/_flag.scss +9 -0
  26. data/app/assets/stylesheets/decidim/modules/_footer.scss +90 -0
  27. data/app/assets/stylesheets/decidim/modules/_forms.scss +30 -0
  28. data/app/assets/stylesheets/decidim/modules/_help.scss +14 -0
  29. data/app/assets/stylesheets/decidim/modules/_icons.scss +32 -0
  30. data/app/assets/stylesheets/decidim/modules/_layout.scss +58 -0
  31. data/app/assets/stylesheets/decidim/modules/_list-docs.scss +30 -0
  32. data/app/assets/stylesheets/decidim/modules/_main-container.scss +70 -0
  33. data/app/assets/stylesheets/decidim/modules/_map.scss +72 -0
  34. data/app/assets/stylesheets/decidim/modules/_navbar.scss +258 -0
  35. data/app/assets/stylesheets/decidim/modules/_opinion-toggle.scss +30 -0
  36. data/app/assets/stylesheets/decidim/modules/_order-by.scss +66 -0
  37. data/app/assets/stylesheets/decidim/modules/_owl-carousel.scss +72 -0
  38. data/app/assets/stylesheets/decidim/modules/_phase-nav.scss +177 -0
  39. data/app/assets/stylesheets/decidim/modules/_popularity.scss +74 -0
  40. data/app/assets/stylesheets/decidim/modules/_process-header.scss +125 -0
  41. data/app/assets/stylesheets/decidim/modules/_process-info.scss +44 -0
  42. data/app/assets/stylesheets/decidim/modules/_process-nav.scss +99 -0
  43. data/app/assets/stylesheets/decidim/modules/_reference.scss +6 -0
  44. data/app/assets/stylesheets/decidim/modules/_reveal.scss +20 -0
  45. data/app/assets/stylesheets/decidim/modules/_share.scss +28 -0
  46. data/app/assets/stylesheets/decidim/modules/_signup.scss +39 -0
  47. data/app/assets/stylesheets/decidim/modules/_static-pages.scss +46 -0
  48. data/app/assets/stylesheets/decidim/modules/_status-labels.scss +14 -0
  49. data/app/assets/stylesheets/decidim/modules/_tags.scss +29 -0
  50. data/app/assets/stylesheets/decidim/modules/_timeline.scss +189 -0
  51. data/app/assets/stylesheets/decidim/modules/_title-action.scss +28 -0
  52. data/app/assets/stylesheets/decidim/modules/_typography.scss +116 -0
  53. data/app/assets/stylesheets/decidim/modules/_user-form.scss +14 -0
  54. data/app/assets/stylesheets/decidim/modules/_video.scss +18 -0
  55. data/app/assets/stylesheets/decidim/utils/_fontface.scss +1 -0
  56. data/app/assets/stylesheets/decidim/utils/_helpers.sass +21 -0
  57. data/app/assets/stylesheets/decidim/utils/_keyframes.sass +13 -0
  58. data/app/assets/stylesheets/decidim/utils/_mixins.sass +33 -0
  59. data/app/assets/stylesheets/decidim/utils/_settings.scss +570 -0
  60. data/app/assets/stylesheets/decidim/utils/_toggle-expand.scss +8 -0
  61. data/app/assets/stylesheets/decidim/utils/_variables.scss +25 -0
  62. data/app/controllers/concerns/decidim/needs_organization.rb +31 -0
  63. data/app/controllers/decidim/application_controller.rb +1 -0
  64. data/app/controllers/decidim/devise/confirmations_controller.rb +10 -0
  65. data/app/controllers/decidim/devise/invitations_controller.rb +20 -0
  66. data/app/controllers/decidim/devise/passwords_controller.rb +10 -0
  67. data/app/controllers/decidim/devise/registrations_controller.rb +19 -0
  68. data/app/controllers/decidim/devise/sessions_controller.rb +10 -0
  69. data/app/helpers/decidim/application_helper.rb +3 -0
  70. data/app/helpers/decidim/layout_helper.rb +27 -0
  71. data/app/helpers/decidim/translations_helper.rb +16 -0
  72. data/app/mailers/decidim/decidim_devise_mailer.rb +11 -0
  73. data/app/middleware/decidim/current_organization.rb +28 -0
  74. data/app/models/decidim/organization.rb +9 -0
  75. data/app/models/decidim/participatory_process.rb +14 -0
  76. data/app/models/decidim/user.rb +28 -4
  77. data/app/views/decidim/devise/confirmations/new.html.erb +15 -0
  78. data/app/views/decidim/devise/invitations/edit.html.erb +14 -0
  79. data/app/views/decidim/devise/passwords/edit.html.erb +20 -0
  80. data/app/views/decidim/devise/passwords/new.html.erb +15 -0
  81. data/app/views/decidim/devise/registrations/edit.html.erb +35 -0
  82. data/app/views/decidim/devise/registrations/new.html.erb +23 -0
  83. data/app/views/decidim/devise/sessions/new.html.erb +23 -0
  84. data/app/views/decidim/devise/shared/_links.html.erb +25 -0
  85. data/app/views/decidim/home/show.html.erb +16 -4
  86. data/app/views/devise/mailer/confirmation_instructions.html.erb +4 -0
  87. data/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +10 -0
  88. data/app/views/devise/mailer/organization_admin_invitation_instructions.text.erb +11 -0
  89. data/app/views/devise/mailer/password_change.html.erb +3 -0
  90. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  91. data/app/views/layouts/decidim/_footer.html.erb +28 -2
  92. data/app/views/layouts/decidim/_header.html.erb +59 -2
  93. data/config/i18n-tasks.yml +120 -0
  94. data/config/initializers/devise.rb +58 -8
  95. data/config/locales/en.yml +35 -0
  96. data/config/routes.rb +12 -1
  97. data/db/migrate/20160919104837_create_decidim_organizations.rb +13 -0
  98. data/db/migrate/20160920140207_devise_invitable_add_to_decidim_users.rb +23 -0
  99. data/db/migrate/20160920141039_user_belongs_to_organization.rb +5 -0
  100. data/db/migrate/20160920141151_user_has_roles.rb +5 -0
  101. data/db/migrate/20161005130108_add_participatory_processes.rb +17 -0
  102. data/db/migrate/20161005153007_add_description_to_organizations.rb +9 -0
  103. data/db/migrate/20161006085629_add_confirmable_to_devise.rb +14 -0
  104. data/db/seeds.rb +35 -0
  105. data/lib/decidim/core.rb +0 -1
  106. data/lib/decidim/core/engine.rb +30 -0
  107. data/lib/decidim/core/version.rb +1 -1
  108. data/lib/decidim/devise_failure_app.rb +36 -0
  109. data/lib/decidim/form_builder.rb +38 -0
  110. data/lib/decidim/translatable_attributes.rb +86 -0
  111. data/lib/devise/models/decidim_validatable.rb +67 -0
  112. data/lib/tasks/factory_girl.rake +16 -0
  113. metadata +254 -9
  114. data/config/locales/devise.en.yml +0 -62
  115. data/lib/decidim/testing_support/common_rake.rb +0 -13
  116. data/lib/generators/decidim/dummy_generator.rb +0 -58
  117. data/lib/generators/decidim/install_generator.rb +0 -76
  118. data/lib/generators/decidim/templates/initializer.rb +0 -4
@@ -0,0 +1,44 @@
1
+ //Variables
2
+ $info-details-color: $muted;
3
+ $info-image-spacing-x: $container-padding-2x;
4
+ $gutter-medium: map-get($grid-column-gutter, medium);
5
+
6
+ //Styles
7
+
8
+ .info-header{
9
+ margin-bottom: 2rem;
10
+ @include breakpoint(medium){
11
+ display: flex;
12
+ align-items: center;
13
+ }
14
+ }
15
+
16
+ .info-details{
17
+ color: $info-details-color;
18
+ margin-left: auto;
19
+ .share{
20
+ text-align: left;
21
+ margin-top: .2rem;
22
+ ul{
23
+ margin-left: 0;
24
+ }
25
+ }
26
+ @include breakpoint(medium){
27
+ border-left: $border;
28
+ }
29
+ }
30
+ .info-image{
31
+ margin-bottom: 1rem;
32
+ img{
33
+ display: block;
34
+ }
35
+ @include breakpoint(medium){
36
+ float: right;
37
+ margin-left: $gutter-medium;
38
+ width: 50%;
39
+ }
40
+ @include breakpoint(large){
41
+ margin-right: calc(-50% - #{$container-padding-2x} - #{$gutter-medium}/2);
42
+ width: 80%;
43
+ }
44
+ }
@@ -0,0 +1,99 @@
1
+ /* Variables */
2
+
3
+
4
+ /* Navigation */
5
+
6
+ .process-nav{
7
+ background-color: $white;
8
+ border: $border;
9
+ padding: .75rem $container-padding-y;
10
+ margin-top: 1rem;
11
+ ul{
12
+ margin: 0;
13
+ list-style: none;
14
+ }
15
+ .about-link{
16
+ font-size: 80%;
17
+ }
18
+ @include breakpoint(medium){
19
+ ul{
20
+ overflow-x: auto;
21
+ -webkit-overflow-scrolling: touch;
22
+ white-space: nowrap;
23
+ display: flex;
24
+ align-items: center;
25
+ }
26
+ ul::-webkit-scrollbar{
27
+ display: none;
28
+ }
29
+ li{
30
+ display: inline-block;
31
+ margin-right: 1.5rem;
32
+ }
33
+ .about-link{
34
+ float: right;
35
+ margin-right: 0;
36
+ margin-left: auto;
37
+ }
38
+ }
39
+ }
40
+
41
+ .process-nav__trigger{
42
+ display: block;
43
+ width: 100%;
44
+ text-align: left;
45
+ position: relative;
46
+ }
47
+
48
+ .process-nav__trigger__icon{
49
+ position: absolute;
50
+ right: .5rem;
51
+ top: .55rem;
52
+ }
53
+
54
+ .js .process-nav__content{
55
+ @include breakpoint(smallmedium down){
56
+ display: none;
57
+ }
58
+ &.is-active{
59
+ display: block;
60
+ }
61
+ }
62
+
63
+ .process-nav__content li{
64
+ @include breakpoint(smallmedium down){
65
+ margin-top: 1rem;
66
+ }
67
+ &.is-active{
68
+ @include breakpoint(smallmedium down){
69
+ display: none;
70
+ }
71
+ }
72
+ }
73
+
74
+ .process-nav__link{
75
+ display: block;
76
+ color: $muted;
77
+ text-transform: uppercase;
78
+ font-weight: 600;
79
+ display: flex;
80
+ align-items: center;
81
+
82
+
83
+ svg{
84
+ margin-right: .4em;
85
+ width: 25px;
86
+ height: 25px;
87
+ fill: $muted;
88
+ }
89
+ }
90
+
91
+ @include breakpoint(medium){
92
+ .process-nav__link:hover,
93
+ .process-nav__link.is-active{
94
+ color: $primary;
95
+ svg{
96
+ fill: $primary;
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,6 @@
1
+ .reference{
2
+ color: $muted;
3
+ font-size: .9rem;
4
+ text-align: center;
5
+ margin-bottom: 1rem;
6
+ }
@@ -0,0 +1,20 @@
1
+ /* Reveal foundation overwrites*/
2
+
3
+ @include breakpoint(small down){
4
+ .reveal{
5
+ width: 95%;
6
+ left: 2.5%;
7
+ top: 2rem;
8
+ height: auto;
9
+ min-height: auto;
10
+ }
11
+ }
12
+
13
+ .reveal__header{
14
+ border-bottom: $border;
15
+ margin-bottom: 1rem;
16
+ }
17
+
18
+ .reveal__title{
19
+ margin-top: -6px;
20
+ }
@@ -0,0 +1,28 @@
1
+ //Variables
2
+ $share-border: $border;
3
+ $share-color: $muted;
4
+
5
+ //Styles
6
+ .share{
7
+ text-align: center;
8
+ ul{
9
+ display: inline-block;
10
+ list-style: none;
11
+ margin: 0 0 0 .5rem;
12
+ }
13
+ li{
14
+ display: inline-block;
15
+ }
16
+ }
17
+
18
+ .share__icon{
19
+ color: $share-color;
20
+ border: $share-border;
21
+ border-radius: 50%;
22
+ display: inline-block;
23
+ width: 1.8em;
24
+ height: 1.8em;
25
+ text-align: center;
26
+ padding: .1em 0 0;
27
+ margin-right: .5em;
28
+ }
@@ -0,0 +1,39 @@
1
+ .register__separator{
2
+ display: block;
3
+ text-align: center;
4
+ position: relative;
5
+ z-index: 1;
6
+ font-style: italic;
7
+ margin: 1rem 0 2rem;
8
+ &:before{
9
+ content: "";
10
+ display: block;
11
+ height: 1px;
12
+ width: 100%;
13
+ background-color: $medium-gray;
14
+ position: absolute;
15
+ top: 50%;
16
+ z-index: -1;
17
+ }
18
+ }
19
+
20
+ .register__separator__text{
21
+ display: inline-block;
22
+ background: $light-gray;
23
+ padding: 0 1rem;
24
+ }
25
+
26
+ .register-form{
27
+ margin-top: 2rem;
28
+ input[type="text"],
29
+ input[type="email"],
30
+ input[type="password"]{
31
+ height: 3rem;
32
+ }
33
+ .button{
34
+ margin: 2rem 0;
35
+ }
36
+ legend{
37
+ margin-bottom: 1rem;
38
+ }
39
+ }
@@ -0,0 +1,46 @@
1
+ .static-with-nav{
2
+ @include breakpoint(medium){
3
+ display: flex;
4
+ }
5
+ }
6
+
7
+ .static__content{
8
+ //padding: 2rem 1rem;
9
+ @include breakpoint(medium){
10
+ //padding: 2rem 1.5rem;
11
+ }
12
+ }
13
+
14
+ .static-nav{
15
+ min-height: 100%;
16
+ .list-latin{
17
+ list-style-type: upper-latin;
18
+ }
19
+ ul{
20
+ text-transform: uppercase;
21
+ margin-left: .5rem;
22
+ }
23
+ li{
24
+ color: darken($medium-gray, 30);
25
+ line-height: 1.2;
26
+ margin-bottom: .8rem;
27
+ }
28
+ a{
29
+ color: $body-font-color;
30
+ &:hover{
31
+ color: $anchor-color;
32
+ }
33
+ }
34
+ }
35
+
36
+ .static__message{
37
+ text-align: center;
38
+ padding: 2rem 1rem;
39
+ @include breakpoint(medium){
40
+ padding: 4rem 1.5rem;
41
+ }
42
+ }
43
+
44
+ .static__message__cta{
45
+ margin-top: 2rem;
46
+ }
@@ -0,0 +1,14 @@
1
+ .label--basic{
2
+ background-color: lighten($dark-gray, 60);
3
+ }
4
+
5
+ .proposal-status{
6
+ float: left;
7
+ margin-right: .5rem;
8
+ }
9
+
10
+ .proposal-status--small,
11
+ .label--small{
12
+ margin: .2rem .2rem .2rem 0;
13
+ padding: .2rem .3rem;
14
+ }
@@ -0,0 +1,29 @@
1
+ //Variables
2
+
3
+ $tags-border: $border;
4
+
5
+ /* Tags */
6
+
7
+ .tags{
8
+ list-style: none;
9
+ margin: 0 0 1rem;
10
+ font-size: 90%;
11
+ li{
12
+ display: inline-block;
13
+ margin-right: .3rem;
14
+ margin-bottom: .5rem;
15
+ }
16
+ a{
17
+ display: block;
18
+ border: $tags-border;
19
+ padding: 0 .5rem;
20
+ }
21
+ }
22
+
23
+ .tags:last-child{
24
+ margin-bottom: -.5rem;
25
+ }
26
+
27
+ .tags--inline{
28
+ display: inline;
29
+ }
@@ -0,0 +1,189 @@
1
+
2
+ /* Variables */
3
+
4
+ $timeline-color: $primary;
5
+ $timeline-inactive-color: $medium-gray;
6
+
7
+ $timeline-padding: 1rem;
8
+
9
+
10
+
11
+ /* Timeline */
12
+
13
+ .timeline {
14
+ list-style: none;
15
+ margin: 2rem 0 0;
16
+ transition: all .4s ease;
17
+ }
18
+
19
+ .timeline__item {
20
+ padding-bottom: 2em;
21
+ position: relative;
22
+ &:before {
23
+ content:"";
24
+ width: 3px;
25
+ height: 100%;
26
+ background: $timeline-color;
27
+ left: 1rem;
28
+ top: 0;
29
+ position: absolute;
30
+ @include breakpoint(medium){
31
+ left: 50%;
32
+ }
33
+ }
34
+ &:after {
35
+ content: "";
36
+ clear: both;
37
+ display: table;
38
+ width: 100%;
39
+ }
40
+ &:last-of-type:before{
41
+ width: 0;
42
+ }
43
+ }
44
+
45
+ .timeline__phase{
46
+ width: 30px;
47
+ height: 30px;
48
+ margin-left: -13px;
49
+ position: absolute;
50
+ top: 0;
51
+ left: 1rem;
52
+ display: flex;
53
+ justify-content: center;
54
+ overflow: hidden;
55
+ border-radius: 50%;
56
+ background: $timeline-color;
57
+ border: 2px solid $white;
58
+ box-shadow: 0 0 0 1px $medium-gray;
59
+ @include breakpoint(medium){
60
+ left: 50%;
61
+ }
62
+ }
63
+
64
+ .timeline__phase__number{
65
+ display: block;
66
+ text-align: center;
67
+ line-height: 1;
68
+ color: $white;
69
+ font-weight: 600;
70
+ font-size: 1.2em;
71
+ align-self: center;
72
+ margin-left: 1px;
73
+ margin-top: -1px;
74
+ }
75
+
76
+ .timeline__desc{
77
+ width: 90%;
78
+ width: calc(100% - 45px);
79
+ float: right;
80
+ padding: $timeline-padding/2 $timeline-padding 0;
81
+ border: 1px solid $timeline-color;
82
+ border-radius: $global-radius;
83
+ transition: all .3s ease;
84
+ transform: translateY(-.4rem);
85
+ @include breakpoint(medium){
86
+ width: 45%;
87
+ float: left;
88
+ }
89
+ &:before {
90
+ content: '';
91
+ position: absolute;
92
+ right: 100%;
93
+ top: .6rem;
94
+ width: 0;
95
+ height: 0;
96
+ border-top: 10px solid transparent;
97
+ border-bottom: 10px solid transparent;
98
+ border-right: 10px solid $timeline-color;
99
+ @include breakpoint(medium){
100
+ left: 100%;
101
+ border-right: 0;
102
+ border-left: 10px solid $timeline-color;
103
+ }
104
+ }
105
+ .timeline__item:nth-of-type(even) &{
106
+ float: right;
107
+ &:before{
108
+ content: '';
109
+ right: 100%;
110
+ left: inherit;
111
+ border-left: 0;
112
+ border-right: 10px solid $timeline-color;
113
+ }
114
+ }
115
+ }
116
+
117
+ .timeline__title{
118
+ display: block;
119
+ padding: $timeline-padding/2 $timeline-padding;
120
+ background: $timeline-color;
121
+ color: $white;
122
+ margin: (-$timeline-padding/2) (-$timeline-padding) 0 (-$timeline-padding);
123
+ &:hover,
124
+ &:active{
125
+ color: $white;
126
+ }
127
+ > h6{
128
+ margin-bottom: 0;
129
+ }
130
+ }
131
+
132
+ .timeline__title__icon{
133
+ margin-left: 3px;
134
+ vertical-align: middle;
135
+ }
136
+
137
+ .timeline__content{
138
+ display: none;
139
+ padding-top: $timeline-padding/2;
140
+ }
141
+
142
+ /* Collapse styles */
143
+
144
+ .timeline__desc.is-expanded{
145
+ .timeline__content{
146
+ display: block;
147
+ }
148
+ .timeline__title__icon{
149
+ transform: rotate(180deg);
150
+ }
151
+ }
152
+
153
+ /* Inactive timeline */
154
+
155
+ .timeline__item--current{
156
+ &:before {
157
+ background: $timeline-inactive-color;
158
+ }
159
+ }
160
+
161
+ .timeline__item--inactive{
162
+ &:before {
163
+ background: $timeline-inactive-color;
164
+ }
165
+ .timeline__phase{
166
+ background: $timeline-inactive-color;
167
+ }
168
+ .timeline__phase__number{
169
+ text-shadow: 0 1px 2px rgba(black, 0.1);
170
+ }
171
+ .timeline__desc{
172
+ border-color: $timeline-inactive-color;
173
+ &:before{
174
+ border-right-color: $timeline-inactive-color;
175
+ @include breakpoint(medium){
176
+ border-left-color: $timeline-inactive-color;
177
+ }
178
+ }
179
+ }
180
+ .timeline__title{
181
+ background: $timeline-inactive-color;
182
+ color: inherit;
183
+ }
184
+ }
185
+ .timeline__item:nth-of-type(even).timeline__item--inactive{
186
+ .timeline__desc:before{
187
+ border-right-color: $timeline-inactive-color;
188
+ }
189
+ }