diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-27 12:29:22 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-27 12:29:22 -0400 |
commit | 0911671a797b8043e498beefe419241bd3a6cead (patch) | |
tree | 5a567bd6e335e794cb3c4422705fa682ad8cdc5c /cobbler/webui/master.py | |
parent | 2ed21cfed106842ab80301bf737fb3b5e4351867 (diff) | |
download | third_party-cobbler-0911671a797b8043e498beefe419241bd3a6cead.tar.gz third_party-cobbler-0911671a797b8043e498beefe419241bd3a6cead.tar.xz third_party-cobbler-0911671a797b8043e498beefe419241bd3a6cead.zip |
Two things... make "sync" into a button, and also hide links when the user
is logged out, so they don't misleading think they are logged in and have
to waste a click or two figuring it out.
Diffstat (limited to 'cobbler/webui/master.py')
-rw-r--r-- | cobbler/webui/master.py | 134 |
1 files changed, 66 insertions, 68 deletions
diff --git a/cobbler/webui/master.py b/cobbler/webui/master.py index 98d0ba4..449cdff 100644 --- a/cobbler/webui/master.py +++ b/cobbler/webui/master.py @@ -33,10 +33,10 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.0rc8' __CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 8) -__CHEETAH_genTime__ = 1190905054.4749429 -__CHEETAH_genTimestamp__ = 'Thu Sep 27 10:57:34 2007' +__CHEETAH_genTime__ = 1190910357.384402 +__CHEETAH_genTimestamp__ = 'Thu Sep 27 12:25:57 2007' __CHEETAH_src__ = 'webui_templates/master.tmpl' -__CHEETAH_srcLastModified__ = 'Thu Sep 20 15:49:34 2007' +__CHEETAH_srcLastModified__ = 'Thu Sep 27 12:20:28 2007' __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -69,7 +69,7 @@ class master(Template): - ## CHEETAH: generated from #block body at line 57, col 1. + ## CHEETAH: generated from #block body at line 55, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called @@ -144,73 +144,71 @@ class master(Template): <div id="sidebar"> <ul id="nav"> - <li><a href="/cobbler/webui/wui.html" class="menu">Docs</a></li> - <li><hr/></li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 29, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 29, col 22. - write('''/settings_view" class="menu">Settings</a></li> - <li><hr/></li> - <li>LIST</li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 32, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 32, col 22. - write('''/distro_list" class="menu">Distros</a></li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 33, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 33, col 22. - write('''/profile_list" class="menu">Profiles</a></li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 34, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 34, col 22. - write('''/system_list" class="menu">Systems</a></li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 35, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 35, col 22. - write('''/ksfile_list" class="menu">Kickstarts</a></li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 36, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 36, col 22. - write('''/repo_list" class="menu">Repos</a></li> - <li><hr/></li> - <li>ADD</li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 39, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 39, col 22. - write('''/distro_edit" class="menu">Distro</a></li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 40, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 40, col 22. - write('''/profile_edit" class="menu">Profile</a></li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 41, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 41, col 22. - write('''/system_edit" class="menu">System</a></li> - <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 42, col 22 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 42, col 22. - write('''/repo_edit" class="menu">Repo</a></li> - <li><hr/></li> ''') - if VFFSL(SL,"logged_in",True) != 'configured': # generated from line 44, col 10 - if VFFSL(SL,"logged_in",True): # generated from line 45, col 13 - write(''' <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 46, col 30 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 46, col 30. - write('''/logout_submit" class="menu">Log Out</a></li> + if not VFFSL(SL,"logged_in",True): # generated from line 27, col 9 + write(''' <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 28, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 28, col 26. + write('''/login" class="menu">Log In</a></li> ''') - else: # generated from line 47, col 13 - write(''' <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 48, col 30 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 48, col 30. - write('''/login" class="menu">Log In</a></li> + else: # generated from line 29, col 9 + write(''' <li><a href="/cobbler/webui/wui.html" class="menu">Docs</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 31, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 31, col 26. + write('''/settings_view" class="menu">Settings</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 32, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 32, col 26. + write('''/logout_submit" class="menu">Log Out</a></li> + <li><hr/></li> + <li>LIST</li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 35, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 35, col 26. + write('''/distro_list" class="menu">Distros</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 36, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 36, col 26. + write('''/profile_list" class="menu">Profiles</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 37, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 37, col 26. + write('''/system_list" class="menu">Systems</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 38, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 38, col 26. + write('''/ksfile_list" class="menu">Kickstarts</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 39, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 39, col 26. + write('''/repo_list" class="menu">Repos</a></li> + <li><hr/></li> + <li>ADD</li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 42, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 42, col 26. + write('''/distro_edit" class="menu">Distro</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 43, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 43, col 26. + write('''/profile_edit" class="menu">Profile</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 44, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 44, col 26. + write('''/system_edit" class="menu">System</a></li> + <li><a href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 45, col 26 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 45, col 26. + write('''/repo_edit" class="menu">Repo</a></li> + <li><hr/><br/></li> + <li><a class="button sync" href="''') + _v = VFFSL(SL,"base_url",True) # '$base_url' on line 47, col 46 + if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 47, col 46. + write('''/sync">Sync</a></li> ''') - write(''' <li><hr/></li> -''') - write(''' <li><a href="''') - _v = VFFSL(SL,"base_url",True) # '$base_url' on line 52, col 21 - if _v is not None: write(_filter(_v, rawExpr='$base_url')) # from line 52, col 21. - write('''/sync" class="menu">Sync</A></li> + write(''' + </ul> </div> |