Changeset - 241a5167c4e0
[Not reviewed]
beta
0 4 2
Marcin Kuzminski - 14 years ago 2011-07-10 13:07:35
marcin@python-works.com
Added quick menu for each repo in main page.
6 files changed with 75 insertions and 11 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/css/style.css
Show inline comments
 
@@ -370,7 +370,6 @@ border-right:1px solid #464646;
 
background:url("../images/quick_l_selected.png") no-repeat top left;
 
}
 
 
 
#header #header-inner #quick ul {
 
top:29px;
 
right:0;
 
@@ -562,6 +561,33 @@ margin:0;
 
padding:12px 9px 7px 24px;
 
}
 
 
 
.quick_repo_menu{
 
	background: #FFF url("../images/vertical-indicator.png") 6px 9px no-repeat !important;
 
	cursor: pointer;
 
}
 
.quick_repo_menu.active{
 
    background: #FFF url("../images/horizontal-indicator.png") 4px 9px no-repeat !important;
 
    cursor: pointer;
 
}
 
.quick_repo_menu .menu_items{
 
	margin-top:6px;
 
	position: absolute;
 
	background-color:#FFF;
 
	padding: 4px;
 
    background: none repeat scroll 0 0 #FFFFFF;
 
    border-color: #003367 #666666 #666666;
 
    border-right: 1px solid #666666;
 
    border-style: solid;
 
    border-width: 1px;
 
}
 
.quick_repo_menu .menu_items .icon img{
 
	margin-bottom:-2px;
 
}
 
.quick_repo_menu .menu_items.hidden{
 
	display: none;
 
}
 
 
#content #left {
 
left:0;
 
width:280px;
rhodecode/public/images/horizontal-indicator.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
rhodecode/public/images/vertical-indicator.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
rhodecode/templates/base/base.html
Show inline comments
 
@@ -169,7 +169,6 @@
 
						            }
 
						            if (req){
 
						                for (n in nodes){
 
						                    console.log(n);
 
						                    if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
 
						                        obsolete.push(nodes[n]); 
 
						                    }
rhodecode/templates/base/root.html
Show inline comments
 
@@ -116,7 +116,19 @@
 
                 YUE.preventDefault(e);
 
             });
 
               
 
            tooltip_activate()
 
            tooltip_activate();
 
            
 
            YUE.on(YUQ('.quick_repo_menu'),'click',function(e){
 
            	var menu = e.currentTarget.firstElementChild;
 
            	if(YUD.hasClass(menu,'hidden')){
 
            		YUD.addClass(e.currentTarget,'active');
 
            		YUD.removeClass(menu,'hidden');
 
            	}else{
 
            		YUD.removeClass(e.currentTarget,'active');
 
            		YUD.addClass(menu,'hidden');
 
            	}
 
            })
 
            
 
           })   
 
            </script>
 
        
rhodecode/templates/index_base.html
Show inline comments
 
@@ -66,6 +66,7 @@
 
            <table>
 
            <thead>
 
                <tr>
 
                    <th class="left"></th>
 
                    <th class="left">${get_sort(_('Name'))}</th>
 
                    <th class="left">${get_sort(_('Description'))}</th>
 
                    <th class="left">${get_sort(_('Last change'))}</th>
 
@@ -78,22 +79,48 @@
 
            <tbody>
 
            %for cnt,repo in enumerate(c.repos_list):
 
                <tr class="parity${cnt%2}">
 
                    <td class="quick_repo_menu inactive">
 
                    <ul class="menu_items hidden">
 
                      <li>
 
                         <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo['name'])}">
 
                         <span class="icon">
 
                             <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
 
                         </span>
 
                         <span>${_('Summary')}</span>                 
 
                         </a>             
 
                      </li>
 
                      <li>
 
                         <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo['name'])}">
 
                         <span class="icon">
 
                             <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
 
                         </span>
 
                         <span>${_('Changelog')}</span>                 
 
                         </a>             
 
                      </li>
 
                      <li>
 
                         <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo['name'])}">
 
                         <span class="icon">
 
                             <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
 
                         </span>
 
                         <span>${_('Files')}</span>                 
 
                         </a>             
 
                      </li>                                    
 
                    </ul>
 
                    </td>
 
                    <td>
 
                    ## TYPE OF REPO
 
                    <div style="white-space: nowrap">
 
                     ## TYPE OF REPO
 
                     %if repo['dbrepo']['repo_type'] =='hg':
 
                       <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/>
 
                       <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
 
                     %elif repo['dbrepo']['repo_type'] =='git':
 
                       <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/>
 
                     %else:
 
                       
 
                       <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
 
                     %endif 
 
                    
 
                     ##PRIVATE/PUBLIC
 
                     %if repo['dbrepo']['private']:
 
                        <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url("/images/icons/lock.png")}"/>
 
                        <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
 
                     %else:
 
                        <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url("/images/icons/lock_open.png")}"/>
 
                        <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
 
                     %endif
 
                    
 
                    ##NAME   
 
@@ -103,7 +130,7 @@
 
                        <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}">
 
                        <img class="icon" alt="${_('fork')}"
 
                        title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" 
 
                        src="${h.url("/images/icons/arrow_divide.png")}"/></a>
 
                        src="${h.url('/images/icons/arrow_divide.png')}"/></a>
 
                    %endif
 
                    </div>
 
                    </td>
0 comments (0 inline, 0 general)