Changeset - 647e7e0ce812
[Not reviewed]
kallithea/public/css/style.css
Show inline comments
 
@@ -29,51 +29,48 @@ body pre {
 
a {
 
  color: #577632;
 
  text-decoration: none;
 
}
 
a:hover {
 
  color: #576622;
 
  text-decoration: underline;
 
}
 
code,
 
.code pre,
 
.linenos pre,
 
div.readme pre,
 
div.formatted-fixed,
 
.CodeMirror .CodeMirror-code pre {
 
  font-size: 12px;
 
  font-family: Lucida Console, Consolas, Monaco, Inconsolata, Liberation Mono, monospace;
 
}
 
/* class for texts where newlines should be preserved, for very light-weight ascii art markup (like pull request descriptions) */
 
.formatted-fixed {
 
  white-space: pre-wrap;
 
}
 
.changeset_hash {
 
  font-family: Lucida Console, Consolas, Monaco, Inconsolata, Liberation Mono, monospace;
 
}
 
.empty_data {
 
  color: #B9B9B9;
 
}
 
.inline-comments-general.show-general-status .hidden.general-only {
 
  display: block !important;
 
}
 
.truncate {
 
  white-space: nowrap;
 
  overflow: hidden;
 
  text-overflow: ellipsis;
 
  -o-text-overflow: ellipsis;
 
  -ms-text-overflow: ellipsis;
 
}
 
.truncate.autoexpand:hover {
 
  overflow: visible;
 
}
 
/* show comment anchors when hovering over panel-heading */
 
a.permalink {
 
  visibility: hidden;
 
}
 
.panel-heading:hover .permalink {
 
  visibility: visible;
 
}
 
.radio-inline,
 
.checkbox-inline {
 
  vertical-align: inherit;
 
}
kallithea/public/less/style.less
Show inline comments
 
@@ -33,51 +33,49 @@ a {
 
  text-decoration: none;
 
}
 
a:hover {
 
  color: #576622;
 
  text-decoration: underline;
 
}
 
code,
 
.code pre,
 
.linenos pre,
 
div.readme pre,
 
div.formatted-fixed,
 
.CodeMirror .CodeMirror-code pre {
 
  font-size: 12px;
 
  font-family: Lucida Console, Consolas, Monaco, Inconsolata, Liberation Mono, monospace;
 
}
 

	
 
/* class for texts where newlines should be preserved, for very light-weight ascii art markup (like pull request descriptions) */
 
.formatted-fixed {
 
  white-space: pre-wrap;
 
}
 

	
 
.changeset_hash {
 
  font-family: Lucida Console, Consolas, Monaco, Inconsolata, Liberation Mono, monospace;
 
}
 
.empty_data {
 
  color: #B9B9B9;
 
}
 

	
 
.inline-comments-general.show-general-status .hidden.general-only {
 
  display: block !important;
 
}
 
.truncate {
 
  white-space: nowrap;
 
  overflow: hidden;
 
  text-overflow: ellipsis;
 
  -o-text-overflow: ellipsis;
 
  -ms-text-overflow: ellipsis;
 
}
 
.truncate.autoexpand:hover {
 
  overflow: visible;
 
}
 

	
 
/* show comment anchors when hovering over panel-heading */
 
a.permalink {
 
  visibility: hidden;
 
}
 
.panel-heading:hover .permalink {
 
  visibility: visible;
 
}
 

	
 
.radio-inline,
 
.checkbox-inline {
kallithea/templates/admin/user_groups/user_group_edit_members.html
Show inline comments
 
% if c.group_members_obj:
 
  <ul class="user_group_member">
 
  %for user in c.group_members_obj:
 
    <li>
 
        ${h.gravatar_div(user.email, size=24)}
 
        <div>${h.link_to(user.full_name_and_username, h.url('edit_user',id=user.user_id))}</div>
 
    </li>
 
  %endfor
 
  </ul>
 
%else:
 
    <span class="empty_data">${_('No members yet')}</span>
 
    <span class="text-muted">${_('No members yet')}</span>
 
%endif
kallithea/templates/base/perms_summary.html
Show inline comments
 
## snippet for displaying permissions overview for users
 
## usage:
 
##    <%namespace name="p" file="/base/perms_summary.html"/>
 
##    ${p.perms_summary(c.perm_user.permissions)}
 

	
 
<%def name="perms_summary(permissions, show_all=False, actions=True)">
 
<div id="perms">
 
     %for section in sorted(permissions.keys()):
 
        <div class="perms_section_head">
 
            <h4>${section.replace("_"," ").capitalize()}</h4>
 
            %if section != 'global':
 
              <div class="pull-right">
 
                ${_('Show')}:
 
                <label>${h.checkbox('perms_filter_none_%s' % section, 'none', 'checked', class_='perm_filter filter_%s' % section, **{'data-section':section, 'data-perm_type':'none'})}<span class="perm_tag none">${_('None')}</span></label>
 
                <label>${h.checkbox('perms_filter_read_%s' % section, 'read', 'checked', class_='perm_filter filter_%s' % section, **{'data-section':section, 'data-perm_type':'read'})}<span class="perm_tag read">${_('Read')}</span></label>
 
                <label>${h.checkbox('perms_filter_write_%s' % section, 'write', 'checked', class_='perm_filter filter_%s' % section, **{'data-section':section, 'data-perm_type':'write'})}<span class="perm_tag write">${_('Write')}</span></label>
 
                <label>${h.checkbox('perms_filter_admin_%s' % section, 'admin', 'checked', class_='perm_filter filter_%s' % section, **{'data-section':section, 'data-perm_type':'admin'})}<span class="perm_tag admin">${_('Admin')}</span></label>
 
              </div>
 
            %endif
 
        </div>
 
        %if not permissions[section]:
 
            <span class="empty_data">${_('No permissions defined yet')}</span>
 
            <span class="text-muted">${_('No permissions defined yet')}</span>
 
        %else:
 
        <div id='tbl_list_wrap_${section}'>
 
         <table id="tbl_list_${section}" class="table">
 
          ## global permission box
 
          %if section == 'global':
 
              <thead>
 
                <tr>
 
                  <th class="left">${_('Permission')}</th>
 
                  %if actions:
 
                  <th class="left">${_('Edit Permission')}</th>
 
                  %endif
 
                </tr>
 
              </thead>
 
              <tbody>
 
              %for k in permissions[section]:
 
                  <tr>
 
                      <td>
 
                          ${h.get_permission_name(k)}
 
                      </td>
 
                      %if actions:
 
                      <td>
 
                           <a href="${h.url('admin_permissions')}">${_('Edit')}</a>
 
                      </td>
 
                      %endif
kallithea/templates/compare/compare_cs.html
Show inline comments
 
## Changesets table with graph
 
<%namespace name="changelog_table" file="/changelog/changelog_table.html"/>
 
<div>
 
  %if not c.cs_ranges:
 
    <span class="empty_data">${_('No changesets')}</span>
 
    <span class="text-muted">${_('No changesets')}</span>
 
  %else:
 

	
 
    %if c.ancestors:
 
      <div class="ancestor">
 
        %if len(c.ancestors) > 1:
 
        <div class="text-danger">
 
          ${_('Criss cross merge situation with multiple merge ancestors detected!')}
 
        </div>
 
        <div>
 
          ${_('Please merge the target branch to your branch before creating a pull request.')}
 
        </div>
 
        %endif
 
        <div>
 
          ${_('Merge Ancestor')}:
 
          %for ancestor in c.ancestors:
 
            ${h.link_to(h.short_id(ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=ancestor), class_="changeset_hash")}
 
          %endfor
 
        </div>
 
      </div>
 
    %endif
 

	
 
    <div id="graph_nodes">
 
        <canvas id="graph_canvas"></canvas>
 
    </div>
kallithea/templates/compare/compare_diff.html
Show inline comments
 
@@ -45,49 +45,49 @@ ${self.repo_context_bar('changelog')}
 

	
 
    %if c.compare_home:
 
        <div id="changeset_compare_view_content" class="panel-body">
 
         <h4 class="text-muted">${_('Compare revisions, branches, bookmarks, or tags.')}</h4>
 
        </div>
 
    %else:
 
        <div id="changeset_compare_view_content" class="panel-body">
 
                ##CS
 
                <h5>${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</h5>
 
                <%include file="compare_cs.html" />
 

	
 
                ## FILES
 
                <h5>
 
                % if c.limited_diff:
 
                    ${ungettext('%s file changed', '%s files changed', len(c.file_diff_data)) % len(c.file_diff_data)}:
 
                % else:
 
                    ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.file_diff_data)) % (len(c.file_diff_data),c.lines_added,c.lines_deleted)}:
 
                %endif
 

	
 
                ${c.ignorews_url(request.GET)}
 
                ${c.context_url(request.GET)}
 
                </h5>
 
                <div class="cs_files">
 
                  %if not c.file_diff_data:
 
                     <span class="empty_data">${_('No files')}</span>
 
                     <span class="text-muted">${_('No files')}</span>
 
                  %endif
 
                  %for fid, url_fid, op, a_path, path, diff, stats in c.file_diff_data:
 
                    <div class="cs_${op} clearfix">
 
                      <span class="node">
 
                          <i class="icon-diff-${op}"></i>
 
                          ${h.link_to(h.safe_unicode(path), '#%s' % fid)}
 
                      </span>
 
                      <div class="changes">${h.fancy_file_stats(stats)}</div>
 
                    </div>
 
                  %endfor
 
                  %if c.limited_diff:
 
                    <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h5>
 
                  %endif
 
                </div>
 
        </div>
 
      </div>
 
    %endif
 

	
 
    %if not c.compare_home:
 
        ## diff block
 
        <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
        ${diff_block.diff_block_js()}
 
        ${diff_block.diff_block(c.a_repo.repo_name, c.a_ref_type, c.a_ref_name, c.a_rev,
 
                                c.cs_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev, c.file_diff_data)}
kallithea/templates/pullrequests/pullrequest_data.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
<%def name="pullrequest_overview(pullrequests)">
 

	
 
%if not len(pullrequests):
 
    <div class="empty_data">${_('No entries')}</div>
 
    <div class="text-muted">${_('No entries')}</div>
 
    <% return %>
 
%endif
 

	
 
<div>
 
  <table class="table">
 
    <thead>
 
      <tr>
 
        <th>${_('Vote')}</th>
 
        <th>${_('Title')}</th>
 
        <th>${_('Owner')}</th>
 
        <th>${_('Age')}</th>
 
        <th>${_('From')}</th>
 
        <th>${_('To')}</th>
 
        <th>${_('Delete')}</th>
 
      </tr>
 
    </thead>
 
% for pr in pullrequests:
 
    <tr class="${'pr-closed' if pr.is_closed() else ''}">
 
      <td>
 
        <% status = pr.user_review_status(request.authuser.user_id) %>
 
        %if status:
 
          <i class="icon-circle changeset-status-${status}" title="${_('You voted: %s') % h.changeset_status_lbl(status)}"></i>
 
        %else:
 
          <i class="icon-circle changeset-status-not_reviewed" title="${_('You didn\'t vote')}"></i>
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -282,49 +282,49 @@ ${self.repo_context_bar('showpullrequest
 
              <h5>
 
                  ${comment.comment_count(c.inline_cnt, len(c.comments))}
 
              </h5>
 
              ##CS
 
              <h5>
 
                ${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}
 
              </h5>
 
              <%include file="/compare/compare_cs.html" />
 

	
 
              <h5>
 
              ${_('Common ancestor')}:
 
              ${h.link_to(h.short_id(c.a_rev),h.url('changeset_home',repo_name=c.a_repo.repo_name,revision=c.a_rev), class_="changeset_hash")}
 
              </h5>
 

	
 
              ## FILES
 
              <h5>
 
              % if c.limited_diff:
 
                  ${ungettext('%s file changed', '%s files changed', len(c.file_diff_data)) % len(c.file_diff_data)}:
 
              % else:
 
                  ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.file_diff_data)) % (len(c.file_diff_data),c.lines_added,c.lines_deleted)}:
 
              %endif
 
              </h5>
 
              <div class="cs_files">
 
                %if not c.file_diff_data:
 
                   <span class="empty_data">${_('No files')}</span>
 
                   <span class="text-muted">${_('No files')}</span>
 
                %endif
 
                %for fid, url_fid, op, a_path, path, diff, stats in c.file_diff_data:
 
                    <div class="cs_${op} clearfix">
 
                      <span class="node">
 
                          <i class="icon-diff-${op}"></i>
 
                          ${h.link_to(h.safe_unicode(path), '#%s' % fid)}
 
                      </span>
 
                      <div class="changes">${h.fancy_file_stats(stats)}</div>
 
                    </div>
 
                %endfor
 
                %if c.limited_diff:
 
                  <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h5>
 
                %endif
 
              </div>
 
            </div>
 
        </div>
 
    </div>
 
    <script>
 
    var _USERS_AC_DATA = ${h.js(c.users_array)};
 
    // TODO: switch this to pyroutes
 
    AJAX_COMMENT_URL = ${h.js(url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id))};
 
    AJAX_COMMENT_DELETE_URL = ${h.js(url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__'))};
 

	
 
    pyroutes.register('pullrequest_comment', ${h.js(url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s'))}, ['repo_name', 'pull_request_id']);
kallithea/tests/functional/test_compare_local.py
Show inline comments
 
@@ -105,66 +105,66 @@ class TestCompareController(TestControll
 
        response.mustcontain('''<a href="#C--e3305437df55">test_and_report.sh</a>''')
 
        response.mustcontain('''<a href="#C--c8e92ef85cd1">.hgignore</a>''')
 
        response.mustcontain('''<a href="#C--6e08b694d687">.hgtags</a>''')
 
        response.mustcontain('''<a href="#C--2c14b00f3393">docs/api/index.rst</a>''')
 
        response.mustcontain('''<a href="#C--430ccbc82bdf">vcs/__init__.py</a>''')
 
        response.mustcontain('''<a href="#C--9c390eb52cd6">vcs/backends/hg.py</a>''')
 
        response.mustcontain('''<a href="#C--ebb592c595c0">vcs/utils/__init__.py</a>''')
 
        response.mustcontain('''<a href="#C--7abc741b5052">vcs/utils/annotate.py</a>''')
 
        response.mustcontain('''<a href="#C--2ef0ef106c56">vcs/utils/diffs.py</a>''')
 
        response.mustcontain('''<a href="#C--3150cb87d4b7">vcs/utils/lazy.py</a>''')
 

	
 
    def test_index_branch_hg(self):
 
        self.log_user()
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=HG_REPO,
 
                                    org_ref_type="branch",
 
                                    org_ref_name='default',
 
                                    other_ref_type="branch",
 
                                    other_ref_name='default',
 
                                    ))
 

	
 
        response.mustcontain('%s@default' % (HG_REPO))
 
        response.mustcontain('%s@default' % (HG_REPO))
 
        # branch are equal
 
        response.mustcontain('<span class="empty_data">No files</span>')
 
        response.mustcontain('<span class="empty_data">No changesets</span>')
 
        response.mustcontain('<span class="text-muted">No files</span>')
 
        response.mustcontain('<span class="text-muted">No changesets</span>')
 

	
 
    def test_index_branch_git(self):
 
        self.log_user()
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=GIT_REPO,
 
                                    org_ref_type="branch",
 
                                    org_ref_name='master',
 
                                    other_ref_type="branch",
 
                                    other_ref_name='master',
 
                                    ))
 

	
 
        response.mustcontain('%s@master' % (GIT_REPO))
 
        response.mustcontain('%s@master' % (GIT_REPO))
 
        # branch are equal
 
        response.mustcontain('<span class="empty_data">No files</span>')
 
        response.mustcontain('<span class="empty_data">No changesets</span>')
 
        response.mustcontain('<span class="text-muted">No files</span>')
 
        response.mustcontain('<span class="text-muted">No changesets</span>')
 

	
 
    def test_compare_revisions_hg(self):
 
        self.log_user()
 
        rev1 = 'b986218ba1c9'
 
        rev2 = '3d8f361e72ab'
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=HG_REPO,
 
                                    org_ref_type="rev",
 
                                    org_ref_name=rev1,
 
                                    other_ref_type="rev",
 
                                    other_ref_name=rev2,
 
                                    ))
 
        response.mustcontain('%s@%s' % (HG_REPO, rev1))
 
        response.mustcontain('%s@%s' % (HG_REPO, rev2))
 

	
 
        ## outgoing changesets between those revisions
 
        response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/3d8f361e72ab303da48d799ff1ac40d5ac37c67e">r1:%s</a>""" % (HG_REPO, rev2))
 

	
 
        response.mustcontain('1 file changed with 7 insertions and 0 deletions')
 
        ## files
 
        response.mustcontain("""<a href="#C--c8e92ef85cd1">.hgignore</a>""")
 

	
 
    def test_compare_revisions_git(self):
0 comments (0 inline, 0 general)