Changeset 3067 for trunk


Ignore:
Timestamp:
10/29/10 13:40:47 (9 years ago)
Author:
jukka
Message:

Added Brazilian Portuguese to available languages.

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/ConfigurationMethods.py

    r3057 r3067  
    423423 
    424424 
    425 language_list = ['cs','de','en','es','et','fi','fr','hu','ka','lt','pl','ru','se'] 
    426425# Still missing: ['nl','sl'] 
    427426 
     
    432431        return 
    433432    lt.manage_setLanguageSettings('en', #default language 
    434             language_list, # supported languages (needs to be a list, not a tuple) 
     433            AVAILABLE_TRANSLATIONS, # supported languages (needs to be a list, not a tuple) 
    435434            1, # use cookie negotiation 
    436435            1, # use request negotiation 
     
    444443 
    445444# TODO: when we get too many translations, we'll need to shorten the primary list 
    446 primary_language_list = language_list 
     445primary_language_list = AVAILABLE_TRANSLATIONS 
    447446 
    448447def setupProperties(self, portal): 
  • trunk/FieldsWidgets.py

    r3045 r3067  
    795795        value=self.getRaw(instance, **kwargs) 
    796796        print '...ChapterField has called getRaw.' 
    797         if isinstance(value[0], tuple):  
     797        if value and isinstance(value[0], tuple):  
    798798            print 'raw needs to be converted...' 
    799799            value = self.updateChapterList(value) 
  • trunk/LargeSectionFolder.py

    r3057 r3067  
    839839 
    840840    def getSamples(self): 
    841         """ Get 4 random groups """   
     841        """ Get 4 random people """   
    842842        lutool=getToolByName(self, 'lemill_usertool') 
    843843        lt=getToolByName(self,'lemill_tool') 
     
    847847        while languages: 
    848848            lang=languages.pop(0) 
    849             results=pc(portal_type='GroupBlog', getLanguage_skills=lang, getState='public', getHasCoverImage=True, sort_on='getScore', sort_order='descending') 
     849            results=pc(portal_type='MemberFolder', getLanguage_skills=lang, getState='public', getHasCoverImage=True, sort_on='getScore', sort_order='descending') 
    850850            results=results[:30] 
    851851            shuffle(results) 
  • trunk/LeMillCatalogTool.py

    r3063 r3067  
    3939    __implements__ = PloneCatalogTool.__implements__ 
    4040 
     41    # Originally CatalogTool had some simplified some expensive stuff from Plone's Catalog tool and added some 
     42    # methods allowing us more control over indexing / unindexing 
    4143     
    42     #XXX START 
    43     # This is a copy from CMFCore/CatalogTool.py file, made several modifications so that it would do as we want 
     44    # For LeMill 3.0,  
     45 
    4446    security.declarePublic( 'enumerateIndexes' ) # Subclass can call 
    4547    def enumerateIndexes( self ): 
     
    129131        return results 
    130132 
     133    ###### 'Adapters' start here 
     134    # these are methods that are very specifically used by page templates to efficiently return just the results needed there   
     135 
    131136    def buildResultsFromBatch(self, batch): 
    132         t=time.time() 
     137        """ This method takes a Batch of results (usually 30 or less, LazyMap) and returns a list of  
     138            *minimal metadata* about them. This metadata is in form of dictionary. 
     139             
     140            The idea is that instantiating real metadata objects from batch results is still a costly process 
     141            and with this we can show search/browse results without instantiating metadata. 
     142             
     143            This method will also do some preprocessing for metadata, f.ex finds proper names for authors and builds links to them. 
     144             
     145            This method is crafted for resource_list_macros.pt and if you aren't going to display results as they are displayed there, you probably 
     146            shouldn't use this.  
     147            """ 
    133148        d_list=[] 
    134149        lutool=getToolByName(self, 'lemill_usertool') 
     
    153168            for item in md: 
    154169                if item[3] not in TYPE_NAMES: 
    155                     print 'rejected item:', item 
    156                     raise hell 
    157170                    continue 
    158171                d={'url':self.getpath(item[0]), 
     
    217230            elif 'edited' in item: 
    218231                item['timedif']=ltool.getTimeDifference(item['edited'], now=now, useDateIndex=useDateIndex) 
    219         print 'result batch creation took: ',time.time()-t 
    220232        return d_list 
    221233 
    222 # _('any_time') 
    223  
    224234    def createBrowsingOptions(self, REQUEST, results=None, **kw): 
    225         """takes search results as input and returns a dictionary that tells what values there are available for each selection box and how many results there are of each value.""" 
    226         t=time.time() 
     235        """ This is used by browse_macros.pt and other places that need to display filters  
     236            based on the search results available and the section where the results are displayed. 
     237         
     238            This method analyzes both request and results to decide what filter fields it should display and if it should 
     239            preselect something or count occurences for each value. The logic for this may look hairy, 
     240             but it can be understood by approaching this case-by-case: 
     241            'If we are browsing in Content section, and there are >1000 results, what filters we should show'            
     242        """ 
    227243        src=dict(REQUEST.form.items()) 
    228         print src 
    229244        # section determines what kinds of options there are: 
    230245        path=REQUEST['ACTUAL_URL'].split('/') 
     
    258273        elif 'community' in path: 
    259274            do_languages=True 
     275            force_language=False 
    260276            do_subject_areas=True 
    261277            do_target_groups=False 
     
    396412        if 'author' in src: 
    397413            d['author']=src['author']             
    398                  
    399         print 'creating browsing options took', time.time()-t 
    400414        return d 
    401415 
     
    426440 
    427441    def browsingSearch(self, REQUEST=None, **kw):         
    428         """ this search tries to use arguments from browsing form """ 
     442        """ This is a general purpose catalog search that """ 
    429443        print 'browsing search called' 
    430444        t=time.time() 
     
    761775            base=src['base'] 
    762776            language=src.get('language','') 
     777            type_restriction=src.get('type','') 
    763778            if language: 
    764779                lang_part='language=%s&' % language 
     780            if type_restriction: 
     781                lang_part+='type=%s&' % type_restriction 
    765782            title_cloud=False 
    766783            if base=='language': 
  • trunk/LeMillTool.py

    r3055 r3067  
    885885        return [(lang, ''.join(('setLang?lang=',lang))) for lang in self.primary_languages] 
    886886 
    887     def buildLanguageLinksOld(self): 
    888         """ returns a list of (lang, url) tuples for language links to this resource """  
    889         stri = self.REQUEST.get('QUERY_STRING') 
    890         url = self.REQUEST.get('ACTUAL_URL') 
    891         param='' 
    892         if stri: 
    893             param='&param=%s' % stri.replace('&', '_and_') 
    894         linkbase= url+'/setLang?lang=' 
    895         return [(lang, ''.join((linkbase, lang, param))) for lang in self.primary_languages] 
    896  
    897887    def getFeaturedItems(self): 
    898888        """ Fetch items for front page. Try to use languages that user would like to see. """ 
  • trunk/config.py

    r3056 r3067  
    5151RECAPTCHA_PUBLIC_KEY=lemill_config.get('recaptcha_public_key','') 
    5252RECAPTCHA_PRIVATE_KEY=lemill_config.get('recaptcha_private_key','') 
     53 
     54 
     55AVAILABLE_TRANSLATIONS = ['cs','de','en','es','et','fi','fr','hu','ka','lt','pl','pt-br','ru','se'] 
    5356 
    5457 
     
    547550    ('ps', 'Pashto'), 
    548551    ('pt', 'Portuguese'), 
     552    ('pt-br', 'Brazilian Portuguese'), 
    549553    ('qu', 'Quechua'), 
    550554    ('rm', 'Rhaeto-Romance'), 
  • trunk/i18n/lemill-pt_BR.po

    r3066 r3067  
    1818"X-Generator: Launchpad (build Unknown)\n" 
    1919"Domain: lemill\n" 
     20"Language-Code: pt-br\n" 
     21"Language-Name: Brazilian Portuguese\n" 
    2022 
    2123#: ../skins/lemill/check_id.py:69 
  • trunk/skins/lemill/about_view.pt

    r2873 r3067  
    1111        <metal:body define-macro="body"> 
    1212        <div metal:use-macro="here/document_byline/macros/byline" /> 
     13        <tal:defines define="my_language python:context.Language(); lang_string python:test(my_language, 'language=%s&amp;' % my_language, ''); 
     14        browse_base python:'%s/content/browse?%s' % (portal_url, lang_string);"> 
    1315        <p><label><tal:block i18n:domain="plone" i18n:translate="label_language">Language</tal:block>:</label> <br /> 
    14         <a href="" tal:define="my_language python:context.Language()" tal:attributes="href python:'language?language=%s&amp;filter=resources' % my_language"> 
     16        <a href="" tal:attributes="href browse_base"> 
    1517            <metal:fieldMacro use-macro="python:here.widget('language',mode='view')"/> 
    1618        </a> 
    1719        </p> 
    1820        <tal:def define="value context/getSubject_area"> 
    19           <label tal:condition="value"><tal:block i18n:translate="label_subject_area">Subject area</tal:block>:</label> 
     21          <p tal:condition="value"><label><tal:block i18n:translate="label_subject_area">Subject area</tal:block>:</label><br /> 
    2022          <metal:define define-macro="subject_area_view"> 
    21             <p><span tal:repeat="subject_area value" tal:omit-tag=""> 
    22               <a href="" tal:content="subject_area" tal:attributes="href python:'subject_area?subject_area=%s&amp;filter=resources' % subject_area" i18n:translate="">PLACEHOLDER</a><span tal:condition="not:repeat/subject_area/end" tal:omit-tag="">,</span> 
    23             </span></p> 
    24           </metal:define> 
     23            <span tal:repeat="subject_area value" tal:omit-tag=""> 
     24              <a href="" tal:content="subject_area" tal:attributes="href python:'%ssubject_area=%s' % (browse_base, subject_area.split()[0].lower())" i18n:translate="">PLACEHOLDER</a><span tal:condition="not:repeat/subject_area/end" tal:omit-tag="">,</span> 
     25            </span> 
     26          </metal:define></p> 
    2527        </tal:def> 
    2628        <tal:def define="value context/getTarget_group"> 
    27         <label tal:condition="value"><tal:block i18n:translate="label_target_group">Target group</tal:block>:</label> 
     29        <p tal:condition="value"><label><tal:block i18n:translate="label_target_group">Target group</tal:block>:</label><br /> 
    2830          <metal:define define-macro="target_group_view"> 
    29             <p><span tal:repeat="target_group value" tal:omit-tag=""> 
    30               <a href="" tal:content="target_group" tal:attributes="href python:'target_group?target_group=%s&amp;filter=resources' % target_group" i18n:translate="">PLACEHOLDER</a><span tal:condition="not:repeat/target_group/end" tal:omit-tag="">,</span> 
    31             </span></p> 
    32           </metal:define> 
     31            <span tal:repeat="target_group value" tal:omit-tag=""> 
     32              <a href="" tal:content="target_group" tal:attributes="href python:'%starget_group=%s' % (browse_base, target_group.split()[0].lower())" i18n:translate="">PLACEHOLDER</a><span tal:condition="not:repeat/target_group/end" tal:omit-tag="">,</span> 
     33            </span> 
     34          </metal:define></p> 
    3335        </tal:def> 
    3436        <p tal:define="tags context/getTags" tal:condition="tags"><label><tal:block i18n:translate="label_tags">Tags</tal:block>:</label> <br /> 
    3537        <metal:fieldMacro use-macro="python:here.widget('tags',mode='view')"/> 
    3638        </p> 
    37         <br /> 
    38         <br /> 
     39        </tal:defines> 
    3940        <p> 
    4041        <metal:fieldMacro use-macro="python:here.widget('rights',mode='view')"/> 
  • trunk/skins/lemill/activity_view.pt

    r2929 r3067  
    2323    </p> 
    2424 
    25         <p tal:condition="python:here.getTags()"><label><tal:block i18n:translate="label_tags">Tags</tal:block>:</label> <br /> 
     25        <p tal:condition="python:here.getTags()"><label class="field_label"><tal:block i18n:translate="label_tags">Tags</tal:block>:</label> <br /> 
    2626        <metal:fieldMacro use-macro="python:here.widget('tags',mode='view')"/> 
    2727    </p> 
    2828 
    29         <p tal:condition="python:here.Language()"><label><tal:block i18n:domain="plone" i18n:translate="label_language">Language</tal:block>:</label> <br /> 
     29        <p tal:condition="python:here.Language()"><label class="field_label"><tal:block i18n:domain="plone" i18n:translate="label_language">Language</tal:block>:</label> <br /> 
    3030    <metal:fieldMacro use-macro="python:here.widget('language',mode='view')"/> 
    3131    </p> 
    3232 
    33         <p id="license_text_box"><label><tal:block i18n:translate="label_license">License</tal:block>:</label> <br /> 
    34     <metal:fieldMacro use-macro="python:here.widget('rights',mode='view')"/> 
    35     </p> 
     33    <p><metal:fieldMacro use-macro="python:here.widget('rights',mode='view')"/></p> 
    3634 
    3735 
  • trunk/skins/lemill/base.pt

    r2929 r3067  
    4242                              condition="python:visState == 'visible' and value"> 
    4343                      <tal:if_use_label condition="use_label | nothing"> 
    44                           <label><span i18n:translate="" tal:content="python:field.widget.Label(here)">Field</span>:</label> 
    45                           <br /> 
     44                          <label class="field_label"><span i18n:translate="" tal:content="python:field.widget.Label(here)">Field</span>:</label><br /> 
    4645                      </tal:if_use_label> 
    4746                      <metal:block use-macro="python:here.widget(field.getName(), mode=mode, use_label=1)" /> 
  • trunk/skins/lemill/field.pt

    r3065 r3067  
    1212    <metal:base_view_macro define-macro="base_view" tal:define="widget_view python:here.widget(field.getName(), mode=mode, use_label=1); 
    1313                    field_macros here/widgets/field/macros; 
     14                    label_macro view_macros/label | field_macros/label; 
    1415                    data_macro view_macros/data | data_macro | field_macros/data; 
    1516                    visState python:widget.isVisible(here, mode); 
    1617                    visCondition python:field.widget.testCondition(here, portal, template); 
     18                    is_visible visState == 'visible' and visCondition and 'view' in widget.modes and 'r' in field.mode and field.checkPermission('r',here); 
    1719                    "> 
    18       <tal:condition 
    19           condition="python:visState == 'visible' and visCondition"> 
    20         <tal:if_perm 
    21             condition="python:'view' in widget.modes and 'r' in field.mode and field.checkPermission('r',here)"> 
     20      <h2 tal:content="python:view_macros"></h2> 
     21      <h2>jaa</h2> 
     22      <tal:condition condition="is_visible"> 
    2223          <tal:if_use_label condition="use_label | nothing"> 
    23               <label class="field_title"><span i18n:translate="" tal:content="python:widget.Label(here)">Field</span>:</label> 
    2424          </tal:if_use_label> 
    25           <metal:use_data use-macro="data_macro|default" /> 
    26         </tal:if_perm> 
    27       </tal:condition> 
     25          <metal:use_data use-macro="widget_view" /> 
    2826    </metal:base_view_macro> 
    2927 
     
    3129      <metal:block use-macro="widget_view" /> 
    3230    </metal:data_macro> 
     31 
     32    <metal:label_macro define-macro="label"> 
     33      <label class="field_title"><span i18n:translate="" tal:content="python:widget.Label(here)">Field</span>:</label> 
     34    </metal:label_macro> 
    3335 
    3436    <div metal:define-macro="view" tal:define="fieldtypename python:field.getType().split('.')[-1]" 
     
    6769              </div> 
    6870          </div> 
    69           <label class="field_title" i18n:translate="" 
    70                  tal:content="python:widget.Label(here)" 
    71                  tal:attributes="for python:field.getName()"> 
    72           </label> 
     71          <label class="field_title" i18n:translate="" tal:content="python:widget.Label(here)" tal:attributes="for python:field.getName()">Label</label> 
    7372          <span class="fieldRequired" 
    7473                tal:condition="field/required" 
  • trunk/skins/lemill/fullscreen_view.pt

    r2873 r3067  
    99 
    1010  <head><title></title> 
    11    <metal:css fill-slot="css_slot"> 
    12     <style type="text/css" media="all" tal:content="string:@import url($portal_url/fullscreen.css);">@import url("fullscreen.css");</style> 
    13    </metal:css> 
    1411  </head> 
    1512  <body> 
    16      <metal:fill fill-slot="topslot"> 
     13     <metal:fill fill-slot="bodyslot"> 
    1714      <div id="site-title" class="visualNoPrint"> 
    1815        <a href="" tal:attributes="href portal_url">LeMill</a> 
     
    2017      <div id="control-panel" class="visualNoPrint"> 
    2118        <a href="" tal:attributes="href string:${here_url}/view"><tal:block i18n:domain="lemill" i18n:translate="label_edit_tips_and_more">Edit, tips for use and more</tal:block>...</a> 
    22       </div></metal:fill> 
    23      <metal:fill fill-slot="columns"> 
    24         <div id="material-content"> 
     19      </div> 
     20        <div id="cover-image" class="visualNoPrint"> 
     21         <a href="" tal:attributes="href string:${here_url}/view"><img src="default.png" tal:attributes="src here/getCoverImageURL; alt python:here.meta_type" style="padding: 10px 20px"/></a> 
     22        </div> 
     23 
     24        <div class="main grid" id="material-content"> 
    2525         <div metal:use-macro="here/global_statusmessage/macros/portal_message" /> 
    2626         <metal:bodytext metal:use-macro="here/base_view/macros/main" /> 
    2727         <div metal:use-macro="here/document_byline/macros/copyright"/> 
    2828        </div> 
    29         <div id="cover-image" class="visualNoPrint"> 
    30          <a href="" tal:attributes="href string:${here_url}/view"><img src="default.png" tal:attributes="src here/getCoverImageURL; alt python:here.meta_type" style="padding: 10px 20px"/></a> 
    31         </div> 
    32     </metal:fill>     
    33     <metal:fill fill-slot="footerslot"></metal:fill> 
     29    </metal:fill> 
    3430  </body> 
    3531</html> 
  • trunk/skins/lemill/lemill_grid.css

    r3065 r3067  
    597597    } 
    598598 
    599 div.field label.field_title { 
     599label.field_label { 
    600600    font-weight:bold; 
    601601    } 
     
    624624} 
    625625 
     626/* Full screen view */ 
     627#site-title, #control-panel { 
     628    position : absolute; 
     629    top : 0px; 
     630    width : 60%; 
     631    padding : 4px 10px; 
     632    color : #FFFFFF; 
     633    background-color : #77bb22; 
     634    font-family : "Trebuchet MS", Geneva, Arial, Helvetica, sans-serif; 
     635    font-size : 14px; 
     636} 
     637 
     638#site-title { 
     639    left : 0px; 
     640} 
     641 
     642#control-panel { 
     643    right : 0px; 
     644    text-align : right; 
     645} 
     646 
     647#site-title a, #control-panel a { 
     648    color : #FFFFFF; 
     649    background-color : inherit; 
     650    text-decoration : none; 
     651    border-bottom: 0px; 
     652} 
     653 
     654#material-content { 
     655    position : absolute; 
     656    top : 48px; 
     657    padding-bottom : 36px; 
     658    left : 50%; 
     659    margin-left : -190px; 
     660    width : 550px; 
     661} 
     662 
     663#cover-image { 
     664    position : absolute; 
     665    top : 48px; 
     666    padding-bottom : 36px; 
     667    left : 50%; 
     668    margin-left : -400px; 
     669    width: 200px; 
     670} 
     671 
     672#slideshow-content { 
     673    position : absolute; 
     674    top : 48px; 
     675    padding-bottom : 36px; 
     676    left : 50%; 
     677    margin-left : -350px; 
     678    width : 700px; 
     679} 
    626680 
    627681/* tinyMCE editor style */ 
  • trunk/skins/lemill/multimediamaterial_view.pt

    r864 r3067  
    1111                                       fields python:here.Schema().viewableFields(here)"> 
    1212                    <tal:fields repeat="field fields"> 
    13                         <tal:cond condition="python:field.getName() in visibleFields and field.getName() not in ['title']"> 
     13                        <tal:cond condition="python:field.getName() in visibleFields and field.getName() != 'title'"> 
    1414                            <metal:fieldMacro use-macro="python:here.widget(field.getName(), mode='view')" /> 
    1515                        </tal:cond> 
  • trunk/skins/lemill/resource_list_macro.pt

    r3055 r3067  
    33      i18n:domain="lemill"> 
    44<body> 
    5  
    6  
    7  <metal:block define-macro="memberfolder_object_info" tal:define="HasCoverImage obj/getHasCoverImage | python:None; 
    8      interests obj/getInterests | nothing; 
    9      nicename obj/getNicename | nothing; 
    10      location_country obj/getLocation_country | nothing; 
    11      obj_url obj/getURL; 
    12      "> 
    13  
    14      <div class="coverimage" tal:condition="HasCoverImage"> 
    15         <span></span> 
    16              <a href="" tal:attributes="href obj_url"> 
    17                  <img src="" tal:attributes="src string:${obj/getURL}/coverImage;alt nicename"/> 
    18              </a> 
    19      </div> 
    20      <div class="coverimage" tal:condition="not:HasCoverImage"> 
    21         <span></span> 
    22          <a href="" tal:attributes="href obj_url"> 
    23              <img src="images/default_member.png" alt="Member Folder" height="120" width="120" /> 
    24          </a> 
    25      </div> 
    26      <a href=""  
    27          tal:attributes="href obj_url" class="browse_title_d"> 
    28          <span tal:replace="nicename"></span> 
    29      </a> 
    30     <div class="metadata"> 
    31     <ul class="metadata"> 
    32      <li class="browse_title_r"> 
    33         <a href=""  
    34             tal:attributes="href obj_url"> 
    35             <span tal:replace="nicename"></span> 
    36         </a> 
    37      </li> 
    38      <li class="browse_info" tal:condition="location_country"> 
    39              <tal:block i18n:translate="label_location">Location</tal:block>: 
    40                 <a href="#" tal:attributes="href string:${community_section}/country?location=${location_country}" tal:content="location_country">Country</a> 
    41      </li>         
    42      <li class="browse_info" tal:condition="interests"> 
    43          <div><tal:block i18n:translate="label_interests">Interests</tal:block>: 
    44              <tal:block tal:repeat="interests python:interests[:20]"  tal:omit-tag=""> 
    45                 <a href="#" tal:attributes="href string:${community_section}/interests?interests=${interests}" tal:content="interests">PLACEHOLDER</a><span tal:condition="not:repeat/interests/end" tal:omit-tag="">, </span> 
    46              </tal:block> 
    47          </div> 
    48      </li> 
    49  
    50     </ul> 
    51    </div> 
    52  
    53  </metal:block> 
    54  
    55  
    56  <metal:block define-macro="group_object_info" tal:define="HasCoverImage obj/getHasCoverImage | python:None; 
    57      name obj/Title | obj/getId; 
    58      tags obj/getTags; 
    59      obj_url obj/getURL; 
    60      lang obj/getLanguage_skills; 
    61      "> 
    62      <div class="coverimage" tal:condition="HasCoverImage"> 
    63         <span></span> 
    64              <a href="" tal:attributes="href obj_url"> 
    65                  <img src="" alt="Group Blog" tal:attributes="src string:${obj/getURL}/coverImage" /> 
    66              </a> 
    67      </div> 
    68      <div class="coverimage" tal:condition="not:HasCoverImage"> 
    69         <span></span> 
    70          <a href="" tal:attributes="href obj_url"> 
    71              <img src="images/default_group.png" alt="Group Blog" height="120" width="120" /> 
    72          </a> 
    73      </div> 
    74     <a href=""  
    75         tal:attributes="href obj_url" class="browse_title_d"> 
    76         <span tal:replace="name"></span> 
    77     </a> 
    78     <div class="metadata"> 
    79      <ul class="metadata"> 
    80  
    81       <li class="browse_title_r"> 
    82           <a href=""  
    83               tal:attributes="href obj_url"> 
    84               <span tal:replace="name"></span> 
    85           </a> 
    86       </li> 
    87     <li class="browse_info" tal:condition="tags"> 
    88         <tal:block i18n:translate="label_tags">Tags</tal:block>: 
    89         <tal:block tal:repeat="tag python:tags[:20]"  tal:omit-tag=""> 
    90             <a href="#" tal:attributes="href string:${tag_link_pref}${tag}" tal:content="tag">PLACEHOLDER</a><span tal:condition="not:repeat/tag/end" tal:omit-tag="">, </span> 
    91         </tal:block>     
    92     </li> 
    93     <li class="browse_info" tal:condition="lang"> 
    94         <tal:block i18n:translate="label_languages">Languages</tal:block>: 
    95         <tal:block tal:repeat="la lang"  tal:omit-tag=""> 
    96             <a href="#" tal:attributes="href python:'%s%s' % (lang_link_pref, la)" tal:content="python:context.script_getPrettyLanguage(la)">PLACEHOLDER</a><span tal:condition="not:repeat/la/end" tal:omit-tag="">, </span> 
    97         </tal:block>     
    98     </li> 
    99  
    100      </ul> 
    101     </div> 
    102  </metal:block> 
    103  
    104  
    105  
    106  
    107  
    108 <metal:block define-macro="resource_object_info"> 
    109  
    110     <tal:outer_defs define="obj_state obj/getState | string:" 
    111         condition="python:obj_state!='deleted'"> 
    112  
    113     <tal:defs define="obj_url obj/getURL | obj/absolute_url; 
    114             showAuthor python:obj_state != 'draft'; 
    115             HasCoverImage obj/getHasCoverImage | python:None; 
    116             name obj/Title | obj/getId; 
    117             creator obj/Creator; 
    118             authors obj/listCreators; 
    119             lang obj/Language; 
    120             tags obj/getTags | string:;"> 
    121  
    122      <div class="coverimage" tal:condition="HasCoverImage"> 
    123         <span></span> 
    124          <span tal:define="piccyurl string:${obj/getURL}/coverImage" tal:omit-tag=""> 
    125              <a href="" tal:attributes="href obj_url"> 
    126                  <img src="" tal:attributes="src piccyurl; alt python:obj.portal_type" /> 
    127              </a> 
    128          </span> 
    129      </div> 
    130      <div class="coverimage" tal:condition="not:HasCoverImage"> 
    131          <a href="" tal:attributes="href obj_url"> 
    132              <img src="" tal:attributes="src python:context.content.getDefaultIcon(obj.portal_type); alt python:obj.portal_type" height="120" width="120" /> 
    133          </a> 
    134      </div> 
    135  
    136     <a href=""  
    137         tal:attributes="href obj_url" class="browse_title_d"> 
    138         <span tal:replace="name"/> 
    139     </a> 
    140     <div class="metadata"> 
    141      <ul class="metadata"> 
    142  
    143      <li class="browse_title_r"> 
    144          <a href=""  
    145              tal:attributes="href obj_url"> 
    146              <strong tal:content="name" /> 
    147          </a> 
    148      </li> 
    149  
    150      <li class="browse_info" tal:condition="showAuthor"><span i18n:translate="label_authors">Authors</span>: 
    151         <tal:loop tal:repeat="author authors"> 
    152                  <a tal:replace="structure python:lutool.linkTo(author)" /> 
    153                  <tal:sep tal:condition="not:repeat/author/end">,</tal:sep>  
    154         </tal:loop> 
    155     </li> 
    156     <li class="browse_info" tal:condition="tags"> 
    157         <tal:block i18n:translate="label_tags">Tags</tal:block>: 
    158         <tal:block tal:repeat="tag python:tags[:20]"  tal:omit-tag=""> 
    159             <a href="#" tal:attributes="href string:${link_pref}${tag}" tal:content="tag">PLACEHOLDER</a><span tal:condition="not:repeat/tag/end" tal:omit-tag="">, </span> 
    160         </tal:block> 
    161      
    162     </li> 
    163     <li class="browse_info" tal:condition="lang"> 
    164         <tal:block i18n:domain="plone" i18n:translate="label_language">Language</tal:block>: <span tal:replace="python:here.script_getPrettyLanguage(lang)"></span></li> 
    165     </ul> 
    166    </div> 
    167    </tal:defs> 
    168    </tal:outer_defs> 
    169  
    170 </metal:block> 
    171  
    172  
    173  
    174 <metal:block define-macro="resources_list"> 
    175 <tal:split define="special_list python:here.lemill_tool.splitResultList(batch); link_pref string:${context/aq_inner/aq_parent/absolute_url}/tags?tag="> 
    176 <tal:rep repeat="special special_list"> 
    177 <h2 tal:condition="python:special[0] != ''" tal:content="python:special[0]" i18n:translate="" class="learning_story_title" /> 
    178 <ul id="resource_list" class="expanded"> 
    179     <li tal:repeat="obj python:special[1]" class="resultobject"> 
    180         <metal:tds use-macro="here/resource_list_macro/macros/resource_object_info" /> 
    181     </li> 
    182 </ul> 
    183 </tal:rep> 
    184 </tal:split> 
    185 </metal:block> 
    186  
    187 <metal:block define-macro="resources_list_unsorted"> 
    188 <ul id="resource_list" class="expanded" tal:define="link_pref string:${context/aq_inner/aq_parent/absolute_url}/tags?tag="> 
    189     <li tal:repeat="obj batch" class="resultobject"> 
    190         <metal:tds use-macro="here/resource_list_macro/macros/resource_object_info" /> 
    191     </li> 
    192 </ul> 
    193 </metal:block> 
    194  
    195  
    196 <metal:block define-macro="members_list">  
    197 <ul id="resources_list" class="expanded" tal:define="community_section python: '%s/community' % portal_url;"> 
    198     <li tal:repeat="obj batch" class="resultobject"> 
    199         <metal:tds use-macro="here/resource_list_macro/macros/memberfolder_object_info" /> 
    200     </li> 
    201 </ul> 
    202 </metal:block> 
    203  
    204 <metal:block define-macro="groups_list">  
    205 <ul id="resources_list" class="expanded" tal:define="tag_link_pref string:${portal_url}/community/tags?tag=; 
    206 lang_link_pref string:${portal_url}/community/g_language?language_skills="> 
    207     <li tal:repeat="obj batch" class="resultobject"> 
    208         <metal:tds use-macro="here/resource_list_macro/macros/group_object_info" /> 
    209     </li> 
    210 </ul> 
    211 </metal:block> 
    212  
    213 <metal:block define-macro="mixed_results_list">  
    214 <ul id="resources_list" class="expanded" tal:define=" 
    215         pu python:portal_url; 
    216         tag_link_pref string:${pu}/community/tags?tag=; 
    217         lang_link_pref string:${pu}/community/g_language?language_skills=; 
    218         community_section python: '%s/community' % pu; 
    219         section_dictionary python: {'Activity':'methods', 'Tool':'tools', 'MultimediaMaterial':'content',  'PresentationMaterial':'content', 'ExerciseMaterial':'content', 'PILOTMaterial':'content', 'SchoolProjectMaterial':'content', 'Piece':'content', 'LeMillReference':'content', 'BlogPost':'community', 'DiscussionItem':'community', 'Collection':'community', 'CollectionsFolder':'community','LessonPlan':'content', 'LeMillPrintResource':'content'}"> 
    220     <li tal:repeat="obj batch" class="resultobject"> 
    221         <tal:if_group condition="python: obj.portal_type=='GroupBlog'"> 
    222             <metal:tds use-macro="here/resource_list_macro/macros/group_object_info" /> 
    223         </tal:if_group> 
    224         <tal:if_member condition="python: obj.portal_type=='MemberFolder'"> 
    225             <metal:tds use-macro="here/resource_list_macro/macros/memberfolder_object_info" /> 
    226         </tal:if_member> 
    227         <tal:if_resource condition="python: obj.portal_type in section_dictionary.keys()"> 
    228             <tal:defs define="link_pref python:'%s/%s/tags?tag=' % (pu,section_dictionary[obj.portal_type])"> 
    229                 <metal:tds use-macro="here/resource_list_macro/macros/resource_object_info" /> 
    230             </tal:defs> 
    231         </tal:if_resource> 
    232     </li> 
    233 </ul> 
    234 </metal:block> 
    2355 
    2366<metal:block define-macro="result_list"> 
  • trunk/skins/lemill/widget_copyright.pt

    r3022 r3067  
    88 
    99    <!-- Copyright Widgets --> 
     10    <metal:label_macro define-macro="label"> 
     11    </metal:label_macro> 
    1012     
    1113    <metal:view_macro define-macro="view" 
     
    1315                          version python:request.get('version',None);                           
    1416                          value python:test(version, here.getFieldHistory(field.getName(), version), accessor()); 
    15                           value value; 
    1617                          display python:here.displayValue(vocab, value)"> 
    1718        <tal:copyright condition="python:value=='CreativeCommons'"> 
    18             <!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5  License</a>.<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 
     19            <!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><!-- This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5  License</a>.--><!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 
    1920            <Work rdf:about=""> 
    2021            <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> 
  • trunk/skins/lemill/widget_pilot.pt

    r3045 r3067  
    2727             <label><tal:block i18n:translate="label_scene">Scene</tal:block> <span tal:replace="python: int(index)/3+1"/>:</label> 
    2828             </tal:scene_begin>               
    29             <metal:view_block use_macro="python:path('here/widget_pilot/macros/view_'+type)" /> 
     29            <metal:view_block use-macro="python:path('here/widget_pilot/macros/view_'+type)" /> 
    3030        </tal:defs> 
    3131    </tal:chapters> 
     
    116116 
    117117<metal:define define-macro="edit"> 
     118<metal:use use-macro="field_macro | here/field/macros/edit"> 
     119<metal:fill fill-slot="widget_body"> 
    118120  <tal:define define="edit_chapter request/edit | python:0; 
    119121              edit_chapter python: int(edit_chapter); 
     
    155157   </tal:buttons> 
    156158  </tal:define> 
     159</metal:fill> 
     160</metal:use> 
    157161</metal:define> 
    158162 
     
    291295    </metal:define> 
    292296 
    293     <metal:define define-macro="edit"> 
    294        <metal:use use-macro="field_macro | here/field/macros/edit"> 
    295         <metal:fill fill-slot="widget_body"> 
    296297          <metal:block use-macro="here/widget_pilot/macros/area_edit" /> 
    297         </metal:fill> 
    298       </metal:use> 
    299     </metal:define> 
    300  
    301     <metal:define define-macro="search"> 
    302       <metal:use use-macro="here/widgets/field/macros/edit"> 
    303         <metal:fill fill-slot="widget_body"> 
    304  
    305           <metal:block use-macro="here/widget_pilot/macros/area_edit" /> 
    306  
    307         </metal:fill> 
    308       </metal:use> 
    309     </metal:define> 
     298 
    310299 
    311300  </body> 
  • trunk/skins/lemill/widget_tags.pt

    r2860 r3067  
    1111    <metal:view_macro define-macro="view" tal:repeat="tag accessor" tal:define="link_pref link_pref | string:${field/getName}?tag="> 
    1212            <a href=""  
    13                 tal:attributes="href string:${link_pref}${tag}"  
     13                tal:attributes="href string:${portal_url}/search?index_type=tags&amp;q=${tag}"  
    1414                tal:content="tag"></a><span tal:condition="not:repeat/tag/end" tal:omit-tag="">, </span> 
    1515    </metal:view_macro> 
Note: See TracChangeset for help on using the changeset viewer.