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

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1302893 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 e98961f83faa9d1cf87253b70bdd5b59a2c682ab..7daa6a628943e87d128ece070a6ad6bc2273d3f3 100644 (file)
@@ -259,6 +259,7 @@ artifact.detail.tab.header.info=Info
 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
 
 #login
 login.username.placehoder=Username
index 942efe0f38a3692010602649943f305f02d993cd..1ae374d08810cefc33f53acecba36473a17b6d5f 100644 (file)
@@ -273,7 +273,7 @@ $(function() {
         type: "GET",
         dataType: 'json',
         success: function(data) {
-          mainContent.find("#selected_repository" ).html($("#selected_repository_tmpl" ).tmpl({repositories:data}));
+          mainContent.find("#selected_repository" ).html($("#selected_repository_tmpl" ).tmpl({repositories:data,selected:""}));
           var url="restServices/archivaServices/browseService/rootGroups"
           $.ajax(url, {
               type: "GET",
@@ -314,7 +314,7 @@ $(function() {
     }
     var selectedRepo=getSelectedBrowsingRepository();
     if (selectedRepo){
-      url+="?repositoryId="+selectedRepo;
+      url+="?repositoryId="+encodeURIComponent(selectedRepo);
     }
     $( "#main-content #browse-autocomplete" ).autocomplete({
       minLength: 2,
@@ -362,7 +362,7 @@ $(function() {
         var browseUrl="restServices/archivaServices/browseService/browseGroupId/"+encodeURIComponent(query);
         var selectedRepo=getSelectedBrowsingRepository();
         if (selectedRepo){
-          browseUrl+="?repositoryId="+selectedRepo;
+          browseUrl+="?repositoryId="+encodeURIComponent(selectedRepo);
         }
         $.get(browseUrl,
            function(data) {
index cee3ea280e6200af51e05db7cd25107ca7d1723a..7a6e9b6109f07e4a7a748d67f94e0d3f55a06b48 100644 (file)
     <div class="tab-content">
          <div id="artifact-details-info-content" class="tab-pane active">
         <blockquote>${projectVersionMetadata.description}</blockquote>
-        <div class="row span4">
+        <div class="row span6">
         <table class="table">
           <tbody>
             <tr>
                 <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>
          </div>