Beispiel #1
0
def admin_wizard(request):
  if is_hue_admin(request.user):
    apps = appmanager.get_apps(request.user)
  else:
    apps = []
  app_names = [app.name for app in sorted(apps, key=lambda app: app.menu_index)]

  return render('admin_wizard.mako', request, {
      'version': hue_version(),
      'apps': dict([(app.name, app) for app in apps]),
      'app_names': app_names,
      'is_embeddable': request.GET.get('is_embeddable', False),
      'collect_usage': collect_usage(),
  })
Beispiel #2
0
def admin_wizard(request):
  if is_admin(request.user):
    apps = appmanager.get_apps(request.user)
  else:
    apps = []
  app_names = [app.name for app in sorted(apps, key=lambda app: app.menu_index)]

  return render('admin_wizard.mako', request, {
      'version': hue_version(),
      'apps': dict([(app.name, app) for app in apps]),
      'app_names': app_names,
      'is_embeddable': request.GET.get('is_embeddable', False),
      'collect_usage': collect_usage(),
  })
Beispiel #3
0
def commonfooter(request, messages=None):
  """
  Returns the rendered common footer
  """
  if messages is None:
    messages = {}

  hue_settings = Settings.get_settings()

  return django_mako.render_to_string("common_footer.mako", {
    'request': request,
    'messages': messages,
    'version': hue_version(),
    'collect_usage': collect_usage(),
    'tours_and_tutorials': hue_settings.tours_and_tutorials
  })
Beispiel #4
0
def commonfooter(request, messages=None):
  """
  Returns the rendered common footer
  """
  if messages is None:
    messages = {}

  hue_settings = Settings.get_settings()

  return django_mako.render_to_string("common_footer.mako", {
    'request': request,
    'messages': messages,
    'version': hue_version(),
    'collect_usage': collect_usage(),
    'tours_and_tutorials': hue_settings.tours_and_tutorials
  })
Beispiel #5
0
def admin_wizard(request):
  if request.user.is_superuser:
    apps = appmanager.get_apps(request.user)
  else:
    apps = []
  app_names = [app.name for app in sorted(apps, key=lambda app: app.menu_index)]

  tours_and_tutorials = Settings.get_settings().tours_and_tutorials

  return render('admin_wizard.mako', request, {
      'version': hue_version(),
      'apps': dict([(app.name, app) for app in apps]),
      'app_names': app_names,
      'tours_and_tutorials': tours_and_tutorials,
      'collect_usage': collect_usage(),
  })
Beispiel #6
0
def commonfooter(request, messages=None, is_mobile=False):
  """
  Returns the rendered common footer
  """
  if messages is None:
    messages = {}

  hue_settings = Settings.get_settings()

  template = 'common_footer.mako'
  if is_mobile:
    template = 'common_footer_m.mako'

  return django_mako.render_to_string(template, {
    'request': request,
    'messages': messages,
    'version': hue_version(),
    'collect_usage': collect_usage(),
  })
Beispiel #7
0
def commonfooter(request, messages=None, is_mobile=False):
  """
  Returns the rendered common footer
  """
  if messages is None:
    messages = {}

  hue_settings = Settings.get_settings()

  template = 'common_footer.mako'
  if is_mobile:
    template = 'common_footer_m.mako'

  return django_mako.render_to_string(template, {
    'request': request,
    'messages': messages,
    'version': hue_version(),
    'collect_usage': collect_usage(),
    'tours_and_tutorials': hue_settings.tours_and_tutorials
  })