});
}
- if ($(e.target).attr("href")=="#artifact-details-file-content") {
+ if ($(e.target).attr("href")=="#artifact-details-files-content") {
$.log("file content:"+self.groupId+":"+self.artifactId+":"+self.version);
- var entriesUrl = "restServices/archivaServices/browseService/artifactContentEntries/"+encodeURIComponent(self.groupId);
- entriesUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version);
- entriesUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository());
- //entriesUrl+="&p="+encodeURIComponent(artifactContentEntry.name);
-
- $("#main-content #artifact_content_tree").fileTree({
- script: entriesUrl,
- root: ""
- },function(file) {
- //alert(file);
- });
+ var artifactDownloadInfosUrl = "restServices/archivaServices/browseService/artifactDownloadInfos/"+encodeURIComponent(self.groupId);
+ artifactDownloadInfosUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version);
+ artifactDownloadInfosUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository());
+
+ $.get(artifactDownloadInfosUrl,function(data){
+ $("#artifact-details-files-content" ).html($("#artifact-details-files-content_tmpl").tmpl({artifactDownloadInfos:data}));
+ var entriesUrl = "restServices/archivaServices/browseService/artifactContentEntries/"+encodeURIComponent(self.groupId);
+ entriesUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version);
+ entriesUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository());
+ //entriesUrl+="&p="+encodeURIComponent(artifactContentEntry.name);
+
+ $("#main-content #artifact_content_tree").fileTree({
+ script: entriesUrl,
+ root: ""
+ },function(file) {
+
+ });
+ });
+
}
});
}
<a data-toggle="tab" href="#artifact-details-dependency-tree-content">${$.i18n.prop('artifact.detail.tab.header.dependency.tree')}</a>
</li>
<li>
- <a data-toggle="tab" href="#artifact-details-file-content">${$.i18n.prop('artifact.detail.tab.header.file.content')}</a>
+ <a data-toggle="tab" href="#artifact-details-files-content">${$.i18n.prop('artifact.detail.tab.header.file.content')}</a>
</li>
<li>
<a data-toggle="tab" href="#artifact-details-used-by-content">${$.i18n.prop('artifact.detail.tab.header.used.by')}</a>
<div id="artifact-details-dependency-tree-content" class="tab-pane">
</div>
- <div id="artifact-details-file-content" class="tab-pane">
- <div id="artifact_content_tree">
- </div>
+ <div id="artifact-details-files-content" class="tab-pane">
+
</div>
<div id="artifact-details-used-by-content" class="tab-pane"></div>
{{/if}}
{{/each}}
</ul>
+</script>
+
+<script id="artifact-details-files-content_tmpl" type="text/html">
+ <div class="row">
+ <div class="span4">
+ <ul>
+ {{each artifactDownloadInfos}}
+ <li>${$value.type}:${$value.classifier}</li>
+ {{/each}}
+ </ul>
+ </div>
+ <div class="span8">
+ <div id="artifact_content_tree">
+ </div>
+ </div>
+ </div>
</script>
\ No newline at end of file