]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1615] Artifact detail view
authorOlivier Lamy <olamy@apache.org>
Tue, 20 Mar 2012 13:48:34 +0000 (13:48 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 20 Mar 2012 13:48:34 +0000 (13:48 +0000)
other details and scm.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1302894 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html

index 7daa6a628943e87d128ece070a6ad6bc2273d3f3..56c3880a0705bbc56d25d8db97d562f1d595a079 100644 (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
index 1ae374d08810cefc33f53acecba36473a17b6d5f..baa2cccbc64e0d0de8572b4b661edae2b0c1aca5 100644 (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 =
index 7a6e9b6109f07e4a7a748d67f94e0d3f55a06b48..8ec55de0af5049c708f49db0d685e088a0a135a7 100644 (file)
     <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 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 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>
+          <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>