13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
-
+
-
+
-
+
|
<h3 class="currentapp">{{=a}} ({{=T('currently running')}})</h3>
<p class="controls">
{{else:}}
<h3 class="editableapp">{{=A(a,_href=URL(a,'default','index'))}}</h3>
{{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}}
<p class="controls">
{{if not os.path.exists('applications/%s/compiled' % a):}}
{{=sp_button(URL('design',args=a), T("edit"))}}
{{=sp_button(URL('design',args=a), T("Edit"))}}
{{else:}}
{{=button(URL(a,'appadmin','index'), T("appadmin"))}}
{{pass}}
{{=button(URL('about',args=a), T("about"))}}
{{=button(URL('about',args=a), T("About"))}}
{{pass}}
{{=button(URL('errors',args=a), T("errors"))}}
{{=button(URL('cleanup',args=a), T("clean"))}}
{{=button(URL('pack',args=a), T("pack all"))}}
{{=button(URL('errors',args=a), T("Errors"))}}
{{=button(URL('cleanup',args=a), T("Clean"))}}
{{=button(URL('pack',args=a), T("Pack all"))}}
{{if not os.path.exists('applications/%s/compiled' % a):}}
{{=button(URL('compile_app',args=a), T("compile"))}}
{{=button(URL('compile_app',args=a), T("Compile"))}}
{{else:}}
{{=button(URL('pack',args=(a, 'compiled')), T("pack compiled"))}}
{{=button(URL('pack',args=(a, 'compiled')), T("Pack compiled"))}}
{{if glob.glob('applications/%s/controllers/*.py' % a):}}
{{=button(URL('remove_compiled_app',args=a), T("remove compiled"))}}
{{=button(URL('remove_compiled_app',args=a), T("Remove compiled"))}}
{{pass}}
{{pass}}
{{if a!=request.application:}}
{{=button(URL('uninstall',args=a), T("uninstall"))}}
{{=button(URL('uninstall',args=a), T("Uninstall"))}}
{{pass}}
</p>
</li>
{{pass}}
</ul>
</div>
</div>
<div class="sidebar fl60">
<div class="sidebar_inner controls">
<div class="pwdchange">
<!-- CHANGE ADMIN PWD -->
{{if MULTI_USER_MODE:}}
{{=auth.navbar()}}
{{else:}}
{{=sp_button(URL('change_password'), T('change admin password'))}}
{{=sp_button(URL('change_password'), T('Change admin password'))}}
{{pass}}
</div>
<!-- VERSION -->
{{if is_manager():}}
<div class="box">
<h3>{{=myversion}}</h3>
<h3>{{="Version %s.%s.%s (%s) %s" % myversion}}</h3>
{{if session.check_version:}}
<p id="check_version">
{{=T('Checking for upgrades...')}}
<script>ajax('{{=URL('check_version')}}',[],'check_version');</script>{{session.check_version=False}}
{{else:}}
<p id="check_version">
{{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('check for upgrades'))}}
{{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('Check for upgrades'))}}
{{pass}}
</p>
<div class="formfield">
Running on {{=request.env.server_software}}
</div>
<p>{{=button(URL('default','reload_routes'), T('Reload routes'))}}</p>
</div>
{{pass}}
<!-- APP WIZARD -->
<div class="box">
<h3>{{=T("New application wizard")}}</h3>
<p>{{=button(URL('wizard','index'), T('start wizard'))}}
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}
{{=T("(requires internet access)")}}</p>
</div>
<!-- SCAFFOLD APP -->
<div class="box">
<h3>{{=T("New simple application")}}</h3>
<form action="" enctype="multipart/form-data" method="post">
<div class="formfield">
{{=LABEL(T("Application name:"), _for="scaffold_filename")}}
<input name="filename" type="text" id="scaffold_filename" />
<button type="submit" class="button">{{=T('create')}}</button>
<button type="submit" class="button">{{=T('Create')}}</button>
</div>
<div class="hidden"></div>
</form>
</div>
<!-- UPLOAD PACKAGE -->
<div class="box">
<h3>{{=T("Upload & install packed application")}}</h3>
<h3>{{=T("Upload and install packed application")}}</h3>
<form action="" enctype="multipart/form-data" method="post">
<div class="formfield">
<table>
<tr>
<td>
{{=LABEL(T("Application name:"), _form='upload_filename')}}
</td>
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
-
+
-
+
-
+
-
+
|
<td>
<input id="file" name="file" type="file" id="upload_file" />
<b>OR</b>
</td>
</tr>
<tr>
<td>
{{=LABEL(T("Use an url:"), _for='upload_url')}}
{{=LABEL(T("Get from URL:"), _for='upload_url')}}
</td>
<td>
<input id="appurl" name="appurl" type="text" id="upload_url"/>
</td>
</tr>
<tr>
<td></td>
<td>
<input type="checkbox" name="overwrite_check" id="upload_overwrite" />
{{=LABEL(T("overwrite installed app"), _for='upload_overwrite')}}
{{=LABEL(T("Overwrite installed app"), _for='upload_overwrite')}}
</td>
</tr>
<tr>
<td></td>
<td>
<button type="submit">{{=T('install')}}</button>
<button type="submit">{{=T('Install')}}</button>
</td>
</tr>
</table>
</div>
</form>
</div>
<!-- DEPLOY ON GAE -->
<div class="box">
<h3>{{=T("Deploy on Google App Engine")}}</h3>
<p>{{=button(URL('gae','deploy'), T('deploy'))}}</p>
<p>{{=button(URL('gae','deploy'), T('Deploy'))}}</p>
</div><br/>
{{if TWITTER_HASH:}}
<div class="box">
<h3>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h3>
<div id="tweets">{{=T('loading...')}}</div>
<script>
jQuery(document).ready(function(){jQuery('#tweets').load('{{=URL('twitter')}}')});
</script>
</div>
{{pass}}
</div>
</div>
|