From ef4b7fda921fe8e4512fc799dd65c5b99468474e Mon Sep 17 00:00:00 2001 From: James Mason Date: Thu, 27 Dec 2018 22:53:55 -0800 Subject: [PATCH] Add markdown formatting for sponsor descriptions --- app/views/admin/sponsors/_form.html.haml | 2 +- app/views/admin/sponsors/index.html.haml | 2 +- app/views/conferences/_modal_description.haml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/admin/sponsors/_form.html.haml b/app/views/admin/sponsors/_form.html.haml index c465fc48..5e475714 100644 --- a/app/views/admin/sponsors/_form.html.haml +++ b/app/views/admin/sponsors/_form.html.haml @@ -10,7 +10,7 @@ .col-md-8 = semantic_form_for(@sponsor, url: (@sponsor.new_record? ? admin_conference_sponsors_path : admin_conference_sponsor_path(@conference.short_title, @sponsor))) do |f| = f.input :name, input_html: { autofocus: true } - = f.input :description + = f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint = image_tag f.object.picture.thumb.url if f.object.picture? = f.input :picture = f.input :website_url diff --git a/app/views/admin/sponsors/index.html.haml b/app/views/admin/sponsors/index.html.haml index d2fc512c..95643ada 100644 --- a/app/views/admin/sponsors/index.html.haml +++ b/app/views/admin/sponsors/index.html.haml @@ -24,7 +24,7 @@ %td = sponsor.name %td - = truncate(sponsor.description) + = truncate(markdown(sponsor.description)) %td = sponsor.website_url %td diff --git a/app/views/conferences/_modal_description.haml b/app/views/conferences/_modal_description.haml index 7fe4173b..1c66b67d 100644 --- a/app/views/conferences/_modal_description.haml +++ b/app/views/conferences/_modal_description.haml @@ -18,6 +18,6 @@ - if object.picture? = image_tag get_logo(object), class: img_classes %p.description - = object.description + = markdown(object.description) .modal-footer = link_to nil, object.website_url, target: '_blank'