##// END OF EJS Templates
pull-requests: add copy helpers into pull requests clone/pull url inputs.
ergo -
r1976:b5799ede default
parent child Browse files
Show More
@@ -367,26 +367,23 b' ul.auth_plugins {'
367 367 }
368 368
369 369 .pr-mergeinfo {
370 clear: both;
371 margin: .5em 0;
372
373 input {
374 min-width: 100% !important;
370 min-width: 95% !important;
375 371 padding: 0 !important;
376 372 border: 0;
377 373 }
374 .pr-mergeinfo-copy {
375 padding: 0 0;
378 376 }
379 377
380 378 .pr-pullinfo {
381 clear: both;
382 margin: .5em 0;
383
384 input {
385 min-width: 100% !important;
379 min-width: 95% !important;
386 380 padding: 0 !important;
387 381 border: 0;
388 382 }
389 }
383 .pr-pullinfo-copy {
384 padding: 0 0;
385 }
386
390 387
391 388 #pr-title-input {
392 389 width: 72%;
@@ -89,13 +89,17 b''
89 89 <code><a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=c.ancestor_commit.raw_id)}">${h.show_id(c.ancestor_commit)}</a></code>
90 90 % endif
91 91 </div>
92 <div class="pr-pullinfo">
93 92 %if h.is_hg(c.pull_request.source_repo):
94 <input type="text" class="input-monospace" value="hg pull -r ${h.short_id(c.source_ref)} ${c.pull_request.source_repo.clone_url()}" readonly="readonly">
93 <% clone_url = 'hg pull -r {} {}'.format(h.short_id(c.source_ref), c.pull_request.source_repo.clone_url()) %>
95 94 %elif h.is_git(c.pull_request.source_repo):
96 <input type="text" class="input-monospace" value="git pull ${c.pull_request.source_repo.clone_url()} ${c.pull_request.source_ref_parts.name}" readonly="readonly">
95 <% clone_url = 'git pull {} {}'.format(c.pull_request.source_repo.clone_url(), c.pull_request.source_ref_parts.name) %>
97 96 %endif
97
98 <div class="">
99 <input type="text" class="input-monospace pr-pullinfo" value="${clone_url}" readonly="readonly">
100 <i class="tooltip icon-clipboard clipboard-action pull-right pr-pullinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the pull url')}"></i>
98 101 </div>
102
99 103 </div>
100 104 </div>
101 105 <div class="field">
@@ -126,12 +130,14 b''
126 130 </div>
127 131 <div class="input">
128 132 % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref:
129 <div class="pr-mergeinfo">
130 133 %if h.is_hg(c.pull_request.target_repo):
131 <input type="text" class="input-monospace" value="hg clone -u ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly">
134 <% clone_url = 'hg clone --update {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %>
132 135 %elif h.is_git(c.pull_request.target_repo):
133 <input type="text" class="input-monospace" value="git clone --branch ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly">
136 <% clone_url = 'git clone --branch {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %>
134 137 %endif
138 <div class="">
139 <input type="text" class="input-monospace pr-mergeinfo" value="${clone_url}" readonly="readonly">
140 <i class="tooltip icon-clipboard clipboard-action pull-right pr-mergeinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the clone url')}"></i>
135 141 </div>
136 142 % else:
137 143 <div class="">
General Comments 0
You need to be logged in to leave comments. Login now