mirror of https://github.com/apache/archiva.git
[MRM-1615] Artifact detail view
dependencies: link to detail for dependencies. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1303363 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9ceb3ff84b
commit
decae4e365
|
@ -215,6 +215,20 @@ $(function() {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
displayGroup=function(groupId){
|
||||
var parentBrowseViewModel=new BrowseViewModel(null,null,null);
|
||||
displayGroupDetail(groupId,parentBrowseViewModel,null);
|
||||
}
|
||||
|
||||
displayArtifactDetailView=function(groupId, artifactId){
|
||||
displayArtifactDetail(groupId, artifactId);
|
||||
}
|
||||
|
||||
displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
|
||||
var artifactVersionDetailViewModel = new ArtifactVersionDetailViewModel (groupId,artifactId,version)
|
||||
artifactVersionDetailViewModel.display();
|
||||
}
|
||||
}
|
||||
|
||||
displayArtifactDetail=function(groupId,artifactId,parentBrowseViewModel,restUrl){
|
||||
|
@ -466,6 +480,7 @@ $(function() {
|
|||
this.displayValue=displayValue;
|
||||
this.artifactId=null;
|
||||
this.artifact=false;
|
||||
this.version=null;
|
||||
}
|
||||
mapVersionsList=function(data){
|
||||
if (data){
|
||||
|
@ -682,10 +697,21 @@ $(function() {
|
|||
var curGroupId="";
|
||||
for (var i=0;i<splitted.length;i++){
|
||||
curGroupId+=splitted[i];
|
||||
$.log("splitted[i]:"+i+":"+splitted[i]);
|
||||
breadCrumbEntries.push(new BreadCrumbEntry(curGroupId,splitted[i]));
|
||||
curGroupId+="."
|
||||
}
|
||||
breadCrumbEntries.push(new BreadCrumbEntry(self.artifactId,self.artifactId));
|
||||
var crumbEntryArtifact=new BreadCrumbEntry(self.groupId,self.artifactId);
|
||||
crumbEntryArtifact.artifactId=self.artifactId;
|
||||
crumbEntryArtifact.artifact=true;
|
||||
breadCrumbEntries.push(crumbEntryArtifact);
|
||||
|
||||
var crumbEntryVersion=new BreadCrumbEntry(self.groupId,self.version);
|
||||
crumbEntryVersion.artifactId=self.artifactId;
|
||||
crumbEntryVersion.artifact=false;
|
||||
crumbEntryVersion.version=self.version;
|
||||
breadCrumbEntries.push(crumbEntryVersion);
|
||||
|
||||
return breadCrumbEntries;
|
||||
}
|
||||
|
||||
|
|
|
@ -580,12 +580,19 @@
|
|||
<td>
|
||||
{{var entries=dependency.crumbEntries()}}
|
||||
{{each(j,crumbEntry) entries}}
|
||||
${crumbEntry.displayValue}
|
||||
{{if j < entries.length - 1}}
|
||||
{{if j < entries.length - 2}}
|
||||
<a href="#" data-bind="click: function(){displayGroup(crumbEntry.groupId)}">${crumbEntry.displayValue}</a>
|
||||
{{else j == entries.length - 2}}
|
||||
<a href="#" data-bind="click: function(){displayArtifactDetailView(crumbEntry.groupId,crumbEntry.artifactId)}">${crumbEntry.displayValue}</a>
|
||||
{{else j == entries.length - 1}}
|
||||
| <b>${$.i18n.prop('browse.artifact.version')}:</b>
|
||||
<a href="#" data-bind="click: function(){displayArtifactVersionDetailViewModel(crumbEntry.groupId,crumbEntry.artifactId,crumbEntry.version)}">${dependency.version}</a>
|
||||
{{/if}}
|
||||
{{if j < entries.length - 2}}
|
||||
/
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
| <b>${$.i18n.prop('browse.artifact.version')}:</b> ${dependency.version}
|
||||
|
||||
{{if dependency.scope}}
|
||||
| <b>${$.i18n.prop('browse.artifact.scope')}:</b> ${dependency.scope}
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue