comparison rhodecode/templates/pullrequests/pullrequest_show.html @ 2608:58c529332e7e beta

Added option to close pull requests, in future that will be close & merge
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 15 Jul 2012 03:14:58 +0200
parents 79818f546538
children 3f50a5e8fc4d
comparison
equal deleted inserted replaced
2607:7ae36df760ce 2608:58c529332e7e
17 <div class="box"> 17 <div class="box">
18 <!-- box / title --> 18 <!-- box / title -->
19 <div class="title"> 19 <div class="title">
20 ${self.breadcrumbs()} 20 ${self.breadcrumbs()}
21 </div> 21 </div>
22 22 %if c.pull_request.is_closed():
23 <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))}</div>
24 %endif
23 <h3>${_('Title')}: ${c.pull_request.title} 25 <h3>${_('Title')}: ${c.pull_request.title}
24 <div class="changeset-status-container" style="float:none"> 26 <div class="changeset-status-container" style="float:none">
25 %if c.current_changeset_status: 27 %if c.current_changeset_status:
26 <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div> 28 <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div>
27 <div class="changeset-status-ico" style="padding:4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div> 29 <div class="changeset-status-ico" style="padding:4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>
28 %endif 30 %endif
29 </div> 31 </div>
30 </h3> 32 </h3>
31 <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div> 33 <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div>
32 <div style="padding:4px 4px 10px 20px"> 34 <div style="padding:4px 4px 10px 20px">
94 %endfor 96 %endfor
95 97
96 ## template for inline comment form 98 ## template for inline comment form
97 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> 99 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
98 ${comment.comment_inline_form()} 100 ${comment.comment_inline_form()}
99 101
100 ## render comments main comments form and it status 102 ## render comments and inlines
101 ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), 103 ${comment.generate_comments()}
102 c.current_changeset_status)} 104
103 105 % if not c.pull_request.is_closed():
106 ## main comment form and it status
107 ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name,
108 pull_request_id=c.pull_request.pull_request_id),
109 c.current_changeset_status,
110 close_btn=True)}
111 %endif
104 112
105 <script type="text/javascript"> 113 <script type="text/javascript">
106 YUE.onDOMReady(function(){ 114 YUE.onDOMReady(function(){
107 115
108 YUE.on(YUQ('.show-inline-comments'),'change',function(e){ 116 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
129 137
130 // inject comments into they proper positions 138 // inject comments into they proper positions
131 var file_comments = YUQ('.inline-comment-placeholder'); 139 var file_comments = YUQ('.inline-comment-placeholder');
132 renderInlineComments(file_comments); 140 renderInlineComments(file_comments);
133 }) 141 })
134
135 </script> 142 </script>
136
137 143
138 </div> 144 </div>
139 145
140 </%def> 146 </%def>