summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-03-21 11:14:58 +0000
committerOlivier Lamy <olamy@apache.org>2012-03-21 11:14:58 +0000
commitdecae4e3652f6327f4d2811ced3a2ab328ea5d13 (patch)
treec7633a7774cc3884702e4d9379fe7bfaea7e5379 /archiva-modules
parent9ceb3ff84bdc77426b9d6cb1b460f318afa4e7e1 (diff)
downloadarchiva-decae4e3652f6327f4d2811ced3a2ab328ea5d13.tar.gz
archiva-decae4e3652f6327f4d2811ced3a2ab328ea5d13.zip
[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
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js28
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html13
2 files changed, 37 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
index 524962a12..aaa16f53e 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
@@ -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;
}
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html
index d76c06cb3..c0331cc0b 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html
@@ -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}}
+ &nbsp;|&nbsp;<b>${$.i18n.prop('browse.artifact.version')}:</b>&nbsp;
+ <a href="#" data-bind="click: function(){displayArtifactVersionDetailViewModel(crumbEntry.groupId,crumbEntry.artifactId,crumbEntry.version)}">${dependency.version}</a>&nbsp;
+ {{/if}}
+ {{if j < entries.length - 2}}
&nbsp;/&nbsp;
{{/if}}
{{/each}}
- &nbsp;|&nbsp;<b>${$.i18n.prop('browse.artifact.version')}:</b>&nbsp;${dependency.version}&nbsp;
+
{{if dependency.scope}}
|&nbsp;<b>${$.i18n.prop('browse.artifact.scope')}:</b>&nbsp;${dependency.scope}
{{/if}}