self.items = ['dashboard'] + self.items
def _check(self, c):
+ if hasattr(c, 'hide_to_admin') and 'admin' in identity.current.permissions: return False
+ if hasattr(c, 'hide_to_entregar') and 'admin' not in identity.current.permissions: return False
return c.require.eval_with_object(identity.current)
def __repr__(self):
option = u"""<option value="%s">%s</option>" """
template = """
<div id="navbar">
- Ir a :
- <select OnChange="window.location=this.options[this.selectedIndex].value;">
- %s
- </select>
- </div>
+ Ir a :
+ <select OnChange="window.location=this.options[this.selectedIndex].value;">
+ %s
+ </select>
+ </div>
"""
s = option % ('', '-----')
for i in self.items: