source: trunk/skins/lemill/lemill_community_view.pt @ 1919

Revision 1919, 6.7 KB checked in by jukka, 12 years ago (diff)

Refactored groups to not use portal_groups. Things should be faster and users from weird sources shouldn't cause so much problems. Not much tested yet, but archetype update and quickinstaller reinstall works fine.

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<body>
6
7<div metal:fill-slot="main" style="width:100%" tal:define="people_results python:here.getSearchObject(portal_type='MemberFolder');
8                        group_results python:here.getSearchObject(portal_type='GroupBlog');
9                        search_results python:people_results+group_results;">
10   
11   <span tal:define="samples python:here.getSamples(search_results);" tal:condition="samples" tal:omit-tag="">
12   
13    <h1 i18n:translate="heading_featured_people">Featured people</h1>
14
15    <table border="0" cellpadding="0" cellspacing="4" width="550">
16        <tr>
17            <td class="coverimagecell" tal:repeat="sample samples">
18                <a href="#" tal:attributes="href sample/getURL" tal:define="obj sample/getObject; piccy obj/getCoverImage">
19                    <img tal:attributes="src piccy/absolute_url | nothing; onclick string:document.location='${sample_link}'" src="images/default_member.png" style="cursor: pointer;" tal:define="obj sample/getObject; piccy obj/getCoverImage; sample_link sample/getURL;" /></a>
20            </td>
21        </tr>
22        <tr>
23            <td class="captioncell" tal:repeat="sample samples">
24                <a href="#" tal:attributes="href sample/getURL" tal:define="obj sample/getObject" tal:content="obj/NiceName">PLACEHOLDER</a>
25            </td>
26        </tr>
27    </table>
28
29   </span>
30   
31    <h1 i18n:translate="heading_browse_people">Browse people</h1>
32   
33    <ul>
34        <li tal:define="results python:here.getTopResults(people_results, 'getLanguage_skills')">
35            <a i18n:translate="label_browse_by_language" href="language" class="byTextsFont">By language</a>:
36            <span tal:repeat="result results">
37                <a href="" tal:attributes="href python:'language?getLanguage_skills='+here.url_quote(result)" tal:content="python:here.script_getPrettyLanguage(result)">PLACEHOLDER</a>,
38            </span>
39            <a href="language">...</a>
40        </li>
41       
42        <li>
43            <a i18n:translate="label_browse_by_name_cloud" href="members" class="byTextsFont">By name cloud</a>
44        </li>
45       
46        <li tal:define="results python:here.getTopResults(people_results, 'getLocation_country')">
47            <a i18n:translate="label_browse_by_location" href="country" class="byTextsFont">By location</a>:
48            <span tal:repeat="result results">
49                <a href="" tal:attributes="href python:'country?getLocation_country='+here.url_quote(result)" tal:content="result">PLACEHOLDER</a>,
50            </span>
51            <a href="country">...</a>
52        </li>
53
54        <li tal:define="results python:here.getTopResults(people_results, 'getSkills')">
55            <a i18n:translate="label_browse_by_skills" href="skills" class="byTextsFont">By skills</a>:
56            <span tal:repeat="result results">
57                <a href="" tal:attributes="href python:'skills?getSkills='+here.url_quote(result)" tal:content="result">PLACEHOLDER</a>,
58            </span>
59            <a href="skills">...</a>
60        </li>
61
62        <li tal:define="results python:here.getTopResults(people_results, 'getInterests')">
63            <a i18n:translate="label_browse_by_interests" href="interests" class="byTextsFont">By interests</a>:
64            <span tal:repeat="result results">
65                <a href="" tal:attributes="href python:'interests?getInterests='+here.url_quote(result)" tal:content="result">PLACEHOLDER</a>,
66            </span>
67            <a href="interests">...</a>
68        </li>
69       
70        <li tal:define="results python:here.getTopResults(people_results, 'getSubject_area')">
71            <a i18n:translate="label_browse_by_subject_area" href="subject_area" class="byTextsFont">By subject area</a>:
72            <span tal:repeat="result results">
73                <a href="" tal:attributes="href python:'subject_area?getSubject_area='+here.url_quote(result)" tal:content="result" i18n:translate="">PLACEHOLDER</a>,
74            </span>
75            <a href="subject_area">...</a>
76        </li>
77    </ul>
78
79
80    <h1 i18n:translate="heading_browse_groups">Browse groups</h1>
81   
82    <ul>
83        <li tal:define="results python:here.getTopResults(group_results, 'getLanguage_skills')">
84            <a i18n:translate="label_browse_by_language" href="g_language" class="byTextsFont">By language</a>:
85            <span tal:repeat="result results">
86                <a href="" tal:attributes="href python:'g_language?getLanguage_skills='+here.url_quote(result)" tal:content="python:here.script_getPrettyLanguage(result)">PLACEHOLDER</a>,
87            </span>
88            <a href="group_language">...</a>
89        </li>
90       
91        <li>
92            <a i18n:translate="label_browse_by_name_cloud" href="groups" class="byTextsFont">By name cloud</a>
93        </li>
94
95        <li tal:define="results python:here.getTopResults(group_results, 'getTags')">
96            <a i18n:translate="label_browse_by_tags" href="tags" class="byTextsFont">By tags</a>:
97            <span tal:repeat="result results">
98                <a href="" tal:attributes="href python:'tags?getTags='+here.url_quote(result)" tal:content="result">PLACEHOLDER</a>,
99            </span>
100            <a href="tags">...</a>
101        </li>
102           
103        <li tal:define="results python:here.getTopResults(group_results, 'getSubject_area')">
104            <a i18n:translate="label_browse_by_subject_area" href="group_subject_area" class="byTextsFont">By subject area</a>:
105            <span tal:repeat="result results">
106                <a href="" tal:attributes="href python:'group_subject_area?getSubject_area='+here.url_quote(result)" tal:content="result" i18n:translate="">PLACEHOLDER</a>,
107            </span>
108            <a href="group_subject_area">...</a>
109        </li>
110
111    </ul>
112
113       <tal:group_recent_threads define="recents here/mergeLatestPostsInMyGroups;">
114           <h1 i18n:translate="heading_recent_forum_threads" tal:condition="recents">Recent forum threads in my groups</h1>
115           <table border="0" cellpadding="2" cellspacing="2" width="100%" tal:condition="recents">
116               <tr>
117                   <th i18n:translate="label_discussion_topic">Topic</th>
118                   <th i18n:translate="">Group</th>
119               </tr>
120               <tr tal:repeat="post recents">
121                   <td><a href="" tal:attributes="href post/absolute_url" tal:content="post/title">PLACEHOLDER</a></td>
122                   <td tal:define="group post/getBlog"><a href="" tal:attributes="href group/absolute_url" tal:content="group/title">PLACEHOLDER</a></td>
123               </tr>
124           </table>
125       </tal:group_recent_threads>
126   
127</div>
128   
129  </body>
130</html>
131
Note: See TracBrowser for help on using the repository browser.