-
Notifications
You must be signed in to change notification settings - Fork 0
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
In listing views, I want to see locality information if applicable #1692
Conversation
@@ -4,8 +4,8 @@ | |||
<thead> | |||
<tr> | |||
<th scope="col" style="width: 70%">{% trans 'Title' %}</th> | |||
{% if doc_table_show_jurisdiction %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the logic to determine the value of this variable previously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's set only in africanlii to show the jurisdiction of taxonomies alone. But if we're showing jurisdiction across the site, I didn't think it'd matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Can you remove the logic that sets it in views.py or wherever?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -19,8 +19,12 @@ | |||
<td> | |||
<a href="{{ document.get_absolute_url }}">{{ document.title }}</a> | |||
</td> | |||
{% if doc_table_show_jurisdiction %} | |||
<td>{% jurisdiction_icon document %} {{ document.jurisdiction }}</td> | |||
{% if MULTIPLE_JURISDICTIONS and MULTIPLE_LOCALITIES %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite:
- if
MULTIPLE_JURISDICTIONS
a. show document.country
b. if document.locality, show it - elif
MULTIPLE_LOCALITIES
a. if document.locality, show it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the case of MULTIPLE_JURISDICTIONS, do you want the locality showing after the jurisdiction or before? Or should it be a separate column?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same column, but after. Separate with a https://en.wikipedia.org/wiki/Interpunct ·
eg. South Africa · Gauteng
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a difference between if document.locality, show it and document.locality|default_if_none:''? Either way, a document without locality won't display anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, no difference, except that you don't want the middot if there is no locality.
@longhotsummer back to you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great
Closes #1646
Loom: https://www.loom.com/share/744292bf14c24d049528c369f1343583?sid=3217dbf5-1583-42f0-842c-8ec87785a200