summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-02-13 14:10:45 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-05-06 15:48:16 +0200
commit24767dff8822ce20d4094a7789ce38e7d71bdcfb (patch)
treefc33fa6077bd260ddf4dad959d86507f196f768d
parenta584b08f7c347af2fb85df86ddd89430c14824c0 (diff)
downloadIshtar-24767dff8822ce20d4094a7789ce38e7d71bdcfb.tar.bz2
Ishtar-24767dff8822ce20d4094a7789ce38e7d71bdcfb.zip
Refactoring of templates. Add a new ishtar_pdl with custom templates and CSS
-rw-r--r--archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html7
-rw-r--r--archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html7
-rw-r--r--archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html7
-rw-r--r--example_project/settings.py6
-rw-r--r--ishtar_common/static/media/style.css12
-rw-r--r--ishtar_common/templates/base.html1
-rw-r--r--ishtar_common/templates/blocks/extra_head.html2
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html8
-rw-r--r--ishtar_common/templates/ishtar/wizard/parcels_wizard.html7
-rw-r--r--ishtar_common/templates/ishtar/wizard/towns_wizard.html6
-rw-r--r--ishtar_common/templates/ishtar/wizard/validation_bar.html7
-rw-r--r--ishtar_pdl/__init__.py1
-rw-r--r--ishtar_pdl/models.py1
-rw-r--r--ishtar_pdl/static/pdl/styles.css14
-rw-r--r--ishtar_pdl/templates/blocks/extra_head.html1
15 files changed, 50 insertions, 37 deletions
diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html
index 4788a41fc..34dc75b08 100644
--- a/archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html
+++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html
@@ -23,10 +23,9 @@
</table>
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
-<div id='validation-bar'>
- <input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/>
- {% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}
-</div>
+{% block "validation_bar" %}
+{% include 'ishtar/wizard/validation_bar.html' %}
+{% endblock %}
</div>
</form>
{% endblock %}
diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
index c2c4fc4d7..4162a3764 100644
--- a/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
+++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
@@ -56,10 +56,9 @@
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
-<div id='validation-bar'>
- <input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/>
- {% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}
-</div>
+{% block "validation_bar" %}
+{% include 'ishtar/wizard/validation_bar.html' %}
+{% endblock %}
</div>
</form>
<script type='text/javascript'>
diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html
index 5b3228cfb..66569a66d 100644
--- a/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html
+++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html
@@ -72,10 +72,9 @@
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
-<div id='validation-bar'>
- <input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/>
- {% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}
-</div>
+{% block "validation_bar" %}
+{% include 'ishtar/wizard/validation_bar.html' %}
+{% endblock %}
</div>
</form>
{% endblock %}
diff --git a/example_project/settings.py b/example_project/settings.py
index f81e3e984..618c817df 100644
--- a/example_project/settings.py
+++ b/example_project/settings.py
@@ -190,16 +190,20 @@ ISHTAR_DOC_TYPES = {u"undefined":u"Undefined"}
ISHTAR_DPTS = []
+PRE_APPS = []
EXTRA_APPS = []
try:
from local_settings import *
except ImportError, e:
- print 'Unable to load local_settings.py:', e
+ print('Unable to load local_settings.py:', e)
if 'test' in sys.argv:
SOUTH_TESTS_MIGRATE = False
+for app in PRE_APPS:
+ INSTALLED_APPS.insert(INSTALLED_APPS.index('ishtar_common'), app)
+
if 'archaeological_files' in EXTRA_APPS:
EXTRA_APPS.pop(EXTRA_APPS.index('archaeological_files'))
INSTALLED_APPS.insert(INSTALLED_APPS.index('archaeological_operations'),
diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css
index c9143b026..96e8be596 100644
--- a/ishtar_common/static/media/style.css
+++ b/ishtar_common/static/media/style.css
@@ -242,16 +242,6 @@ div#logo{
background-repeat:no-repeat;
}
-div#validation-bar{
- position: fixed;
- bottom: 0px;
- background-color: #CCC;
- width: 100%;
- left: 0px;
- height: 40px;
- padding: 5px;
-}
-
div#validation-bar p{
margin:0;
}
@@ -269,8 +259,6 @@ a.button{
}
#reset_wizards{
- right:50px;
- position:absolute;
color: white;
}
diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html
index 1ebebd815..92e61493b 100644
--- a/ishtar_common/templates/base.html
+++ b/ishtar_common/templates/base.html
@@ -19,6 +19,7 @@
<link type="text/css" href="{{JQUERY_UI_URL}}css/smoothness/jquery-ui.css" rel="stylesheet" />
<link rel="stylesheet" href="{{STATIC_URL}}/js/prettyPhoto/css/prettyPhoto.css" />
<link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
+ {% include "blocks/extra_head.html" %}
{% block extra_head %}
{% endblock %}
</head>
diff --git a/ishtar_common/templates/blocks/extra_head.html b/ishtar_common/templates/blocks/extra_head.html
new file mode 100644
index 000000000..139597f9c
--- /dev/null
+++ b/ishtar_common/templates/blocks/extra_head.html
@@ -0,0 +1,2 @@
+
+
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html
index 62aafff45..a39037d10 100644
--- a/ishtar_common/templates/ishtar/wizard/default_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html
@@ -41,11 +41,9 @@
{% endif %}
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
-<div id='validation-bar'>
- <input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/>
- {% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}
- <a href='{% url 'reset_wizards' %}' id="reset_wizards" class='button'>{% trans "Cancel" %}</a>
-</div>
+{% block "validation_bar" %}
+{% include 'ishtar/wizard/validation_bar.html' %}
+{% endblock %}
</div>
</form>
{% endblock %}
diff --git a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html
index 73e86e53f..ce2bc9780 100644
--- a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html
@@ -23,10 +23,9 @@
<p><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></p>
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
-<div id='validation-bar'>
-<input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/>
-{% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}
-</div>
+{% block "validation_bar" %}
+{% include 'ishtar/wizard/validation_bar.html' %}
+{% endblock %}
</div>
</form>
{% endblock %}
diff --git a/ishtar_common/templates/ishtar/wizard/towns_wizard.html b/ishtar_common/templates/ishtar/wizard/towns_wizard.html
index 07717d26a..4f9ff6c5f 100644
--- a/ishtar_common/templates/ishtar/wizard/towns_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/towns_wizard.html
@@ -28,9 +28,9 @@
{% endif %}
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
-<div id='validation-bar'>
- <input type="submit" id="submit_form" value="{% trans "Validate" %}"/>
-</div>
+{% block "validation_bar" %}
+{% include 'ishtar/wizard/validation_bar.html' %}
+{% endblock %}
</div>
</form>
{% endblock %}
diff --git a/ishtar_common/templates/ishtar/wizard/validation_bar.html b/ishtar_common/templates/ishtar/wizard/validation_bar.html
new file mode 100644
index 000000000..09907af67
--- /dev/null
+++ b/ishtar_common/templates/ishtar/wizard/validation_bar.html
@@ -0,0 +1,7 @@
+{% load i18n %}
+{% load url from future %}
+<div id='validation-bar'>
+ <input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/>
+ {% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}
+ <a href='{% url 'reset_wizards' %}' id="reset_wizards" class='button'>{% trans "Cancel" %}</a>
+</div>
diff --git a/ishtar_pdl/__init__.py b/ishtar_pdl/__init__.py
new file mode 100644
index 000000000..8d1c8b69c
--- /dev/null
+++ b/ishtar_pdl/__init__.py
@@ -0,0 +1 @@
+
diff --git a/ishtar_pdl/models.py b/ishtar_pdl/models.py
new file mode 100644
index 000000000..8d1c8b69c
--- /dev/null
+++ b/ishtar_pdl/models.py
@@ -0,0 +1 @@
+
diff --git a/ishtar_pdl/static/pdl/styles.css b/ishtar_pdl/static/pdl/styles.css
new file mode 100644
index 000000000..f7a73f8eb
--- /dev/null
+++ b/ishtar_pdl/static/pdl/styles.css
@@ -0,0 +1,14 @@
+div#validation-bar{
+ position: fixed;
+ bottom: 0px;
+ background-color: #CCC;
+ width: 100%;
+ left: 0px;
+ height: 40px;
+ padding: 5px;
+}
+
+#reset_wizards{
+ right:50px;
+ position:absolute;
+}
diff --git a/ishtar_pdl/templates/blocks/extra_head.html b/ishtar_pdl/templates/blocks/extra_head.html
new file mode 100644
index 000000000..5a75d0728
--- /dev/null
+++ b/ishtar_pdl/templates/blocks/extra_head.html
@@ -0,0 +1 @@
+ <link rel="stylesheet" href="{{STATIC_URL}}/pdl/styles.css" />