Commit f7ffbd2b authored by Ivan Tyagov's avatar Ivan Tyagov

When showing search results define other listbox modes and mark current one.

Follow CSS convention.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37314 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2e8cde45
......@@ -62,10 +62,11 @@
show_search_line here/showSearchLine;\n
is_web_mode request/is_web_mode | nothing;\n
is_dialog_mode request/dialog_mode | nothing;\n
display_style_list here/getDisplayStyleList;\n
list_style python:request.get(\'list_style\', \n
selection.getParams().get(\'list_style\', is_web_mode and \'table\' or None));\n
selection.getParams().get(\'list_style\', here.getDefaultDisplayStyle()));\n
dummy python: list_style == \'search\' and here.setDisplayedColumnIdList((\'getIconAsHTML\', \'getSummaryAsHTML\'))\n
or list_style == \'thumb\' and here.setDisplayedColumnIdList((\'title\', \'thumbnail\'));\n
or list_style == \'thumbnail\' and here.setDisplayedColumnIdList((\'title\', \'thumbnail\'));\n
line_list here/query;\n
listbox_max_lines python: int(here.getMaxLineNumber());\n
total_line python: int(here.total_size);\n
......@@ -73,10 +74,8 @@
current_page_max python: listbox_max_lines * current_page;\n
current_page_start python: (listbox_max_lines * (current_page - 1)) + 1;\n
current_page_stop python: (total_line < current_page_max) and total_line or current_page_max;\n
\n
listbox_id request/current_form_id | form_id ;\n
listbox_url string:${context_url}/${listbox_id};\n
\n
">\n
\n
<!-- Define hidden input. -->\n
......@@ -438,19 +437,16 @@
</div>\n
\n
<!-- Choose display mode -->\n
<!--TODO define show_display_selection-->\n
<div tal:define="style_list here/getDisplayStyleList"\n
tal:condition="python: not is_gadget_mode and len(style_list) > 0"\n
class="display_selection"\n
i18n:domain="ui">\n
<span i18n:translate="">Display :</span>\n
<!--TODO define show_display_selection macro-->\n
<div tal:condition="python: len(display_style_list) > 0"\n
class="list-style-selection">\n
<span i18n:translate="" i18n:domain="ui">Display :</span>\n
<ul>\n
<li tal:repeat="style style_list">\n
<a tal:attributes="href python: \'%s?list_style=%s\' % (listbox_url, style[0])"\n
<li tal:repeat="style display_style_list">\n
<a tal:attributes="href python: \'%s?list_style=%s\' % (listbox_url, style[0]);\n
class python: test(style[0]==list_style, \'selected\',\'\');"\n
tal:content="python: style[1]"\n
i18n:translate="">\n
Tabular\n
</a>\n
i18n:translate="" i18n:domain="ui"/>\n
</li>\n
</ul>\n
</div>\n
......
......@@ -384,6 +384,10 @@
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>search</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -397,7 +401,20 @@
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
<list>
<tuple>
<string>table</string>
<string>table</string>
</tuple>
<tuple>
<string>search</string>
<string>search</string>
</tuple>
<tuple>
<string>thumbnail</string>
<string>thumbnail</string>
</tuple>
</list>
</value>
</item>
<item>
......
......@@ -218,26 +218,28 @@ div.search_popup{\n
float:left;\n
}\n
\n
/*Display selection choice*/\n
.display_selection {\n
/* List style selection */\n
div.list-style-selection {\n
width:auto;\n
float:left;\n
}\n
.display_selection span{\n
div.list-style-selection span{\n
font-weight:bold;\n
padding-left:10px;\n
vertical-align:-4px;\n
}\n
.display_selection ul{\n
div.list-style-selection ul{\n
display:inline;\n
padding-left:0;\n
margin: 0;\n
vertical-align: -4px;\n
}\n
.display_selection li{\n
div.list-style-selection li{\n
display: inline;\n
}\n
\n
div.list-style-selection li a.selected{\n
font-weight: bold;\n
}\n
/* Search bar */\n
div.extendedSearchBar {\n
float:left;\n
......
1493
\ No newline at end of file
1494
\ 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