summaryrefslogtreecommitdiff
path: root/app/helpers/projects_helper.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-02-04 13:16:48 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2016-02-04 13:16:48 +0100
commit6fea7c386ff27e5081ff3532b06f71d29eee956b (patch)
treee1a1035725399135e86a6341c8349dfdab417107 /app/helpers/projects_helper.rb
parentd231b6b9182ce9f68f267af0a073136c898f6892 (diff)
parente933a50b6b8e7feec76bcc71313c14736967cd7a (diff)
downloadgitlab-ce-6fea7c386ff27e5081ff3532b06f71d29eee956b.tar.gz
Merge remote-tracking branch 'origin/master' into ci-permissions
# Conflicts: # app/views/projects/builds/index.html.haml
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r--app/helpers/projects_helper.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 4543eff0d63..6b5fad1963a 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -53,14 +53,23 @@ module ProjectsHelper
link_to(simple_sanitize(owner.name), user_path(owner))
end
- project_link = link_to(simple_sanitize(project.name), project_path(project))
+ project_link = link_to project_path(project), { class: "project-item-select-holder #{"js-projects-dropdown-toggle" if current_user}" } do
+ link_output = simple_sanitize(project.name)
+ link_output += content_tag :span, nil, { class: "fa fa-chevron-down dropdown-toggle-caret" } if current_user
+
+ if current_user
+ link_output += project_select_tag :project_path,
+ class: "project-item-select js-projects-dropdown",
+ data: { include_groups: false, order_by: 'last_activity_at' }
+ end
+
+ link_output
+ end
full_title = namespace_link + ' / ' + project_link
full_title += ' &middot; '.html_safe + link_to(simple_sanitize(name), url) if name
- content_tag :span do
- full_title
- end
+ full_title
end
def remove_project_message(project)