diff options
author | Olivier Lamy <olamy@apache.org> | 2012-09-11 21:30:46 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-09-11 21:30:46 +0000 |
commit | a9c1f188955ddd6eec4ee0568f89520812db8538 (patch) | |
tree | edf0bf0fa41c085f1a74dc785ba5a764433da4d4 /archiva-modules/archiva-web | |
parent | 0b904bd4d8f45faba81716074efccc954ad93c83 (diff) | |
download | archiva-a9c1f188955ddd6eec4ee0568f89520812db8538.tar.gz archiva-a9c1f188955ddd6eec4ee0568f89520812db8538.zip |
[MRM-648] Add description field to the different types of repositories and proxies
implements UI part.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1383622 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
2 files changed, 23 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js index c398d9a99..39abea99c 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js @@ -33,7 +33,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery ]; ManagedRepository=function(id,name,layout,indexDirectory,location,snapshots,releases,blockRedeployments,cronExpression, - scanned,daysOlder,retentionCount,deleteReleasedSnapshots,stageRepoNeeded){ + scanned,daysOlder,retentionCount,deleteReleasedSnapshots,stageRepoNeeded,description){ var self=this; @@ -95,7 +95,9 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery this.blockRedeployments=ko.observable(blockRedeployments?blockRedeployments:false); this.blockRedeployments.subscribe(function(newValue){self.modified(true)}); - + //private String name; + this.description=ko.observable(description); + this.description.subscribe(function(newValue){self.modified(true)}); this.getTypeLabel=function(){ for(var i=0;i<window.managedRepositoryTypes.length;i++){ @@ -156,7 +158,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery ,data.releases, data.blockRedeployments,data.cronExpression, data.scanned,data.daysOlder,data.retentionCount,data.deleteReleasedSnapshots, - data.stageRepoNeeded); + data.stageRepoNeeded,data.description); } mapArchivaRepositoryStatistics=function(data){ @@ -900,7 +902,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery }); var mainContent = $("#main-content"); ko.applyBindings(managedRepositoriesViewModel,mainContent.find("#managed-repositories-view").get(0)); - + activatePopoverDoc(); mainContent.find("#managed-repositories-pills #managed-repositories-view-a").tab('show'); removeMediumSpinnerImg("#main-content #managed-repositories-content"); activateManagedRepositoriesGridTab(); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html index 71f626ee3..db207ca95 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html @@ -90,6 +90,7 @@ <th>${$.i18n.prop('edit')}</th> <th>${$.i18n.prop('delete')}</th> <th>${$.i18n.prop('modified')}</th> + <th>${$.i18n.prop('description')}</th> <th>${$.i18n.prop('managedrepository.pomsnippet')}</th> <th title="${$.i18n.prop('managedrepository.stats')}">${$.i18n.prop('managedrepository.stats.grid.header')}</th> <th title="${$.i18n.prop('managedrepository.scan.directories')}">${$.i18n.prop('managedrepository.scan.directories.grid.header')}</th> @@ -144,6 +145,14 @@ {{else}} <td></td> {{/if}} + <td> + {{if row.description()}} + <a class="btn btn-warning btn-mini popover-doc" id="managedrepo-description-help" + data-content="${row.description()}" data-title="${$.i18n.prop('description')}"> + <i class="icon-question-sign icon-white"></i> + </a> + {{/if}} + </td> <td><a href="#" data-bind="click: function(){ showPomSnippet(row) }">${$.i18n.prop('managedrepository.pomsnippet')}</a></td> <td id="managedrepository-stats-${row.id()}"> <img src="images/utilities-system-monitor-22-22.png" data-original-title="${$.i18n.prop('managedrepository.stats')}" @@ -226,6 +235,14 @@ <input type="text" id="retentionCount" name="retentionCount" size="5" data-bind="value: managedRepository.retentionCount"/> </div> </div> + + <div class="control-group"> + <label class="control-label" for="daysOlder">${$.i18n.prop('description')}</label> + <div class="controls"> + <textarea rows="3" id="description" name="description" data-bind="value: managedRepository.description"></textarea> + </div> + </div> + <div class="control-group"> <label class="control-label" for="releases">${$.i18n.prop('releases')}</label> <div class="controls"> |