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;
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(){
}
Dependency=function(classifier,optional,scope,systemPath,type,artifactId,groupId,version){
+ var self=this;
//private String classifier;
this.classifier=classifier;
//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;
+ }
+
}
//-----------------------------------------
<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>