decidim-assemblies 0.19.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/decidim/assemblies/assembly.svg +1 -3
- data/app/assets/javascripts/decidim/assemblies/orgchart.js.es6 +698 -0
- data/app/cells/decidim/assemblies/assembly_m/footer.erb +2 -2
- data/app/cells/decidim/assemblies/assembly_m_cell.rb +5 -5
- data/app/cells/decidim/assemblies/assembly_member/show.erb +4 -4
- data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb +10 -11
- data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_cell.rb +1 -0
- data/app/commands/decidim/assemblies/admin/create_assemblies_type.rb +45 -0
- data/app/commands/decidim/assemblies/admin/create_assembly.rb +1 -2
- data/app/commands/decidim/assemblies/admin/create_assembly_admin.rb +2 -1
- data/app/commands/decidim/assemblies/admin/create_assembly_member.rb +12 -3
- data/app/commands/decidim/assemblies/admin/destroy_assemblies_type.rb +45 -0
- data/app/commands/decidim/assemblies/admin/notify_role_assigned_to_assembly.rb +22 -0
- data/app/commands/decidim/assemblies/admin/update_assemblies_setting.rb +46 -0
- data/app/commands/decidim/assemblies/admin/update_assemblies_type.rb +46 -0
- data/app/commands/decidim/assemblies/admin/update_assembly.rb +1 -2
- data/app/commands/decidim/assemblies/admin/update_assembly_admin.rb +2 -1
- data/app/controllers/concerns/decidim/assemblies/admin/filterable.rb +30 -0
- data/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +8 -29
- data/app/controllers/decidim/assemblies/admin/assemblies_settings_controller.rb +49 -0
- data/app/controllers/decidim/assemblies/admin/assemblies_types_controller.rb +107 -0
- data/app/controllers/decidim/assemblies/assemblies_controller.rb +6 -2
- data/app/events/decidim/assemblies/create_assembly_member_event.rb +17 -0
- data/app/events/decidim/role_assigned_to_assembly_event.rb +28 -0
- data/app/forms/decidim/assemblies/admin/assemblies_setting_form.rb +14 -0
- data/app/forms/decidim/assemblies/admin/assemblies_type_form.rb +17 -0
- data/app/forms/decidim/assemblies/admin/assembly_form.rb +32 -13
- data/app/helpers/decidim/assemblies/admin/assemblies_helper.rb +6 -0
- data/app/helpers/decidim/assemblies/assemblies_helper.rb +6 -3
- data/app/helpers/decidim/assemblies/filter_assemblies_helper.rb +10 -7
- data/app/models/decidim/assemblies_setting.rb +17 -0
- data/app/models/decidim/assemblies_type.rb +24 -0
- data/app/models/decidim/assembly.rb +25 -2
- data/app/models/decidim/assembly_user_role.rb +1 -1
- data/app/permissions/decidim/assemblies/permissions.rb +55 -1
- data/app/presenters/decidim/assemblies/admin_log/assemblies_setting_presenter.rb +27 -0
- data/app/presenters/decidim/assemblies/admin_log/assemblies_type_presenter.rb +43 -0
- data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +1 -2
- data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +1 -1
- data/app/presenters/decidim/log/value_types/assembly_type_presenter.rb +29 -0
- data/app/queries/decidim/assemblies/filtered_assemblies.rb +2 -2
- data/app/queries/decidim/assemblies/parent_assemblies_for_select.rb +42 -0
- data/app/services/decidim/assemblies/assembly_search.rb +3 -3
- data/app/types/decidim/assemblies/assemblies_type_type.rb +17 -0
- data/app/types/decidim/assemblies/assembly_member_type.rb +29 -0
- data/app/types/decidim/assemblies/assembly_type.rb +67 -0
- data/app/views/decidim/assemblies/_filter_by_type.html.erb +11 -7
- data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +2 -6
- data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +8 -4
- data/app/views/decidim/assemblies/admin/assemblies_settings/_form.html.erb +10 -0
- data/app/views/decidim/assemblies/admin/assemblies_settings/edit.html.erb +6 -0
- data/app/views/decidim/assemblies/admin/assemblies_types/_form.html.erb +11 -0
- data/app/views/decidim/assemblies/admin/assemblies_types/edit.html.erb +6 -0
- data/app/views/decidim/assemblies/admin/assemblies_types/index.html.erb +43 -0
- data/app/views/decidim/assemblies/admin/assemblies_types/new.html.erb +7 -0
- data/app/views/decidim/assemblies/admin/assembly_members/index.html.erb +30 -30
- data/app/views/decidim/assemblies/assemblies/_parent_assemblies.html.erb +2 -2
- data/app/views/decidim/assemblies/assemblies/_promoted_assembly.html.erb +3 -3
- data/app/views/decidim/assemblies/assemblies/index.html.erb +11 -8
- data/app/views/decidim/assemblies/assemblies/show.html.erb +10 -13
- data/app/views/decidim/assemblies/assembly_members/index.html.erb +1 -1
- data/app/views/layouts/decidim/admin/assemblies.html.erb +22 -0
- data/app/views/layouts/decidim/admin/assembly.html.erb +2 -2
- data/config/locales/ar.yml +60 -27
- data/config/locales/bg-BG.yml +7 -0
- data/config/locales/ca.yml +79 -1
- data/config/locales/cs.yml +125 -47
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/de.yml +80 -0
- data/config/locales/el-GR.yml +1 -0
- data/config/locales/el.yml +456 -0
- data/config/locales/en.yml +78 -0
- data/config/locales/es-MX.yml +79 -0
- data/config/locales/es-PY.yml +79 -0
- data/config/locales/es.yml +78 -0
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/eu.yml +11 -0
- data/config/locales/fi-plain.yml +78 -0
- data/config/locales/fi.yml +81 -3
- data/config/locales/fr-CA.yml +456 -0
- data/config/locales/fr.yml +78 -0
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +11 -0
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hu.yml +67 -2
- data/config/locales/id-ID.yml +11 -0
- data/config/locales/is-IS.yml +263 -0
- data/config/locales/it.yml +181 -102
- data/config/locales/ja-JP.yml +452 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lv-LV.yml +454 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/nl.yml +86 -8
- data/config/locales/no.yml +451 -0
- data/config/locales/pl.yml +222 -142
- data/config/locales/pt-BR.yml +12 -1
- data/config/locales/pt.yml +198 -118
- data/config/locales/ro-RO.yml +422 -0
- data/config/locales/ru.yml +11 -0
- data/config/locales/sk-SK.yml +168 -0
- data/config/locales/sk.yml +172 -0
- data/config/locales/sl.yml +132 -0
- data/config/locales/sr-CS.yml +73 -0
- data/config/locales/sv.yml +167 -88
- data/config/locales/tr-TR.yml +11 -0
- data/config/locales/uk.yml +11 -0
- data/db/migrate/20200108113855_create_decidim_assembly_types.rb +19 -0
- data/db/migrate/20200108123050_migrate_decidim_assembly_types.rb +83 -0
- data/db/migrate/20200320105906_index_foreign_keys_in_decidim_assemblies.rb +7 -0
- data/db/migrate/20200320105907_index_foreign_keys_in_decidim_assembly_user_roles.rb +7 -0
- data/db/migrate/20200416132109_remove_legacy_decidim_assembly_type.rb +8 -0
- data/db/migrate/20200430202456_create_decidim_assemblies_settings.rb +10 -0
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/lib/decidim/assemblies/admin_engine.rb +3 -0
- data/lib/decidim/assemblies/engine.rb +7 -0
- data/lib/decidim/assemblies/participatory_space.rb +11 -3
- data/lib/decidim/assemblies/query_extensions.rb +40 -0
- data/lib/decidim/assemblies/test/factories.rb +29 -2
- data/lib/decidim/assemblies/version.rb +1 -1
- metadata +62 -10
- data/app/views/decidim/assemblies/assembly_widgets/show.html.erb +0 -11
@@ -8,10 +8,10 @@ module Decidim
|
|
8
8
|
super(Assembly.all, options)
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
12
|
-
return query if
|
11
|
+
def search_type_id
|
12
|
+
return query if type_id.blank?
|
13
13
|
|
14
|
-
query.where(
|
14
|
+
query.where(decidim_assemblies_type_id: type_id)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Assemblies
|
5
|
+
# This type represents an AssembliesType.
|
6
|
+
AssembliesTypeType = GraphQL::ObjectType.define do
|
7
|
+
name "AssembliesType"
|
8
|
+
description "An assemblies type"
|
9
|
+
|
10
|
+
field :id, !types.ID, "The assemblies type's unique ID"
|
11
|
+
field :title, !Decidim::Core::TranslatedFieldType, "The title of this assemblies type."
|
12
|
+
field :createdAt, !Decidim::Core::DateTimeType, "The time this assemblies type was created", property: :created_at
|
13
|
+
field :updatedAt, !Decidim::Core::DateTimeType, "The time this assemblies type was updated", property: :updated_at
|
14
|
+
field :assemblies, !types[Decidim::Assemblies::AssemblyType], "Assemblies with this assemblies type"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Assemblies
|
5
|
+
# This type represents a assembly.
|
6
|
+
AssemblyMemberType = GraphQL::ObjectType.define do
|
7
|
+
name "AssemblyMember"
|
8
|
+
description "An assembly member"
|
9
|
+
|
10
|
+
field :id, !types.ID, "Internal ID of the member"
|
11
|
+
field :fullName, types.String, "Full name of the member", property: :full_name
|
12
|
+
field :position, types.String, "Position of the member in the assembly"
|
13
|
+
|
14
|
+
field :user, Decidim::Core::UserType, "The corresponding decidim user", property: :user
|
15
|
+
|
16
|
+
field :createdAt, Decidim::Core::DateTimeType, "The time this member was created", property: :created_at
|
17
|
+
field :updatedAt, Decidim::Core::DateTimeType, "The time this member was updated", property: :updated_at
|
18
|
+
|
19
|
+
field :weight, types.Int, "Order of appearance in which it should be represented"
|
20
|
+
field :gender, types.String, "Gender of the member"
|
21
|
+
# field :birthday, Decidim::Core::DateType, "Birthday date of the member" # non-public currently
|
22
|
+
field :birthplace, types.String, "Birthplace of the member"
|
23
|
+
field :designationDate, Decidim::Core::DateType, "Date of designation of the member", property: :designation_date
|
24
|
+
# field :designationMode, types.String, "Mode in which the member was designated", property: :designation_mode # non-public currently
|
25
|
+
field :positionOther, types.String, "Custom position name", property: :position_other
|
26
|
+
field :ceasedDate, Decidim::Core::DateType, "Date of cease for the member", property: :ceased_date
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Assemblies
|
5
|
+
# This type represents a assembly.
|
6
|
+
AssemblyType = GraphQL::ObjectType.define do
|
7
|
+
interfaces [
|
8
|
+
-> { Decidim::Core::ParticipatorySpaceInterface },
|
9
|
+
-> { Decidim::Core::AttachableInterface },
|
10
|
+
-> { Decidim::Core::ParticipatorySpaceResourceableInterface }
|
11
|
+
]
|
12
|
+
|
13
|
+
name "Assembly"
|
14
|
+
description "An assembly"
|
15
|
+
|
16
|
+
field :id, !types.ID, "The internal ID for this assembly"
|
17
|
+
field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this assembly"
|
18
|
+
field :shortDescription, Decidim::Core::TranslatedFieldType, "The sort description of this assembly", property: :short_description
|
19
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description of this assembly"
|
20
|
+
field :slug, !types.String, "The slug of this assembly"
|
21
|
+
field :hashtag, types.String, "The hashtag for this assembly"
|
22
|
+
field :createdAt, !Decidim::Core::DateTimeType, "The time this assembly was created", property: :created_at
|
23
|
+
field :updatedAt, !Decidim::Core::DateTimeType, "The time this assembly was updated", property: :updated_at
|
24
|
+
field :publishedAt, !Decidim::Core::DateTimeType, "The time this assembly was published", property: :published_at
|
25
|
+
field :reference, !types.String, "Reference for this assembly"
|
26
|
+
field :categories, !types[Decidim::Core::CategoryType], "Categories for this assembly"
|
27
|
+
|
28
|
+
field :heroImage, types.String, "The hero image for this assembly", property: :hero_image
|
29
|
+
field :bannerImage, types.String, "The banner image for this assembly", property: :banner_image
|
30
|
+
field :promoted, types.Boolean, "If this assembly is promoted (therefore in the homepage)"
|
31
|
+
field :developerGroup, Decidim::Core::TranslatedFieldType, "The promoter group of this assembly", property: :developer_group
|
32
|
+
field :metaScope, Decidim::Core::TranslatedFieldType, "The scope metadata of this assembly", property: :meta_scope
|
33
|
+
field :localArea, Decidim::Core::TranslatedFieldType, "The organization area of this assembly", property: :local_area
|
34
|
+
field :target, Decidim::Core::TranslatedFieldType, "Who participates in this assembly"
|
35
|
+
field :participatoryScope, Decidim::Core::TranslatedFieldType, "What is decided on this assembly", property: :participatory_scope
|
36
|
+
field :participatoryStructure, Decidim::Core::TranslatedFieldType, "How it is decided on this assembly", property: :participatory_structure
|
37
|
+
field :showStatistics, types.Boolean, "If this assembly should show statistics", property: :show_statistics
|
38
|
+
field :scopesEnabled, types.Boolean, "If this assembly has scopes enabled", property: :scopes_enabled
|
39
|
+
field :privateSpace, types.Boolean, "If this assembly is a private space", property: :private_space
|
40
|
+
field :area, Decidim::Core::AreaApiType, "Area of this assembly"
|
41
|
+
field :parent, Decidim::Assemblies::AssemblyType, "The parent assembly of this assembly"
|
42
|
+
field :parentsPath, types.String, "Assembly hierarchy representation", property: :parents_path
|
43
|
+
field :childrenCount, types.Int, "Number of children assemblies", property: :children_count
|
44
|
+
field :purposeOfAction, Decidim::Core::TranslatedFieldType, "Purpose of action", property: :purpose_of_action
|
45
|
+
field :composition, Decidim::Core::TranslatedFieldType, "Composition of this assembly"
|
46
|
+
field :assemblyType, Decidim::Assemblies::AssembliesTypeType, "Type of the assembly", property: :assembly_type
|
47
|
+
field :creationDate, Decidim::Core::DateType, "Creation date of this assembly", property: :creation_date
|
48
|
+
field :createdBy, types.String, "The creator of this assembly", property: :created_by
|
49
|
+
field :createdByOther, Decidim::Core::TranslatedFieldType, "Custom creator", property: :created_by_other
|
50
|
+
field :duration, Decidim::Core::DateType, "Duration of this assembly"
|
51
|
+
field :includedAt, Decidim::Core::DateType, "Included at", property: :included_at
|
52
|
+
field :closingDate, Decidim::Core::DateType, "Closing date of the assembly", property: :closing_date
|
53
|
+
field :closingDateReason, Decidim::Core::TranslatedFieldType, "Closing date reason of this assembly", property: :closing_date_reason
|
54
|
+
field :internalOrganisation, Decidim::Core::TranslatedFieldType, "Internal organisation of this assembly", property: :internal_organisation
|
55
|
+
field :isTransparent, types.Boolean, "If this assembly is transparent", property: :is_transparent
|
56
|
+
field :specialFeatures, Decidim::Core::TranslatedFieldType, "Special features of this assembly", property: :special_features
|
57
|
+
field :twitterHandler, types.String, "Twitter handler", property: :twitter_handler
|
58
|
+
field :instagramHandler, types.String, "Instagram handler", property: :instagram_handler
|
59
|
+
field :facebookHandler, types.String, "Facebook handler", property: :facebook_handler
|
60
|
+
field :youtubeHandler, types.String, "Youtube handler", property: :youtube_handler
|
61
|
+
field :githubHandler, types.String, "Github handler", property: :github_handler
|
62
|
+
|
63
|
+
field :members, !types[Decidim::Assemblies::AssemblyMemberType], "Members of this assembly"
|
64
|
+
field :children, !types[Decidim::Assemblies::AssemblyType], "Childrens of this assembly"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -1,15 +1,19 @@
|
|
1
1
|
<div id="assemblies-filter" class="inline-filters">
|
2
|
-
|
3
|
-
<span><%= help_text %></span>
|
4
|
-
<button id="button-text" data-toggle="inline-filter-sort"><%= current_filter_name %></button>
|
2
|
+
<% if available_filters.any? %>
|
5
3
|
<div id="inline-filter-sort" class="dropdown-pane" data-position="bottom" data-alignment="right" data-dropdown data-auto-focus="true">
|
6
4
|
<ul class="list-reset">
|
7
|
-
<% available_filters.each do |
|
8
|
-
|
9
|
-
|
5
|
+
<% available_filters.each do |title, id| %>
|
6
|
+
<li>
|
7
|
+
<%= link_to filter_link(id), remote: true do %>
|
8
|
+
<%= title %>
|
10
9
|
<% end %>
|
10
|
+
</li>
|
11
11
|
<% end %>
|
12
12
|
</ul>
|
13
13
|
</div>
|
14
|
-
|
14
|
+
<label>
|
15
|
+
<span><%= help_text %></span>
|
16
|
+
<button id="button-text" data-toggle="inline-filter-sort"><%= current_filter_name %></button>
|
17
|
+
</label>
|
18
|
+
<% end %>
|
15
19
|
</div>
|
@@ -157,7 +157,7 @@
|
|
157
157
|
<div class="row column">
|
158
158
|
<%= form.select :parent_id,
|
159
159
|
options_from_collection_for_select(
|
160
|
-
|
160
|
+
parent_assemblies_for_select,
|
161
161
|
:id,
|
162
162
|
:translated_title,
|
163
163
|
selected: current_assembly.try(:parent_id)
|
@@ -196,16 +196,12 @@
|
|
196
196
|
</div>
|
197
197
|
|
198
198
|
<div class="row column">
|
199
|
-
<%= form.select :
|
199
|
+
<%= form.select :decidim_assemblies_type_id,
|
200
200
|
@form.assembly_types_for_select,
|
201
201
|
{ include_blank: t(".select_an_assembly_type") },
|
202
202
|
{ multiple: false } %>
|
203
203
|
</div>
|
204
204
|
|
205
|
-
<div class="row column" id="assembly_type_other">
|
206
|
-
<%= form.translated :text_field, :assembly_type_other %>
|
207
|
-
</div>
|
208
|
-
|
209
205
|
<div class="row column">
|
210
206
|
<% if @form.processes_for_select %>
|
211
207
|
<%= form.select :participatory_processes_ids,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="card" id="assemblies">
|
1
|
+
<div class="card with-overflow" id="assemblies">
|
2
2
|
<div class="card-divider">
|
3
3
|
<h2 class="card-title">
|
4
4
|
<% parent_assembly.self_and_ancestors.each do |assembly| %>
|
@@ -15,6 +15,7 @@
|
|
15
15
|
<% end %>
|
16
16
|
</h2>
|
17
17
|
</div>
|
18
|
+
<%= admin_filter_selector %>
|
18
19
|
<div class="card-section">
|
19
20
|
<div class="table-scroll">
|
20
21
|
<table class="table-list">
|
@@ -37,15 +38,18 @@
|
|
37
38
|
</thead>
|
38
39
|
<tbody>
|
39
40
|
<% @assemblies.each do |assembly| %>
|
41
|
+
<% next unless allowed_to? :list, :assembly, assembly: assembly %>
|
40
42
|
<tr>
|
41
43
|
<td>
|
42
44
|
<% if assembly.promoted? %>
|
43
45
|
<span data-tooltip class="icon-state icon-highlight" aria-haspopup="true" data-disable-hover="false" title="<%= t("models.assembly.fields.promoted", scope: "decidim.admin") %>">
|
44
|
-
<%= icon "star" %>
|
46
|
+
<%= icon "star", role: "img", "aria-hidden": true %>
|
45
47
|
</span>
|
46
48
|
<% end %>
|
47
49
|
<% if allowed_to? :update, :assembly, assembly: assembly %>
|
48
50
|
<%= link_to translated_attribute(assembly.title), edit_assembly_path(assembly) %><br>
|
51
|
+
<% elsif allowed_to? :read, :component, assembly: assembly %>
|
52
|
+
<%= link_to translated_attribute(assembly.title), components_path(assembly) %><br>
|
49
53
|
<% elsif allowed_to? :preview, :assembly, assembly: assembly %>
|
50
54
|
<%= link_to translated_attribute(assembly.title), decidim_assemblies.assembly_path(assembly) %><br>
|
51
55
|
<% elsif allowed_to? :read, :moderation, assembly: assembly %>
|
@@ -55,7 +59,7 @@
|
|
55
59
|
<% end %>
|
56
60
|
</td>
|
57
61
|
<td>
|
58
|
-
<%= l(assembly.
|
62
|
+
<%= l(assembly.creation_date, format: :decidim_short) if assembly.creation_date %>
|
59
63
|
</td>
|
60
64
|
<td class="table-list__state">
|
61
65
|
<% if assembly.private_space? %>
|
@@ -82,7 +86,7 @@
|
|
82
86
|
|
83
87
|
<% if assembly.children.count.positive? || allowed_to?(:create, :assembly) %>
|
84
88
|
<%= icon_link_to "dial",
|
85
|
-
|
89
|
+
url_for(query_params_with(parent_id_eq: assembly.id)),
|
86
90
|
t("decidim.admin.titles.assemblies"),
|
87
91
|
class: "action-icon--dial #{'highlighted' if assembly.children.count.positive?}" %>
|
88
92
|
<% end %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form edit_assemblies_settings" }, url: assemblies_settings_path, method: :put) do |f| %>
|
2
|
+
<%= render partial: "form", object: f %>
|
3
|
+
<div class="button--double form-general-submit">
|
4
|
+
<%= f.submit t(".update") %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form edit_assembly_type" }) 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" %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
@@ -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 %>
|
@@ -1,7 +1,16 @@
|
|
1
|
-
<div class=
|
2
|
-
<div class="
|
3
|
-
<
|
4
|
-
|
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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
44
|
+
<% end %>
|
33
45
|
</div>
|
34
|
-
|
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
|
-
<
|
4
|
+
<h3 id="assemblies-count" class="section-heading collapse">
|
5
5
|
<%= render partial: "count" %>
|
6
|
-
</
|
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
|
-
<
|
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
|
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
|
-
</
|
27
|
+
</div>
|
@@ -18,13 +18,16 @@ edit_link(
|
|
18
18
|
|
19
19
|
<%= render partial: "parent_assemblies" %>
|
20
20
|
|
21
|
-
|
22
|
-
<
|
23
|
-
<
|
24
|
-
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
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" %>
|