diff options
Diffstat (limited to 'app/assets/javascripts/gfm_auto_complete.js')
-rw-r--r-- | app/assets/javascripts/gfm_auto_complete.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js index e25c9d90f60..de69daf5c22 100644 --- a/app/assets/javascripts/gfm_auto_complete.js +++ b/app/assets/javascripts/gfm_auto_complete.js @@ -107,8 +107,13 @@ class GfmAutoComplete { if (value.params.length > 0) { tpl += ' <small class="params"><%- params.join(" ") %></small>'; } - if (value.description !== '') { - tpl += '<small class="description"><i><%- description %> <%- warningText %></i></small>'; + if (value.warning && value.icon && value.icon === 'confidential') { + tpl += + '<small class="description"><em><i class="fa fa-eye-slash" aria-hidden="true"/><%- warning %></em></small>'; + } else if (value.warning) { + tpl += '<small class="description"><em><%- warning %></em></small>'; + } else if (value.description !== '') { + tpl += '<small class="description"><em><%- description %></em></small>'; } tpl += '</li>'; @@ -119,7 +124,6 @@ class GfmAutoComplete { return _.template(tpl)({ ...value, className: cssClasses.join(' '), - warningText: value.warning ? `(${value.warning})` : '', }); }, insertTpl(value) { @@ -150,6 +154,7 @@ class GfmAutoComplete { params: c.params, description: c.description, warning: c.warning, + icon: c.icon, search, }; }); |