decidim-assemblies 0.25.1 → 0.26.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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/assemblies/assembly_member/show.erb +1 -1
  3. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_cell.rb +12 -0
  4. data/app/commands/decidim/assemblies/admin/copy_assembly.rb +2 -1
  5. data/app/commands/decidim/assemblies/admin/create_assembly_member.rb +39 -18
  6. data/app/commands/decidim/assemblies/admin/update_assembly_member.rb +37 -16
  7. data/app/controllers/concerns/decidim/assemblies/admin/filterable.rb +20 -0
  8. data/app/controllers/decidim/assemblies/admin/assembly_members_controller.rb +1 -0
  9. data/app/controllers/decidim/assemblies/admin/assembly_user_roles_controller.rb +11 -3
  10. data/app/forms/decidim/assemblies/admin/assembly_member_form.rb +15 -2
  11. data/app/helpers/decidim/assemblies/assemblies_helper.rb +1 -1
  12. data/app/models/decidim/assembly.rb +0 -15
  13. data/app/models/decidim/assembly_member.rb +10 -0
  14. data/app/models/decidim/assembly_user_role.rb +20 -0
  15. data/app/packs/src/decidim/assemblies/admin/assembly_members.js +10 -0
  16. data/app/permissions/decidim/assemblies/permissions.rb +0 -8
  17. data/app/presenters/decidim/assemblies/admin_log/assembly_member_presenter.rb +0 -1
  18. data/app/presenters/decidim/assembly_member_presenter.rb +10 -0
  19. data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +1 -1
  20. data/app/views/decidim/assemblies/admin/assembly_members/_form.html.erb +4 -4
  21. data/app/views/decidim/assemblies/admin/assembly_user_roles/index.html.erb +7 -6
  22. data/app/views/decidim/assemblies/assemblies/_promoted_assembly.html.erb +1 -1
  23. data/app/views/decidim/assemblies/assemblies/show.html.erb +7 -7
  24. data/app/views/decidim/assemblies/assembly_members/index.html.erb +9 -0
  25. data/app/views/layouts/decidim/admin/assembly_members.html.erb +18 -0
  26. data/config/locales/ar.yml +0 -1
  27. data/config/locales/ca.yml +7 -1
  28. data/config/locales/cs.yml +7 -1
  29. data/config/locales/de.yml +0 -1
  30. data/config/locales/el.yml +0 -1
  31. data/config/locales/en.yml +7 -1
  32. data/config/locales/es-MX.yml +7 -1
  33. data/config/locales/es-PY.yml +7 -1
  34. data/config/locales/es.yml +7 -1
  35. data/config/locales/eu.yml +8 -2
  36. data/config/locales/fi-plain.yml +7 -1
  37. data/config/locales/fi.yml +7 -1
  38. data/config/locales/fr-CA.yml +7 -1
  39. data/config/locales/fr.yml +10 -4
  40. data/config/locales/gl.yml +7 -1
  41. data/config/locales/hu.yml +0 -1
  42. data/config/locales/id-ID.yml +0 -1
  43. data/config/locales/is-IS.yml +0 -1
  44. data/config/locales/it.yml +7 -1
  45. data/config/locales/ja.yml +22 -16
  46. data/config/locales/lb-LU.yml +396 -0
  47. data/config/locales/lb.yml +1 -1
  48. data/config/locales/lv.yml +0 -1
  49. data/config/locales/nl.yml +7 -1
  50. data/config/locales/no.yml +15 -1
  51. data/config/locales/pl.yml +4 -1
  52. data/config/locales/pt-BR.yml +1 -2
  53. data/config/locales/pt.yml +7 -1
  54. data/config/locales/ro-RO.yml +20 -14
  55. data/config/locales/ru.yml +0 -1
  56. data/config/locales/sk.yml +0 -1
  57. data/config/locales/sl.yml +0 -1
  58. data/config/locales/sv.yml +7 -1
  59. data/config/locales/tr-TR.yml +0 -1
  60. data/config/locales/uk.yml +0 -1
  61. data/config/locales/val-ES.yml +1 -0
  62. data/config/locales/zh-CN.yml +0 -1
  63. data/db/migrate/20210907120249_remove_designation_mode_from_assembly_members.rb +7 -0
  64. data/lib/decidim/api/assembly_member_type.rb +0 -1
  65. data/lib/decidim/assemblies/admin_engine.rb +3 -1
  66. data/lib/decidim/assemblies/participatory_space.rb +1 -3
  67. data/lib/decidim/assemblies/test/factories.rb +0 -1
  68. data/lib/decidim/assemblies/version.rb +1 -1
  69. metadata +15 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 936c7f0d7629af46038a8fab14258c20da29077abba50febca9b9a780ce560c1
4
- data.tar.gz: 29d74fb0ececac6749b99e23f72f6019a7f92aae89ab0a7356aa2fefa3ee7a51
3
+ metadata.gz: 344e04cccf08bd1451e5346a57a8d383148ad661e9291b48f5c0193de77eef72
4
+ data.tar.gz: 981cf77c8e5ffc50ded811bdd8d18f3c29f470350be24252ac59938f0932fd74
5
5
  SHA512:
6
- metadata.gz: a4777614726af97eb0e5ccde52b40cfa1040dbdfb31b876266ff919332111826141beec7a3949c14f661fab77d63b13b3d2c25d2b171def61b53d82e4acf77f8
7
- data.tar.gz: e25d1403c0325e992fbe07d8748e336cc7b914289e16502e53f4bbd26b79d29504abcb727f8711769359729715dd71c5061081585a0947a38b8cf0976e39038f
6
+ metadata.gz: 8e4a6ab3ac34de4431ddb4f490ed2bda8bda4548cb4c36a5da7ba48639695ceb21314f2b1a4f500b63989a9074a065dfdcf3dd27f5e3de14a39850d34e42222c
7
+ data.tar.gz: d17c60e0e01a7694f6d5aa931d205b3d82b502ad281b71fcf176683e41e329e87056c1910f42adf0a463d109027e370726fd746a873966a8c4382bec51c9f452
@@ -24,7 +24,7 @@
24
24
  <% end %>
25
25
  </div>
26
26
  <% else %>
27
- <div class="author__avatar"><%= image_tag asset_pack_path("media/images/default-avatar.svg"), alt: "member-avatar" %></div>
27
+ <div class="author__avatar"><%= image_tag model.non_user_avatar_path, alt: "member-avatar" %></div>
28
28
  <div>
29
29
  <div class="author__name--container">
30
30
  <div class="author__name">
@@ -6,6 +6,10 @@ module Decidim
6
6
  class HighlightedAssembliesCell < Decidim::ViewModel
7
7
  delegate :current_user, to: :controller
8
8
 
9
+ cache :show, expires_in: 10.minutes, if: :perform_caching? do
10
+ cache_hash
11
+ end
12
+
9
13
  def show
10
14
  render if highlighted_assemblies.any?
11
15
  end
@@ -29,6 +33,14 @@ module Decidim
29
33
  def decidim_assemblies
30
34
  Decidim::Assemblies::Engine.routes.url_helpers
31
35
  end
36
+
37
+ private
38
+
39
+ def cache_hash
40
+ hash = []
41
+ hash.push(I18n.locale)
42
+ hash.join(Decidim.cache_key_separator)
43
+ end
32
44
  end
33
45
  end
34
46
  end
@@ -87,7 +87,8 @@ module Decidim
87
87
  name: component.name,
88
88
  participatory_space: @copied_assembly,
89
89
  settings: component.settings,
90
- step_settings: component.step_settings
90
+ step_settings: component.step_settings,
91
+ weight: component.weight
91
92
  )
92
93
  component.manifest.run_hooks(:copy, new_component: new_component, old_component: component)
93
94
  end
@@ -6,6 +6,8 @@ module Decidim
6
6
  # A command with all the business logic when creating a new assembly
7
7
  # member in the system.
8
8
  class CreateAssemblyMember < Rectify::Command
9
+ include ::Decidim::AttachmentAttributesMethods
10
+
9
11
  # Public: Initializes the command.
10
12
  #
11
13
  # form - A form object with the params.
@@ -25,16 +27,49 @@ module Decidim
25
27
  def call
26
28
  return broadcast(:invalid) if form.invalid?
27
29
 
28
- create_assembly_member!
29
- notify_assembly_member_about_new_membership
30
+ if assembly_member_with_attributes.valid?
31
+ create_assembly_member!
32
+ notify_assembly_member_about_new_membership
30
33
 
31
- broadcast(:ok)
34
+ broadcast(:ok)
35
+ else
36
+ if assembly_member_with_attributes.errors.include? :non_user_avatar
37
+ form.errors.add(
38
+ :non_user_avatar,
39
+ assembly_member_with_attributes.errors[:non_user_avatar]
40
+ )
41
+ end
42
+ broadcast(:invalid)
43
+ end
32
44
  end
33
45
 
34
46
  private
35
47
 
36
48
  attr_reader :form, :assembly, :current_user
37
49
 
50
+ def assembly_member_with_attributes
51
+ @assembly_member_with_attributes ||= Decidim::AssemblyMember.new(assembly_member_attributes)
52
+ end
53
+
54
+ def assembly_member_attributes
55
+ form.attributes.slice(
56
+ :full_name,
57
+ :gender,
58
+ :birthday,
59
+ :birthplace,
60
+ :ceased_date,
61
+ :designation_date,
62
+ :position,
63
+ :position_other,
64
+ :weight
65
+ ).merge(
66
+ assembly: assembly,
67
+ user: form.user
68
+ ).merge(
69
+ attachment_attributes(:non_user_avatar)
70
+ )
71
+ end
72
+
38
73
  def create_assembly_member!
39
74
  log_info = {
40
75
  resource: {
@@ -48,21 +83,7 @@ module Decidim
48
83
  @assembly_member = Decidim.traceability.create!(
49
84
  Decidim::AssemblyMember,
50
85
  current_user,
51
- form.attributes.slice(
52
- :full_name,
53
- :gender,
54
- :birthday,
55
- :birthplace,
56
- :ceased_date,
57
- :designation_date,
58
- :designation_mode,
59
- :position,
60
- :position_other,
61
- :weight
62
- ).merge(
63
- assembly: assembly,
64
- user: form.user
65
- ),
86
+ assembly_member_attributes,
66
87
  log_info
67
88
  )
68
89
  end
@@ -6,6 +6,8 @@ module Decidim
6
6
  # A command with all the business logic when updating an assembly
7
7
  # member in the system.
8
8
  class UpdateAssemblyMember < Rectify::Command
9
+ include ::Decidim::AttachmentAttributesMethods
10
+
9
11
  # Public: Initializes the command.
10
12
  #
11
13
  # form - A form object with the params.
@@ -25,14 +27,46 @@ module Decidim
25
27
  return broadcast(:invalid) if form.invalid?
26
28
  return broadcast(:invalid) unless assembly_member
27
29
 
28
- update_assembly_member!
29
- broadcast(:ok)
30
+ assembly_member.assign_attributes(attributes)
31
+
32
+ if assembly_member.valid?
33
+ assembly_member.reload
34
+ update_assembly_member!
35
+ broadcast(:ok)
36
+ else
37
+ if assembly_member.errors.include? :non_user_avatar
38
+ form.errors.add(
39
+ :non_user_avatar,
40
+ assembly_member.errors[:non_user_avatar]
41
+ )
42
+ end
43
+
44
+ broadcast(:invalid)
45
+ end
30
46
  end
31
47
 
32
48
  private
33
49
 
34
50
  attr_reader :form, :assembly_member
35
51
 
52
+ def attributes
53
+ form.attributes.slice(
54
+ :full_name,
55
+ :gender,
56
+ :birthday,
57
+ :birthplace,
58
+ :ceased_date,
59
+ :designation_date,
60
+ :position,
61
+ :position_other,
62
+ :weight
63
+ ).merge(
64
+ user: form.user
65
+ ).merge(
66
+ attachment_attributes(:non_user_avatar)
67
+ )
68
+ end
69
+
36
70
  def update_assembly_member!
37
71
  log_info = {
38
72
  resource: {
@@ -46,20 +80,7 @@ module Decidim
46
80
  Decidim.traceability.update!(
47
81
  assembly_member,
48
82
  form.current_user,
49
- form.attributes.slice(
50
- :full_name,
51
- :gender,
52
- :birthday,
53
- :birthplace,
54
- :ceased_date,
55
- :designation_date,
56
- :designation_mode,
57
- :position,
58
- :position_other,
59
- :weight
60
- ).merge(
61
- user: form.user
62
- ),
83
+ attributes,
63
84
  log_info
64
85
  )
65
86
  end
@@ -23,6 +23,26 @@ module Decidim
23
23
  def extra_filters
24
24
  [:parent_id_eq]
25
25
  end
26
+
27
+ def filters
28
+ [:private_space_eq, :published_at_null, :decidim_assemblies_type_id_eq]
29
+ end
30
+
31
+ def filters_with_values
32
+ {
33
+ private_space_eq: [true, false],
34
+ published_at_null: [true, false],
35
+ decidim_assemblies_type_id_eq: AssembliesType.where(organization: current_organization).pluck(:id)
36
+ }
37
+ end
38
+
39
+ def dynamically_translated_filters
40
+ [:decidim_assemblies_type_id_eq]
41
+ end
42
+
43
+ def translated_decidim_assemblies_type_id_eq(id)
44
+ translated_attribute(Decidim::AssembliesType.find(id).title)
45
+ end
26
46
  end
27
47
  end
28
48
  end
@@ -7,6 +7,7 @@ module Decidim
7
7
  #
8
8
  class AssemblyMembersController < Decidim::Assemblies::Admin::ApplicationController
9
9
  include Concerns::AssemblyAdmin
10
+ layout "decidim/admin/assembly_members"
10
11
 
11
12
  def index
12
13
  enforce_permission_to :index, :assembly_member
@@ -7,10 +7,11 @@ module Decidim
7
7
  #
8
8
  class AssemblyUserRolesController < Decidim::Assemblies::Admin::ApplicationController
9
9
  include Concerns::AssemblyAdmin
10
+ include Decidim::Admin::Officializations::Filterable
10
11
 
11
12
  def index
12
13
  enforce_permission_to :index, :assembly_user_role
13
- @assembly_user_roles = collection
14
+ @assembly_user_roles = filtered_collection
14
15
  end
15
16
 
16
17
  def new
@@ -90,11 +91,18 @@ module Decidim
90
91
 
91
92
  private
92
93
 
94
+ def search_field_predicate
95
+ :name_or_nickname_or_email_cont
96
+ end
97
+
98
+ def filters
99
+ [:invitation_accepted_at_present, :last_sign_in_at_present]
100
+ end
101
+
93
102
  def collection
94
103
  @collection ||= Decidim::AssemblyUserRole
95
- .includes(:user)
104
+ .joins(:user)
96
105
  .where(assembly: current_assembly)
97
- .order(:role, "decidim_users.name")
98
106
  end
99
107
  end
100
108
  end
@@ -10,12 +10,13 @@ module Decidim
10
10
 
11
11
  attribute :weight, Integer, default: 0
12
12
  attribute :full_name, String
13
+ attribute :non_user_avatar
14
+ attribute :remove_non_user_avatar, Boolean, default: false
13
15
  attribute :gender, String
14
- attribute :birthday, Decidim::Attributes::TimeWithZone
16
+ attribute :birthday, Decidim::Attributes::LocalizedDate
15
17
  attribute :birthplace, String
16
18
  attribute :ceased_date, Decidim::Attributes::LocalizedDate
17
19
  attribute :designation_date, Decidim::Attributes::LocalizedDate
18
- attribute :designation_mode, String
19
20
  attribute :position, String
20
21
  attribute :position_other, String
21
22
  attribute :user_id, Integer
@@ -23,6 +24,18 @@ module Decidim
23
24
 
24
25
  validates :designation_date, presence: true
25
26
  validates :full_name, presence: true, unless: proc { |object| object.existing_user }
27
+ validates :non_user_avatar, passthru: {
28
+ to: Decidim::AssemblyMember,
29
+ with: {
30
+ # The member gets its organization context through the assembly
31
+ # object which is why we need to create a dummy assembly in order
32
+ # to pass the correct organization context to the file upload
33
+ # validators.
34
+ assembly: lambda do |form|
35
+ Decidim::Assembly.new(organization: form.current_organization)
36
+ end
37
+ }
38
+ }
26
39
  validates :position, presence: true, inclusion: { in: Decidim::AssemblyMember::POSITIONS }
27
40
  validates :position_other, presence: true, if: ->(form) { form.position == "other" }
28
41
  validates :ceased_date, date: { after: :designation_date, allow_blank: true }
@@ -34,7 +34,7 @@ module Decidim
34
34
  html += "<strong>#{translated_attribute(assembly.title)}: </strong>".html_safe
35
35
  html += t("assemblies.show.private_space", scope: "decidim").to_s.html_safe
36
36
  html += ", #{t("assemblies.show.is_transparent.#{assembly.is_transparent}", scope: "decidim")}".html_safe if assembly.is_transparent?
37
- html += " #{decidim_sanitize translated_attribute(assembly.special_features)}".html_safe
37
+ html += " #{decidim_sanitize_editor translated_attribute(assembly.special_features)}".html_safe
38
38
  html.html_safe
39
39
  end
40
40
 
@@ -93,21 +93,6 @@ module Decidim
93
93
  index_on_create: ->(_assembly) { false },
94
94
  index_on_update: ->(assembly) { assembly.visible? })
95
95
 
96
- # Overwriting existing method Decidim::HasPrivateUsers.visible_for
97
- def self.visible_for(user)
98
- if user
99
- return all if user.admin?
100
-
101
- left_outer_joins(:participatory_space_private_users).where(
102
- %{private_space = false OR
103
- (private_space = true AND is_transparent = true) OR
104
- decidim_participatory_space_private_users.decidim_user_id = ?}, user.id
105
- ).distinct
106
- else
107
- public_spaces
108
- end
109
- end
110
-
111
96
  # Overwriting existing method Decidim::HasPrivateUsers.public_spaces
112
97
  def self.public_spaces
113
98
  where(private_space: false).or(where(private_space: true).where(is_transparent: true)).published
@@ -6,6 +6,7 @@ module Decidim
6
6
  class AssemblyMember < ApplicationRecord
7
7
  include Decidim::Traceable
8
8
  include Decidim::Loggable
9
+ include Decidim::HasUploadValidations
9
10
 
10
11
  POSITIONS = %w(president vice_president secretary other).freeze
11
12
 
@@ -13,6 +14,11 @@ module Decidim
13
14
  belongs_to :assembly, foreign_key: "decidim_assembly_id", class_name: "Decidim::Assembly"
14
15
  alias participatory_space assembly
15
16
 
17
+ has_one_attached :non_user_avatar
18
+ validates_avatar :non_user_avatar, uploader: Decidim::AvatarUploader
19
+
20
+ delegate :organization, to: :assembly
21
+
16
22
  default_scope { order(weight: :asc, created_at: :asc) }
17
23
 
18
24
  scope :not_ceased, -> { where("ceased_date >= ? OR ceased_date IS NULL", Time.zone.today) }
@@ -20,5 +26,9 @@ module Decidim
20
26
  def self.log_presenter_class_for(_log)
21
27
  Decidim::Assemblies::AdminLog::AssemblyMemberPresenter
22
28
  end
29
+
30
+ def remove_non_user_avatar
31
+ false
32
+ end
23
33
  end
24
34
  end
@@ -19,6 +19,26 @@ module Decidim
19
19
  Decidim::Assemblies::AdminLog::AssemblyUserRolePresenter
20
20
  end
21
21
 
22
+ ransacker :name do
23
+ Arel.sql(%{("decidim_users"."name")::text})
24
+ end
25
+
26
+ ransacker :nickname do
27
+ Arel.sql(%{("decidim_users"."nickname")::text})
28
+ end
29
+
30
+ ransacker :email do
31
+ Arel.sql(%{("decidim_users"."email")::text})
32
+ end
33
+
34
+ ransacker :invitation_accepted_at do
35
+ Arel.sql(%{("decidim_users"."invitation_accepted_at")::text})
36
+ end
37
+
38
+ ransacker :last_sign_in_at do
39
+ Arel.sql(%{("decidim_users"."last_sign_in_at")::text})
40
+ end
41
+
22
42
  private
23
43
 
24
44
  # Private: check if the process and the user have the same organization
@@ -13,6 +13,16 @@ $(() => {
13
13
  }
14
14
  });
15
15
 
16
+ createFieldDependentInputs({
17
+ controllerField: $assemblyMemberType,
18
+ wrapperSelector: ".user-fields",
19
+ dependentFieldsSelector: ".user-fields--non-user-avatar",
20
+ dependentInputSelector: "input",
21
+ enablingCondition: ($field) => {
22
+ return $field.val() === "false"
23
+ }
24
+ });
25
+
16
26
  createFieldDependentInputs({
17
27
  controllerField: $assemblyMemberType,
18
28
  wrapperSelector: ".user-fields",
@@ -17,7 +17,6 @@ module Decidim
17
17
  public_list_assemblies_action?
18
18
  public_read_assembly_action?
19
19
  public_list_members_action?
20
- public_report_content_action?
21
20
  return permission_action
22
21
  end
23
22
 
@@ -125,13 +124,6 @@ module Decidim
125
124
  allow!
126
125
  end
127
126
 
128
- def public_report_content_action?
129
- return unless permission_action.action == :create &&
130
- permission_action.subject == :moderation
131
-
132
- allow!
133
- end
134
-
135
127
  # All users with a relation to a assembly and organization admins can enter
136
128
  # the space area. The sapce area is considered to be the assemblies zone,
137
129
  # not the assembly groups one.
@@ -22,7 +22,6 @@ module Decidim
22
22
  birthday: :date,
23
23
  birthplace: :string,
24
24
  designation_date: :date,
25
- designation_mode: :string,
26
25
  position: "Decidim::Assemblies::AdminLog::ValueTypes::MemberPositionPresenter",
27
26
  position_other: :string,
28
27
  weight: :integer,
@@ -33,6 +33,16 @@ module Decidim
33
33
  I18n.t(__getobj__.position, scope: "decidim.admin.models.assembly_member.positions", default: "")
34
34
  end
35
35
 
36
+ def non_user_avatar_path
37
+ return non_user_avatar.default_url unless non_user_avatar.attached?
38
+
39
+ non_user_avatar.path
40
+ end
41
+
42
+ def non_user_avatar
43
+ attached_uploader(:non_user_avatar)
44
+ end
45
+
36
46
  private
37
47
 
38
48
  def user
@@ -48,7 +48,7 @@
48
48
  <tr>
49
49
  <td>
50
50
  <% if assembly.promoted? %>
51
- <span data-tooltip class="icon-state icon-highlight" aria-haspopup="true" data-disable-hover="false" title="<%= t("models.assembly.fields.promoted", scope: "decidim.admin") %>">
51
+ <span data-tooltip class="icon-state icon-highlight" data-disable-hover="false" title="<%= t("models.assembly.fields.promoted", scope: "decidim.admin") %>">
52
52
  <%= icon "star", role: "img", "aria-hidden": true %>
53
53
  </span>
54
54
  <% end %>
@@ -15,6 +15,10 @@
15
15
  <%= form.text_field :full_name, autofocus: true %>
16
16
  </div>
17
17
 
18
+ <div class="row column user-fields--non-user-avatar">
19
+ <%= form.upload :non_user_avatar, help_i18n_messages: ["non_user_avatar_help", "image_guide"], help_i18n_scope: "decidim.assemblies.admin.assembly_members.form" %>
20
+ </div>
21
+
18
22
  <div class="row column user-fields--user-picker">
19
23
  <% prompt_options = { url: decidim_admin.user_entities_organization_url, placeholder: t(".select_user") } %>
20
24
  <%= form.autocomplete_select(:user_id, form.object.user.presence, { multiple: false }, prompt_options) do |user|
@@ -41,10 +45,6 @@
41
45
  <%= form.date_field :designation_date %>
42
46
  </div>
43
47
 
44
- <div class="row column">
45
- <%= form.text_field :designation_mode %>
46
- </div>
47
-
48
48
  <div class="row column">
49
49
  <%= form.date_field :ceased_date %>
50
50
  </div>
@@ -7,17 +7,18 @@
7
7
  <% end %>
8
8
  </h2>
9
9
  </div>
10
+ <%= admin_filter_selector %>
10
11
 
11
12
  <div class="card-section">
12
13
  <div class="table-scroll">
13
- <table class="stack">
14
+ <table class="stack table-list">
14
15
  <thead>
15
16
  <tr>
16
- <th><%= t("models.assembly_user_role.fields.name", scope: "decidim.admin") %></th>
17
- <th><%= t("models.assembly_user_role.fields.email", scope: "decidim.admin") %></th>
18
- <th><%= t("models.user.fields.invitation_sent_at", scope: "decidim.admin") %></th>
19
- <th><%= t("models.user.fields.invitation_accepted_at", scope: "decidim.admin") %></th>
20
- <th><%= t("models.assembly_user_role.fields.role", scope: "decidim.admin") %></th>
17
+ <th><%= sort_link(query, :name,t("models.assembly_user_role.fields.name", scope: "decidim.admin"), default_order: :desc) %></th>
18
+ <th><%= sort_link(query, :email, t("models.assembly_user_role.fields.email", scope: "decidim.admin"), default_order: :desc) %></th>
19
+ <th><%= sort_link(query, :last_sign_in_at, t("models.user.fields.last_sign_in_at", scope: "decidim.admin"), default_order: :desc) %></th>
20
+ <th><%= sort_link(query, :invitation_accepted_at, t("models.user.fields.invitation_accepted_at", scope: "decidim.admin"), default_order: :desc) %></th>
21
+ <th><%= sort_link(query, :role, t("models.assembly_user_role.fields.role", scope: "decidim.admin"), default_order: :desc) %></th>
21
22
  <th class="actions"></th>
22
23
  </tr>
23
24
  </thead>
@@ -5,7 +5,7 @@
5
5
  <%= link_to assembly_path(promoted_assembly), class: "card__link" do %>
6
6
  <h2 class="card__title"><%= translated_attribute promoted_assembly.title %></h2>
7
7
  <% end %>
8
- <%= decidim_sanitize html_truncate(translated_attribute(promoted_assembly.short_description), length: 630, separator: "...") %>
8
+ <%= decidim_sanitize_editor html_truncate(translated_attribute(promoted_assembly.short_description), length: 630, separator: "...") %>
9
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 %>
@@ -36,9 +36,9 @@ edit_link(
36
36
  <div class="columns medium-7 mediumlarge-8">
37
37
  <div class="section">
38
38
  <div class="lead">
39
- <%= decidim_sanitize translated_attribute(current_participatory_space.short_description) %>
39
+ <%= decidim_sanitize_editor translated_attribute(current_participatory_space.short_description) %>
40
40
  </div>
41
- <%= decidim_sanitize translated_attribute(current_participatory_space.description) %>
41
+ <%= decidim_sanitize_editor translated_attribute(current_participatory_space.description) %>
42
42
 
43
43
  <% if current_participatory_space.private_space? %>
44
44
  <%= assembly_features(current_participatory_space) %>
@@ -56,21 +56,21 @@ edit_link(
56
56
  <% if translated_attribute(current_participatory_space.purpose_of_action).present? %>
57
57
  <div class="section">
58
58
  <h3 class="section-heading"><%= t("purpose_of_action", scope: "decidim.assemblies.show") %></h3>
59
- <%= decidim_sanitize translated_attribute(current_participatory_space.purpose_of_action) %>
59
+ <%= decidim_sanitize_editor translated_attribute(current_participatory_space.purpose_of_action) %>
60
60
  </div>
61
61
  <% end %>
62
62
 
63
63
  <% if translated_attribute(current_participatory_space.internal_organisation).present? %>
64
64
  <div class="section">
65
65
  <h3 class="section-heading"><%= t("internal_organisation", scope: "decidim.assemblies.show") %></h3>
66
- <%= decidim_sanitize translated_attribute(current_participatory_space.internal_organisation) %>
66
+ <%= decidim_sanitize_editor translated_attribute(current_participatory_space.internal_organisation) %>
67
67
  </div>
68
68
  <% end %>
69
69
 
70
70
  <% if translated_attribute(current_participatory_space.composition).present? %>
71
71
  <div class="section">
72
72
  <h3 class="section-heading"><%= t("composition", scope: "decidim.assemblies.show") %></h3>
73
- <%= decidim_sanitize translated_attribute(current_participatory_space.composition) %>
73
+ <%= decidim_sanitize_editor translated_attribute(current_participatory_space.composition) %>
74
74
  </div>
75
75
  <% end %>
76
76
  <div class="section text-center">
@@ -85,7 +85,7 @@ edit_link(
85
85
 
86
86
  <%= render_hook(:participatory_space_highlighted_elements) %>
87
87
 
88
- <% if current_participatory_space.children.visible_for(current_user).count.positive? %>
88
+ <% if current_participatory_space.children.visible_for(current_user).published.count.positive? %>
89
89
  <section id="assemblies-grid" class="section row collapse">
90
90
  <h3 class="section-heading"><%= t("children", scope: "decidim.assemblies.show") %></h3>
91
91
  <div class="row small-up-1 medium-up-2 large-up-2 card-grid">
@@ -203,7 +203,7 @@ edit_link(
203
203
  <span class="definition-data__title"><%= t("closing_date", scope: "decidim.assemblies.show") %></span>
204
204
  <%= l(current_participatory_space.closing_date, format: :decidim_short) %>
205
205
  <br>
206
- <%= decidim_sanitize translated_attribute(current_participatory_space.closing_date_reason) %>
206
+ <%= decidim_sanitize_editor translated_attribute(current_participatory_space.closing_date_reason) %>
207
207
  </div>
208
208
  <% end %>
209
209
 
@@ -1,5 +1,14 @@
1
1
  <% add_decidim_meta_tags(title: t("assembly_members.index.title", scope: "decidim")) %>
2
2
 
3
+ <%
4
+ edit_link(
5
+ decidim_admin_assemblies.assembly_members_path(current_participatory_space.slug),
6
+ :update,
7
+ :assembly,
8
+ assembly: current_participatory_space
9
+ )
10
+ %>
11
+
3
12
  <div class="section row column">
4
13
  <div class="flex--sbe">
5
14
  <h3 class="section-heading"><%= t(".members") %> <span class="text-muted">(<%= collection.size %>)</span></h3>
@@ -0,0 +1,18 @@
1
+ <% add_decidim_page_title(translated_attribute(current_participatory_space.title)) %>
2
+ <% content_for :sidebar_menu_nav do %>
3
+ <%= sidebar_menu(:admin_assembly_menu).render do
4
+ public_page_link decidim_assemblies.assembly_assembly_members_path(current_participatory_space)
5
+ end %>
6
+ <% end %>
7
+
8
+ <%= render "layouts/decidim/admin/application" do %>
9
+ <div class="process-title">
10
+ <div class="process-title-content">
11
+ <%= link_to translated_attribute(current_participatory_space.title), decidim_assemblies.assembly_path(current_participatory_space), target: "_blank" %>
12
+ </div>
13
+ </div>
14
+
15
+ <div class="process-content">
16
+ <%= yield %>
17
+ </div>
18
+ <% end %>
@@ -56,7 +56,6 @@ ar:
56
56
  birthplace: مكان الازدياد
57
57
  ceased_date: تاريخ التوقف
58
58
  designation_date: تاريخ التعيين
59
- designation_mode: وضع التعيين
60
59
  full_name: الاسم الكامل
61
60
  gender: الجنس
62
61
  position: الموقع