Changeset - 2a95d54b19e6
[Not reviewed]
default
0 3 0
Marcin Kuzminski - 15 years ago 2010-09-03 16:18:18
marcin@python-works.com
reimplemented tags/branches menu.
some css fixes as well for menus
3 files changed with 116 insertions and 50 deletions:
0 comments (0 inline, 0 general)
pylons_app/lib/base.py
Show inline comments
 
@@ -20,6 +20,11 @@ class BaseController(WSGIController):
 
        c.repo_name = get_repo_slug(request)
 
        c.cached_repo_list = _get_repos_cached()
 
        c.repo_switcher_list = _get_repos_switcher_cached(c.cached_repo_list)
 
        
 
        if c.repo_name:
 
            c.repository_tags = c.cached_repo_list[c.repo_name].tags
 
            c.repository_branches = c.cached_repo_list[c.repo_name].branches
 
                    
 
        self.sa = meta.Session
 
    
 
    def __call__(self, environ, start_response):
pylons_app/public/css/style.css
Show inline comments
 
@@ -323,7 +323,6 @@ div.options a:hover
 
/* -----------------------------------------------------------
 
	header -> quick
 
----------------------------------------------------------- */ 
 

	
 
#header #header-inner #quick,
 
#header #header-inner #quick ul
 
{
 
@@ -337,7 +336,7 @@ div.options a:hover
 
 
#header #header-inner #quick li
 
{
 
	margin: 0 4px 0 0;
 
    margin: 0 5px 0 0;
 
	padding: 0;
 
	position: relative;
 
	float: left;
 
@@ -352,7 +351,7 @@ div.options a:hover
 
	display: block;
 
	clear: both;
 
	overflow: hidden;
 
	background: #336699 url("../images/colors/blue/quick_l.png") no-repeat top left;
 
    background: #336699 url("../../resources/images/colors/blue/quick_l.png") no-repeat top left;
 
	color: #FFFFFF;
 
	font-weight: bold;
 
	text-decoration: none;
 
@@ -367,34 +366,45 @@ div.options a:hover
 
	height: 1%;
 
	display: block;
 
	float: left;
 
	background: url("../images/colors/blue/quick_r.png") no-repeat top right;
 
    background: url("../../resources/images/colors/blue/quick_r.png") no-repeat top right;
 
	border-left: 1px solid #3f6f9f;
 
}
 
 
#header #header-inner #quick li span.normal
 
{
 
    padding: 10px 12px 8px 12px;
 
    border: none;   
 
}
 
 
#header #header-inner #quick li span.icon
 
{
 
	top: 0;
 
	left: 0;
 
	padding: 8px 8px 4px 8px;
 
	background: url("../images/colors/blue/quick_l.png") no-repeat top left;
 
    background: url("../../resources/images/colors/blue/quick_l.png") no-repeat top left;
 
	border-left: none;
 
	border-right: 1px solid #2e5c89;
 
}
 
 
#header #header-inner #quick li a:hover
 
{
 
	background: #4e4e4e;
 
    background: #4e4e4e url("../../resources/images/colors/blue/quick_l_selected.png") no-repeat top left;
 
}
 
 
#header #header-inner #quick li a:hover span
 
{
 
	background: url("../images/colors/blue/quick_r_selected.png") no-repeat top right;
 
    background: url("../../resources/images/colors/blue/quick_r_selected.png") no-repeat top right;
 
	border-left: 1px solid #545454;
 
}
 
 
#header #header-inner #quick li a:hover span.normal
 
{
 
    border: none;   
 
}
 
 
#header #header-inner #quick li a:hover span.icon
 
{
 
	background: url("../images/colors/blue/quick_l_selected.png") no-repeat top left;
 
    background: url("../../resources/images/colors/blue/quick_l_selected.png") no-repeat top left;
 
	border-left: none;
 
	border-right: 1px solid #464646;
 
}
 
@@ -411,6 +421,7 @@ div.options a:hover
 
	background: #FFFFFF;
 
	border: 1px solid #666;
 
    border-top: 1px solid #003367;
 
    z-index: 100;
 
}
 

	
 
#header #header-inner #quick li ul li
 
@@ -423,36 +434,6 @@ div.options a:hover
 
	border: none;	
 
}
 
 
#header #header-inner #quick li ul li a.repos,#header #header-inner #quick li ul li a.repos:hover
 
{
 
	margin: 0;
 
	padding: 12px 9px 7px 28px;
 
	width: 167px;
 
	background: #FFFFFF url("../images/icons/folder_edit.png") no-repeat 8px 9px;
 
}
 
#header #header-inner #quick li ul li a.users,#header #header-inner #quick li ul li a.users:hover
 
{
 
	margin: 0;
 
	padding: 12px 9px 7px 28px;
 
	width: 167px;
 
	background: #FFFFFF url("../images/icons/user_edit.png") no-repeat 8px 9px;
 
}
 
#header #header-inner #quick li ul li a.settings,#header #header-inner #quick li ul li a.settings:hover
 
{
 
	margin: 0;
 
	padding: 12px 9px 7px 28px;
 
	width: 167px;
 
	background: #FFFFFF url("../images/icons/cog.png") no-repeat 8px 9px;
 
}
 
 
#header #header-inner #quick li ul li a.permissions,#header #header-inner #quick li ul li a.permissions:hover
 
{
 
	margin: 0;
 
	padding: 12px 9px 7px 28px;
 
	width: 167px;
 
	background: #FFFFFF url("../images/icons/key.png") no-repeat 8px 9px;
 
}
 

	
 
#header #header-inner #quick li ul li a
 
{
 
	margin: 0;
 
@@ -467,12 +448,25 @@ div.options a:hover
 
	font-weight: normal;
 
}
 
 
#header #header-inner #quick li ul li a.childs
 
{
 
    margin: 0;
 
    padding: 7px 9px 7px 24px;
 
    width: 167px;
 
    background: #FFFFFF url("../../resources/images/plus.png") no-repeat 8px 9px;
 
}
 
 
#header #header-inner #quick li ul li a:hover
 
{
 
	color: #000000;
 
	background: #FFFFFF;
 
}
 

	
 
#header #header-inner #quick li ul li a.childs:hover
 
{
 
    background: #FFFFFF url("../../resources/images/minus.png") no-repeat 8px 9px;
 
}
 
 
#header #header-inner #quick ul ul 
 
{
 
	top: auto;
 
@@ -498,6 +492,62 @@ div.options a:hover
 
	display: block;
 
}
 
 
 
/*ICONS*/
 
 
#header #header-inner #quick li ul li a.repos,
 
#header #header-inner #quick li ul li a.repos:hover
 
{
 
    background:url("../images/icons/folder_edit.png") no-repeat scroll 4px 9px #FFFFFF;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;
 
 
}
 
#header #header-inner #quick li ul li a.users,
 
#header #header-inner #quick li ul li a.users:hover
 
{
 
    background: #FFFFFF url("../images/icons/user_edit.png") no-repeat 4px 9px;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;    
 
}
 
#header #header-inner #quick li ul li a.settings,
 
#header #header-inner #quick li ul li a.settings:hover
 
{
 
    background: #FFFFFF url("../images/icons/cog.png") no-repeat 4px 9px;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;        
 
}
 
 
#header #header-inner #quick li ul li a.permissions,
 
#header #header-inner #quick li ul li a.permissions:hover
 
{
 
 
    background: #FFFFFF url("../images/icons/key.png") no-repeat 4px 9px;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;        
 
}
 
 
#header #header-inner #quick li ul li a.branches,#header #header-inner #quick li ul li a.branches:hover
 
{
 
 
    background: #FFFFFF url("../images/icons/arrow_branch.png") no-repeat 4px 9px;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;        
 
}
 
 
#header #header-inner #quick li ul li a.tags,#header #header-inner #quick li ul li a.tags:hover
 
{
 
 
    background: #FFFFFF url("../images/icons/tag_blue.png") no-repeat 4px 9px;
 
    margin:0;
 
    padding:12px 9px 7px 24px;
 
    width:167px;        
 
}
 
/* -----------------------------------------------------------
 
	header corners
 
----------------------------------------------------------- */ 
pylons_app/templates/base/base.html
Show inline comments
 
@@ -152,21 +152,32 @@
 
                   <span>${_('Changelog')}</span>                 
 
                   </a>             
 
                </li>   	            
 
                <li ${is_current('branches')}>
 
                   <a title="${_('Branches')}" href="${h.url('branches_home',repo_name=c.repo_name)}">
 
                
 
                <li ${is_current('switch_to')}>
 
                   <a title="${_('Switch to')}" href="#">
 
                   <span class="icon">
 
                       <img src="/images/icons/arrow_branch.png" alt="${_('Branches')}" />
 
                       <img src="/images/icons/arrow_switch.png" alt="${_('Switch to')}" />
 
                   </span>
 
                   <span>${_('Branches')}</span>                 
 
                   <span>${_('Switch to')}</span>                 
 
                   </a>             
 
                    <ul>
 
                        <li>
 
                            ${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
 
                            <ul>
 
						        %for cnt,branch in enumerate(c.repository_branches.items()):
 
						            <li>${h.link_to('%s - %s' % (branch[0],branch[1]),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
 
						        %endfor
 
                            </ul>                        
 
                </li> 	            
 
                <li ${is_current('tags')}>
 
                   <a title="${_('Tags')}" href="${h.url('tags_home',repo_name=c.repo_name)}">
 
                   <span class="icon">
 
                       <img src="/images/icons/tag_blue.png" alt="${_('Tags')}" />
 
                   </span>
 
                   <span>${_('Tags')}</span>                 
 
                   </a>             
 
                        <li>
 
                            ${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
 
                            <ul>
 
                                %for cnt,tag in enumerate(c.repository_tags.items()):
 
                                 <li>${h.link_to('%s - %s' % (tag[0],tag[1]),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
 
                                %endfor
 
                            </ul>                        
 
                        </li>                        
 
                    </ul>
 
                </li>
 
                <li ${is_current('files')}>
 
                   <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
 
@@ -220,7 +231,7 @@
 
				        <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
 
				        <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
 
				        <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
 
				        <li>${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>        
 
				        <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>        
 
				    </ul>
 
                </li>
 
				%endif
0 comments (0 inline, 0 general)