Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix back link in activities

Oliver Günthera690c196f275
diff --git a/app/components/users/profile/activities_component.rb b/app/components/users/profile/activities_component.rb
index ab498f7fe80..3383f612fc1 100644
--- a/app/components/users/profile/activities_component.rb
+++ b/app/components/users/profile/activities_component.rb
@@ -38,6 +38,7 @@ module Users
@user = user
@events = Activities::Fetcher.new(User.current, author: @user).events(limit: 10)
+ @activity_page = "users/#{@user.id}"
end
end
end
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 9ebdb348a2e..399fab97ab0 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -47,8 +47,6 @@ class UsersController < ApplicationController
no_authorization_required! :show
authorization_checked! :destroy, :deletion_info
- before_action :set_current_activity_page, only: [:show]
-
# Password confirmation helpers and actions
include PasswordConfirmation
before_action :check_password_confirmation, only: [:destroy]
@@ -268,10 +266,6 @@ class UsersController < ApplicationController
render_404 unless Users::DeleteContract.deletion_allowed? @user, User.current
end
- def set_current_activity_page
- @activity_page = "users/#{@user.id}"
- end
-
def my_or_admin_layout
# TODO: how can this be done better:
# check if the route used to call the action is in the 'my' namespace
diff --git a/spec/features/users/show_spec.rb b/spec/features/users/show_spec.rb
index 690e85208ba..7e56bfbda0a 100644
--- a/spec/features/users/show_spec.rb
+++ b/spec/features/users/show_spec.rb
@@ -50,13 +50,13 @@ RSpec.describe "index users", :js, :with_cuprite do
visit user_path(user)
- expect(page).to have_css("li", text: "Project: #{project.name}")
+ expect(page).to have_text("Project: #{project.name}")
expected_work_package_title = "#{work_package.type.name} ##{work_package.id}: #{work_package.subject} " \
"(Project: #{work_package.project.name})"
- expect(page).to have_css("li", text: expected_work_package_title)
+ expect(page).to have_text(expected_work_package_title)
# Expect group visible
- expect(page).to have_css("li", text: group.name)
+ expect(page).to have_text(group.name)
end
context "as another user" do