Skip to content

Commit bcbc22f

Browse files
committed
Only show a link to the tools page for a group if the tools page is likely to exist, i.e., the group is a WG and it is or has been active.
- Legacy-Id: 7264
1 parent 5fd513e commit bcbc22f

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

ietf/group/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ def json_dict(self, host_scheme):
104104
group1['comments'] = self.comments
105105
return group1
106106

107+
def has_tools_page(self):
108+
return self.type_id in ['wg', ] and self.state_id in ['active', 'dormant', 'replaced', 'conclude']
109+
107110
class GroupHistory(GroupInfo):
108111
group = models.ForeignKey(Group, related_name='history_set')
109112
acronym = models.CharField(max_length=40)

ietf/templates/wginfo/group_base.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "base.html" %}
2-
{% comment %}
2+
{% comment %}<!--
33
Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
44
All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
55
@@ -31,6 +31,7 @@
3131
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3232
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3333
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34+
-->
3435
{% endcomment %}
3536
{% load ietf_filters %}
3637
{% block title %}{{ group.name }} ({{ group.acronym }}) - {% block group_subtitle %}{% endblock %}{% endblock %}
@@ -67,11 +68,13 @@ <h1>{{ group.name}} ({{ group.acronym }})
6768
<div>
6869
<a {% if selected == "documents" %}class="selected"{% else %}href="{% url "ietf.wginfo.views.group_documents" acronym=group.acronym %}"{% endif %}>Documents</a> |
6970
<a {% if selected == "charter" %}class="selected"{% else %}href="{% url "ietf.wginfo.views.group_charter" acronym=group.acronym %}"{% endif %}>Charter</a> |
70-
<a {% if selected == "history" %}class="selected"{% else %}href="{% url "ietf.wginfo.views.history" acronym=group.acronym %}"{% endif %}>History</a> |
71+
<a {% if selected == "history" %}class="selected"{% else %}href="{% url "ietf.wginfo.views.history" acronym=group.acronym %}"{% endif %}>History</a>
7172
{% if group.list_archive|startswith:"http:" or group.list_archive|startswith:"https:" or group.list_archive|startswith:"ftp:" %}
72-
<a href="{{ group.list_archive }}">List Archive &raquo;</a> |
73+
| <a href="{{ group.list_archive }}">List Archive &raquo;</a>
74+
{% endif %}
75+
{% if group.has_tools_page %}
76+
| <a href="http://tools.ietf.org/wg/{{ group.acronym }}/">Tools WG Page &raquo;</a>
7377
{% endif %}
74-
<a href="http://tools.ietf.org/wg/{{ group.acronym }}/">Tools WG Page &raquo;</a>
7578
</div>
7679

7780
{% if menu_actions %}

0 commit comments

Comments
 (0)