~launchpad-pqm/launchpad/devel

13161.2.5 by Ian Booth
Further split up subscriptions portal into separate templates
1
<tal:root
2
  xmlns:tal="http://xml.zope.org/namespaces/tal"
3
  xmlns:metal="http://xml.zope.org/namespaces/metal"
4
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5
  omit-tag="">
6
  <tal:comment replace="nothing">
7
    This is messy, but the portlet has to convey both subscribers and
8
    whether or not they are essential. Also, in the case where a person
9
    can say if the subscription is essential, that subscription
10
    essentiality indicator needs to be clickable to edit, otherwise not.
11
    Hence all the duplication.
12
  </tal:comment>
13161.2.9 by Ian Booth
Add class attribute to subscriber row
13
  <div tal:define="subscription view/subscription"
14
       tal:attributes="id string:subscription-${subscription/css_name};
15
                        class string:${subscription/css_name} subscriber">
13161.2.5 by Ian Booth
Further split up subscriptions portal into separate templates
16
    <a tal:condition="subscription/required:launchpad.Edit"
17
       tal:attributes="href subscription/fmt:url">
18
        <img
19
          tal:condition="subscription/essential"
20
          alt="(essential)"
21
          src="/@@/subscriber-essential"
22
          title="Has asked to take part in all discussions of this blueprint."
23
        />
24
        <img
25
          tal:condition="not: subscription/essential"
26
          alt=""
27
          src="/@@/subscriber-inessential"
28
          title="Normal subscriber."
29
        />
30
    </a>
31
    <tal:no_edit condition="not: subscription/required:launchpad.Edit">
32
       <img tal:condition="subscription/essential"
33
         src="/@@/subscriber-essential" />
34
       <img tal:condition="not: subscription/essential"
35
         src="/@@/subscriber-inessential" />
36
    </tal:no_edit>
37
    <a tal:attributes="href subscription/person/fmt:url:blueprints"
38
       tal:content="subscription/person/fmt:displayname"
39
    />
40
    <a tal:define="user request/lp:person"
41
       tal:condition="python: subscription.canBeUnsubscribedByUser(user)"
42
       tal:attributes="
43
         title string:Unsubscribe ${subscription/person/fmt:displayname};
13161.2.14 by Ian Booth
Remove old blueprint form code
44
         id string:unsubscribe-${subscription/css_name};
45
         href string:${subscription/fmt:url}/+unsubscribe;"
13161.2.5 by Ian Booth
Further split up subscriptions portal into separate templates
46
    >
47
      <img class="unsub-icon" src="/@@/remove" alt="Remove"
13161.2.8 by Ian Booth
Fix html ids
48
        tal:attributes="id string:unsubscribe-icon-${subscription/css_name}" />
13161.2.5 by Ian Booth
Further split up subscriptions portal into separate templates
49
    </a>
50
  </div>
51
</tal:root>