Changeset - d5e42c00f3c1
[Not reviewed]
beta
0 27 0
Marcin Kuzminski - 13 years ago 2012-07-27 01:06:50
marcin@python-works.com
white space cleanup
27 files changed with 51 insertions and 57 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/cleanup.py
Show inline comments
 
@@ -131,13 +131,12 @@ class CleanupCommand(BasePasterCommand):
 
                          dest='older_than',
 
                          help=(
 
                            "only remove repos that have been removed "
 
                            "at least given time ago "
 
                            "ex. --older-than=30d deletes repositores "
 
                            "removed more than 30days ago. Possible options "
 
                            "d[ays]/h[ours]/m[inutes]/s[seconds]. OPTIONAL"),
 
                          )
 
        self.parser.add_option('--dont-ask',
 
                               action='store_true',
 
                               dest='dont_ask',
 
                               help=("Don't ask to remove repos"))
 
        
 
\ No newline at end of file
rhodecode/lib/indexers/__init__.py
Show inline comments
 
@@ -229,25 +229,25 @@ class WhooshResultWrapper(object):
 
        return ''.join([res['content'][chunk[0]:chunk[1]] for chunk in chunks])
 

	
 
    def get_chunks(self):
 
        """
 
        Smart function that implements chunking the content
 
        but not overlap chunks so it doesn't highlight the same
 
        close occurrences twice.
 

	
 
        :param matcher:
 
        :param size:
 
        """
 
        memory = [(0, 0)]
 
        if self.matcher.supports('positions'): 
 
        if self.matcher.supports('positions'):
 
            for span in self.matcher.spans():
 
                start = span.startchar or 0
 
                end = span.endchar or 0
 
                start_offseted = max(0, start - self.fragment_size)
 
                end_offseted = end + self.fragment_size
 

	
 
                if start_offseted < memory[-1][1]:
 
                    start_offseted = memory[-1][1]
 
                memory.append((start_offseted, end_offseted,))
 
                yield (start_offseted, end_offseted,)
 

	
 
    def highlight(self, content, top=5):
rhodecode/lib/middleware/simplehg.py
Show inline comments
 
@@ -64,25 +64,25 @@ def is_mercurial(environ):
 
    return ishg_path
 

	
 

	
 
class SimpleHg(BaseVCSController):
 

	
 
    def _handle_request(self, environ, start_response):
 
        if not is_mercurial(environ):
 
            return self.application(environ, start_response)
 
        if not self._check_ssl(environ, start_response):
 
            return HTTPNotAcceptable('SSL REQUIRED !')(environ, start_response)
 

	
 
        ipaddr = self._get_ip_addr(environ)
 
        username = None 
 
        username = None
 
        # skip passing error to error controller
 
        environ['pylons.status_code_redirect'] = True
 

	
 
        #======================================================================
 
        # EXTRACT REPOSITORY NAME FROM ENV
 
        #======================================================================
 
        try:
 
            repo_name = environ['REPO_NAME'] = self.__get_repository(environ)
 
            log.debug('Extracted repo name is %s' % repo_name)
 
        except:
 
            return HTTPInternalServerError()(environ, start_response)
 

	
rhodecode/lib/rcmail/utils.py
Show inline comments
 
@@ -7,13 +7,13 @@ import socket
 

	
 
# Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of
 
# seconds, which slows down the restart of the server.
 
class CachedDnsName(object):
 
    def __str__(self):
 
        return self.get_fqdn()
 

	
 
    def get_fqdn(self):
 
        if not hasattr(self, '_fqdn'):
 
            self._fqdn = socket.getfqdn()
 
        return self._fqdn
 

	
 
DNS_NAME = CachedDnsName()
 
\ No newline at end of file
 
DNS_NAME = CachedDnsName()
rhodecode/templates/admin/notifications/notifications.html
Show inline comments
 
@@ -15,25 +15,25 @@
 

	
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
        ##<ul class="links">
 
        ##    <li>
 
        ##      <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span>
 
        ##    </li>
 
        ##</ul>
 
    </div>
 
    
 

	
 
      <div style="padding:14px 18px;text-align: right;float:left">
 
      <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span>
 
      <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span>
 
      <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span>
 
      </div>
 
      %if c.notifications:
 
      <div style="padding:14px 18px;text-align: right;float:right">
 
      <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span>
 
      </div>
 
      %endif
 
  <div id='notification_data'>
 
    <%include file='notifications_data.html'/>
rhodecode/templates/admin/notifications/notifications_data.html
Show inline comments
 
@@ -12,25 +12,25 @@ unread = lambda n:{False:'unread'}.get(n
 
      <div class="gravatar">
 
          <img alt="gravatar" src="${h.gravatar_url(h.email(notification.notification.created_by_user.email),24)}"/>
 
      </div>
 
      <div class="desc ${unread(notification.read)}">
 
      <a href="${url('notification', notification_id=notification.notification.notification_id)}">${notification.notification.description}</a>
 
      </div>
 
      <div class="delete-notifications">
 
        <span id="${notification.notification.notification_id}" class="delete-notification delete_icon action"></span>
 
      </div>
 
      %if not notification.read:
 
      <div class="read-notifications">
 
        <span id="${notification.notification.notification_id}" class="read-notification accept_icon action"></span>
 
      </div>      
 
      </div>
 
      %endif
 
    </div>
 
    <div class="notification-subject">${h.literal(notification.notification.subject)}</div>
 
  </div>
 
%endfor
 
</div>
 

	
 
<div class="notification-paginator">
 
  <div class="pagination-wh pagination-left">
 
  ${c.notifications.pager('$link_previous ~2~ $link_next',**request.GET.mixed())}
 
  </div>
 
</div>
rhodecode/templates/admin/repos/repos.html
Show inline comments
 
@@ -15,50 +15,50 @@
 
<div class="box">
 

	
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
          <li>
 
            <span>${h.link_to(_(u'ADD REPOSITORY'),h.url('new_repo'))}</span>
 
          </li>
 
        </ul>
 
    </div>
 
    <div class="table yui-skin-sam" id="repos_list_wrap"></div>
 
    <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
 
    
 

	
 

	
 
</div>
 
<script>
 
  var url = "${h.url('formatted_users', format='json')}";
 
  var data = ${c.data|n};
 
  var myDataSource = new YAHOO.util.DataSource(data);
 
  myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
 

	
 
  myDataSource.responseSchema = {
 
      resultsList: "records",
 
      fields: [
 
         {key:"menu"},
 
         {key:"raw_name"},
 
         {key:"name"},
 
         {key:"desc"},
 
         {key:"owner"},
 
         {key:"action"},
 
      ]
 
   };
 
  myDataSource.doBeforeCallback = function(req,raw,res,cb) {
 
      // This is the filter function
 
      var data     = res.results || [],
 
          filtered = [],
 
          i,l;
 
     
 

	
 
      if (req) {
 
          req = req.toLowerCase();
 
          for (i = 0; i<data.length; i++) {
 
              var pos = data[i].raw_name.toLowerCase().indexOf(req)
 
              if (pos != -1) {
 
                  filtered.push(data[i]);
 
              }
 
          }
 
          res.results = filtered;
 
      }
 
      YUD.get('repo_count').innerHTML = res.results.length;
 
      return res;
 
@@ -93,43 +93,43 @@
 

	
 
    MSG_SORTASC:"${_('Click to sort ascending')}",
 
    MSG_SORTDESC:"${_('Click to sort descending')}",
 
    MSG_EMPTY:"${_('No records found.')}",
 
    MSG_ERROR:"${_('Data error.')}",
 
    MSG_LOADING:"${_('Loading...')}",
 
  }
 
  );
 
  myDataTable.subscribe('postRenderEvent',function(oArgs) {
 
      tooltip_activate();
 
      quick_repo_menu();
 
  });
 
  
 

	
 
  var filterTimeout = null;
 

	
 
  updateFilter  = function () {
 
      // Reset timeout
 
      filterTimeout = null;
 

	
 
      // Reset sort
 
      var state = myDataTable.getState();
 
          state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
 

	
 
      // Get filtered data
 
      myDataSource.sendRequest(YUD.get('q_filter').value,{
 
          success : myDataTable.onDataReturnInitializeTable,
 
          failure : myDataTable.onDataReturnInitializeTable,
 
          scope   : myDataTable,
 
          argument: state
 
      });
 

	
 
  };  
 
  };
 
  YUE.on('q_filter','click',function(){
 
      YUD.get('q_filter').value = '';
 
   });
 

	
 
  YUE.on('q_filter','keyup',function (e) {
 
      clearTimeout(filterTimeout);
 
      filterTimeout = setTimeout(updateFilter,600);
 
  });  
 
  });
 
</script>
 

	
 
</%def>
rhodecode/templates/admin/users/user_edit.html
Show inline comments
 
@@ -197,25 +197,25 @@
 
                             ${h.bool2icon(k.split('.')[-1] != 'none')}
 
                            %else:
 
                             <span class="perm_tag ${_perm}">${section_perm}</span>
 
                            %endif
 
                        </td>
 
                        <td>
 
                            %if section == 'repositories':
 
                                <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a>
 
                            %elif section == 'repositories_groups':
 
                                <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a>
 
                            %else:
 
                                --
 
                            %endif                        
 
                            %endif
 
                        </td>
 
                    </tr>
 
                %endfor
 
                </tbody>
 
               </table>
 
              </div>
 
              %endif
 
           %endfor
 
    </div>
 
</div>
 
<div class="box box-left">
 
    <!-- box / title -->
rhodecode/templates/admin/users/user_edit_my_account.html
Show inline comments
 
@@ -86,56 +86,56 @@
 
                        <span class="perm_tag ${_perm}">${section_perm}</span>
 
                        %endif
 
                     </td>
 
                </tr>
 
             %endif
 
            %endfor
 
            </tbody>
 
            </table>
 
            </div>
 
           %endfor
 
    </div>
 
    <div id="my" class="table" style="display:none">
 
    </div>    
 
    </div>
 
    <div id="pullrequests" class="table" style="display:none">
 
</div>
 
<script type="text/javascript">
 
var filter_activate = function(){
 
    var nodes = YUQ('#my tr td a.repo_name');
 
    var func = function(node){
 
        return node.parentNode.parentNode.parentNode.parentNode;
 
    }
 
    q_filter('q_filter',YUQ('#my tr td a.repo_name'),func);
 
}
 
YUE.on('show_perms','click',function(e){
 
	YUD.addClass('show_perms', 'current');
 
	YUD.removeClass('show_my','current');
 
	YUD.removeClass('show_pullrequests','current');
 
	
 

	
 
    YUD.setStyle('my','display','none');
 
    YUD.setStyle('pullrequests','display','none');
 
    YUD.setStyle('perms','display','');
 
    YUD.setStyle('q_filter','display','none');
 
    YUE.preventDefault(e);
 
})
 
YUE.on('show_my','click',function(e){
 
    YUD.addClass('show_my', 'current');
 
    YUD.removeClass('show_perms','current');
 
    YUD.removeClass('show_pullrequests','current');
 
    
 

	
 
    YUD.setStyle('perms','display','none');
 
    YUD.setStyle('pullrequests','display','none');
 
    YUD.setStyle('my','display','');
 
    YUD.setStyle('q_filter','display','');
 
    
 

	
 
    YUE.preventDefault(e);
 
    var url = "${h.url('admin_settings_my_repos')}";
 
    ypjax(url, 'my', function(){
 
    	table_sort();
 
    	filter_activate();
 
    });
 
})
 
YUE.on('show_pullrequests','click',function(e){
 
    YUD.addClass('show_pullrequests', 'current');
 
    YUD.removeClass('show_my','current');
 
    YUD.removeClass('show_perms','current');
 

	
rhodecode/templates/admin/users/user_edit_my_account_repos.html
Show inline comments
 
@@ -34,13 +34,13 @@
 
          </tr>
 
       %endfor
 
   %else:
 
      <div style="padding:5px 0px 10px 0px;">
 
      ${_('No repositories yet')}
 
      %if h.HasPermissionAny('hg.admin','hg.create.repository')():
 
          ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")}
 
      %endif
 
      </div>
 
   %endif
 
   </tbody>
 
   </table>
 
</div>
 
\ No newline at end of file
 
</div>
rhodecode/templates/admin/users/users.html
Show inline comments
 
@@ -8,25 +8,25 @@
 
<%def name="breadcrumbs_links()">
 
    <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_count">0</span> ${_('users')}
 
</%def>
 

	
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
</%def>
 

	
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()} 
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
          <li>
 
            <span>${h.link_to(_(u'ADD NEW USER'),h.url('new_user'))}</span>
 
          </li>
 
        </ul>
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table yui-skin-sam" id="users_list_wrap"></div>
 
    <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
 
</div>
 

	
 
<script>
 
@@ -46,42 +46,42 @@
 
          {key: "last_login"},
 
          {key: "active"},
 
          {key: "admin"},
 
          {key: "ldap"},
 
          {key: "action"},
 
      ]
 
   };
 
  myDataSource.doBeforeCallback = function(req,raw,res,cb) {
 
      // This is the filter function
 
      var data     = res.results || [],
 
          filtered = [],
 
          i,l;
 
     
 

	
 
      if (req) {
 
          req = req.toLowerCase();
 
          for (i = 0; i<data.length; i++) {
 
        	  var pos = data[i].raw_username.toLowerCase().indexOf(req)
 
              if (pos != -1) {
 
                  filtered.push(data[i]);
 
              }
 
          }
 
          res.results = filtered;
 
      }
 
      YUD.get('user_count').innerHTML = res.results.length;
 
      return res;
 
  }
 

	
 
  // main table sorting
 
  var myColumnDefs = [
 
      {key:"gravatar",label:"",sortable:false,},                      
 
      {key:"gravatar",label:"",sortable:false,},
 
      {key:"username",label:"${_('username')}",sortable:true,
 
    	  sortOptions: { sortFunction: linkSort }
 
      },
 
      {key:"firstname",label:"${_('firstname')}",sortable:true,},
 
      {key:"lastname",label:"${_('lastname')}",sortable:true,},
 
      {key:"last_login",label:"${_('last login')}",sortable:true,},
 
      {key:"active",label:"${_('active')}",sortable:true,},
 
      {key:"admin",label:"${_('admin')}",sortable:true,},
 
      {key:"ldap",label:"${_('ldap')}",sortable:true,},
 
      {key:"action",label:"${_('action')}",sortable:false},
 
  ];
 

	
 
@@ -103,43 +103,43 @@
 
    }),
 

	
 
    MSG_SORTASC:"${_('Click to sort ascending')}",
 
    MSG_SORTDESC:"${_('Click to sort descending')}",
 
    MSG_EMPTY:"${_('No records found.')}",
 
    MSG_ERROR:"${_('Data error.')}",
 
    MSG_LOADING:"${_('Loading...')}",
 
  }
 
  );
 
  myDataTable.subscribe('postRenderEvent',function(oArgs) {
 

	
 
  });
 
  
 

	
 
  var filterTimeout = null;
 

	
 
  updateFilter  = function () {
 
      // Reset timeout
 
      filterTimeout = null;
 

	
 
      // Reset sort
 
      var state = myDataTable.getState();
 
          state.sortedBy = {key:'username', dir:YAHOO.widget.DataTable.CLASS_ASC};
 

	
 
      // Get filtered data
 
      myDataSource.sendRequest(YUD.get('q_filter').value,{
 
          success : myDataTable.onDataReturnInitializeTable,
 
          failure : myDataTable.onDataReturnInitializeTable,
 
          scope   : myDataTable,
 
          argument: state
 
      });
 

	
 
  };  
 
  };
 
  YUE.on('q_filter','click',function(){
 
      YUD.get('q_filter').value = '';
 
   });
 

	
 
  YUE.on('q_filter','keyup',function (e) {
 
      clearTimeout(filterTimeout);
 
      filterTimeout = setTimeout(updateFilter,600);
 
  });  
 
  });
 
</script>
 

	
 
</%def>
rhodecode/templates/changeset/changeset.html
Show inline comments
 
@@ -117,25 +117,25 @@
 
	                %endfor
 
	                % if c.cut_off:
 
	                  ${_('Changeset was too big and was cut off...')}
 
	                % endif
 
	        </div>
 
	    </div>
 

	
 
    </div>
 
    <script>
 
    var _USERS_AC_DATA = ${c.users_array|n};
 
    var _GROUPS_AC_DATA = ${c.users_groups_array|n};
 
    AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
 
    AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";    
 
    AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
 
    </script>
 
    ## diff block
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    ${diff_block.diff_block(c.changes)}
 

	
 
    ## template for inline comment form
 
    <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
 
    ${comment.comment_inline_form()}
 

	
 
    ## render comments and inlines
 
    ${comment.generate_comments()}
 

	
rhodecode/templates/changeset/changeset_file_comment.html
Show inline comments
 
@@ -96,25 +96,25 @@
 
<%def name="generate_comments()">
 
<div class="comments">
 
    <div id="inline-comments-container">
 
    ## generate inlines for this changeset
 
     ${inlines()}
 
    </div>
 

	
 
    %for co in c.comments:
 
        <div id="comment-tr-${co.comment_id}">
 
          ${comment_block(co)}
 
        </div>
 
    %endfor
 
</div>    
 
</div>
 
</%def>
 

	
 
## MAIN COMMENT FORM
 
<%def name="comments(post_url, cur_status, close_btn=False)">
 

	
 
<div class="comments">
 
    %if c.rhodecode_user.username != 'default':
 
    <div class="comment-form ac">
 
        ${h.form(post_url)}
 
        <strong>${_('Leave a comment')}</strong>
 
        <div class="clearfix">
 
            <div class="comment-help">
rhodecode/templates/changeset/changeset_range.html
Show inline comments
 
@@ -63,25 +63,25 @@
 
	    </div>
 

	
 
    </div>
 
    <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
     %for cs in c.cs_ranges:
 
          ##${comment.comment_inline_form(cs)}
 
          ## diff block
 
          <h3 style="padding-top:8px;">
 
          <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a>
 
           <div class="gravatar">
 
               <img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),20)}"/>
 
           </div>            
 
           </div>
 
           </h3>
 
          ${diff_block.diff_block(c.changes[cs.raw_id])}
 
          ##${comment.comments(cs)}
 

	
 
     %endfor
 
     <script type="text/javascript">
 

	
 
      YUE.onDOMReady(function(){
 

	
 
          YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
 
              var act = e.currentTarget.nextElementSibling;
 

	
rhodecode/templates/errors/error_document.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<!DOCTYPE html>
 
<html xmlns="http://www.w3.org/1999/xhtml">
 
    <head>
 
        <title>Error - ${c.error_message}</title>
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
        <meta name="robots" content="index, nofollow"/>
 
        <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" />
 
                
 

	
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
	    %if c.redirect_time:
 
	        <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
 
	    %endif
 

	
 
        <!-- stylesheets -->
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
 
	    <style type="text/css">
 
	     #main_div{
 
	       border: 0px solid #000;
 
	       width: 500px;
 
	       margin: auto;
rhodecode/templates/forks/fork.html
Show inline comments
 
@@ -35,25 +35,25 @@
 
                  ${h.hidden('repo_type',c.repo_info.repo_type)}
 
                  ${h.hidden('fork_parent_id',c.repo_info.repo_id)}
 
              </div>
 
            </div>
 
             <div class="field">
 
                <div class="label">
 
                    <label for="landing_rev">${_('Landing revision')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.select('landing_rev','',c.landing_revs,class_="medium")}
 
                    <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
 
                </div>
 
            </div>            
 
            </div>
 
            <div class="field">
 
                 <div class="label">
 
                     <label for="repo_group">${_('Repository group')}:</label>
 
                 </div>
 
                 <div class="input">
 
                     ${h.select('repo_group','',c.repo_groups,class_="medium")}
 
                     <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span>
 
                 </div>
 
            </div>
 
            <div class="field">
 
                <div class="label label-textarea">
 
                    <label for="description">${_('Description')}:</label>
rhodecode/templates/forks/forks_data.html
Show inline comments
 
@@ -7,26 +7,26 @@
 
	            <div class="gravatar">
 
	                <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/>
 
	            </div>
 
	            <span style="font-size: 20px">
 
	             <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname}) /
 
	              ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))}
 
	             </span>
 
	             <div style="padding:5px 3px 3px 42px;">${f.description}</div>
 
	        </div>
 
	        <div style="clear:both;padding-top: 10px"></div>
 
	        <div class="follower_date">${_('forked')} -
 
	        <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span>
 
            <a title="${_('compare fork with %s' % c.repo_name)}" 
 
               href="${h.url('compare_url',repo_name=f.repo_name,org_ref_type='branch',org_ref='default',other_ref_type='branch',other_ref='default', repo=c.repo_name)}" 
 
            <a title="${_('compare fork with %s' % c.repo_name)}"
 
               href="${h.url('compare_url',repo_name=f.repo_name,org_ref_type='branch',org_ref='default',other_ref_type='branch',other_ref='default', repo=c.repo_name)}"
 
               class="ui-btn small">${_('Compare fork')}</a>
 
             </div>
 
	        <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
 
	    </div>
 
	% endfor
 
  <div class="pagination-wh pagination-left">
 
  <script type="text/javascript">
 
  YUE.onDOMReady(function(){
 
      YUE.delegate("forks","click",function(e, matchedEl, container){
 
          ypjax(e.target.href,"forks",function(){show_more_event();tooltip_activate();});
 
          YUE.preventDefault(e);
 
      },'.pager_link');
rhodecode/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -74,31 +74,31 @@
 
            <ul id="review_members" class="group_members">
 
            %for member in c.review_members:
 
              <li id="reviewer_${member.user_id}">
 
                <div class="reviewers_member">
 
                  <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
 
                  <div style="float:left">${member.full_name} (${_('owner')})</div>
 
                  <input type="hidden" value="${member.user_id}" name="review_members" />
 
                  <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span>
 
                </div>
 
              </li>
 
            %endfor
 
            </ul>
 
          </div>                
 
          
 
          </div>
 

	
 
          <div class='ac'>
 
            <div class="reviewer_ac">
 
               ${h.text('user', class_='yui-ac-input')}
 
               <span class="help-block">${_('Add reviewer to this pull request.')}</span>
 
               <div id="reviewers_container"></div>           
 
               <div id="reviewers_container"></div>
 
            </div>
 
          </div>
 
        </div>
 
    </div>
 
    <h3>${_('Create new pull request')}</h3>
 

	
 
    <div class="form">
 
        <!-- fields -->
 

	
 
        <div class="fields">
 

	
 
             <div class="field">
rhodecode/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -12,121 +12,121 @@
 
    ${_('Pull request #%s') % c.pull_request.pull_request_id}
 
</%def>
 

	
 
<%def name="main()">
 

	
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
        %if c.pull_request.is_closed():
 
        <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))}</div>
 
        %endif        
 
    <h3>${_('Title')}: ${c.pull_request.title} 
 
        %endif
 
    <h3>${_('Title')}: ${c.pull_request.title}
 
        <div class="changeset-status-container" style="float:none">
 
        %if c.current_changeset_status:
 
          <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div>
 
          <div class="changeset-status-ico" style="padding:4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>          
 
          <div class="changeset-status-ico" style="padding:4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>
 
        %endif
 
        </div>
 
    </h3>
 
    <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div>
 
    <div style="padding:4px 4px 10px 20px">
 
      <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div>
 
    </div>
 

	
 
    <div style="min-height:160px">
 
      ##DIFF
 
      <div class="table" style="float:left;clear:none">
 
          <div id="body" class="diffblock">
 
              <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div>
 
          </div>
 
          <div id="changeset_compare_view_content">
 
              ##CS
 
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Incoming changesets')}</div>
 
              <%include file="/compare/compare_cs.html" />
 
  
 

	
 
              ## FILES
 
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
 
              <div class="cs_files">
 
                %for fid, change, f, stat in c.files:
 
                    <div class="cs_${change}">
 
                      <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div>
 
                      <div class="changes">${h.fancy_file_stats(stat)}</div>
 
                    </div>
 
                %endfor
 
              </div>
 
          </div>
 
      </div>
 
      ## REVIEWERS
 
       <div style="float:left; border-left:1px dashed #eee">
 
       <h4>${_('Pull request reviewers')}</h4>
 
        <div id="reviewers" style="padding:0px 0px 0px 15px">
 
          ## members goes here !
 
          <div class="group_members_wrap">
 
            <ul id="review_members" class="group_members">
 
            %for member,status in c.pull_request_reviewers:
 
              <li id="reviewer_${member.user_id}">
 
                <div class="reviewers_member">
 
                    <div style="float:left;padding:0px 3px 0px 0px" class="tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}">
 
                      <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/>
 
                    </div>                
 
                    </div>
 
                  <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
 
                  <div style="float:left">${member.full_name} (${_('owner')})</div>
 
                  <input type="hidden" value="${member.user_id}" name="review_members" />
 
                  %if not c.pull_request.is_closed():
 
                  <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span>
 
                  %endif
 
                </div>
 
              </li>
 
            %endfor
 
            </ul>
 
          </div>                
 
          </div>
 
          %if not c.pull_request.is_closed():
 
          <div class='ac'>
 
            <div class="reviewer_ac">
 
               ${h.text('user', class_='yui-ac-input')}
 
               <span class="help-block">${_('Add reviewer to this pull request.')}</span>
 
               <div id="reviewers_container"></div>       
 
               <div id="reviewers_container"></div>
 
            </div>
 
            <div style="padding:0px 10px">
 
             <span id="update_pull_request" class="ui-btn xsmall">${_('save')}</span>
 
            </div>
 
          </div>
 
          %endif
 
        </div>      
 
       </div>      
 
        </div>
 
       </div>
 
    </div>
 
    <script>
 
    var _USERS_AC_DATA = ${c.users_array|n};
 
    var _GROUPS_AC_DATA = ${c.users_groups_array|n};
 
    AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}";
 
    AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
 
    AJAX_UPDATE_PULLREQUEST = "${url('pullrequest_update',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"
 
    </script>
 

	
 
    ## diff block
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    %for fid, change, f, stat in c.files:
 
      ${diff_block.diff_block_simple([c.changes[fid]])}
 
    %endfor
 

	
 
    ## template for inline comment form
 
    <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
 
    ${comment.comment_inline_form()}
 
    
 

	
 
    ## render comments and inlines
 
    ${comment.generate_comments()}
 
    
 

	
 
    % if not c.pull_request.is_closed():
 
      ## main comment form and it status
 
      ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name,
 
                                pull_request_id=c.pull_request.pull_request_id),
 
                                c.current_changeset_status,
 
                                close_btn=True)}
 
    %endif
 

	
 
    <script type="text/javascript">
 
      YUE.onDOMReady(function(){
 
    	  PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
 

	
 
@@ -146,27 +146,27 @@
 
                  YUD.setStyle(btns[c],'display',show);
 
               }
 
          })
 

	
 
          YUE.on(YUQ('.line'),'click',function(e){
 
              var tr = e.currentTarget;
 
              injectInlineForm(tr);
 
          });
 

	
 
          // inject comments into they proper positions
 
          var file_comments = YUQ('.inline-comment-placeholder');
 
          renderInlineComments(file_comments);
 
          
 

	
 
          YUE.on(YUD.get('update_pull_request'),'click',function(e){
 
        	  
 

	
 
        	  var reviewers_ids = [];
 
        	  var ids = YUQ('#review_members input');
 
        	  for(var i=0; i<ids.length;i++){
 
        		  var id = ids[i].value
 
        		  reviewers_ids.push(id);
 
        	  }
 
        	  updateReviewers(reviewers_ids);
 
          })
 
      })
 
    </script>
 

	
 
</div>
rhodecode/templates/pullrequests/pullrequest_show_all.html
Show inline comments
 
@@ -16,25 +16,25 @@
 

	
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    %for pr in c.pull_requests:
 
        <div>
 
          <h4>
 
          %if pr.is_closed():
 
          <img src="${h.url('/images/icons/tick.png')}" alt="${_('Closed')}" />
 
          %endif          
 
          %endif
 
          <a href="${h.url('pullrequest_show',repo_name=c.repo_name,pull_request_id=pr.pull_request_id)}">
 
          ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))}
 
          </a>
 
          </h4>
 
          <h5 style="border:0px;padding-bottom:0px">${_('Title')}: ${pr.title}</h5>
 
          <div style="padding:0px 24px">${pr.description}</div>
 
        </div>
 
    %endfor
 

	
 
</div>
 

	
 
<script type="text/javascript"></script>
rhodecode/templates/settings/repo_settings.html
Show inline comments
 
@@ -51,25 +51,25 @@
 
                    ${h.select('repo_group','',c.repo_groups,class_="medium")}
 
                    <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
 
                </div>
 
            </div>
 
            <div class="field">
 
                <div class="label">
 
                    <label for="landing_rev">${_('Landing revision')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.select('landing_rev','',c.landing_revs,class_="medium")}
 
                    <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
 
                </div>
 
            </div>            
 
            </div>
 
            <div class="field">
 
                <div class="label label-textarea">
 
                    <label for="description">${_('Description')}:</label>
 
                </div>
 
                <div class="textarea text-area editor">
 
                    ${h.textarea('description')}
 
                    <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="field">
 
                <div class="label label-checkbox">
rhodecode/templates/shortlog/shortlog_data.html
Show inline comments
 
@@ -74,15 +74,15 @@ ${c.repo_changesets.pager('$link_previou
 
    ${c.rhodecode_repo.alias} add README # add first file
 
    ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
 
    ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
 
</pre>
 

	
 
<h4>${_('Existing repository?')}</h4>
 
<pre>
 
%if h.is_git(c.rhodecode_repo):
 
    git remote add origin ${c.clone_repo_url}
 
    git push -u origin master
 
%else:
 
    hg push ${c.clone_repo_url}
 
%endif    
 
%endif
 
</pre>
 
%endif
rhodecode/tests/api/api_base.py
Show inline comments
 
@@ -979,13 +979,12 @@ class BaseTestApi(object):
 
    def test_api_revoke_users_group_permission_exception_when_adding(self):
 

	
 
        id_, params = _build_data(self.apikey, 'revoke_users_group_permission',
 
                                  repoid=self.REPO,
 
                                  usersgroupid=TEST_USERS_GROUP,)
 
        response = self.app.post(API_URL, content_type='application/json',
 
                                 params=params)
 

	
 
        expected = 'failed to edit permission for users group: `%s` in repo: `%s`' % (
 
                    TEST_USERS_GROUP, self.REPO
 
                )
 
        self._compare_error(id_, expected, given=response.body)
 

	
rhodecode/tests/api/test_api_hg.py
Show inline comments
 
from rhodecode.tests import *
 
from rhodecode.tests.api.api_base import BaseTestApi
 

	
 

	
 
class TestHgApi(BaseTestApi, TestController):
 
    REPO = HG_REPO
 
    REPO_TYPE = 'hg'
 
\ No newline at end of file
 
    REPO_TYPE = 'hg'
rhodecode/tests/functional/test_admin_settings.py
Show inline comments
 
@@ -254,13 +254,13 @@ class TestAdminSettingsController(TestCo
 
        self.checkSessionFlash(response,
 
        'Marked repo %s as fork of %s' % (repo.repo_name, "Nothing"))
 
        assert repo.fork == None
 

	
 
    def test_set_fork_of_same_repo(self):
 
        self.log_user()
 
        repo = Repository.get_by_repo_name(HG_REPO)
 
        response = self.app.put(url('repo_as_fork', repo_name=HG_REPO),
 
                                 params=dict(
 
                                    id_fork_of=repo.repo_id
 
                                 ))
 
        self.checkSessionFlash(response,
 
                               'An error occurred during this operation')
 
\ No newline at end of file
 
                               'An error occurred during this operation')
rhodecode/tests/models/test_notifications.py
Show inline comments
 
@@ -176,16 +176,12 @@ class TestNotifications(unittest.TestCas
 

	
 
        notification = NotificationModel().create(created_by=self.u1,
 
                                           subject=u'title', body=u'hi there3',
 
                                    recipients=[self.u3, self.u1, self.u2])
 
        Session().commit()
 

	
 
        self.assertEqual(NotificationModel()
 
                         .get_unread_cnt_for_user(self.u1), 2)
 
        self.assertEqual(NotificationModel()
 
                         .get_unread_cnt_for_user(self.u2), 1)
 
        self.assertEqual(NotificationModel()
 
                         .get_unread_cnt_for_user(self.u3), 2)
 

	
 

	
 

	
 

	
rhodecode/tests/models/test_repos_groups.py
Show inline comments
 
@@ -158,13 +158,13 @@ class TestReposGroups(unittest.TestCase)
 
        Session().commit()
 

	
 
        self.assertEqual(g2.full_path, 't11/t22')
 
        self.assertTrue(self.__check_path('t11', 't22'))
 

	
 
        g2 = self.__update_group(g2.group_id, 'g22', parent_id=None)
 
        Session().commit()
 

	
 
        self.assertEqual(g2.group_name, 'g22')
 
        # we moved out group from t1 to '' so it's full path should be 'g2'
 
        self.assertEqual(g2.full_path, 'g22')
 
        self.assertFalse(self.__check_path('t11', 't22'))
 
        self.assertTrue(self.__check_path('g22'))
 
\ No newline at end of file
 
        self.assertTrue(self.__check_path('g22'))
0 comments (0 inline, 0 general)