summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/context_processors.py4
-rw-r--r--ishtar_common/templates/404.html2
-rw-r--r--ishtar_common/templates/base.html28
-rw-r--r--ishtar_common/templates/ishtar/dashboards/dashboard_main.html19
-rw-r--r--ishtar_common/templates/ishtar/sheet.html2
-rw-r--r--ishtar_common/templates/ishtar/sheet_organization_pdf.html2
-rw-r--r--ishtar_common/templates/ishtar/sheet_person_pdf.html2
-rw-r--r--ishtar_common/templates/window.html12
l---------ishtar_common/version.py1
9 files changed, 38 insertions, 34 deletions
diff --git a/ishtar_common/context_processors.py b/ishtar_common/context_processors.py
index 76f58bf8e..f8a4a0f95 100644
--- a/ishtar_common/context_processors.py
+++ b/ishtar_common/context_processors.py
@@ -21,6 +21,7 @@ from django.conf import settings
from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _
+from ishtar_common.version import VERSION
from ishtar_common.utils import shortify
from menus import Menu
@@ -70,6 +71,9 @@ def get_base_context(request):
dct['JQUERY_URL'] = settings.JQUERY_URL
dct['JQUERY_UI_URL'] = settings.JQUERY_UI_URL
dct['COUNTRY'] = settings.COUNTRY
+ dct['VERSION'] = u".".join([unicode(n) for n in VERSION])
+ if settings.EXTRA_VERSION:
+ dct['VERSION'] += unicode(settings.EXTRA_VERSION)
dct['current_menu'] = []
for lbl, model in CURRENT_ITEMS:
model_name = model.__name__.lower()
diff --git a/ishtar_common/templates/404.html b/ishtar_common/templates/404.html
index aec82ca88..82cdd0fb4 100644
--- a/ishtar_common/templates/404.html
+++ b/ishtar_common/templates/404.html
@@ -7,7 +7,7 @@
<link rel="shortcut icon" href="{{STATIC_URL}}/media/images/favicon.png">
<title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}
</title>
- <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css?ver={{VERSION}}" />
</head>
<body>
<div>
diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html
index 8fd563baa..02ddb85df 100644
--- a/ishtar_common/templates/base.html
+++ b/ishtar_common/templates/base.html
@@ -11,20 +11,20 @@
<script language="javascript" type="text/javascript">
var url_path = "{{URL_PATH}}";
</script>
- <script language="javascript" type="text/javascript" src="{{JQUERY_URL}}"></script>
- <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}jquery-ui.js"></script>
- <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}ui/i18n/jquery.ui.datepicker-{{COUNTRY}}.js"></script>
- <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/prettyPhoto/js/jquery.prettyPhoto.js"></script>
- <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/i18n/grid.locale-{{COUNTRY}}.js"></script>
- <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jquery.jqGrid.min.js"></script>
- <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/grid.tbltogrid.js"></script>
- <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/ishtar.js"></script>
- <link type="text/css" href="{{JQUERY_UI_URL}}jquery-ui.css" rel="stylesheet" />
- <link rel="stylesheet" href="{{STATIC_URL}}/font-awesome/css/font-awesome.min.css" />
- <link rel="stylesheet" href="{{STATIC_URL}}/js/prettyPhoto/css/prettyPhoto.css" />
- <link rel="stylesheet" href="{{STATIC_URL}}media/ui.jqgrid.css" />
- <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
- {% for url_css in JQGRID_CSS %}<link rel="stylesheet" href="{{url_css}}" />{% endfor %}
+ <script language="javascript" type="text/javascript" src="{{JQUERY_URL}}?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}jquery-ui.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}ui/i18n/jquery.ui.datepicker-{{COUNTRY}}.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/prettyPhoto/js/jquery.prettyPhoto.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/i18n/grid.locale-{{COUNTRY}}.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jquery.jqGrid.min.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/grid.tbltogrid.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/ishtar.js?ver={{VERSION}}"></script>
+ <link type="text/css" href="{{JQUERY_UI_URL}}jquery-ui.css?ver={{VERSION}}" rel="stylesheet" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/font-awesome/css/font-awesome.min.css?ver={{VERSION}}" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/js/prettyPhoto/css/prettyPhoto.css?ver={{VERSION}}" />
+ <link rel="stylesheet" href="{{STATIC_URL}}media/ui.jqgrid.css?ver={{VERSION}}" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css?ver={{VERSION}}" />
+ {% for url_css in JQGRID_CSS %}<link rel="stylesheet" href="{{url_css}}?ver={{VERSION}}" />{% endfor %}
{% include "blocks/extra_head.html" %}
{% block extra_head %}
{% endblock %}
diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html
index 868f8a5c3..93e11d604 100644
--- a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html
+++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html
@@ -3,16 +3,15 @@
{% load url from future %}
{% block extra_head %}
{{form.media}}
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/jquery.jqplot.min.js"></script>
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js"></script>
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.highlighter.min.js"></script>
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.pieRenderer.min.js"></script>
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.dateAxisRenderer.min.js"></script>
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.cursor.min.js"></script>
-<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.cursor.min.js"></script>
-<link rel="stylesheet" href="{{STATIC_URL}}js/jqplot/jquery.jqplot.min.css" />
+<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/jquery.jqplot.min.js?ver={{VERSION}}"></script>
+<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.canvasTextRenderer.min.js?ver={{VERSION}}"></script>
+<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js?ver={{VERSION}}"></script>
+<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js?ver={{VERSION}}"></script>
+<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.highlighter.min.js?ver={{VERSION}}"></script>
+<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.pieRenderer.min.js?ver={{VERSION}}"></script>
+<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.dateAxisRenderer.min.js?ver={{VERSION}}"></script>
+<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.cursor.min.js?ver={{VERSION}}"></script>
+<link rel="stylesheet" href="{{STATIC_URL}}js/jqplot/jquery.jqplot.min.css?ver={{VERSION}}" />
{% endblock %}
{% block content %}
<script>
diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html
index 5cb75ea3a..5da837ab4 100644
--- a/ishtar_common/templates/ishtar/sheet.html
+++ b/ishtar_common/templates/ishtar/sheet.html
@@ -7,7 +7,7 @@
<title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}
</title>
{% block header %}
- <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css?ver={{VERSION}}" />
{% endblock %}
</head>
<body>
diff --git a/ishtar_common/templates/ishtar/sheet_organization_pdf.html b/ishtar_common/templates/ishtar/sheet_organization_pdf.html
index 79e89ef0b..887c7ccb2 100644
--- a/ishtar_common/templates/ishtar/sheet_organization_pdf.html
+++ b/ishtar_common/templates/ishtar/sheet_organization_pdf.html
@@ -1,6 +1,6 @@
{% extends "ishtar/sheet_organization.html" %}
{% block header %}
-<link rel="stylesheet" href="{{STATIC_URL}}/media/style_basic.css" />
+<link rel="stylesheet" href="{{STATIC_URL}}/media/style_basic.css?ver={{VERSION}}" />
{% endblock %}
{% block main_head %}
{{ block.super }}
diff --git a/ishtar_common/templates/ishtar/sheet_person_pdf.html b/ishtar_common/templates/ishtar/sheet_person_pdf.html
index 1abc70243..199892d2f 100644
--- a/ishtar_common/templates/ishtar/sheet_person_pdf.html
+++ b/ishtar_common/templates/ishtar/sheet_person_pdf.html
@@ -1,6 +1,6 @@
{% extends "ishtar/sheet_person.html" %}
{% block header %}
-<link rel="stylesheet" href="{{STATIC_URL}}/media/style_basic.css" />
+<link rel="stylesheet" href="{{STATIC_URL}}/media/style_basic.css?ver={{VERSION}}" />
{% endblock %}
{% block main_head %}
{{ block.super }}
diff --git a/ishtar_common/templates/window.html b/ishtar_common/templates/window.html
index 7c9249ff0..8e8eac41e 100644
--- a/ishtar_common/templates/window.html
+++ b/ishtar_common/templates/window.html
@@ -10,13 +10,13 @@
<script language="javascript" type="text/javascript">
var url_path = "{{URL_PATH}}";
</script>
- <script language="javascript" type="text/javascript" src="{{JQUERY_URL}}"></script>
- <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}jquery-ui.js"></script>
- <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}ui/i18n/jquery.ui.datepicker-{{COUNTRY}}.js"></script>
- <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/ishtar.js"></script>
+ <script language="javascript" type="text/javascript" src="{{JQUERY_URL}}?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}jquery-ui.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}ui/i18n/jquery.ui.datepicker-{{COUNTRY}}.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/ishtar.js?ver={{VERSION}}"></script>
{{form.media}}
- <link type="text/css" href="{{JQUERY_UI_URL}}jquery-ui.css" rel="stylesheet" />
- <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
+ <link type="text/css" href="{{JQUERY_UI_URL}}jquery-ui.css?ver={{VERSION}}" rel="stylesheet" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css?ver={{VERSION}}" />
{% block extra_head %}
{% endblock %}
</head>
diff --git a/ishtar_common/version.py b/ishtar_common/version.py
new file mode 120000
index 000000000..a508b60d3
--- /dev/null
+++ b/ishtar_common/version.py
@@ -0,0 +1 @@
+../version.py \ No newline at end of file