mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-21 23:12:11 +01:00
added Sonia.hg.InformationPanel
This commit is contained in:
@@ -165,6 +165,36 @@ Sonia.hg.ConfigPanel = Ext.extend(Sonia.config.ConfigForm, {
|
||||
|
||||
Ext.reg("hgConfigPanel", Sonia.hg.ConfigPanel);
|
||||
|
||||
// hg information panel
|
||||
|
||||
Sonia.hg.InformationPanel = Ext.extend(Sonia.repository.InfoPanel,{
|
||||
|
||||
checkoutTemplate: 'hg clone <a href="{0}" target="_blank">{0}</a>',
|
||||
|
||||
modifyDefaultConfig: function(config){
|
||||
var items = config.items;
|
||||
if ( items == null ){
|
||||
items = [];
|
||||
}
|
||||
items.push({
|
||||
xtype: 'label',
|
||||
text: 'Checkout: '
|
||||
},{
|
||||
xtype: 'box',
|
||||
html: String.format(
|
||||
this.checkoutTemplate,
|
||||
this.getRepositoryUrlWithUsername()
|
||||
)
|
||||
},
|
||||
this.createSpacer(),
|
||||
this.createChangesetViewerLink()
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Ext.reg("hgRepositoryInfoPanel", Sonia.hg.InformationPanel);
|
||||
|
||||
// i18n
|
||||
|
||||
if ( i18n != null && i18n.country == 'de' ){
|
||||
@@ -194,7 +224,15 @@ if ( i18n != null && i18n.country == 'de' ){
|
||||
|
||||
}
|
||||
|
||||
// register panel
|
||||
// register information panel
|
||||
|
||||
initCallbacks.push(function(main){
|
||||
main.registerInfoPanel('hg', {
|
||||
xtype: 'hgRepositoryInfoPanel'
|
||||
});
|
||||
});
|
||||
|
||||
// register config panel
|
||||
|
||||
registerConfigPanel({
|
||||
id: 'hgConfigForm',
|
||||
|
||||
Reference in New Issue
Block a user