summaryrefslogtreecommitdiffstats
path: root/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
blob: 36a8db6f24ada9011511730cf866747fce33c92c (plain)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[% PROCESS global/variables.none.tmpl %]

[% PROCESS global/header.html.tmpl
  title = "My Dashboard"
  generate_api_token = 1
  style_urls = [ "skins/yui3.css",
                 "extensions/MyDashboard/web/styles/mydashboard.css",
                 "extensions/ProdCompSearch/web/styles/prod_comp_search.css" ]
  javascript_urls = [ "js/yui3.js",
                      "extensions/MyDashboard/web/js/query.js",
                      "extensions/MyDashboard/web/js/flags.js",
                      "extensions/ProdCompSearch/web/js/prod_comp_search.js",
                      "js/bug.js" ]
%]

[% standard_queries = [] %]
[% saved_queries    = [] %]
[% FOREACH q = queries %]
  [% standard_queries.push(q) IF !q.saved %]
  [% saved_queries.push(q) IF q.saved %]
[% END %]

<script id="last-changes-stub" type="text/x-handlebars-template">
  <div id="last_changes_stub_{{bug_id}}">Loading...</div>
</script>
<script id="last-changes-template" type="text/x-handlebars-template">
  <div id="last_changes_{{bug_id}}">
    {{#if email}}
      <div id="last_changes_header">
        Last Changes :: {{email}} :: {{when}}
      </div>
      {{#if activity}}
        <table id="activity">
        {{#each activity}}
          <tr>
            <td class="field_label">{{field_desc}}:</td>
            <td class="field_data">
              {{#if removed}}
                {{#unless added}}
                  Removed: 
                {{/unless}}
                {{removed}}
              {{/if}}
              {{#if added}}
                {{#if removed}}
                  &rarr;
                {{/if}}
              {{/if}}
              {{#if added}}
                {{#unless removed}}
                  Added:
                {{/unless}}
                {{added}}
              {{/if}}
            </td>
          </tr>
        {{/each}}
        </table>
      {{/if}}
      {{#if comment}}
        <pre class='bz_comment_text'>{{comment}}</pre>
      {{/if}}
    {{else}}
      This is a new [% terms.bug %] and no changes have been made yet.
    {{/if}}
  </div>
</script>

<script [% script_nonce FILTER none %]>
  [% IF Param('splinter_base') %]
    MyDashboard.splinter_base = '[% Bugzilla.splinter_review_base FILTER js %]';
  [% END %]
</script>

<div id="mydashboard">
  <div class="yui3-skin-sam">
    <div id="left">
      <div id="query_list_container">
        Choose query:
        <select id="query" name="query">
          <optgroup id="standard_queries" label="Standard">
            [% FOREACH r = standard_queries %]
              <option value="[% r.name FILTER html %]">[% r.heading || r.name FILTER html %]</option>
            [% END%]
          </optgroup>
          <optgroup id="saved_queries" label="Saved">
            [% FOREACH r = saved_queries %]
              <option value="[% r.name FILTER html %]">[% r.heading || r.name FILTER html %]</option>
            [% END %]
          </optgroup>
        </select>
        <small>
          (<a href="userprefs.cgi?tab=saved-searches">add or remove saved searches</a>)
        </small>
      </div>

      <div id="query_container">
        <div class="query_heading"></div>
        <div class="query_description"></div>
        <span id="query_count_refresh" class="bz_default_hidden">
          <span class="items_found" id="query_bugs_found">0 [% terms.bugs %] found</span>
          | <a class="refresh"     href="javascript:void(0);" id="query_refresh">Refresh</a>
          <span id="bar_markread">|</span> <a class="markread" href="javascript:void(0);" id="query_markread">none</a>
            <span class="markread bz_default_hidden" id="query_markread_text">none</span>
          | <a class="buglist"     href="javascript:void(0);" id="query_buglist">Buglist</a>
        </span>
        <div id="query_pagination_top"></div>
        <div id="query_table"></div>
      </div>
    </div>

    <div id="right">
      <div id="prod_comp_search_main">
        [% PROCESS prodcompsearch/form.html.tmpl
           input_label = "File a $terms.Bug:"
           script_name = "enter_bug.cgi"
           new_tab     = 1
        %]
      </div>

      <div id="requestee_container"> 
        <div class="query_heading">
          Flags Requested of You
        </div>
        <span id="requestee_count_refresh" class="bz_default_hidden">
          <span class="items_found" id="requestee_flags_found">0 flags found</span>
          | <a class="refresh" href="javascript:void(0);" id="requestee_refresh">Refresh</a>
          | <a class="buglist" href="javascript:void(0);" id="requestee_buglist">Buglist</a>
        </span>
        <div id="requestee_table"></div>
      </div>

      <div id="requester_container">
        <div class="query_heading">
          Flags You Have Requested
        </div>
        <span id="requester_count_refresh" class="bz_default_hidden">
          <span class="items_found" id="requester_flags_found">0 flags found</span>
          | <a class="refresh" href="javascript:void(0);" id="requester_refresh">Refresh</a>
          | <a class="buglist" href="javascript:void(0);" id="requester_buglist">Buglist</a>
        </span>
        <div id="requester_table"></div>
      </div>
    </div>
    <div style="clear:both;"></div>
    [% IF user.showmybugslink OR user.queries.size OR user.queries_subscribed.size %]
      <hr>
      <section id="saved_searches_container">
        <header>
          <h2 class="query_heading">Saved Searches</h2>
          <a href="userprefs.cgi?tab=saved-searches">Edit</a>
        </header>
        <ul>
          [% IF user.showmybugslink %][% filtered_username = user.login FILTER uri %]
            <li><a href="[% Param('mybugstemplate').replace('%userid%', filtered_username) %]">
                My [% terms.Bugs %]</a></li>
          [% END %]
          [% FOREACH q = user.queries %][% IF q.link_in_footer %]
            <li><a href="buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% q.name FILTER uri %]">
                [% q.name FILTER html %]</a></li>
          [% END %][% END %]
          [% FOREACH q = user.queries_subscribed %]
            <li><a href="buglist.cgi?cmdtype=dorem&amp;remaction=run&amp;namedcmd=
                [% q.name FILTER uri %]&amp;sharer_id=[% q.user.id FILTER uri %]"
                title="Shared by [% q.user.identity FILTER html %]">[% q.name FILTER html FILTER no_break %]</a></li>
          [% END %]
        </ul>
      </section>
    [% END %]
  </div>
</div>

[% PROCESS global/footer.html.tmpl %]