diff options
author | Nick Thomas <nick@gitlab.com> | 2016-10-07 01:01:42 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-10-07 04:54:26 +0300 |
commit | 9920551536bb4f78dffeaaf3a194b92f54c34a47 (patch) | |
tree | dad5b2d5f1b725e66d29d355c5095b6899546427 /app/views/admin/broadcast_messages/_form.html.haml | |
parent | dd159a750b294ee89cb8a4143284ff9788b639fc (diff) |
Enable CacheMarkdownField for the remaining models
This commit alters views for the following models to use the markdown cache if
present:
* AbuseReport
* Appearance
* ApplicationSetting
* BroadcastMessage
* Group
* Issue
* Label
* MergeRequest
* Milestone
* Project
At the same time, calls to `escape_once` have been moved into the `single_line`
Banzai pipeline, so they can't be missed out by accident and the work is done
at save, rather than render, time.
Diffstat (limited to 'app/views/admin/broadcast_messages/_form.html.haml')
-rw-r--r-- | app/views/admin/broadcast_messages/_form.html.haml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml index f952d2e9aa1..3132d157f29 100644 --- a/app/views/admin/broadcast_messages/_form.html.haml +++ b/app/views/admin/broadcast_messages/_form.html.haml @@ -1,7 +1,10 @@ .broadcast-message-preview{ style: broadcast_message_style(@broadcast_message) } = icon('bullhorn') .js-broadcast-message-preview - = render_broadcast_message(@broadcast_message.message.presence || "Your message here") + - if @broadcast_message.message.present? + = render_broadcast_message(@broadcast_message) + - else + = "Your message here" = form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal js-quick-submit js-requires-input'} do |f| = form_errors(@broadcast_message) |