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:
authormicael.bergeron <micael.bergeron@solutionstlm.com>2017-07-29 18:04:42 +0300
committermicael.bergeron <micael.bergeron@solutionstlm.com>2017-09-06 16:00:57 +0300
commit966b1128d884a318dad4277e23368334fe67e836 (patch)
treec0007ce9697dfe0fe93b52e619e21e8341c35120 /app/helpers/issuables_helper.rb
parent8fe1aa5dbbb41cdefffb7177d9eda44ac8652cc7 (diff)
WIP: refactor the first-contributor to Issuable
this will remove the need make N queries (per-note) at the cost of having to mark notes with an attribute this opens up the possibility for other special roles for notes
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r--app/helpers/issuables_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 717abf2082d..11fae16f04d 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -138,6 +138,8 @@ module IssuablesHelper
end
output << "&ensp;".html_safe
+ output << issuable_first_contribution_icon if issuable.first_contribution?
+
output << content_tag(:span, (issuable.task_status if issuable.tasks?), id: "task_status", class: "hidden-xs hidden-sm")
output << content_tag(:span, (issuable.task_status_short if issuable.tasks?), id: "task_status_short", class: "hidden-md hidden-lg")
@@ -173,6 +175,13 @@ module IssuablesHelper
html.html_safe
end
+ def issuable_first_contribution_icon
+ content_tag(:span, class: 'fa-stack has-tooltip', title: _('1st contribution!')) do
+ concat(icon('certificate', class: "fa-stack-2x"))
+ concat(content_tag(:strong, '1', class: 'fa-inverse fa-stack-1x'))
+ end
+ end
+
def assigned_issuables_count(issuable_type)
case issuable_type
when :issues