~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/base/xhtml.py

  • Committer: Matt Giuca
  • Date: 2010-02-11 04:20:42 UTC
  • Revision ID: matt.giuca@gmail.com-20100211042042-j7ivbq41aky9b2cp
Added Users tab to drop-down menu, for admins only.
Users view has new icon.
ivle/webapp/base/xhtml.py: Added 7th field to 'tabs' tuple -- admin. If true,
    restricts the tab to showing only for admins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
                continue
163
163
 
164
164
            for tab in plugin.tabs:
165
 
                # tab is a tuple: name, title, desc, icon, path
 
165
                # tab is a tuple: name, title, desc, icon, path, weight, admin
 
166
                # (Admin is optional, defaults to false)
 
167
                if len(tab) > 6 and tab[6]:
 
168
                    # Admin-only tab
 
169
                    if not (req.user and req.user.admin):
 
170
                        break
166
171
                new_app = {}
167
172
                new_app['this_app'] = hasattr(self, 'tab') \
168
173
                                      and tab[0] == self.tab