Move group charter actions from box and button next to header up to an
edit menu under the ordinary group menu - Legacy-Id: 6219
This commit is contained in:
parent
5924024513
commit
2e29298d0c
|
@ -70,6 +70,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
</h1>
|
||||
|
||||
<div class="ietf-navset">
|
||||
<div>
|
||||
<a {% if selected == "documents" %}class="selected"{% else %}href="{% url ietf.wginfo.views.group_documents acronym=group.acronym %}"{% endif %}>Documents</a> |
|
||||
<a {% if selected == "charter" %}class="selected"{% else %}href="{% url ietf.wginfo.views.group_charter acronym=group.acronym %}"{% endif %}>Charter</a> |
|
||||
|
||||
|
@ -78,6 +79,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<a href="{{ group.list_archive }}">List Archive »</a> |
|
||||
{% endif %}
|
||||
<a href="http://tools.ietf.org/wg/{{ group.acronym }}/">Tools WG Page »</a>
|
||||
</div>
|
||||
|
||||
{% if menu_actions %}
|
||||
<div class="actions">
|
||||
{% for name, url in menu_actions %}
|
||||
<a href="{{ url }}">{{ name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% block group_content %}
|
||||
|
|
|
@ -138,13 +138,6 @@ is occasionally incorrect.</span>
|
|||
|
||||
</table>
|
||||
|
||||
{% if user|has_role:"Area Director,Secretariat" %}
|
||||
<div style="margin: 2px; margin-top: 2em;">
|
||||
{% for name, url in actions %}
|
||||
<a href="{{ url }}">{{ name }}</a> {% if not forloop.last %} | {% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% with group.groupurl_set.all as urls %}
|
||||
|
@ -161,14 +154,7 @@ is occasionally incorrect.</span>
|
|||
|
||||
<p>{{ group.charter_text|escape|format_charter|safe }}</p>
|
||||
|
||||
<h2>{% if group.state_id == "proposed" %}Proposed{% endif %} Milestones
|
||||
|
||||
{% if group.state_id != "proposed" %}
|
||||
{% if user|has_role:"Area Director,Secretariat" or is_chair %}
|
||||
<a class="button" href="{% url wg_edit_milestones acronym=group.acronym %}">Add or edit milestones</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</h2>
|
||||
<h2>{% if group.state_id == "proposed" %}Proposed{% endif %} Milestones</h2>
|
||||
|
||||
{% with group.milestones as milestones %}
|
||||
{% include "wginfo/milestones.html" %}
|
||||
|
|
|
@ -173,9 +173,27 @@ def chartering_wgs(request):
|
|||
|
||||
def construct_group_menu_context(request, group, selected, others):
|
||||
"""Return context with info for the group menu filled in."""
|
||||
actions = []
|
||||
|
||||
is_chair = group.has_role(request.user, "chair")
|
||||
is_ad_or_secretariat = has_role(request.user, ("Area Director", "Secretariat"))
|
||||
|
||||
if group.state_id != "proposed" and (is_chair or is_ad_or_secretariat):
|
||||
actions.append((u"Add or edit milestones", urlreverse("wg_edit_milestones", kwargs=dict(acronym=group.acronym))))
|
||||
|
||||
if group.state_id != "conclude" and is_ad_or_secretariat:
|
||||
actions.append((u"Edit group", urlreverse("group_edit", kwargs=dict(acronym=group.acronym))))
|
||||
|
||||
if is_chair or is_ad_or_secretariat:
|
||||
actions.append((u"Customize workflow", urlreverse("ietf.wginfo.edit.customize_workflow", kwargs=dict(acronym=group.acronym))))
|
||||
|
||||
if group.state_id in ("active", "dormant") and is_ad_or_secretariat:
|
||||
actions.append((u"Request closing group", urlreverse("wg_conclude", kwargs=dict(acronym=group.acronym))))
|
||||
|
||||
d = {
|
||||
"group": group,
|
||||
"selected": selected,
|
||||
"menu_actions": actions,
|
||||
}
|
||||
|
||||
d.update(others)
|
||||
|
@ -259,25 +277,11 @@ def group_charter(request, acronym):
|
|||
fill_in_charter_info(group, include_drafts=False)
|
||||
group.delegates = Email.objects.filter(role__group=group, role__name="delegate")
|
||||
|
||||
actions = []
|
||||
if group.state_id != "conclude":
|
||||
actions.append((u"Edit %s" % group.type.name, urlreverse("group_edit", kwargs=dict(acronym=group.acronym))))
|
||||
|
||||
e = group.latest_event(type__in=("changed_state", "requested_close",))
|
||||
requested_close = group.state_id != "conclude" and e and e.type == "requested_close"
|
||||
|
||||
if group.state_id in ("active", "dormant"):
|
||||
actions.append((u"Request closing %s" % group.type.name, urlreverse("wg_conclude", kwargs=dict(acronym=group.acronym))))
|
||||
|
||||
is_chair = request.user.is_authenticated() and group.role_set.filter(name="chair", person__user=request.user)
|
||||
|
||||
if is_chair or has_role(request.user, "Secretariat"):
|
||||
actions.append((u"Customize workflow", urlreverse("ietf.wginfo.edit.customize_workflow", kwargs=dict(acronym=group.acronym))))
|
||||
|
||||
return render_to_response('wginfo/group_charter.html',
|
||||
construct_group_menu_context(request, group, "charter", {
|
||||
"actions": actions,
|
||||
"is_chair": is_chair,
|
||||
"milestones_in_review": group.groupmilestone_set.filter(state="review"),
|
||||
"requested_close": requested_close,
|
||||
}), RequestContext(request))
|
||||
|
|
|
@ -76,6 +76,7 @@ a img { border: 0; }
|
|||
.ietf-navset .selected { font-weight:bold; padding: 0 3px; }
|
||||
.ietf-navset a, .ietf-navset a:visited { color: white; padding:0 3px; }
|
||||
|
||||
.ietf-navset .actions { margin-top: 0.5em; font-style: italic; font-size: 90%; }
|
||||
|
||||
.ietf-ballot .left { background: #edf5ff; width:160px; padding-left: 10px; }
|
||||
.ietf-ballot .right { padding-left: 15px; padding-right:15px; width:610px;padding-top:0px;}
|
||||
|
|
Loading…
Reference in a new issue