Skip to content

Commit

Permalink
Merge pull request #2783 from GeotrekCE/display_outdoor_hierarchy
Browse files Browse the repository at this point in the history
Distinguish Sites from Courses in Outdoor tree display
  • Loading branch information
Chatewgne committed Oct 5, 2021
2 parents 0e569bb + 581b830 commit 08842b7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ CHANGELOG
- APIv2 : Add 'children' and 'parent' fields to Outdoor Site serialization
- APIv2 : Add filter by pratices on outdoor courses

**User Interface**

- Distinguish Sites from Courses in Outdoor tree display thanks to bullets

**Bug fixes**

- Fix nearby Courses and nearby Sites display in Outdoor detail pages


2.66.0 (2021-09-27)
----------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<h3>{% trans "Tree view" %}</h3>
{% for ancestor in object.site.get_ancestors %}
<ul>
<li>
<li style="list-style-type: circle">
<a href="{% url 'outdoor:site_detail' ancestor.pk %}">{{ ancestor }}</a>
{% endfor %}
<ul>
<li>
<a href="{% url 'outdoor:site_detail' object.site.pk %}">{{ object.site }}</a>
<ul>
<li>
<li style="list-style-type: disc">
<b>{{ object }}</b>
</li>
<li>
<li style="list-style-type: disc">
<a href="{% url 'outdoor:course_add' %}?site={{ object.site.pk }}">
+ <i>{% trans "Add a course" %}</i>
</a>
Expand Down
12 changes: 6 additions & 6 deletions geotrek/outdoor/templates/outdoor/site_detail_attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
<h3>{% trans "Tree view" %}</h3>
{% for ancestor in object.get_ancestors %}
<ul>
<li>
<li style="list-style-type: circle">
<a href="{% url 'outdoor:site_detail' ancestor.pk %}">{{ ancestor }}</a>
{% endfor %}
<ul>
<li>
<li style="list-style-type: circle">
<b>{{ object }}</b>
<ul>
{% for child in object.children.all %}
<li>
<li style="list-style-type: circle">
<a href="{% url 'outdoor:site_detail' child.pk %}">{{ child }}</a>
</li>
{% endfor %}
{% for course in object.children_courses.all %}
<li>
<li style="list-style-type: disc">
<a href="{% url 'outdoor:course_detail' course.pk %}">{{ course }}</a>
</li>
{% endfor %}
<li>
<li style="list-style-type: circle">
<a href="{% url 'outdoor:site_add' %}?site={{ object.pk }}">
+ <i>{% trans "Add a child site" %}</i>
</a>
</li>
<li>
<li style="list-style-type: disc">
<a href="{% url 'outdoor:course_add' %}?site={{ object.pk }}">
+ <i>{% trans "Add a course" %}</i>
</a>
Expand Down

0 comments on commit 08842b7

Please sign in to comment.