Skip to content

Commit

Permalink
Add orcid search fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dennmuel committed Jul 22, 2019
1 parent bab489e commit a077f51
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
13 changes: 13 additions & 0 deletions cfg/cfg.d/z_orcid_support.pl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,19 @@ =head2 Changes

}, priority => 50 );

#---Search Fields---#
# Eprints advanced search
my $orcid_search_fields = { meta_fields => [] };
foreach my $role (@{$c->{orcid}->{eprint_fields}})
{
my $field = $role.'_orcid';
push @{$orcid_search_fields->{meta_fields}}, $field;
}
push @{$c->{search}->{advanced}->{search_fields}}, $orcid_search_fields;

# User search
my $user_search_field = { meta_fields => [ "orcid" ] };
push @{$c->{search}->{user}->{search_fields}}, $user_search_field;

#Rendering ORCIDs
{
Expand Down
4 changes: 2 additions & 2 deletions lib/lang/de/phrases/orcid_fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<epp:phrase id="viewname_eprint_orcid">ORCID</epp:phrase>
<epp:phrase id="lib/metafield:join_orcid"></epp:phrase>

<epp:phrase id="validate:invalid_orcid_format">Ungültiges ORCID-Format. Eine ORCID besteht aus vier, durch einen Bindestrich getrennten Gruppen aus je vier Ziffern, z.B. 0000-0003-1495-7122</epp:phrase>
<epp:phrase id="validate:invalid_orcid_format">Ungültiges ORCID-Format. Eine ORCID besteht aus vier, durch einen Bindestrich getrennten Gruppen aus je vier Ziffern, z.B. 0000-0003-1495-7122</epp:phrase>
<epp:phrase id="validate:invalid_orcid_checksum">Ungültige ORCID-Prüfsumme. Sind Sie sicher, dass die ORCID korrekt ist?</epp:phrase>

<epp:phrase id="searchfield:orcid_err">Fehlerhaftes Format für ORCID</epp:phrase>
<epp:phrase id="lib/searchfield:orcid_help" ref="user_fieldhelp_orcid" />
<epp:phrase id="lib/searchfield:help_orcid">Geben Sie eine 16-stellige ORCID ein.</epp:phrase>

</epp:phrases>
4 changes: 2 additions & 2 deletions lib/lang/en/phrases/orcid_fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<epp:phrase id="viewname_eprint_orcid">ORCID</epp:phrase>
<epp:phrase id="lib/metafield:join_orcid"></epp:phrase>

<epp:phrase id="validate:invalid_orcid_format">Invalid ORCID format. ORCID should be 4 groups of 4 digits separated by hyphens, e.g. 0000-0003-1495-7122</epp:phrase>
<epp:phrase id="validate:invalid_orcid_format">Invalid ORCID format. ORCID should be 4 groups of 4 digits separated by hyphens, e.g. 0000-0003-1495-7122</epp:phrase>
<epp:phrase id="validate:invalid_orcid_checksum">Invalid ORCID checksum. Are you sure the ORCID is correct?</epp:phrase>

<epp:phrase id="searchfield:orcid_err">Incorrect format for ORCID</epp:phrase>
<epp:phrase id="lib/searchfield:orcid_help" ref="user_fieldhelp_orcid" />
<epp:phrase id="lib/searchfield:help_orcid">Enter a 16-digit ORCID.</epp:phrase>

</epp:phrases>

0 comments on commit a077f51

Please sign in to comment.