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

link creator's name to search #855

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@
{% macro show_creatibutors(creatibutors, show_affiliations=False) %}
{% for creatibutor in creatibutors %}
{{ creatibutor_icon(creatibutor) }}
<span
<a
class="ui tooltip-popup text-muted"
{% if show_affiliations and creatibutor.affiliations %}
data-content="{{ creatibutor.affiliations|join('; ', attribute='1') }}"
{% endif %}
href="/search?q=metadata.creators.person_or_org.name{{ creatibutor.person_or_org.name}}"
Copy link
Member

@lnielsen lnielsen May 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
href="/search?q=metadata.creators.person_or_org.name{{ creatibutor.person_or_org.name}}"
href="{{ url_for('invenio_search_ui.search', q='metadata.creators.person_or_org.name:" creatibutor.person_or_org.name") }}"

Can you check that the following would work:

  • Deposit a record with both a person and an organistaion.
  • Make sure both of them have spaces in their name and the names are unique to all other records.
  • Once deposited, you should be able to click the name, and get a hit (and only one hit) in the search result.

>
{{ creatibutor.person_or_org.name }}
</span>
</a>
<sup class="font-tiny">
{% for affiliation in creatibutor.affiliations %}
{{ affiliation[0] }}{{ ", " if not loop.last }}
Expand Down