Merged in [19485] from lars@eggert.org:
Revamp the menu structure some, and remove a bunch of unneeded files.
- Legacy-Id: 19521
Note: SVN reference [19485] has been migrated to Git commit 126892d8a2
This commit is contained in:
commit
46bd95d897
|
@ -1,30 +0,0 @@
|
||||||
from django import template
|
|
||||||
from django.contrib.auth.models import AnonymousUser
|
|
||||||
|
|
||||||
from ietf.ietfauth.utils import has_role
|
|
||||||
from ietf.group.models import Group
|
|
||||||
from ietf.name.models import StreamName
|
|
||||||
|
|
||||||
register = template.Library()
|
|
||||||
|
|
||||||
@register.inclusion_tag('base/streams_menu.html', takes_context=True)
|
|
||||||
def streams_menu(context):
|
|
||||||
editable_streams = []
|
|
||||||
|
|
||||||
user = context["request"].user if "request" in context else AnonymousUser()
|
|
||||||
|
|
||||||
if user.is_authenticated:
|
|
||||||
streams = StreamName.objects.exclude(slug="legacy")
|
|
||||||
|
|
||||||
if has_role(user, "Secretariat"):
|
|
||||||
editable_streams.extend(streams)
|
|
||||||
else:
|
|
||||||
acronyms = Group.objects.filter(acronym__in=(s.slug for s in streams),
|
|
||||||
role__name="chair",
|
|
||||||
role__person__user=user).distinct().values_list("acronym", flat=True)
|
|
||||||
|
|
||||||
for s in streams:
|
|
||||||
if s.slug in acronyms:
|
|
||||||
editable_streams.append(s)
|
|
||||||
|
|
||||||
return { 'editable_streams': editable_streams }
|
|
|
@ -42,6 +42,8 @@ parent_short_names = {
|
||||||
'ops':'Ops & Mgmt',
|
'ops':'Ops & Mgmt',
|
||||||
'rai':'RAI',
|
'rai':'RAI',
|
||||||
'iab':'IAB',
|
'iab':'IAB',
|
||||||
|
'art':'Apps & Realtime',
|
||||||
|
'ietfadminllc' : 'IETF LLC',
|
||||||
}
|
}
|
||||||
|
|
||||||
parents = Group.objects.filter(
|
parents = Group.objects.filter(
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{# Copyright The IETF Trust 2015-2019, All Rights Reserved #}{% load origin %}{% origin %}
|
{# Copyright The IETF Trust 2015-2019, All Rights Reserved #}{% load origin %}{% origin %}
|
||||||
{% load ietf_filters managed_groups wg_menu streams_menu active_groups_menu group_filters %}
|
{% load ietf_filters managed_groups wg_menu active_groups_menu group_filters %}
|
||||||
|
|
||||||
{% if flavor != "top" %}
|
{% if flavor != "top" %}
|
||||||
{% include "base/menu_user.html" %}
|
{% include "base/menu_user.html" %}
|
||||||
|
@ -12,16 +12,11 @@
|
||||||
{% if flavor == "top" %}
|
{% if flavor == "top" %}
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu" role="menu">
|
<ul class="dropdown-menu" role="menu">
|
||||||
|
|
||||||
|
<li class="dropdown-header visible-lg-block">By area/parent</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li><a href="{% url "ietf.group.views.active_groups" group_type="wg" %}">Active WGs</a></li>
|
|
||||||
<li><a href="{% url "ietf.group.views.active_groups" group_type="rg" %}">Active RGs</a></li>
|
|
||||||
<li class="dropdown-submenu group-menu"><a href="{% url "ietf.group.views.active_groups" %}">Other</a>{% active_groups_menu %} </li>
|
|
||||||
|
|
||||||
{% if flavor == "top" %}<li class="divider hidden-xs"></li>{% endif %}
|
|
||||||
<li {%if flavor == "top" %}class="dropdown-header visible-lg-block"{% else %}class="nav-header hidden-nojs"{% endif %}>By area/parent</li>
|
|
||||||
{% wg_menu %}
|
{% wg_menu %}
|
||||||
{# <li class="hidden-lg hidden-nojs"><a href="#" data-toggle="modal" data-target="#navmodal">Jump to group</a></li> #}
|
<li class="dropdown-submenu group-menu"><a href="{% url "ietf.group.views.active_groups" %}">Other</a>{% active_groups_menu %} </li>
|
||||||
|
|
||||||
{% if flavor == "top" %}<li class="divider hidden-xs"></li>{% endif %}
|
{% if flavor == "top" %}<li class="divider hidden-xs"></li>{% endif %}
|
||||||
<li {%if flavor == "top" %}class="dropdown-header hidden-xs"{% else %}class="nav-header"{% endif %}>New work</li>
|
<li {%if flavor == "top" %}class="dropdown-header hidden-xs"{% else %}class="nav-header"{% endif %}>New work</li>
|
||||||
|
@ -88,9 +83,6 @@
|
||||||
<li><a href="{% url "ietf.nomcom.views.private_index" g.nomcom_set.first.year %}">{{ g.acronym|capfirst }}</a></li>
|
<li><a href="{% url "ietf.nomcom.views.private_index" g.nomcom_set.first.year %}">{{ g.acronym|capfirst }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
|
||||||
<li><a rel="nofollow" href="/accounts/login/?next={{ request.get_full_path|urlencode }}">Sign in to track docs</a></li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,16 +104,28 @@
|
||||||
<ul class="dropdown-menu" role="menu">
|
<ul class="dropdown-menu" role="menu">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if flavor == "top" %}
|
||||||
|
<li class="dropdown-header visible-lg-block">Next meeting</li>
|
||||||
|
{% endif %}
|
||||||
<li><a href="/meeting/agenda/">Agenda</a></li>
|
<li><a href="/meeting/agenda/">Agenda</a></li>
|
||||||
<li><a href="/meeting/materials/">Materials</a></li>
|
<li><a href="/meeting/materials/">Materials</a></li>
|
||||||
<li><a href="/meeting/floor-plan/">Floor plan</a></li>
|
<li><a href="/meeting/floor-plan/">Floor plan</a></li>
|
||||||
<li><a href="https://www.ietf.org/how/meetings/register/">Registration</a></li>
|
<li><a href="https://www.ietf.org/how/meetings/register/">Registration</a></li>
|
||||||
<li><a href="{% url 'ietf.meeting.views.important_dates' %}">Important dates</a></li>
|
<li><a href="{% url 'ietf.meeting.views.important_dates' %}">Important dates</a></li>
|
||||||
<li><a href="https://www.ietf.org/how/meetings/past/">Proceedings</a></li>
|
|
||||||
<li><a href="/meeting/upcoming">Upcoming</a></li>
|
|
||||||
<li><a href="/meeting/past">Past</a></li>
|
|
||||||
<li><a href="/secr/sreq/">Request a session</a></li>
|
<li><a href="/secr/sreq/">Request a session</a></li>
|
||||||
<li><a href="/meeting/requests">Session requests</a></li>
|
<li><a href="/meeting/requests">Session requests</a></li>
|
||||||
|
{% if flavor == "top" %}
|
||||||
|
<li class="divider hidden-xs"></li>
|
||||||
|
<li class="dropdown-header visible-lg-block">Upcoming meetings</li>
|
||||||
|
{% endif %}
|
||||||
|
<li><a href="/meeting/upcoming">Upcoming meetings</a></li>
|
||||||
|
{% if flavor == "top" %}
|
||||||
|
<li class="divider hidden-xs"></li>
|
||||||
|
<li class="dropdown-header visible-lg-block">Past meetings</li>
|
||||||
|
{% endif %}
|
||||||
|
<li><a href="/meeting/past">Past meetings</a></li>
|
||||||
|
<li><a href="https://www.ietf.org/how/meetings/past/">Meeting proceedings</a></li>
|
||||||
{% if flavor == "top" %}</ul>{% endif %}
|
{% if flavor == "top" %}</ul>{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
{# Copyright The IETF Trust 2015, All Rights Reserved #}{% load origin %}{% origin %}
|
|
||||||
<div class="table-responsive">
|
|
||||||
{% spaceless %}
|
|
||||||
<table class="table table-condensed">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
{% for area in areas %}
|
|
||||||
<th class="text-center">{{area.acronym|upper}}</th>
|
|
||||||
{% endfor %}
|
|
||||||
<th class="text-center">IRTF</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
{% for area in areas %}
|
|
||||||
<td>
|
|
||||||
<div class="btn-group-vertical btn-block">
|
|
||||||
{% for group in area.active_groups %}
|
|
||||||
<div class="btn-group btn-group-xs btn-group-justified">
|
|
||||||
<a href="{% url "ietf.group.views.group_home" group_type=group.type_id acronym=group.acronym %}" class="btn btn-default">
|
|
||||||
{{group.acronym}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{% endfor %}
|
|
||||||
<td>
|
|
||||||
<div class="btn-group-vertical btn-block">
|
|
||||||
{% for group in rgs %}
|
|
||||||
<div class="btn-group btn-group-xs btn-group-justified">
|
|
||||||
<a href="{% url "ietf.group.views.group_home" group_type=group.type_id acronym=group.acronym %}" class="btn btn-default">
|
|
||||||
{{group.acronym}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% endspaceless %}
|
|
||||||
</div>
|
|
|
@ -1,8 +0,0 @@
|
||||||
{# Copyright The IETF Trust 2015, All Rights Reserved #}{% load origin %}{% origin %}
|
|
||||||
{% load ietf_filters %}
|
|
||||||
{% if editable_streams %}
|
|
||||||
<li class="sect">Streams</li>
|
|
||||||
{% for stream in editable_streams %}
|
|
||||||
<li{% if forloop.last %} style="margin-bottom: 2px;"{% endif %}><a href="{% url "ietf.group.views.stream_edit" stream.slug %}">{{ stream.name }} stream</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
Loading…
Reference in a new issue