Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
<migration class="PKP\migration\upgrade\v3_6_0\I4860_MigratePublicationAddCreatedAt"/>
<migration class="PKP\migration\upgrade\v3_6_0\I4860_MigratePublicationVersionSourcePublicationId"/>
<migration class="PKP\migration\upgrade\v3_6_0\I11326_UserComments"/>
<migration class="PKP\migration\upgrade\v3_6_0\I857_CreditRoles"/>
<note file="docs/release-notes/README-3.6.0" />
</upgrade>

Expand Down
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 376 files
5 changes: 5 additions & 0 deletions pages/preprint/PreprintHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ public function view($args, $request)
'parsedCitations' => $publication->getData('citations'),
]);

// Credit Role Terms
$templateMgr->assign([
'creditRoleTerms' => Repo::CreditRole()->getTerms(),
]);

// Assign deprecated values to the template manager for
// compatibility with older themes
$templateMgr->assign([
Expand Down
6 changes: 6 additions & 0 deletions plugins/themes/default/styles/objects/preprint_details.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@
vertical-align: middle;
}
}

.credit_roles {
display: block;
font-size: @font-sml;
line-height: @double;
}
}

.author_bios {
Expand Down
16 changes: 16 additions & 0 deletions templates/frontend/objects/preprint_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
* @uses $licenseUrl string URL to license. Only assigned if license should be
* included with published submissions.
* @uses $ccLicenseBadge string An image and text with details about the license
* @uses $creditRoleTerms Array of translated credit role terms: roles and degrees
*}
<article class="obj_preprint_details">

Expand Down Expand Up @@ -151,6 +152,21 @@
</a>
</span>
{/if}
{if $author->getData('creditRoles')}
<span class="credit_roles">
{strip}
{foreach $author->getData('creditRoles') as $credit}
<span class="value">
{$creditRoleTerms.roles[$credit.role]|escape}
{if $creditRoleTerms.degrees[$credit.degree]}
&nbsp;({$creditRoleTerms.degrees[$credit.degree]|escape})
{/if}
</span>
{if !$credit@last}{translate key="common.commaListSeparator"}{/if}
{/foreach}
{/strip}
</span>
{/if}
</li>
{/foreach}
</ul>
Expand Down