Changeset - 1619d9ebc1b9
[Not reviewed]
default
1 6 0
Sean Farley - 11 years ago 2015-02-18 00:02:34
sean.michael.farley@gmail.com
giticon.png: use repotag class to make an icon

A quick search revealed that some old css code was never used, so it was
removed.
7 files changed with 6 insertions and 14 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/contextbar.css
Show inline comments
 
/**
 
 * Stylesheets for the context bar
 
 */
 

	
 
i.icon-ellipsis-horizontal:after { content: ' ...';}
 
i.icon-git { background-image: url('../images/icons/giticon.png');}
 
i.icon-disabled { background-image: url('../images/icons/shading.png');} /* todo: use instead of minus sign */
 

	
 
i[class^='icon-'] {
 
    background-repeat: no-repeat;
 
    background-position: center;
 
    display: inline-block;
 
    min-width: 16px;
 
    min-height: 16px;
 
    margin: -2px 0 -4px 0;
 
    /* background-color: red; /* for debugging */
 

	
 
}
kallithea/public/css/style.css
Show inline comments
 
@@ -492,31 +492,24 @@ div.header img {
 
    width: 100%;
 
    border-radius: 10px;
 
    padding: 2px 7px;
 
}
 

	
 
#header #header-inner #quick .repo_switcher_type {
 
    position: absolute;
 
    left: 0;
 
    top: 9px;
 
    margin: 0px 2px 0px 2px;
 
}
 

	
 
#header #header-inner #quick li ul li a.git,
 
#header #header-inner #quick li ul li a.git:hover {
 
    background-image: url("../images/icons/giticon.png");
 
    padding-left: 42px;
 
    background-position: 20px 9px;
 
}
 

	
 
.groups_breadcrumbs a {
 
    color: #fff;
 
}
 

	
 
.groups_breadcrumbs a:hover {
 
    color: #bfe3ff;
 
    text-decoration: none;
 
}
 

	
 
td.quick_repo_menu:before {
 
    font-family: "kallithea";
 
    content: "\e80f";           /* triangle-right */
kallithea/public/images/icons/giticon.png
Show inline comments
 
deleted file
 
binary diff not shown
Show images
kallithea/templates/base/base.html
Show inline comments
 
@@ -92,25 +92,25 @@
 
    def is_current(selected):
 
        if selected == current:
 
            return h.literal('class="current"')
 
    %>
 

	
 
  <!--- CONTEXT BAR -->
 
  <div id="context-bar" class="box">
 
      <h2>
 
        %if h.is_hg(c.db_repo):
 
          <span class="repotag">hg</span>
 
        %endif
 
        %if h.is_git(c.db_repo):
 
          <i class="icon-git" style="color: #e85634; font-size: 24px"></i>
 
          <span class="repotag">git</span>
 
        %endif
 

	
 
        ## public/private
 
        %if c.db_repo.private:
 
          <i class="icon-keyhole-circled"></i>
 
        %else:
 
          <i class="icon-globe"></i>
 
        %endif
 
        ${h.repo_link(c.db_repo.groups_and_repo)}
 

	
 
        %if current == 'createfork':
 
         - ${_('Create Fork')}
 
@@ -354,25 +354,25 @@
 
            if (!state.id){
 
              return state.text; // optgroup
 
            }
 
            var obj_dict = state.obj;
 
            var tmpl = '';
 

	
 
            if(obj_dict && state.type == 'repo'){
 
                tmpl += '<span class="repo-icons">';
 
                if(obj_dict['repo_type'] === 'hg'){
 
                    tmpl += '<span class="repotag">hg</span> ';
 
                }
 
                else if(obj_dict['repo_type'] === 'git'){
 
                    tmpl += '<i class="icon-git"></i> ';
 
                    tmpl += '<span class="repotag">git</span> ';
 
                }
 
                if(obj_dict['private']){
 
                    tmpl += '<i class="icon-keyhole-circled"></i> ';
 
                }
 
                else if(visual_show_public_icon){
 
                    tmpl += '<i class="icon-globe"></i> ';
 
                }
 
                tmpl += '</span>';
 
            }
 
            if(obj_dict && state.type == 'group'){
 
                    tmpl += '<i class="icon-folder"></i> ';
 
            }
kallithea/templates/data_table/_dt_elements.html
Show inline comments
 
@@ -61,25 +61,25 @@
 
  <div style="white-space: nowrap; ${'opacity: 0.5' if rstate == 'repo_state_pending' else ''}}">
 
    ##NAME
 
    %if admin:
 
        <a href="${h.url('edit_repo',repo_name=name)}">
 
    %else:
 
        <a href="${h.url('summary_home',repo_name=name)}">
 
    %endif
 

	
 
    ##TYPE OF REPO
 
    %if h.is_hg(rtype):
 
        <span class="repotag" title="${_('Mercurial repository')}">hg</span>
 
    %elif h.is_git(rtype):
 
        <span title="${_('Git repository')}"><i class="icon-git" style="color: #e85634; font-size: 14px;"></i></span>
 
        <span class="repotag" title="${_('Git repository')}">git</span>
 
    %endif
 

	
 
    ##PRIVATE/PUBLIC
 
    %if private and c.visual.show_private_icon:
 
      <i class="icon-keyhole-circled" title="${_('Private repository')}" style="font-size: 16px; vertical-align: -2px; margin: 0px 1px 0px 3px"></i>
 
    %elif not private and c.visual.show_public_icon:
 
      <i class="icon-globe" title="${_('Public repository')}" style="font-size: 16px; vertical-align: -2px; margin: 0px 1px 0px 3px"></i>
 
    %else:
 
      <span style="margin: 0px 8px 0px 8px"></span>
 
    %endif
 
    ${get_name(name)}
 
    </a>
kallithea/tests/functional/test_home.py
Show inline comments
 
@@ -11,25 +11,25 @@ fixture = Fixture()
 

	
 
class TestHomeController(TestController):
 

	
 
    def test_index(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='home', action='index'))
 
        #if global permission is set
 
        response.mustcontain('Add Repository')
 
        # html in javascript variable:
 
        response.mustcontain('var data = {"totalRecords": %s' % len(Repository.getAll()))
 
        response.mustcontain(r'href=\"/%s\"' % HG_REPO)
 

	
 
        response.mustcontain(r'<i class=\"icon-git\"')
 
        response.mustcontain(r'<span class="repotag">git')
 
        response.mustcontain(r'<i class=\"icon-globe\"')
 

	
 
        response.mustcontain("""fixes issue with having custom format for git-log""")
 
        response.mustcontain("""/%s/changeset/5f2c6ee195929b0be80749243c18121c9864a3b3""" % GIT_REPO)
 

	
 
        response.mustcontain("""disable security checks on hg clone for travis""")
 
        response.mustcontain("""/%s/changeset/96507bd11ecc815ebc6270fdf6db110928c09c1e""" % HG_REPO)
 

	
 
    def test_repo_summary_with_anonymous_access_disabled(self):
 
        with fixture.anon_access(False):
 
            response = self.app.get(url(controller='summary',
 
                                        action='index', repo_name=HG_REPO),
kallithea/tests/functional/test_summary.py
Show inline comments
 
@@ -44,25 +44,25 @@ class TestSummaryController(TestControll
 
        response.mustcontain('''id="clone_url" readonly="readonly" value="http://test_admin@localhost:80/%s"''' % HG_REPO)
 
        response.mustcontain('''id="clone_url_id" readonly="readonly" value="http://test_admin@localhost:80/_%s"''' % ID)
 

	
 
    def test_index_git(self):
 
        self.log_user()
 
        ID = Repository.get_by_repo_name(GIT_REPO).repo_id
 
        response = self.app.get(url(controller='summary',
 
                                    action='index',
 
                                    repo_name=GIT_REPO))
 

	
 
        #repo type
 
        response.mustcontain(
 
            """<i class="icon-git" """
 
            """<span class="repotag">git"""
 
        )
 
        #public/private
 
        response.mustcontain(
 
            """<i class="icon-globe">"""
 
        )
 

	
 
        # clone url...
 
        response.mustcontain('''id="clone_url" readonly="readonly" value="http://test_admin@localhost:80/%s"''' % GIT_REPO)
 
        response.mustcontain('''id="clone_url_id" readonly="readonly" value="http://test_admin@localhost:80/_%s"''' % ID)
 

	
 
    def test_index_by_id_hg(self):
 
        self.log_user()
 
@@ -93,25 +93,25 @@ class TestSummaryController(TestControll
 
            RepoModel().delete(Repository.get_by_repo_name('repo_1'))
 
            Session().commit()
 

	
 
    def test_index_by_id_git(self):
 
        self.log_user()
 
        ID = Repository.get_by_repo_name(GIT_REPO).repo_id
 
        response = self.app.get(url(controller='summary',
 
                                    action='index',
 
                                    repo_name='_%s' % ID))
 

	
 
        #repo type
 
        response.mustcontain(
 
            """<i class="icon-git" """
 
            """<span class="repotag">git"""
 
        )
 
        #public/private
 
        response.mustcontain(
 
            """<i class="icon-globe">"""
 
        )
 

	
 
    def _enable_stats(self, repo):
 
        r = Repository.get_by_repo_name(repo)
 
        r.enable_statistics = True
 
        Session().add(r)
 
        Session().commit()
 

	
0 comments (0 inline, 0 general)