~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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<html
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal"
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
  metal:use-macro="view/macro:page/main_side"
  i18n:domain="launchpad"
>

<body>


<metal:block fill-slot="head_epilogue">
  <style type="text/css">
    .menu-link-set_commit_message {
    margin-top: 1em;
    }
    #code-review-votes {
      margin: 1em 0;
    }
    #add-comment-form {
      max-width: 60em;
      padding-bottom: 3em;
    }
    #add-comment-form textarea{
      width: 100%;
      max-width: inherit;
    }
    #add-comment-form .actions {
      float: right;
      margin: 0 -0.5em;
    }
    #add-comment-review-fields {
      margin-top: 1em;
    }
    #add-comment-review-fields div {
      display: inline;
    }
    #proposal-summary th {
      font-weight: bold;
      color: #717171;
    }
    #proposal-summary td {
      padding-left: 0.5em;
    }
    .related-bugs-list {
      padding-left: 20px;
      padding-bottom: 10px;
    }
  </style>
</metal:block>

<tal:registering metal:fill-slot="registering">
  Proposed by
  <tal:registrant replace="structure context/registrant/fmt:link"/>
  <tal:modified replace="context/date_created/fmt:displaydate" />
</tal:registering>


<metal:side fill-slot="side"
            tal:define="context_menu context/menu:context">

  <tal:menu replace="structure context/@@+global-actions" />
  <div tal:replace="structure context/@@+pagelet-subscribers" />
</metal:side>


<div metal:fill-slot="main"
     tal:define="menu context/menu:context">

  <div class="yui-g first">
    <tal:summary replace="structure context/@@+pagelet-summary" />
  </div>

  <div class="yui-g">
    <div id="votes-target"
         tal:content="structure context/@@+votes" />
  </div>

  <div class="yui-g" tal:condition="context/supersedes">
    <p id="superseded-proposal">
      This proposal supersedes a
      <a tal:attributes="href context/supersedes/fmt:url">
        proposal from
        <tal:when replace="context/supersedes/date_created/fmt:date" /></a>.
    </p>
  </div>
  <div class="yui-g" tal:condition="context/superseded_by">
    <p id="superseded-by">
      This proposal has been superseded by a
      <a tal:attributes="href context/superseded_by/fmt:url">
        proposal from
        <tal:when replace="context/superseded_by/date_created/fmt:date" /></a>.
    </p>
  </div>

  <div id="commit-message" class="yui-g">
    <div tal:define="link menu/set_commit_message"
         tal:condition="link/enabled"
         tal:content="structure link/render"
         tal:attributes="class view/edit_commit_message_link_class">
      Set commit message
    </div>
    <tal:widget replace="structure view/commit_message_html"/>
  </div>

  <div id="description" class="yui-g">
    <div tal:define="link menu/set_description"
         tal:condition="link/enabled"
         tal:content="structure link/render"
         tal:attributes="class view/edit_description_link_class">
      Set description
    </div>
    <tal:widget replace="structure view/description_html"/>
  </div>

  <div class="yui-g" tal:condition="view/has_bug_or_spec">
      <div id="related-bugs-and-blueprints" class="related-bugs-list"
        tal:define="branch context/source_branch">
        <div class="actions">
          <metal:bug-branch-links use-macro="branch/@@+macros/bug-branch-links"/>
        </div>
        <div class="actions">
          <metal:spec-branch-links use-macro="branch/@@+macros/spec-branch-links"/>
        </div>
      </div>
  </div>

  <div class="yui-g">
    <tal:not-logged-in condition="not: view/user">
      <div align="center" id="add-comment-login-first">
        To post a comment you must <a href="+login">log in</a>.
      </div>
    </tal:not-logged-in>

    <div tal:define="link menu/add_comment"
         tal:condition="link/enabled"
         tal:content="structure link/render">
         Add comment
    </div>

    <div id="conversation"
         tal:content="structure view/conversation/@@+render"/>
  </div>

  <tal:logged-in condition="view/user">
    <div tal:define="comment_form nocall:context/@@+comment;
                     dummy comment_form/initialize">
      <h2 id="add-comment">Add comment</h2>
      <form action="+comment"
            method="post"
            enctype="multipart/form-data"
            accept-charset="UTF-8"
            id="add-comment-form">
        <tal:comment-input replace="structure comment_form/widgets/comment"/>
        <div id="add-comment-review-fields">
            Review: <tal:review replace="structure comment_form/widgets/vote"/>
            Review type: <tal:review replace="structure comment_form/widgets/review_type"/>
            <div class="actions"
                 tal:content="structure comment_form/actions/field.actions.add/render" />
        </div>
      </form>
    </div>
  </tal:logged-in>

  <div class="yui-g">
    <div id="source-revisions"
         tal:condition="not: context/queue_status/enumvalue:MERGED">

      <tal:history-available condition="context/source_branch/revision_count"
                             define="branch context/source_branch;
                                     revisions view/unlanded_revisions">
        <h2>Unmerged revisions</h2>
        <metal:landing-target use-macro="branch/@@+macros/branch-revisions"/>
      </tal:history-available>
      <tal:remote-branch condition="context/source_branch/branch_type/enumvalue:REMOTE">
        <h2>Unmerged revisions</h2>
        <p>Recent revisions are not available due to the source branch being remote.</p>
      </tal:remote-branch>
    </div>
  </div>

  <div class="yui-g" tal:condition="view/pending_diff">
    <div class="pending-update" id="diff-pending-update">
      <h3>Updating diff...</h3>
      <p>
        An updated diff will be available in a few minutes.  Reload to see the
        changes.
      </p>
    </div>
  </div>
  <div id="review-diff" tal:condition="view/preview_diff">
    <h2>Preview Diff</h2>
    <div tal:replace="structure context/@@++diff"/>
  </div>

<tal:script
  replace="structure
  string:&lt;script id='codereview-script' type='text/javascript'&gt;" />
  conf = <tal:status-config replace="view/status_config" />
  <!--
  LPS.use('io-base', 'lp.code.branchmergeproposal.reviewcomment',
          'lp.code.branchmergeproposal.status', 'lp.app.comment', 
          'lp.app.widgets.expander', 'lp.code.branch.revisionexpander', function(Y) {

    Y.on('load', function() {
        var logged_in = LP.links['me'] !== undefined;

        if (logged_in) {
            var comment = new Y.lp.app.comment.CodeReviewComment();
            comment.render();

            if(Y.UA.ie) {
                return;
            }

            Y.lp.code.branchmergeproposal.status.connect_status(conf);
        }
        Y.lp.code.branchmergeproposal.reviewcomment.connect_links();
        (new Y.lp.code.branchmergeproposal.reviewcomment.NumberToggle()
            ).render();
      }, window);

    Y.on('domready', function() {
        Y.lp.app.widgets.expander.createByCSS(
            '.revision-group-diff',
            '.expander-icon',
            '.expander-content',
            false,
            Y.lp.code.branch.revisionexpander.bmp_diff_loader);
    });
  });
  -->
<tal:script replace="structure string:&lt;/script&gt;" />

</div>
</body>
</html>