[MRM-1615] Artifact detail view

other details and scm.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1302894 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-03-20 13:48:34 +00:00
parent 81c26add27
commit a29e07f77a
3 changed files with 148 additions and 40 deletions

View File

@ -260,6 +260,15 @@ artifact.detail.tab.header.dependency.tree=Dependency Tree
artifact.detail.tab.header.used.by=Used By
browse.artifact.version=Version
browse.artifact.pom.snippet=POM Snippet
browse.artifact.parent=Parent
browse.artifact.other.details=Other details
browse.artifact.organization.ciManagement=Continuous Integration
browse.artifact.url=Url
browse.artifact.license=License
browse.artifact.scm=SCM
browse.artifact.scm.connection=Connection
browse.artifact.scm.devconnection=Dev. Connection
browse.artifact.scm.viewer=Viewer
#login
login.username.placehoder=Username

View File

@ -499,11 +499,10 @@ $(function() {
projectVersionMetadata.ciManagement=new CiManagement(data.ciManagement.system,data.ciManagement.url);
}
if (data.licenses){
var licenses =
$.isArray(data.licenses) ? $.map(data.licenses,function(item){
return new License(item.name,item.url);
}):[data.licenses];
projectVersionMetadata.licenses=licenses;
projectVersionMetadata.licenses=
$.isArray(data.licenses) ? $.map(data.licenses,function(item){
return new License(item.name,item.url);
}):[data.licenses];
}
if (data.mailingLists){
var mailingLists =

View File

@ -430,42 +430,142 @@
<div class="tab-content">
<div id="artifact-details-info-content" class="tab-pane active">
<blockquote>${projectVersionMetadata.description}</blockquote>
<div class="row span6">
<table class="table">
<tbody>
<tr>
<th>${$.i18n.prop('browse.artifact.groupId')}</th>
<td>${groupId}</td>
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.artifactId')}</th>
<td>${artifactId}</td>
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.version')}</th>
<td>${version}</td>
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.packaging')}</th>
<td>${projectVersionMetadata.mavenFacet.packaging}</td>
</tr>
{{if projectVersionMetadata.mavenFacet.parent }}
<tr>
<th>${$.i18n.prop('browse.artifact.parent')}</th>
<td>
<a href="#" data-bind="click: displayParent">
${projectVersionMetadata.mavenFacet.parent.groupId}:${projectVersionMetadata.mavenFacet.parent.artifactId}:${projectVersionMetadata.mavenFacet.parent.version}
</a>
</td>
</tr>
{{/if}}
</tbody>
</table>
</div>
<div class="row span5">
<h4>${$.i18n.prop('browse.artifact.pom.snippet')}</h4>
<pre class="prettyprint">&lt;dependency&gt;<br/>&nbsp;&nbsp;&lt;groupId&gt;${groupId}&lt;/groupId&gt;<br/>&nbsp;&nbsp;&lt;artifactId&gt;${artifactId}&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&lt;version&gt;${version}&lt;/version&gt;<br/>&lt;/dependency&gt;</pre>
<div class="row-fluid">
<div class="span6">
<table class="table">
<tbody>
<tr>
<th>${$.i18n.prop('browse.artifact.groupId')}</th>
<td>${groupId}</td>
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.artifactId')}</th>
<td>${artifactId}</td>
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.version')}</th>
<td>${version}</td>
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.packaging')}</th>
<td>${projectVersionMetadata.mavenFacet.packaging}</td>
</tr>
{{if projectVersionMetadata.mavenFacet.parent }}
<tr>
<th>${$.i18n.prop('browse.artifact.parent')}</th>
<td>
<a href="#" data-bind="click: displayParent">
${projectVersionMetadata.mavenFacet.parent.groupId}:${projectVersionMetadata.mavenFacet.parent.artifactId}:${projectVersionMetadata.mavenFacet.parent.version}
</a>
</td>
</tr>
{{/if}}
</tbody>
</table>
</div>
<div class="span6">
<h4>${$.i18n.prop('browse.artifact.pom.snippet')}</h4>
<pre class="prettyprint">&lt;dependency&gt;<br/>&nbsp;&nbsp;&lt;groupId&gt;${groupId}&lt;/groupId&gt;<br/>&nbsp;&nbsp;&lt;artifactId&gt;${artifactId}&lt;/artifactId&gt;<br/>&nbsp;&nbsp;&lt;version&gt;${version}&lt;/version&gt;<br/>&lt;/dependency&gt;</pre>
</div>
</div>
<div>
<div class="page-header">
<h4>${$.i18n.prop('browse.artifact.other.details')}</h4>
</div>
<div>
<div class="row-fluid">
<div class="span9">
<table class="table">
<tbody>
{{if projectVersionMetadata.url}}
<tr>
<th>${$.i18n.prop('browse.artifact.url')}</th>
<td><a href="${projectVersionMetadata.url}" target="_blank">${projectVersionMetadata.url}</a></td>
</tr>
{{/if}}
{{if projectVersionMetadata.organization}}
<tr>
<th>${$.i18n.prop('browse.artifact.organization.name')}</th>
{{if projectVersionMetadata.organization.url}}
<td>
<a href="${projectVersionMetadata.organization.url}" target="_blank">
<img src="images/internet-web-browser.png" alt=""/>${projectVersionMetadata.organization.name}
</a>
</td>
{{else}}
<td>${projectVersionMetadata.organization.name}</td>
{{/if}}
</tr>
{{/if}}
{{each(i,license) projectVersionMetadata.licenses}}
<tr>
<th>${$.i18n.prop('browse.artifact.license')}</th>
{{if license.url}}
<td>
<a href="${license.url}" target="_blank">
<img src="images/internet-web-browser.png" alt=""/>${license.name}
</a>
</td>
{{else}}
<td>${license.name}</td>
{{/if}}
</tr>
{{/each}}
{{if projectVersionMetadata.issueManagement}}
<tr>
<th>${$.i18n.prop('browse.artifact.organization.issueManagement')}</th>
<td>
<a href="${projectVersionMetadata.issueManagement.url}" target="_blank">
<img src="images/internet-web-browser.png" alt=""/>${projectVersionMetadata.issueManagement.system}
</a>
</td>
</tr>
{{/if}}
{{if projectVersionMetadata.ciManagement}}
<tr>
<th>${$.i18n.prop('browse.artifact.organization.ciManagement')}</th>
<td>
<a href="${projectVersionMetadata.ciManagement.url}" target="_blank">
<img src="images/internet-web-browser.png" alt=""/>${projectVersionMetadata.ciManagement.system}
</a>
</td>
</tr>
{{/if}}
</tbody>
</table>
</div>
</div>
</div>
</div>
{{if projectVersionMetadata.scm}}
<div>
<div class="page-header">
<h4>${$.i18n.prop('browse.artifact.scm')}</h4>
</div>
<div>
<div class="row-fluid">
<div class="span12">
<table class="table">
<tbody>
<tr>
<th>${$.i18n.prop('browse.artifact.scm.connection')}</th>
<td>${projectVersionMetadata.scm.connection}</td>
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.scm.devconnection')}</th>
<td>${projectVersionMetadata.scm.developerConnection}</td>
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.scm.viewer')}</th>
<td>${projectVersionMetadata.scm.url}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
{{/if}}
</div>