Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 15:07:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 15:07:33 +0300
commit6b75320f525f841454f1ab162d141d3610f2e77b (patch)
tree4971c27759e4fbc18b85e71800c3b9c12346317e /app/helpers
parent4226aca420920c1844e8eade4798a2dff188a6fc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_settings_helper.rb3
-rw-r--r--app/helpers/gitlab_routing_helper.rb6
-rw-r--r--app/helpers/groups_helper.rb10
-rw-r--r--app/helpers/todos_helper.rb6
4 files changed, 18 insertions, 7 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb
index 3c70ff3b59f..115d1031a8a 100644
--- a/app/helpers/application_settings_helper.rb
+++ b/app/helpers/application_settings_helper.rb
@@ -290,7 +290,8 @@ module ApplicationSettingsHelper
:snowplow_cookie_domain,
:snowplow_enabled,
:snowplow_site_id,
- :push_event_hooks_limit
+ :push_event_hooks_limit,
+ :push_event_activities_limit
]
end
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb
index f05218efe0c..4f31cc67ccc 100644
--- a/app/helpers/gitlab_routing_helper.rb
+++ b/app/helpers/gitlab_routing_helper.rb
@@ -76,10 +76,10 @@ module GitlabRoutingHelper
end
def edit_milestone_path(entity, *args)
- if entity.parent.is_a?(Group)
- edit_group_milestone_path(entity.parent, entity, *args)
+ if entity.resource_parent.is_a?(Group)
+ edit_group_milestone_path(entity.resource_parent, entity, *args)
else
- edit_project_milestone_path(entity.parent, entity, *args)
+ edit_project_milestone_path(entity.resource_parent, entity, *args)
end
end
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index 9cba87ac444..811467ca03a 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -15,6 +15,16 @@ module GroupsHelper
%w[groups#projects groups#edit badges#index ci_cd#show ldap_group_links#index hooks#index audit_events#index pipeline_quota#index]
end
+ def group_packages_nav_link_paths
+ %w[
+ groups/container_registries#index
+ ]
+ end
+
+ def group_container_registry_nav?
+ Gitlab.config.registry.enabled && can?(current_user, :read_container_image, @group)
+ end
+
def group_sidebar_links
@group_sidebar_links ||= get_group_sidebar_links
end
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index a919c068c42..dce0842060d 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -45,8 +45,8 @@ module TodosHelper
end
def todo_parent_path(todo)
- if todo.parent.is_a?(Group)
- link_to todo.parent.name, group_path(todo.parent)
+ if todo.resource_parent.is_a?(Group)
+ link_to todo.resource_parent.name, group_path(todo.resource_parent)
else
link_to_project(todo.project)
end
@@ -64,7 +64,7 @@ module TodosHelper
if todo.for_commit?
project_commit_path(todo.project, todo.target, path_options)
else
- path = [todo.parent, todo.target]
+ path = [todo.resource_parent, todo.target]
path.unshift(:pipelines) if todo.build_failed?