prevent some js npe

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1360167 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-07-11 13:24:34 +00:00
parent 57014d6ab0
commit e30d775760
2 changed files with 10 additions and 3 deletions

View File

@ -830,6 +830,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
} }
displayBrowseArtifactDetail=function(groupId, artifactId){ displayBrowseArtifactDetail=function(groupId, artifactId){
$.log("displayBrowseArtifactDetail");
window.sammyArchivaApplication.setLocation("#artifact/"+groupId+"/"+artifactId); window.sammyArchivaApplication.setLocation("#artifact/"+groupId+"/"+artifactId);
//displayArtifactDetail(groupId,artifactId,null,null); //displayArtifactDetail(groupId,artifactId,null,null);
} }

View File

@ -111,21 +111,25 @@
<th>${$.i18n.prop('browse.artifact.artifactId')}</th> <th>${$.i18n.prop('browse.artifact.artifactId')}</th>
<td>${artifactId}</td> <td>${artifactId}</td>
</tr> </tr>
{{if projectVersionMetadata}}
<tr> <tr>
<th>${$.i18n.prop('browse.artifact.name')}</th> <th>${$.i18n.prop('browse.artifact.name')}</th>
<td>${projectVersionMetadata.name}</td> <td>${projectVersionMetadata.name}</td>
</tr> </tr>
{{/if}}
{{if projectVersionMetadata}}
<tr> <tr>
<th>${$.i18n.prop('browse.artifact.description')}</th> <th>${$.i18n.prop('browse.artifact.description')}</th>
<td>${projectVersionMetadata.description}</td> <td>${projectVersionMetadata.description}</td>
</tr> </tr>
{{if projectVersionMetadata.mavenFacet}} {{/if}}
{{if projectVersionMetadata && projectVersionMetadata.mavenFacet}}
<tr> <tr>
<th>${$.i18n.prop('browse.artifact.packaging')}</th> <th>${$.i18n.prop('browse.artifact.packaging')}</th>
<td>${projectVersionMetadata.mavenFacet.packaging}</td> <td>${projectVersionMetadata.mavenFacet.packaging}</td>
</tr> </tr>
{{/if}} {{/if}}
{{if projectVersionMetadata.organization}} {{if projectVersionMetadata && projectVersionMetadata.organization}}
<tr> <tr>
<th>${$.i18n.prop('browse.artifact.organization.name')}</th> <th>${$.i18n.prop('browse.artifact.organization.name')}</th>
{{if projectVersionMetadata.organization.url}} {{if projectVersionMetadata.organization.url}}
@ -139,7 +143,7 @@
{{/if}} {{/if}}
</tr> </tr>
{{/if}} {{/if}}
{{if projectVersionMetadata.issueManagement}} {{if projectVersionMetadata && projectVersionMetadata.issueManagement}}
<tr> <tr>
<th>${$.i18n.prop('browse.artifact.organization.issueManagement')}</th> <th>${$.i18n.prop('browse.artifact.organization.issueManagement')}</th>
<td> <td>
@ -448,6 +452,7 @@
</li> </li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
{{if projectVersionMetadata}}
<div id="artifact-details-info-content" class="tab-pane active"> <div id="artifact-details-info-content" class="tab-pane active">
<blockquote>${projectVersionMetadata.description}</blockquote> <blockquote>${projectVersionMetadata.description}</blockquote>
<div class="row-fluid"> <div class="row-fluid">
@ -593,6 +598,7 @@
</div> </div>
{{/if}} {{/if}}
</div> </div>
{{/if}}
<div id="artifact-details-dependencies-content" class="tab-pane"> <div id="artifact-details-dependencies-content" class="tab-pane">