From 4ffb67938358cbfedec0ac1fc75ba438c0af060f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 16 Jan 2014 22:20:15 +0100 Subject: Display of record carts from the shortcut menu (refs #1602) - change record cart links to a more explicit image --- ishtar_common/static/js/ishtar.js | 9 +++++++++ ishtar_common/static/media/images/info.png | Bin 0 -> 521 bytes ishtar_common/static/media/style.css | 10 ++++++++++ ishtar_common/templates/base.html | 17 ++++++++++------- ishtar_common/templates/blocks/JQueryJqGrid.html | 2 +- ishtar_common/templates/ishtar/sheet_organization.html | 2 +- ishtar_common/templates/ishtar/sheet_person.html | 2 +- ishtar_common/views.py | 2 +- 8 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 ishtar_common/static/media/images/info.png (limited to 'ishtar_common') diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index b4a079ef8..0a15bfc23 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -105,6 +105,15 @@ function load_window(url, speed, on_success){ }); } +function load_current_window(url, model_name){ + var id = $("#current_" + model_name).val(); + if (!id) return; + url = url.split('/'); + url[url.length - 1] = id; + url.push(''); + return load_window(url.join('/')); +} + function load_url(url){ $("#progress").show(); $.ajax({ diff --git a/ishtar_common/static/media/images/info.png b/ishtar_common/static/media/images/info.png new file mode 100644 index 000000000..6d9beb9ed Binary files /dev/null and b/ishtar_common/static/media/images/info.png differ diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index e9f1a8bab..bbd14dd99 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -161,6 +161,16 @@ div#logo{ background-repeat:no-repeat; } +.display_details{ + display:inline-block; + font-size:0; + color:transparent; + width:18px; + height:16px; + background-image:url(images/info.png); + background-repeat:no-repeat; +} + div#language_form_div{ position:absolute; right:0; 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%} @@ -26,10 +27,10 @@ {% block header %} {% if user.is_authenticated %} {% trans "Logged in" %}: {{ user.username }} - ({% trans "Log out" %} | - {% trans "Change password" %}) + ({% trans "Log out" %} | + {% trans "Change password" %}) {% else %} - {% trans "Log in" %} + {% trans "Log in" %} {% endif %} {% if LANGUAGES|length > 1 %}
@@ -58,7 +59,7 @@
{% block context %}{% if current_menu %} -
+
{% trans "Default selected items"%} @@ -70,7 +71,9 @@ {% for val, label, selected in items %} {% endfor %} - + {% with 'show-'|add:model_name as model_url%} + + {% endwith %} {% endfor %}
{% trans "Details" %}
@@ -92,10 +95,10 @@ {% if menu_item.childs %}
  • {{menu_item.label}}
  • {%else%} - {{menu_item.label}} + {{menu_item.label}} {%endif%}{% endif %}{% endfor %} {%endif%} diff --git a/ishtar_common/templates/blocks/JQueryJqGrid.html b/ishtar_common/templates/blocks/JQueryJqGrid.html index 919a01bc1..c5a04652a 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', 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 @@ {{person.name|default:""}} {{person.surname|default:""}} {% for type in person.person_types.all %}{% if forloop.counter0 %}, {% endif %}{{type.label}}{% endfor %} - {% trans "Details" %} + {% trans "Details" %} {% empty %} {% trans "No person in this organization" %} 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 @@ {{operation.in_charge|default:""}} {{operation.start_date|default:""}} {{operation.excavation_end_date|default:""}} - {% trans "Details" %} + {% trans "Details" %} {% empty %} {% trans "No operation associated to this person" %} diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 7963dc46a..ba5f30918 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -376,7 +376,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[], if sign == '-': datas = reversed(datas) datas = list(datas)[start:end] - link_template = "%s" % \ + link_template = "%s" % \ (unicode(_("Details"))) if data_type == "json": rows = [] -- cgit v1.2.3