Mercurial > hg > MPIWGWeb
comparison MPIWGRoot.py @ 100:f4ac675b2031
more members pages.
author | casties |
---|---|
date | Tue, 21 May 2013 18:50:05 +0200 |
parents | 7aaed5218d55 |
children | 2e2dd6a5ab26 4a8a532a05ba |
comparison
equal
deleted
inserted
replaced
99:84fa3f62ed85 | 100:f4ac675b2031 |
---|---|
135 sec = p | 135 sec = p |
136 p = p.aq_parent | 136 p = p.aq_parent |
137 | 137 |
138 subsecs = sec.objectItems(spec=self.nav_meta_types) | 138 subsecs = sec.objectItems(spec=self.nav_meta_types) |
139 subsecs = [s for s in subsecs if s[1].title != ""] | 139 subsecs = [s for s in subsecs if s[1].title != ""] |
140 subsecs.sort(key=lambda x:int(getattr(x[1],'weight','0'))) | 140 subsecs.sort(key=lambda x:getInt(getattr(x[1], 'weight', '0'))) |
141 return subsecs | 141 return subsecs |
142 | 142 |
143 # compatibility | 143 # compatibility |
144 subNav = getSubsections | 144 subNav = getSubsections |
145 | 145 |
146 | 146 |
147 def getSections(self): | 147 def getSections(self): |
148 """returns a list of all sections i.e. top-level MPIWGFolders""" | 148 """returns a list of all sections i.e. top-level MPIWGFolders""" |
149 items = self.objectValues(spec='MPIWGFolder')[:] | 149 items = self.objectValues(spec='MPIWGFolder')[:] |
150 items.sort(key=lambda x:int(x.weight)) | 150 items.sort(key=lambda x:getInt(getattr(x, 'weight', '0'))) |
151 return items | 151 return items |
152 | 152 |
153 | 153 |
154 def getPathStyle(self, path, selected, style=""): | 154 def getPathStyle(self, path, selected, style=""): |
155 """returns a string with the given style + 'sel' if path == selected.""" | 155 """returns a string with the given style + 'sel' if path == selected.""" |