decidim-admin 0.9.3 → 0.10.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 (140) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/decidim/admin/application.js.es6 +1 -0
  3. data/app/assets/stylesheets/decidim/admin/_decidim.scss +3 -1
  4. data/app/assets/stylesheets/decidim/admin/extra/_logs.scss +122 -0
  5. data/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +0 -6
  6. data/app/assets/stylesheets/decidim/admin/modules/_buttons.scss +20 -1
  7. data/app/assets/stylesheets/decidim/admin/modules/_cards.scss +13 -2
  8. data/app/assets/stylesheets/decidim/admin/modules/_component-counter.scss +9 -0
  9. data/app/assets/stylesheets/decidim/admin/modules/_dropdown.scss +20 -0
  10. data/app/assets/stylesheets/decidim/admin/modules/_filters.scss +6 -0
  11. data/app/assets/stylesheets/decidim/admin/modules/_forms.scss +2 -1
  12. data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +2 -0
  13. data/app/assets/stylesheets/decidim/admin/modules/_secondary-nav.scss +7 -0
  14. data/app/assets/stylesheets/decidim/admin/modules/_table-list.scss +13 -4
  15. data/app/assets/stylesheets/decidim/admin/utils/_flex.scss +60 -0
  16. data/app/assets/stylesheets/decidim/admin/utils/_mixins.scss +17 -0
  17. data/app/assets/stylesheets/decidim/admin/utils/_settings.scss +6 -3
  18. data/app/commands/decidim/admin/create_area.rb +40 -0
  19. data/app/commands/decidim/admin/create_area_type.rb +40 -0
  20. data/app/commands/decidim/admin/create_attachment.rb +3 -1
  21. data/app/commands/decidim/admin/create_attachment_collection.rb +44 -0
  22. data/app/commands/decidim/admin/create_feature.rb +3 -1
  23. data/app/commands/decidim/admin/create_newsletter.rb +3 -1
  24. data/app/commands/decidim/admin/create_scope.rb +14 -6
  25. data/app/commands/decidim/admin/create_static_page.rb +3 -1
  26. data/app/commands/decidim/admin/deliver_newsletter.rb +10 -2
  27. data/app/commands/decidim/admin/destroy_feature.rb +12 -2
  28. data/app/commands/decidim/admin/destroy_newsletter.rb +39 -0
  29. data/app/commands/decidim/admin/destroy_scope.rb +46 -0
  30. data/app/commands/decidim/admin/destroy_static_page.rb +40 -0
  31. data/app/commands/decidim/admin/hide_resource.rb +13 -2
  32. data/app/commands/decidim/admin/invite_admin.rb +56 -0
  33. data/app/commands/decidim/admin/officialize_user.rb +17 -4
  34. data/app/commands/decidim/admin/publish_feature.rb +51 -0
  35. data/app/commands/decidim/admin/reject_user_group.rb +10 -2
  36. data/app/commands/decidim/admin/remove_admin.rb +42 -0
  37. data/app/commands/decidim/admin/unofficialize_user.rb +17 -3
  38. data/app/commands/decidim/admin/unpublish_feature.rb +41 -0
  39. data/app/commands/decidim/admin/unreport_resource.rb +13 -2
  40. data/app/commands/decidim/admin/update_area.rb +45 -0
  41. data/app/commands/decidim/admin/update_area_type.rb +45 -0
  42. data/app/commands/decidim/admin/update_attachment.rb +6 -4
  43. data/app/commands/decidim/admin/update_attachment_collection.rb +46 -0
  44. data/app/commands/decidim/admin/update_category.rb +1 -1
  45. data/app/commands/decidim/admin/update_feature.rb +21 -9
  46. data/app/commands/decidim/admin/update_feature_permissions.rb +10 -2
  47. data/app/commands/decidim/admin/update_newsletter.rb +3 -1
  48. data/app/commands/decidim/admin/update_organization.rb +5 -2
  49. data/app/commands/decidim/admin/update_organization_appearance.rb +11 -9
  50. data/app/commands/decidim/admin/update_scope.rb +10 -3
  51. data/app/commands/decidim/admin/update_scope_type.rb +1 -1
  52. data/app/commands/decidim/admin/update_static_page.rb +5 -1
  53. data/app/commands/decidim/admin/update_user_groups.rb +1 -1
  54. data/app/commands/decidim/admin/verify_user_group.rb +10 -2
  55. data/app/controllers/decidim/admin/area_types_controller.rb +79 -0
  56. data/app/controllers/decidim/admin/areas_controller.rb +80 -0
  57. data/app/controllers/decidim/admin/concerns/has_attachment_collections.rb +118 -0
  58. data/app/controllers/decidim/admin/concerns/has_attachments.rb +4 -4
  59. data/app/controllers/decidim/admin/dashboard_controller.rb +12 -0
  60. data/app/controllers/decidim/admin/features/base_controller.rb +1 -0
  61. data/app/controllers/decidim/admin/features_controller.rb +26 -17
  62. data/app/controllers/decidim/admin/logs_controller.rb +24 -0
  63. data/app/controllers/decidim/admin/moderations_controller.rb +2 -2
  64. data/app/controllers/decidim/admin/newsletters_controller.rb +11 -8
  65. data/app/controllers/decidim/admin/officializations_controller.rb +3 -3
  66. data/app/controllers/decidim/admin/scopes_controller.rb +7 -5
  67. data/app/controllers/decidim/admin/static_pages_controller.rb +6 -4
  68. data/app/controllers/decidim/admin/user_groups_controller.rb +2 -2
  69. data/app/controllers/decidim/admin/users_controller.rb +2 -2
  70. data/app/events/decidim/feature_published_event.rb +0 -19
  71. data/app/events/decidim/participatory_process_step_activated_event.rb +3 -11
  72. data/app/events/decidim/participatory_process_step_changed_event.rb +23 -0
  73. data/app/forms/decidim/admin/area_form.rb +25 -0
  74. data/app/forms/decidim/admin/area_type_form.rb +21 -0
  75. data/app/forms/decidim/admin/attachment_collection_form.rb +18 -0
  76. data/app/forms/decidim/admin/attachment_form.rb +20 -0
  77. data/app/forms/decidim/admin/organization_appearance_form.rb +1 -1
  78. data/app/helpers/decidim/admin/application_helper.rb +1 -0
  79. data/app/helpers/decidim/admin/areas_helper.rb +23 -0
  80. data/app/helpers/decidim/admin/bulk_actions_helper.rb +26 -0
  81. data/app/helpers/decidim/admin/icon_link_helper.rb +1 -2
  82. data/app/helpers/decidim/admin/log_render_helper.rb +21 -0
  83. data/app/helpers/decidim/admin/scopes_helper.rb +0 -9
  84. data/app/jobs/decidim/admin/newsletter_job.rb +1 -1
  85. data/app/models/decidim/admin/abilities/admin_ability.rb +15 -5
  86. data/app/models/decidim/admin/abilities/participatory_process_admin_ability.rb +4 -0
  87. data/app/queries/decidim/admin/user_groups_evaluation.rb +8 -8
  88. data/app/queries/decidim/admin/users_officialization.rb +13 -10
  89. data/app/views/decidim/admin/area_types/_form.html.erb +7 -0
  90. data/app/views/decidim/admin/area_types/edit.html.erb +13 -0
  91. data/app/views/decidim/admin/area_types/index.html.erb +40 -0
  92. data/app/views/decidim/admin/area_types/new.html.erb +13 -0
  93. data/app/views/decidim/admin/areas/_form.html.erb +10 -0
  94. data/app/views/decidim/admin/areas/edit.html.erb +13 -0
  95. data/app/views/decidim/admin/areas/index.html.erb +45 -0
  96. data/app/views/decidim/admin/areas/new.html.erb +13 -0
  97. data/app/views/decidim/admin/attachment_collections/_form.html.erb +19 -0
  98. data/app/views/decidim/admin/attachment_collections/edit.html.erb +7 -0
  99. data/app/views/decidim/admin/attachment_collections/index.html.erb +49 -0
  100. data/app/views/decidim/admin/attachment_collections/new.html.erb +7 -0
  101. data/app/views/decidim/admin/attachment_collections/show.html.erb +14 -0
  102. data/app/views/decidim/admin/attachments/_form.html.erb +8 -0
  103. data/app/views/decidim/admin/attachments/index.html.erb +8 -0
  104. data/app/views/decidim/admin/bulk_actions/_dropdown.html.erb +26 -0
  105. data/app/views/decidim/admin/bulk_actions/_recategorize.html.erb +15 -0
  106. data/app/views/decidim/admin/dashboard/show.html.erb +10 -0
  107. data/app/views/decidim/admin/logs/_logs_list.html.erb +20 -0
  108. data/app/views/decidim/admin/logs/index.html.erb +6 -0
  109. data/app/views/decidim/admin/moderations/_report.html.erb +0 -1
  110. data/app/views/layouts/decidim/admin/settings.html.erb +6 -0
  111. data/config/locales/ca.yml +102 -12
  112. data/config/locales/en.yml +94 -4
  113. data/config/locales/es.yml +97 -7
  114. data/config/locales/eu.yml +100 -10
  115. data/config/locales/fi.yml +101 -11
  116. data/config/locales/fr.yml +107 -17
  117. data/config/locales/gl.yml +94 -4
  118. data/config/locales/it.yml +102 -12
  119. data/config/locales/nl.yml +99 -9
  120. data/config/locales/pl.yml +97 -7
  121. data/config/locales/pt-BR.yml +100 -10
  122. data/config/locales/pt.yml +100 -10
  123. data/config/locales/ru.yml +0 -13
  124. data/config/locales/sv.yml +94 -4
  125. data/config/locales/uk.yml +110 -11
  126. data/config/routes.rb +3 -1
  127. data/lib/decidim/admin/engine.rb +7 -0
  128. data/lib/decidim/admin/test.rb +1 -0
  129. data/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb +62 -0
  130. data/lib/decidim/admin/test/commands/create_category_examples.rb +2 -2
  131. data/lib/decidim/admin/test/commands/destroy_category_examples.rb +2 -2
  132. data/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb +65 -0
  133. data/lib/decidim/admin/test/forms/attachment_collection_form_examples.rb +74 -0
  134. data/lib/decidim/admin/test/forms/attachment_form_examples.rb +100 -0
  135. data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +117 -0
  136. data/lib/decidim/admin/test/manage_attachments_examples.rb +60 -2
  137. data/lib/decidim/admin/version.rb +1 -1
  138. data/vendor/assets/javascripts/jquery.auto-complete.js +171 -0
  139. data/vendor/assets/stylesheets/plugins/jquery.auto-complete.css +9 -0
  140. metadata +61 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b4130a578d9140eb173946a9f3ac83c9014bc1563c10e549196cb5d724f8df7
4
- data.tar.gz: df14e82901eaa5876e839cc3c1477b34215842800e07920f002425ec44a1aa4e
3
+ metadata.gz: 9a8c533c386e581cf533829aa1438846244db66cd40db0b20b1b4e24be2ac0cc
4
+ data.tar.gz: 449820378916379fdc541ee8f123e1d6e6c22f38ddce34aa24f8835912083a82
5
5
  SHA512:
6
- metadata.gz: eeeda4d79df6dfba7298d7e43d5e5a206004ff2fbe749a4b4cc90b88df4838408f79690f56550b5b2e6c623322966b344d7a296bda39966518ded208dfe61d55
7
- data.tar.gz: 6ca7906a86040057aa916482da31221f2a0ec54c7957574571a53dfba5c535ecd1a9ea09f16abd907ec8fb30a56119df2cd5d9eea3deb3bcba48147a935112f1
6
+ metadata.gz: bf89918254191a8e6179d8de37a3eccedfcad338c3d000cb5c1b93561f56e9b2061180a8af11b8a13eee8b5fe5ae9f0c3fee2939babd51c2253bdae9ffa8371e
7
+ data.tar.gz: '09b8e3a8e1c4e28c3229b9346177f847c89facb8b1e93ef3aaf426323c9333c6111fe8e40ecee0ad7d9bc36a03d77eb922bf50cb2dd91f5ea7e876b4465490d8'
@@ -9,6 +9,7 @@
9
9
  // = require form_datepicker
10
10
  // = require moment.min
11
11
  // = require decidim/data_picker
12
+ // = require jquery.auto-complete
12
13
  // = require_self
13
14
 
14
15
  window.Decidim = window.Decidim || {};
@@ -2,13 +2,15 @@
2
2
  @import "utils/fontface";
3
3
  @import "utils/helpers";
4
4
  @import "utils/keyframes";
5
- @import "utils/mixins";
6
5
  @import "utils/settings";
7
6
  @import "utils/toggle-expand";
8
7
  @import "foundation";
9
8
 
10
9
  @include foundation-everything();
11
10
 
11
+ @import "utils/mixins";
12
+ @import "utils/flex";
12
13
  @import "plugins/foundation-datepicker";
13
14
  @import "decidim/modules/data-picker";
14
15
  @import "modules/modules";
16
+ @import "plugins/jquery.auto-complete";
@@ -0,0 +1,122 @@
1
+ .logs{
2
+ list-style: none;
3
+ margin-left: 0;
4
+ margin-bottom: 0;
5
+
6
+ p.logs--no-logs{
7
+ margin: rem-calc(16);
8
+ }
9
+
10
+ li{
11
+ .logs__log__content,
12
+ .logs__log__diff-row{
13
+ display: flex;
14
+ flex-direction: row;
15
+ padding: $table-padding;
16
+ border-bottom: 1px solid rgba(black, .05);
17
+ }
18
+
19
+ .logs__log__diff-row{
20
+ &:last-child{
21
+ border-bottom: none;
22
+ }
23
+ }
24
+ }
25
+
26
+ .logs__log--deletion .logs__log__content{
27
+ background-color: rgb(255, 242, 242);
28
+ }
29
+
30
+ .logs__log__date{
31
+ font-family: $font-family-monospace;
32
+ font-size: 14px;
33
+ margin-top: 2px;
34
+ color: $muted;
35
+ text-align: right;
36
+ padding-right: rem-calc(10);
37
+ flex-grow: 5;
38
+ flex-basis: 1px;
39
+ }
40
+
41
+ .logs__log__explanation{
42
+ flex-grow: 34;
43
+ flex-basis: 1px;
44
+
45
+ span,
46
+ a{
47
+ font-weight: 600;
48
+ }
49
+
50
+ .logs__log__author{
51
+ color: rgb(89, 197, 100);
52
+ }
53
+
54
+ .logs__log__resource{
55
+ color: rgb(58, 134, 222);
56
+ }
57
+
58
+ .logs__log__space{
59
+ color: rgb(143, 107, 201);
60
+ }
61
+ }
62
+
63
+ .logs__log__actions{
64
+ flex-grow: 1;
65
+ flex-basis: 1px;
66
+ text-align: right;
67
+ }
68
+
69
+ .logs__log__actions-dropdown{
70
+ color: $muted;
71
+ padding: rem-calc(0 10);
72
+
73
+ &::after{
74
+ content: "▸";
75
+ }
76
+ }
77
+
78
+ .logs__log__diff{
79
+ max-height: 200px;
80
+ overflow-y: scroll;
81
+ display: none;
82
+ }
83
+
84
+ .logs__log--expanded{
85
+ .logs__log__diff{
86
+ display: block;
87
+ }
88
+
89
+ .logs__log__actions-dropdown{
90
+ &::after{
91
+ content: "▾";
92
+ }
93
+ }
94
+ }
95
+
96
+ .logs__log__diff-title{
97
+ padding-right: rem-calc(10);
98
+ flex-grow: 5;
99
+ font-weight: 600;
100
+ text-align: right;
101
+ flex-basis: 1px;
102
+ }
103
+
104
+ .logs__log__diff-value{
105
+ flex-grow: 35;
106
+ flex-basis: 1px;
107
+ }
108
+
109
+ .logs__log__diff-row--new-value{
110
+ background-color: rgb(217, 255, 221);
111
+ }
112
+
113
+ .logs__log__diff-row--previous-value{
114
+ background-color: rgb(238, 238, 238);
115
+
116
+ .logs__log__diff-title{
117
+ color: rgb(152, 152, 152);
118
+ font-weight: normal;
119
+ text-transform: lowercase;
120
+ }
121
+ }
122
+ }
@@ -11,12 +11,6 @@ $action-icon-width: $icon-size;
11
11
  margin-right: 1rem;
12
12
  }
13
13
 
14
- .action-icon.has-tip,
15
- .simple-has-tip.has-tip{
16
- border-bottom: 0;
17
- cursor: pointer;
18
- }
19
-
20
14
  .action-icon.action-icon--remove{
21
15
  color: $alert-color;
22
16
  }
@@ -1,14 +1,25 @@
1
1
  /* Foundation button overrides */
2
-
3
2
  .button{
4
3
  &.small{
5
4
  padding-top: .5rem;
6
5
  padding-bottom: .5rem;
6
+
7
+ &.compact{
8
+ padding-left: .5rem;
9
+ padding-right: .5rem;
10
+ letter-spacing: 0;
11
+ }
7
12
  }
8
13
 
9
14
  &.tiny{
10
15
  padding-top: .25rem;
11
16
  padding-bottom: .25rem;
17
+
18
+ &.compact{
19
+ padding-left: .25rem;
20
+ padding-right: .25rem;
21
+ letter-spacing: 0;
22
+ }
12
23
  }
13
24
  }
14
25
 
@@ -20,6 +31,10 @@
20
31
  }
21
32
  }
22
33
 
34
+ .button.light{
35
+ color: $white;
36
+ }
37
+
23
38
  .button--title{
24
39
  margin-bottom: 0;
25
40
  float: right;
@@ -45,3 +60,7 @@
45
60
  .button--simple{
46
61
  margin-bottom: 0;
47
62
  }
63
+
64
+ .button--nomargin{
65
+ margin: 0;
66
+ }
@@ -3,10 +3,16 @@ $card-padding-small: 1rem;
3
3
  .card-title{
4
4
  @include smallcaps;
5
5
 
6
- font-size: 1rem;
6
+ button:not(.clear){
7
+ @include smallcaps;
8
+ }
7
9
 
8
- @include clearfix;
10
+ // clearfix if there is no flex--* class in the same element
11
+ &:not([class*="flex--"]){
12
+ @include clearfix;
13
+ }
9
14
 
15
+ font-size: 1rem;
10
16
  width: 100%;
11
17
  }
12
18
 
@@ -87,3 +93,8 @@ $card-padding-small: 1rem;
87
93
  margin-bottom: 0;
88
94
  display: block;
89
95
  }
96
+
97
+ .card-divider--reduced{
98
+ // height adjust
99
+ padding: (($global-padding / 2) + rem-calc(.7)) $global-padding;
100
+ }
@@ -9,6 +9,15 @@
9
9
  font-size: .7rem;
10
10
  float: right;
11
11
  margin-top: .4em;
12
+
13
+ &.component-counter--inline{
14
+ float: none;
15
+ display: inline-block;
16
+ }
17
+
18
+ &:empty{
19
+ display: none;
20
+ }
12
21
  }
13
22
 
14
23
  .component-counter--off{
@@ -0,0 +1,20 @@
1
+ // Overwrite foundation defaults
2
+ .dropdown-pane{
3
+ padding: 0;
4
+ background-color: $white;
5
+ border: $card-border;
6
+
7
+ ul{
8
+ margin: 0;
9
+ padding: 0;
10
+ }
11
+
12
+ li{
13
+ padding: $global-padding;
14
+ color: $brand;
15
+
16
+ &:not(:last-child){
17
+ border-bottom: $card-border;
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,6 @@
1
+ .filters__section{
2
+ display: flex;
3
+ justify-content: space-between;
4
+ align-items: baseline;
5
+ padding: 0 $global-padding;
6
+ }
@@ -20,7 +20,8 @@ textarea{
20
20
  select,
21
21
  textarea,
22
22
  .check-radio,
23
- .input-field{
23
+ .input-field,
24
+ .data-picker{
24
25
  margin-bottom: $input-margin;
25
26
  }
26
27
 
@@ -23,3 +23,5 @@
23
23
  @import "char-counter";
24
24
  @import "component-counter";
25
25
  @import "pics";
26
+ @import "filters";
27
+ @import "dropdown";
@@ -79,6 +79,13 @@ $process-title-height: 3rem;
79
79
  margin-top: 2rem;
80
80
  }
81
81
 
82
+ .secondary-nav__subtitle{
83
+ display: block;
84
+ padding: .5rem 1rem;
85
+ margin: 0 .5rem;
86
+ color: $body-font-color;
87
+ }
88
+
82
89
  .process-title{
83
90
  @include breakpoint(large){
84
91
  margin-bottom: $process-title-height;
@@ -33,6 +33,11 @@
33
33
  text-align: right;
34
34
  }
35
35
 
36
+ th [type="checkbox"]:only-child,
37
+ td [type="checkbox"]:only-child{
38
+ margin-bottom: 0;
39
+ }
40
+
36
41
  &.table-list--lastcenter{
37
42
  th:last-child,
38
43
  td:last-child{
@@ -47,6 +52,10 @@
47
52
  }
48
53
  }
49
54
 
55
+ tr.selected{
56
+ background-color: rgba($brand, .05);
57
+ }
58
+
50
59
  a:not(.button){
51
60
  color: $body-font-color;
52
61
 
@@ -59,6 +68,10 @@
59
68
  margin-bottom: 0;
60
69
  }
61
70
 
71
+ td{
72
+ @include modifiers(color, (muted: $muted));
73
+ }
74
+
62
75
  .switch.tiny{
63
76
  margin: 0 auto;
64
77
  width: 48px;
@@ -86,7 +99,3 @@
86
99
  .table-list__state{
87
100
  text-align: center;
88
101
  }
89
-
90
- .icon-state.has-tip{
91
- border-bottom: 0;
92
- }
@@ -0,0 +1,60 @@
1
+ // Flex layout utilities
2
+ // require foundation
3
+ $space: $global-margin;
4
+ $spaces: $space ($space * 2);
5
+
6
+ @mixin flexgap($gap: 0, $dir: row){
7
+ display: flex;
8
+ flex-direction: $dir;
9
+
10
+ @if $dir == row{
11
+ & > *{
12
+ margin: 0 $gap/2;
13
+ }
14
+
15
+ & > :first-child{
16
+ margin-left: 0;
17
+ }
18
+
19
+ & > :last-child{
20
+ margin-right: 0;
21
+ }
22
+ }
23
+
24
+ @else if $dir == column{
25
+ & > *{
26
+ margin: $gap/2 0;
27
+ }
28
+
29
+ & > :first-child{
30
+ margin-top: 0;
31
+ }
32
+
33
+ & > :last-child{
34
+ margin-bottom: 0;
35
+ }
36
+ }
37
+ }
38
+
39
+ // generates a gap simple and a double
40
+ @each $gap in $spaces{
41
+ .flex-gap--#{strip-unit($gap)}{
42
+ @include flexgap($gap: $gap);
43
+ }
44
+ }
45
+
46
+ // flex--cc:
47
+ // justify-content: center;
48
+ // align-items: center;
49
+ .flex--cc{
50
+ @include flex;
51
+ @include flex-align($x: center, $y: middle);
52
+ }
53
+
54
+ // flex--cc:
55
+ // justify-content: space-between;
56
+ // align-items: center;
57
+ .flex--sbc{
58
+ @include flex;
59
+ @include flex-align($x: spaced, $y: middle);
60
+ }
@@ -17,3 +17,20 @@
17
17
  letter-spacing: .1em;
18
18
  font-size: .9em;
19
19
  }
20
+
21
+ // Status modifier mixin
22
+ $palette: $foundation-palette;
23
+
24
+ @mixin modifiers($vars, $colors: $palette){
25
+ $map: map-merge($palette, $colors);
26
+
27
+ @each $key, $value in $map{
28
+ &.#{$key}{
29
+ @content;
30
+
31
+ @each $property in $vars{
32
+ #{$property}: map-get($map, $key);
33
+ }
34
+ }
35
+ }
36
+ }