-
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
<thead> | ||
<tr> | ||
<th scope="col" style="width: 70%">{% trans 'Title' %}</th> | ||
{% if doc_table_show_jurisdiction %} | ||
<th scope="col">{% trans 'Country' %}</th> | ||
{% if MULTIPLE_JURISDICTIONS or MULTIPLE_LOCALITIES %} | ||
<th scope="col">{% trans 'Jurisdiction' %}</th> | ||
{% endif %} | ||
{% if doc_table_show_author %}<th scope="col"></th>{% endif %} | ||
{% if doc_table_show_court %}<th scope="col"></th>{% endif %} | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Not quite:
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
<td> | ||
{% jurisdiction_icon document %} {{ document.locality|default_if_none:'' }} {{ document.jurisdiction|default_if_none:'' }} | ||
</td> | ||
{% elif MULTIPLE_LOCALITIES %} | ||
<td>{{ document.locality|default_if_none:'' }}</td> | ||
{% endif %} | ||
{% if doc_table_show_author %}<td>{{ document.author|default_if_none:'' }}</td>{% endif %} | ||
{% if doc_table_show_court %}<td>{{ document.court|default_if_none:'' }}</td>{% endif %} | ||
|
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.