{{extend 'layout.html'}} {{import os, glob}}

{{=T("Installed applications")}}

{{for a in apps:}} {{buttons = []}} {{pass}}
{{if a==request.application:}} {{=a}} ({{=T('currently running')}}) {{else:}} {{=a}} {{if MULTI_USER_MODE and db.app(name=a):}}(created by {{="%(first_name)s %(last_name)s" % db.auth_user[db.app(name=a).owner]}}){{pass}} {{if not os.path.exists('applications/%s/compiled' % a):}} {{buttons.append((URL('design',args=a), T("Edit")))}} {{else:}} {{buttons.append((URL(a,'appadmin','index'), T("appadmin")))}} {{pass}} {{buttons.append((URL('about',args=a), T("About")))}} {{pass}} {{buttons.append((URL('errors',args=a), T("Errors")))}} {{buttons.append((URL('cleanup',args=a), T("Clean")))}} {{buttons.append((URL('pack',args=a), T("Pack all")))}} {{buttons.append((URL('pack_custom',args=a), T("Pack custom")))}} {{if not os.path.exists('applications/%s/compiled' % a):}} {{buttons.append((URL('compile_app',args=[a, 'skip_failed_views']), T("Compile (skip failed views)")))}} {{buttons.append((URL('compile_app',args=a), T("Compile (all or nothing)")))}} {{else:}} {{buttons.append((URL('pack',args=(a, 'compiled')), T("Pack compiled")))}} {{if glob.glob('applications/%s/controllers/*.py' % a):}} {{buttons.append((URL('remove_compiled_app',args=a), T("Remove compiled")))}} {{pass}} {{pass}} {{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }} {{buttons.append((URL('git_pull',args=a), T("Git Pull")))}} {{buttons.append((URL('git_push',args=a), T("Git Push")))}} {{pass}} {{if a!=request.application:}} {{buttons.append((URL('uninstall',args=a), T("Uninstall")))}} {{pass}} {{=button_enable(URL('enable',args=a), a) if a!='admin' else ''}}
{{if MULTI_USER_MODE:}} {{=auth.navbar()}} {{else:}} {{=sp_button(URL('change_password'), T('Change admin password'))}} {{=button(URL('default','reload_routes'), T('Reload routes'))}} {{pass}}
{{if is_manager():}}
{{=T("Version")}}

{{=myversion}}
{{running_on = T("Running on %s", request.env.server_software or 'Unknown')}} ({{="%s, Python %s" % (running_on, myplatform)}})

{{if session.check_version:}} {{=T('Checking for upgrades...')}} {{session.check_version=False}} {{else:}} {{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('Check for upgrades'))}} {{pass}}

{{if session.is_mobile=='auto':}}

{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}

{{pass}}
{{pass}} {{if MULTI_USER_MODE and is_manager():}}
{{=T("Multi User Mode")}}

{{=button(URL('bulk_register'),T('Bulk Register'))}} {{=button(URL('manage_students',vars={'order':'auth_user.id'}),T('Manage Students'))}}

{{pass}}
{{=T("New simple application")}}
{{=form_create.custom.begin}} {{=LABEL(T("Application name:"))}} {{=form_create.custom.widget.name}}
{{=form_create.custom.end}}
{{=T("Upload and install packed application")}}
{{=form_update.custom.begin}} {{=form_update.custom.widget.name}} {{=form_update.custom.widget.file}} {{=form_update.custom.widget.url}}({{=T('can be a git repo')}})
{{=form_update.custom.end}}
{{=T("Deploy")}}

{{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}} {{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}} {{=button(URL('pythonanywhere','deploy'), T('Deploy to PythonAnywhere'))}}

{{=T("New application wizard")}}

{{=button(URL('wizard','index'), T('Start wizard'))}}
{{=T("(requires internet access, experimental)")}}