diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-08 21:14:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-08 21:14:31 +0300 |
commit | bb0d99269b1bee11939e6a3ddfcefed8c6fd4874 (patch) | |
tree | 58f5d3f64251e1847a1bfb77d76ead2abb16c899 /app/helpers | |
parent | f1ce233e6ab6535afef76f10528e104672426710 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/dashboard_helper.rb | 12 | ||||
-rw-r--r-- | app/helpers/issuables_helper.rb | 10 | ||||
-rw-r--r-- | app/helpers/nav_helper.rb | 8 | ||||
-rw-r--r-- | app/helpers/organizations/organization_helper.rb | 3 | ||||
-rw-r--r-- | app/helpers/todos_helper.rb | 4 |
6 files changed, 3 insertions, 38 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3c64a685ba3..49230e558a8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -315,8 +315,8 @@ module ApplicationHelper class_names << 'issue-boards-page gl-overflow-auto' if current_controller?(:boards) class_names << 'epic-boards-page gl-overflow-auto' if current_controller?(:epic_boards) class_names << 'with-performance-bar' if performance_bar_enabled? - class_names << 'with-header' if !show_super_sidebar? || !current_user - class_names << 'with-top-bar' if show_super_sidebar? && !@hide_top_bar_padding + class_names << 'with-header' unless current_user + class_names << 'with-top-bar' unless @hide_top_bar_padding class_names << system_message_class class_names diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb index d19b0a9a43a..3756584e3b3 100644 --- a/app/helpers/dashboard_helper.rb +++ b/app/helpers/dashboard_helper.rb @@ -3,18 +3,6 @@ module DashboardHelper include IconsHelper - def assigned_issues_dashboard_path - issues_dashboard_path(assignee_username: current_user.username) - end - - def assigned_mrs_dashboard_path - merge_requests_dashboard_path(assignee_username: current_user.username) - end - - def reviewer_mrs_dashboard_path - merge_requests_dashboard_path(reviewer_username: current_user.username) - end - def has_start_trial? false end diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 2cc83a936d8..e02b4fa0410 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -149,16 +149,6 @@ module IssuablesHelper end end - def assigned_open_issues_count_text - count = assigned_issuables_count(:issues) - - if count > User::MAX_LIMIT_FOR_ASSIGNEED_ISSUES_COUNT - 1 - "#{count - 1}+" - else - count.to_s - end - end - def issuable_reference(issuable) @show_full_reference ? issuable.to_reference(full: true) : issuable.to_reference(@group || @project) end diff --git a/app/helpers/nav_helper.rb b/app/helpers/nav_helper.rb index 4b561914f2f..cb9a270253f 100644 --- a/app/helpers/nav_helper.rb +++ b/app/helpers/nav_helper.rb @@ -40,14 +40,6 @@ module NavHelper end end - def user_dropdown_class - class_names = [] - class_names << 'header-user-dropdown-toggle' - class_names << 'impersonated-user' if session[:impersonator_id] - - class_names - end - def page_has_markdown? current_path?('projects/merge_requests#show') || current_path?('projects/merge_requests/conflicts#show') || diff --git a/app/helpers/organizations/organization_helper.rb b/app/helpers/organizations/organization_helper.rb index 533d5409ab7..d0dd9dc5aea 100644 --- a/app/helpers/organizations/organization_helper.rb +++ b/app/helpers/organizations/organization_helper.rb @@ -51,8 +51,7 @@ module Organizations def home_organization_setting_app_data { - # TODO: use real setting - https://gitlab.com/gitlab-org/gitlab/-/issues/428668 - initial_selection: 1 + initial_selection: current_user.home_organization_id }.to_json end diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index d053aeb7bfe..fc4d69dcdbc 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -5,10 +5,6 @@ module TodosHelper @todos_pending_count ||= current_user.todos_pending_count end - def todos_count_format(count) - count > 99 ? '99+' : count.to_s - end - def todos_done_count @todos_done_count ||= current_user.todos_done_count end |