Commit 85db2465 authored by Ivan Tyagov's avatar Ivan Tyagov

Omit showing listbox rows if no input (i.e. search criterions) are provided by user.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28181 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f9f53031
......@@ -51,7 +51,10 @@
real_context here/getContext;\n
context_url real_context/absolute_url;\n
md5_string here/getMD5Checksum;\n
line_list here/query;\n
hide_rows_on_no_search_criterion \n
python: here.isHideRowsOnNoSearchCriterion(request);\n
line_list python: test(hide_rows_on_no_search_criterion, \n
[], here.query());\n
is_domain_tree_mode here/isDomainTreeMode;\n
is_report_tree_mode here/isReportTreeMode;\n
is_domain_tree_supported here/isDomainTreeSupported;\n
......@@ -150,6 +153,7 @@
<tal:block tal:condition="python: list_style not in (\'search\', \'table\')">\n
<span metal:use-macro="real_context/ListBox_asStandardHTML/macros/main"/>\n
</tal:block>\n
\n
</tal:block>\n
......
......@@ -243,8 +243,8 @@
</td>\n
</tal:block>\n
</tr>\n
\n
<tal:block tal:repeat="line line_list" tal:define="checked_uid_set here/getCheckedUidSet">\n
\n
<tr id="listbox_data_line_0" class="DataA"\n
tal:define="css python: line.getRowCSSClassName() or test(repeat[\'line\'].index % 2, \'DataB\', \'DataA\');\n
render_result line/render;"\n
......@@ -287,6 +287,16 @@
</tal:block>\n
</tr>\n
</tal:block>\n
\n
<tr tal:condition="hide_rows_on_no_search_criterion"\n
class="listbox_missing_search_criterion">\n
<td tal:attributes="colspan python: len(here.getSearchValueList()) + 1">\n
<span i18n:translate="" \n
i18n:domain="ui">\n
To display actual content, please fill in one or more search criterion.\n
</span>\n
</td>\n
</tr>\n
\n
<tr tal:condition="here/showStat" id="listbox_stat_line"\n
class="listbox_stat_line"\n
......@@ -301,6 +311,7 @@
tal:content="structure processed_value" />\n
</tal:block>\n
</tr>\n
\n
</table>\n
</div>\n
</tal:block>\n
......
......@@ -315,6 +315,17 @@
<tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n
</td>\n
</tr>\n
\n
<tr tal:condition="hide_rows_on_no_search_criterion"\n
class="listbox_missing_search_criterion">\n
<td tal:attributes="colspan python: len(here.getSearchValueList()) + 1">\n
<span i18n:translate="" \n
i18n:domain="ui">\n
To display actual content, please fill in one or more search criterion.\n
</span>\n
</td>\n
</tr>\n
\n
</table>\n
\n
<!-- Advanced Search footer -->\n
......
......@@ -1506,7 +1506,14 @@ div.search .searchPages .selected{\n
.document div.page div {\n
color: black;\n
}\n
\n
/* Listbox missing search criterion table row*/\n
.listbox_missing_search_criterion {\n
background-color: white;\n
}\n
.listbox_missing_search_criterion td{\n
text-align: center!important;\n
}
]]></string> </value>
</item>
......
784
\ No newline at end of file
788
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment