Changeset - f01540c62f8a
[Not reviewed]
beta
0 2 0
Mads Kiilerich - 13 years ago 2013-01-23 20:26:34
madski@unity3d.com
top menu: show user menu as a menu option like others, now also with login name

A minor regression: the message count is not clickable ... but it was hard to
hit, and somewhat confusing that different parts of the icon meant different
things.

The new html/css will probably need some review and cross platform testing.
2 files changed with 29 insertions and 32 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/css/style.css
Show inline comments
 
@@ -432,48 +432,50 @@ div:hover > a.permalink {
 
}
 

	
 
#header #header-inner #quick li span {
 
	top: 0;
 
	right: 0;
 
	height: 1%;
 
	display: block;
 
	float: left;
 
	border-left: 1px solid #3f6f9f;
 
	margin: 0;
 
	padding: 10px 12px 8px 10px;
 
}
 

	
 
#header #header-inner #quick li span.normal {
 
	border: none;
 
	padding: 10px 12px 8px;
 
}
 

	
 
#header #header-inner #quick li span.icon {
 
	top: 0;
 
	left: 0;
 
	border-left: none;
 
	border-right: 1px solid #2e5c89;
 
	padding: 8px 6px 4px;
 
	min-width: 16px;
 
	min-height: 16px;
 
}
 

	
 
#header #header-inner #quick li span.icon_short {
 
	top: 0;
 
	left: 0;
 
	border-left: none;
 
	border-right: 1px solid #2e5c89;
 
	padding: 8px 6px 4px;
 
}
 

	
 
#header #header-inner #quick li span.icon img,#header #header-inner #quick li span.icon_short img
 
	{
 
	margin: 0px -2px 0px 0px;
 
}
 

	
 
#header #header-inner #quick li.current a,
 
#header #header-inner #quick li a:hover {
 
	background: #4e4e4e no-repeat top left;
 
}
 

	
 
#header #header-inner #quick li.current a span,
 
#header #header-inner #quick li a:hover span {
 
	border-left: 1px solid #545454;
 
}
 
@@ -2069,49 +2071,49 @@ a.metatag[tag="license"]:hover {
 
}
 

	
 
.user-menu{
 
    margin: 0px !important;
 
    float: left;
 
}
 

	
 
.user-menu .container{
 
    padding:0px 4px 0px 4px;
 
    margin: 0px 0px 0px 0px;
 
}
 

	
 
.user-menu .gravatar{
 
    margin: 0px 0px 0px 0px;
 
    cursor: pointer;
 
}
 
.user-menu .gravatar.enabled{
 
	background-color: #FDF784 !important;
 
}
 
.user-menu .gravatar:hover{
 
    background-color: #FDF784 !important; 
 
}
 
#quick_login{
 
    min-height: 80px;
 
    margin: 37px 0 0 -251px;
 
    margin: 37px 0 0 -280px;
 
    padding: 4px;
 
    position: absolute;
 
    width: 278px;
 
    background-color: #003B76;
 
    background-repeat: repeat-x;
 
    background-image: -khtml-gradient(linear, left top, left bottom, from(#003B76), to(#00376E) );
 
    background-image: -moz-linear-gradient(top, #003b76, #00376e);
 
    background-image: -ms-linear-gradient(top, #003b76, #00376e);
 
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #003b76), color-stop(100%, #00376e) );
 
    background-image: -webkit-linear-gradient(top, #003b76, #00376e);
 
    background-image: -o-linear-gradient(top, #003b76, #00376e);
 
    background-image: linear-gradient(top, #003b76, #00376e);
 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b76', endColorstr='#00376e', GradientType=0 );
 

	
 
	z-index: 999;
 
	-webkit-border-radius: 0px 0px 4px 4px;
 
	-khtml-border-radius: 0px 0px 4px 4px;
 
	-moz-border-radius: 0px 0px 4px 4px;
 
	border-radius: 0px 0px 4px 4px;
 
	box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
 
}
 
#quick_login h4{
 
    color: #fff;
 
    padding: 5px 0px 5px 14px;
 
@@ -4507,72 +4509,60 @@ form.comment-inline-form {
 
    float:left;
 
    padding: 3px;
 
}
 

	
 
.inline-comments .comment .text {
 
    background-color: #FAFAFA;
 
}
 

	
 
.inline-comments .comments-number{
 
    padding:0px 0px 10px 0px;
 
    font-weight: bold;
 
    color: #666;
 
    font-size: 16px;
 
}
 
.inline-comments-button .add-comment{
 
	margin:2px 0px 8px 5px !important
 
}
 

	
 

	
 
.notification-paginator{
 
    padding: 0px 0px 4px 16px;
 
    float: left;    	
 
}
 

	
 
.notifications{
 
    border-radius: 4px 4px 4px 4px;
 
    -webkit-border-radius: 4px;
 
    -moz-border-radius: 4px;    
 
    float: right;
 
    margin: 20px 0px 0px 0px;
 
    position: absolute;
 
    text-align: center;
 
    width: 26px;
 
    z-index: 1000;
 
}
 
.notifications a{
 
.notifications {
 
	padding: 2px 7px !important;
 
	margin: 7px -4px -7px 4px !important;
 
	text-align: center;
 
	color:#888 !important;
 
	display: block;
 
	font-size: 10px;
 
	background-color: #DEDEDE !important;
 
    border-radius: 2px !important;
 
    -webkit-border-radius: 2px !important;
 
    -moz-border-radius: 2px !important;  	
 
}
 
.notifications a:hover{
 
	text-decoration: none !important;
 
	background-color: #EEEFFF !important;
 
}
 
	border-radius: 4px !important;
 
	-webkit-border-radius: 4px !important;
 
	-moz-border-radius: 4px !important;  	
 
}
 

	
 
.notification-header{
 
	padding-top:6px;
 
}
 
.notification-header .desc{
 
	font-size: 16px;
 
    height: 24px;
 
    float: left
 
}
 
.notification-list .container.unread{
 
	background: none repeat scroll 0 0 rgba(255, 255, 180, 0.6);
 
}
 
.notification-header .gravatar{
 
    background: none repeat scroll 0 0 transparent;
 
    padding: 0px 0px 0px 8px;	
 
}
 
.notification-list .container .notification-header .desc{
 
    font-weight: bold;
 
    font-size: 17px;
 
}
 
.notification-table{
 
	border: 1px solid #ccc;
 
    -webkit-border-radius: 6px 6px 6px 6px;
 
    -moz-border-radius: 6px 6px 6px 6px;
 
    border-radius: 6px 6px 6px 6px;
rhodecode/templates/base/base.html
Show inline comments
 
@@ -40,59 +40,66 @@
 
           <p class="footer-link">
 
                <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
 
           </p>
 
           <p class="footer-link-right">
 
               <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a>
 
               ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
 
           </p>
 
       </div>
 
   </div>
 
</div>
 
<!-- END FOOTER -->
 

	
 
### MAKO DEFS ###
 
<%def name="page_nav()">
 
    ${self.menu()}
 
</%def>
 

	
 
<%def name="breadcrumbs()">
 
    <div class="breadcrumbs">
 
    ${self.breadcrumbs_links()}
 
    </div>
 
</%def>
 

	
 
<%def name="usermenu()">
 
    <li>
 
        <a class="menu_link" id="quick_login_link">
 
            <span class="icon" style="background-image:url(${h.gravatar_url(c.rhodecode_user.email,16)}); background-repeat:no-repeat; background-position:center; ">
 
                %if c.rhodecode_user.username != 'default' and c.unread_notifications != -1:
 
                <span class="notifications" href="${h.url('notifications')}">${c.unread_notifications}</span>
 
                %endif
 
            </span>
 
            <span>
 
                %if c.rhodecode_user.username != 'default':
 
                ${c.rhodecode_user.username}
 
                %else:
 
                ${_('Not logged in')}
 
                %endif
 
            </span>
 
        </a>
 
    </li>
 

	
 
  <div class="user-menu">
 
      <div class="container">
 
       <div class="gravatar" id="quick_login_link">
 
           <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" />
 
       </div>
 
       %if c.rhodecode_user.username != 'default' and c.unread_notifications != 0:
 
        <div class="notifications">
 
          <a id="notification_counter" href="${h.url('notifications')}">${c.unread_notifications}</a>
 
        </div>
 
       %endif
 
      </div>
 
      <div id="quick_login" style="display:none">
 
        %if c.rhodecode_user.username == 'default':
 
            <h4>${_('Login to your account')}</h4>
 
            ${h.form(h.url('login_home',came_from=h.url.current()))}
 
            <div class="form">
 
                <div class="fields">
 
                    <div class="field">
 
                        <div class="label">
 
                            <label for="username">${_('Username')}:</label>
 
                        </div>
 
                        <div class="input">
 
                            ${h.text('username',class_='focus',size=40)}
 
                        </div>
 

	
 
                    </div>
 
                    <div class="field">
 
                        <div class="label">
 
                            <label for="password">${_('Password')}:</label>
 
                        </div>
 
                        <div class="input">
 
                            ${h.password('password',class_='focus',size=40)}
 
                        </div>
 

	
 
                    </div>
0 comments (0 inline, 0 general)