aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/newapplication_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/newapplication_helper.rb')
-rw-r--r--app/helpers/newapplication_helper.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb
index c13d64197..15c642ed7 100644
--- a/app/helpers/newapplication_helper.rb
+++ b/app/helpers/newapplication_helper.rb
@@ -235,6 +235,26 @@ module NewapplicationHelper
end
end
+ # Definition list
+ def definition_list title, test
+ return unless test.present?
+
+ head = content_tag(:div, title, class: 'dl-head')
+
+ body = content_tag :div, class: 'dl-body' do
+ cont = []
+ test.map do |k, v|
+ cont << content_tag(:div, k, class: 'dl-term')
+ cont << content_tag(:div, v, class: 'dl-def')
+ end
+ cont.join.html_safe
+ end
+
+ content_tag :div, '', class: 'definition-list' do
+ head + body
+ end
+ end
+
# ModalBox Builder
def modalbox id, &block
content_tag(:div, '', class: 'modal fade', id: id, tabindex: 1, role: 'dialog') do