added contact to InfoPanel

This commit is contained in:
Sebastian Sdorra
2011-04-29 14:10:07 +02:00
parent 18174093c7
commit 3ae6866865

View File

@@ -216,10 +216,16 @@ Ext.reg('repositoryGrid', Sonia.repository.Grid);
Sonia.repository.InfoPanel = Ext.extend(Ext.Panel, { Sonia.repository.InfoPanel = Ext.extend(Ext.Panel, {
linkTemplate: '<a target="_blank" href="{0}">{0}</a>', linkTemplate: '<a target="_blank" href="{0}">{0}</a>',
mailTemplate: '<a href="mailto: {0}">{0}</a>',
actionLinkTemplate: '<a style="cursor: pointer;">{0}</a>', actionLinkTemplate: '<a style="cursor: pointer;">{0}</a>',
initComponent: function(){ initComponent: function(){
var contact = '';
if ( this.item.contact != null ){
contact = String.format(this.mailTemplate, this.item.contact);
}
// TODO i18n // TODO i18n
var items = [{ var items = [{
xtype: 'label', xtype: 'label',
@@ -233,6 +239,12 @@ Sonia.repository.InfoPanel = Ext.extend(Ext.Panel, {
},{ },{
xtype: 'box', xtype: 'box',
html: this.getRepositoryTypeText(this.item.type) html: this.getRepositoryTypeText(this.item.type)
},{
xtype: 'label',
text: 'Contact: '
},{
xtype: 'box',
html: contact
},{ },{
xtype: 'label', xtype: 'label',
text: 'Url: ' text: 'Url: '