mirror of https://github.com/apache/archiva.git
[MRM-1615] Artifact detail view
dependencies: display crumb git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1303362 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
807d29a1e1
commit
9ceb3ff84b
|
@ -270,6 +270,7 @@ browse.artifact.scm=SCM
|
|||
browse.artifact.scm.connection=Connection
|
||||
browse.artifact.scm.devconnection=Dev. Connection
|
||||
browse.artifact.scm.viewer=Viewer
|
||||
browse.artifact.scope=Scope
|
||||
|
||||
#login
|
||||
login.username.placehoder=Username
|
||||
|
|
|
@ -75,7 +75,6 @@ $(function() {
|
|||
for (var i=0;i<splitted.length;i++){
|
||||
curGroupId+=splitted[i];
|
||||
breadCrumbEntries.push(new BreadCrumbEntry(curGroupId,splitted[i]));
|
||||
$.log("calculateBreadCrumbEntries:"+curGroupId+":"+splitted[i]);
|
||||
curGroupId+="."
|
||||
}
|
||||
return breadCrumbEntries;
|
||||
|
@ -177,6 +176,7 @@ $(function() {
|
|||
entries.push(new BreadCrumbEntry("foo",self.version));
|
||||
return entries;
|
||||
}
|
||||
|
||||
this.display=function(){
|
||||
mainContent.find("#browse_breadcrumb").hide("slide", {}, 300,function(){
|
||||
mainContent.find("#browse_artifact").hide("slide", {}, 300,function(){
|
||||
|
@ -650,6 +650,7 @@ $(function() {
|
|||
}
|
||||
|
||||
Dependency=function(classifier,optional,scope,systemPath,type,artifactId,groupId,version){
|
||||
var self=this;
|
||||
//private String classifier;
|
||||
this.classifier=classifier;
|
||||
|
||||
|
@ -674,6 +675,20 @@ $(function() {
|
|||
//private String version;
|
||||
this.version=version;
|
||||
|
||||
this.crumbEntries=function(){
|
||||
$.log("Dependency#calculateCrumbEntries");
|
||||
var splitted = self.groupId.split(".");
|
||||
var breadCrumbEntries=[];
|
||||
var curGroupId="";
|
||||
for (var i=0;i<splitted.length;i++){
|
||||
curGroupId+=splitted[i];
|
||||
breadCrumbEntries.push(new BreadCrumbEntry(curGroupId,splitted[i]));
|
||||
curGroupId+="."
|
||||
}
|
||||
breadCrumbEntries.push(new BreadCrumbEntry(self.artifactId,self.artifactId));
|
||||
return breadCrumbEntries;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
|
|
|
@ -572,14 +572,26 @@
|
|||
<div id="artifact-details-dependencies-content" class="tab-pane">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
{{each(i,dependency) projectVersionMetadata.dependencies}}
|
||||
<tr>
|
||||
<th>${dependency.artifactId}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${dependency.groupId},${dependency.artifactId},${dependency.version}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{each(i,dependency) projectVersionMetadata.dependencies}}
|
||||
<tr>
|
||||
<th>${dependency.artifactId}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{var entries=dependency.crumbEntries()}}
|
||||
{{each(j,crumbEntry) entries}}
|
||||
${crumbEntry.displayValue}
|
||||
{{if j < entries.length - 1}}
|
||||
/
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
| <b>${$.i18n.prop('browse.artifact.version')}:</b> ${dependency.version}
|
||||
{{if dependency.scope}}
|
||||
| <b>${$.i18n.prop('browse.artifact.scope')}:</b> ${dependency.scope}
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue