decidim-assemblies 0.20.1 → 0.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/decidim/assemblies/assembly.svg +1 -3
  3. data/app/assets/javascripts/decidim/assemblies/orgchart.js.es6 +698 -0
  4. data/app/cells/decidim/assemblies/assembly_m/footer.erb +2 -2
  5. data/app/cells/decidim/assemblies/assembly_m_cell.rb +5 -5
  6. data/app/cells/decidim/assemblies/assembly_member/show.erb +4 -4
  7. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb +10 -11
  8. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_cell.rb +1 -0
  9. data/app/commands/decidim/assemblies/admin/create_assemblies_type.rb +45 -0
  10. data/app/commands/decidim/assemblies/admin/create_assembly.rb +1 -2
  11. data/app/commands/decidim/assemblies/admin/create_assembly_admin.rb +2 -1
  12. data/app/commands/decidim/assemblies/admin/create_assembly_member.rb +12 -3
  13. data/app/commands/decidim/assemblies/admin/destroy_assemblies_type.rb +45 -0
  14. data/app/commands/decidim/assemblies/admin/import_assembly.rb +72 -0
  15. data/app/commands/decidim/assemblies/admin/notify_role_assigned_to_assembly.rb +22 -0
  16. data/app/commands/decidim/assemblies/admin/update_assemblies_setting.rb +46 -0
  17. data/app/commands/decidim/assemblies/admin/update_assemblies_type.rb +46 -0
  18. data/app/commands/decidim/assemblies/admin/update_assembly.rb +11 -7
  19. data/app/commands/decidim/assemblies/admin/update_assembly_admin.rb +2 -1
  20. data/app/controllers/concerns/decidim/assemblies/admin/filterable.rb +30 -0
  21. data/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +8 -23
  22. data/app/controllers/decidim/assemblies/admin/assemblies_settings_controller.rb +49 -0
  23. data/app/controllers/decidim/assemblies/admin/assemblies_types_controller.rb +107 -0
  24. data/app/controllers/decidim/assemblies/admin/assembly_exports_controller.rb +24 -0
  25. data/app/controllers/decidim/assemblies/admin/assembly_imports_controller.rb +31 -0
  26. data/app/controllers/decidim/assemblies/admin/assembly_user_roles_controller.rb +2 -1
  27. data/app/controllers/decidim/assemblies/assemblies_controller.rb +6 -2
  28. data/app/controllers/decidim/assemblies/{assembly_widgets_controller.rb → widgets_controller.rb} +2 -2
  29. data/app/events/decidim/assemblies/create_assembly_member_event.rb +17 -0
  30. data/app/events/decidim/role_assigned_to_assembly_event.rb +28 -0
  31. data/app/forms/decidim/assemblies/admin/assemblies_setting_form.rb +14 -0
  32. data/app/forms/decidim/assemblies/admin/assemblies_type_form.rb +17 -0
  33. data/app/forms/decidim/assemblies/admin/assembly_form.rb +37 -19
  34. data/app/forms/decidim/assemblies/admin/assembly_import_form.rb +83 -0
  35. data/app/forms/decidim/assemblies/admin/assembly_user_role_form.rb +8 -2
  36. data/app/helpers/decidim/assemblies/admin/assemblies_helper.rb +6 -0
  37. data/app/helpers/decidim/assemblies/assemblies_helper.rb +6 -3
  38. data/app/helpers/decidim/assemblies/filter_assemblies_helper.rb +10 -7
  39. data/app/models/decidim/assemblies_setting.rb +17 -0
  40. data/app/models/decidim/assemblies_type.rb +27 -0
  41. data/app/models/decidim/assembly.rb +26 -3
  42. data/app/models/decidim/assembly_user_role.rb +1 -1
  43. data/app/permissions/decidim/assemblies/permissions.rb +60 -2
  44. data/app/presenters/decidim/assemblies/admin_log/assemblies_setting_presenter.rb +27 -0
  45. data/app/presenters/decidim/assemblies/admin_log/assemblies_type_presenter.rb +43 -0
  46. data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +1 -2
  47. data/app/presenters/decidim/assemblies/assembly_presenter.rb +29 -0
  48. data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +1 -1
  49. data/app/presenters/decidim/log/value_types/assembly_type_presenter.rb +29 -0
  50. data/app/queries/decidim/assemblies/filtered_assemblies.rb +2 -2
  51. data/app/queries/decidim/assemblies/parent_assemblies_for_select.rb +42 -0
  52. data/app/serializers/decidim/assemblies/assembly_importer.rb +172 -0
  53. data/app/serializers/decidim/assemblies/assembly_serializer.rb +147 -0
  54. data/app/services/decidim/assemblies/assembly_search.rb +3 -3
  55. data/app/types/decidim/assemblies/assemblies_type_type.rb +17 -0
  56. data/app/types/decidim/assemblies/assembly_member_type.rb +29 -0
  57. data/app/types/decidim/assemblies/assembly_type.rb +67 -0
  58. data/app/views/decidim/assemblies/_filter_by_type.html.erb +11 -7
  59. data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +2 -6
  60. data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +18 -4
  61. data/app/views/decidim/assemblies/admin/assemblies_settings/_form.html.erb +10 -0
  62. data/app/views/decidim/assemblies/admin/assemblies_settings/edit.html.erb +6 -0
  63. data/app/views/decidim/assemblies/admin/assemblies_types/_form.html.erb +11 -0
  64. data/app/views/decidim/assemblies/admin/assemblies_types/edit.html.erb +6 -0
  65. data/app/views/decidim/assemblies/admin/assemblies_types/index.html.erb +43 -0
  66. data/app/views/decidim/assemblies/admin/assemblies_types/new.html.erb +7 -0
  67. data/app/views/decidim/assemblies/admin/assembly_imports/_form.html.erb +46 -0
  68. data/app/views/decidim/assemblies/admin/assembly_imports/new.html.erb +7 -0
  69. data/app/views/decidim/assemblies/admin/assembly_members/index.html.erb +30 -30
  70. data/app/views/decidim/assemblies/assemblies/_parent_assemblies.html.erb +2 -2
  71. data/app/views/decidim/assemblies/assemblies/_promoted_assembly.html.erb +3 -3
  72. data/app/views/decidim/assemblies/assemblies/index.html.erb +11 -8
  73. data/app/views/decidim/assemblies/assemblies/show.html.erb +11 -14
  74. data/app/views/decidim/assemblies/assembly_members/index.html.erb +1 -1
  75. data/app/views/layouts/decidim/admin/assemblies.html.erb +22 -0
  76. data/app/views/layouts/decidim/admin/assembly.html.erb +2 -2
  77. data/app/views/layouts/decidim/assembly.html.erb +1 -0
  78. data/config/locales/am-ET.yml +1 -0
  79. data/config/locales/ar.yml +24 -0
  80. data/config/locales/bg-BG.yml +7 -0
  81. data/config/locales/bg.yml +7 -0
  82. data/config/locales/ca.yml +100 -0
  83. data/config/locales/cs.yml +135 -35
  84. data/config/locales/da-DK.yml +1 -0
  85. data/config/locales/da.yml +1 -0
  86. data/config/locales/de.yml +99 -0
  87. data/config/locales/el.yml +475 -0
  88. data/config/locales/en.yml +100 -0
  89. data/config/locales/eo.yml +1 -0
  90. data/config/locales/es-MX.yml +100 -0
  91. data/config/locales/es-PY.yml +100 -0
  92. data/config/locales/es.yml +100 -0
  93. data/config/locales/et-EE.yml +1 -0
  94. data/config/locales/et.yml +1 -0
  95. data/config/locales/eu.yml +11 -0
  96. data/config/locales/fi-plain.yml +100 -0
  97. data/config/locales/fi.yml +104 -4
  98. data/config/locales/fr-CA.yml +478 -0
  99. data/config/locales/fr.yml +100 -0
  100. data/config/locales/ga-IE.yml +1 -0
  101. data/config/locales/gl.yml +11 -0
  102. data/config/locales/hr-HR.yml +1 -0
  103. data/config/locales/hr.yml +1 -0
  104. data/config/locales/hu.yml +85 -2
  105. data/config/locales/id-ID.yml +11 -0
  106. data/config/locales/is-IS.yml +11 -0
  107. data/config/locales/is.yml +263 -0
  108. data/config/locales/it.yml +171 -74
  109. data/config/locales/ja-JP.yml +471 -0
  110. data/config/locales/ja.yml +471 -0
  111. data/config/locales/ko-KR.yml +1 -0
  112. data/config/locales/ko.yml +1 -0
  113. data/config/locales/lt-LT.yml +1 -0
  114. data/config/locales/lt.yml +1 -0
  115. data/config/locales/lv.yml +454 -0
  116. data/config/locales/mt-MT.yml +1 -0
  117. data/config/locales/mt.yml +1 -0
  118. data/config/locales/nl.yml +97 -0
  119. data/config/locales/no.yml +107 -10
  120. data/config/locales/om-ET.yml +1 -0
  121. data/config/locales/pl.yml +250 -151
  122. data/config/locales/pt-BR.yml +12 -1
  123. data/config/locales/pt.yml +217 -118
  124. data/config/locales/ro-RO.yml +441 -0
  125. data/config/locales/ru.yml +11 -0
  126. data/config/locales/sk-SK.yml +168 -0
  127. data/config/locales/sk.yml +172 -0
  128. data/config/locales/sl.yml +283 -0
  129. data/config/locales/so-SO.yml +1 -0
  130. data/config/locales/sr-CS.yml +73 -0
  131. data/config/locales/sv.yml +188 -88
  132. data/config/locales/ti-ER.yml +1 -0
  133. data/config/locales/tr-TR.yml +30 -0
  134. data/config/locales/uk.yml +11 -0
  135. data/config/locales/vi-VN.yml +1 -0
  136. data/config/locales/vi.yml +1 -0
  137. data/config/locales/zh-CN.yml +471 -0
  138. data/config/locales/zh-TW.yml +1 -0
  139. data/db/migrate/20200108113855_create_decidim_assembly_types.rb +19 -0
  140. data/db/migrate/20200108123050_migrate_decidim_assembly_types.rb +83 -0
  141. data/db/migrate/20200320105906_index_foreign_keys_in_decidim_assemblies.rb +7 -0
  142. data/db/migrate/20200320105907_index_foreign_keys_in_decidim_assembly_user_roles.rb +7 -0
  143. data/db/migrate/20200416132109_remove_legacy_decidim_assembly_type.rb +8 -0
  144. data/db/migrate/20200430202456_create_decidim_assemblies_settings.rb +10 -0
  145. data/db/seeds/city.jpeg +0 -0
  146. data/db/seeds/city2.jpeg +0 -0
  147. data/lib/decidim/assemblies/admin_engine.rb +10 -0
  148. data/lib/decidim/assemblies/engine.rb +8 -1
  149. data/lib/decidim/assemblies/participatory_space.rb +29 -15
  150. data/lib/decidim/assemblies/query_extensions.rb +40 -0
  151. data/lib/decidim/assemblies/test/factories.rb +32 -5
  152. data/lib/decidim/assemblies/version.rb +1 -1
  153. metadata +90 -12
  154. data/app/views/decidim/assemblies/assembly_widgets/show.html.erb +0 -11
@@ -0,0 +1,43 @@
1
+ <div class="card" id="assembly-types">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= t "decidim.admin.titles.assemblies_types" %>
5
+ <%= link_to t("actions.new_assembly_type", scope: "decidim.admin"),
6
+ ["new", "assemblies_type"],
7
+ class: "button tiny button--title" if allowed_to? :create, :assembly_type %>
8
+ </h2>
9
+ </div>
10
+ <div class="card-section">
11
+ <div class="table-scroll">
12
+ <table class="table-list">
13
+ <thead>
14
+ <tr>
15
+ <th><%= t("models.assemblies_types.fields.title", scope: "decidim.admin") %></th>
16
+ <th><%= t("models.assemblies_types.fields.created_at", scope: "decidim.admin") %></th>
17
+ <th></th>
18
+ </tr>
19
+ </thead>
20
+ <tbody>
21
+ <% available_assemblies_types.each do |assembly_type| %>
22
+ <tr>
23
+ <td>
24
+ <% if allowed_to? :update, :assembly_type, assembly_type: assembly_type %>
25
+ <%= link_to translated_attribute(assembly_type.title), edit_assemblies_type_path(assembly_type) %>
26
+ <% else %>
27
+ <%= translated_attribute assembly_type.title %></td>
28
+ <% end %>
29
+ <td><%= l assembly_type.created_at, format: :short %></td>
30
+ <td class="table-list__actions">
31
+ <% if allowed_to? :update, :assembly_type, assembly_type: assembly_type %>
32
+ <%= icon_link_to "pencil", edit_assemblies_type_path(assembly_type), t("actions.edit", scope: "decidim.admin"), class: "action-icon--new" %>
33
+ <% end %>
34
+ <% if allowed_to? :destroy, :assembly_type, assembly_type: assembly_type %>
35
+ <%= icon_link_to "circle-x", assemblies_type_path(assembly_type), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
36
+ <% end %>
37
+ </td>
38
+ <% end %>
39
+ </tbody>
40
+ </table>
41
+ </div>
42
+ </div>
43
+ </div>
@@ -0,0 +1,7 @@
1
+ <%= decidim_form_for(@form, html: { class: "form new_assembly_type" }) do |f| %>
2
+ <%= render partial: "form", object: f, locals: { title: t("assemblies_types.new.title", scope: "decidim.admin") } %>
3
+
4
+ <div class="button--double form-general-submit">
5
+ <%= f.submit t("assemblies_types.new.create", scope: "decidim.admin") %>
6
+ </div>
7
+ <% end %>
@@ -0,0 +1,46 @@
1
+ <%= javascript_include_tag "decidim/slug_form" %>
2
+
3
+ <div class="card" id="assemblies">
4
+ <div class="card-divider">
5
+ <h2 class="card-title"><%= title %></h2>
6
+ </div>
7
+ <div class="card-section">
8
+ <div class="row column">
9
+ <div class="row">
10
+ <div class="column xlarge-8">
11
+ <%= form.translated :text_field, :title, autofocus: true %>
12
+ </div>
13
+ <div class="column xlarge-4 slug">
14
+ <%= form.text_field :slug %>
15
+ <p class="help-text"><%== t(".slug_help", url: decidim_form_slug_url(:assemblies, form.object.slug)) %></p>
16
+ </div>
17
+ <div class="column xlarge-8">
18
+ <fieldset>
19
+ <legend><%= t(".document_legend") %> </legend>
20
+ <div class="row column">
21
+ <%= form.upload :document, optional: false %>
22
+ </div>
23
+ </fieldset>
24
+ </div>
25
+ </div>
26
+ <div class="card">
27
+ <div class="card-divider">
28
+ <legend><%= select %></legend>
29
+ </div>
30
+ <div class="card-section">
31
+ <div class="row">
32
+ <div class="columns xlarge-3">
33
+ <%= form.check_box :import_categories %>
34
+ </div>
35
+ <div class="columns xlarge-3">
36
+ <%= form.check_box :import_attachments %>
37
+ </div>
38
+ <div class="columns xlarge-6">
39
+ <%= form.check_box :import_components %>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
@@ -0,0 +1,7 @@
1
+ <%= decidim_form_for(@form, url: imports_path, method: :post, html: { class: "form import_assembly" }) do |f| %>
2
+ <%= render partial: "form", object: f, locals: { title: t("assembly_imports.new.title", scope: "decidim.admin"), select: t("assembly_imports.new.select", scope: "decidim.admin") } %>
3
+
4
+ <div class="button--double form-general-submit">
5
+ <%= f.submit t("assembly_imports.new.import", scope: "decidim.admin") %>
6
+ </div>
7
+ <% end %>
@@ -1,7 +1,16 @@
1
- <div class="filters row">
2
- <div class="column medium-3">
3
- <span class="dropdown-menu-inverted_label"><%= t(".filter_by") %> :</span>
4
- <ul class="dropdown menu dropdown-inverted" data-dropdown-menu data-close-on-click-inside="false">
1
+ <div class='card' id="assembly_members">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= t("assembly_members.index.assembly_members_title", scope: "decidim.admin") %>
5
+ <% if allowed_to? :create, :assembly_member %>
6
+ <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.assembly_member.name", scope: "decidim.admin")), new_assembly_member_path(current_assembly), class: "button tiny button--title new" %>
7
+ <% end %>
8
+ </h2>
9
+ </div>
10
+ <div class="filters__section">
11
+ <div class="fcell filter">
12
+ <span class="dropdown-menu-inverted_label"><%= t(".filter_by") %> :</span>
13
+ <ul class="dropdown menu dropdown-inverted" data-dropdown-menu data-close-on-click-inside="false">
5
14
  <li class="is-dropdown-submenu-parent">
6
15
  <a href="#">
7
16
  <% if @status.present? %>
@@ -16,35 +25,26 @@
16
25
  <li><%= link_to t(".filter.all"), url_for(q: @query) %></li>
17
26
  </ul>
18
27
  </li>
19
- </ul>
20
- </div>
21
- <div class="column medium-4">
22
- <%= form_tag "", method: :get do %>
23
- <div class="filters__search">
24
- <div class="input-group">
25
- <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
26
- <%= hidden_field_tag :status, @status %>
27
- <div class="input-group-button">
28
- <button type="submit" class="button button--muted">
29
- <%= icon "magnifying-glass", aria_label: t(".search") %>
30
- </button>
28
+ </ul>
29
+ </div>
30
+ <div class="fcell search">
31
+ <div class="column medium-4">
32
+ <%= form_tag "", method: :get do %>
33
+ <div class="filters__search">
34
+ <div class="input-group">
35
+ <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
36
+ <%= hidden_field_tag :status, @status %>
37
+ <div class="input-group-button">
38
+ <button type="submit" class="button">
39
+ <%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
40
+ </button>
41
+ </div>
42
+ </div>
31
43
  </div>
32
- </div>
44
+ <% end %>
33
45
  </div>
34
- <% end %>
35
- </div>
36
- </div>
37
-
38
- <div class='card' id="assembly_members">
39
- <div class="card-divider">
40
- <h2 class="card-title">
41
- <%= t("assembly_members.index.assembly_members_title", scope: "decidim.admin") %>
42
- <% if allowed_to? :create, :assembly_member %>
43
- <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.assembly_member.name", scope: "decidim.admin")), new_assembly_member_path(current_assembly), class: "button tiny button--title new" %>
44
- <% end %>
45
- </h2>
46
+ </div>
46
47
  </div>
47
-
48
48
  <div class="card-section">
49
49
  <div class="table-scroll">
50
50
  <table class="stack">
@@ -1,9 +1,9 @@
1
1
  <section id="parent-assemblies" class="section row collapse">
2
2
  <div class="row column">
3
3
  <div class="flex--sbe">
4
- <h2 id="assemblies-count" class="section-heading collapse">
4
+ <h3 id="assemblies-count" class="section-heading collapse">
5
5
  <%= render partial: "count" %>
6
- </h2>
6
+ </h3>
7
7
  <%= render partial: "decidim/assemblies/filter_by_type" %>
8
8
  </div>
9
9
  <hr class="reset mt-s mb-s">
@@ -1,4 +1,4 @@
1
- <article class="card card--full card--process">
1
+ <div class="card card--full card--process">
2
2
  <div class="row collapse card--process__row">
3
3
  <div class="columns mediumlarge-8 large-6 card--process__column">
4
4
  <div class="card__content">
@@ -6,7 +6,7 @@
6
6
  <h2 class="card__title"><%= translated_attribute promoted_assembly.title %></h2>
7
7
  <% end %>
8
8
  <%= decidim_sanitize html_truncate(translated_attribute(promoted_assembly.short_description), length: 630, separator: "...") %>
9
- <%= link_to assembly_path(promoted_assembly), class: "button secondary small hollow card__button" do %>
9
+ <%= link_to assembly_path(promoted_assembly), class: "button small hollow card__button" do %>
10
10
  <%= t("assemblies.promoted_assembly.more_info", scope: "layouts.decidim") %>
11
11
  <% end %>
12
12
  </div>
@@ -24,4 +24,4 @@
24
24
  </div>
25
25
  </div>
26
26
  </div>
27
- </article>
27
+ </div>
@@ -18,13 +18,16 @@ edit_link(
18
18
 
19
19
  <%= render partial: "parent_assemblies" %>
20
20
 
21
- <section id="assemblies-chart" class="row column section">
22
- <div class="row column">
23
- <h2 class="section-heading"><%= t("assemblies.index.organizational_chart", scope: "layouts.decidim") %></h2>
24
- <article id="orgchart-<%= SecureRandom.hex(5) %>" class="card orgchart js-orgchart absolutes" data-url="<%= decidim_assemblies.assemblies_path(format: :json) %>">
25
- <button class="medium-1 m-s top left button small hollow invisible js-reset-orgchart"><%= t("assemblies.index.reset_chart", scope: "layouts.decidim") %></button>
26
- </article>
27
- </div>
28
- </section>
21
+ <% if current_assemblies_settings.enable_organization_chart %>
22
+ <section id="assemblies-chart" class="row column section">
23
+ <div class="row column">
24
+ <h3 class="section-heading"><%= t("assemblies.index.organizational_chart", scope: "layouts.decidim") %></h3>
25
+ <div id="orgchart-<%= SecureRandom.hex(5) %>" class="card orgchart js-orgchart absolutes" data-url="<%= decidim_assemblies.assemblies_path(format: :json) %>">
26
+ <button class="medium-1 m-s top left button small hollow invisible js-reset-orgchart"><%= t("assemblies.index.reset_chart", scope: "layouts.decidim") %></button>
27
+ </div>
28
+ </div>
29
+ </section>
30
+ <% end %>
29
31
  <% end %>
30
32
  <%= javascript_include_tag "decidim/filters" %>
33
+ <%= javascript_include_tag "decidim/assemblies/orgchart" %>
@@ -47,44 +47,45 @@ edit_link(
47
47
  translated_attribute(current_participatory_space.internal_organisation).present? ||
48
48
  translated_attribute(current_participatory_space.composition).present? %>
49
49
  <div class="show-more">
50
- <button class="button button--muted small"><%= t("read_more", scope: "decidim.assemblies.show") %></button>
50
+ <button class="button hollow small"><%= t("read_more", scope: "decidim.assemblies.show") %></button>
51
51
  </div>
52
52
 
53
53
  <div class="hide show-more-panel">
54
54
  <% if translated_attribute(current_participatory_space.purpose_of_action).present? %>
55
55
  <div class="section">
56
- <h4 class="section-heading"><%= t("purpose_of_action", scope: "decidim.assemblies.show") %></h4>
56
+ <h3 class="section-heading"><%= t("purpose_of_action", scope: "decidim.assemblies.show") %></h3>
57
57
  <%= decidim_sanitize translated_attribute(current_participatory_space.purpose_of_action) %>
58
58
  </div>
59
59
  <% end %>
60
60
 
61
61
  <% if translated_attribute(current_participatory_space.internal_organisation).present? %>
62
62
  <div class="section">
63
- <h4 class="section-heading"><%= t("internal_organisation", scope: "decidim.assemblies.show") %></h4>
63
+ <h3 class="section-heading"><%= t("internal_organisation", scope: "decidim.assemblies.show") %></h3>
64
64
  <%= decidim_sanitize translated_attribute(current_participatory_space.internal_organisation) %>
65
65
  </div>
66
66
  <% end %>
67
67
 
68
68
  <% if translated_attribute(current_participatory_space.composition).present? %>
69
69
  <div class="section">
70
- <h4 class="section-heading"><%= t("composition", scope: "decidim.assemblies.show") %></h4>
70
+ <h3 class="section-heading"><%= t("composition", scope: "decidim.assemblies.show") %></h3>
71
71
  <%= decidim_sanitize translated_attribute(current_participatory_space.composition) %>
72
72
  </div>
73
73
  <% end %>
74
74
  <div class="section text-center">
75
75
  <div class="hide-more">
76
- <button class="button button--muted small"><%= t("read_less", scope: "decidim.assemblies.show") %></button>
76
+ <button class="button hollow small"><%= t("read_less", scope: "decidim.assemblies.show") %></button>
77
77
  </div>
78
78
  </div>
79
79
  </div>
80
80
  <% end %>
81
81
 
82
- <%= render_hook(:current_participatory_space_meetings) %>
83
-
84
82
  <%= attachments_for current_participatory_space %>
83
+
84
+ <%= render_hook(:participatory_space_highlighted_elements) %>
85
+
85
86
  <% if current_participatory_space.children.visible_for(current_user).count.positive? %>
86
87
  <section id="assemblies-grid" class="section row collapse">
87
- <h4 class="section-heading"><%= t("children", scope: "decidim.assemblies.show") %></h4>
88
+ <h3 class="section-heading"><%= t("children", scope: "decidim.assemblies.show") %></h3>
88
89
  <div class="row small-up-1 medium-up-2 large-up-2 card-grid">
89
90
  <%= render partial: "decidim/assemblies/assembly", collection: current_participatory_space.children.visible_for(current_user).published %>
90
91
  </div>
@@ -157,11 +158,7 @@ edit_link(
157
158
  <% if current_participatory_space.assembly_type.present? %>
158
159
  <div class="definition-data__item assembly_type">
159
160
  <span class="definition-data__title"><%= t("assembly_type", scope: "decidim.assemblies.show") %></span>
160
- <% if current_participatory_space.assembly_type == "others" %>
161
- <%= translated_attribute(current_participatory_space.assembly_type_other) %>
162
- <% else %>
163
- <%= t("assembly_types.#{current_participatory_space.assembly_type }", scope: "decidim.assemblies") %>
164
- <% end %>
161
+ <%= translated_attribute(current_participatory_space.assembly_type.title) %>
165
162
  </div>
166
163
  <% end %>
167
164
 
@@ -212,7 +209,7 @@ edit_link(
212
209
  </div>
213
210
  <%= resource_reference(current_participatory_space) %>
214
211
  <%= render partial: "decidim/shared/share_modal" %>
215
- <%= embed_modal_for assembly_assembly_widget_url(current_participatory_space, format: :js) %>
212
+ <%= embed_modal_for assembly_widget_url(current_participatory_space, format: :js) %>
216
213
  </div>
217
214
  </div>
218
215
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div class="section row column">
4
4
  <div class="flex--sbe">
5
- <h2 class="section-heading"><%= t(".members") %> <span class="text-muted">(<%= collection.size %>)</span></h2>
5
+ <h3 class="section-heading"><%= t(".members") %> <span class="text-muted">(<%= collection.size %>)</span></h3>
6
6
  </div>
7
7
  <div id="assembly_members-grid" class="row small-up-1 medium-up-2 large-up-3 card-grid">
8
8
  <%= render(collection) %>
@@ -1,3 +1,25 @@
1
+ <% content_for :secondary_nav do %>
2
+ <div class="secondary-nav secondary-nav--subnav">
3
+ <ul>
4
+ <% if allowed_to?(:read, :assembly_list) %>
5
+ <li <% if is_active_link?(decidim_admin_assemblies.assemblies_path) %> class="is-active" <% end %>>
6
+ <%= aria_selected_link_to I18n.t("menu.assemblies", scope: "decidim.admin"), decidim_admin_assemblies.assemblies_path %>
7
+ </li>
8
+ <% end %>
9
+ <% if allowed_to?(:manage, :assemblies_type) %>
10
+ <li <% if is_active_link?(decidim_admin_assemblies.assemblies_types_path) %> class="is-active" <% end %>>
11
+ <%= aria_selected_link_to I18n.t("menu.assemblies_types", scope: "decidim.admin"), decidim_admin_assemblies.assemblies_types_path %>
12
+ </li>
13
+ <% end %>
14
+ <% if allowed_to?(:read, :assemblies_setting) %>
15
+ <li <% if is_active_link?(decidim_admin_assemblies.edit_assemblies_settings_path) %> class="is-active" <% end %>>
16
+ <%= aria_selected_link_to I18n.t("menu.assemblies_settings", scope: "decidim.admin"), decidim_admin_assemblies.edit_assemblies_settings_path %>
17
+ </li>
18
+ <% end %>
19
+ </ul>
20
+ </div>
21
+ <% end %>
22
+
1
23
  <%= render "layouts/decidim/admin/application" do %>
2
24
  <div class="process-title">
3
25
  <div class="process-title-content">
@@ -10,9 +10,9 @@
10
10
  <% if allowed_to? :read, :component, assembly: current_participatory_space %>
11
11
  <li <% if is_active_link?(decidim_admin_assemblies.components_path(current_participatory_space)) %> class="is-active" <% end %>>
12
12
  <%= aria_selected_link_to t("components", scope: "decidim.admin.menu.assemblies_submenu"), decidim_admin_assemblies.components_path(current_participatory_space) %>
13
- <ul>
13
+ <ul id="components-list">
14
14
  <% current_participatory_space.components.each do |component| %>
15
- <% if component.manifest.admin_engine %>
15
+ <% if component.manifest.admin_engine && user_role_config.component_is_accessible?(component.manifest_name) %>
16
16
  <li <% if is_active_link?(manage_component_path(component)) || is_active_link?(decidim_admin_assemblies.edit_component_path(current_participatory_space, component)) || is_active_link?(decidim_admin_assemblies.edit_component_permissions_path(current_participatory_space, component)) %> class="is-active" <% end %>>
17
17
  <%= link_to manage_component_path(component) do %>
18
18
  <%= translated_attribute component.name %>
@@ -7,6 +7,7 @@
7
7
 
8
8
  <%= render "layouts/decidim/application" do %>
9
9
  <%= render partial: "layouts/decidim/assembly_header" %>
10
+ <%= cell "decidim/translation_bar", current_organization %>
10
11
  <div class="wrapper">
11
12
  <%= yield %>
12
13
  </div>
@@ -0,0 +1 @@
1
+ am:
@@ -16,6 +16,7 @@ ar:
16
16
  created_by_other: التي أنشأتها الآخرون
17
17
  creation_date: تاريخ الإنشاء
18
18
  decidim_area_id: المنطقة
19
+ decidim_assemblies_type_id: نوع التجمع
19
20
  decidim_scope_id: النطاق
20
21
  description: الوصف
21
22
  developer_group: مجموعة المروجين
@@ -90,6 +91,7 @@ ar:
90
91
  admin:
91
92
  actions:
92
93
  new_assembly: جمعية جديدة
94
+ new_assembly_type: نوع جديد للجمعية
93
95
  assemblies:
94
96
  create:
95
97
  error: حدثت مشكلة أثناء إنشاء جمعية جديدة.
@@ -111,6 +113,17 @@ ar:
111
113
  create:
112
114
  error: حدثت مشكلة في تكرار هذا التجميع.
113
115
  success: الجمعية مكررة بنجاح.
116
+ assemblies_types:
117
+ create:
118
+ success: تم إنشاء نوع الجمعية بنجاح.
119
+ destroy:
120
+ success: تم حذف نوع الجمعية بنجاح.
121
+ new:
122
+ create: إنشاء
123
+ title: نوع جديد للجمعية
124
+ update:
125
+ error: حدثت مشكلة أثناء تحديث نوع هذه الجمعية.
126
+ success: تم تحديث نوع الجمعية بنجاح.
114
127
  assembly_copies:
115
128
  new:
116
129
  copy: نسخ
@@ -170,7 +183,12 @@ ar:
170
183
  info: معلومات
171
184
  moderations: الإعتدال
172
185
  private_users: المستخدمون الخاصون
186
+ assemblies_types: نوع التجمّعات
173
187
  models:
188
+ assemblies_types:
189
+ fields:
190
+ created_at: تاريخ الإنشاء
191
+ title: العنوان
174
192
  assembly:
175
193
  fields:
176
194
  created_at: تاريخ الإنشاء
@@ -203,6 +221,7 @@ ar:
203
221
  moderator: مُشرف
204
222
  titles:
205
223
  assemblies: الجمعيات
224
+ assemblies_types: أنواع التجمّعات
206
225
  admin_log:
207
226
  assembly:
208
227
  create: "%{user_name} أنشأ الجمعية %{resource_name}"
@@ -213,6 +232,8 @@ ar:
213
232
  create: "%{user_name} أنشأ العضو %{resource_name} في الجمعية %{space_name}"
214
233
  delete: "%{user_name} إزالة العضو %{resource_name} من الجمعية %{space_name}"
215
234
  update: "%{user_name} بتحديث العضو %{resource_name} في الجمعية %{space_name}"
235
+ assembly_type:
236
+ create: "قام %{user_name} بإنشاء نوع الجمعية %{resource_name}"
216
237
  assembly_user_role:
217
238
  create: "%{user_name} دعا %{resource_name} إلى %{space_name} الجمعية"
218
239
  delete: "%{user_name} أزال المشارك %{resource_name} من الجمعية %{space_name}"
@@ -236,6 +257,9 @@ ar:
236
257
  social_handlers: التواصل الاجتماعي
237
258
  title: معلومات عامة
238
259
  visbility: الرؤية
260
+ assemblies_types:
261
+ form:
262
+ title: العنوان
239
263
  assembly_copies:
240
264
  form:
241
265
  slug_help: 'يتم استخدام slugs URL لإنشاء عناوين URL التي تشير إلى هذا التجميع. يقبل الحروف والأرقام والشرطات فقط ، ويجب أن يبدأ بحرف. مثال: %{url}'