Avoid displaying empty type field in search result list #973
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.
This PR avoids showing an empty type field in search result list. This could happen for concepts which had only
skos:Concept
as their type.Before:
![image](https://user-images.githubusercontent.com/1132830/78890451-5c321a00-7a6e-11ea-8179-00912d8caa50.png)
After:
![image](https://user-images.githubusercontent.com/1132830/78890413-4a507700-7a6e-11ea-9783-cc853292d4c5.png)
This isn't quite what @tfrancart requested in #942:
Instead, this makes the search result list match the concept page, where a type field is not shown at all if "Concept" is the only type of a concept.
The Twig template code for this part of the search result list was simplified a lot. It had a lot of unnecessary complexity as it was adapted from the concept page in commit 89a02e2
Fixes #942