decidim-assemblies 0.27.9 → 0.28.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/assemblies/assemblies/show.erb +16 -0
  3. data/app/cells/decidim/assemblies/assemblies_cell.rb +24 -0
  4. data/app/cells/decidim/assemblies/assembly_cell.rb +7 -2
  5. data/app/cells/decidim/assemblies/assembly_dropdown_metadata_cell.rb +19 -0
  6. data/app/cells/decidim/assemblies/assembly_g_cell.rb +23 -0
  7. data/app/cells/decidim/assemblies/assembly_member/data.erb +19 -0
  8. data/app/cells/decidim/assemblies/assembly_member/name_and_position.erb +11 -0
  9. data/app/cells/decidim/assemblies/assembly_member/show.erb +8 -52
  10. data/app/cells/decidim/assemblies/assembly_metadata_g_cell.rb +46 -0
  11. data/app/cells/decidim/assemblies/assembly_s_cell.rb +15 -0
  12. data/app/cells/decidim/assemblies/content_block_cell.rb +21 -0
  13. data/app/cells/decidim/assemblies/content_blocks/children_assemblies_cell.rb +27 -0
  14. data/app/cells/decidim/assemblies/content_blocks/dates_metadata_cell.rb +23 -0
  15. data/app/cells/decidim/assemblies/content_blocks/extra_data_cell.rb +39 -0
  16. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_cell.rb +15 -23
  17. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_settings_form/show.erb +1 -1
  18. data/app/cells/decidim/assemblies/content_blocks/main_data_cell.rb +52 -0
  19. data/app/cells/decidim/assemblies/content_blocks/metadata_cell.rb +23 -0
  20. data/app/cells/decidim/assemblies/content_blocks/related_assemblies/content.erb +1 -0
  21. data/app/cells/decidim/assemblies/content_blocks/related_assemblies_cell.rb +34 -0
  22. data/app/cells/decidim/assemblies/content_blocks/stats_cell.rb +15 -0
  23. data/app/commands/decidim/assemblies/admin/copy_assembly.rb +2 -2
  24. data/app/commands/decidim/assemblies/admin/create_assemblies_type.rb +1 -1
  25. data/app/commands/decidim/assemblies/admin/create_assembly.rb +2 -1
  26. data/app/commands/decidim/assemblies/admin/create_assembly_member.rb +3 -3
  27. data/app/commands/decidim/assemblies/admin/destroy_assemblies_type.rb +1 -1
  28. data/app/commands/decidim/assemblies/admin/destroy_assembly_member.rb +1 -1
  29. data/app/commands/decidim/assemblies/admin/import_assembly.rb +1 -1
  30. data/app/commands/decidim/assemblies/admin/update_assemblies_type.rb +1 -1
  31. data/app/commands/decidim/assemblies/admin/update_assembly.rb +1 -1
  32. data/app/commands/decidim/assemblies/admin/update_assembly_member.rb +1 -1
  33. data/app/constraints/decidim/assemblies/current_assembly.rb +1 -1
  34. data/app/controllers/concerns/decidim/assemblies/admin/assembly_context.rb +1 -1
  35. data/app/controllers/concerns/decidim/assemblies/admin/assembly_members/filterable.rb +39 -0
  36. data/app/controllers/concerns/decidim/assemblies/assembly_breadcrumb.rb +36 -0
  37. data/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +1 -0
  38. data/app/controllers/decidim/assemblies/admin/assemblies_types_controller.rb +1 -1
  39. data/app/controllers/decidim/assemblies/admin/assembly_attachment_collections_controller.rb +5 -0
  40. data/app/controllers/decidim/assemblies/admin/assembly_attachments_controller.rb +5 -0
  41. data/app/controllers/decidim/assemblies/admin/assembly_imports_controller.rb +2 -0
  42. data/app/controllers/decidim/assemblies/admin/assembly_landing_page_content_blocks_controller.rb +35 -0
  43. data/app/controllers/decidim/assemblies/admin/assembly_landing_page_controller.rb +37 -0
  44. data/app/controllers/decidim/assemblies/admin/assembly_members_controller.rb +2 -6
  45. data/app/controllers/decidim/assemblies/admin/assembly_publications_controller.rb +9 -29
  46. data/app/controllers/decidim/assemblies/admin/assembly_user_roles_controller.rb +8 -91
  47. data/app/controllers/decidim/assemblies/admin/concerns/assembly_admin.rb +1 -1
  48. data/app/controllers/decidim/assemblies/assemblies_controller.rb +12 -7
  49. data/app/controllers/decidim/assemblies/assembly_members_controller.rb +2 -0
  50. data/app/events/decidim/assemblies/create_assembly_member_event.rb +1 -1
  51. data/app/events/decidim/role_assigned_to_assembly_event.rb +11 -6
  52. data/app/forms/decidim/assemblies/admin/assembly_copy_form.rb +1 -1
  53. data/app/forms/decidim/assemblies/admin/assembly_form.rb +1 -1
  54. data/app/forms/decidim/assemblies/admin/assembly_import_form.rb +1 -1
  55. data/app/forms/decidim/assemblies/admin/assembly_user_role_form.rb +2 -18
  56. data/app/helpers/decidim/assemblies/admin/assembly_members_helper.rb +11 -0
  57. data/app/helpers/decidim/assemblies/application_helper.rb +12 -0
  58. data/app/helpers/decidim/assemblies/assemblies_helper.rb +21 -19
  59. data/app/helpers/decidim/assemblies/filter_assemblies_helper.rb +15 -30
  60. data/app/models/decidim/assembly.rb +6 -5
  61. data/app/models/decidim/assembly_user_role.rb +5 -33
  62. data/app/packs/entrypoints/decidim_assemblies.js +0 -1
  63. data/app/packs/src/decidim/assemblies/admin/assemblies.js +2 -2
  64. data/app/packs/src/decidim/assemblies/orgchart.js +0 -701
  65. data/app/permissions/decidim/assemblies/permissions.rb +14 -27
  66. data/app/presenters/decidim/assemblies/admin_log/assemblies_setting_presenter.rb +2 -2
  67. data/app/presenters/decidim/assemblies/admin_log/assemblies_type_presenter.rb +2 -2
  68. data/app/presenters/decidim/assemblies/admin_log/assembly_member_presenter.rb +2 -2
  69. data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +2 -2
  70. data/app/presenters/decidim/assemblies/admin_log/assembly_user_role_presenter.rb +2 -2
  71. data/app/presenters/decidim/assemblies/assembly_presenter.rb +38 -0
  72. data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +2 -41
  73. data/app/presenters/decidim/assembly_member_presenter.rb +18 -4
  74. data/app/queries/decidim/assemblies/admin/admin_users.rb +1 -1
  75. data/app/queries/decidim/assemblies/assemblies_with_user_role.rb +2 -2
  76. data/app/serializers/decidim/assemblies/assembly_importer.rb +3 -3
  77. data/app/serializers/decidim/assemblies/assembly_serializer.rb +1 -1
  78. data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +218 -176
  79. data/app/views/decidim/assemblies/admin/assemblies/edit.html.erb +25 -11
  80. data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +105 -115
  81. data/app/views/decidim/assemblies/admin/assemblies/new.html.erb +16 -9
  82. data/app/views/decidim/assemblies/admin/assemblies_types/_form.html.erb +6 -8
  83. data/app/views/decidim/assemblies/admin/assemblies_types/edit.html.erb +11 -5
  84. data/app/views/decidim/assemblies/admin/assemblies_types/index.html.erb +34 -35
  85. data/app/views/decidim/assemblies/admin/assemblies_types/new.html.erb +16 -6
  86. data/app/views/decidim/assemblies/admin/assembly_copies/_form.html.erb +12 -20
  87. data/app/views/decidim/assemblies/admin/assembly_copies/new.html.erb +17 -5
  88. data/app/views/decidim/assemblies/admin/assembly_imports/_form.html.erb +28 -37
  89. data/app/views/decidim/assemblies/admin/assembly_imports/new.html.erb +17 -5
  90. data/app/views/decidim/assemblies/admin/assembly_members/_form.html.erb +45 -49
  91. data/app/views/decidim/assemblies/admin/assembly_members/edit.html.erb +17 -6
  92. data/app/views/decidim/assemblies/admin/assembly_members/index.html.erb +51 -88
  93. data/app/views/decidim/assemblies/admin/assembly_members/new.html.erb +17 -6
  94. data/app/views/decidim/assemblies/admin/assembly_user_roles/_form.html.erb +14 -18
  95. data/app/views/decidim/assemblies/admin/assembly_user_roles/edit.html.erb +17 -6
  96. data/app/views/decidim/assemblies/admin/assembly_user_roles/index.html.erb +54 -55
  97. data/app/views/decidim/assemblies/admin/assembly_user_roles/new.html.erb +17 -6
  98. data/app/views/decidim/assemblies/assemblies/_collection.html.erb +7 -0
  99. data/app/views/decidim/assemblies/assemblies/index.html.erb +20 -19
  100. data/app/views/decidim/assemblies/assemblies/index.js.erb +1 -8
  101. data/app/views/decidim/assemblies/assemblies/show.html.erb +17 -207
  102. data/app/views/decidim/assemblies/assembly_members/index.html.erb +7 -5
  103. data/app/views/decidim/assemblies/pages/user_profile/_member_of.html.erb +6 -9
  104. data/app/views/layouts/decidim/admin/_manage_assemblies.html.erb +36 -0
  105. data/app/views/layouts/decidim/admin/assemblies.html.erb +13 -11
  106. data/app/views/layouts/decidim/admin/assemblies_imports.html.erb +9 -0
  107. data/app/views/layouts/decidim/admin/assemblies_types.html.erb +17 -0
  108. data/app/views/layouts/decidim/admin/assembly.html.erb +12 -13
  109. data/app/views/layouts/decidim/assembly.html.erb +7 -14
  110. data/config/locales/ar.yml +7 -68
  111. data/config/locales/bg.yml +0 -466
  112. data/config/locales/ca.yml +62 -71
  113. data/config/locales/cs.yml +59 -66
  114. data/config/locales/de.yml +60 -69
  115. data/config/locales/el.yml +11 -61
  116. data/config/locales/en.yml +57 -66
  117. data/config/locales/es-MX.yml +57 -66
  118. data/config/locales/es-PY.yml +57 -66
  119. data/config/locales/es.yml +63 -72
  120. data/config/locales/eu.yml +57 -70
  121. data/config/locales/fi-plain.yml +58 -67
  122. data/config/locales/fi.yml +57 -66
  123. data/config/locales/fr-CA.yml +57 -66
  124. data/config/locales/fr.yml +57 -66
  125. data/config/locales/ga-IE.yml +4 -15
  126. data/config/locales/gl.yml +4 -62
  127. data/config/locales/hu.yml +33 -65
  128. data/config/locales/id-ID.yml +6 -47
  129. data/config/locales/is-IS.yml +5 -40
  130. data/config/locales/it.yml +5 -62
  131. data/config/locales/ja.yml +51 -66
  132. data/config/locales/kaa.yml +0 -8
  133. data/config/locales/ko.yml +0 -92
  134. data/config/locales/lb.yml +5 -61
  135. data/config/locales/lt.yml +40 -63
  136. data/config/locales/lv.yml +5 -57
  137. data/config/locales/nl.yml +4 -62
  138. data/config/locales/no.yml +5 -62
  139. data/config/locales/pl.yml +3 -93
  140. data/config/locales/pt-BR.yml +77 -132
  141. data/config/locales/pt.yml +5 -62
  142. data/config/locales/ro-RO.yml +20 -63
  143. data/config/locales/ru.yml +4 -44
  144. data/config/locales/sk.yml +0 -26
  145. data/config/locales/sl.yml +5 -48
  146. data/config/locales/sq-AL.yml +0 -364
  147. data/config/locales/sr-CS.yml +0 -5
  148. data/config/locales/sv.yml +132 -193
  149. data/config/locales/tr-TR.yml +8 -69
  150. data/config/locales/uk.yml +4 -44
  151. data/config/locales/zh-CN.yml +5 -60
  152. data/config/locales/zh-TW.yml +7 -63
  153. data/db/migrate/20200108123050_migrate_decidim_assembly_types.rb +1 -1
  154. data/lib/decidim/api/assemblies_type_type.rb +1 -1
  155. data/lib/decidim/api/assembly_member_type.rb +1 -1
  156. data/lib/decidim/api/assembly_type.rb +1 -1
  157. data/lib/decidim/assemblies/admin_engine.rb +21 -126
  158. data/lib/decidim/assemblies/content_blocks/registry_manager.rb +184 -0
  159. data/lib/decidim/assemblies/engine.rb +15 -21
  160. data/lib/decidim/assemblies/menu.rb +161 -0
  161. data/lib/decidim/assemblies/participatory_space.rb +7 -229
  162. data/lib/decidim/assemblies/query_extensions.rb +6 -6
  163. data/lib/decidim/assemblies/seeds.rb +161 -0
  164. data/lib/decidim/assemblies/test/factories.rb +47 -55
  165. data/lib/decidim/assemblies/version.rb +1 -1
  166. metadata +54 -51
  167. data/app/cells/decidim/assemblies/assembly_m/footer.erb +0 -15
  168. data/app/cells/decidim/assemblies/assembly_m/tags.erb +0 -1
  169. data/app/cells/decidim/assemblies/assembly_m_cell.rb +0 -77
  170. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb +0 -30
  171. data/app/commands/decidim/assemblies/admin/create_assembly_admin.rb +0 -54
  172. data/app/commands/decidim/assemblies/admin/destroy_assembly_admin.rb +0 -58
  173. data/app/commands/decidim/assemblies/admin/notify_role_assigned_to_assembly.rb +0 -22
  174. data/app/commands/decidim/assemblies/admin/publish_assembly.rb +0 -39
  175. data/app/commands/decidim/assemblies/admin/unpublish_assembly.rb +0 -39
  176. data/app/commands/decidim/assemblies/admin/update_assemblies_setting.rb +0 -46
  177. data/app/commands/decidim/assemblies/admin/update_assembly_admin.rb +0 -53
  178. data/app/controllers/decidim/assemblies/admin/assemblies_settings_controller.rb +0 -49
  179. data/app/controllers/decidim/assemblies/widgets_controller.rb +0 -33
  180. data/app/forms/decidim/assemblies/admin/assemblies_setting_form.rb +0 -14
  181. data/app/models/decidim/assemblies_setting.rb +0 -17
  182. data/app/queries/decidim/assemblies/admin/assembly_members.rb +0 -56
  183. data/app/views/decidim/assemblies/_filter_by_type.html.erb +0 -19
  184. data/app/views/decidim/assemblies/admin/assemblies_settings/_form.html.erb +0 -10
  185. data/app/views/decidim/assemblies/admin/assemblies_settings/edit.html.erb +0 -7
  186. data/app/views/decidim/assemblies/assemblies/_count.html.erb +0 -1
  187. data/app/views/decidim/assemblies/assemblies/_nav_breadcumb.html.erb +0 -11
  188. data/app/views/decidim/assemblies/assemblies/_parent_assemblies.html.erb +0 -15
  189. data/app/views/decidim/assemblies/assemblies/_promoted_assembly.html.erb +0 -27
  190. data/app/views/layouts/decidim/_assembly_header.html.erb +0 -27
  191. data/app/views/layouts/decidim/_assembly_navigation.html.erb +0 -24
  192. data/app/views/layouts/decidim/admin/assembly_members.html.erb +0 -18
  193. data/config/locales/he-IL.yml +0 -110
  194. data/db/seeds/Exampledocument.pdf +0 -0
  195. data/db/seeds/city.jpeg +0 -0
  196. data/db/seeds/city2.jpeg +0 -0
  197. data/db/seeds/homepage_image.jpg +0 -0
  198. data/decidim-assemblies.gemspec +0 -32
@@ -1,242 +1,284 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title"><%= t(".title") %></h2>
4
- </div>
5
-
6
- <div class="card-section">
7
- <div class="row column">
8
- <%= form.translated :text_field, :title, autofocus: true %>
9
- </div>
1
+ <div class="form__wrapper">
2
+ <div class="card" data-component="accordion" id="accordion-title">
3
+ <div class="card-divider">
4
+ <button class="card-divider-button" data-open="true" data-controls="panel-title" type="button">
5
+ <%= icon "arrow-right-s-line" %>
6
+ <h2 class="card-title" id="title">
7
+ <%= t("title", scope: "decidim.assemblies.admin.assemblies.form") %>
8
+ </h2>
9
+ </button>
10
+ </div>
11
+
12
+ <div id="panel-title" class="card-section">
13
+ <div class="row column">
14
+ <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
15
+ </div>
10
16
 
11
- <div class="row column">
12
- <%= form.translated :text_field, :subtitle %>
13
- </div>
17
+ <div class="row column">
18
+ <%= form.translated :text_field, :subtitle, aria: { label: :subtitle } %>
19
+ </div>
14
20
 
15
- <div class="row column">
16
- <%= form.number_field :weight %>
17
- </div>
21
+ <div class="row column">
22
+ <%= form.number_field :weight %>
23
+ </div>
18
24
 
19
25
  <div class="row">
20
- <div class="columns xlarge-6 slug">
21
- <%= form.text_field :slug %>
22
- <p class="help-text">
23
- <%== t(".slug_help", url: decidim_form_slug_url(:assemblies, form.object.slug)) %>
24
- </p>
26
+ <div class="columns slug">
27
+ <%= form.text_field :slug, help_text: t(".slug_help_html", url: decidim_form_slug_url(:assemblies, form.object.slug)) %>
25
28
  </div>
26
29
 
27
- <div class="columns xlarge-6">
28
- <%= form.text_field :hashtag %>
30
+ <div class="columns">
31
+ <%= form.text_field :hashtag %>
32
+ </div>
29
33
  </div>
30
- </div>
31
34
 
32
- <div class="row column">
33
- <%= form.translated :editor, :short_description %>
34
- </div>
35
+ <div class="row column">
36
+ <%= form.translated :editor, :short_description, aria: { label: :short_description } %>
37
+ </div>
35
38
 
36
- <div class="row column">
37
- <%= form.translated :editor, :description %>
38
- </div>
39
+ <div class="row column">
40
+ <%= form.translated :editor, :description, aria: { label: :description } %>
41
+ </div>
39
42
 
40
- <div class="row column">
41
- <%= form.translated :editor, :purpose_of_action %>
42
- </div>
43
+ <div class="row column">
44
+ <%= form.translated :editor, :purpose_of_action, aria: { label: :purpose_of_action } %>
45
+ </div>
43
46
 
44
- <div class="row column">
45
- <%= form.translated :editor, :composition %>
46
- </div>
47
+ <div class="row column">
48
+ <%= form.translated :editor, :composition, aria: { label: :composition } %>
49
+ </div>
47
50
 
48
- <div class="row column">
49
- <%= form.translated :editor, :internal_organisation %>
50
- </div>
51
+ <div class="row column">
52
+ <%= form.translated :editor, :internal_organisation, aria: { label: :internal_organisation } %>
53
+ </div>
51
54
 
52
- <div class="row column">
53
- <%= form.translated :editor, :announcement %>
54
- <p class="help-text"><%== t(".announcement_help") %></p>
55
+ <div class="row column">
56
+ <%= form.translated :editor, :announcement, help_text: t(".announcement_help") %>
57
+ </div>
55
58
  </div>
56
59
  </div>
57
-
58
- <div class="card-divider">
59
- <h2 class="card-title"><%= t(".duration") %></h2>
60
- </div>
61
-
62
- <div class="card-section">
63
- <div class="row column">
64
- <%= form.date_field :creation_date %>
60
+ <div class="card" data-component="accordion" id="accordion-duration">
61
+ <div class="card-divider">
62
+ <button class="card-divider-button" data-open="true" data-controls="panel-duration" type="button">
63
+ <%= icon "arrow-right-s-line" %>
64
+ <h2 class="card-title" id="duration">
65
+ <%= t("duration", scope: "decidim.assemblies.admin.assemblies.form") %>
66
+ </h2>
67
+ </button>
65
68
  </div>
66
69
 
70
+ <div id="panel-duration" class="card-section">
71
+ <div class="row column">
72
+ <%= form.date_field :creation_date %>
73
+ </div>
74
+
67
75
  <div class="row column">
68
- <%= form.date_field :included_at %>
69
- <p class="help-text"><%== t(".included_at_help") %></p>
76
+ <%= form.date_field :included_at, help_text: t(".included_at_help") %>
70
77
  </div>
71
78
 
72
79
  <div class="row column">
73
- <%= form.date_field :duration %>
74
- <p class="help-text"><%== t(".duration_help") %></p>
80
+ <%= form.date_field :duration, help_text: t(".duration_help") %>
75
81
  </div>
76
82
 
77
- <div class="row column" id="closing_date_div">
78
- <%= form.date_field :closing_date %>
79
- </div>
83
+ <div class="row column" id="closing_date_div">
84
+ <%= form.date_field :closing_date %>
85
+ </div>
80
86
 
81
- <div class="row column" id="closing_date_reason_div">
82
- <%= form.translated :editor, :closing_date_reason, toolbar: :content %>
87
+ <div class="row column" id="closing_date_reason_div">
88
+ <%= form.translated :editor, :closing_date_reason, toolbar: :content, aria: { label: :closing_date_reason } %>
89
+ </div>
83
90
  </div>
84
91
  </div>
85
92
 
86
- <div class="card-divider">
87
- <h2 class="card-title"><%= t(".images") %></h2>
88
- </div>
89
-
90
- <div class="card-section">
91
- <div class="row">
92
- <div class="columns xlarge-6">
93
- <%= form.upload :hero_image %>
94
- </div>
95
-
96
- <div class="columns xlarge-6">
97
- <%= form.upload :banner_image %>
93
+ <div class="card" data-component="accordion" id="accordion-images">
94
+ <div class="card-divider">
95
+ <button class="card-divider-button" data-open="true" data-controls="panel-images" type="button">
96
+ <%= icon "arrow-right-s-line" %>
97
+ <h2 class="card-title" id="images">
98
+ <%= t("images", scope: "decidim.assemblies.admin.assemblies.form") %>
99
+ </h2>
100
+ </button>
101
+ </div>
102
+
103
+ <div id="panel-images" class="card-section">
104
+ <div class="row">
105
+ <div class="columns">
106
+ <%= form.upload :hero_image, button_class: "button button__sm button__transparent-secondary" %>
107
+ </div>
108
+
109
+ <div class="columns">
110
+ <%= form.upload :banner_image, button_class: "button button__sm button__transparent-secondary" %>
111
+ </div>
98
112
  </div>
99
113
  </div>
100
- </div>
101
-
102
- <div class="card-divider">
103
- <h2 class="card-title"><%= t(".filters") %></h2>
104
114
  </div>
105
115
 
106
- <div class="card-section">
107
- <div class="row column">
108
- <%= form.check_box :scopes_enabled %>
116
+ <div class="card" data-component="accordion" id="accordion-filters">
117
+ <div class="card-divider">
118
+ <button class="card-divider-button" data-open="true" data-controls="panel-filters" type="button">
119
+ <%= icon "arrow-right-s-line" %>
120
+ <h2 class="card-title" id="filters">
121
+ <%= t("filters", scope: "decidim.assemblies.admin.assemblies.form") %>
122
+ </h2>
123
+ </button>
109
124
  </div>
110
125
 
111
- <div class="row column">
112
- <%= scopes_picker_field form, :scope_id, root: nil %>
113
- </div>
126
+ <div id="panel-filters" class="card-section">
127
+ <div class="row column">
128
+ <%= form.check_box :scopes_enabled %>
129
+ </div>
114
130
 
115
- <div class="row column">
116
- <%= form.areas_select :area_id,
117
- areas_for_select(current_organization),
118
- selected: current_assembly.try(:decidim_area_id),
119
- include_blank: t(".select_an_area") %>
120
- </div>
121
- </div>
131
+ <div class="row column">
132
+ <%= scopes_select_field form, :scope_id, root: nil %>
133
+ </div>
122
134
 
123
- <div class="card-divider">
124
- <h2 class="card-title"><%= t(".metadata") %></h2>
135
+ <div class="row column">
136
+ <%= form.areas_select :area_id,
137
+ areas_for_select(current_organization),
138
+ selected: current_assembly.try(:decidim_area_id),
139
+ include_blank: t(".select_an_area") %>
140
+ </div>
141
+ </div>
125
142
  </div>
126
143
 
127
- <div class="card-section">
128
- <div class="row column">
129
- <%= form.translated :text_field, :participatory_scope %>
144
+ <div class="card" data-component="accordion" id="accordion-metadata">
145
+ <div class="card-divider">
146
+ <button class="card-divider-button" data-open="true" data-controls="panel-metadata" type="button">
147
+ <%= icon "arrow-right-s-line" %>
148
+ <h2 class="card-title" id="metadata">
149
+ <%= t("metadata", scope: "decidim.assemblies.admin.assemblies.form") %>
150
+ </h2>
151
+ </button>
130
152
  </div>
131
153
 
132
- <div class="row column">
133
- <%= form.translated :text_field, :participatory_structure %>
134
- </div>
135
- <div class="row">
136
- <div class="columns xlarge-6">
137
- <%= form.translated :text_field, :meta_scope %>
154
+ <div id="panel-metadata" class="card-section">
155
+ <div class="row column">
156
+ <%= form.translated :text_field, :participatory_scope, aria: { label: :participatory_scope } %>
138
157
  </div>
139
- </div>
140
158
 
141
- <div class="row">
142
- <div class="columns xlarge-6">
143
- <%= form.translated :text_field, :developer_group %>
159
+ <div class="row column">
160
+ <%= form.translated :text_field, :participatory_structure, aria: { label: :participatory_structure } %>
144
161
  </div>
145
-
146
- <div class="columns xlarge-6">
147
- <%= form.translated :text_field, :local_area %>
162
+ <div class="row">
163
+ <div class="columns">
164
+ <%= form.translated :text_field, :meta_scope, aria: { label: :meta_scope } %>
165
+ </div>
148
166
  </div>
149
- </div>
150
167
 
151
- <div class="row column">
152
- <%= form.translated :text_field, :target %>
153
- </div>
168
+ <div class="row">
169
+ <div class="columns">
170
+ <%= form.translated :text_field, :developer_group, aria: { label: :developer_group } %>
171
+ </div>
172
+
173
+ <div class="columns">
174
+ <%= form.translated :text_field, :local_area, aria: { label: :local_area } %>
175
+ </div>
154
176
  </div>
155
177
 
156
- <div class="card-divider">
157
- <h2 class="card-title"><%= t(".visbility") %></h2>
178
+ <div class="row column">
179
+ <%= form.translated :text_field, :target, aria: { label: :target } %>
180
+ </div>
181
+ </div>
158
182
  </div>
159
183
 
160
- <div class="card-section">
161
- <% if params[:parent_id].present? %>
162
- <%= form.hidden_field :parent_id, value: @form.parent_id %>
163
- <% else %>
184
+ <div class="card" data-component="accordion" id="accordion-visbility">
185
+ <div class="card-divider">
186
+ <button class="card-divider-button" data-open="true" data-controls="panel-visbility" type="button">
187
+ <%= icon "arrow-right-s-line" %>
188
+ <h2 class="card-title" id="visbility">
189
+ <%= t("visbility", scope: "decidim.assemblies.admin.assemblies.form") %>
190
+ </h2>
191
+ </button>
192
+ </div>
193
+
194
+ <div id="panel-visbility" class="card-section">
195
+ <% if params[:parent_id].present? %>
196
+ <%= form.hidden_field :parent_id, value: @form.parent_id %>
197
+ <% else %>
198
+ <div class="row column">
199
+ <%= form.select :parent_id,
200
+ options_from_collection_for_select(
201
+ parent_assemblies_for_select,
202
+ :id,
203
+ :translated_title,
204
+ selected: current_assembly.try(:parent_id)
205
+ ),
206
+ include_blank: t(".select_parent_assembly") %>
207
+ </div>
208
+ <% end %>
209
+
164
210
  <div class="row column">
165
- <%= form.select :parent_id,
166
- options_from_collection_for_select(
167
- parent_assemblies_for_select,
168
- :id,
169
- :translated_title,
170
- selected: current_assembly.try(:parent_id)
171
- ),
172
- include_blank: t(".select_parent_assembly") %>
211
+ <%= form.check_box :promoted %>
173
212
  </div>
174
- <% end %>
175
-
176
- <div class="row column">
177
- <%= form.check_box :promoted %>
178
- </div>
179
213
 
180
- <div class="row column" id="private_space">
181
- <%= form.check_box :private_space %>
182
- </div>
214
+ <div class="row column" id="private_space">
215
+ <%= form.check_box :private_space %>
216
+ </div>
183
217
 
184
- <div class="row column" id="is_transparent">
185
- <%= form.check_box :is_transparent %>
218
+ <div class="row column" id="is_transparent">
219
+ <%= form.check_box :is_transparent %>
220
+ </div>
186
221
  </div>
187
222
  </div>
188
223
 
189
- <div class="card-divider">
190
- <h2 class="card-title"><%= t(".other") %></h2>
191
- </div>
192
-
193
- <div class="card-section">
194
- <div class="row column">
195
- <%= form.select :created_by,
196
- @form.created_by_for_select,
197
- { include_blank: t(".select_a_created_by") },
198
- { multiple: false } %>
224
+ <div class="card" data-component="accordion" id="accordion-other">
225
+ <div class="card-divider">
226
+ <button class="card-divider-button" data-open="true" data-controls="panel-other" type="button">
227
+ <%= icon "arrow-right-s-line" %>
228
+ <h2 class="card-title" id="other">
229
+ <%= t("other", scope: "decidim.assemblies.admin.assemblies.form") %>
230
+ </h2>
231
+ </button>
199
232
  </div>
200
233
 
201
- <div class="row column" id="created_by_other">
202
- <%= form.translated :text_field, :created_by_other %>
203
- </div>
234
+ <div id="panel-other" class="card-section">
235
+ <div class="row column">
236
+ <%= form.select :created_by,
237
+ @form.created_by_for_select,
238
+ { include_blank: t(".select_a_created_by") },
239
+ { multiple: false } %>
240
+ </div>
204
241
 
205
- <div class="row column">
206
- <%= form.select :decidim_assemblies_type_id,
207
- @form.assembly_types_for_select,
208
- { include_blank: t(".select_an_assembly_type") },
209
- { multiple: false } %>
210
- </div>
242
+ <div class="row column" id="created_by_other">
243
+ <%= form.translated :text_field, :created_by_other, aria: { label: :created_by_other } %>
244
+ </div>
211
245
 
212
- <div class="row column">
213
- <% if @form.processes_for_select %>
214
- <%= form.select :participatory_processes_ids,
215
- options_for_select(
216
- @form.processes_for_select,
217
- selected: processes_selected
218
- ),
219
- { include_blank: false },
220
- { multiple: true, class: "chosen-select" } %>
221
- <% end %>
222
- </div>
246
+ <div class="row column">
247
+ <%= form.select :decidim_assemblies_type_id,
248
+ @form.assembly_types_for_select,
249
+ { include_blank: t(".select_an_assembly_type") },
250
+ { multiple: false } %>
251
+ </div>
223
252
 
224
- <div class="row column" id="special_features">
225
- <%= form.translated :editor, :special_features %>
226
- </div>
253
+ <div class="row column">
254
+ <% if @form.processes_for_select %>
255
+ <%= form.select :participatory_processes_ids,
256
+ options_for_select(
257
+ @form.processes_for_select,
258
+ selected: processes_selected
259
+ ),
260
+ { include_blank: false },
261
+ { multiple: true, class: "chosen-select" } %>
262
+ <% end %>
263
+ </div>
227
264
 
228
- <div class="columns xlarge-6">
229
- <%= form.social_field :text_field,
230
- :social_handlers,
231
- Decidim::Assembly::SOCIAL_HANDLERS,
232
- label: t("social_handlers",
233
- scope: "decidim.assemblies.admin.assemblies.form") %>
234
- </div>
265
+ <div class="row column" id="special_features">
266
+ <%= form.translated :editor, :special_features, aria: { label: :special_features } %>
267
+ </div>
235
268
 
236
- <div class="row column">
237
- <%= form.check_box :show_statistics %>
269
+ <div class="row column">
270
+ <%= form.social_field :text_field,
271
+ :social_handlers,
272
+ Decidim::Organization::SOCIAL_HANDLERS,
273
+ label: t("social_handlers",
274
+ scope: "decidim.assemblies.admin.assemblies.form") %>
275
+ </div>
276
+
277
+ <div class="row column">
278
+ <%= form.check_box :show_statistics %>
279
+ </div>
238
280
  </div>
239
281
  </div>
240
282
  </div>
241
283
 
242
- <%= javascript_pack_tag "decidim_assemblies_admin" %>
284
+ <%= append_javascript_pack_tag "decidim_assemblies_admin" %>
@@ -1,14 +1,28 @@
1
- <%= decidim_form_for(@form, html: { class: "form edit_assembly assembly_form_admin" }) do |f| %>
2
- <%= render partial: "form", object: f %>
3
- <div class="button--double form-general-submit">
4
- <%= f.submit t("assemblies.edit.update", scope: "decidim.admin"), class: "button" %>
1
+ <% add_decidim_page_title(t("info", scope: "decidim.admin.menu.assemblies_submenu")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("info", scope: "decidim.admin.menu.assemblies_submenu") %>
5
+ </h2>
6
+ </div>
5
7
 
6
- <% if allowed_to? :publish, :assembly, assembly: current_assembly %>
7
- <% if current_assembly.published? %>
8
- <%= link_to t("actions.unpublish", scope: "decidim.admin"), assembly_publish_path(current_assembly), method: :delete, class: "button muted" %>
9
- <% else %>
10
- <%= link_to t("actions.publish", scope: "decidim.admin"), assembly_publish_path(current_assembly), method: :post, class: "button hollow" %>
11
- <% end %>
8
+ <div class="item__edit item__edit-1col">
9
+ <div class="item__edit-form">
10
+ <%= decidim_form_for(@form, html: { class: "form form-defaults edit_assembly assembly_form_admin" }) do |f| %>
11
+ <%= render partial: "form", object: f %>
12
+ <div class="item__edit-sticky">
13
+ <div class="item__edit-sticky-container">
14
+ <%= f.submit t("assemblies.edit.update", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
15
+
16
+ <% if allowed_to? :publish, :assembly, assembly: current_assembly %>
17
+ <% if current_assembly.published? %>
18
+ <%= link_to t("actions.unpublish", scope: "decidim.admin"), assembly_publish_path(current_assembly), method: :delete, class: "button button__sm button__secondary" %>
19
+ <% else %>
20
+ <%= link_to t("actions.publish", scope: "decidim.admin"), assembly_publish_path(current_assembly), method: :post, class: "button button__sm button__secondary" %>
21
+ <% end %>
22
+ <% end %>
23
+ </div>
24
+ </div>
12
25
  <% end %>
26
+
13
27
  </div>
14
- <% end %>
28
+ </div>