From 089ec50db0b7d41b00f545dba56931969b65e9b7 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Fri, 27 Aug 2010 08:03:26 +0000 Subject: [PATCH] Show linkwith list bactions & number of selected rows (if any). git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38050 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_km_theme/ListBox_asHTML.xml | 23 ++++++++++++++++--- .../erp5_km_theme/km_css/listbox.css.xml | 5 ++-- bt5/erp5_km/bt/revision | 2 +- .../bt/template_catalog_search_key_list | 0 4 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 bt5/erp5_km/bt/template_catalog_search_key_list diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml index 3b73df43d7..e0856e3590 100644 --- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml +++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml @@ -161,14 +161,31 @@ <div class="listbox-content">\n \n <div class="listbox-head">\n - <div class="listbox-head-title" style="">\n - <span tal:replace="here/getTitle" />\n + <div class="listbox-head-title"\n + tal:define="show_list_action_link python: here.field.get_value(\'list_action\')">\n +\n + <a tal:condition="show_list_action_link"\n + tal:attributes="class string:${field_id}_title; \n + href here/getListActionUrl">\n + <span i18n:translate="" \n + i18n:domain="ui" tal:content="here/getTitle" />\n + </a>\n + <tal:block tal:condition="not: show_list_action_link">\n + <span i18n:translate="" \n + i18n:domain="ui" tal:content="here/getTitle" />\n + </tal:block>\n </div>\n \n <!--Show search result -->\n <div tal:condition="python: total_line > 0" \n class="listbox-head-results">\n - <span tal:replace="structure python: real_context.Base_translateString(\'Results <em>${start} - ${stop}</em> of <em>${total}</em>.\', mapping=dict(start=current_page_start, stop=current_page_stop, total=total_line))"/>\n + <span tal:content="structure python: real_context.Base_translateString(\' <em>${start} - ${stop}</em> of <em>${total}</em> records\', mapping=dict(start=current_page_start, stop=current_page_stop, total=total_line))"/>\n +\n + <span id="listbox_item_number" class="listbox_item_number"\n + tal:attributes="id string:${field_id}_item_number"\n + tal:condition="show_select_column"\n + i18n:translate="" i18n:domain="ui"> - <tal:block tal:replace="python: len(here.getCheckedUidList())" i18n:name="number">0</tal:block> items selected</span>\n +\n </div>\n </div>\n \n diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml index 1889857f73..5307c75f84 100644 --- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml +++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml @@ -188,7 +188,9 @@ div.listbox-head{\n div.listbox-head div.listbox-head-title{\n float:left;\n width:auto;\n - \n +}\n +div.listbox-head a, div.listbox-head span{\n + font-weight: bold;\n }\n \n div.listbox-head div.listbox-head-results{\n @@ -198,7 +200,6 @@ div.listbox-head div.listbox-head-results{\n text-align:right;\n }\n \n -\n div.listbox-body{\n width:auto;\n }\n diff --git a/bt5/erp5_km/bt/revision b/bt5/erp5_km/bt/revision index 8fc21d8edb..05952d9190 100644 --- a/bt5/erp5_km/bt/revision +++ b/bt5/erp5_km/bt/revision @@ -1 +1 @@ -1527 \ No newline at end of file +1528 \ No newline at end of file diff --git a/bt5/erp5_km/bt/template_catalog_search_key_list b/bt5/erp5_km/bt/template_catalog_search_key_list new file mode 100644 index 0000000000..e69de29bb2 -- 2.30.9