decidim-admin 0.29.0.rc3 → 0.29.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/decidim/admin/verification_conflicts/filterable.rb +31 -0
- data/app/controllers/decidim/admin/application_controller.rb +1 -0
- data/app/controllers/decidim/admin/conflicts_controller.rb +13 -5
- data/app/views/decidim/admin/conflicts/index.html.erb +29 -6
- data/app/views/decidim/admin/organization_appearance/form/_minimap.html.erb +3 -3
- data/app/views/layouts/decidim/admin/_application.html.erb +1 -1
- data/config/locales/ca.yml +2 -0
- data/config/locales/de.yml +2 -0
- data/config/locales/en.yml +2 -0
- data/config/locales/es.yml +2 -0
- data/config/locales/fr-CA.yml +2 -0
- data/config/locales/fr.yml +2 -0
- data/lib/decidim/admin/test/invite_participatory_space_users_shared_context.rb +1 -0
- data/lib/decidim/admin/test/manage_attachments_examples.rb +13 -1
- data/lib/decidim/admin/version.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c877f632437efb1ca6924a56a4d1c69a627dd579b13b4f3aaad1e4968265f94b
|
4
|
+
data.tar.gz: 5091d36c76fd1be662162c90c851fb6e92d72e9aa983ce6676765b6b375d3af6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9084ab29f342406ebd1ea041ce3f4b466257db1a191c4b433d32bbf2eb704b26cdcae8de99bd14238ae973c9427e27dd1a774721e079fd62fed31479bc0581ba
|
7
|
+
data.tar.gz: 4dfbfc46e584d15f1cadeab09cbe7fe2419d6d541882da5c9d8cd3fc9e705e628c9ea0e22c6e20ce17af74534df16f2894301f803a847fc4c33ef1eb916e3f34
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_support/concern"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
module Admin
|
7
|
+
module VerificationConflicts
|
8
|
+
module Filterable
|
9
|
+
extend ActiveSupport::Concern
|
10
|
+
|
11
|
+
included do
|
12
|
+
include Decidim::Admin::Filterable
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def base_query
|
17
|
+
collection
|
18
|
+
end
|
19
|
+
|
20
|
+
def search_field_predicate
|
21
|
+
:current_user_name_or_current_user_nickname_or_current_user_email_cont
|
22
|
+
end
|
23
|
+
|
24
|
+
def filters
|
25
|
+
[]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -18,6 +18,7 @@ module Decidim
|
|
18
18
|
include Headers::ContentSecurityPolicy
|
19
19
|
include DisableRedirectionToExternalHost
|
20
20
|
include Decidim::Admin::Concerns::HasBreadcrumbItems
|
21
|
+
include ActiveStorage::SetCurrent
|
21
22
|
|
22
23
|
helper Decidim::Admin::ApplicationHelper
|
23
24
|
helper Decidim::Admin::AttributesDisplayHelper
|
@@ -3,18 +3,16 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Admin
|
5
5
|
class ConflictsController < Decidim::Admin::ApplicationController
|
6
|
+
include Decidim::Admin::VerificationConflicts::Filterable
|
7
|
+
|
6
8
|
layout "decidim/admin/users"
|
7
9
|
|
8
|
-
helper_method :context_breadcrumb_items
|
10
|
+
helper_method :context_breadcrumb_items, :conflicts
|
9
11
|
|
10
12
|
add_breadcrumb_item_from_menu :impersonate_menu
|
11
13
|
|
12
14
|
def index
|
13
15
|
enforce_permission_to :index, :impersonatable_user
|
14
|
-
|
15
|
-
@conflicts = Decidim::Verifications::Conflict.joins(:current_user).where(
|
16
|
-
decidim_users: { decidim_organization_id: current_organization.id }
|
17
|
-
)
|
18
16
|
end
|
19
17
|
|
20
18
|
def edit
|
@@ -66,6 +64,16 @@ module Decidim
|
|
66
64
|
url: decidim_admin.impersonatable_users_path
|
67
65
|
}
|
68
66
|
end
|
67
|
+
|
68
|
+
def collection
|
69
|
+
@collection ||= Decidim::Verifications::Conflict.joins(:current_user).where(
|
70
|
+
decidim_users: { decidim_organization_id: current_organization.id }
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
def conflicts
|
75
|
+
@conflicts ||= filtered_collection.order(created_at: :desc)
|
76
|
+
end
|
69
77
|
end
|
70
78
|
end
|
71
79
|
end
|
@@ -1,10 +1,32 @@
|
|
1
1
|
<% add_decidim_page_title(t("title", scope: "decidim.admin.conflicts")) %>
|
2
|
-
<div class="
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
<div class="item_show__header">
|
3
|
+
<h1 class="item_show__header-title">
|
4
|
+
<%= t("title", scope: "decidim.admin.conflicts") %>
|
5
|
+
</h1>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="filters__section">
|
9
|
+
<div class="fcell search">
|
10
|
+
<%= search_form_for(query, url: url_for) do |form| %>
|
11
|
+
<%= applied_filters_hidden_field_tags %>
|
12
|
+
<div class="input-group">
|
13
|
+
<%= form.search_field(
|
14
|
+
search_field_predicate,
|
15
|
+
class: "input-group-field",
|
16
|
+
label: false,
|
17
|
+
placeholder: t(".text")
|
18
|
+
) %>
|
19
|
+
<div class="input-group-button">
|
20
|
+
<button type="submit" class="text-secondary" aria-label="<%= t("decidim.search.term_input_placeholder") %>">
|
21
|
+
<%= icon "search-line", class: "fill-secondary w-4 h-4" %>
|
22
|
+
</button>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
7
26
|
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="card">
|
8
30
|
<div class="table-scroll">
|
9
31
|
<table class="table-list">
|
10
32
|
<thead>
|
@@ -17,7 +39,7 @@
|
|
17
39
|
</tr>
|
18
40
|
</thead>
|
19
41
|
<tbody>
|
20
|
-
<%
|
42
|
+
<% conflicts.each do |conflict| %>
|
21
43
|
<tr>
|
22
44
|
<td><%= conflict.current_user.name %></td>
|
23
45
|
<td><%= conflict.managed_user.name %></td>
|
@@ -30,3 +52,4 @@
|
|
30
52
|
</table>
|
31
53
|
</div>
|
32
54
|
</div>
|
55
|
+
<%= decidim_paginate conflicts %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div id="minimap" class="grid grid-cols-1 md:grid-cols-2">
|
4
4
|
<div class="minimap-tab">
|
5
5
|
<% if current_organization.favicon.attached? %>
|
6
|
-
<%= image_tag current_organization.attached_uploader(:favicon).
|
6
|
+
<%= image_tag current_organization.attached_uploader(:favicon).url, class: "minimap-favicon" %>
|
7
7
|
<% else %>
|
8
8
|
<%= content_tag :div, nil, { class: "minimap-favicon placeholder", style: "width: #{image_width(current_organization, :favicon) * size_factor}px; height: #{image_height(current_organization, :favicon) * size_factor}px;" } do %>
|
9
9
|
<span><%= t("favicon", scope: "activemodel.attributes.organization") %></span>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
<div class="minimap-header">
|
15
15
|
<% if current_organization.logo.present? %>
|
16
|
-
<%= image_tag current_organization.attached_uploader(:logo).
|
16
|
+
<%= image_tag current_organization.attached_uploader(:logo).url, class: "minimap-logo" %>
|
17
17
|
<% else %>
|
18
18
|
<%= content_tag :div, nil, { class: "minimap-logo placeholder", style: "width: #{image_width(current_organization, :logo) * size_factor}px; height: #{image_height(current_organization, :logo) * size_factor}px;" } do %>
|
19
19
|
<span><%= t("logo", scope: "activemodel.attributes.organization") %></span>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
<div class="minimap-footer">
|
28
28
|
<% if current_organization.official_img_footer.attached? %>
|
29
|
-
<%= image_tag current_organization.attached_uploader(:official_img_footer).
|
29
|
+
<%= image_tag current_organization.attached_uploader(:official_img_footer).url, class: "minimap-official_img_footer" %>
|
30
30
|
<% else %>
|
31
31
|
<%= content_tag :div, nil, { class: "minimap-official_img_footer placeholder", style: "width: #{image_width(current_organization, :official_img_footer) * size_factor}px; height: #{image_height(current_organization, :official_img_footer) * size_factor}px;" } do %>
|
32
32
|
<span><%= t("official_img_footer", scope: "activemodel.attributes.organization") %></span>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<div class="layout-nav">
|
24
24
|
<%= link_to decidim_admin.root_path, class: "logo hidden md:block", data: { "external-link": false }, aria: { label: t("decidim.accessibility.logo", organization: current_organization_name) } do %>
|
25
25
|
<% if current_organization.logo.present? %>
|
26
|
-
<%= image_tag current_organization.attached_uploader(:logo).
|
26
|
+
<%= image_tag current_organization.attached_uploader(:logo).url, alt: current_organization_name %>
|
27
27
|
<% else %>
|
28
28
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 134 109">
|
29
29
|
<g fill="#fff">
|
data/config/locales/ca.yml
CHANGED
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/fr-CA.yml
CHANGED
data/config/locales/fr.yml
CHANGED
@@ -26,7 +26,19 @@ shared_examples "manage attachments examples" do
|
|
26
26
|
expect(page).to have_css("input#attachment_description_en[value='#{translated(attachment.description, locale: :en)}']")
|
27
27
|
expect(page).to have_css("input#attachment_weight[value='#{attachment.weight}']")
|
28
28
|
expect(page).to have_select("attachment_attachment_collection_id", selected: translated(attachment_collection.name, locale: :en))
|
29
|
-
|
29
|
+
|
30
|
+
# The image's URL changes every time it is requested because the disk
|
31
|
+
# service generates a unique URL based on the expiry time of the link.
|
32
|
+
# This expiry time is calculated at the time when the URL is requested
|
33
|
+
# which is why it changes every time to different URL. This changes the
|
34
|
+
# JSON encoded file identifier which includes the expiry time as well as
|
35
|
+
# the digest of the URL because the digest is calculated based on the
|
36
|
+
# passed data.
|
37
|
+
filename = attachment.file.blob.filename
|
38
|
+
within %([data-active-uploads] [data-filename="#{filename}"]) do
|
39
|
+
src = page.find("img")["src"]
|
40
|
+
expect(src).to be_blob_url(attachment.file.blob)
|
41
|
+
end
|
30
42
|
end
|
31
43
|
|
32
44
|
it "can add attachments without a collection to a process" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.29.0.
|
4
|
+
version: 0.29.0.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-07-
|
13
|
+
date: 2024-07-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: active_link_to
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.29.0.
|
35
|
+
version: 0.29.0.rc4
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.29.0.
|
42
|
+
version: 0.29.0.rc4
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: devise
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,28 +94,28 @@ dependencies:
|
|
94
94
|
requirements:
|
95
95
|
- - '='
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.29.0.
|
97
|
+
version: 0.29.0.rc4
|
98
98
|
type: :development
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - '='
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.29.0.
|
104
|
+
version: 0.29.0.rc4
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: decidim-participatory_processes
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - '='
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 0.29.0.
|
111
|
+
version: 0.29.0.rc4
|
112
112
|
type: :development
|
113
113
|
prerelease: false
|
114
114
|
version_requirements: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - '='
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.29.0.
|
118
|
+
version: 0.29.0.rc4
|
119
119
|
description: Organization administration to manage a single organization.
|
120
120
|
email:
|
121
121
|
- josepjaume@gmail.com
|
@@ -218,6 +218,7 @@ files:
|
|
218
218
|
- app/controllers/concerns/decidim/admin/participatory_space_export.rb
|
219
219
|
- app/controllers/concerns/decidim/admin/user_groups.rb
|
220
220
|
- app/controllers/concerns/decidim/admin/user_groups/filterable.rb
|
221
|
+
- app/controllers/concerns/decidim/admin/verification_conflicts/filterable.rb
|
221
222
|
- app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
|
222
223
|
- app/controllers/concerns/decidim/moderations/admin/filterable.rb
|
223
224
|
- app/controllers/concerns/decidim/participatory_space_private_users/admin/filterable.rb
|