allow editing of abstract for existing material
- Legacy-Id: 8435
This commit is contained in:
parent
2f56de6223
commit
31f687b343
|
@ -1,7 +1,7 @@
|
|||
from django.conf.urls import patterns, url
|
||||
|
||||
urlpatterns = patterns('ietf.doc.views_material',
|
||||
url(r'^(?P<action>state|title|revise)/$', "edit_material", name="material_edit"),
|
||||
url(r'^(?P<action>state|title|abstract|revise)/$', "edit_material", name="material_edit"),
|
||||
url(r'^sessions/$', "material_presentations", name="material_presentations"),
|
||||
)
|
||||
|
||||
|
|
|
@ -55,16 +55,14 @@ class UploadMaterialForm(forms.Form):
|
|||
del self.fields["name"]
|
||||
|
||||
self.fields["title"].initial = doc.title
|
||||
self.fields["abstract"].initial = doc.abstract
|
||||
self.fields["state"].initial = doc.get_state().pk if doc.get_state() else None
|
||||
if doc.get_state_slug() == "deleted":
|
||||
self.fields["state"].help_text = "Note: If you wish to revise this document, you may wish to change the state so it's not deleted."
|
||||
|
||||
if action == "title":
|
||||
del self.fields["state"]
|
||||
del self.fields["material"]
|
||||
elif action == "state":
|
||||
del self.fields["title"]
|
||||
del self.fields["material"]
|
||||
for fieldname in ["title","state","material","abstract"]:
|
||||
if fieldname != action:
|
||||
del self.fields[fieldname]
|
||||
|
||||
def clean_name(self):
|
||||
name = self.cleaned_data["name"].strip().rstrip("-")
|
||||
|
|
|
@ -29,7 +29,11 @@
|
|||
{% if doc.abstract %}
|
||||
<tr>
|
||||
<td>Abstract:</td>
|
||||
<td> {{ doc.abstract | format_snippet }} </td>
|
||||
<td>
|
||||
<a {% if not snapshot and can_manage_material %} class="editlink" href="{% url "material_edit" name=doc.name action="abstract" name=doc.name %}"{% endif %}>
|
||||
{{ doc.abstract | format_snippet }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue