decidim-admin 0.8.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-admin might be problematic. Click here for more details.

Files changed (94) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +1 -1
  3. data/app/assets/javascripts/decidim/admin/application.js.es6 +5 -2
  4. data/app/assets/stylesheets/decidim/admin/_decidim.scss +2 -5
  5. data/app/assets/stylesheets/decidim/admin/extra/_action-icon.scss +4 -4
  6. data/app/assets/stylesheets/decidim/admin/extra/_cards.scss +3 -2
  7. data/app/assets/stylesheets/decidim/admin/extra/_categories.scss +1 -1
  8. data/app/assets/stylesheets/decidim/admin/extra/_dropdown_inverted.scss +8 -1
  9. data/app/assets/stylesheets/decidim/admin/extra/_label-required.scss +1 -1
  10. data/app/assets/stylesheets/decidim/admin/extra/_login.scss +1 -0
  11. data/app/assets/stylesheets/decidim/admin/extra/_quill.scss +2 -2
  12. data/app/assets/stylesheets/decidim/admin/extra/_select_multiple.scss +1 -1
  13. data/app/assets/stylesheets/decidim/admin/extra/_sort.scss +5 -4
  14. data/app/assets/stylesheets/decidim/admin/extra/_title_bar.scss +17 -7
  15. data/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +2 -2
  16. data/app/assets/stylesheets/decidim/admin/modules/_buttons.scss +6 -2
  17. data/app/assets/stylesheets/decidim/admin/modules/_callouts.scss +3 -0
  18. data/app/assets/stylesheets/decidim/admin/modules/_cards.scss +12 -0
  19. data/app/assets/stylesheets/decidim/admin/modules/_char-counter.scss +2 -0
  20. data/app/assets/stylesheets/decidim/admin/modules/_forms.scss +5 -1
  21. data/app/assets/stylesheets/decidim/admin/modules/_icons.scss +1 -0
  22. data/app/assets/stylesheets/decidim/admin/modules/_layout.scss +9 -1
  23. data/app/assets/stylesheets/decidim/admin/modules/_main-nav.scss +5 -0
  24. data/app/assets/stylesheets/decidim/admin/modules/_process-header.scss +1 -0
  25. data/app/assets/stylesheets/decidim/admin/modules/_secondary-nav.scss +10 -5
  26. data/app/assets/stylesheets/decidim/admin/modules/_table-list.scss +7 -1
  27. data/app/assets/stylesheets/decidim/admin/modules/_tabs.scss +7 -0
  28. data/app/assets/stylesheets/decidim/admin/modules/_title-bar.scss +3 -0
  29. data/app/assets/stylesheets/decidim/admin/modules/_user-login.scss +2 -0
  30. data/app/assets/stylesheets/decidim/admin/plugins/_foundation-datepicker.scss +36 -36
  31. data/app/assets/stylesheets/decidim/admin/utils/_fontface.scss +22 -20
  32. data/app/assets/stylesheets/decidim/admin/utils/_helpers.scss +6 -6
  33. data/app/assets/stylesheets/decidim/admin/utils/_keyframes.scss +6 -6
  34. data/app/assets/stylesheets/decidim/admin/utils/_mixins.scss +2 -3
  35. data/app/assets/stylesheets/decidim/admin/utils/_settings.scss +406 -129
  36. data/app/assets/stylesheets/decidim/admin/utils/_toggle-expand.scss +1 -0
  37. data/app/commands/decidim/admin/create_attachment.rb +13 -3
  38. data/app/commands/decidim/admin/create_feature.rb +1 -0
  39. data/app/commands/decidim/admin/create_managed_user.rb +20 -10
  40. data/app/commands/decidim/admin/impersonate_managed_user.rb +7 -9
  41. data/app/commands/decidim/admin/officialize_user.rb +47 -0
  42. data/app/commands/decidim/admin/unofficialize_user.rb +35 -0
  43. data/app/commands/decidim/admin/update_organization_appearance.rb +32 -5
  44. data/app/controllers/decidim/admin/categories_controller.rb +1 -1
  45. data/app/controllers/decidim/admin/features/base_controller.rb +1 -1
  46. data/app/controllers/decidim/admin/features_controller.rb +7 -0
  47. data/app/controllers/decidim/admin/managed_users/impersonations_controller.rb +1 -1
  48. data/app/controllers/decidim/admin/managed_users_controller.rb +23 -9
  49. data/app/controllers/decidim/admin/newsletters_controller.rb +2 -2
  50. data/app/controllers/decidim/admin/officializations_controller.rb +64 -0
  51. data/app/events/decidim/attachment_created_event.rb +25 -0
  52. data/app/events/decidim/feature_published_event.rb +27 -0
  53. data/app/events/decidim/participatory_process_step_activated_event.rb +31 -0
  54. data/app/forms/decidim/admin/managed_user_form.rb +0 -11
  55. data/app/forms/decidim/admin/officialization_form.rb +30 -0
  56. data/app/forms/decidim/admin/organization_appearance_form.rb +46 -1
  57. data/app/helpers/decidim/admin/application_helper.rb +1 -3
  58. data/app/models/decidim/admin/abilities/admin_ability.rb +1 -0
  59. data/app/models/decidim/admin/abilities/participatory_process_moderator_ability.rb +1 -1
  60. data/app/queries/decidim/admin/user_groups_evaluation.rb +9 -8
  61. data/app/queries/decidim/admin/users_officialization.rb +53 -0
  62. data/app/views/decidim/admin/managed_users/new.html.erb +5 -5
  63. data/app/views/decidim/admin/officializations/index.html.erb +82 -0
  64. data/app/views/decidim/admin/officializations/new.html.erb +18 -0
  65. data/app/views/decidim/admin/organization_appearance/_form.html.erb +60 -0
  66. data/app/views/layouts/decidim/admin/_title_bar.html.erb +1 -1
  67. data/app/views/layouts/decidim/admin/users.html.erb +5 -0
  68. data/config/locales/ca.yml +44 -2
  69. data/config/locales/en.yml +44 -1
  70. data/config/locales/es.yml +47 -5
  71. data/config/locales/eu.yml +46 -3
  72. data/config/locales/fi.yml +55 -12
  73. data/config/locales/fr.yml +45 -2
  74. data/config/locales/gl.yml +514 -0
  75. data/config/locales/it.yml +47 -4
  76. data/config/locales/nl.yml +47 -4
  77. data/config/locales/pl.yml +44 -1
  78. data/config/locales/pt-BR.yml +514 -0
  79. data/config/locales/pt.yml +106 -63
  80. data/config/locales/ru.yml +36 -6
  81. data/config/locales/sv.yml +514 -0
  82. data/config/locales/uk.yml +36 -8
  83. data/config/routes.rb +2 -0
  84. data/db/migrate/20171219154507_add_officialization_to_users.rb +10 -0
  85. data/lib/decidim/admin/engine.rb +1 -2
  86. data/lib/decidim/admin/test/manage_feature_permissions_examples.rb +0 -1
  87. data/lib/decidim/admin/test/manage_moderations_examples.rb +64 -0
  88. data/lib/decidim/admin/test.rb +5 -0
  89. data/lib/decidim/admin/version.rb +1 -1
  90. data/vendor/assets/javascripts/moment.min.js +1 -7
  91. metadata +37 -38
  92. data/app/assets/javascripts/decidim/admin/scopes.js.es6 +0 -20
  93. data/app/assets/javascripts/decidim/admin/select2.js.es6 +0 -8
  94. data/app/assets/stylesheets/decidim/admin/plugins/_select2.scss +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fce922e0089d9ed07326a1e94358d6ac0369e017
4
- data.tar.gz: d0a2c99292b6107b85358a4903d67c321d3ab8cb
2
+ SHA256:
3
+ metadata.gz: 55c7d0aa69d4ae38597e2a58ef8f0cf069247cc4a954fa1711c0586f2c110027
4
+ data.tar.gz: 62ea5e919a2fcbc6ee9df034be4bf1702b1c56d789937cd019bd5a2b98db43e9
5
5
  SHA512:
6
- metadata.gz: d21005f8d249df1e0545514164aab9506f8b14b783ade310385cec5f605dd3a403099f8abb8dfa753e416346e3a4e071153db75207f747fca5a3e02e05ab7dac
7
- data.tar.gz: 4da1945d5ebc6ca61de4dfdb3ccb02e008f0f6ec96de01b918ac2950de0b8dfa758d99d55556967d5d6f7f90f50d28e035912bdaab72dade8df32e30a6bd3685
6
+ metadata.gz: 18dff04ae012aa007f7129405489063741aadd4698b80fc388bb38291d632f5fdcbe78aa204363acc60944d95cee985b3a134904a00a4f156511d69d79f8234a
7
+ data.tar.gz: ed5d80d7c6df261f9212386e4757d67a08ac94a4e012ca6ee9244f082caf6031f7075e0670c734be7bfc31a58c2b646f59b02f2013d5f5286d7be5ddb25432e4
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Decidim::Admin
2
2
 
3
- This library adds an administration dashboard so users can manage their
3
+ Adds an administration dashboard so users can manage their
4
4
  organization, participatory processes and all other entities.
5
5
 
6
6
  ## Usage
@@ -8,8 +8,7 @@
8
8
  // = require foundation-datepicker
9
9
  // = require form_datepicker
10
10
  // = require moment.min
11
- // = require ./select2
12
- // = require ./scopes
11
+ // = require decidim/data_picker
13
12
  // = require_self
14
13
 
15
14
  window.Decidim = window.Decidim || {};
@@ -38,6 +37,10 @@ const pageLoad = () => {
38
37
  };
39
38
 
40
39
  $(() => {
40
+ if (window.Decidim.DataPicker) {
41
+ window.theDataPicker = new window.Decidim.DataPicker($(".data-picker"));
42
+ }
43
+
41
44
  pageLoad();
42
45
 
43
46
  if (window.Decidim.formDatePicker) {
@@ -1,17 +1,14 @@
1
1
  @import "variables";
2
-
3
2
  @import "utils/fontface";
4
3
  @import "utils/helpers";
5
4
  @import "utils/keyframes";
6
5
  @import "utils/mixins";
7
6
  @import "utils/settings";
8
7
  @import "utils/toggle-expand";
9
-
10
8
  @import "foundation";
9
+
11
10
  @include foundation-everything();
12
11
 
13
- @import "select2";
14
- @import "plugins/select2";
15
12
  @import "plugins/foundation-datepicker";
16
-
13
+ @import "decidim/modules/data-picker";
17
14
  @import "modules/modules";
@@ -1,8 +1,8 @@
1
- .table-list__actions {
2
- .action-icon {
3
- &.action-icon--disabled {
1
+ .table-list__actions{
2
+ .action-icon{
3
+ &.action-icon--disabled{
4
4
  color: rgba($muted, .3);
5
- vertical-align: bottom
5
+ vertical-align: bottom;
6
6
  }
7
7
  }
8
8
  }
@@ -1,12 +1,13 @@
1
1
  .card__filter{
2
2
  margin-bottom: 0;
3
+
3
4
  @include breakpoint(mediumlarge){
4
5
  float: right;
5
6
  }
6
7
  }
7
8
 
8
- form {
9
- .card {
9
+ form{
10
+ .card{
10
11
  overflow: initial;
11
12
  }
12
13
  }
@@ -1,5 +1,5 @@
1
1
  .extra__table-list__subcategory{
2
2
  td:first-child{
3
- padding-left: 20px
3
+ padding-left: 20px;
4
4
  }
5
5
  }
@@ -3,13 +3,16 @@
3
3
  vertical-align: middle;
4
4
  padding: 2px 10px 2px 2px;
5
5
  text-align: right;
6
+
6
7
  .dropdown > li > a{
7
8
  padding-left: 0;
8
9
  }
10
+
9
11
  .dropdown{
10
12
  display: inline-block;
11
13
  vertical-align: middle;
12
14
  }
15
+
13
16
  .is-dropdown-submenu{
14
17
  z-index: 2;
15
18
  text-align: left;
@@ -17,16 +20,20 @@
17
20
  border: 1px solid $light-gray !important;
18
21
  box-shadow: 0 3px 5px rgba(0, 0, 0, .3);
19
22
  min-width: 100px;
23
+
20
24
  li{
21
- padding: 8px 8px 0
25
+ padding: 8px 8px 0;
22
26
  }
27
+
23
28
  li:hover{
24
29
  background-color: darken($white, 5%) !important;
25
30
  }
31
+
26
32
  a{
27
33
  color: $body-font-color;
28
34
  padding: .5rem;
29
35
  }
36
+
30
37
  a:hover{
31
38
  color: lighten($body-font-color, 20);
32
39
  }
@@ -1,3 +1,3 @@
1
- .label-required {
1
+ .label-required{
2
2
  margin-left: 5px;
3
3
  }
@@ -25,6 +25,7 @@ body.login{
25
25
 
26
26
  @include breakpoint(medium){
27
27
  @include flex-align(center, middle);
28
+
28
29
  transform: translateY(-8%);
29
30
  }
30
31
 
@@ -1,5 +1,5 @@
1
- .ql-disabled {
2
- .ql-editor {
1
+ .ql-disabled{
2
+ .ql-editor{
3
3
  background: #eee;
4
4
  }
5
5
  }
@@ -1,3 +1,3 @@
1
- select[multiple] {
1
+ select[multiple]{
2
2
  min-height: 100px;
3
3
  }
@@ -1,12 +1,13 @@
1
- .survey-questions {
2
- .question-divider {
1
+ .survey-questions{
2
+ .question-divider{
3
3
  cursor: move;
4
- h2 {
4
+
5
+ h2{
5
6
  line-height: 32px;
6
7
  }
7
8
  }
8
9
  }
9
10
 
10
- .icon--move {
11
+ .icon--move{
11
12
  vertical-align: middle;
12
13
  }
@@ -1,7 +1,8 @@
1
- .title-bar {
2
- a.logo {
1
+ .title-bar{
2
+ a.logo{
3
3
  color: #fff;
4
4
  }
5
+
5
6
  @include breakpoint(smallmedium down){
6
7
  border-top: 2.125rem solid darken($dark-gray, 15%);
7
8
  }
@@ -12,45 +13,54 @@
12
13
  position: absolute;
13
14
  right: 2rem;
14
15
  vertical-align: middle;
16
+
15
17
  @include breakpoint(smallmedium down){
16
18
  position: initial;
17
19
  }
20
+
18
21
  .user-login{
19
22
  vertical-align: middle;
20
23
  position: initial;
21
24
  text-align: left;
22
25
  display: inline-block;
23
- margin-top: 0px;
26
+ margin-top: 0;
27
+
24
28
  @include breakpoint(smallmedium down){
25
29
  position: absolute;
26
30
  right: 2rem;
27
31
  margin-top: -1.2rem;
28
32
  }
29
33
  }
34
+
30
35
  .language-choose{
31
36
  position: initial;
32
- vertical-align: middle;
33
37
  text-align: left;
34
38
  display: inline-block;
35
39
  vertical-align: middle;
40
+
36
41
  .is-dropdown-submenu-parent a{
37
42
  color: #fff;
38
- &:after{
43
+
44
+ &::after{
39
45
  border-color: #fff transparent transparent !important;
40
46
  }
41
47
  }
42
- .is-dropdown-submenu li > a {
48
+
49
+ .is-dropdown-submenu li > a{
43
50
  color: $dark-gray;
51
+
44
52
  &:hover{
45
- background-color: lighten($medium-gray, 30%)
53
+ background-color: lighten($medium-gray, 30%);
46
54
  }
47
55
  }
56
+
48
57
  @include breakpoint(smallmedium down){
49
58
  font-size: .8rem;
50
59
  position: absolute;
51
60
  top: -2.2rem;
52
61
  left: .5rem;
53
62
  margin-left: 0;
63
+
54
64
  .dropdown.menu > li.is-dropdown-submenu-parent > a::after{
55
65
  border-width: 3px;
56
66
  right: 10px;
@@ -3,7 +3,7 @@
3
3
  $action-icon-height: 24px;
4
4
  $action-icon-width: $icon-size;
5
5
 
6
- .action-icon {
6
+ .action-icon{
7
7
  height: $action-icon-height;
8
8
  }
9
9
 
@@ -24,7 +24,7 @@ $action-icon-width: $icon-size;
24
24
  .action-icon--hide{
25
25
  position: relative;
26
26
 
27
- &:before{
27
+ &::before{
28
28
  border-left: 1px solid;
29
29
  bottom: 0;
30
30
  content: "";
@@ -1,10 +1,11 @@
1
- /* Foundation button overrides*/
1
+ /* Foundation button overrides */
2
2
 
3
3
  .button{
4
4
  &.small{
5
5
  padding-top: .5rem;
6
6
  padding-bottom: .5rem;
7
7
  }
8
+
8
9
  &.tiny{
9
10
  padding-top: .25rem;
10
11
  padding-bottom: .25rem;
@@ -13,6 +14,7 @@
13
14
 
14
15
  .button.muted{
15
16
  background-color: $medium-gray;
17
+
16
18
  &:hover{
17
19
  background-color: darken($medium-gray, 10);
18
20
  }
@@ -21,18 +23,20 @@
21
23
  .button--title{
22
24
  margin-bottom: 0;
23
25
  float: right;
26
+
24
27
  &:not(:first-child){
25
28
  margin-right: 1rem;
26
29
  }
27
30
  }
28
31
 
29
-
30
32
  .button--double{
31
33
  .button:not(:last-child){
32
34
  margin-right: 1rem;
33
35
  }
36
+
34
37
  display: flex;
35
38
  align-items: center;
39
+
36
40
  .button{
37
41
  margin-bottom: 0;
38
42
  }
@@ -4,12 +4,15 @@
4
4
  background-color: $primary-color;
5
5
  font-weight: 600;
6
6
  color: $white;
7
+
7
8
  &.warning{
8
9
  background-color: $warning-color;
9
10
  }
11
+
10
12
  &.success{
11
13
  background-color: $success-color;
12
14
  }
15
+
13
16
  &.alert{
14
17
  background-color: $alert-color;
15
18
  }
@@ -2,14 +2,18 @@ $card-padding-small: 1rem;
2
2
 
3
3
  .card-title{
4
4
  @include smallcaps;
5
+
5
6
  font-size: 1rem;
7
+
6
8
  @include clearfix;
9
+
7
10
  width: 100%;
8
11
  }
9
12
 
10
13
  .card-footer{
11
14
  padding: $card-padding;
12
15
  border-top: 1px solid rgba(black, .1);
16
+
13
17
  .button--remove{
14
18
  margin-left: auto;
15
19
  }
@@ -18,14 +22,17 @@ $card-padding-small: 1rem;
18
22
  .card__icon-open{
19
23
  display: none;
20
24
  }
25
+
21
26
  .card--collapsed{
22
27
  .card-section,
23
28
  .card-footer{
24
29
  display: none;
25
30
  }
31
+
26
32
  .card__icon-close{
27
33
  display: none;
28
34
  }
35
+
29
36
  .card__icon-open{
30
37
  display: block;
31
38
  }
@@ -35,9 +42,11 @@ $card-padding-small: 1rem;
35
42
  display: flex;
36
43
  align-items: center;
37
44
  padding-left: $card-padding-small;
45
+
38
46
  .card--list--mini &{
39
47
  padding-left: $card-padding-small;
40
48
  }
49
+
41
50
  @include breakpoint(medium){
42
51
  padding-left: $card-padding;
43
52
  }
@@ -46,6 +55,7 @@ $card-padding-small: 1rem;
46
55
  .card--list__icon{
47
56
  display: none;
48
57
  fill: $anchor-color;
58
+
49
59
  @include breakpoint(medium){
50
60
  margin-right: 1rem;
51
61
  display: block;
@@ -62,9 +72,11 @@ $card-padding-small: 1rem;
62
72
  overflow: hidden;
63
73
  align-items: center;
64
74
  padding: 1rem 1rem 1rem 0;
75
+
65
76
  .card--list--mini &{
66
77
  padding: .5rem .5rem .5rem 0;
67
78
  }
79
+
68
80
  .author{
69
81
  margin-top: .3rem;
70
82
  margin-right: 1rem;
@@ -1,5 +1,6 @@
1
1
  .textarea-char-counter{
2
2
  position: relative;
3
+
3
4
  textarea{
4
5
  padding-bottom: 2.2rem;
5
6
  }
@@ -15,6 +16,7 @@
15
16
  bottom: 1px;
16
17
  text-align: right;
17
18
  }
19
+
18
20
  .char-counter--excess{
19
21
  color: $alert-color;
20
22
  }
@@ -15,6 +15,7 @@ textarea{
15
15
  select{
16
16
  height: 3rem;
17
17
  }
18
+
18
19
  input,
19
20
  select,
20
21
  textarea,
@@ -22,8 +23,10 @@ textarea{
22
23
  .input-field{
23
24
  margin-bottom: $input-margin;
24
25
  }
26
+
25
27
  .check-radio-group{
26
28
  margin-bottom: 1rem;
29
+
27
30
  .check-radio{
28
31
  margin-bottom: .5rem;
29
32
  }
@@ -36,6 +39,7 @@ textarea{
36
39
 
37
40
  .legend{
38
41
  @include smallcaps;
42
+
39
43
  margin-bottom: 1rem;
40
44
  }
41
45
 
@@ -45,7 +49,6 @@ textarea{
45
49
  margin-bottom: 1.5rem;
46
50
  }
47
51
 
48
-
49
52
  .form-submit .button{
50
53
  margin-bottom: 0;
51
54
  }
@@ -61,6 +64,7 @@ textarea{
61
64
  display: inline-flex;
62
65
  align-items: center;
63
66
  }
67
+
64
68
  input{
65
69
  margin-bottom: 0;
66
70
  }