From d0ec47a8a3a12e2a8702710a7b0810951ea606f8 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 11 Sep 2014 18:46:43 +0400 Subject: [PATCH] prefs/email.html.tmpl: code style --- .../en/default/account/prefs/email.html.tmpl | 215 +++++++++--------- 1 file changed, 102 insertions(+), 113 deletions(-) diff --git a/template/en/default/account/prefs/email.html.tmpl b/template/en/default/account/prefs/email.html.tmpl index 07c2e6827..8d0397330 100644 --- a/template/en/default/account/prefs/email.html.tmpl +++ b/template/en/default/account/prefs/email.html.tmpl @@ -63,7 +63,7 @@ document.write(' [% prefname = "email-$constants.REL_ANY-$constants.EVT_FLAG_REQUESTED" %] - + -
[% prefname = "email-$constants.REL_ANY-$constants.EVT_REQUESTED_FLAG" %] - + -
[% IF user.is_global_watcher %] - You are watching all [% terms.bugs %]. To be removed from this role, - contact + You are watching all [% terms.bugs %]. To be removed from this role, contact [% Param("maintainer") %]. [% END %] -
+
Field/recipient specific options: -
-
+ +

[% events = [ - { id = constants.EVT_ADDED_REMOVED, - description = "I'm added to or removed from this capacity" }, - { id = constants.EVT_BUG_CREATED, - description = "A new $terms.bug is created" }, - { id = constants.EVT_OPENED_CLOSED, - description = "The $terms.bug is resolved or reopened" }, - { id = constants.EVT_PROJ_MANAGEMENT, - description = "The priority, status, severity, or milestone changes" }, - { id = constants.EVT_COMMENT, - description = "New comments are added" }, - { id = constants.EVT_ATTACHMENT, - description = "New attachments are added" }, - { id = constants.EVT_ATTACHMENT_DATA, - description = "Some attachment data changes" }, - { id = constants.EVT_KEYWORD, - description = "The keywords field changes" }, - { id = constants.EVT_CC, - description = "The CC field changes" }, - { id = constants.EVT_DEPEND_BLOCK, - description = "The dependency tree changes" }, - { id = constants.EVT_OTHER, - description = "Any field not mentioned above changes" }, - { id = constants.EVT_DEPEND_REOPEN, - description = "A blocking bug is reopened or closed" }, + { id = constants.EVT_ADDED_REMOVED, + description = "I'm added to or removed from this capacity" }, + { id = constants.EVT_BUG_CREATED, + description = "A new $terms.bug is created" }, + { id = constants.EVT_OPENED_CLOSED, + description = "The $terms.bug is resolved or reopened" }, + { id = constants.EVT_PROJ_MANAGEMENT, + description = "The priority, status, severity, or milestone changes" }, + { id = constants.EVT_COMMENT, + description = "New comments are added" }, + { id = constants.EVT_ATTACHMENT, + description = "New attachments are added" }, + { id = constants.EVT_ATTACHMENT_DATA, + description = "Some attachment data changes" }, + { id = constants.EVT_KEYWORD, + description = "The keywords field changes" }, + { id = constants.EVT_CC, + description = "The CC field changes" }, + { id = constants.EVT_DEPEND_BLOCK, + description = "The dependency tree changes" }, + { id = constants.EVT_OTHER, + description = "Any field not mentioned above changes" }, + { id = constants.EVT_DEPEND_REOPEN, + description = "A blocking bug is reopened or closed" }, ] %] [% neg_events = [ - { id = constants.EVT_UNCONFIRMED, - description = "The $terms.bug is in the unconfirmed state" }, - { id = constants.EVT_CHANGED_BY_ME, - description = "The change was made by me" }, + { id = constants.EVT_UNCONFIRMED, + description = "The $terms.bug is in the unconfirmed state" }, + { id = constants.EVT_CHANGED_BY_ME, + description = "The change was made by me" }, ] %] [% relationships = [ - { id = constants.REL_ASSIGNEE, - description = "Assignee" }, - { id = constants.REL_QA, - description = "QA Contact" }, - { id = constants.REL_REPORTER, - description = "Reporter" }, - { id = constants.REL_CC, - description = "CCed" }, - { id = constants.REL_VOTER, - description = "Voter" }, + { id = constants.REL_ASSIGNEE, + description = "Assignee" }, + { id = constants.REL_QA, + description = "QA Contact" }, + { id = constants.REL_REPORTER, + description = "Reporter" }, + { id = constants.REL_CC, + description = "CCed" }, + { id = constants.REL_VOTER, + description = "Voter" }, ] %] - @@ -175,95 +167,89 @@ document.write(' - [% relationship.description FILTER html %] + [% relationship.description | html %] [% END %] - - [% FOREACH event = events %] + + [% FOREACH event = events %] [% count = loop.count() %] [% FOREACH relationship = relationships %] [% NEXT IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] + (relationship.id == constants.REL_VOTER AND NOT usevotes) %] [% END %] [% END %] - + - + - [% FOREACH event = neg_events %] + [% FOREACH event = neg_events %] [% count = loop.count() %] [% FOREACH relationship = relationships %] [% NEXT IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR (relationship.id == constants.REL_VOTER AND NOT usevotes) %] [% END %] [% END %] - +
When my relationship to this [% terms.bug %] is:
- + [% END %] /> - [% event.description FILTER html %] + [% event.description | html %]
-   -   but not when (overrides above):
- + [% " checked" IF NOT mail.${relationship.id}.${event.id} %] /> - [% event.description FILTER html %] + [% event.description | html %]
[%# Add hidden form fields for fields not used %] -[% FOREACH event = events %] +[% FOREACH event = events %] [% FOREACH relationship = relationships %] [% IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] - + value="[% mail.${relationship.id}.${event.id} ? "1" : "0" %]" /> [% END %] [% END %] [% END %] -[% FOREACH event = neg_events %] +[% FOREACH event = neg_events %] [% FOREACH relationship = relationships %] [% IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] - + value="[% mail.${relationship.id}.${event.id} ? "0" : "1" %]" /> [% END %] [% END %] [% END %] -
+
User Watching

@@ -273,48 +259,51 @@ preferences for their relationship to the [% terms.bug %] (e.g. Assignee).

-
+

[% IF watchedusers.size %] -You are watching everyone in the following list: -

-

-
- - + You are watching everyone in the following list: +

+

+
+ + [% ELSE %] -You are currently not watching any users. + You are currently not watching any users. [% END %]

-

Add users to my watch list (comma separated list): +

+ Add users to my watch list (comma separated list):


-

Users watching you:
+

+ Users watching you:
[% IF watchers.size %] -

-

- + [% FOREACH w = watchers %] + [% END %] -
- - +
+ + [% ELSE %] - No one + No one [% END %]

-

Add users to watch me (comma separated list): +

+ Add users to watch me (comma separated list):