~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<tal:root
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal"
  omit-tag="">

<metal:block define-macro="also-in-ubuntu">
  <p id="also-in-ubuntu"
    tal:define="packages context/ubuntu_packages | nothing"
    tal:condition="packages">
    Ubuntu
    <tal:also condition="view/has_bugtracker">also</tal:also>
    tracks bugs for packages derived from this project:
    <tal:packages repeat="package packages">
      <span style="white-space: nowrap"
            tal:content="structure package/fmt:link" /><tal:comma
      condition="not:repeat/package/end">,</tal:comma></tal:packages>.
  </p>
</metal:block>


<metal:block define-macro="sortwidget">
  <tal:comment condition="nothing">
    This macro expects that the callsite's view class has a shouldShowTargetName
    method.
  </tal:comment>
  <select name="orderby" id="orderby" size="1"
          tal:define="orderby request/orderby|string:-importance">
    <option
      value="-importance"
      tal:attributes="selected python:orderby == '-importance'"
    >by importance</option>
    <option
      value="status"
      tal:attributes="selected python:orderby == 'status'"
    >by status</option>
    <option
      value="milestone"
      tal:attributes="selected python:orderby == 'milestone'"
    >by milestone</option>
    <option
      tal:condition="view/shouldShowTargetName|nothing"
      tal:attributes="selected python:orderby == 'targetname'"
      value="targetname"
    >by location</option>
    <option
      value="datecreated"
      tal:attributes="selected python:orderby == 'datecreated'"
    >oldest first</option>
    <option
      value="-datecreated"
      tal:attributes="selected python:orderby == '-datecreated'"
    >newest first</option>
    <option
      value="-date_last_updated"
      tal:attributes="selected python:orderby == '-date_last_updated'"
    >most recently changed</option>
    <option
      value="date_last_updated"
      tal:attributes="selected python:orderby == 'date_last_updated'"
    >not recently changed</option>
    <option
      value="-number_of_duplicates"
      tal:attributes="selected python:orderby == '-number_of_duplicates'"
    >by number of duplicates</option>
    <option
      value="-message_count"
      tal:attributes="selected python:orderby == '-message_count'"
    >by number of comments</option>
    <option
      value="-users_affected_count"
      tal:attributes="selected python:orderby == '-users_affected_count'"
    >by number of users affected</option>
    <option
      value="-heat"
      tal:attributes="selected python:orderby == '-heat'"
    >by bug heat</option>
  </select>
</metal:block>

<metal:block define-macro="simple-search-form">
<div id="bugs-search-form"
     tal:attributes="
         class python:
             'dynamic_bug_listing' if view.dynamic_bug_listing_enabled
                 else None;
            action search_url|string:">
  <form method="get" name="search" class="primary search"
        tal:attributes="
            class python:
                'primary search dynamic_bug_listing'
                    if view.dynamic_bug_listing_enabled
                    else 'primary search';
            action search_url|string:">
    <h3 tal:condition="view/dynamic_bug_listing_enabled"
        tal:content="view/search_macro_title">
      Search bugs in Ubuntu
    </h3>
    <p>
    <tal:searchbox replace="structure view/widgets/searchtext" />
    <tal:without_dynamic_bug_listing
        condition="not: view/dynamic_bug_listing_enabled">
        <metal:widget use-macro="context/@@+bugtarget-macros-search/sortwidget" />
    </tal:without_dynamic_bug_listing>
    <input type="submit" name="search" value="Search" />
    <tal:widget replace="structure view/widgets/status/hidden" />
    <tal:widget replace="structure view/widgets/importance/hidden" />
    <tal:widget replace="structure view/widgets/assignee/hidden" />
    <tal:widget replace="structure view/widgets/bug_reporter/hidden" />
    <tal:widget replace="structure view/widgets/milestone/hidden" />
    <tal:widget replace="structure view/widgets/omit_dupes/hidden" />
    <tal:widget replace="structure view/widgets/has_patch/hidden" />
    <tal:widget replace="structure view/widgets/component/hidden" />
    <tal:widget replace="structure view/widgets/has_no_package/hidden" />
    </p>
    <p>
    <a tal:attributes="href advanced_search_url|string:?advanced=1"
    >Advanced search</a>
    </p>

    <metal:also-in-ubuntu
      use-macro="context/@@+bugtarget-macros-search/also-in-ubuntu" />

    <p id="also-in-upstream"
      tal:define="product view/upstream_launchpad_project | nothing"
      tal:condition="product">
      <a tal:replace="structure product/fmt:link:bugs" /> also
      tracks bugs for this package.
    </p>

    <div metal:define-slot="extra-search-widgets">
    </div>
  </form>
</div>
<tal:comment condition="nothing">
  bugtarget-bugs.pt is the only template that uses this form in a page
  where the search field should be auto-focused. If another template
  ever falls into this category, the auto-focusing code should be moved
  here from bugtarget-bugs.pt, but made optional and off by default.
</tal:comment>
</metal:block>

</tal:root>