Source

AnnouncerPlugin / announcer / templates / prefs_announcer_manage_subscriptions.html

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude" 
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      i18n:domain="announcer">
  <xi:include href="prefs.html" />
  <head>
    <title>Announcements</title>
  </head>
  <body>
    <p>
      Announcements serve as a method for Trac to communicate events to you; 
      the creation of a ticket, the change of a Wiki page, and so on. Under
      the Announcement system, you will only receive notifications to those
      topics that you subscribe to.
    </p>
    <div class="announcer_preference_box">
      <div py:for="distributor, rules in data['rules'].iteritems()" class="ruleset">
          <div class="announcer_preference_title">
              ${distributor} rules
          </div>
          <div class="announcer_preference_options">
              Custom Rules:
              <py:if test="rules">
                  <div>
                      Format:
                      <select name="format-${distributor}">
                          <option py:for="f in data['formatters']" value="${f}" selected="${(f == data['selected_format'][distributor]) or None}">${f}</option>
                      </select><button type="submit" name="method" value="set-format_${distributor}">Save</button>
                  </div>
                  <div>
                      <ul>
                          <li py:for="rule in rules" class="rule">
                          ${rule['adverb']} ${rule['description']} <button type="submit" name="method" value="delete-rule_${rule['id']}">Delete</button><button type="submit" name="method" value="move-rule_${rule['id']}-${rule['priority']+1}">down</button><button type="submit" name="method" value="move-rule_${rule['id']}-${rule['priority']-1}">up</button></li>
                      </ul>
                  </div>
              </py:if>
              <div class="add_rule">
                  <div>
                      <select name="new-adverb-${distributor}">
                          <option py:for="a in data['adverbs']" value="${a}">${a}</option>
                      </select>
                      <select name="new-rule-${distributor}">
                          <option py:for="s in data['subscribers']" value="${s['class']}">${s['description']}</option>
                      </select><button type="submit" name="method" value="add-rule_${distributor}">Add</button>
                  </div>
              </div>
              <py:if test="data['default_rules'][distributor]">
                  <hr/>
                  <div>
                      Default Rules:
                      <p><em>The following rules have been configured by the system admistrator as the default rules.  Any rules defined by you will take higher priority then these rules.  This can be confusing if you don't understand how the system works.  Only the first matching rule is applied when system events occur.  For example, if you have a rule like "always notify me of any ticket changes" in your custom rules, and there is a default rule "never notify me when I update a ticket", then the always rule will take precedent and you will still recieve announcements on ticket changes, even when you are the updater.  In the preceding case, you would need to add your own "never notify me.." rule above the "always notify me.." to get the proper behavior.</em></p>
                      <ul>
                          <li py:for="rule in data['default_rules'][distributor]" class="default_rule">
                          ${rule['adverb']} ${rule['description']}</li>
                      </ul>
                  </div>
              </py:if>
          </div>
      </div>
    </div>
  </body>
</html>