summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
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
commit9b5f5ca0a065c33db57670ba166b1424bcc18cd2 (patch)
tree58732af3c07cfc4833e314aad8610a7d84629cca /archaeological_operations
parent0bbb58bdf1cad93846bec23d2481e5ffffa818f8 (diff)
downloadIshtar-9b5f5ca0a065c33db57670ba166b1424bcc18cd2.tar.bz2
Ishtar-9b5f5ca0a065c33db57670ba166b1424bcc18cd2.zip
Allow modification from the window (refs #1574)
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html2
-rw-r--r--archaeological_operations/urls.py2
-rw-r--r--archaeological_operations/views.py10
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),