diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/bug/comments.html.tmpl | 5 | ||||
-rw-r--r-- | template/en/default/bug/create/create.html.tmpl | 12 | ||||
-rw-r--r-- | template/en/default/bug/show-header.html.tmpl | 6 |
3 files changed, 20 insertions, 3 deletions
diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index cc6bb977b..3074bf8e9 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -22,6 +22,11 @@ [% can_edit_comments = bug.check_can_change_field('longdesc', 0, 1) %] [% can_tag_comments = feature_enabled('jsonrpc') AND user.can_tag_comments %] +[% markdown_enabled = feature_enabled('jsonrpc') AND user.settings.use_markdown.value == "on" %] +[% IF markdown_enabled %] + <script>hljs.initHighlightingOnLoad();</script> +[% END %] + <!-- This auto-sizes the comments and positions the collapse/expand links to the right. --> <table class="bz_comment_table"> diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index e0fdd13b9..bea4befba 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -9,13 +9,19 @@ [% title = BLOCK %]Enter [% terms.Bug %]: [% product.name FILTER html %][% END %] [% use_qa_contact = Param("useqacontact") %] +[% style_urls = ['skins/standard/bug.css'] %] +[% javascript_urls = [ "js/attachment.js", "js/util.js", "js/field.js", "js/TUI.js", "js/bug.js" ] %] + +[% markdown_enabled = feature_enabled('jsonrpc') AND user.settings.use_markdown.value == "on" %] +[% IF markdown_enabled %] + [% javascript_urls.push("js/highlight.js/highlight.pack.js") %] + [% style_urls.push("js/highlight.js/styles/github.css") %] +[% END %] + [% PROCESS global/header.html.tmpl title = title generate_api_token = 1 yui = ['datatable', 'button'] - style_urls = ['skins/standard/bug.css'] - javascript_urls = [ "js/attachment.js", "js/util.js", - "js/field.js", "js/TUI.js", "js/bug.js" ] onload = "set_assign_to($use_qa_contact); hideElementById('attachment_true'); showElementById('attachment_false'); showElementById('btn_no_attachment');" %] diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl index 0aaaf91e3..bce881420 100644 --- a/template/en/default/bug/show-header.html.tmpl +++ b/template/en/default/bug/show-header.html.tmpl @@ -70,6 +70,12 @@ "bz_component_$bug.component", "bz_bug_$bug.bug_id", ] %] +[% markdown_enabled = feature_enabled('jsonrpc') AND user.settings.use_markdown.value == "on" %] +[% IF markdown_enabled %] + [% javascript_urls.push("js/highlight.js/highlight.pack.js") %] + [% style_urls.push("js/highlight.js/styles/github.css") %] +[% END %] + [% FOREACH group = bug.groups_in %] [% bodyclasses.push("bz_group_$group.name") %] [% END %] |