add a welcome badge on user login

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1426833 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-29 21:07:25 +00:00
parent 03345f6ab8
commit ebf1d0b092
4 changed files with 9 additions and 2 deletions

View File

@ -92,6 +92,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
hideElementWithKarma();
$("#main-content").empty();
$("#user-messages" ).empty();
$("#login-welcome" ).hide();
$.ajax({
url: 'restServices/redbackServices/loginService/logout',
complete: function(){

View File

@ -133,7 +133,6 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i
if(window.archivaModel.adminExists==false){
displayErrorMessage($.i18n.prop("admin.creation.mandatory"));
}
}
/**

View File

@ -445,7 +445,8 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
}
clearForm("#user-login-form");
decorateMenuWithKarma(user);
$("#login-welcome" ).show();
$("#welcome-label" ).html("Welcome " + user.username());
return;
}
var modalLoginErrMsg=$("#modal-login-err-message");

View File

@ -75,7 +75,13 @@
<div style="max-height: 40px" class="navbar-inner">
<div class="container-fluid">
<div id="organisation-logo" style="max-height: 40px" class="pull-left"></div>
<ul class="nav pull-right">
<li id="login-welcome" style="display: none">
<a>
<span class="label label-important" id="welcome-label"></span>
</a>
</li>
<li id="create-admin-link" style="display: none">
<a href="#open-admin-create-box" onclick="adminCreateBox();" id="create-admin-link-a">
<span class="label label-important">${$.i18n.prop('create.admin.page.link')}</span>