Added a slide abstract [Edit] button on slide document pages also for empty abstracts, to provide the ability to add abstracts.
- Legacy-Id: 13825
This commit is contained in:
parent
fa49287cfa
commit
f8f7815060
|
@ -122,6 +122,7 @@ def edit_material(request, name=None, acronym=None, action=None, doc_type=None):
|
|||
|
||||
prev_title = doc.title
|
||||
prev_state = doc.get_state()
|
||||
prev_abstract = doc.abstract
|
||||
|
||||
if "title" in form.cleaned_data:
|
||||
doc.title = form.cleaned_data["title"]
|
||||
|
@ -158,6 +159,14 @@ def edit_material(request, name=None, acronym=None, action=None, doc_type=None):
|
|||
e.save()
|
||||
events.append(e)
|
||||
|
||||
if prev_abstract != doc.abstract:
|
||||
e = DocEvent(doc=doc, rev=doc.rev, by=request.user.person, type='changed_document')
|
||||
e.desc = u"Changed abstract to <b>%s</b>" % doc.abstract
|
||||
if prev_abstract:
|
||||
e.desc += u" from %s" % prev_abstract
|
||||
e.save()
|
||||
events.append(e)
|
||||
|
||||
if "state" in form.cleaned_data and form.cleaned_data["state"] != prev_state:
|
||||
doc.set_state(form.cleaned_data["state"])
|
||||
e = add_state_change_event(doc, request.user.person, prev_state, form.cleaned_data["state"])
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<td>{{ doc.title }}</td>
|
||||
</tr>
|
||||
|
||||
{% if doc.abstract %}
|
||||
{% if doc.abstract or doc.type_id == 'slides' and can_manage_material and not snapshot %}
|
||||
<tr>
|
||||
<th>Abstract</th>
|
||||
<td class="edit">
|
||||
|
|
|
@ -209,11 +209,17 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{item.timeslot.name}}
|
||||
{% if item.session.agenda %}
|
||||
<a href="{{ item.session.agenda.href }}">
|
||||
{{item.timeslot.name}}
|
||||
</a>
|
||||
{% else %}
|
||||
{{item.timeslot.name}}
|
||||
{% endif %}
|
||||
|
||||
{% if item.session.status.slug == 'canceled' %}
|
||||
<span class="label label-danger pull-right">CANCELLED</span>
|
||||
{% endif %}
|
||||
{% if item.session.status.slug == 'canceled' %}
|
||||
<span class="label label-danger pull-right">CANCELLED</span>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td class="col-md-2">
|
||||
|
|
Loading…
Reference in a new issue