about summary refs log tree commit diff
path: root/app/helpers/admin
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/admin')
-rw-r--r--app/helpers/admin/dashboard_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/admin/dashboard_helper.rb b/app/helpers/admin/dashboard_helper.rb
new file mode 100644
index 000000000..4ee2cdef4
--- /dev/null
+++ b/app/helpers/admin/dashboard_helper.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module Admin::DashboardHelper
+  def feature_hint(feature, enabled)
+    indicator   = safe_join([enabled ? t('simple_form.yes') : t('simple_form.no'), fa_icon('power-off fw')], ' ')
+    class_names = enabled ? 'pull-right positive-hint' : 'pull-right neutral-hint'
+
+    safe_join([feature, content_tag(:span, indicator, class: class_names)])
+  end
+end