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

In listing views, I want to see locality information if applicable #1692

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

Sandravaphilips
Copy link
Collaborator

@@ -4,8 +4,8 @@
<thead>
<tr>
<th scope="col" style="width: 70%">{% trans 'Title' %}</th>
{% if doc_table_show_jurisdiction %}
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screenshot 2024-01-22 at 11 53 32

@@ -19,8 +19,12 @@
<td>
<a href="{{ document.get_absolute_url }}">{{ document.title }}</a>
</td>
{% if doc_table_show_jurisdiction %}
<td>{% jurisdiction_icon document %}&nbsp;{{ document.jurisdiction }}</td>
{% if MULTIPLE_JURISDICTIONS and MULTIPLE_LOCALITIES %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not quite:

  1. if MULTIPLE_JURISDICTIONS
    a. show document.country
    b. if document.locality, show it
  2. elif MULTIPLE_LOCALITIES
    a. if document.locality, show it

Copy link
Collaborator Author

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?

Copy link
Contributor

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

Copy link
Collaborator Author

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

Copy link
Contributor

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.

@Sandravaphilips
Copy link
Collaborator Author

@longhotsummer back to you

Copy link
Contributor

@longhotsummer longhotsummer left a comment

Choose a reason for hiding this comment

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

great

@Sandravaphilips Sandravaphilips merged commit 9fb935a into main Jan 22, 2024
9 checks passed
@Sandravaphilips Sandravaphilips deleted the sandrava-1646 branch January 22, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In listing views, I want to see locality information if applicable
2 participants