}
return value;
}
+
+ deleteKarma=function(){
+ return hasKarma('archiva-delete-artifact');
+ }
+
+ deleteGroupId=function(groupId){
+ var repoId=getSelectedBrowsingRepository();
+ if(!repoId){
+ displayErrorMessage($.i18n.prop('groupId.delete.missing.repoId'));
+ return;
+ }
+ openDialogConfirm(function(){
+ $.ajax({
+ url:"restServices/archivaServices/repositoriesService/deleteGroupId?groupId="+groupId+"&repositoryId="+repoId,
+ type:"GET",
+ dataType:"json",
+ success:function(data){
+
+
+ },
+ error:function(data){
+ displayRestError(data,"user-messages");
+ },
+ complete:function(){
+ closeDialogConfirm();
+ }
+ });
+ }, $.i18n.prop('ok'),
+ $.i18n.prop('cancel'),
+ $.i18n.prop('groupId.delete.confirm.title'),
+ $.i18n.prop('groupId.delete.confirm.save'));
+ }
}
calculateBreadCrumbEntries=function(groupId){
{{if browseResultEntry.project}}
<li class="browse-list-project" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">
<a href="#">${displayEntry(browseResultEntry.name)}</a>
+ </li>
{{else}}
- <li class="browse-list" data-bind="click:function(){displayGroupId(browseResultEntry.name)}">
- <a href="#" title="folder ${displayEntry(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
+ {{if deleteKarma}}
+ <li class="browse-list">
+ <img src="images/trash.png" data-bind="click:function(){deleteGroupId(browseResultEntry.name)}"/>
+ <a data-bind="click:function(){displayGroupId(browseResultEntry.name)}" href="#" title="folder ${displayEntry(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
+ </li>
+ {{else}}
+ <li class="browse-list" >
+ <a href="#" title="folder ${displayEntry(browseResultEntry.name)}" data-bind="click:function(){displayGroupId(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
+ </li>
+ {{/if}}
{{/if}}
- </li>
+
{{/each}}
</ul>
</div>