diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-01 19:25:35 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-01 19:25:35 +0300 |
commit | 80b5ab5df091e7279166184519ed52c2a09d6129 (patch) | |
tree | ec1b5bd7b5e26e87cf319e52f91d04a11f153e40 /app/helpers | |
parent | e036abf3a2f969036a2c4d59441a4d7a068d7ca4 (diff) | |
parent | 16d98f425ced770dea7701f883f64e263d962a01 (diff) |
Merge remote-tracking branch 'upstream/master' into show-status-from-branch
* upstream/master: (126 commits)
Allow to search for user by secondary email address in the admin interface
Rename :name search parameter to :search_query at /admin/users
Fix project features default values
Add a link to the Issue Boards API in main README
Fix Markdown styling inside reference links
Fix relative links in Markdown wiki when displayed in "Project" tab
Flexbox webkit prefixes
Tests update
Tests update
Changed where merge request link is
New todos blank state
Implement CreateMembers service to make controller thin
Do not show tooltip for active element (!7105)
Update CHANGELOG
Assign local_assigns[:subject] to a variable on the shared label partial
Use select instead of pluck on Project.group_ids
Skip authorization check when searching for labels on IssuableFinder
Use label subject to calculate number of issues/mrs within the group
Remove unnecessary includes(:priorities) on Projects::LabelsController
Add 8.13.2 CHANGELOG entries
...
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/button_helper.rb | 3 | ||||
-rw-r--r-- | app/helpers/issuables_helper.rb | 8 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 6 |
3 files changed, 15 insertions, 2 deletions
diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index 85e1dc33ee8..dee3c78df47 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -16,13 +16,14 @@ module ButtonHelper # See http://clipboardjs.com/#usage def clipboard_button(data = {}) css_class = data[:class] || 'btn-clipboard btn-transparent' + title = data[:title] || 'Copy to Clipboard' data = { toggle: 'tooltip', placement: 'bottom', container: 'body' }.merge(data) content_tag :button, icon('clipboard'), class: "btn #{css_class}", data: data, type: :button, - title: 'Copy to Clipboard' + title: title end def http_clone_button(project, placement = 'right', append_link: true) diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 03b2db1bc91..ef6cfb235a9 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -71,6 +71,14 @@ module IssuablesHelper author_output = link_to_member(project, issuable.author, size: 24, mobile_classes: "hidden-xs", tooltip: true) author_output << link_to_member(project, issuable.author, size: 24, by_username: true, avatar: false, mobile_classes: "hidden-sm hidden-md hidden-lg") end + + if issuable.tasks? + output << " ".html_safe + output << content_tag(:span, issuable.task_status, id: "task_status", class: "hidden-xs") + output << content_tag(:span, issuable.task_status_short, id: "task_status_short", class: "hidden-sm hidden-md hidden-lg") + end + + output end def issuable_todo(issuable) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index d26b4018be6..42c00ec3cd5 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -174,10 +174,14 @@ module ProjectsHelper nav_tabs << :merge_requests end - if can?(current_user, :read_build, project) + if can?(current_user, :read_pipeline, project) nav_tabs << :pipelines end + if can?(current_user, :read_build, project) + nav_tabs << :builds + end + if Gitlab.config.registry.enabled && can?(current_user, :read_container_image, project) nav_tabs << :container_registry end |