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
This commit is contained in:
Olivier Lamy 2012-06-05 23:17:37 +00:00
parent 710489fc72
commit 04a065a53a
2 changed files with 8 additions and 1 deletions

View File

@ -409,6 +409,9 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock
});
}
this.deleteKarma = hasKarma('archiva-delete-artifact');
}
displayArtifactFilesContent=function(self){

View File

@ -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}&nbsp;-&nbsp;${row.size}</a>
{{if deleteKarma}}
<a href="#" data-bind="click: function(){deleteArtifact(row)}">del</a>:<a href="${row.url}">${row.packaging}:${row.version}&nbsp;-&nbsp;${row.size}</a>
{{else}}
<a href="${row.url}">${row.packaging}:${row.version}&nbsp;-&nbsp;${row.size}</a>
{{/if}}
</li>
{{/each}}
</ul>