Skip to content

Commit

Permalink
#330 links to the new detail page from the maven search results
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed May 8, 2013
1 parent 26d3631 commit 7a63ae9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions hawtio-web/src/main/webapp/app/maven/js/helpers.ts
Expand Up @@ -22,6 +22,18 @@ module Maven {
}

export function addMavenFunctions($scope) {
$scope.detailLink = (row) => {
var group = row.groupId;
var artifact = row.artifactId;
var version = row.version || "";
var classifier = row.classifier || "";
var packaging = row.packaging || "";
if (group && artifact) {
return "#/maven/artifact/" + group + "/" + artifact + "/" + version + "/" + classifier + "/" + packaging;
}
return "";
};

$scope.javadocLink = (row) => {
var group = row.groupId;
var artifact = row.artifactId;
Expand Down
3 changes: 2 additions & 1 deletion hawtio-web/src/main/webapp/app/maven/js/search.ts
Expand Up @@ -24,7 +24,8 @@ module Maven {
},
{
field: 'version',
displayName: 'Version'
displayName: 'Version',
cellTemplate: '<div class="ngCellText" title="Name: {{row.entity.name}}"><a ng-href="{{detailLink(row.entity)}}">{{row.entity.version}}</a</div>'
}
];

Expand Down

0 comments on commit 7a63ae9

Please sign in to comment.