mirror of https://github.com/apache/archiva.git
-in the search results, display repository (with link) where artifact is located
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@675505 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce121d314f
commit
f8cfdfa447
|
@ -46,6 +46,8 @@ public class SearchResultHit
|
|||
private String artifactId;
|
||||
|
||||
private String version = "";
|
||||
|
||||
private String repositoryId = "";
|
||||
|
||||
// Advanced hit, if artifact, all versions of artifact
|
||||
private List artifacts = new ArrayList();
|
||||
|
@ -138,4 +140,14 @@ public class SearchResultHit
|
|||
{
|
||||
return versions;
|
||||
}
|
||||
|
||||
public String getRepositoryId()
|
||||
{
|
||||
return repositoryId;
|
||||
}
|
||||
|
||||
public void setRepositoryId( String repositoryId )
|
||||
{
|
||||
this.repositoryId = repositoryId;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ public class SearchResults
|
|||
// Only need to worry about this hit if it is truely new.
|
||||
hit = new SearchResultHit();
|
||||
|
||||
hit.setRepositoryId( filecontent.getRepositoryId() );
|
||||
hit.setUrl( filecontent.getRepositoryId() + "/" + filecontent.getFilename() );
|
||||
hit.setContext( null ); // TODO: handle context + highlight later.
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
</h3>
|
||||
<p>
|
||||
<my:showArtifactLink groupId="${record.groupId}" artifactId="${record.artifactId}"
|
||||
version="${record.version}" versions="${record.versions}"/>
|
||||
version="${record.version}" versions="${record.versions}" repositoryId="${record.repositoryId}"/>
|
||||
</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
|
|
|
@ -27,11 +27,14 @@
|
|||
<%@ attribute name="classifier" %>
|
||||
<%@ attribute name="scope" %>
|
||||
<%@ attribute name="versions" type="java.util.List" %>
|
||||
<%@ attribute name="repositoryId" %>
|
||||
|
||||
<span class="artifact-link">
|
||||
<a href="${pageContext.request.contextPath}/repository/${repositoryId}">${repositoryId}</a>
|
||||
<strong> : </strong>
|
||||
<archiva:groupIdLink var="${groupId}" includeTop="false" />
|
||||
|
||||
<c:if test="${!empty(artifactId)}">
|
||||
<c:if test="${!empty(artifactId)}">
|
||||
<c:set var="url">
|
||||
<ww:url action="browseArtifact" namespace="/">
|
||||
<ww:param name="groupId" value="%{'${groupId}'}"/>
|
||||
|
@ -73,5 +76,5 @@
|
|||
</c:if>
|
||||
<c:if test="${!empty(classifier)}">
|
||||
| <strong>Classifier:</strong> ${classifier}
|
||||
</c:if>
|
||||
</c:if>
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue