source: trunk/skins/lemill/lemill_browse_results.pt @ 1315

Revision 1315, 6.7 KB checked in by szabolcs, 13 years ago (diff)

fixed #1107 spent 8h

Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2      lang="en"
3      metal:use-macro="here/main_template/macros/master"
4      i18n:domain="lemill">
5
6
7<metal:block fill-slot="top_slot"
8             tal:define="dummy python:request.set('disable_border',1)" />
9
10<div metal:fill-slot="main"
11     tal:define="Batch python:modules['Products.CMFPlone'].Batch;
12                 DateTime python:modules['DateTime'].DateTime;
13                 b_size python:30;b_start python:0;b_start request/b_start | b_start;
14                 parent_folder python:context.aq_inner.aq_parent.title_or_id().lower();
15                 insideMemberFolder here/getMemberFolder | nothing;
16                 request_opened python:here.analyzeRequest(request);
17                 searchterm request_opened/searchterms | nothing;
18                 here_url python:here.getUrlInsideMemberFolder(insideMemberFolder, here.id, here_url);
19                 full_url string:$here_url?${request_opened/search_url};
20                 cont_url string:$here_url${request_opened/cont_url};
21                 filter request_opened/filter;
22                 searchterm_nice request_opened/searchterm_nice;
23                 value_nice request_opened/value_nice;
24                 is_plural request_opened/is_plural;
25                 topic_name python:context.title_or_id().lower();
26                 can_l10n_topic_values python:topic_name in ('target group','subject area');
27                 topic_get_method python:here.public_getSortCriterion(here);
28                 do_tagcloud python:(not searchterm and topic_get_method) and (not here.id in ('drafts','published','my_blogposts','my_stories','recent')) or (here.id=='portfolio' and len(searchterm) &lt; 2 and not filter);
29                 type_criterion python:here.crit__Type_ATPortalTypeCriterion.value;
30                 pmnd here/prettyMethodNameDictionary;
31                 tagcloud_type python:here.tagcloud_type(topic_name);
32                 use_view_action site_properties/typesUseViewActionInListings;
33                 limit_display limit_display|request/limit_display|nothing;
34                 contentsMethod python:test(here.portal_type=='Topic', here.queryCatalog, here.getFolderContents);
35                 folderContents folderContents|python:contentsMethod();
36                 over_limit python: limit_display and len(folderContents) > limit_display;
37                 folderContents python: (over_limit and folderContents[:limit_display]) or folderContents;
38                 results folderContents|request/results|nothing;
39                 results python:here.filterContent(results, filter);
40                 browsed_stuff python:here.getBrowsedStuff(here.id);
41                 linksdicts python:here.getTopicLinks(here.id, here_url, filter, request_opened['search_url']);
42                 updict python:here.reorderFilterLinks(linksdicts[0]);
43                 downdict python:linksdicts[1];
44                 ">
45
46    <tal:headings metal:use-macro="here/lemill_browse_macros/macros/heading" />
47
48    <!-- Browse by values for keywords or similar fields-->
49
50    <div class="tagcloud" tal:condition="do_tagcloud">
51
52     <div tal:condition="not: results">
53         <p><strong i18n:domain="plone" i18n:translate="description_no_results_found">No results were found.</strong></p>
54     </div>
55
56     <tal:show_filters condition="python:parent_folder=='content' or filter in ('pieces','references','resources')">
57        <tal:filter_link metal:use-macro="here/lemill_browse_macros/macros/filter_links" />
58     </tal:show_filters>
59
60     <fieldset tal:condition="results">
61       
62        <table class="keyword_list" tal:define="wordtuples python:here.getUniques(results, topic_get_method, tagcloud_type)">
63           <tr>
64             <td>
65             <tal:taggy repeat="wordinfo wordtuples">
66               <tal:taggyvalues define="sort_name python:wordinfo[0];
67                       tagsize python:wordinfo[1];
68                       obj_url python:wordinfo[2];
69                       tag_value python:wordinfo[3];
70                       nicename python:wordinfo[4];
71                       ">
72                <span tal:attributes="class string:size$tagsize">
73                <a tal:attributes="href python: test(tagcloud_type!='hits', obj_url, here.getTagURL(context,topic_get_method,tag_value,filter, insideMemberFolder))"><tal:block tal:condition="not:can_l10n_topic_values" tal:content="nicename"/><tal:block tal:condition="can_l10n_topic_values" i18n:translate="" tal:content="nicename"/></a>
74                </span>
75               </tal:taggyvalues>
76               <tal:comma tal:condition="not: repeat/wordinfo/end">, </tal:comma>
77               </tal:taggy>
78              </td>
79            </tr>
80         </table>
81       </fieldset>
82    </div>
83
84    <div tal:condition="not:do_tagcloud" tal:omit-tag="">
85      <fieldset style="border-width:0px">
86
87       <tal:show_filters condition="python:parent_folder=='content' or filter in ('pieces','references','resources') or topic_name=='published'">   
88        <tal:filter_link metal:use-macro="here/lemill_browse_macros/macros/filter_links" tal:condition="python:parent_folder=='content' "/>
89       </tal:show_filters>
90
91       <div tal:condition="not: results">
92            <p><strong i18n:domain="plone" i18n:translate="description_no_results_found">No results were found.</strong></p>
93       </div>
94
95       <span tal:define="batch python:Batch(results, b_size, int(b_start), orphan=1);
96                          link_pref string:$here_url/tags?getTags=" tal:omit-tag="">
97
98           <!-- Search results -->
99           <span metal:use-macro="here/resource_list_macro/macros/resources_list" />
100
101           <!-- Navigation -->
102           <div metal:use-macro="here/batch_macros/macros/navigation" />
103       </span>
104
105       <tal:other_results metal:use-macro="here/lemill_browse_macros/macros/show_other_results"/>
106
107       <span i18n:translate="label_n_results"><span tal:omit-tag="" tal:content="python:len(results)" i18n:name="n">234</span> results.</span>
108       <tal:syndicate condition="syntool/isSiteSyndicationAllowed">
109        <a href="" tal:attributes="href string:$here_url/search_rss?${request/QUERY_STRING}">
110           <img i18n:domain="plone" i18n:attributes="title title_rss_feed; alt label_rss_feed;"
111             tal:attributes="src string:$portal_url/rss.gif"
112             src="rss.gif"
113             alt="RSS Feed"
114             title="RSS feed of these search results" />
115        </a>
116       </tal:syndicate>
117      </fieldset>
118    </div>
119
120<p i18n:domain="plone" i18n:translate="search_results_advanced">
121Did you not find what you were looking for? Try the
122<span i18n:name="advanced_search">
123<a href=""
124   i18n:translate="search_results_advanced_link"
125   tal:attributes="href string:$portal_url/lemill_search_form">Advanced Search</a>
126</span>
127for more precise search options.
128</p>
129
130</div>
131
132
133</html>
134
Note: See TracBrowser for help on using the repository browser.