Skip to content

Commit

Permalink
Merge pull request #72 from nikhilgupta1211/markdownbody
Browse files Browse the repository at this point in the history
Added markdown for body on event_email#index
  • Loading branch information
ChrisBr committed Jul 3, 2017
2 parents 0782d6f + c1dcb62 commit 9a9294f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/event_emails/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
%td
= link_to truncate(e.subject, length: 50), event_event_email_path(@event,e)
%td
= truncate(e.body, length: 50)
= markdown(truncate(e.body, length: 50))
%td
= e.user.email
%td #{time_tag(e.created_at)}
4 changes: 3 additions & 1 deletion app/views/event_emails/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
= simple_form_for(resource, url: event_event_emails_path) do |f|
= f.input :to, as: :text,readonly: true, input_html: {rows: 1}
= f.input :subject
= f.input :body, as: :text, input_html: {rows: 12}
= f.input :body, as: :text, hint: 'This field supports markdown', input_html: {rows: 12}
%a{:href => "https://daringfireball.net/projects/markdown/syntax"}
View Markdown Syntax
.pull-right
= f.button :submit, 'Send', class: 'btn btn-primary', data: { disable_with: "Please wait..." }
= link_to 'Cancel', event_event_emails_path(@event) , class: 'btn btn-default'
Expand Down

0 comments on commit 9a9294f

Please sign in to comment.