From 0215f11d5c734cb818ed7b988b8f73e745e45179 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 12 May 2015 21:35:45 +0800 Subject: Bug 1146770: implement comment preview --- .../template/en/default/bug_modal/edit.html.tmpl | 12 ++++---- .../en/default/bug_modal/new_comment.html.tmpl | 32 ++++++++++++++++++++-- 2 files changed, 36 insertions(+), 8 deletions(-) (limited to 'extensions/BugModal/template/en/default') diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl index dd673537c..67c94f499 100644 --- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl @@ -978,6 +978,13 @@ INCLUDE bug_modal/activity_stream.html.tmpl stream=bug.activity_stream; IF user.id; INCLUDE bug_modal/new_comment.html.tmpl; + ELSE; + %] +
+ You need to log in + before you can comment on or make changes to this [% terms.bug %]. +
+ [% END; %] @@ -1007,11 +1014,6 @@ -[% ELSE %] -
- You need to log in - before you can comment on or make changes to this [% terms.bug %]. -
[% END %] [%# === blocks === %] diff --git a/extensions/BugModal/template/en/default/bug_modal/new_comment.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/new_comment.html.tmpl index f6c3bb3fa..17bf38200 100644 --- a/extensions/BugModal/template/en/default/bug_modal/new_comment.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/new_comment.html.tmpl @@ -12,8 +12,15 @@ #%]
-
Add Comment:
- [% IF user.is_insider && bug.check_can_change_field('longdesc', 0, 1) %] + + [% IF !bug.check_can_change_field('longdesc', 0, 1) %] +
+ You are not allowed to make an additional comment on this [% terms.bug %]. +
+ [% RETURN %] + [% END %] + + [% IF user.is_insider %]
@@ -22,7 +29,26 @@
[% END %] - + + + +
+ +
+ +
+
[% Hook.process("after_comment_commit_button", 'bug/edit.html.tmpl') %] -- cgit v1.2.3-24-g4f1b