Changeset 1315


Ignore:
Timestamp:
01/29/07 15:36:50 (13 years ago)
Author:
szabolcs
Message:

fixed #1107 spent 8h

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SectionFolder.py

    r1302 r1315  
    728728                return DEFAULT_ICONS['Piece'] 
    729729 
     730    def reorderFilterLinks(self, links): 
     731        """ ... """ 
     732        l = links.values() 
     733        result = [None] * len(l) 
     734        for key, val in links.iteritems(): 
     735            result[FILTER_LINK_ORDER[key]] = val 
     736        return result 
     737 
    730738class ContentFolder(SectionFolder): 
    731739 
  • trunk/config.py

    r1282 r1315  
    296296        } 
    297297         
     298# Set the order in the first line. The second line builds a dictionary 
     299# from that order ({'first': 0, 'second': 1...}) 
     300FILTER_LINK_ORDER = ('Learning resource', 'Piece', 'LeMillReference') 
     301FILTER_LINK_ORDER = dict((n, i) for i, n in enumerate(FILTER_LINK_ORDER)) 
     302 
  • trunk/skins/lemill/lemill_browse_macros.pt

    r1285 r1315  
    3636    <legend tal:condition="updict"> 
    3737        <span tal:omit-tag="" i18n:translate="label_show">Show</span>: 
    38         <tal:repeater repeat="linky updict/values"> 
     38        <tal:repeater repeat="linky updict"> 
    3939            <tal:defs define="url python:linky[1]; 
    4040                            singular python:linky[0][0]; 
  • trunk/skins/lemill/lemill_browse_results.pt

    r1273 r1315  
    4040                 browsed_stuff python:here.getBrowsedStuff(here.id); 
    4141                 linksdicts python:here.getTopicLinks(here.id, here_url, filter, request_opened['search_url']); 
    42                  updict python:linksdicts[0]; 
     42                 updict python:here.reorderFilterLinks(linksdicts[0]); 
    4343                 downdict python:linksdicts[1]; 
    4444                 "> 
Note: See TracChangeset for help on using the changeset viewer.