decidim-admin 0.0.8.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of decidim-admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/decidim/admin/_decidim.scss +9 -2
- data/app/assets/stylesheets/decidim/admin/extra/_action-icon.scss +7 -0
- data/app/assets/stylesheets/decidim/admin/extra/_cards.scss +6 -0
- data/app/assets/stylesheets/decidim/admin/extra/_editor.scss +1 -0
- data/app/assets/stylesheets/decidim/admin/{_sidebar.scss → extra/_sidebar.scss} +0 -0
- data/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +23 -0
- data/app/assets/stylesheets/decidim/admin/modules/_cards.scss +0 -7
- data/app/assets/stylesheets/decidim/admin/modules/_icons.scss +4 -2
- data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +0 -1
- data/app/assets/stylesheets/decidim/admin/{modules/_datepicker.scss → plugins/_foundation-datepicker.scss} +1 -1
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/_constants.scss +5 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/_math.scss +45 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_acos.scss +12 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_asin.scss +12 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan.scss +28 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan2.scss +37 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cos.scss +13 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cot.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_csc.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_exp.scss +12 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_fact.scss +18 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss +21 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss +17 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_log.scss +34 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_pow.scss +28 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sec.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sin.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sqrt.scss +16 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_tan.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_deg-to-rad.scss +4 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_rad-to-deg.scss +4 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_strip-unit.scss +8 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss +13 -0
- data/app/commands/decidim/admin/create_participatory_process.rb +23 -17
- data/app/commands/decidim/admin/create_participatory_process_group.rb +1 -1
- data/app/controllers/decidim/admin/moderations_controller.rb +4 -4
- data/app/controllers/decidim/admin/participatory_processes_controller.rb +1 -1
- data/app/forms/decidim/admin/organization_form.rb +6 -2
- data/app/forms/decidim/admin/participatory_process_form.rb +5 -0
- data/app/helpers/decidim/admin/application_helper.rb +1 -1
- data/app/helpers/decidim/admin/attributes_display_helper.rb +1 -1
- data/app/views/decidim/admin/features/_feature.html.erb +5 -1
- data/app/views/decidim/admin/moderations/_report.html.erb +11 -0
- data/app/views/decidim/admin/moderations/index.html.erb +22 -24
- data/app/views/layouts/decidim/admin/participatory_process.html.erb +3 -0
- data/config/i18n-tasks.yml +1 -0
- data/config/locales/ca.yml +7 -3
- data/config/locales/en.yml +6 -2
- data/config/locales/es.yml +7 -3
- data/config/locales/eu.yml +4 -3
- data/config/locales/fi.yml +4 -3
- data/config/locales/fr.yml +389 -2
- data/config/locales/nl.yml +4 -1
- data/lib/decidim/admin/test/manage_attachments_examples.rb +2 -2
- metadata +39 -12
@@ -15,7 +15,7 @@ module Decidim
|
|
15
15
|
current_organization.name
|
16
16
|
end
|
17
17
|
|
18
|
-
def admin_menu_item_to(name, url, options={})
|
18
|
+
def admin_menu_item_to(name, url, options = {})
|
19
19
|
content_tag :li, class: options[:active_class] || active_link_to_class(url, active: options[:active], class_active: "is-active") do
|
20
20
|
active_link_to url, active: options[:active], class_active: "is-active" do
|
21
21
|
icon(options[:icon_name] || name) + I18n.t("menu.#{name}", scope: "decidim.admin")
|
@@ -6,7 +6,7 @@ module Decidim
|
|
6
6
|
module AttributesDisplayHelper
|
7
7
|
# Displays the given attributes list in a list. This is a simple
|
8
8
|
# `show_for` alternative, so there's no way to modify how an attribute is
|
9
|
-
# shown and there is no intention on adding this. It is
|
9
|
+
# shown and there is no intention on adding this. It is intended to be
|
10
10
|
# used inside a `dl` HTML tag, so you can customize how a specific
|
11
11
|
# attribute has to be shown directly:
|
12
12
|
#
|
@@ -25,7 +25,11 @@
|
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
<% if can? :update, feature %>
|
28
|
-
|
28
|
+
<% if feature.manifest.actions.empty? %>
|
29
|
+
<%= icon "key", class: "action-icon action-icon--disabled" %>
|
30
|
+
<% else %>
|
31
|
+
<%= icon_link_to "key", edit_participatory_process_feature_permissions_path(feature_id: feature), t("actions.permissions", scope: "decidim.admin"), class: "action-icon--permissions" %>
|
32
|
+
<% end %>
|
29
33
|
<% end %>
|
30
34
|
|
31
35
|
<%= icon_link_to "circle-x", url_for(action: :destroy, id: feature, controller: "features"), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete %>
|
@@ -20,7 +20,9 @@
|
|
20
20
|
<th><%= t("models.moderation.fields.reported_content", scope: "decidim.moderations") %></th>
|
21
21
|
<th><%= t("models.moderation.fields.reports", scope: "decidim.moderations") %></th>
|
22
22
|
<th><%= t("models.moderation.fields.report_count", scope: "decidim.moderations") %></th>
|
23
|
-
|
23
|
+
<% if params[:hidden] %>
|
24
|
+
<th><%= t("models.moderation.fields.hidden_at", scope: "decidim.moderations") %></th>
|
25
|
+
<% end %>
|
24
26
|
<th class="actions"><%= t("actions.title", scope: "decidim.moderations") %></th>
|
25
27
|
</tr>
|
26
28
|
</thead>
|
@@ -28,42 +30,38 @@
|
|
28
30
|
<% moderations.each do |moderation| %>
|
29
31
|
<tr data-id="<%= moderation.id %>">
|
30
32
|
<td>
|
31
|
-
<%= moderation.reportable.class.name %>
|
33
|
+
<%= moderation.reportable.class.name.demodulize %>
|
32
34
|
</td>
|
33
35
|
<td>
|
34
36
|
<%= moderation.reportable.reported_content %>
|
35
37
|
</td>
|
36
38
|
<td>
|
37
|
-
|
38
|
-
|
39
|
-
<li>
|
40
|
-
<% if report.details.blank? %>
|
41
|
-
<%= report.reason %>
|
42
|
-
<% else %>
|
43
|
-
<span
|
44
|
-
data-tooltip
|
45
|
-
aria-haspopup="true"
|
46
|
-
class="has-tip"
|
47
|
-
title="<%= report.details %>">
|
48
|
-
<%= report.reason %>
|
49
|
-
</span>
|
50
|
-
<% end %>
|
51
|
-
</li>
|
52
|
-
<% end %>
|
53
|
-
</ul>
|
39
|
+
<% reports = moderation.reports.map { |report| render 'report', report: report } %>
|
40
|
+
<%= safe_join(reports, ',') %>
|
54
41
|
</td>
|
55
42
|
<td>
|
56
43
|
<%= moderation.report_count %>
|
57
44
|
</td>
|
58
|
-
|
59
|
-
|
60
|
-
|
45
|
+
<% if params[:hidden] %>
|
46
|
+
<td>
|
47
|
+
<%= l(moderation.hidden_at, format: :long) if moderation.hidden_at.present? %>
|
48
|
+
</td>
|
49
|
+
<% end %>
|
61
50
|
<td class="actions">
|
51
|
+
|
62
52
|
<% if can? :unreport, moderation %>
|
63
|
-
<%=
|
53
|
+
<%= icon_link_to "action-undo",
|
54
|
+
decidim_admin.unreport_participatory_process_moderation_path(id: moderation),
|
55
|
+
t("actions.unreport", scope: "decidim.moderations"),
|
56
|
+
class: "action-icon--unreport",
|
57
|
+
method: :put %>
|
64
58
|
<% end %>
|
65
59
|
<% if !moderation.reportable.hidden? && can?(:hide, moderation) %>
|
66
|
-
|
60
|
+
<%= icon_link_to "eye",
|
61
|
+
decidim_admin.hide_participatory_process_moderation_path(id: moderation),
|
62
|
+
t("actions.hide", scope: "decidim.moderations"),
|
63
|
+
class: "action-icon--hide",
|
64
|
+
method: :put %>
|
67
65
|
<% end %>
|
68
66
|
</td>
|
69
67
|
</tr>
|
@@ -20,6 +20,9 @@
|
|
20
20
|
<li <% if is_active_link?(decidim_admin.manage_feature_path(participatory_process, feature)) %> class="is-active" <% end %>>
|
21
21
|
<%= link_to decidim_admin.manage_feature_path(participatory_process, feature) do %>
|
22
22
|
<%= translated_attribute feature.name %>
|
23
|
+
<% if feature.primary_stat.present? %>
|
24
|
+
<span class="component-counter <%= "component-counter--off" if feature.primary_stat.zero? %>"><%= feature.primary_stat %></span>
|
25
|
+
<% end %>
|
23
26
|
<% end %>
|
24
27
|
</li>
|
25
28
|
<% end %>
|
data/config/i18n-tasks.yml
CHANGED
data/config/locales/ca.yml
CHANGED
@@ -104,6 +104,9 @@ ca:
|
|
104
104
|
content: Contingut
|
105
105
|
slug: Nom curt d'URL
|
106
106
|
title: Títol
|
107
|
+
date:
|
108
|
+
formats:
|
109
|
+
datepicker: "%m/%d/%Y"
|
107
110
|
decidim:
|
108
111
|
admin:
|
109
112
|
actions:
|
@@ -489,7 +492,7 @@ ca:
|
|
489
492
|
hidden: Ocults
|
490
493
|
hide: Amagar
|
491
494
|
not_hidden: No ocult
|
492
|
-
title:
|
495
|
+
title: Accions
|
493
496
|
unreport: Desfer denúncia
|
494
497
|
admin:
|
495
498
|
reportable:
|
@@ -503,7 +506,7 @@ ca:
|
|
503
506
|
moderation:
|
504
507
|
fields:
|
505
508
|
hidden_at: Data d'ocultació
|
506
|
-
report_count:
|
509
|
+
report_count: Recompte
|
507
510
|
reportable: Tipus
|
508
511
|
reported_content: Contingut
|
509
512
|
reports: Denúncies
|
@@ -521,4 +524,5 @@ ca:
|
|
521
524
|
title: Usuaris
|
522
525
|
time:
|
523
526
|
formats:
|
524
|
-
|
527
|
+
datepicker: "%m/%d/%Y"
|
528
|
+
timepicker: "%d/%m/%Y %H:%M"
|
data/config/locales/en.yml
CHANGED
@@ -105,6 +105,9 @@ en:
|
|
105
105
|
content: Content
|
106
106
|
slug: URL slug
|
107
107
|
title: Title
|
108
|
+
date:
|
109
|
+
formats:
|
110
|
+
datepicker: "%m/%d/%Y"
|
108
111
|
decidim:
|
109
112
|
admin:
|
110
113
|
actions:
|
@@ -490,7 +493,7 @@ en:
|
|
490
493
|
hidden: Hidden
|
491
494
|
hide: Hide
|
492
495
|
not_hidden: Not hidden
|
493
|
-
title:
|
496
|
+
title: Actions
|
494
497
|
unreport: Unreport
|
495
498
|
admin:
|
496
499
|
reportable:
|
@@ -504,7 +507,7 @@ en:
|
|
504
507
|
moderation:
|
505
508
|
fields:
|
506
509
|
hidden_at: Hidden at
|
507
|
-
report_count:
|
510
|
+
report_count: Count
|
508
511
|
reportable: Reportable
|
509
512
|
reported_content: Reported content
|
510
513
|
reports: Reports
|
@@ -522,4 +525,5 @@ en:
|
|
522
525
|
title: Users
|
523
526
|
time:
|
524
527
|
formats:
|
528
|
+
datepicker: "%m/%d/%Y"
|
525
529
|
timepicker: "%m/%d/%Y %H:%M"
|
data/config/locales/es.yml
CHANGED
@@ -104,6 +104,9 @@ es:
|
|
104
104
|
content: Contenido
|
105
105
|
slug: Texto corto de URL
|
106
106
|
title: Título
|
107
|
+
date:
|
108
|
+
formats:
|
109
|
+
datepicker: "%m/%d/%Y"
|
107
110
|
decidim:
|
108
111
|
admin:
|
109
112
|
actions:
|
@@ -489,7 +492,7 @@ es:
|
|
489
492
|
hidden: Ocultas
|
490
493
|
hide: Esconder
|
491
494
|
not_hidden: No ocultas
|
492
|
-
title:
|
495
|
+
title: Acciones
|
493
496
|
unreport: Cancelar denuncia
|
494
497
|
admin:
|
495
498
|
reportable:
|
@@ -503,7 +506,7 @@ es:
|
|
503
506
|
moderation:
|
504
507
|
fields:
|
505
508
|
hidden_at: Fecha de ocultación
|
506
|
-
report_count:
|
509
|
+
report_count: Recuento
|
507
510
|
reportable: Tipo
|
508
511
|
reported_content: Contenido
|
509
512
|
reports: Denuncias
|
@@ -521,4 +524,5 @@ es:
|
|
521
524
|
title: Usuarios
|
522
525
|
time:
|
523
526
|
formats:
|
524
|
-
|
527
|
+
datepicker: "%m/%d/%Y"
|
528
|
+
timepicker: "%d/%m/%Y %H:%M"
|
data/config/locales/eu.yml
CHANGED
@@ -468,7 +468,6 @@ eu:
|
|
468
468
|
hidden: ' Ezkutatuta'
|
469
469
|
hide: Ezkutatu
|
470
470
|
not_hidden: Ezkutatu gabe
|
471
|
-
title: ' Salaketak'
|
472
471
|
unreport: Ezeztatu salaketa
|
473
472
|
admin:
|
474
473
|
reportable:
|
@@ -482,7 +481,6 @@ eu:
|
|
482
481
|
moderation:
|
483
482
|
fields:
|
484
483
|
hidden_at: Ezkutatze-data
|
485
|
-
report_count: Salaketa-kopurua
|
486
484
|
reportable: Mota
|
487
485
|
reported_content: Edukia
|
488
486
|
reports: Salaketak
|
@@ -497,4 +495,7 @@ eu:
|
|
497
495
|
settings:
|
498
496
|
title: Ezarpenak
|
499
497
|
users:
|
500
|
-
title: Erabiltzaileak
|
498
|
+
title: Erabiltzaileak
|
499
|
+
time:
|
500
|
+
formats:
|
501
|
+
timepicker: "%d/%m/%Y %H:%M"
|
data/config/locales/fi.yml
CHANGED
@@ -398,7 +398,6 @@ fi:
|
|
398
398
|
hidden: Piilotettu
|
399
399
|
hide: Piilota
|
400
400
|
not_hidden: Näkyvillä
|
401
|
-
title: Moderoinnit
|
402
401
|
unreport: Poista raportointi
|
403
402
|
admin:
|
404
403
|
reportable:
|
@@ -412,10 +411,12 @@ fi:
|
|
412
411
|
moderation:
|
413
412
|
fields:
|
414
413
|
hidden_at: Piilotuksen ajankohta
|
415
|
-
report_count: Raportointimäärä
|
416
414
|
reportable: Raportoitava
|
417
415
|
reported_content: Raportoitava sisältö
|
418
416
|
reports: Raportit
|
419
417
|
participatory_processes:
|
420
418
|
participatory_process_groups:
|
421
|
-
none: Ei ryhmää
|
419
|
+
none: Ei ryhmää
|
420
|
+
time:
|
421
|
+
formats:
|
422
|
+
timepicker: "%d/%m/%Y %H:%M"
|