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,119 @@
1
+ /* Variables */
2
+ $comment-padding: 1rem;
3
+
4
+ $comment-vote-up-color: $success;
5
+ $comment-vote-down-color: $alert;
6
+
7
+ $comment-nested-bg: $light-gray;
8
+ $comment-nested-alt-bg: $white;
9
+
10
+ $comment-highlight-bg: rgba($secondary,.15);
11
+ $comment-pinned-bg: lighten($warning,45);
12
+
13
+ $comment-form-bg: $light-gray;
14
+
15
+ /* Comments */
16
+
17
+ .comments{
18
+ padding-top: 3rem;
19
+ }
20
+
21
+ .comment-thread{
22
+ @extend .card;
23
+ }
24
+
25
+ .comment-thread__title{
26
+ font-weight: normal;
27
+ font-size: 90%;
28
+ text-transform: none;
29
+ color: $muted;
30
+ }
31
+
32
+ .show-more--comment-thread{
33
+ text-align: right;
34
+ margin-top: -$card-margin-bottom;
35
+ margin-bottom: $card-margin-bottom;
36
+ padding-top: 3px;
37
+ font-size: 90%;
38
+ }
39
+
40
+ .comment{
41
+ &--highlight{
42
+ background: $comment-highlight-bg !important;
43
+ }
44
+ &--pinned{
45
+ background: $comment-pinned-bg !important;
46
+ }
47
+ }
48
+
49
+ .comment__header{
50
+ padding: $comment-padding;
51
+ }
52
+
53
+ .comment__content{
54
+ padding: 0 $comment-padding;
55
+ > :last-child{
56
+ margin-bottom: 0;
57
+ }
58
+ }
59
+
60
+ .comment__footer{
61
+ padding: $comment-padding;
62
+ font-size: 90%;
63
+ }
64
+
65
+ .comment--nested{
66
+ background: $comment-nested-bg;
67
+ margin: $comment-padding;
68
+ padding-bottom: 1px;
69
+ &.comment--nested--alt{
70
+ background: $comment-nested-alt-bg;
71
+ }
72
+ &:first-of-type{
73
+ margin-top: 0;
74
+ }
75
+ }
76
+
77
+ .comment__footer{
78
+ @include clearfix;
79
+ }
80
+
81
+ .comment__reply{
82
+ float: left;
83
+ color: $muted;
84
+ }
85
+
86
+ .comment__votes{
87
+ float: right;
88
+ }
89
+ .comment__votes--up{
90
+ color: $comment-vote-up-color;
91
+ &:hover{
92
+ color: darken($comment-vote-up-color,10);
93
+ }
94
+ }
95
+ .comment__votes--down{
96
+ color: $comment-vote-down-color;
97
+ padding-left: .3rem;
98
+ &:hover{
99
+ color: darken($comment-vote-down-color,10);
100
+ }
101
+ }
102
+
103
+ /* Comment form */
104
+
105
+ .add-comment{
106
+ background: $comment-form-bg;
107
+ padding: $comment-padding;
108
+ .button{
109
+ margin-bottom: 0;
110
+ }
111
+ }
112
+
113
+ .add-comment--reply{
114
+ display: none;
115
+ &.is-active{
116
+ display: block;
117
+ }
118
+ }
119
+
@@ -0,0 +1,54 @@
1
+ .definition-data{
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ }
5
+
6
+ .definition-data__item{
7
+ display: block;
8
+ padding: .75rem .5rem;
9
+ border-bottom: $border;
10
+ flex-basis: 100%;
11
+ &:last-child{
12
+ border-bottom: 0;
13
+ }
14
+ }
15
+
16
+ .definition-data__item--double{
17
+ display: inline-block;
18
+ flex-basis: 50%;
19
+ width: 50%;
20
+ border-right: $border;
21
+ &:nth-of-type(even){
22
+ border-right: 0;
23
+ }
24
+ &:nth-last-child(2):nth-child(odd){
25
+ border-bottom: 0;
26
+ }
27
+ }
28
+
29
+ .definition-data__title{
30
+ display: block;
31
+ text-transform: uppercase;
32
+ font-size: 85%;
33
+ line-height: 1;
34
+ margin-bottom: .25rem;
35
+ color: $muted;
36
+ }
37
+
38
+ .definition-data__number{
39
+ display: block;
40
+ line-height: 1;
41
+ font-weight: 600;
42
+ font-size: rem-calc(20);
43
+ color: $body-font-color;
44
+ margin-bottom: .2rem;
45
+ }
46
+
47
+ .definition-data__text{
48
+ display: block;
49
+ margin: .5rem;
50
+ color: $body-font-color;
51
+ text-transform: none;
52
+ font-size: 1rem;
53
+ line-height: $global-lineheight;
54
+ }
@@ -0,0 +1,43 @@
1
+
2
+ .extra{
3
+ text-align: center;
4
+ margin-bottom: 1rem;
5
+ .button:last-of-type{
6
+ margin-bottom: 0;
7
+ }
8
+ }
9
+
10
+ .extra__suport-number{
11
+ display: block;
12
+ font-weight: 600;
13
+ font-size: 3rem;
14
+ line-height: 1;
15
+ }
16
+
17
+ .extra__suport-text{
18
+ display: block;
19
+ text-transform: uppercase;
20
+ line-height: 1;
21
+ font-size: .9rem;
22
+ margin-bottom: .5rem;
23
+ }
24
+
25
+ .extra__date{
26
+ font-size: 3rem;
27
+ line-height: 1;
28
+ }
29
+ .extra__month{
30
+ display: block;
31
+ text-transform: uppercase;
32
+ font-size: 1rem;
33
+ }
34
+ .extra__time{
35
+ display: block;
36
+ font-size: 1.2rem;
37
+ margin: 1rem 0;
38
+ font-weight: 600;
39
+ }
40
+
41
+ .extra--text{
42
+ text-align: left;
43
+ }
@@ -0,0 +1,96 @@
1
+ //Variables
2
+
3
+ $filters-bg: darken($light-gray, 2.5);
4
+ $filters-border: $border;
5
+ $filters-padding: 1rem;
6
+ $filters-padding-x: 1rem;
7
+ $filters-padding-y: 1rem;
8
+
9
+
10
+ //Styles
11
+ .filters-wrapper{
12
+ @include breakpoint(medium){
13
+ display: flex;
14
+ }
15
+ }
16
+
17
+ .filters-controls{
18
+ @include clearfix;
19
+ margin: 1rem 0 2rem;
20
+ }
21
+
22
+ .filters-controls__trigger{
23
+ width: 100%;
24
+ font-weight: 600;
25
+ text-align: left;
26
+ background: $light-gray;
27
+ padding: .5rem;
28
+ border: $border;
29
+ display: flex;
30
+ justify-content: space-between;
31
+ align-items: center;
32
+ }
33
+
34
+ .filters{
35
+ display: none;
36
+ min-height: 100%;
37
+ //background-color: $filters-bg;
38
+ //border: $filters-border;
39
+ //margin: $filters-margin-small-y $filters-margin-small-x 0;
40
+ padding: $filters-padding;
41
+ @include breakpoint(medium){
42
+ display: block;
43
+ padding: 0;
44
+ margin: 0;
45
+ }
46
+ .reveal &{
47
+ display: block;
48
+ border: none;
49
+ padding: 0;
50
+ margin: 0;
51
+ }
52
+ }
53
+ .js .filters__content{
54
+ display: none;
55
+ &.is-active{
56
+ display: block;
57
+ }
58
+ @include breakpoint(medium){
59
+ display: block;
60
+ }
61
+ }
62
+
63
+ .filters__section{
64
+ border-bottom: $border;
65
+ padding: $filters-padding-x $filters-padding-y;
66
+ &:first-of-type{
67
+ padding-top: $filters-padding-x*1.5;
68
+ }
69
+ &:last-of-type{
70
+ padding-bottom: $filters-padding-x*1.5;
71
+ border-bottom: none;
72
+ }
73
+
74
+ label{
75
+ line-height: 1.2;
76
+ margin-bottom: .4rem;
77
+ }
78
+
79
+ .button{
80
+ margin-bottom: 0;
81
+ }
82
+ }
83
+
84
+ .filters__info__title{
85
+ margin-bottom: 0;
86
+ }
87
+
88
+ .filters__info__icon{
89
+ margin-left: .25rem;
90
+ }
91
+
92
+ .filters__search{
93
+ .input-group{
94
+ margin-bottom: 0;
95
+ }
96
+ }
@@ -0,0 +1,9 @@
1
+ .flag{
2
+ ul{
3
+ list-style: none;
4
+ margin-left: 0;
5
+ }
6
+ li a{
7
+ color: $anchor-color;
8
+ }
9
+ }
@@ -0,0 +1,90 @@
1
+ //Vars
2
+ $main-footer-bg: $black;
3
+ $mini-footer-bg: $dark-gray;
4
+
5
+ //Common
6
+
7
+ .main-footer,
8
+ .mini-footer{
9
+ color: $medium-gray;
10
+ a{
11
+ color: darken($medium-gray, 40%);
12
+ &:hover{
13
+ color: darken($medium-gray, 20%);
14
+ }
15
+ }
16
+ }
17
+
18
+ //Main footer
19
+ .main-footer{
20
+ background-color: $main-footer-bg;
21
+ position: relative;
22
+ padding: 1rem 0;
23
+ min-height: 76px;
24
+ }
25
+
26
+ .main-footer__badge{
27
+ display: block;
28
+ width: 140px;
29
+ @include breakpoint(large){
30
+ position: absolute;
31
+ }
32
+ }
33
+
34
+ .main__footer__nav{
35
+ text-align: center;
36
+ @include breakpoint(medium){
37
+ text-align: left;
38
+ }
39
+ @include breakpoint(large){
40
+ text-align: center;
41
+ }
42
+ }
43
+
44
+ .footer-nav{
45
+ list-style: none;
46
+ padding-top: .5rem;
47
+ margin: 0 0 0 -1rem;
48
+ li{
49
+ display: inline-block;
50
+ padding: 0 1rem;
51
+ }
52
+ @include breakpoint(large){
53
+ margin-left: 0;
54
+ }
55
+ }
56
+
57
+ .main__footer__social{
58
+ text-align: center;
59
+ @include breakpoint(medium){
60
+ text-align: right;
61
+ }
62
+ }
63
+
64
+ .footer-social{
65
+ list-style: none;
66
+ padding-top: .5rem;
67
+ margin: 0;
68
+ li{
69
+ display: inline-block;
70
+ padding-left: 1rem;
71
+ &:first-child{
72
+ padding-left: 0;
73
+ }
74
+ }
75
+ }
76
+
77
+ .footer-social__icon .icon{
78
+ width: 16px;
79
+ height: 16px;
80
+ }
81
+
82
+ //Mini footer
83
+ .mini-footer{
84
+ padding: 1rem 0;
85
+ background-color: $mini-footer-bg;
86
+ }
87
+
88
+ .cc-badge{
89
+ margin-right: .5rem;
90
+ }
@@ -0,0 +1,30 @@
1
+ /* Froms foundation overwrites*/
2
+
3
+ .input-group-button button{
4
+ height: 2.5rem;
5
+ padding: .5rem 1rem;
6
+ }
7
+
8
+ .help-text{
9
+ line-height: 1.2;
10
+ }
11
+
12
+ label > [type='checkbox'],
13
+ label > [type='radio']{
14
+ margin-bottom: 0; //fixes some problems with line-height in double-line labels
15
+ }
16
+
17
+ /* Switch additional styles */
18
+
19
+ .switch-with-label{
20
+ > label{
21
+ display: flex;
22
+ align-items: center;
23
+ line-height: 1.2;
24
+ }
25
+ .switch-paddle{
26
+ display: inline-block;
27
+ margin-right: 1rem;
28
+ flex-shrink: 0;
29
+ }
30
+ }