merged older materials work (specifically, that vetted in prague)
- Legacy-Id: 10750
This commit is contained in:
commit
a1a518a4bc
|
@ -307,6 +307,8 @@ def document_main(request, name, rev=None):
|
|||
status_changes = [ rel.document for rel in status_change_docs if rel.document.get_state_slug() in ('appr-sent','appr-pend')]
|
||||
proposed_status_changes = [ rel.document for rel in status_change_docs if rel.document.get_state_slug() in ('needshep','adrev','iesgeval','defer','appr-pr')]
|
||||
|
||||
presentations = doc.future_presentations()
|
||||
|
||||
# remaining actions
|
||||
actions = []
|
||||
|
||||
|
@ -417,6 +419,7 @@ def document_main(request, name, rev=None):
|
|||
search_archive=search_archive,
|
||||
actions=actions,
|
||||
tracking_document=tracking_document,
|
||||
presentations=presentations,
|
||||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
|
@ -526,13 +529,8 @@ def document_main(request, name, rev=None):
|
|||
# created and content is made available on disk
|
||||
if doc.type_id in ("slides", "agenda", "minutes"):
|
||||
can_manage_material = can_manage_materials(request.user, doc.group)
|
||||
presentations = None
|
||||
if doc.type_id=='slides' and doc.get_state_slug('slides')=='active' :
|
||||
presentations = doc.future_presentations()
|
||||
presentations = doc.future_presentations()
|
||||
if doc.meeting_related():
|
||||
# disallow editing meeting-related stuff through this
|
||||
# interface for the time being
|
||||
can_manage_material = False
|
||||
basename = doc.canonical_name() # meeting materials are unversioned at the moment
|
||||
if doc.external_url:
|
||||
# we need to remove the extension for the globbing below to work
|
||||
|
|
|
@ -250,11 +250,10 @@ def get_upcoming_manageable_sessions(user, doc, acronym=None, date=None, seq=Non
|
|||
def edit_material_presentations(request, name, acronym=None, date=None, seq=None, week_day=None):
|
||||
|
||||
doc = get_object_or_404(Document, name=name)
|
||||
if not (doc.type_id=='slides' and doc.get_state('slides').slug=='active'):
|
||||
raise Http404
|
||||
|
||||
group = doc.group
|
||||
if not (group.features.has_materials and can_manage_materials(request.user,group)):
|
||||
|
||||
if not can_manage_materials(request.user,group):
|
||||
raise Http404
|
||||
|
||||
sorted_sessions = get_upcoming_manageable_sessions(request.user, doc, acronym, date, seq, week_day)
|
||||
|
@ -301,11 +300,11 @@ def edit_material_presentations(request, name, acronym=None, date=None, seq=None
|
|||
def material_presentations(request, name, acronym=None, date=None, seq=None, week_day=None):
|
||||
|
||||
doc = get_object_or_404(Document, name=name)
|
||||
if not (doc.type_id=='slides' and doc.get_state('slides').slug=='active'):
|
||||
raise Http404
|
||||
|
||||
|
||||
group = doc.group
|
||||
if not (group.features.has_materials and can_manage_materials(request.user,group)):
|
||||
|
||||
if not can_manage_materials(request.user,group):
|
||||
raise Http404
|
||||
|
||||
sorted_sessions = get_upcoming_manageable_sessions(request.user, doc, acronym, date, seq, week_day)
|
||||
|
|
|
@ -948,6 +948,9 @@ class Session(models.Model):
|
|||
def slides(self):
|
||||
return list(self.get_material("slides", only_one=False))
|
||||
|
||||
def drafts(self):
|
||||
return list(self.materials.filter(type='draft'))
|
||||
|
||||
def __unicode__(self):
|
||||
if self.meeting.type_id == "interim":
|
||||
return self.meeting.number
|
||||
|
|
|
@ -244,6 +244,26 @@
|
|||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if presentations or can_edit_stream_info %}
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>On Agenda</th>
|
||||
<td class="edit">
|
||||
{% if not snapshot and can_edit_stream_info %}
|
||||
{% doc_edit_button "material_presentations" name=doc.name %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if presentations %}
|
||||
{% for pres in presentations %}{{ pres.session.short_name }} at {{ pres.session.meeting }} {% if pres.rev != doc.rev %}(version -{{ pres.rev }}){% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}
|
||||
{% else %}
|
||||
None
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Document shepherd</th>
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
<tbody class="meta">
|
||||
<tr>
|
||||
<th>{% if doc.meeting_related %}Meeting{% endif %} {{ doc.type.name }}</th>
|
||||
<td class="edit"></td>
|
||||
<td>
|
||||
<th class="col-md-1">{% if doc.meeting_related %}Meeting{% endif %} {{ doc.type.name }}</th>
|
||||
<td class="edit col-md-1"></td>
|
||||
<td class="col-md-10">
|
||||
{{ doc.group.name }}
|
||||
<a href="{{ doc.group.about_url }}">({{ doc.group.acronym }})</a> {{ doc.group.type.name }}
|
||||
|
||||
|
|
|
@ -48,6 +48,15 @@
|
|||
{% endfor %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
<td>
|
||||
{% with session.drafts as drafts %}
|
||||
{% for draft in drafts %}
|
||||
<a href="{% url "doc_view" name=draft.canonical_name %}">{{ draft.canonical_name }}</a><br>
|
||||
{% empty %}
|
||||
<span class="label label-warning">No drafts</span>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -42,10 +42,11 @@
|
|||
<table class="table table-condensed table-striped tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Group</th>
|
||||
<th>Agenda</th>
|
||||
<th>Minutes</th>
|
||||
<th>Slides</th>
|
||||
<th class="col-md-1">Group</th>
|
||||
<th class="col-md-1">Agenda</th>
|
||||
<th class="col-md-1">Minutes</th>
|
||||
<th class="col-md-6">Slides</th>
|
||||
<th class="col-md-3">Drafts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -64,10 +65,11 @@
|
|||
<table class="table table-condensed table-striped tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Group</th>
|
||||
<th>Agenda</th>
|
||||
<th>Minutes</th>
|
||||
<th>Slides</th>
|
||||
<th class="col-md-1">Group</th>
|
||||
<th class="col-md-1">Agenda</th>
|
||||
<th class="col-md-1">Minutes</th>
|
||||
<th class="col-md-6">Slides</th>
|
||||
<th class="col-md-3">Drafts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -88,10 +90,11 @@
|
|||
<table class="table table-condensed table-striped tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Group</th>
|
||||
<th>Agenda</th>
|
||||
<th>Minutes</th>
|
||||
<th>Slides</th>
|
||||
<th class="col-md-1">Group</th>
|
||||
<th class="col-md-1">Agenda</th>
|
||||
<th class="col-md-1">Minutes</th>
|
||||
<th class="col-md-6">Slides</th>
|
||||
<th class="col-md-3">Drafts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -112,10 +115,11 @@
|
|||
<table class="table table-condensed table-striped tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Group</th>
|
||||
<th>Agenda</th>
|
||||
<th>Minutes</th>
|
||||
<th>Slides</th>
|
||||
<th class="col-md-1">Group</th>
|
||||
<th class="col-md-1">Agenda</th>
|
||||
<th class="col-md-1">Minutes</th>
|
||||
<th class="col-md-6">Slides</th>
|
||||
<th class="col-md-3">Drafts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -135,10 +139,11 @@
|
|||
<table class="table table-condensed table-striped tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Group</th>
|
||||
<th>Agenda</th>
|
||||
<th>Minutes</th>
|
||||
<th>Slides</th>
|
||||
<th class="col-md-1">Group</th>
|
||||
<th class="col-md-1">Agenda</th>
|
||||
<th class="col-md-1">Minutes</th>
|
||||
<th class="col-md-6">Slides</th>
|
||||
<th class="col-md-3">Drafts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -182,4 +187,4 @@
|
|||
|
||||
{% block js %}
|
||||
<script src="{% static "jquery.tablesorter/js/jquery.tablesorter.combined.min.js" %}"></script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue