annotate rhodecode/templates/pullrequests/pullrequest.html @ 2396:51e3d60fed2f codereview

added link for detailed overview in pull-request form
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 06 Jun 2012 01:23:02 +0200
parents b262e349a7a5
children f29469677319
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 <%inherit file="/base/base.html"/>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 <%def name="title()">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 ${c.repo_name} ${_('Pull request')}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 </%def>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 <%def name="breadcrumbs_links()">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 ${h.link_to(u'Home',h.url('/'))}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 &raquo;
77e376fdc4c6 pull requests draft UI
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))}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 &raquo;
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 ${_('Pull request')}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 </%def>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 <%def name="main()">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 <div class="box">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 <!-- box / title -->
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 <div class="title">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 ${self.breadcrumbs()}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 </div>
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
22 ${h.form(url('#'),method='put', id='pull_request_form')}
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
23 <div style="float:left;padding:30px">
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 ##ORG
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 <div style="float:left">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 <div class="fork_user">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 <div class="gravatar">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_db_repo.user.email,24)}"/>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 <span style="font-size: 20px">
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
31 ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref','',c.org_refs,class_='refs')}
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 </span>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 <div style="padding:5px 3px 3px 42px;">${c.rhodecode_db_repo.description}</div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 <div style="clear:both;padding-top: 10px"></div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
36 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
37 <div style="float:left;font-size:24px;padding:0px 20px">
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
38 <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/>
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
39 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
40
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
41 ##OTHER, most Probably the PARENT OF THIS FORK
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
42 <div style="float:left">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
43 <div class="fork_user">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
44 <div class="gravatar">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
45 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_db_repo.user.email,24)}"/>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
46 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
47 <span style="font-size: 20px">
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
48 ${h.select('other_repo','',c.other_repos,class_='refs')}:${h.select('other_ref','',c.other_refs,class_='refs')}
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
49 </span>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
50 <div style="padding:5px 3px 3px 42px;">${c.rhodecode_db_repo.description}</div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
51 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
52 <div style="clear:both;padding-top: 10px"></div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
53 </div>
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
54 <div style="float:left;padding:5px 5px 5px 15px">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
55 <span>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
56 <a id="refresh" href="#">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
57 <img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
58 ${_('refresh overview')}
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
59 </a>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
60 </span>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
61 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
62 <div style="clear:both;padding-top: 10px"></div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
63 <div style="float:left" id="pull_request_overview">
2396
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
64 </div>
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
65 <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none">
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
66 <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a>
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
67 </div>
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
68 </div>
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
69 <div style="float:left; border-left:1px dashed #eee">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
70 <h4>${_('Pull request reviewers')}</h4>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
71 <div id="reviewers" style="padding:0px 0px 0px 15px">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
72 ##TODO: make this nicer :)
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
73 <table class="table noborder">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
74 <tr>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
75 <td>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
76 <div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
77 <div style="float:left">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
78 <div class="text" style="padding: 0px 0px 6px;">${_('Choosen reviewers')}</div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
79 ${h.select('review_members',[x[0] for x in c.review_members],c.review_members,multiple=True,size=8,style="min-width:210px")}
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
80 <div id="remove_all_elements" style="cursor:pointer;text-align:center">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
81 ${_('Remove all elements')}
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
82 <img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
83 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
84 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
85 <div style="float:left;width:20px;padding-top:50px">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
86 <img alt="add" id="add_element"
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
87 style="padding:2px;cursor:pointer"
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
88 src="${h.url('/images/icons/arrow_left.png')}"/>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
89 <br />
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
90 <img alt="remove" id="remove_element"
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
91 style="padding:2px;cursor:pointer"
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
92 src="${h.url('/images/icons/arrow_right.png')}"/>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
93 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
94 <div style="float:left">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
95 <div class="text" style="padding: 0px 0px 6px;">${_('Available reviewers')}</div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
96 ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")}
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
97 <div id="add_all_elements" style="cursor:pointer;text-align:center">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
98 <img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
99 ${_('Add all elements')}
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
100 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
101 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
102 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
103 </td>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
104 </tr>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
105 </table>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
106 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
107 </div>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
108 <h3>${_('Create new pull request')}</h3>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
109
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
110 <div class="form">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
111 <!-- fields -->
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
112
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
113 <div class="fields">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
114
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
115 <div class="field">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
116 <div class="label">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
117 <label for="pullrequest_title">${_('Title')}:</label>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
118 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
119 <div class="input">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
120 ${h.text('pullrequest_title',size=30)}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
121 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
122 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
123
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
124 <div class="field">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
125 <div class="label label-textarea">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
126 <label for="pullrequest_desc">${_('description')}:</label>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
127 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
128 <div class="textarea text-area editor">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
129 ${h.textarea('pullrequest_desc',size=30)}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
130 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
131 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
132
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
133 <div class="buttons">
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
134 ${h.submit('save',_('Send pull request'),class_="ui-button")}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
135 ${h.reset('reset',_('Reset'),class_="ui-button")}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
136 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
137 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
138 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
139 ${h.end_form()}
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
140
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
141 </div>
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
142
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
143 <script type="text/javascript">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
144 MultiSelectWidget('review_members','available_members','pull_request_form');
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
145
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
146 var loadPreview = function(){
2396
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
147 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none');
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
148 var url = "${h.url('compare_url',
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
149 repo_name='org_repo',
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
150 org_ref_type='branch', org_ref='org_ref',
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
151 other_ref_type='branch', other_ref='other_ref',
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
152 repo='other_repo')}";
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
153
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
154 var select_refs = YUQ('#pull_request_form select.refs')
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
155
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
156 for(var i=0;i<select_refs.length;i++){
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
157 var select_ref = select_refs[i];
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
158 var select_ref_data = select_ref.value.split(':');
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
159 var key = null;
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
160 var val = null;
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
161 if(select_ref_data.length>1){
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
162 key = select_ref.name+"_type";
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
163 val = select_ref_data[0];
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
164 url = url.replace(key,val);
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
165
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
166 key = select_ref.name;
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
167 val = select_ref_data[1];
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
168 url = url.replace(key,val);
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
169
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
170 }else{
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
171 key = select_ref.name;
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
172 val = select_ref.value;
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
173 url = url.replace(key,val);
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
174 }
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
175 }
2396
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
176
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
177 ypjax(url,'pull_request_overview', function(data){
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
178 YUD.get('pull_request_overview_url').href = url;
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
179 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','');
51e3d60fed2f added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
180 })
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
181 }
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
182 YUE.on('refresh','click',function(e){
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
183 loadPreview()
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
184 })
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
185
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
186 //lazy load after 0.5
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
187
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
188 setTimeout(loadPreview,500)
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
189
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
190 </script>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
191
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
192 </%def>