MobileBlur

Diff
Login

Diff

Differences From Artifact [cbe8ab5af6]:

To Artifact [3ef86ec614]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

31
32

# ###########################################################
# ## generate menu
# ###########################################################

_a = request.application
_c = request.controller
_f = request.function
response.title = '%s %s' % (_f, '/'.join(request.args))
response.subtitle = 'admin'
response.menu = [(T('site'), _f == 'site', URL(_a,'default','site'))]

if request.args:
    _t = request.args[0]
    response.menu.append((T('edit'), _c == 'default' and _f == 'design',
                         URL(_a,'default','design',args=_t)))
    response.menu.append((T('about'), _c == 'default' and _f == 'about',
                         URL(_a,'default','about',args=_t)))
    response.menu.append((T('errors'), _c == 'default' and _f == 'errors',
                         URL(_a,'default','errors',args=_t)))

    response.menu.append((T('versioning'),
                          _c == 'mercurial' and _f == 'commit',
                          URL(_a,'mercurial','commit',args=_t)))

if not session.authorized:
    response.menu = [(T('login'), True, '')]
else:
    response.menu.append((T('logout'), False,
                          URL(_a,'default',f='logout')))


response.menu.append((T('help'), False, URL('examples','default','index')))











|



|

|

|

<
|




|

|


>
|
|
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

20
21
22
23
24
25
26
27
28
29
30
31
32
33
# ###########################################################
# ## generate menu
# ###########################################################

_a = request.application
_c = request.controller
_f = request.function
response.title = '%s %s' % (_f, '/'.join(request.args))
response.subtitle = 'admin'
response.menu = [(T('Site'), _f == 'site', URL(_a,'default','site'))]

if request.args:
    _t = request.args[0]
    response.menu.append((T('Edit'), _c == 'default' and _f == 'design',
                         URL(_a,'default','design',args=_t)))
    response.menu.append((T('About'), _c == 'default' and _f == 'about',
                         URL(_a,'default','about',args=_t)))
    response.menu.append((T('Errors'), _c == 'default' and _f == 'errors',
                         URL(_a,'default','errors',args=_t)))

    response.menu.append((T('Versioning'),
                          _c == 'mercurial' and _f == 'commit',
                          URL(_a,'mercurial','commit',args=_t)))

if not session.authorized:
    response.menu = [(T('Login'), True, '')]
else:
    response.menu.append((T('Logout'), False,
                          URL(_a,'default',f='logout')))

if os.path.exists('applications/examples'):
    response.menu.append((T('Help'), False, URL('examples','default','index')))
else:
    response.menu.append((T('Help'), False, 'http://web2py.com/examples'))