]> source.dussan.org Git - archiva.git/commitdiff
take care of empty values and add i18n
authorOlivier Lamy <olamy@apache.org>
Wed, 21 Mar 2012 15:04:33 +0000 (15:04 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 21 Mar 2012 15:04:33 +0000 (15:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1303423 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/templates/search.html

index e31854a3592f62f60dd2d935e05e11ed98dd8e38..e449c22392e83b01f9b69d5b2463a4efb9657f2a 100644 (file)
@@ -277,6 +277,8 @@ browse.artifact.mailingList.mainArchiveUrl=Main archive
 browse.artifact.mailingList.otherArchivesUrls=Other Archives
 browse.artifact.mailingList.unsubscribe=Unsubscribe
 browse.artifact.mailingList.subscribe=Subscribe
+browse.artifact.mailingList.none=No mailing lists found.
+browse.artifact.dependencies.none=No dependencies found.
 
 #login
 login.username.placehoder=Username
index d70ce230c8166a084ed725067a1bf8943ed672c9..5f75fc32c39021c31d03f6c3a9aec16e50f2542b 100644 (file)
          <div id="artifact-details-dependencies-content" class="tab-pane">
         <table class="table">
           <tbody>
+          {{if projectVersionMetadata.dependencies && projectVersionMetadata.dependencies.length>0}}
           {{each(i,dependency) projectVersionMetadata.dependencies}}
             <tr>
               <th>${dependency.artifactId}</th>
               </td>
             </tr>
           {{/each}}
+          {{else}}
+            ${$.i18n.prop('browse.artifact.dependencies.none')}
+          {{/if}}
           </tbody>
         </table>
          </div>
       </div>
 
       <div id="artifact-details-mailing-list-content" class="tab-pane">
-        {{if projectVersionMetadata.mailingLists}}
+        {{if projectVersionMetadata.mailingLists && projectVersionMetadata.mailingLists.length>0}}
           <div id="accordion_mailing_lists" class="accordion">
           {{each(i,mailingList) projectVersionMetadata.mailingLists}}
             <div class="accordion-group">
                 <div id="ml_collapse_${i}" class="accordion-body collapse">
               {{/if}}
                 <div class="accordion-inner">
-                  <div><b>${$.i18n.prop('browse.artifact.mailingList.subscribe')}</b>: <a href="mailto:${mailingList.subscribeAddress}">${mailingList.subscribeAddress}</a></div>
-                  <div><b>${$.i18n.prop('browse.artifact.mailingList.post')}</b>: <a href="mailto:${mailingList.postAddress}">${mailingList.postAddress}</a></div>
-                  <div><b>${$.i18n.prop('browse.artifact.mailingList.unsubscribe')}</b>: <a href="mailto:${mailingList.unsubscribeAddress}">${mailingList.unsubscribeAddress}</a></div>
-                  <div><b>${$.i18n.prop('browse.artifact.mailingList.mainArchiveUrl')}</b>: <a href="${mailingList.mainArchiveUrl}" target="_blank">${mailingList.mainArchiveUrl}</a></div>
-                  {{if mailingList.otherArchives}}
+                  {{if mailingList.subscribeAddress}}
+                  <div>
+                    <b>${$.i18n.prop('browse.artifact.mailingList.subscribe')}</b>: <a href="mailto:${mailingList.subscribeAddress}">${mailingList.subscribeAddress}</a>
+                  </div>
+                  {{/if}}
+                  {{if mailingList.postAddress}}
+                  <div>
+                    <b>${$.i18n.prop('browse.artifact.mailingList.post')}</b>: <a href="mailto:${mailingList.postAddress}">${mailingList.postAddress}</a>
+                  </div>
+                  {{/if}}
+                  {{if mailingList.unsubscribeAddress}}
+                  <div>
+                    <b>${$.i18n.prop('browse.artifact.mailingList.unsubscribe')}</b>: <a href="mailto:${mailingList.unsubscribeAddress}">${mailingList.unsubscribeAddress}</a>
+                  </div>
+                  {{/if}}
+                  {{if mailingList.mainArchiveUrl}}
+                  <div>
+                    <b>${$.i18n.prop('browse.artifact.mailingList.mainArchiveUrl')}</b>: <a href="${mailingList.mainArchiveUrl}" target="_blank">${mailingList.mainArchiveUrl}</a>
+                  </div>
+                  {{/if}}
+                  {{if mailingList.otherArchives && mailingList.otherArchives.length>0}}
                   <div>
                     <b>${$.i18n.prop('browse.artifact.mailingList.otherArchivesUrls')}:</b>
                     <ul>
             </div>
           {{/each}}
           </div>
+        {{else}}
+          ${$.i18n.prop('browse.artifact.mailingList.none')}
         {{/if}}
       </div>