decidim-department_admin 0.8.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.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE-AGPLv3.txt +661 -0
  3. data/README.md +132 -0
  4. data/Rakefile +9 -0
  5. data/app/controllers/decidim/department_admin/admin/application_controller.rb +15 -0
  6. data/app/controllers/decidim/department_admin/application_controller.rb +13 -0
  7. data/app/decorators/decidim/admin/newsletters_controller_decorator.rb +30 -0
  8. data/app/decorators/decidim/admin/users_controller_decorator.rb +128 -0
  9. data/app/decorators/decidim/area_decorator.rb +44 -0
  10. data/app/decorators/decidim/assemblies/admin/assemblies_controller_decorator.rb +25 -0
  11. data/app/decorators/decidim/assemblies/admin/assemblies_helper_decorator.rb +24 -0
  12. data/app/decorators/decidim/assemblies/create_assembly_decorator.rb +19 -0
  13. data/app/decorators/decidim/assemblies/parent_assemblies_for_select_decorator.rb +38 -0
  14. data/app/decorators/decidim/assemblies/permissions_decorator.rb +22 -0
  15. data/app/decorators/decidim/assemblies/update_assembly_decorator.rb +19 -0
  16. data/app/decorators/decidim/assemblies_decorator.rb +21 -0
  17. data/app/decorators/decidim/assemblies_with_user_role_decorator.rb +27 -0
  18. data/app/decorators/decidim/conference_form_decorator.rb +23 -0
  19. data/app/decorators/decidim/conferences/admin/conferences_controller_decorator.rb +27 -0
  20. data/app/decorators/decidim/conferences/create_conference_decorator.rb +52 -0
  21. data/app/decorators/decidim/conferences/permissions_decorator.rb +24 -0
  22. data/app/decorators/decidim/conferences/update_conference_decorator.rb +21 -0
  23. data/app/decorators/decidim/conferences_decorator.rb +27 -0
  24. data/app/decorators/decidim/conferences_with_user_role_decorator.rb +29 -0
  25. data/app/decorators/decidim/decidim_form_helper_decorator.rb +23 -0
  26. data/app/decorators/decidim/invite_user_decorator.rb +56 -0
  27. data/app/decorators/decidim/invite_user_form_decorator.rb +45 -0
  28. data/app/decorators/decidim/newsletter_decorator.rb +20 -0
  29. data/app/decorators/decidim/newsletters_helper_decorator.rb +44 -0
  30. data/app/decorators/decidim/participatory_process_decorator.rb +21 -0
  31. data/app/decorators/decidim/participatory_process_group_decorator.rb +17 -0
  32. data/app/decorators/decidim/participatory_processes/admin/participatory_processes_controller_decorator.rb +25 -0
  33. data/app/decorators/decidim/participatory_processes/create_participatory_process_decorator.rb +19 -0
  34. data/app/decorators/decidim/participatory_processes/permissions_decorator.rb +22 -0
  35. data/app/decorators/decidim/participatory_processes/update_participatory_process_decorator.rb +19 -0
  36. data/app/decorators/decidim/participatory_processes_with_user_role_decorator.rb +27 -0
  37. data/app/decorators/decidim/user_decorator.rb +59 -0
  38. data/app/decorators/lib/decidim/participatory_space_resourceable_decorator.rb +33 -0
  39. data/app/helpers/decidim/admin/user_roles_helper.rb +25 -0
  40. data/app/helpers/decidim/department_admin/application_helper.rb +54 -0
  41. data/app/models/decidim/participatory_space_role_config/department_admin.rb +8 -0
  42. data/app/overrides/decidim/admin/shared/add_radio_buttons_to_filters.rb +6 -0
  43. data/app/packs/entrypoints/decidim_department_admin.js +4 -0
  44. data/app/packs/entrypoints/decidim_department_admin.scss +1 -0
  45. data/app/packs/images/decidim/department_admin/icon.svg +1 -0
  46. data/app/packs/stylesheets/decidim/admin/department_admin.scss +7 -0
  47. data/app/permissions/decidim/assemblies/participatory_space_permissions.rb +14 -0
  48. data/app/permissions/decidim/conferences/participatory_space_permissions.rb +17 -0
  49. data/app/permissions/decidim/department_admin/permissions.rb +240 -0
  50. data/app/permissions/decidim/participatory_processes/participatory_space_permissions.rb +14 -0
  51. data/app/queries/decidim/admin/user_admin_by_space_name_filter.rb +67 -0
  52. data/app/queries/decidim/admin/user_admin_filter.rb +50 -0
  53. data/app/views/decidim/admin/users/_filters.html.erb +32 -0
  54. data/app/views/decidim/admin/users/_form.html.erb +36 -0
  55. data/app/views/decidim/admin/users/index.html.erb +91 -0
  56. data/app/views/decidim/admin/users/show.html.erb +98 -0
  57. data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +139 -0
  58. data/app/views/decidim/conferences/admin/conferences/_form.html.erb +134 -0
  59. data/app/views/decidim/conferences/admin/conferences/index.html.erb +78 -0
  60. data/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb +117 -0
  61. data/config/assets.rb +27 -0
  62. data/config/i18n-tasks.yml +148 -0
  63. data/config/initializers/user_roles.rb +4 -0
  64. data/config/locales/ca.yml +61 -0
  65. data/config/locales/cs.yml +46 -0
  66. data/config/locales/en.yml +61 -0
  67. data/config/locales/es.yml +61 -0
  68. data/db/migrate/20190328130102_create_department_admin_areas.rb +10 -0
  69. data/db/migrate/20210420143021_add_area_to_conferences.rb +7 -0
  70. data/lib/decidim/department_admin/admin.rb +10 -0
  71. data/lib/decidim/department_admin/admin_engine.rb +27 -0
  72. data/lib/decidim/department_admin/engine.rb +136 -0
  73. data/lib/decidim/department_admin/test/factories.rb +17 -0
  74. data/lib/decidim/department_admin/version.rb +11 -0
  75. data/lib/decidim/department_admin.rb +15 -0
  76. metadata +189 -0
@@ -0,0 +1,117 @@
1
+ <% add_decidim_page_title(t("participatory_processes", scope: "decidim.admin.titles")) %>
2
+ <%= admin_tabs(:admin_participatory_processes_menu).render %>
3
+
4
+ <div class="card" id="processes">
5
+ <%= admin_filter_selector %>
6
+ </div>
7
+
8
+ <div class="table-scroll">
9
+ <table class="table-list">
10
+ <thead>
11
+ <tr>
12
+ <th>
13
+ <%= sort_link(query, :title, t("models.participatory_process.fields.title", scope: "decidim.admin")) %>
14
+ </th>
15
+ <th>
16
+ <%= sort_link(query, :area_name, t("models.participatory_process.fields.department", scope: "decidim.admin")) %>
17
+ </th>
18
+ <th>
19
+ <%= t("models.participatory_process.fields.department_role", scope: "decidim.admin") %>
20
+ </th>
21
+ <th>
22
+ <%= t("models.participatory_process.fields.process_role", scope: "decidim.admin") %>
23
+ </th>
24
+ <th>
25
+ <%= sort_link(query, :created_at, t("models.participatory_process.fields.created_at", scope: "decidim.admin"), default_order: :desc) %>
26
+ </th>
27
+ <th>
28
+ <%= sort_link(query, :private_space, t("models.participatory_process.fields.private", scope: "decidim.admin")) %>
29
+ </th>
30
+ <th class="table-list__actions">
31
+ <%= sort_link(query, :published_at, t("models.participatory_process.fields.published", scope: "decidim.admin")) %>
32
+ </th>
33
+ <th></th>
34
+ </tr>
35
+ </thead>
36
+ <tbody>
37
+ <% @participatory_processes.each do |process| %>
38
+ <tr>
39
+ <td>
40
+ <% if process.promoted? %>
41
+ <%= icon_with_tooltip "star-s-fill", t("models.assembly.fields.promoted", scope: "decidim.admin") %>
42
+ <% end %>
43
+ <% if allowed_to? :update, :process, process: process %>
44
+ <%= link_to translated_attribute(process.title), edit_participatory_process_path(process) %><br>
45
+ <% elsif allowed_to? :read, :component, process: process %>
46
+ <%= link_to translated_attribute(process.title), components_path(process) %><br>
47
+ <% else %>
48
+ <%= translated_attribute(process.title) %>
49
+ <% end %>
50
+ </td>
51
+ <td>
52
+ <% if(process.area != nil) %>
53
+ <%= translated_attribute(process.area.name)%>
54
+ <% end %>
55
+ </td>
56
+ <td>
57
+ <% if(process.area != nil) %>
58
+ <%= process.area.users.map(&:name).join(", ") %>
59
+ <% end %>
60
+ </td>
61
+ <td>
62
+ <%= process.users_with_any_role.map(&:name).join(", ") %>
63
+ </td>
64
+ <td class="table-list__date">
65
+ <%= l process.created_at, format: :short %>
66
+ </td>
67
+ <td class="table-list__state">
68
+ <% if process.private_space? %>
69
+ <span><%= t("participatory_processes.index.private", scope: "decidim.admin") %></span>
70
+ <% else %>
71
+ <span><%= t("participatory_processes.index.public", scope: "decidim.admin") %></span>
72
+ <% end %>
73
+ </td>
74
+ <td class="table-list__state">
75
+ <% if process.published? %>
76
+ <span class="label success !text-sm"><%= t("participatory_processes.index.published", scope: "decidim.admin") %></span>
77
+ <% else %>
78
+ <span class="label alert !text-sm"><%= t("participatory_processes.index.unpublished", scope: "decidim.admin") %></span>
79
+ <% end %>
80
+ </td>
81
+ <td class="table-list__actions">
82
+ <% if allowed_to? :update, :process, process: process %>
83
+ <%= icon_link_to "pencil-line", edit_participatory_process_path(process), t("actions.configure", scope: "decidim.admin"), class: "action-icon--new" %>
84
+ <% else %>
85
+ <span class="action-space icon"></span>
86
+ <% end %>
87
+
88
+ <% if allowed_to? :create, :process, process: process %>
89
+ <%= icon_link_to "download-line", participatory_process_export_path(process), t("actions.export", scope: "decidim.admin"), method: :post, class: "action-icon--export" %>
90
+ <% else %>
91
+ <span class="action-space icon"></span>
92
+ <% end %>
93
+
94
+ <% if allowed_to? :create, :process, process: process %>
95
+ <%= icon_link_to "file-copy-line", new_participatory_process_copy_path(process), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %>
96
+ <% else %>
97
+ <span class="action-space icon"></span>
98
+ <% end %>
99
+
100
+ <% if allowed_to? :preview, :process, process: process %>
101
+ <%= icon_link_to "eye-line", decidim_participatory_processes.participatory_process_path(process), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview", target: "_blank", data: { "external-link": false } %>
102
+ <% else %>
103
+ <span class="action-space icon"></span>
104
+ <% end %>
105
+
106
+ <% if allowed_to? :read, :moderation, process: process %>
107
+ <%= icon_link_to "flag-line", moderations_path(process), t("actions.moderate", scope: "decidim.admin"), class: "action-icon--moderate" %>
108
+ <% else %>
109
+ <span class="action-space icon"></span>
110
+ <% end %>
111
+ </td>
112
+ </tr>
113
+ <% end %>
114
+ </tbody>
115
+ </table>
116
+ </div>
117
+ <%= decidim_paginate @participatory_processes %>
data/config/assets.rb ADDED
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is located at `config/assets.rb` of your module.
4
+
5
+ base_path = File.expand_path("..", __dir__)
6
+
7
+ # Register the additonal path for Webpacker in order to make the module's
8
+ # stylesheets available for inclusion.
9
+ Decidim::Webpacker.register_path("#{base_path}/app/packs")
10
+
11
+ # Register the main application's stylesheet include statement:
12
+ # Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/your_component/your_component")
13
+
14
+ # Register the admin panel's stylesheet include statement:
15
+ # Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/your_component/your_component_admin", group: :admin)
16
+
17
+ # Register the entrypoints for your module. These entrypoints can be included
18
+ # within your application using `javascript_pack_tag` and if you include any
19
+ # SCSS files within the entrypoints, they become available for inclusion using
20
+ # `stylesheet_pack_tag`.
21
+ Decidim::Webpacker.register_entrypoints(
22
+ decidim_department_admin: "#{base_path}/app/packs/entrypoints/decidim_department_admin.js"
23
+ )
24
+
25
+ # If you want to do the same but include the SCSS file for the admin panel's
26
+ # main SCSS file, you can use the following method.
27
+ Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/admin/department_admin", group: :admin)
@@ -0,0 +1,148 @@
1
+ # i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
2
+
3
+ # The "main" locale.
4
+ base_locale: en
5
+ ## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
6
+ # locales: [es, fr]
7
+ ## Reporting locale, default: en. Available: en, ru.
8
+ # internal_locale: en
9
+
10
+ # Read and write translations.
11
+ data:
12
+ ## Translations are read from the file system. Supported format: YAML, JSON.
13
+ ## Provide a custom adapter:
14
+ # adapter: I18n::Tasks::Data::FileSystem
15
+
16
+ # Locale files or `File.find` patterns where translations are read from:
17
+ read:
18
+ ## Default:
19
+ # - config/locales/%{locale}.yml
20
+ ## More files:
21
+ # - config/locales/**/*.%{locale}.yml
22
+
23
+ # Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
24
+ # `i18n-tasks normalize -p` will force move the keys according to these rules
25
+ write:
26
+ ## For example, write devise and simple form keys to their respective files:
27
+ # - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
28
+ ## Catch-all default:
29
+ # - config/locales/%{locale}.yml
30
+
31
+ # External locale data (e.g. gems).
32
+ # This data is not considered unused and is never written to.
33
+ external:
34
+ ## Example (replace %#= with %=):
35
+ # - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
36
+
37
+ ## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class.
38
+ # router: conservative_router
39
+
40
+ yaml:
41
+ write:
42
+ # do not wrap lines at 80 characters
43
+ line_width: -1
44
+
45
+ ## Pretty-print JSON:
46
+ # json:
47
+ # write:
48
+ # indent: ' '
49
+ # space: ' '
50
+ # object_nl: "\n"
51
+ # array_nl: "\n"
52
+
53
+ # Find translate calls
54
+ search:
55
+ ## Paths or `File.find` patterns to search in:
56
+ # paths:
57
+ # - app/
58
+
59
+ ## Root directories for relative keys resolution.
60
+ # relative_roots:
61
+ # - app/controllers
62
+ # - app/helpers
63
+ # - app/mailers
64
+ # - app/presenters
65
+ # - app/views
66
+
67
+ ## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
68
+ ## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
69
+ exclude:
70
+ - app/assets/images
71
+ - app/assets/fonts
72
+ - app/assets/videos
73
+ - app/views/decidim/admin/users/_form.html.erb
74
+
75
+ ## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
76
+ ## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
77
+ # only: ["*.rb", "*.html.slim"]
78
+
79
+ ## If `strict` is `false`, guess usages such as t("categories.#{category}.title"). The default is `true`.
80
+ # strict: true
81
+
82
+ ## Multiple scanners can be used. Their results are merged.
83
+ ## The options specified above are passed down to each scanner. Per-scanner options can be specified as well.
84
+ ## See this example of a custom scanner: https://github.com/glebm/i18n-tasks/wiki/A-custom-scanner-example
85
+
86
+ ## Translation Services
87
+ # translation:
88
+ # # Google Translate
89
+ # # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
90
+ # google_translate_api_key: "AbC-dEf5"
91
+ # # DeepL Pro Translate
92
+ # # Get an API key and subscription at https://www.deepl.com/pro to use DeepL Pro
93
+ # deepl_api_key: "48E92789-57A3-466A-9959-1A1A1A1A1A1A"
94
+
95
+ ## Do not consider these keys missing:
96
+ # ignore_missing:
97
+ # - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
98
+ # - '{devise,simple_form}.*'
99
+
100
+ ## Consider these keys used:
101
+ ignore_unused:
102
+ # - 'activerecord.attributes.*'
103
+ # - '{devise,kaminari,will_paginate}.*'
104
+ # - 'simple_form.{yes,no}'
105
+ # - 'simple_form.{placeholders,hints,labels}.*'
106
+ # - 'simple_form.{error_notification,required}.:'
107
+ - 'decidim.admin.models.user.fields.roles.department_admin'
108
+ - 'decidim.admin.users.form.area'
109
+ - 'decidim.components.department_admin.name'
110
+ - 'decidim.admin.models.user.fields.roles.department_admin'
111
+ - 'decidim.admin.users.form.area'
112
+ - 'decidim.components.department_admin.name'
113
+ - 'decidim.admin.models.user.fields.roles.department_admin'
114
+ - 'decidim.admin.users.form.area'
115
+ - 'decidim.components.department_admin.name'
116
+ - 'decidim.admin.shared.filters.filter.all'
117
+ - 'decidim.admin.shared.filters.filter_by'
118
+ - 'decidim.admin.users.index.filter.all'
119
+ - 'decidim.admin.users.index.filter_by'
120
+ - 'decidim.admin.users.index.search'
121
+
122
+ ## Exclude these keys from the `i18n-tasks eq-base' report:
123
+ # ignore_eq_base:
124
+ # all:
125
+ # - common.ok
126
+ # fr,es:
127
+ # - common.brand
128
+
129
+ ## Exclude these keys from the `i18n-tasks check-consistent-interpolations` report:
130
+ # ignore_inconsistent_interpolations:
131
+ # - 'activerecord.attributes.*'
132
+
133
+ ## Ignore these keys completely:
134
+ # ignore:
135
+ # - kaminari.*
136
+
137
+ ## Sometimes, it isn't possible for i18n-tasks to match the key correctly,
138
+ ## e.g. in case of a relative key defined in a helper method.
139
+ ## In these cases you can use the built-in PatternMapper to map patterns to keys, e.g.:
140
+ #
141
+ # <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
142
+ # only: %w(*.html.haml *.html.slim),
143
+ # patterns: [['= title\b', '.page_title']] %>
144
+ #
145
+ # The PatternMapper can also match key literals via a special %{key} interpolation, e.g.:
146
+ #
147
+ # <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
148
+ # patterns: [['\bSpree\.t[( ]\s*%{key}', 'spree.%{key}']] %>
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ Decidim.user_roles << "department_admin"
4
+ Decidim.user_roles.uniq!
@@ -0,0 +1,61 @@
1
+ ---
2
+ ca:
3
+ decidim:
4
+ admin:
5
+ models:
6
+ assembly:
7
+ fields:
8
+ assembly_role: Rol consell
9
+ department: Departament/Àrea
10
+ department_role: Rol departament
11
+ conference:
12
+ fields:
13
+ conference_role: Rol jornada
14
+ department: Departament/Àrea
15
+ department_role: Rol department
16
+ participatory_process:
17
+ fields:
18
+ department: Departament/Àrea
19
+ department_role: Rol departament
20
+ process_role: Rol procés
21
+ user:
22
+ fields:
23
+ administrated_spaces: Espais administrats
24
+ assembly_type: Consell
25
+ created_at: Data de creació
26
+ department: Departament/Àrea
27
+ private: Privat
28
+ process_type: Procés
29
+ published: Publicat
30
+ roles:
31
+ assembly_admin: Administradora de consell
32
+ department_admin: Administradora de departament
33
+ process_admin: Administradora de procés
34
+ space_admin: Administradora d'espai
35
+ search_field_admins: Administradores
36
+ search_field_processes: Processos
37
+ search_question: Què estàs cercant?
38
+ spaces: Procés / Normativa / Consell
39
+ title: Titol
40
+ type: Tipus
41
+ shared:
42
+ filters:
43
+ filter:
44
+ all: Totes
45
+ filter_by: Filtra per
46
+ users:
47
+ form:
48
+ area: Àrea
49
+ index:
50
+ filter:
51
+ all: Totes
52
+ filter_by: Filtra per
53
+ search: Cerca
54
+ components:
55
+ department_admin:
56
+ name: Admin de Departament
57
+ conferences:
58
+ admin:
59
+ conferences:
60
+ form:
61
+ select_an_area: Selecciona una Àrea
@@ -0,0 +1,46 @@
1
+ ---
2
+ cs:
3
+ decidim:
4
+ admin:
5
+ models:
6
+ assembly:
7
+ fields:
8
+ assembly_role: Role ve shromáždění
9
+ department: Oddělení / oblast
10
+ department_role: Role oddělení
11
+ participatory_process:
12
+ fields:
13
+ department: Oddělení / oblast
14
+ department_role: Role oddělení
15
+ process_role: Role procesu
16
+ user:
17
+ fields:
18
+ administrated_spaces: Spravované prostory
19
+ assembly_type: Shromáždění
20
+ created_at: Vytvořeno v
21
+ department: Oddělení / oblast
22
+ private: Soukromí
23
+ process_type: Proces
24
+ published: Publikováno
25
+ roles:
26
+ assembly_admin: Správce shromáždění
27
+ department_admin: Správce oddělení
28
+ process_admin: Správce procesu
29
+ space_admin: Správce prostoru
30
+ search_field_admins: Správci
31
+ search_field_processes: Procesy
32
+ search_question: Co hledáte?
33
+ spaces: Proces / Pravidlo / Shromáždění
34
+ title: Název
35
+ type: Typ
36
+ users:
37
+ form:
38
+ area: Oblast
39
+ index:
40
+ filter:
41
+ all: Vše
42
+ filter_by: filtrovat podle
43
+ search: Hledat
44
+ components:
45
+ department_admin:
46
+ name: Správce oddělení
@@ -0,0 +1,61 @@
1
+ ---
2
+ en:
3
+ decidim:
4
+ admin:
5
+ models:
6
+ assembly:
7
+ fields:
8
+ assembly_role: Assembly role
9
+ department: Department/Area
10
+ department_role: Department role
11
+ conference:
12
+ fields:
13
+ conference_role: Conference role
14
+ department: Department/Area
15
+ department_role: Department role
16
+ participatory_process:
17
+ fields:
18
+ department: Department/Area
19
+ department_role: Department role
20
+ process_role: Process role
21
+ user:
22
+ fields:
23
+ administrated_spaces: Administrated spaces
24
+ assembly_type: Assemby
25
+ created_at: Created at
26
+ department: Department/Area
27
+ private: Private
28
+ process_type: Process
29
+ published: Published
30
+ roles:
31
+ assembly_admin: Assembly Administrator
32
+ department_admin: Department Administrator
33
+ process_admin: Process Administrator
34
+ space_admin: Space Administrator
35
+ search_field_admins: Administrators
36
+ search_field_processes: Processes
37
+ search_question: What are you looking for?
38
+ spaces: Process / Regulations / Assemblies
39
+ title: Title
40
+ type: Type
41
+ shared:
42
+ filters:
43
+ filter:
44
+ all: All
45
+ filter_by: Filter by
46
+ users:
47
+ form:
48
+ area: Area
49
+ index:
50
+ filter:
51
+ all: All
52
+ filter_by: Filter by
53
+ search: Search
54
+ components:
55
+ department_admin:
56
+ name: Department Admin
57
+ conferences:
58
+ admin:
59
+ conferences:
60
+ form:
61
+ select_an_area: Select an area
@@ -0,0 +1,61 @@
1
+ ---
2
+ es:
3
+ decidim:
4
+ admin:
5
+ models:
6
+ assembly:
7
+ fields:
8
+ assembly_role: Rol consejo
9
+ department: Departamento/Area
10
+ department_role: Rol departamento
11
+ conference:
12
+ fields:
13
+ conference_role: Rol jornada
14
+ department: Departamento/Area
15
+ department_role: Rol departamento
16
+ participatory_process:
17
+ fields:
18
+ department: Departamento/Area
19
+ department_role: Rol departamento
20
+ process_role: Rol proceso
21
+ user:
22
+ fields:
23
+ administrated_spaces: Espacios administrados
24
+ assembly_type: Consejo
25
+ created_at: Data de creación
26
+ department: Departamento/Área
27
+ private: Privado
28
+ process_type: Proceso
29
+ published: Publicado
30
+ roles:
31
+ assembly_admin: Administradora de consejo
32
+ department_admin: Administradora de departamento
33
+ process_admin: Administradora de proceso
34
+ space_admin: Administradora de espacio
35
+ search_field_admins: Administradoras
36
+ search_field_processes: Procesos
37
+ search_question: Que estás buscando?
38
+ spaces: Procesos / Normativas / Consejo
39
+ title: Título
40
+ type: Tipo
41
+ shared:
42
+ filters:
43
+ filter:
44
+ all: Todas
45
+ filter_by: Filtrado por
46
+ users:
47
+ form:
48
+ area: Area
49
+ index:
50
+ filter:
51
+ all: Todas
52
+ filter_by: Filtrado por
53
+ search: Buscar
54
+ components:
55
+ department_admin:
56
+ name: Admin de Departamento
57
+ conferences:
58
+ admin:
59
+ conferences:
60
+ form:
61
+ select_an_area: Selecciona una Area
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateDepartmentAdminAreas < ActiveRecord::Migration[5.2]
4
+ def change
5
+ create_table :department_admin_areas do |t|
6
+ t.belongs_to :decidim_user, foreign_key: true
7
+ t.belongs_to :decidim_area, foreign_key: true
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddAreaToConferences < ActiveRecord::Migration[5.2]
4
+ def change
5
+ add_reference :decidim_conferences, :decidim_area, index: true if Decidim::DepartmentAdmin.conferences_defined?
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module DepartmentAdmin
5
+ # This module contains all the domain logic associated to Decidim's DepartmentAdmin
6
+ # component admin panel.
7
+ module Admin
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module DepartmentAdmin
5
+ # This is the engine that runs on the public interface of `DepartmentAdmin`.
6
+ class AdminEngine < ::Rails::Engine
7
+ isolate_namespace Decidim::DepartmentAdmin::Admin
8
+
9
+ paths["db/migrate"] = nil
10
+ paths["lib/tasks"] = nil
11
+
12
+ routes do
13
+ # Add admin engine routes here
14
+ # resources :department_admin do
15
+ # collection do
16
+ # resources :exports, only: [:create]
17
+ # end
18
+ # end
19
+ # root to: "department_admin#index"
20
+ end
21
+
22
+ def load_seed
23
+ nil
24
+ end
25
+ end
26
+ end
27
+ end