~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
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
<div
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal"
  tal:define="comment context;
              remote_bug_comment_class
              python: comment.bugwatch and 'remoteBugComment' or '';
              admin_comment_hidden_class
              python: comment.show_for_admin and 'adminHiddenComment' or ''"
  tal:attributes="class string:boardComment ${remote_bug_comment_class}
                 ${admin_comment_hidden_class}"
  tal:content="cache:authenticated noparam,comment/rendered_cache_time,comment/index">

  <div class="boardCommentDetails">
    <table>
      <tbody>
        <tr>
          <td tal:condition="not: comment/bugwatch">
            <tal:comment_owner
                replace="structure comment/owner/fmt:link-display-name-id" />
            wrote
            <span tal:attributes="title comment/datecreated/fmt:datetime"
                  tal:content="comment/datecreated/fmt:displaydate">
              7 minutes ago
              </span>:
              <a tal:attributes="href comment/fmt:url"
                 tal:condition="comment/display_title">
                <strong tal:content="comment/title" />
              </a>
          </td>
          <td tal:condition="comment/bugwatch">
            <img width="14" height="14" src="/@@/bug-remote" alt=""/>
            In
            <a tal:attributes="href comment/bugwatch/url"
               tal:content="comment/bugwatch/title" />,
            <tal:comment_owner
                replace="structure comment/owner/fmt:link-display-name-id" />
            wrote
            <span tal:attributes="title comment/datecreated/fmt:datetime"
                  tal:content="comment/datecreated/fmt:displaydate">
              7 minutes ago
              </span>:
              <a tal:attributes="href comment/fmt:url">
                <strong tal:condition="comment/display_title"
                        tal:content="comment/title" />
              </a>
          </td>
          <td class="bug-comment-index">
            <a tal:attributes="href comment/fmt:url"
               tal:content="string: #${comment/index}" />
          </td>
        </tr>
      </tbody>
    </table>
  </div>

  <div class="boardCommentBody">
    <ul tal:condition="comment/bugattachments" style="margin-bottom: 1em">
      <li tal:repeat="attachment comment/bugattachments"
            class="download-attachment">
        <a tal:attributes="href python: view.proxiedUrlOfLibraryFileAlias(attachment)"
            tal:content="attachment/title"
            class="sprite download-icon">foo.txt</a>
        <a tal:attributes="href attachment/fmt:url" alt="edit" class="sprite edit"></a>
        (<span
           tal:replace="attachment/libraryfile/content/filesize/fmt:bytes" />,
        <span tal:replace="attachment/libraryfile/mimetype" />)
      </li>
    </ul>

    <ul tal:condition="comment/patches" style="margin-bottom: 1em">
      <li tal:repeat="attachment comment/patches" class="download-attachment">
        <a tal:attributes="href python: view.proxiedUrlOfLibraryFileAlias(attachment)"
           tal:content="attachment/title" class="sprite haspatch-icon">foo.txt</a>
        <a tal:attributes="href attachment/fmt:url" alt="edit" class="sprite edit"></a>
        (<span
           tal:replace="attachment/libraryfile/content/filesize/fmt:bytes" />,
        <span tal:replace="attachment/libraryfile/mimetype" />)
      </li>
    </ul>

    <div class="bug-comment"
      tal:content="structure
        comment/text_for_display/fmt:obfuscate-email/fmt:email-to-html">
      Comment text.
    </div>
    <p tal:condition="comment/was_truncated">
      <a tal:attributes="href comment/fmt:url">Read more...</a>
    </p>
  </div>
  <div class="boardCommentFooter" tal:condition="comment/show_footer">
    <a tal:attributes="id string:mark-spam-${context/index};"
       tal:condition="view/show_spam_controls"
       class="js-action sprite edit mark-spam" href="#">
       <tal:not-spam condition="not: context/visible"
       >Unhide comment</tal:not-spam>
       <tal:spam condition="context/visible"
       >Hide comment</tal:spam>
    </a>
    <tal:activity
        define="activity_list comment/activity"
        condition="comment/activity">
      <metal:activity-table
          metal:use-macro="context/@@bugcomment-macros/activity-table" />
    </tal:activity>
    <tal:bugwatch-footer condition="comment/bugwatch">
      <div>
        <table style="width: 100%">
          <tr>
            <td style="text-align: left; vertical-align: middle">
              <tal:reply-link condition="view/user">
                <a tal:attributes="id string:remote_comment_reply_expand_link_${comment/index};
                                   href comment/fmt:url"
                   href="#">
                  <img tal:attributes="id string:remote_comment_reply_tree_icon_${comment/index};
                                       src python: '/@@/tree' + (view.expand_reply_box and 'Expanded' or 'Collapsed')"
                       class="collapseIcon" height="14" width="14" />
                  Reply on <tal:bugtracker replace="comment/bugwatch/bugtracker/title"/>
                </a>
              </tal:reply-link>
            </td>
            <td style="text-align: right; vertical-align: middle">
              <tal:sync-state condition="not: comment/synchronized">
                <img height="14" width="14" src="/@@/bug-remote-comment-synchronizing" />
                Awaiting synchronization
              </tal:sync-state>
            </td>
          </tr>
          <tr tal:condition="view/user">
            <td colspan="2">
              <div tal:attributes="id string:remote_comment_reply_div_${comment/index};
                                   style python: 'display: ' + (view.expand_reply_box and 'block' or 'none')">
                <form tal:attributes="action comment/add_comment_url"
                      name="launchpadform" method="post"
                      enctype="multipart/form-data"
                      accept-charset="UTF-8">
                  <input type="hidden" name="field.bugwatch_id"
                         tal:attributes="value comment/bugwatch/id" />
                  <input type="hidden" name="field.subject"
                         tal:attributes="value comment/bugtask/bug/followup_subject" />
                  <textarea id="field.comment" name="field.comment" rows="10" cols="60"></textarea>
                  <br />
                  <div class="actions">
                    <table style="width: 100%">
                      <tr>
                        <td style="vertical-align: middle">
                          <input type="submit" id="field.actions.save"
                                 name="field.actions.save" value="Save Changes" class="button" />
                        </td>
                        <td style="text-align: right; vertical-align: middle">
                          Your comment will be sent to <a tal:replace="structure comment/bugwatch/fmt:external-link" />
                        </td>
                      </tr>
                    </table>
                  </div>
                </form>
              </div>
            </td>
          </tr>
        </table>
      </div>
      <script type="text/javascript"
              tal:condition="view/user"
              tal:content="string:connectRemoteCommentReply(${comment/index});" />
    </tal:bugwatch-footer>
  </div>
</div>