changeset 4299:29aa65c9638d

pull requests: show currently selected revision hash - not just symbolic name
author Mads Kiilerich <madski@unity3d.com>
date Fri, 28 Jun 2013 11:50:13 +0200
parents 33a58b74bbc3
children f322a2326019
files kallithea/templates/pullrequests/pullrequest.html
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/pullrequests/pullrequest.html	Fri Jun 28 11:50:13 2013 +0200
+++ b/kallithea/templates/pullrequests/pullrequest.html	Fri Jun 28 11:50:13 2013 +0200
@@ -56,9 +56,12 @@
                             <div style="padding:5px 3px 3px 3px;">
                             <b>${_('Origin repository')}:</b> ${c.db_repo.description}
                             </div>
-                            <span style="font-size: 20px">
+                            <div>
                             ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref',c.default_org_ref,c.org_refs,class_='refs')}
-                            </span>
+                            </div>
+                            <div style="padding:5px 3px 3px 3px;">
+                            <b>${_('Revision')}:</b> <span id="org_rev_span">-</span>
+                            </div>
                         </div>
                     </div>
 
@@ -68,9 +71,12 @@
                             ## filled with JS
                             <div id="other_repo_desc" style="padding:5px 3px 3px 3px;">
                             </div>
-                            <span style="font-size: 20px">
+                            <div>
                             ${h.select('other_repo',c.default_other_repo,c.other_repos,class_='refs')}:${c.default_other_repo_info['revs']}
-                            </span>
+                            </div>
+                            <div style="padding:5px 3px 3px 3px;">
+                            <b>${_('Revision')}:</b> <span id="other_rev_span">-</span>
+                            </div>
                         </div>
                     </div>
                     <div style="clear:both"></div>
@@ -178,9 +184,12 @@
                          )}";
       var org_repo = YUQ('#pull_request_form #org_repo')[0].value;
       var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':');
+      ## TODO: make nice link like link_to_ref() do
+      YUD.get('org_rev_span').innerHTML = org_ref[2].substr(0,12);
 
       var other_repo = YUQ('#pull_request_form #other_repo')[0].value;
       var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':');
+      YUD.get('other_rev_span').innerHTML = other_ref[2].substr(0,12);
 
       var select_refs = YUQ('#pull_request_form select.refs')
       var rev_data = {