Skip to content

Commit

Permalink
pkp/pkp-lib#2072 Fix fatal error when previewing article not assigned…
Browse files Browse the repository at this point in the history
… to issue
  • Loading branch information
NateWr committed Sep 5, 2019
1 parent dbfb59d commit 9566b05
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions templates/frontend/objects/article_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
<div class="entry_details">

{* Article/Issue cover image *}
{if $article->getLocalizedCoverImage() || $issue->getLocalizedCoverImage()}
{if $article->getLocalizedCoverImage() || ($issue && $issue->getLocalizedCoverImage())}
<div class="item cover_image">
<div class="sub_item">
{if $article->getLocalizedCoverImage()}
Expand Down Expand Up @@ -313,29 +313,34 @@
{/if}

{* Issue article appears in *}
<div class="item issue">
<div class="sub_item">
<div class="label">
{translate key="issue.issue"}
</div>
<div class="value">
<a class="title" href="{url page="issue" op="view" path=$issue->getBestIssueId()}">
{$issue->getIssueIdentification()}
</a>
</div>
</div>
{if $issue || $section}
<div class="item issue">

{if $section}
<div class="sub_item">
<div class="label">
{translate key="section.section"}
{if $issue}
<div class="sub_item">
<div class="label">
{translate key="issue.issue"}
</div>
<div class="value">
<a class="title" href="{url page="issue" op="view" path=$issue->getBestIssueId()}">
{$issue->getIssueIdentification()}
</a>
</div>
</div>
<div class="value">
{$section->getLocalizedTitle()|escape}
{/if}

{if $section}
<div class="sub_item">
<div class="label">
{translate key="section.section"}
</div>
<div class="value">
{$section->getLocalizedTitle()|escape}
</div>
</div>
</div>
{/if}
</div>
{/if}
</div>
{/if}

{* PubIds (requires plugins) *}
{foreach from=$pubIdPlugins item=pubIdPlugin}
Expand Down

0 comments on commit 9566b05

Please sign in to comment.