Mercurial > kallithea
annotate rhodecode/templates/pullrequests/pullrequest.html @ 2612:9364776d1331 beta
Added autocomplete widget for pull request reviewers, in exchange of 90s style
multi select widget
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 15 Jul 2012 18:49:11 +0200 |
parents | 7ae36df760ce |
children | ad3573d744ef |
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()"> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
4 ${c.repo_name} ${_('New pull request')} |
2244
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()"> |
2492
79818f546538
i18n 'Home' in breadcrumbs
Takumi IINO <trot.thunder@gmail.com>
parents:
2434
diff
changeset
|
8 ${h.link_to(_(u'Home'),h.url('/'))} |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 » |
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 » |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
12 ${_('New pull request')} |
2244
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> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
22 ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
23 <div style="float:left;padding:0px 30px 30px 30px"> |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
24 <div style="padding:0px 5px 5px 5px"> |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
25 <span> |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
26 <a id="refresh" href="#"> |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
27 <img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
28 ${_('refresh overview')} |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
29 </a> |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
30 </span> |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
31 </div> |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
32 ##ORG |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 <div style="float:left"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 <div class="fork_user"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 <div class="gravatar"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 <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
|
37 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 <span style="font-size: 20px"> |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
39 ${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
|
40 </span> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 <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
|
42 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
43 <div style="clear:both;padding-top: 10px"></div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
44 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
45 <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
|
46 <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
|
47 </div> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
48 |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
49 ##OTHER, most Probably the PARENT OF THIS FORK |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 <div style="float:left"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
51 <div class="fork_user"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
52 <div class="gravatar"> |
2541
1c2ba03c42b4
Added dynamic data loading for other repo we open pull request against
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
53 <img id="other_repo_gravatar" alt="gravatar" src=""/> |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
54 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
55 <span style="font-size: 20px"> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
56 ${h.select('other_repo',c.default_pull_request ,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
|
57 </span> |
2541
1c2ba03c42b4
Added dynamic data loading for other repo we open pull request against
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
58 <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div> |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
59 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
60 <div style="clear:both;padding-top: 10px"></div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
61 </div> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
62 <div style="clear:both;padding-top: 10px"></div> |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
63 ## overview pulled by ajax |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
64 <div style="float:left" id="pull_request_overview"></div> |
2396
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> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
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"> |
2612
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
72 ## members goes here ! |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
73 <div class="group_members_wrap"> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
74 <ul id="review_members" class="group_members"> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
75 %for member in c.review_members: |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
76 <li> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
77 <div class="reviewers_member"> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
78 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
79 <div style="float:left">${member.full_name} (${_('owner')})</div> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
80 <input type="hidden" value="${member.user_id}" name="review_members" /> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
81 </div> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
82 </li> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
83 %endfor |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
84 </ul> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
85 </div> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
86 |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
87 <div class='ac'> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
88 <div class="reviewer_ac"> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
89 ${h.text('user', class_='yui-ac-input')} |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
90 <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
91 <div id="reviewers_container"></div> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
92 </div> |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
93 </div> |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
94 </div> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
95 </div> |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
96 <h3>${_('Create new pull request')}</h3> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
97 |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
98 <div class="form"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
99 <!-- fields --> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
100 |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
101 <div class="fields"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
102 |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
103 <div class="field"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
104 <div class="label"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
105 <label for="pullrequest_title">${_('Title')}:</label> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
106 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
107 <div class="input"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
108 ${h.text('pullrequest_title',size=30)} |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
109 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
110 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
111 |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
112 <div class="field"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
113 <div class="label label-textarea"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
114 <label for="pullrequest_desc">${_('description')}:</label> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
115 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
116 <div class="textarea text-area editor"> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
117 ${h.textarea('pullrequest_desc',size=30)} |
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> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
120 |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
121 <div class="buttons"> |
2607
7ae36df760ce
removed deprecated ui-button
Marcin Kuzminski <marcin@python-works.com>
parents:
2541
diff
changeset
|
122 ${h.submit('save',_('Send pull request'),class_="ui-btn large")} |
7ae36df760ce
removed deprecated ui-button
Marcin Kuzminski <marcin@python-works.com>
parents:
2541
diff
changeset
|
123 ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
124 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
125 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
126 </div> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
127 ${h.end_form()} |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
128 |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
129 </div> |
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
130 |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
131 <script type="text/javascript"> |
2612
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
132 var _USERS_AC_DATA = ${c.users_array|n}; |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
133 var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
134 PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
9364776d1331
Added autocomplete widget for pull request reviewers, in exchange of 90s style
Marcin Kuzminski <marcin@python-works.com>
parents:
2607
diff
changeset
|
135 |
2541
1c2ba03c42b4
Added dynamic data loading for other repo we open pull request against
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
136 var other_repos_info = ${c.other_repos_info|n}; |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
137 var loadPreview = function(){ |
2396
51e3d60fed2f
added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
138 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none'); |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
139 var url = "${h.url('compare_url', |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
140 repo_name='org_repo', |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
141 org_ref_type='branch', org_ref='org_ref', |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
142 other_ref_type='branch', other_ref='other_ref', |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
143 repo='other_repo', |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
144 as_form=True)}"; |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
145 |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
146 var select_refs = YUQ('#pull_request_form select.refs') |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
147 |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
148 for(var i=0;i<select_refs.length;i++){ |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
149 var select_ref = select_refs[i]; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
150 var select_ref_data = select_ref.value.split(':'); |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
151 var key = null; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
152 var val = null; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
153 if(select_ref_data.length>1){ |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
154 key = select_ref.name+"_type"; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
155 val = select_ref_data[0]; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
156 url = url.replace(key,val); |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
157 |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
158 key = select_ref.name; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
159 val = select_ref_data[1]; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
160 url = url.replace(key,val); |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
161 |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
162 }else{ |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
163 key = select_ref.name; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
164 val = select_ref.value; |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
165 url = url.replace(key,val); |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
166 } |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
167 } |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
168 |
2396
51e3d60fed2f
added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
169 ypjax(url,'pull_request_overview', function(data){ |
2541
1c2ba03c42b4
Added dynamic data loading for other repo we open pull request against
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
170 var sel_box = YUQ('#pull_request_form #other_repo')[0]; |
1c2ba03c42b4
Added dynamic data loading for other repo we open pull request against
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
171 var repo_name = sel_box.options[sel_box.selectedIndex].value; |
2396
51e3d60fed2f
added link for detailed overview in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
172 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
|
173 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); |
2541
1c2ba03c42b4
Added dynamic data loading for other repo we open pull request against
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
174 YUD.get('other_repo_gravatar').src = other_repos_info[repo_name]['gravatar']; |
1c2ba03c42b4
Added dynamic data loading for other repo we open pull request against
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
175 YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
176 }) |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
177 } |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
178 YUE.on('refresh','click',function(e){ |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
179 loadPreview() |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
180 }) |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
181 |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
182 //lazy load overview after 0.5s |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
183 setTimeout(loadPreview, 500) |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2396
diff
changeset
|
184 |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
185 </script> |
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
186 |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
187 </%def> |