Changeset - 51e3d60fed2f
[Not reviewed]
codereview
0 1 0
Marcin Kuzminski - 13 years ago 2012-06-06 01:23:02
marcin@python-works.com
added link for detailed overview in pull-request form
1 file changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -53,24 +53,27 @@
 
        </div>
 
       <div style="float:left;padding:5px 5px 5px 15px">
 
         <span>
 
           <a id="refresh" href="#">
 
             <img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/>
 
             ${_('refresh overview')}
 
           </a>
 
         </span>       
 
       </div>
 
       <div style="clear:both;padding-top: 10px"></div>       
 
       <div style="float:left" id="pull_request_overview">
 
       </div>        
 
       <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none">
 
            <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a>
 
       </div>               
 
     </div>
 
    <div style="float:left; border-left:1px dashed #eee">
 
        <h4>${_('Pull request reviewers')}</h4>
 
        <div id="reviewers" style="padding:0px 0px 0px 15px">
 
        ##TODO: make this nicer :)
 
          <table class="table noborder">
 
                  <tr>
 
                      <td>
 
                          <div>
 
                              <div style="float:left">
 
                                  <div class="text" style="padding: 0px 0px 6px;">${_('Choosen reviewers')}</div>
 
                                  ${h.select('review_members',[x[0] for x in c.review_members],c.review_members,multiple=True,size=8,style="min-width:210px")}
 
@@ -132,24 +135,25 @@
 
                ${h.reset('reset',_('Reset'),class_="ui-button")}
 
           </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}     
 
     
 
</div>
 

	
 
<script type="text/javascript">
 
  MultiSelectWidget('review_members','available_members','pull_request_form');
 
  
 
  var loadPreview = function(){
 
	  YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none');
 
      var url = "${h.url('compare_url', 
 
          repo_name='org_repo',
 
          org_ref_type='branch', org_ref='org_ref',
 
          other_ref_type='branch', other_ref='other_ref',
 
          repo='other_repo')}";
 
  
 
      var select_refs = YUQ('#pull_request_form select.refs')
 
    
 
      for(var i=0;i<select_refs.length;i++){
 
        var select_ref = select_refs[i];
 
        var select_ref_data = select_ref.value.split(':');
 
        var key = null;
 
@@ -161,25 +165,28 @@
 
    
 
          key = select_ref.name;
 
          val = select_ref_data[1];
 
          url = url.replace(key,val);
 
    
 
        }else{
 
          key = select_ref.name;
 
          val = select_ref.value;
 
          url = url.replace(key,val);
 
        }
 
      }
 
    
 
      ypjax(url,'pull_request_overview', function(data){})	  
 
      ypjax(url,'pull_request_overview', function(data){
 
    	  YUD.get('pull_request_overview_url').href = url;
 
    	  YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','');
 
      })	  
 
  }
 
  YUE.on('refresh','click',function(e){
 
     loadPreview()
 
  })
 
  
 
  //lazy load after 0.5
 
  
 
  setTimeout(loadPreview,500)
 
  
 
</script>
 

	
 
</%def>
0 comments (0 inline, 0 general)