From a29e07f77a94b173523f953f6fd51578260668fb Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 20 Mar 2012 13:48:34 +0000 Subject: [PATCH] [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 --- .../apache/archiva/i18n/default.properties | 9 + .../src/main/webapp/js/archiva/search.js | 9 +- .../webapp/js/archiva/templates/search.html | 168 ++++++++++++++---- 3 files changed, 147 insertions(+), 39 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties index 7daa6a628..56c3880a0 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties @@ -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 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 1ae374d08..baa2cccbc 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 @@ -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 = 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 7a6e9b610..8ec55de0a 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 @@ -430,42 +430,142 @@
${projectVersionMetadata.description}
-
- - - - - - - - - - - - - - - - - - - {{if projectVersionMetadata.mavenFacet.parent }} - - - - - {{/if}} - -
${$.i18n.prop('browse.artifact.groupId')}${groupId}
${$.i18n.prop('browse.artifact.artifactId')}${artifactId}
${$.i18n.prop('browse.artifact.version')}${version}
${$.i18n.prop('browse.artifact.packaging')}${projectVersionMetadata.mavenFacet.packaging}
${$.i18n.prop('browse.artifact.parent')} - - ${projectVersionMetadata.mavenFacet.parent.groupId}:${projectVersionMetadata.mavenFacet.parent.artifactId}:${projectVersionMetadata.mavenFacet.parent.version} - -
+
+
+ + + + + + + + + + + + + + + + + + + {{if projectVersionMetadata.mavenFacet.parent }} + + + + + {{/if}} + +
${$.i18n.prop('browse.artifact.groupId')}${groupId}
${$.i18n.prop('browse.artifact.artifactId')}${artifactId}
${$.i18n.prop('browse.artifact.version')}${version}
${$.i18n.prop('browse.artifact.packaging')}${projectVersionMetadata.mavenFacet.packaging}
${$.i18n.prop('browse.artifact.parent')} + + ${projectVersionMetadata.mavenFacet.parent.groupId}:${projectVersionMetadata.mavenFacet.parent.artifactId}:${projectVersionMetadata.mavenFacet.parent.version} + +
+
+
+

${$.i18n.prop('browse.artifact.pom.snippet')}

+
<dependency>
  <groupId>${groupId}</groupId>
  <artifactId>${artifactId}</artifactId>
  <version>${version}</version>
</dependency>
+
-
-

${$.i18n.prop('browse.artifact.pom.snippet')}

-
<dependency>
  <groupId>${groupId}</groupId>
  <artifactId>${artifactId}</artifactId>
  <version>${version}</version>
</dependency>
+
+ +
+
+
+ + + {{if projectVersionMetadata.url}} + + + + + {{/if}} + {{if projectVersionMetadata.organization}} + + + {{if projectVersionMetadata.organization.url}} + + {{else}} + + {{/if}} + + {{/if}} + {{each(i,license) projectVersionMetadata.licenses}} + + + {{if license.url}} + + {{else}} + + {{/if}} + + {{/each}} + {{if projectVersionMetadata.issueManagement}} + + + + + {{/if}} + {{if projectVersionMetadata.ciManagement}} + + + + + {{/if}} + +
${$.i18n.prop('browse.artifact.url')}${projectVersionMetadata.url}
${$.i18n.prop('browse.artifact.organization.name')} + + ${projectVersionMetadata.organization.name} + + ${projectVersionMetadata.organization.name}
${$.i18n.prop('browse.artifact.license')} + + ${license.name} + + ${license.name}
${$.i18n.prop('browse.artifact.organization.issueManagement')} + + ${projectVersionMetadata.issueManagement.system} + +
${$.i18n.prop('browse.artifact.organization.ciManagement')} + + ${projectVersionMetadata.ciManagement.system} + +
+
+
+
+
+ {{if projectVersionMetadata.scm}} +
+ +
+
+
+ + + + + + + + + + + + + + + +
${$.i18n.prop('browse.artifact.scm.connection')}${projectVersionMetadata.scm.connection}
${$.i18n.prop('browse.artifact.scm.devconnection')}${projectVersionMetadata.scm.developerConnection}
${$.i18n.prop('browse.artifact.scm.viewer')}${projectVersionMetadata.scm.url}
+
+
+
+
+ {{/if}}
-- 2.39.5