annotate rhodecode/templates/pullrequests/pullrequest_show.html @ 2815:acc05c33cc0c beta

White space cleanup
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 06 Sep 2012 00:10:34 +0200
parents 0b2214604c74
children b1822f4a85ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 <%inherit file="/base/base.html"/>
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 <%def name="title()">
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 ${c.repo_name} ${_('Pull request #%s') % c.pull_request.pull_request_id}
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 </%def>
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 <%def name="breadcrumbs_links()">
2492
79818f546538 i18n 'Home' in breadcrumbs
Takumi IINO <trot.thunder@gmail.com>
parents: 2489
diff changeset
8 ${h.link_to(_(u'Home'),h.url('/'))}
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 &raquo;
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))}
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 &raquo;
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 ${_('Pull request #%s') % c.pull_request.pull_request_id}
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 </%def>
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 <%def name="main()">
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 <div class="box">
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 <!-- box / title -->
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 <div class="title">
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 ${self.breadcrumbs()}
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 </div>
2608
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
22 %if c.pull_request.is_closed():
2803
0b2214604c74 Fixed status of changesets in preview windows
Marcin Kuzminski <marcin@python-works.com>
parents: 2770
diff changeset
23 <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div>
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
24 %endif
2712
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
25 <h3>${_('Title')}: ${c.pull_request.title}</h3>
2815
acc05c33cc0c White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2803
diff changeset
26
2712
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
27 <div class="form">
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
28 <div id="summary" class="fields">
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
29 <div class="field">
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
30 <div class="label-summary">
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
31 <label>${_('Status')}:</label>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
32 </div>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
33 <div class="input">
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
34 <div class="changeset-status-container" style="float:none;clear:both">
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
35 %if c.current_changeset_status:
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
36 <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
37 <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
38 %endif
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
39 </div>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
40 </div>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
41 </div>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
42 <div class="field">
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
43 <div class="label-summary">
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
44 <label>${_('Still not reviewed by')}:</label>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
45 </div>
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
46 <div class="input">
2713
3cfcbac0718d show who's pending for review in tooltip
Marcin Kuzminski <marcin@python-works.com>
parents: 2712
diff changeset
47 <div class="tooltip" title="${h.tooltip(','.join([x.username for x in c.pull_request_pending_reviewers]))}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div>
2712
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
48 </div>
2815
acc05c33cc0c White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2803
diff changeset
49 </div>
2712
7224882c4059 new summary for opened pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2673
diff changeset
50 </div>
2815
acc05c33cc0c White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2803
diff changeset
51 </div>
2482
1fd3c043c025 small UI changes for pull-request view
Marcin Kuzminski <marcin@python-works.com>
parents: 2481
diff changeset
52 <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div>
1fd3c043c025 small UI changes for pull-request view
Marcin Kuzminski <marcin@python-works.com>
parents: 2481
diff changeset
53 <div style="padding:4px 4px 10px 20px">
1fd3c043c025 small UI changes for pull-request view
Marcin Kuzminski <marcin@python-works.com>
parents: 2481
diff changeset
54 <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div>
2440
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
55 </div>
2478
8eab81115660 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2443
diff changeset
56
2654
731e823d330e small ui fix for pull request page
Marcin Kuzminski <marcin@python-works.com>
parents: 2614
diff changeset
57 <div style="min-height:160px">
2481
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
58 ##DIFF
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
59 <div class="table" style="float:left;clear:none">
2481
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
60 <div id="body" class="diffblock">
2482
1fd3c043c025 small UI changes for pull-request view
Marcin Kuzminski <marcin@python-works.com>
parents: 2481
diff changeset
61 <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div>
2481
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
62 </div>
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
63 <div id="changeset_compare_view_content">
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
64 ##CS
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
65 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Incoming changesets')}</div>
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
66 <%include file="/compare/compare_cs.html" />
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
67
2481
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
68 ## FILES
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
69 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
70 <div class="cs_files">
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
71 %for fid, change, f, stat in c.files:
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
72 <div class="cs_${change}">
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
73 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div>
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
74 <div class="changes">${h.fancy_file_stats(stat)}</div>
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
75 </div>
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
76 %endfor
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
77 </div>
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
78 </div>
4d3032431d4f Adde pull request voting recalculation
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
79 </div>
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
80 ## REVIEWERS
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
81 <div style="float:left; border-left:1px dashed #eee">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
82 <h4>${_('Pull request reviewers')}</h4>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
83 <div id="reviewers" style="padding:0px 0px 0px 15px">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
84 ## members goes here !
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
85 <div class="group_members_wrap">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
86 <ul id="review_members" class="group_members">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
87 %for member,status in c.pull_request_reviewers:
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
88 <li id="reviewer_${member.user_id}">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
89 <div class="reviewers_member">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
90 <div style="float:left;padding:0px 3px 0px 0px" class="tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
91 <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/>
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
92 </div>
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
93 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
94 <div style="float:left">${member.full_name} (${_('owner')})</div>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
95 <input type="hidden" value="${member.user_id}" name="review_members" />
2770
74364824c1e1 Hide add/delete pull request members when you don't have permission for it
Marcin Kuzminski <marcin@python-works.com>
parents: 2713
diff changeset
96 %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id):
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
97 <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
98 %endif
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
99 </div>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
100 </li>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
101 %endfor
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
102 </ul>
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
103 </div>
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
104 %if not c.pull_request.is_closed():
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
105 <div class='ac'>
2770
74364824c1e1 Hide add/delete pull request members when you don't have permission for it
Marcin Kuzminski <marcin@python-works.com>
parents: 2713
diff changeset
106 %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id:
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
107 <div class="reviewer_ac">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
108 ${h.text('user', class_='yui-ac-input')}
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
109 <span class="help-block">${_('Add reviewer to this pull request.')}</span>
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
110 <div id="reviewers_container"></div>
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
111 </div>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
112 <div style="padding:0px 10px">
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
113 <span id="update_pull_request" class="ui-btn xsmall">${_('save')}</span>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
114 </div>
2770
74364824c1e1 Hide add/delete pull request members when you don't have permission for it
Marcin Kuzminski <marcin@python-works.com>
parents: 2713
diff changeset
115 %endif
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
116 </div>
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
117 %endif
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
118 </div>
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
119 </div>
2440
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
120 </div>
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
121 <script>
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
122 var _USERS_AC_DATA = ${c.users_array|n};
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
123 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
124 AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}";
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
125 AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
126 AJAX_UPDATE_PULLREQUEST = "${url('pullrequest_update',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"
2440
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
127 </script>
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
128
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
129 ## diff block
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
130 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
131 %for fid, change, f, stat in c.files:
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
132 ${diff_block.diff_block_simple([c.changes[fid]])}
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
133 %endfor
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
134
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
135 ## template for inline comment form
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
136 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
137 ${comment.comment_inline_form()}
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
138
2608
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
139 ## render comments and inlines
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
140 ${comment.generate_comments()}
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
141
2608
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
142 % if not c.pull_request.is_closed():
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
143 ## main comment form and it status
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
144 ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name,
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
145 pull_request_id=c.pull_request.pull_request_id),
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
146 c.current_changeset_status,
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
147 close_btn=True)}
58c529332e7e Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
148 %endif
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
149
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
150 <script type="text/javascript">
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
151 YUE.onDOMReady(function(){
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
152 PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
153
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
154 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
155 var show = 'none';
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
156 var target = e.currentTarget;
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
157 if(target.checked){
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
158 var show = ''
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
159 }
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
160 var boxid = YUD.getAttribute(target,'id_for');
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
161 var comments = YUQ('#{0} .inline-comments'.format(boxid));
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
162 for(c in comments){
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
163 YUD.setStyle(comments[c],'display',show);
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
164 }
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
165 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
166 for(c in btns){
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
167 YUD.setStyle(btns[c],'display',show);
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
168 }
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
169 })
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
170
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
171 YUE.on(YUQ('.line'),'click',function(e){
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
172 var tr = e.currentTarget;
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
173 injectInlineForm(tr);
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
174 });
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
175
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
176 // inject comments into they proper positions
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
177 var file_comments = YUQ('.inline-comment-placeholder');
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
178 renderInlineComments(file_comments);
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
179
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
180 YUE.on(YUD.get('update_pull_request'),'click',function(e){
2673
d5e42c00f3c1 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2654
diff changeset
181
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
182 var reviewers_ids = [];
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
183 var ids = YUQ('#review_members input');
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
184 for(var i=0; i<ids.length;i++){
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
185 var id = ids[i].value
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
186 reviewers_ids.push(id);
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
187 }
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
188 updateReviewers(reviewers_ids);
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2608
diff changeset
189 })
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
190 })
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
191 </script>
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2482
diff changeset
192
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
193 </div>
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
194
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
195 </%def>