diff options
author | Olivier Lamy <olamy@apache.org> | 2012-06-05 23:17:37 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-06-05 23:17:37 +0000 |
commit | 04a065a53a34630bd6013fcd08e4711168f97111 (patch) | |
tree | f8a91461e8033a90ca3d91c3eb94315566eb45db /archiva-modules | |
parent | 710489fc7288eb61079356058eff72429751fb60 (diff) | |
download | archiva-04a065a53a34630bd6013fcd08e4711168f97111.tar.gz archiva-04a065a53a34630bd6013fcd08e4711168f97111.zip |
do not show del link if user do not have karma
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1346652 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js | 3 | ||||
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index 13d048086..cf0c0da0c 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -409,6 +409,9 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock }); } + + this.deleteKarma = hasKarma('archiva-delete-artifact'); + } displayArtifactFilesContent=function(self){ diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html index 35a0bf1ca..c82be8893 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html @@ -843,7 +843,11 @@ <ul id="artifact-download-list-files"> {{each(i, row) artifacts()}} <li> - <a href="#" data-bind="click: function(){deleteArtifact(row)}">del</a>:<a href="${row.url}">${row.packaging}:${row.version} - ${row.size}</a> + {{if deleteKarma}} + <a href="#" data-bind="click: function(){deleteArtifact(row)}">del</a>:<a href="${row.url}">${row.packaging}:${row.version} - ${row.size}</a> + {{else}} + <a href="${row.url}">${row.packaging}:${row.version} - ${row.size}</a> + {{/if}} </li> {{/each}} </ul> |