slightly slicker appadmin

This commit is contained in:
mdipierro
2012-08-27 15:08:20 -05:00
parent 8a5c79d05b
commit fb52fac9cc
6 changed files with 135 additions and 32 deletions
+4 -1
View File
@@ -70,6 +70,7 @@
'Hello World in a flash!': 'Salve Mondo in un flash!',
'Home': 'Home',
'How did you get here?': 'How did you get here?',
'import': 'import',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'insert new': 'inserisci nuovo',
@@ -119,8 +120,8 @@
'Recipes': 'Recipes',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'Record ID': 'Record ID',
'record id': 'record id',
'Register': 'Register',
'register': 'registrazione',
'Registration identifier': 'Registration identifier',
@@ -133,6 +134,8 @@
'Services': 'Services',
'state': 'stato',
'Stylesheet': 'Foglio di stile (stylesheet)',
'submit': 'submit',
'Submit': 'Submit',
'Support': 'Support',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'table': 'tabella',
+15 -10
View File
@@ -12,6 +12,7 @@
{{if request.function=='index':}}
<h2>{{=T("Available databases and tables")}}</h2>
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
<table>
{{for db in sorted(databases):}}
{{for table in databases[db].tables:}}
{{qry='%s.%s.id>0'%(db,table)}}
@@ -28,19 +29,23 @@
{{qry=''}}
{{pass}}
{{pass}}
<h3>
{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
</h3>
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
<br /><br />
<tr>
<th style="font-size: 1.75em;">
{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
</th>
<td>
{{=A(str(T('New Record')),_href=URL('insert',args=[db,table]),_class="btn")}}
</td>
</tr>
{{pass}}
</table>
{{pass}}
{{elif request.function=='select':}}
<h2>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
</h2>
{{if table:}}
[ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
{{if table:}}
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn")}}<br/><br/>
<h3>{{=T("Rows in table")}}</h3><br/>
{{else:}}
<h3>{{=T("Rows selected")}}</h3><br/>
@@ -51,8 +56,8 @@
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
<br/><br/>
<h4>{{=T("%s selected", nrows)}}</h4>
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
{{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}
{{if start>0:}}{{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)),_class="btn")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)),_class="btn")}}{{pass}}
{{if rows:}}
<div style="overflow: auto;" width="80%">
{{linkto=URL('update',args=request.args[0])}}
@@ -61,7 +66,7 @@
</div>
{{pass}}
<br/><br/><h3>{{=T("Import/Export")}}</h3><br/>
[ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
<a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}" class="btn">{{=T("export as csv file")}}</a>
{{=formcsv or ''}}
{{elif request.function=='insert':}}