diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-12-27 22:35:21 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-12-27 22:38:39 +0100 | 
| commit | 7adba01875d7b64a641d0562a9ec233de6a376cc (patch) | |
| tree | 58732af3c07cfc4833e314aad8610a7d84629cca /archaeological_operations | |
| parent | 9616de5a2c949bedde51e00e828478896bfe51bb (diff) | |
| download | Ishtar-7adba01875d7b64a641d0562a9ec233de6a376cc.tar.bz2 Ishtar-7adba01875d7b64a641d0562a9ec233de6a376cc.zip  | |
Allow modification from the window (refs #1574)
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 2 | ||||
| -rw-r--r-- | archaeological_operations/urls.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/views.py | 10 | 
3 files changed, 13 insertions, 1 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 2768fd96c..945b3f4e5 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -23,6 +23,8 @@  <div class='tool'>{%trans "Export as:"%} <a href='{% url show-operation item.pk "odt" %}'>{%trans "OpenOffice.org file"%}</a>, <a href='{% url show-operation item.pk "pdf" %}'>{%trans "PDF file"%}</a></div> +<div class='tool modify'><a href='{% url operation_modify item.pk %}'>{% trans "Modify" %}</a></div> +  <h3>{% trans "General"%}</h3>  {% if item.common_name %}<p><label>{%trans "Name:"%}</label> <span class='value'>{{ item.common_name }}</span></p>{% endif %}  <p><label>{%trans "Year:"%}</label> <span class='value'>{{ item.year }}</span></p> diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py index e0daa8590..bd207dd80 100644 --- a/archaeological_operations/urls.py +++ b/archaeological_operations/urls.py @@ -48,6 +48,8 @@ urlpatterns = patterns('',         url(r'operation_modification/(?P<step>.+)?$',             views.operation_modification_wizard,             name='operation_modification'), +       url(r'operation_modify/(?P<pk>.+)/$', +           views.operation_modify, name='operation_modify'),         url(r'operation_closing/(?P<step>.+)?$',             views.operation_closing_wizard, name='operation_closing'),         url(r'operation_deletion/(?P<step>.+)?$', diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index e2fa5c868..0c4609181 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -20,9 +20,10 @@  import json  import os +from django.core.urlresolvers import reverse  from django.db.models import Q  from django.http import HttpResponse -from django.shortcuts import render_to_response +from django.shortcuts import render_to_response, redirect  from django.template.defaultfilters import slugify  from django.utils.translation import ugettext_lazy as _, pgettext_lazy @@ -227,6 +228,13 @@ operation_modification_wizard = OperationModificationWizard.as_view([           },      url_name='operation_modification',) +def operation_modify(request, pk): +    view = operation_modification_wizard(request) +    OperationModificationWizard.session_set_value(request, +                        'selec-operation_modification', 'pk', pk, reset=True) +    return redirect(reverse('operation_modification', +                            kwargs={'step':'general-operation_modification'})) +  operation_closing_wizard = OperationClosingWizard.as_view([      ('selec-operation_closing', OperationFormSelection),      ('date-operation_closing', ClosingDateFormSelection),  | 
