def make_main_menu(request): menu = BaseMenu(header='Main Menu', class_='submenu') user = request.session.get('user', None) logged_in = user is not None if 'user' in request.session: user = request.session['user'] url = request.route_url('view_wiki') menu.append_new_entry('Wiki', url) url = request.route_url('mainevent_venue', context='main', id='main') menu.append_new_entry('Venues', url) url = request.route_url('hubby_main', context='main', id='calendar') menu.append_new_entry('Hubby', url) return menu
def make_ctx_menu(request): menu = BaseMenu(header='Main Menu', class_='submenu') user = request.session.get('user', None) logged_in = user is not None if logged_in: #url = request.route_url('user', context='preferences') url = request.route_url('user', context='status') menu.append_new_entry('Preferences', url) else: login_url = request.route_url('login') menu.append_new_entry('Sign In', login_url) if 'user' in request.session: user = request.session['user'] url = request.route_url('view_wiki') menu.append_new_entry('Wiki', url) return menu
def make_main_menu(request): menu = BaseMenu(header='Main Menu', class_='submenu') user = request.session.get('user', None) logged_in = user is not None if 'user' in request.session: user = request.session['user'] url = request.route_url('view_wiki') menu.append_new_entry('Wiki', url) url = request.route_url('consult_contacts', context='list', id='all') menu.append_new_entry('Contacts', url) url = request.route_url('consult_clients', context='list', id='all') menu.append_new_entry('Clients', url) url = request.route_url('consult_calendar', context='list', id='all') menu.append_new_entry('Calendar', url) url = request.route_url('msl_tickets', context='main', id='all') menu.append_new_entry('Tickets', url) url = request.route_url('msl_phonecalls', context='main', id='all') menu.append_new_entry('Phone Calls', url) url = request.route_url('msl_docs', context='main', id='all') menu.append_new_entry('Documents', url) url = request.route_url('msl_cases', context='main', id='all') menu.append_new_entry('Cases', url) url = request.route_url('test_rest_views', model='sitetext') menu.append_new_entry('test backbone', url) return menu
def make_ctx_menu(request): menu = BaseMenu(header='Main Menu', class_='submenu') user = request.session.get('user', None) admin_username = get_admin_username(request) logged_in = user is not None if logged_in: #url = request.route_url('user', context='preferences') url = request.route_url('user', context='status') menu.append_new_entry('Preferences', url) else: login_url = request.route_url('login') menu.append_new_entry('Sign In', login_url) if 'user' in request.session: user = request.session['user'] else: user = None if user is not None: if user.username != admin_username: url = request.route_url('home') menu.append_new_entry('Main View', url) url = request.route_url('main', context='schedcal', id='today') menu.append_new_entry('Schedule', url) url = request.route_url('vig_betgames', context='pending', id='bets') menu.append_new_entry('My Pending Bets', url) url = request.route_url('vig_betgames', context='closed', id='bets') menu.append_new_entry('My Closed Bets', url) url = request.route_url('view_wiki') menu.append_new_entry('Wiki', url) url = request.route_url('vig_nflteams', context='main', id='all') menu.append_new_entry('NFL Teams', url) else: url = request.route_url('admin', context='main') menu.append_new_entry('Admin', url) return menu