Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#10903 Multiple author affiliations and RORs UI Related issues #519

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
58 changes: 38 additions & 20 deletions src/components/Form/fields/FieldAffiliations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,24 @@
:key="affiliationIndex"
>
<TableCell>
<div v-if="affiliation.name[primaryLocale]">
<span class="text-lg-semibold">
<div
v-if="affiliation.name[primaryLocale]"
class="flex items-center"
>
<span class="inline-block align-middle text-lg-semibold">
{{ affiliation.name[primaryLocale] }}
</span>
<a
v-if="affiliation.ror"
:href="affiliation.ror"
class="inline-block align-middle"
target="_blank"
>
<Icon icon="ROR" :class="'ms-1 h-6 w-6'" :inline="true" />
<Icon
icon="ROR"
:class="'ms-2 inline-block h-auto w-6 align-middle'"
:inline="true"
/>
</a>
</div>
<div v-else>
Expand All @@ -51,15 +59,19 @@
</span>
</div>
</TableCell>
<TableCell>
<TableCell class="">
<div v-if="affiliation.ror">
<span class="text-lg-semibold">
<a
:href="affiliation.ror"
class="inline-block cursor-pointer align-middle text-lg-semibold"
target="_blank"
>
{{ affiliation.ror }}
</span>
</a>
</div>
<div v-else>
<a
class="pkpButton cursor-pointer border-transparent py-2 text-lg-semibold text-primary hover:enabled:underline"
class="pkpButton flex cursor-pointer items-center border-transparent py-2 text-lg-semibold text-primary hover:enabled:underline"
@click="toggleEditMode(affiliationIndex)"
>
<Icon
Expand All @@ -69,7 +81,7 @@
? 'Complete'
: 'InProgress'
"
:class="'h-6 w-6'"
:class="'inline-block h-auto w-6 align-middle'"
:inline="true"
/>
{{ translations(affiliation).label }}
Expand Down Expand Up @@ -115,11 +127,11 @@
</div>
</div>
</TableCell>
<TableCell class="text-right">
<TableCell>
<DropdownActions
v-if="!(affiliationIndex === indexEditMode)"
v-bind="rowActionsArgs(affiliationIndex)"
:class="'dropDownActions border-transparent'"
:class="'dropDownActions border-transparent py-1.5'"
@action="
(actionName) =>
rowActionsHandler(actionName, affiliationIndex)
Expand All @@ -128,7 +140,7 @@
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<TableCell class="align-top">
<span class="text-lg-semibold">
{{
t('user.affiliations.searchPhraseLabel', {
Expand All @@ -138,34 +150,40 @@
</span>
<FieldAffiliationsRorAutoSuggest ref="autoSuggestRef" />
</TableCell>
<TableCell>
<TableCell class="">
<div v-if="showNewAffiliationForm">
<div v-if="newAffiliation.ror">
<span class="text-lg-semibold">
{{ newAffiliation.ror }}
</span>
<span class="text-lg-semibold">&nbsp;</span>
<br />
<a
:href="newAffiliation.ror"
class="inline-block py-2"
class="flex cursor-pointer items-center text-lg-semibold"
target="_blank"
>
<Icon icon="ROR" :class="'ms-1 h-6 w-6'" :inline="true" />
{{ newAffiliation.ror }}
<Icon
icon="ROR"
:class="'ms-2 inline-block h-auto w-6 align-middle'"
:inline="true"
/>
</a>
</div>
<div v-else>
<div>
<span class="inline-block py-2 text-lg-semibold">
<span class="flex items-center text-lg-semibold">
<Icon
:icon="
translations(newAffiliation).count ===
translations(newAffiliation).total
? 'Complete'
: 'InProgress'
"
:class="'h-6 w-6'"
:class="'ms-2 inline-block h-auto w-6 align-middle'"
:inline="true"
/>
{{ translations(newAffiliation).label }}
<span class="align-middle">
{{ translations(newAffiliation).label }}
</span>
</span>
</div>
<div
Expand Down