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

Revision 1315, 4.6 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      i18n:domain="lemill">
4
5<!-- different pages have different headings -->
6
7<tal:headings metal:define-macro="heading">
8
9    <h1 tal:condition="python:here.id=='drafts'" i18n:translate="" tal:content="string:My draft ${parent_folder}"></h1>
10    <h1 tal:condition="python:here.id=='published'" i18n:translate="" tal:content="string:My published ${parent_folder}"></h1>
11    <h1 tal:condition="python:here.id=='portfolio' and filter"><span i18n:translate="" tal:content="python:filter.capitalize()">Content</span> <span i18n:translate="by_author"> by <span i18n:name="authors_name" tal:content="here/NiceName | nothing">author</span></span></h1>
12    <h1 tal:condition="python:here.id=='portfolio' and not filter and searchterm.keys()==['Creator']" i18n:translate="heading_user_tagcloud">User tagcloud: <span i18n:name="authors_name" tal:content="here/NiceName | nothing">author</span></h1>
13    <h1 tal:condition="python:here.id not in ('drafts','published','portfolio') or (here.id=='portfolio' and len(searchterm)>1)">
14        <tal:cond tal:condition="python: tagcloud_type!='hits'" i18n:translate="" tal:content="string:Browse ${topic_name}"></tal:cond>
15        <tal:cond tal:condition="python:tagcloud_type=='hits'">
16            <tal:cond tal:condition="searchterm">
17                <span i18n:translate="" tal:content="string:Browse ${browsed_stuff} where"/>
18          <tal:repeat tal:repeat="si searchterm/items">
19        <span i18n:translate="text_field_is_value">
20                 <span i18n:name="field"><span tal:omit-tag="" i18n:translate="" tal:content="python:searchterm_nice[si[0]].lower()">Field</span></span> is
21                 <span i18n:name="value"><span tal:condition="not:can_l10n_topic_values" tal:content="python:value_nice[si[0]]"/><span tal:condition="can_l10n_topic_values" i18n:translate="" tal:content="python:value_nice[si[0]]"/></span>
22        </span>
23                <span tal:omit-tag="" tal:condition="not: repeat/si/end" i18n:translate="and">and</span>
24          </tal:repeat>
25          </tal:cond>
26          <span tal:condition="not:searchterm" i18n:translate="" tal:content="string:Browse ${browsed_stuff} by ${topic_name}"/>
27        </tal:cond>
28    </h1>
29
30</tal:headings>
31
32
33
34
35<tal:filters metal:define-macro="filter_links">
36    <legend tal:condition="updict">
37        <span tal:omit-tag="" i18n:translate="label_show">Show</span>:
38        <tal:repeater repeat="linky updict">
39            <tal:defs define="url python:linky[1];
40                            singular python:linky[0][0];
41                            plural python:linky[0][1];">       
42              <a tal:condition="url" 
43                tal:attributes="href url"
44                i18n:translate="" href=""
45                tal:content="plural">learning resources</a>
46              <span tal:condition="not:url" tal:content="plural" i18n:translate="">disabled link</span>
47            </tal:defs>
48            <tal:notlast condition="not:repeat/linky/end"> | </tal:notlast>
49        </tal:repeater>
50    </legend>   
51</tal:filters>
52
53
54<tal:other_results metal:define-macro="show_other_results">
55<tal:visibility_condition condition="downdict">
56    <div tal:define="frc python:here.fullResultCount(request, topic_name, topic_get_method, request_opened);               
57        " tal:omit-tag="">
58           
59        <span tal:repeat="linkydict downdict/items" tal:omit-tag="">
60        <p tal:define="
61            key python:linkydict[0];
62            url python:linkydict[1][1];
63            singular python:linkydict[1][0][0];
64            plural python:linkydict[1][0][1];           
65            results_n python:frc[key];
66            nicename python:test(results_n>1, plural.lower(), singular.lower());           
67            ">
68        <tal:worth_listing condition="python:results_n>0 and url!=''">
69            <a href="" tal:attributes="href url">
70        <span i18n:translate="" tal:condition="python:here.id not in ['portfolio', 'recent', 'published']" tal:content="string:Browse matching ${plural/lower}"/>
71        <span i18n:translate="" tal:condition="python:here.id=='recent'" tal:content="string:Browse recent ${plural/lower}"/>
72        <span i18n:translate="" tal:condition="python:here.id=='published'" tal:content="string:Show my ${plural/lower}"/>
73        <tal:portfolio condition="python:here.id=='portfolio'">
74        <tal:trans i18n:translate="" tal:content="string:Browse ${plural/lower} made by" />
75         <span tal:replace="here/NiceName" />
76        </tal:portfolio>
77
78        (<tal:block tal:content="results_n"/>)
79            </a>
80        </tal:worth_listing>
81        </p>
82        </span>
83    </div>
84</tal:visibility_condition>
85</tal:other_results>
86
87</html>
Note: See TracBrowser for help on using the repository browser.