SS-1953 New field for keywords from controlled vocabularies#545
Merged
Conversation
hamzaimran08
left a comment
Collaborator
There was a problem hiding this comment.
Looks great in general, just a couple of suggestions/questions
In templates/common/app_metadata.html should we change this
<dt class="col-sm-4">Tags</dt>
<dd class="col-sm-8">
{% for tag in app.tags.all %}
<a class="tag me-1 mb-1" onclick="searchByTag('{{ tag | title }}','card-keyword',this)">
<span class="badge text-bg-primary badge-grape badge-ico" style="margin-right: -0.2rem;">
<div class="fas fa-tag fa-sm me-1"></div>
<span class="tag-name">{{ tag |title }}</span>
</span>
</a>
{% endfor %}
</dd>to
<dt class="col-sm-4">Subjects & keywords</dt>
<dd class="col-sm-8">
{% for keyword in app.subjects_keywords %}
<a class="tag me-1 mb-1" onclick="searchByTag('{{ keyword.subject | title }}','card-keyword',this)">
<span class="badge text-bg-primary badge-grape badge-ico" style="margin-right: -0.2rem;">
<div class="fas fa-tag fa-sm me-1"></div>
<span class="tag-name">{{ keyword.subject |title }}</span>
</span>
</a>
{% endfor %}
</dd>Also, in app/helpers.py should we also change:
Line 392 to subjects_keywords instead of tags
Line 685-686 to
subjects_keywords_data = form.cleaned_data.get("subjects_keywords") if hasattr(form, "cleaned_data") else None
logger.debug(f"Background task: subjects_keywords data from form: {subjects_keywords_data}")And Line 693 to "subjects_keywords": form.cleaned_data.get("subjects_keywords")
Collaborator
Author
|
Thanks, Hamza. I now made all the changes. |
j-awada
pushed a commit
that referenced
this pull request
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This addresses SS-1953. In this PR, I am adding a new JSON field to store info about keywords. User selects keywords from controlled vocabularies, we save the subject, vocabulary name (scheme), and keyword id (classification code). This is the field that also underlies the keywords displayed in the interface, used for filtering, sent to invenio.
Checklist