1 | {{extend 'layout.html'}} |
---|
2 | {{import os, glob}} |
---|
3 | {{block sectionclass}}site{{end}} |
---|
4 | <!-- begin "site" block --> |
---|
5 | <div class="row-fluid"> |
---|
6 | <div class="applist f60 span7"> |
---|
7 | <div class="applist_inner"> |
---|
8 | <h2>{{=T("Installed applications")}}</h2> |
---|
9 | <table width="100%" class="table"> |
---|
10 | {{for a in apps:}} |
---|
11 | <tr>{{buttons = []}} |
---|
12 | <td> |
---|
13 | {{if a==request.application:}} |
---|
14 | <h4 class="currentapp">{{=a}} ({{=T('currently running')}})</h4> |
---|
15 | {{else:}} |
---|
16 | <h4 class="editableapp">{{=A(a,_href=URL(a,'default','index'))}}</h4> |
---|
17 | {{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}} |
---|
18 | {{if not os.path.exists('applications/%s/compiled' % a):}} |
---|
19 | {{buttons.append((URL('design',args=a), T("Edit")))}} |
---|
20 | {{else:}} |
---|
21 | {{buttons.append((URL(a,'appadmin','index'), T("appadmin")))}} |
---|
22 | {{pass}} |
---|
23 | {{buttons.append((URL('about',args=a), T("About")))}} |
---|
24 | {{pass}} |
---|
25 | {{buttons.append((URL('errors',args=a), T("Errors")))}} |
---|
26 | {{buttons.append((URL('cleanup',args=a), T("Clean")))}} |
---|
27 | {{buttons.append((URL('pack',args=a), T("Pack all")))}} |
---|
28 | {{buttons.append((URL('pack_custom',args=a), T("Pack custom")))}} |
---|
29 | {{if not os.path.exists('applications/%s/compiled' % a):}} |
---|
30 | {{buttons.append((URL('compile_app',args=[a, 'skip_failed_views']), |
---|
31 | T("Compile (skip failed views)")))}} |
---|
32 | {{buttons.append((URL('compile_app',args=a), T("Compile (all or nothing)")))}} |
---|
33 | {{else:}} |
---|
34 | {{buttons.append((URL('pack',args=(a, 'compiled')), T("Pack compiled")))}} |
---|
35 | {{if glob.glob('applications/%s/controllers/*.py' % a):}} |
---|
36 | {{buttons.append((URL('remove_compiled_app',args=a), T("Remove compiled")))}} |
---|
37 | {{pass}} |
---|
38 | {{pass}} |
---|
39 | {{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }} |
---|
40 | {{buttons.append((URL('git_pull',args=a), T("Git Pull")))}} |
---|
41 | {{buttons.append((URL('git_push',args=a), T("Git Push")))}} |
---|
42 | {{pass}} |
---|
43 | {{if a!=request.application:}} |
---|
44 | {{buttons.append((URL('uninstall',args=a), T("Uninstall")))}} |
---|
45 | {{pass}} |
---|
46 | </td> |
---|
47 | <td> |
---|
48 | <div class="btn-group"> |
---|
49 | <a class="btn dropdown-toggle" data-toggle="dropdown"> |
---|
50 | {{=T('Manage')}} |
---|
51 | <span class="caret"></span> |
---|
52 | </a> |
---|
53 | <ul class="dropdown-menu"> |
---|
54 | {{for link,name in buttons:}} |
---|
55 | {{=LI(A(name,_href=link))}} |
---|
56 | {{pass}} |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | {{=button_enable(URL('enable',args=a, hmac_key=session.hmac_key), a) if a!='admin' else ''}} |
---|
60 | </td> |
---|
61 | </tr> |
---|
62 | {{pass}} |
---|
63 | </table> |
---|
64 | </div> |
---|
65 | </div> <!-- /applist --> |
---|
66 | <div class="sidebar fl60 span5"> |
---|
67 | <div class="sidebar_inner controls well well-small"> |
---|
68 | <!-- CHANGE ADMIN PWD --> |
---|
69 | <div class="pwdchange pull-right"> |
---|
70 | {{if MULTI_USER_MODE:}} |
---|
71 | {{=auth.navbar()}} |
---|
72 | {{else:}} |
---|
73 | {{=sp_button(URL('change_password'), T('Change admin password'))}} |
---|
74 | {{=button(URL('default','reload_routes'), T('Reload routes'))}} |
---|
75 | {{pass}} |
---|
76 | </div> <!-- /CHANGE ADMIN PWD --> |
---|
77 | {{if is_manager():}} |
---|
78 | <!-- VERSION --> |
---|
79 | <div class="box"> |
---|
80 | <h4>{{=T("Version")}}</h4> |
---|
81 | <p> |
---|
82 | <tt>{{=myversion}}</tt><br/> |
---|
83 | {{running_on = T("Running on %s", request.env.server_software or 'Unknown')}} |
---|
84 | ({{="%s, Python %s" % (running_on, myplatform)}}) |
---|
85 | </p> |
---|
86 | <p id="check_version" class="row-buttons"> |
---|
87 | {{if session.check_version:}} |
---|
88 | {{=T('Checking for upgrades...')}} |
---|
89 | <script>ajax('{{=URL('check_version')}}',[],'check_version');</script> |
---|
90 | {{session.check_version=False}} |
---|
91 | {{else:}} |
---|
92 | {{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('Check for upgrades'))}} |
---|
93 | {{pass}} |
---|
94 | </p> |
---|
95 | {{if session.is_mobile=='auto':}} |
---|
96 | <p>{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}</p> |
---|
97 | {{pass}} |
---|
98 | </div> <!-- /VERSION --> |
---|
99 | {{pass}} |
---|
100 | {{if MULTI_USER_MODE and is_manager():}} |
---|
101 | <!-- MULTI_USER_INTERFACE --> |
---|
102 | <div class="box"> |
---|
103 | <h4>{{=T("Multi User Mode")}}</h4> |
---|
104 | <p class="row-buttons"> |
---|
105 | {{=button(URL('bulk_register'),T('Bulk Register'))}} |
---|
106 | {{=button(URL('manage_students',vars={'order':'auth_user.id'}),T('Manage Students'))}} |
---|
107 | </p> |
---|
108 | </div> <!-- /MULTI_USER_INTERFACE --> |
---|
109 | {{pass}} |
---|
110 | <!-- SCAFFOLD APP --> |
---|
111 | <div class="box"> |
---|
112 | <h4>{{=T("New simple application")}}</h4> |
---|
113 | {{=form_create.custom.begin}} |
---|
114 | {{=LABEL(T("Application name:"))}} |
---|
115 | {{=form_create.custom.widget.name}} |
---|
116 | <div class="controls"><button type="submit" class="btn">{{=T('Create')}}</button></div> |
---|
117 | {{=form_create.custom.end}} |
---|
118 | </div> <!-- /SCAFFOLD APP --> |
---|
119 | <!-- UPLOAD PACKAGE --> |
---|
120 | <div class="box"> |
---|
121 | <h4>{{=T("Upload and install packed application")}}</h4> |
---|
122 | {{=form_update.custom.begin}} |
---|
123 | <label for="appupdate_name">{{=T("Application name:")}}</label> |
---|
124 | {{=form_update.custom.widget.name}} |
---|
125 | <label for="appupdate_file">{{=T("Upload a package:")}}</label> |
---|
126 | {{=form_update.custom.widget.file}} |
---|
127 | <label for="appupdate_url">{{=T("Or Get from URL:")}}</label> |
---|
128 | {{=form_update.custom.widget.url}}<small class="help-block">({{=T('can be a git repo')}})</small> |
---|
129 | <div class="controls"> |
---|
130 | <label class="checkbox"> |
---|
131 | {{=form_update.custom.widget.overwrite}} {{=T("Overwrite installed app")}} |
---|
132 | </label> |
---|
133 | <button type="submit" class='btn'>{{=T('Install')}}</button> |
---|
134 | </div> |
---|
135 | {{=form_update.custom.end}} |
---|
136 | </div> <!-- /UPLOAD PACKAGE --> |
---|
137 | <!-- DEPLOY ON GAE --> |
---|
138 | <div class="box"> |
---|
139 | <h4>{{=T("Deploy")}}</h4> |
---|
140 | <p class="row-buttons"> |
---|
141 | {{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}} |
---|
142 | {{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}} |
---|
143 | {{=button(URL('pythonanywhere','deploy'), T('Deploy to PythonAnywhere'))}} |
---|
144 | </p> |
---|
145 | </div> <!-- /DEPLOY ON GAE --> |
---|
146 | <!-- APP WIZARD --> |
---|
147 | <div class="box"> |
---|
148 | <h4>{{=T("New application wizard")}}</h4> |
---|
149 | <p>{{=button(URL('wizard','index'), T('Start wizard'))}}<br/> |
---|
150 | {{=T("(requires internet access, experimental)")}}</p> |
---|
151 | </div> <!-- /APP WIZARD --> |
---|
152 | <!-- TWITTER TIMELINE --> |
---|
153 | <div class="box twitter-timeline"> |
---|
154 | <a class="twitter-timeline" href="https://twitter.com/web2py" data-widget-id="340456915207327745">Tweets by @web2py</a> |
---|
155 | <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> |
---|
156 | </div><!-- /TWITTER TIMELINE --> |
---|
157 | </div> |
---|
158 | </div> <!-- /sidebar --> |
---|
159 | </div> <!-- /row-fluid --> |
---|
160 | <!-- end "site" block --> |
---|