~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/templates/bugcomment-macros.pt

  • Committer: Graham Binns
  • Date: 2011-09-07 11:26:19 UTC
  • mto: This revision was merged to the branch mainline in revision 13914.
  • Revision ID: graham@canonical.com-20110907112619-ksanxjjowbhnxjhj
The comments form will now be displayed when all comments have finished loading.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
  xmlns:metal="http://xml.zope.org/namespaces/metal"
52
52
  metal:define-macro="break">
53
53
  <div id="comments-container"></div>
54
 
  <div class="boardComment" style="border-bottom: 0"
55
 
    id="comments-hidden-message">
 
54
  <div class="boardComment comments-hidden-message" style="border-bottom: 0">
56
55
    <div class="boardCommentDetails">
57
56
      <table>
58
57
        <tbody>
82
81
  </div>
83
82
</div>
84
83
 
 
84
<div
 
85
  xmlns:tal="http://xml.zope.org/namespaces/tal"
 
86
  xmlns:metal="http://xml.zope.org/namespaces/metal"
 
87
  metal:define-macro="comment-form">
 
88
  <div tal:define="comment_form nocall:context/@@+addcomment-form;
 
89
       dummy comment_form/initialize" id="add-comment-form">
 
90
    <div tal:condition="context/bug/duplicateof"
 
91
        class="warning message"
 
92
        id="warning-comment-on-duplicate">
 
93
      Remember, this bug report is a duplicate of
 
94
      <a  tal:define="duplicateof context/bug/duplicateof"
 
95
          tal:condition="duplicateof/required:launchpad.View"
 
96
          tal:attributes="href duplicateof/fmt:url; title
 
97
             duplicateof/title; style string:margin-right: 4px;
 
98
             id string:duplicate-of-warning-link;"
 
99
          tal:content="string:bug #${duplicateof/id}."
 
100
      >bug #42</a>
 
101
      <span
 
102
          tal:define="duplicateof context/bug/duplicateof"
 
103
          tal:condition="not:duplicateof/required:launchpad.View"
 
104
          tal:replace="string: a private bug." />
 
105
      Comment here only if you think the duplicate status is wrong.
 
106
    </div>
 
107
    <h2>Add comment</h2>
 
108
    <form action="+addcomment"
 
109
          method="post"
 
110
          enctype="multipart/form-data"
 
111
          accept-charset="UTF-8">
 
112
      <tal:comment-input
 
113
          replace="structure comment_form/widgets/comment" />
 
114
      <div class="actions"
 
115
          tal:content="structure
 
116
          comment_form/actions/field.actions.save/render" />
 
117
    </form>
 
118
    <script type="text/javascript">
 
119
      LPS.use('lp.app.comment', function(Y) {
 
120
          var comment = new Y.lp.app.comment.Comment();
 
121
          comment.render();
 
122
      });
 
123
    </script>
 
124
  </div>
 
125
  <tal:attachment-link
 
126
      define="add_attachment_link context_menu/addcomment"
 
127
      replace="structure add_attachment_link/render" />
 
128
  </div>
85
129
</tal:root>