diff --git a/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js b/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js index f022bb584b..15c83bb80b 100644 --- a/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js +++ b/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js @@ -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 {0}', + + 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',