diff --git a/scm-webapp/src/main/webapp/index.html b/scm-webapp/src/main/webapp/index.html
index 6b727a0b2a..ae9ff6a176 100644
--- a/scm-webapp/src/main/webapp/index.html
+++ b/scm-webapp/src/main/webapp/index.html
@@ -200,7 +200,7 @@
© SCM Manager
- ${version}
+ ${version}
diff --git a/scm-webapp/src/main/webapp/resources/js/i18n/de.js b/scm-webapp/src/main/webapp/resources/js/i18n/de.js
index 2e0b132f34..c7780c6e8c 100644
--- a/scm-webapp/src/main/webapp/resources/js/i18n/de.js
+++ b/scm-webapp/src/main/webapp/resources/js/i18n/de.js
@@ -570,7 +570,11 @@ if (Sonia.scm.Main){
errorNoPermissionsMessage: 'Sie haben nicht genügend Rechte um diese Aktion auszuführen.',
errorNotFoundTitle: 'Nicht gefunden',
- errorNotFoundMessage: 'Die Ressource konnte nicht gefunden werden.'
+ errorNotFoundMessage: 'Die Ressource konnte nicht gefunden werden.',
+
+ loggedInTextTemplate: 'angemeldet als {state.user.name} - ',
+ userInfoMailText: 'E-Mail',
+ userInfoGroupsText: 'Gruppen'
});
}
diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js
index d64bff87a0..2b43f92286 100644
--- a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js
+++ b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js
@@ -70,6 +70,10 @@ Sonia.scm.Main = Ext.extend(Ext.util.Observable, {
errorNotFoundTitle: 'Not found',
errorNotFoundMessage: 'The resource could not be found.',
+
+ loggedInTextTemplate: 'logged in as {state.user.name} - ',
+ userInfoMailText: 'Mail',
+ userInfoGroupsText: 'Groups',
mainTabPanel: null,
@@ -526,6 +530,44 @@ Sonia.scm.Main = Ext.extend(Ext.util.Observable, {
getMainTabPanel: function(){
return this.mainTabPanel;
+ },
+
+ renderUserInformations: function(state){
+ if ( state.user.name != 'anonymous' ){
+ var tpl = new Ext.XTemplate(this.loggedInTextTemplate);
+ tpl.overwrite(Ext.get('scm-userinfo'), state);
+ var text = '';
+ if (state.user.mail){
+ text += this.userInfoMailText + ': ' + state.user.mail + '
';
+ }
+ if (state.groups && state.groups.length > 0){
+ text += this.userInfoGroupsText + ': ' + this.getGroups(state.groups) + '
';
+ }
+
+ Ext.QuickTips.register({
+ target : 'scm-userinfo-tip',
+ title : state.user.displayName,
+ text : text,
+ enabled : true
+ });
+ }
+ },
+
+ getGroups: function(groups){
+ var out = '';
+ var s = groups.length;
+ for ( var i=0; i