diff options
author | Koosha KM <koosha.khajeh@gmail.com> | 2014-08-28 19:17:54 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-08-28 19:17:54 +0200 |
commit | ec5caa57cc14a328b8b994d49cb8def8eb95aea7 (patch) | |
tree | 08eec320a2361b41fcd400259770d6357a913e15 /template | |
parent | 82346032ecfef148e78a8d19e17c5ed41ed41d10 (diff) | |
download | bugzilla-ec5caa57cc14a328b8b994d49cb8def8eb95aea7.tar.gz bugzilla-ec5caa57cc14a328b8b994d49cb8def8eb95aea7.tar.xz |
Bug 330707: Add optional support for MarkDown
r=dkl,a=sgreen
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/bug/comment.html.tmpl | 8 | ||||
-rw-r--r-- | template/en/default/bug/comments.html.tmpl | 2 | ||||
-rw-r--r-- | template/en/default/email/bugmail.html.tmpl | 2 | ||||
-rw-r--r-- | template/en/default/filterexceptions.pl | 2 | ||||
-rw-r--r-- | template/en/default/global/setting-descs.none.tmpl | 3 | ||||
-rw-r--r-- | template/en/default/pages/linked.html.tmpl | 4 | ||||
-rw-r--r-- | template/en/default/setup/strings.txt.pl | 1 |
7 files changed, 16 insertions, 6 deletions
diff --git a/template/en/default/bug/comment.html.tmpl b/template/en/default/bug/comment.html.tmpl index 96cbb63ed..7feb6dfa4 100644 --- a/template/en/default/bug/comment.html.tmpl +++ b/template/en/default/bug/comment.html.tmpl @@ -35,3 +35,11 @@ <pre id="comment_preview_text" class="bz_comment_text"></pre> </div> [% END %] + +[% IF feature_enabled('markdown') AND user.settings.use_markdown.value == 'on' %] + <div id="comment_markdown"> + <input type="checkbox" name="use_markdown" id="use_markdown" value="1" + [% "checked=\"checked\"" IF user.settings.use_markdown.value == 'on' %] > + <label id="use_markdown_label" for="use_markdown">Use Markdown for this [% terms.comment %]</label> + </div> +[% END %] diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index d040e651d..8f5742fee 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -229,7 +229,7 @@ [% IF mode == "edit" || comment.collapsed %] id="comment_text_[% comment.count FILTER none %]" [% END %]> - [%- comment_text FILTER quoteUrls(bug, comment) -%] + [%- comment_text FILTER markdown(bug, comment) -%] </pre> [% Hook.process('a_comment-end', 'bug/comments.html.tmpl') %] </div> diff --git a/template/en/default/email/bugmail.html.tmpl b/template/en/default/email/bugmail.html.tmpl index 9473a4459..b0f4efb45 100644 --- a/template/en/default/email/bugmail.html.tmpl +++ b/template/en/default/email/bugmail.html.tmpl @@ -25,7 +25,7 @@ on [% "$terms.bug $bug.id" FILTER bug_link(bug, { full_url => 1, user => to_user }) FILTER none %] from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %]</b> [% END %] - <pre>[% comment.body_full({ wrap => 1 }) FILTER quoteUrls(bug, comment, to_user) %]</pre> + <pre>[% comment.body_full({ wrap => 1 }) FILTER markdown(bug, comment, to_user) %]</pre> </div> [% END %] </p> diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 3ad9f685f..0b65414d7 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -20,7 +20,7 @@ # [% foo.push() %] # TT loop variables - [% loop.count %] # Already-filtered stuff - [% wibble FILTER html %] -# where the filter is one of html|csv|js|quoteUrls|time|uri|xml|none +# where the filter is one of html|csv|js|quoteUrls|time|uri|xml|markdown|none %::safe = ( diff --git a/template/en/default/global/setting-descs.none.tmpl b/template/en/default/global/setting-descs.none.tmpl index 6e3358782..ac99094c5 100644 --- a/template/en/default/global/setting-descs.none.tmpl +++ b/template/en/default/global/setting-descs.none.tmpl @@ -44,7 +44,8 @@ "requestee_cc" => "Automatically add me to the CC list of $terms.bugs I am requested to review", "bugmail_new_prefix" => "Add 'New:' to subject line of email sent when a new $terms.bug is filed", "possible_duplicates" => "Display possible duplicates when reporting a new $terms.bug", - } + "use_markdown" => "Enable Markdown support for $terms.comments" + } %] [% Hook.process('settings') %] diff --git a/template/en/default/pages/linked.html.tmpl b/template/en/default/pages/linked.html.tmpl index 3fcf87952..ab74470c2 100644 --- a/template/en/default/pages/linked.html.tmpl +++ b/template/en/default/pages/linked.html.tmpl @@ -18,7 +18,7 @@ <p> <pre class="bz_comment_text"> -[%- cgi.param("text") FILTER quoteUrls FILTER html -%] +[%- cgi.param("text") FILTER markdown FILTER html -%] </pre> </p> @@ -33,7 +33,7 @@ <p> <pre class="bz_comment_text"> -[%- cgi.param("text") FILTER quoteUrls -%] +[%- cgi.param("text") FILTER markdown -%] </pre> </p> diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index 7ac013feb..dc6a52fe6 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -102,6 +102,7 @@ END feature_xmlrpc => 'XML-RPC Interface', feature_detect_charset => 'Automatic charset detection for text attachments', feature_typesniffer => 'Sniff MIME type of attachments', + feature_markdown => 'Markdown syntax support for comments', file_remove => 'Removing ##name##...', file_rename => 'Renaming ##from## to ##to##...', |