summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
blob: b42a9d797113080ab9c30a013c6154733cc21f73 (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
182
183
184
185
186
187
188
189
190
191
192
193
194
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the BMO Extension
  #
  # The Initial Developer of the Original Code is the Mozilla Foundation
  # Portions created by the Initial Developers are Copyright (C) 2011 the
  # Initial Developer. All Rights Reserved.
  #
  # Contributor(s):
  #   Byron Jones <bjones@mozilla.com>
  #%]

[% IF who %]
[%   who_title = ' (' _ who _ ')' %]
[% ELSE %]
[%   who_title = '' %]
[% END %]

[% INCLUDE global/header.html.tmpl
  title = "User Activity Report" _ who_title
  yui = [ 'autocomplete', 'calendar' ]
  javascript_urls = [ "js/util.js", "js/field.js" ]
%]

<style>
#report tr:hover {
  background: #dddddd;
}

#report-header {
  background: #dddddd;
}
</style>

[% PROCESS "global/field-descs.none.tmpl" %]
[% PROCESS bug/time.html.tmpl %]

<form id="activity_form" name="activity_form" action="page.cgi" method="get">
<input type="hidden" name="id" value="user_activity.html">
<input type="hidden" name="action" value="run">
<table>
<tr>
  <td>
    <b>Who</b>:
  </td>
  <td>
    [% INCLUDE global/userselect.html.tmpl
       id => "who"
       name => "who"
       value => who
       size => 40
       emptyok => 0
       title => "One or more email address (comma delimited)"
    %]
    &nbsp;
  </td>
  <td>
    <b>Period</b>:
  </td>
  <td>
    <input type="text" id="from" name="from" size="11"
      align="right" value="[% from FILTER html %]" maxlength="10"
      onchange="updateCalendarFromField(this)">
    <button type="button" class="calendar_button" id="button_calendar_from"
      onclick="showCalendar('from')"><span>Calendar</span>
    </button>
    <div id="con_calendar_from"></div>
  </td>
  <td>
    -
  </td>
  <td>
    <input type="text" name="to" size="11" id="to"
      align="right" value ="[% to FILTER html %]" maxlength="10"
      onchange="updateCalendarFromField(this)">
    <button type="button" class="calendar_button" id="button_calendar_to"
      onclick="showCalendar('to')"><span>Calendar</span>
    </button>
    <div id="con_calendar_to"></div>
  </td>
  <td>
    <input type="submit" id="run" value="Generate Report">
  </td>
</tr>
</table>
</form>

<script type="text/javascript">
  createCalendar('from');
  createCalendar('to');
</script>

[% IF action == 'run' %]

[% IF incomplete_data %]
  <p>
    There used to be an issue in <a href="http://www.bugzilla.org/">Bugzilla</a>
    which caused activity data to be lost if there were a large number of cc's
    or dependencies.  That has been fixed, but some data was already lost in
    your activity table that could not be regenerated.  The changes that 
    could not reliably determine are prefixed by '?'.
  </p>
[% END %]

[% IF operations.size > 0 %]
  <br>
  <table border="1" cellpadding="4" cellspacing="0" id="report">
    <tr id="report-header">
      [% IF who_count > 1 %]
        <th>Who</th>
      [% END %]
      <th>When</th>
      <th>[% terms.Bug %]</th>
      <th>What</th>
      <th>Removed</th>
      <th>Added</th>
    </tr>

    [% FOREACH operation = operations %]
      <tr>
        [% IF who_count > 1 %]
          <td rowspan="[% operation.changes.size %]" valign="top">
            [% operation.who FILTER email FILTER html %]
          </td>
        [% END %]
        <td rowspan="[% operation.changes.size %]" valign="top">
          [% operation.when FILTER time FILTER no_break %]
        </td>
        <td rowspan="[% operation.changes.size %]" valign="top">
          [% operation.bug FILTER bug_link(operation.bug) FILTER none %]
        </td>
        [% FOREACH change = operation.changes %]
          [% "</tr><tr>" IF loop.index > 0 %]
            <td>
              [% IF change.attachid %]
                <a href="attachment.cgi?id=[% change.attachid FILTER uri %]"
                   title="[% change.attach.description FILTER html %]
                          [%- %] - [% change.attach.filename FILTER html %]"
                >Attachment #[% change.attachid FILTER html %]</a>
              [% END %]
              [%IF change.comment.defined && change.fieldname == 'longdesc' %]
                 [% "Comment $change.comment.count" FILTER bug_link(operation.bug, comment_num => change.comment.count) FILTER none %]
              [% ELSE %]
                [%+ field_descs.${change.fieldname} FILTER html %]
              [% END %]
            </td>
            [% PROCESS change_column change_type = change.removed %]
            [% PROCESS change_column change_type = change.added %]
        [% END %]
      </tr>
    [% END %]
  </table>
[% ELSE %]
  <p>
    No changes.
  </p>
[% END %]

[% BLOCK change_column %]
  <td>
    [% IF change_type.defined %]
      [% IF change.fieldname == 'estimated_time' ||
            change.fieldname == 'remaining_time' ||
            change.fieldname == 'work_time' %]
        [% PROCESS formattimeunit time_unit=change_type %]
      [% ELSIF change.fieldname == 'blocked' ||
               change.fieldname == 'dependson' %]
        [% change_type FILTER bug_list_link FILTER none %]
      [% ELSIF change.fieldname == 'assigned_to' ||
               change.fieldname == 'reporter' ||
               change.fieldname == 'qa_contact' ||
               change.fieldname == 'cc' ||
               change.fieldname == 'flagtypes.name' %]
        [% display_value(change.fieldname, change_type) FILTER email FILTER html %]
      [% ELSE %]
        [% display_value(change.fieldname, change_type) FILTER html %]
      [% END %]
    [% ELSE %]
      &nbsp;
    [% END %]
  </td>
[% END %]
[% END %]


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