summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/base.html17
-rw-r--r--ishtar_common/templates/blocks/JQueryJqGrid.html5
-rw-r--r--ishtar_common/templates/ishtar/sheet_organization.html2
-rw-r--r--ishtar_common/templates/ishtar/sheet_person.html2
4 files changed, 16 insertions, 10 deletions
diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html
index e235df60a..baab57409 100644
--- a/ishtar_common/templates/base.html
+++ b/ishtar_common/templates/base.html
@@ -1,4 +1,5 @@
{% load i18n %}
+{% load url from future%}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -26,10 +27,10 @@
{% block header %}
{% if user.is_authenticated %}
{% trans "Logged in" %}: {{ user.username }}
- (<a href="{% url auth_logout %}">{% trans "Log out" %}</a> |
- <a href="{% url auth_password_change %}">{% trans "Change password" %}</a>)
+ (<a href="{% url 'auth_logout' %}">{% trans "Log out" %}</a> |
+ <a href="{% url 'auth_password_change' %}">{% trans "Change password" %}</a>)
{% else %}
- <strong><a href="{% url auth_login %}">{% trans "Log in" %}</a></strong>
+ <strong><a href="{% url 'auth_login' %}">{% trans "Log in" %}</a></strong>
{% endif %}
{% if LANGUAGES|length > 1 %}
<div id="language_form_div">
@@ -58,7 +59,7 @@
</div>
<div id="context_menu">
{% block context %}{% if current_menu %}
- <form method="post" action="{% url update-current-item %}">
+ <form method="post" action="{% url 'update-current-item' %}">
<fieldset>
<legend>{% trans "Default selected items"%}</legend>
<table id='current_items'>
@@ -70,7 +71,9 @@
<option value=''>--</option>
{% for val, label, selected in items %}<option value='{{val}}'{%if selected%} selected="selected"{%endif%}>{{label}}</option>
{% endfor %}</select>
- </td>
+ </td>{% with 'show-'|add:model_name as model_url%}
+ <td><a href='#' onclick='load_current_window("{% url model_url 0 %}", "{{model_name}}");' class='display_details'>{% trans "Details" %}</a></td>
+ {% endwith %}
</tr>
{% endfor %}
</table>
@@ -92,10 +95,10 @@
{% if menu_item.childs %}<li id='section-{{forloop.parentloop.counter}}-{{forloop.counter}}'>{{menu_item.label}}
<ul>
{% for menu_subitem in menu_item.childs %}{%if menu_subitem.available%}
- <li id='section-{{forloop.parentloop.parentloop.counter}}-{{forloop.parentloop.counter}}-{{forloop.counter}}'{%ifequal menu_subitem.idx CURRENT_ACTION%} class='selected'{%endifequal%}><a href='{% url action menu_subitem.idx%}'>{{menu_subitem.label}}</a></li>
+ <li id='section-{{forloop.parentloop.parentloop.counter}}-{{forloop.parentloop.counter}}-{{forloop.counter}}'{%ifequal menu_subitem.idx CURRENT_ACTION%} class='selected'{%endifequal%}><a href='{% url 'action' menu_subitem.idx%}'>{{menu_subitem.label}}</a></li>
{%endif%}{% endfor %}</ul></li>
{%else%}
- <li{%ifequal menu_item.idx CURRENT_ACTION%} class='selected'{%endifequal%}><a href='{% url action menu_item.idx%}'>{{menu_item.label}}</a></li>
+ <li{%ifequal menu_item.idx CURRENT_ACTION%} class='selected'{%endifequal%}><a href='{% url 'action' menu_item.idx%}'>{{menu_item.label}}</a></li>
{%endif%}{% endif %}{% endfor %}
</ul>
</li>{%endif%}
diff --git a/ishtar_common/templates/blocks/JQueryJqGrid.html b/ishtar_common/templates/blocks/JQueryJqGrid.html
index 919a01bc1..6f8c94cbb 100644
--- a/ishtar_common/templates/blocks/JQueryJqGrid.html
+++ b/ishtar_common/templates/blocks/JQueryJqGrid.html
@@ -65,7 +65,7 @@ jQuery(document).ready(function(){
colNames:['id', '', {{col_names|safe}}],
colModel:[
{name:'id', index:'id', hidden:true},
- {name:'link', index:'link', width:80},
+ {name:'link', index:'link', width:30},
{{extra_cols|safe}}
],
sortname: 'value',
@@ -77,6 +77,9 @@ jQuery(document).ready(function(){
width:740,
rowNum:20,
jsonReader : {repeatitems: false},
+ loadError: function (jqXHR, textStatus, errorThrown) {
+ alert("{% trans "An error as occured during search. Check your query fields." %}");
+ }
});
{% if multiple %}
jQuery("#add_button_{{name}}").click(function (){
diff --git a/ishtar_common/templates/ishtar/sheet_organization.html b/ishtar_common/templates/ishtar/sheet_organization.html
index 64f8fe5c7..e58d84887 100644
--- a/ishtar_common/templates/ishtar/sheet_organization.html
+++ b/ishtar_common/templates/ishtar/sheet_organization.html
@@ -31,7 +31,7 @@
<td class='string'>{{person.name|default:""}}</td>
<td class='string'>{{person.surname|default:""}}</td>
<td>{% for type in person.person_types.all %}{% if forloop.counter0 %}, {% endif %}{{type.label}}{% endfor %}</td>
- <td class='link'><a href="#" onclick='load_window("{%url show-person person.pk ''%}")'>{% trans "Details" %}</a></td>
+ <td class='link'><a class='display_details' href="#" onclick='load_window("{%url show-person person.pk ''%}")'>{% trans "Details" %}</a></td>
</tr>
{% empty %}
<tr><td colspan="8" class='no_items'>{% trans "No person in this organization" %}</td></tr>
diff --git a/ishtar_common/templates/ishtar/sheet_person.html b/ishtar_common/templates/ishtar/sheet_person.html
index 88fe59f41..47d3bc1cb 100644
--- a/ishtar_common/templates/ishtar/sheet_person.html
+++ b/ishtar_common/templates/ishtar/sheet_person.html
@@ -53,7 +53,7 @@
<td class='string'>{{operation.in_charge|default:""}}</td>
<td>{{operation.start_date|default:""}}</td>
<td>{{operation.excavation_end_date|default:""}}</td>
- <td class='link'><a href="#" onclick='load_window("{%url show-operation operation.pk ''%}")'>{% trans "Details" %}</a></td>
+ <td class='link'><a href="#" class='display_details' onclick='load_window("{%url show-operation operation.pk ''%}")'>{% trans "Details" %}</a></td>
</tr>
{% empty %}
<tr><td colspan="8" class='no_items'>{% trans "No operation associated to this person" %}</td></tr>