Skip to content

Commit 1177a5b

Browse files
committed
Merge branch 'release/0.29-stable' into 0.29-backports
2 parents f4bd48a + 2050742 commit 1177a5b

4 files changed

Lines changed: 31 additions & 5 deletions

File tree

decidim-admin/app/views/decidim/admin/officializations/index.html.erb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@
2020
<tbody>
2121
<% @users.each do |user| %>
2222
<tr data-user-id="<%= user.id %>">
23-
<td><%= link_to_if user.nickname.present?, user.name, decidim.profile_path(user.nickname) %></td>
24-
<td><%= link_to_if user.nickname.present?, user.nickname, decidim.profile_path(user.nickname) %></td>
23+
<% if user.nickname.present? %>
24+
<td><%= link_to user.name, decidim.profile_path(user.nickname) %></td>
25+
<td><%= link_to user.nickname, decidim.profile_path(user.nickname) %></td>
26+
<% else %>
27+
<td><%= user.name %></td>
28+
<td><%= user.nickname %></td>
29+
<% end %>
2530
<td><%= l user.created_at, format: :short %></td>
2631
<td><%= user.officialized? ? t(".officialized") : t(".not_officialized") %></td>
2732
<td><%= translated_attribute(user.officialized_as) %></td>

decidim-admin/spec/system/admin_manages_officializations_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,23 @@
6666
end
6767
end
6868

69+
describe "when user's nickname is blank" do
70+
let!(:user) { create(:user, :managed, organization:, nickname: "") }
71+
72+
before do
73+
within_admin_sidebar_menu do
74+
click_on "Participants"
75+
end
76+
end
77+
78+
it "has no user link" do
79+
within "tr[data-user-id=\"#{user.id}\"]" do
80+
expect(page).to have_content(user.name)
81+
expect(page).to have_no_link(user.name)
82+
end
83+
end
84+
end
85+
6986
describe "officializating users" do
7087
context "when not yet officialized" do
7188
let!(:user) { create(:user, organization:) }

decidim-core/app/packs/stylesheets/decidim/_author.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
&-container {
1616
@apply rounded-full overflow-hidden inline-block w-6 h-6 align-top;
17+
18+
&:focus-within {
19+
@apply ring-2 ring-primary;
20+
}
1721
}
1822

1923
&-counter {

decidim-verifications/lib/decidim/verifications/adapter.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Decidim
44
module Verifications
55
class InvalidVerificationRoute < StandardError
6-
def new(route:)
6+
def initialize(route:)
77
msg = <<~MSG
88
You specified a direct handler but you are trying to use `#{route}`
99
which is only available for multi-step authorization workflows. Change
@@ -15,7 +15,7 @@ def new(route:)
1515
end
1616

1717
class MissingVerificationRoute < StandardError
18-
def new(handler:, route:, action:)
18+
def initialize(handler:, route:, action:)
1919
msg = <<~MSG
2020
The authorization handler `#{handler}` does not define the route
2121
`#{route}`. If you want to enable `#{action}` for `#{handler}`, change
@@ -27,7 +27,7 @@ def new(handler:, route:, action:)
2727
end
2828

2929
class MissingEngine < StandardError
30-
def new(handler:, engine:)
30+
def initialize(handler:, engine:)
3131
msg = <<~MSG
3232
The authorization handler `#{handler}` does not define the `#{engine}`
3333
engine. Please define the engine in the workflow configuration.

0 commit comments

Comments
 (0)