summaryrefslogtreecommitdiff
path: root/app/helpers/tab_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/tab_helper.rb')
-rw-r--r--app/helpers/tab_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb
index ee701076a14..3308ab0c259 100644
--- a/app/helpers/tab_helper.rb
+++ b/app/helpers/tab_helper.rb
@@ -119,4 +119,8 @@ module TabHelper
'active' if current_controller?('oauth/applications')
end
+
+ def sidebar_link(href, title: nil, css: nil, &block)
+ link_to capture(&block), href, title: (title if collapsed_sidebar?), class: css, aria: { label: title }
+ end
end