admin based on bootstrap, thanks Paolo
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}debug{{end}}
|
||||
|
||||
<style>
|
||||
table.sortable {
|
||||
border-spacing:0px;
|
||||
}
|
||||
table.sortable td, table.sortable th {
|
||||
padding: 2px 5px 2px 5px;
|
||||
}
|
||||
table.sortable thead {
|
||||
background-color:#eee;
|
||||
color:#666666;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
tr.error_ticket:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script language="JavaScript">
|
||||
function check(){
|
||||
for (var i = 0; i < document.myform.elements.length; i++) {
|
||||
var e = document.myform.elements[i];
|
||||
if (e.type == 'checkbox') e.checked = true;
|
||||
}
|
||||
}
|
||||
function uncheck(){
|
||||
for (var i = 0; i < document.myform.elements.length; i++) {
|
||||
var e = document.myform.elements[i];
|
||||
if (e.type == 'checkbox') e.checked = false;
|
||||
}
|
||||
}
|
||||
jQuery(document).ready(function() { jQuery('.sourcecode').hide(); });
|
||||
</script>
|
||||
|
||||
<div class="applist f60">
|
||||
<div class="applist_inner">
|
||||
|
||||
<h2>{{=T("Breakpoints")}}</h2>
|
||||
|
||||
<div class="errorform">
|
||||
<form name="myform" method="post">
|
||||
<input name="CheckAll" value="{{=T('check all')}}"
|
||||
onclick="check()" type="button">
|
||||
<input name="CheckAll" value="{{=T('uncheck all')}}"
|
||||
onclick="uncheck()" type="button">
|
||||
<input value="{{=T('delete all checked')}}" type="submit"><br><br>
|
||||
|
||||
<table id="trck_breakpoints" class="sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{=T("Delete")}}</th>
|
||||
<th>{{=T("Filename")}}</th>
|
||||
<th>{{=T("LineNo")}}</th>
|
||||
<th>{{=T("Temporary")}}</th>
|
||||
<th>{{=T("Condition")}}</th>
|
||||
<th>{{=T("Hits")}}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{for bp in breakpoints:}}
|
||||
<tr class="breakpoint">
|
||||
<td><input type="checkbox" name="delete_{{=bp['number']}}" /></td>
|
||||
<td>{{=bp['filename']}}</td>
|
||||
<td>{{=A(bp['lineno'],_href="#",_onclick="collapse('%s');" % bp['number'])}}</td>
|
||||
<td>{{=bp['temporary']}}</td>
|
||||
<td>{{=bp['condition']}}</td>
|
||||
<td>{{=bp['hits']}}</td>
|
||||
</tr>
|
||||
<tr id="{{=bp['number']}}" class="sourcecode">
|
||||
<td colspan="6">
|
||||
<div>
|
||||
{{=CODE(open(bp['path']).read(), language='python',
|
||||
link=None, highlight_line=bp['lineno'], context_lines=10)}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="help">
|
||||
<ul>
|
||||
<li>{{=T("You can also set and remove breakpoint in the edit window, using the Toggle Breakpoint button")}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sidebar fl60">
|
||||
<div class="sidebar_inner controls">
|
||||
|
||||
<div class="box">
|
||||
|
||||
<h3>{{=T("Add breakpoint")}}</h3>
|
||||
|
||||
{{=form}}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}about{{end}}
|
||||
|
||||
<!-- begin "about" block -->
|
||||
<h2>{{=T("About application")}} "{{=app}}"</h2>
|
||||
<h3>{{=T("About")}} {{=app}}</h3>
|
||||
<p class="controls">{{=button(URL('edit/%s/ABOUT' % (app)), T('Edit'))}}</p>
|
||||
<div class="about_text legalese">{{=about}}</div>
|
||||
<div class="about_text legalese well well-small">{{=about}}</div>
|
||||
<h3>{{=T('License for')}} {{=app}}</h3>
|
||||
<p class="controls">{{=button(URL('edit/%s/LICENSE' % (app)), T('Edit'))}}</p>
|
||||
<div class="license_text legalese">{{=license}}</div>
|
||||
</ul>
|
||||
|
||||
<script language="javascript" type="text/javascript" src="{{=URL('static','js/jquery.flot.js')}}"></script>
|
||||
|
||||
<div class="license_text legalese well well-small">{{=license}}</div>
|
||||
<h3>{{=T('Project Progress')}}</h3>
|
||||
<p>
|
||||
<center>
|
||||
<div id="placeholder" style="width:600px;height:300px;"></div>
|
||||
</center>
|
||||
<script language="javascript" type="text/javascript" src="{{=URL('static','js/jquery.flot.js')}}"></script>
|
||||
<script language="javascript" type="text/javascript" src="{{=URL('static','js/jquery.flot.resize.js')}}"></script>
|
||||
<div class="row-fluid">
|
||||
<div class="span2"> </div>
|
||||
<div class="span8 center">
|
||||
<div id="placeholder"></div>
|
||||
</div>
|
||||
<div class="span2"> </div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(function () { jQuery.plot(jQuery("#placeholder"), [ {{=progress}} ]); });
|
||||
jQuery(document).ready(function() {
|
||||
jQuery.plot(jQuery("#placeholder"), [ {{=progress}} ]);
|
||||
})
|
||||
</script>
|
||||
</p>
|
||||
<!-- end "about" block -->
|
||||
@@ -1,5 +1,20 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
<h1>{{=T('Bulk Student Registration')}}</h1>
|
||||
|
||||
{{=form}}
|
||||
{{
|
||||
# add bootstrap class to form
|
||||
form['_class']='span4 well well-small'
|
||||
# change form.custom.begin
|
||||
form.custom.begin=XML("<%s %s>" % (form.tag,form._xml()[0]))
|
||||
# new form buttons
|
||||
smt = form.element('input',_type='submit')
|
||||
smt['_class']='btn'
|
||||
form.element('input[type=submit]',replace=lambda button: DIV(button,_class="controls-inline"))
|
||||
}}
|
||||
<h2>{{=T('Bulk Student Registration').capitalize()}}</h2>
|
||||
<div id="web2py_user_form">
|
||||
{{=form.custom.begin}}
|
||||
{{for e in form.components[0]:}}
|
||||
{{= e[0][0]}}
|
||||
{{= e[1][0]}}
|
||||
{{pass}}
|
||||
{{=form.custom.end}}
|
||||
</div>
|
||||
@@ -1,10 +1,22 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}change_password{{end}}
|
||||
|
||||
<h2>Change Admin Password</h2>
|
||||
|
||||
<!-- begin "change_password" block -->
|
||||
<h2>web2py™ {{=T('Web Framework')}}</h2>
|
||||
<h3>{{=T('Change Admin Password')}}</h3>
|
||||
<div class="pwform">
|
||||
{{=form}}
|
||||
{{=form.custom.begin}}
|
||||
{{ for fieldname in form.table.fields: }}
|
||||
{{if fieldname is not 'id':}}
|
||||
<label>{{=form.custom.label[fieldname]}}</label>
|
||||
{{=form.custom.widget[fieldname]}}
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
<div class="controls"><button type="submit" class="btn">{{=T('Submit')}}</button></div>
|
||||
{{=form.custom.end}}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(":input:visible:enabled:first").focus();
|
||||
});
|
||||
</script>
|
||||
<!-- end "change_password" block -->
|
||||
@@ -1,9 +1,16 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{
|
||||
dlg = dialog
|
||||
smt_button = dlg.element(_type="submit")
|
||||
smt_button['_class'] = 'btn'
|
||||
smt_button['_style'] = 'margin-right:4px;'
|
||||
ccl_button = dlg.element(_type="button")
|
||||
ccl_button['_class'] = 'btn'
|
||||
}}
|
||||
{{block sectionclass}}delete{{end}}
|
||||
|
||||
<!-- begin "delete" block -->
|
||||
<h2>{{=T('Are you sure you want to delete file "%s"?', filename)}}</h2>
|
||||
<div class="center">
|
||||
{{=dialog}}
|
||||
</div>
|
||||
|
||||
<!-- end "delete" block -->
|
||||
@@ -1,9 +1,16 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{
|
||||
dlg = dialog
|
||||
smt_button = dlg.element(_type="submit")
|
||||
smt_button['_class'] = 'btn'
|
||||
smt_button['_style'] = 'margin-right:4px;'
|
||||
ccl_button = dlg.element(_type="button")
|
||||
ccl_button['_class'] = 'btn'
|
||||
}}
|
||||
{{block sectionclass}}delete_plugin{{end}}
|
||||
|
||||
<!-- begin "delete_plugin" block -->
|
||||
<h2>{{=T('Are you sure you want to delete plugin "%s"?', plugin)}}</h2>
|
||||
<div class="center">
|
||||
{{=dialog}}
|
||||
</div>
|
||||
|
||||
<!-- end "delete_plugin" block -->
|
||||
@@ -1,58 +1,81 @@
|
||||
{{extend 'layout.html'}}
|
||||
{{
|
||||
def all(items):
|
||||
return reduce(lambda a,b:a and b,items,True)
|
||||
return reduce(lambda a,b:a and b,items,True)
|
||||
def peekfile(path,file,vars={},title=None):
|
||||
args=(path,file) if 'app' in vars else (app,path,file)
|
||||
return A(file.replace('\\\\','/'),_title=title,_href=URL('peek', args=args, vars=vars))
|
||||
args=(path,file) if 'app' in vars else (app,path,file)
|
||||
return A(file.replace('\\\\','/'),_title=title,_href=URL('peek', args=args, vars=vars))
|
||||
def editfile(path,file,vars={}):
|
||||
args=(path,file) if 'app' in vars else (app,path,file)
|
||||
return A(SPAN(T('Edit')),_class='button editbutton',_href=URL('edit', args=args, vars=vars))
|
||||
args=(path,file) if 'app' in vars else (app,path,file)
|
||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit', args=args, vars=vars))
|
||||
def testfile(path,file):
|
||||
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')), SPAN(T("Run tests in this file (to run all files, you may also use the button labelled 'test')"))), _class='icon test tooltip',_href=URL('test', args=(app, file)))
|
||||
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
||||
SPAN(T("Run tests in this file (to run all files, you may also use the button labelled 'test')"))),
|
||||
_class='icon test',
|
||||
_href=URL('test', args=(app, file)),
|
||||
_rel="tooltip",
|
||||
**{'_data-placement':'right',
|
||||
'_data-original-title':T("Run tests in this file (to run all files, you may also use the button labelled 'test')")})
|
||||
def editlanguagefile(path,file,vars={}):
|
||||
return A(SPAN(T('Edit')),_class='button editbutton',_href=URL('edit_language', args=(app, path, file), vars=vars))
|
||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit_language', args=(app, path, file), vars=vars))
|
||||
def editpluralsfile(path,file,vars={}):
|
||||
return A(SPAN(T('Edit')),_class='button editbutton',_href=URL('edit_plurals', args=(app, path, file), vars=vars))
|
||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit_plurals', args=(app, path, file), vars=vars))
|
||||
def file_upload_form(location, anchor=None):
|
||||
form=FORM(T("upload file:")," ",
|
||||
INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design',args=app, anchor=anchor)),
|
||||
INPUT(_type="submit",_value=T("upload")),_action=URL('upload_file'))
|
||||
return form
|
||||
def file_create_form(location, anchor=None):
|
||||
form=FORM(T("create file with filename:")," ",
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design',args=app)),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
INPUT(_type="hidden",_name="id",_value=anchor),
|
||||
INPUT(_type="submit",_value=T("Create")),_action=URL('create_file'))
|
||||
return form
|
||||
form=FORM(
|
||||
LABEL(T("upload file:")),
|
||||
INPUT(_type="file",_name="file"),
|
||||
LABEL(T("and rename it:")),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY,_class=""),
|
||||
DIV(TAG['BUTTON'](T("Upload"),_type="submit",_class="btn"),_class="controls"),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design',args=app, anchor=anchor)),
|
||||
_action=URL('upload_file'),
|
||||
_class="generatedbyw2p well well-small")
|
||||
return form
|
||||
def file_create_form(location, anchor=None, helptext=""):
|
||||
form=FORM(
|
||||
LABEL(T("create file with filename:")),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY,_class=''),
|
||||
TAG['SMALL'](helptext,_class="help-block"),
|
||||
DIV(TAG['BUTTON'](T("Create"),_type="submit",_class="btn"),_class="controls"),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design',args=app)),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
INPUT(_type="hidden",_name="id",_value=anchor),
|
||||
_action=URL('create_file'),
|
||||
_class="generatedbyw2p well well-small")
|
||||
return form
|
||||
def upload_plugin_form(app, anchor=None):
|
||||
form=FORM(T("upload plugin file:")," ",
|
||||
INPUT(_type="file",_name="pluginfile"),
|
||||
INPUT(_type="hidden",_name="id",_value=anchor),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
INPUT(_type="submit",_value=T("upload")))
|
||||
return form
|
||||
form=FORM(
|
||||
LABEL(T("upload plugin file:")),
|
||||
INPUT(_type="file",_name="pluginfile"),
|
||||
INPUT(_type="hidden",_name="id",_value=anchor),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
DIV(TAG['BUTTON'](T("Upload"),_type="submit",_class="btn"),_class="controls"),
|
||||
_class="generatedbyw2p well well-small")
|
||||
return form
|
||||
def deletefile(arglist, vars={}):
|
||||
vars.update({'sender':request.function+'/'+app})
|
||||
return A(TAG[''](IMG(_src=URL('static', 'images/delete_icon.png')), SPAN(T('Delete this file (you will be asked to confirm deletion)'))), _class='icon delete tooltip', _href=URL('delete',args=arglist,vars=vars))
|
||||
vars.update({'sender':request.function+'/'+app})
|
||||
return A(TAG[''](IMG(_src=URL('static', 'images/delete_icon.png')),
|
||||
SPAN(T('Delete this file (you will be asked to confirm deletion)'))),
|
||||
_href=URL('delete',args=arglist,vars=vars),
|
||||
_class='icon delete',
|
||||
_rel="tooltip",
|
||||
**{'_data-placement':'right',
|
||||
'_data-original-title':T('Delete this file (you will be asked to confirm deletion)')})
|
||||
}}
|
||||
|
||||
{{block sectionclass}}design{{end}}
|
||||
<!-- begin "design" block -->
|
||||
|
||||
<h2>{{=T("Edit application")}} "{{=A(app,_href=URL(app,'default','index'),_target="_blank")}}"</h2>
|
||||
|
||||
<!-- COLLAPSE/JUMP-TO BUTTONS -->
|
||||
<div class="right-full controls">
|
||||
<p>
|
||||
<p class="buttons-row">
|
||||
{{=searchbox('search')}}
|
||||
<a class="button special" href="#" onclick="jQuery('h3').click();return false"><span>{{=T("collapse/expand all")}}</span></a>
|
||||
<a class="button special btn btn-inverse" href="#" onclick="jQuery('h3>span').click();return false"><span>{{=T("collapse/expand all")}}</span></a>
|
||||
<span class="buttongroup">
|
||||
{{=button('#models', T("models"))}}
|
||||
{{=button('#controllers', T("controllers"))}}
|
||||
@@ -63,44 +86,49 @@ def deletefile(arglist, vars={}):
|
||||
{{=button('#private', T("private files"))}}
|
||||
{{=button('#plugins', T("plugins"))}}
|
||||
</span>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- MODELS -->
|
||||
|
||||
<h3 id="models" onclick="collapse('models_inner');" class="component">
|
||||
{{=T("Models")}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T("The data representation, define database tables and sets")}}</span></span>
|
||||
<h3 id="_models" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('models_inner');">{{=T("Models")}}</span>
|
||||
<a href="#models" rel="tooltip" data-placement="right" data-original-title="{{=T('The data representation, define database tables and sets')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("The data representation, define database tables and sets")}}</span>
|
||||
</a><span id="models" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="models_inner" class="component_contents">
|
||||
{{if not models:}}<p><strong>{{=T("There are no models")}}</strong></p>{{else:}}
|
||||
<div class="controls comptools">
|
||||
{{=button(URL(a=app,c='appadmin',f='index'), T('database administration'))}}
|
||||
{{if os.access(os.path.join(request.folder,'..',app,'databases','sql.log'),os.R_OK):}}
|
||||
{{=button(URL('peek/%s/databases/sql.log'%app), 'sql.log')}}
|
||||
{{pass}}
|
||||
{{=button(URL(a=app, c='appadmin',f='graph_model'), T('graph model'))}}
|
||||
</div>
|
||||
{{pass}}
|
||||
|
||||
<ul>
|
||||
{{for m in models:}}
|
||||
{{id="models__"+m.replace('.','__')}}
|
||||
<li id="{{=id}}">
|
||||
<span class="filetools controls">
|
||||
{{=editfile('models',m, dict(id=id))}}
|
||||
{{=deletefile([app, 'models', m], dict(id=id, id2='models'))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('models',m, dict(id=id))}}
|
||||
</span>
|
||||
<span class="extras">
|
||||
{{if len(defines[m]):}}{{=T("defines tables")}} {{pass}}{{=XML(', '.join([B(table).xml() for table in defines[m]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">{{=file_create_form('%s/models/' % app, 'models')}}</div>
|
||||
{{if not models:}}<p><strong>{{=T("There are no models")}}</strong></p>{{else:}}
|
||||
<div class="controls comptools">
|
||||
{{=button(URL(a=app,c='appadmin',f='index'), T('database administration'))}}
|
||||
{{if os.access(os.path.join(request.folder,'..',app,'databases','sql.log'),os.R_OK):}}
|
||||
{{=button(URL('peek/%s/databases/sql.log'%app), 'sql.log')}}
|
||||
{{pass}}
|
||||
{{=button(URL(a=app, c='appadmin',f='graph_model'), T('graph model'))}}
|
||||
</div>
|
||||
<ul class="unstyled act_edit">
|
||||
{{for m in models:}}
|
||||
{{id="models__"+m.replace('.','__')}}
|
||||
<li id="{{='_'+id}}" rel="pagebookmark"><span id="{{=id}}" class="hashstick"> </span>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('models',m, dict(id=id))}}
|
||||
{{=deletefile([app, 'models', m], dict(id=id, id2='models'))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('models',m, dict(id=id))}}
|
||||
</span>
|
||||
<span class="extras">
|
||||
{{if len(defines[m]):}}{{=T("defines tables")}} {{pass}}{{=XML(', '.join([B(table).xml() for table in defines[m]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
<div class="controls formfield">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">{{=file_create_form('%s/models/' % app, 'models')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- FIND CONTROLLER FUNCTIONS -->
|
||||
@@ -110,289 +138,325 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
||||
}}
|
||||
|
||||
<!-- CONTROLLERS -->
|
||||
|
||||
<h3 id="controllers" onclick="collapse('controllers_inner');" class="component">
|
||||
{{=T("Controllers")}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T("The application logic, each URL path is mapped in one exposed function in the controller")}}</span></span>
|
||||
<h3 id="_controllers" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('controllers_inner');">{{=T("Controllers")}}</span>
|
||||
<a href="#controllers" rel="tooltip" data-placement="right" data-original-title="{{=T('The application logic, each URL path is mapped in one exposed function in the controller')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("The application logic, each URL path is mapped in one exposed function in the controller")}}</span>
|
||||
</a><span id="controllers" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="controllers_inner" class="component_contents">
|
||||
{{if not controllers:}}<p><strong>{{=T("There are no controllers")}}</strong></p>{{else:}}
|
||||
<div class="controls comptools">
|
||||
{{=button(URL(r=request,c='shell',f='index',args=app), T("shell"))}}
|
||||
{{=button(URL('test',args=app), T("test"))}}
|
||||
{{=button(URL('edit',args=[app,'cron','crontab']), T("crontab"))}}
|
||||
</div>
|
||||
{{pass}}
|
||||
<ul>
|
||||
{{for c in controllers:}}
|
||||
{{id="controllers__"+c.replace('.','__')}}
|
||||
<li id="{{=id}}">
|
||||
<span class="filetools controls">
|
||||
{{=editfile('controllers',c, dict(id=id))}}
|
||||
{{=deletefile([app, 'controllers', c], dict(id=id, id2='controllers'))}}
|
||||
{{=testfile('controllers',c)}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('controllers',c, dict(id=id))}}
|
||||
</span>
|
||||
<span class="extras">
|
||||
{{if functions[c]:}}{{=T("exposes")}} {{pass}}{{=XML(', '.join([A(f,_href=URL(a=app,c=c[:-3],f=f)).xml() for f in functions[c]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">{{=file_create_form('%s/controllers/' % app, 'controllers')}}</div>
|
||||
{{if not controllers:}}<p><strong>{{=T("There are no controllers")}}</strong></p>{{else:}}
|
||||
<div class="controls comptools">
|
||||
{{=button(URL(r=request,c='shell',f='index',args=app), T("shell"))}}
|
||||
{{=button(URL('test',args=app), T("test"))}}
|
||||
{{=button(URL('edit',args=[app,'cron','crontab']), T("crontab"))}}
|
||||
</div>
|
||||
<ul class="unstyled act_edit">
|
||||
{{for c in controllers:}}
|
||||
{{id="controllers__"+c.replace('.','__')}}
|
||||
<li id="{{='_'+id}}" rel="pagebookmark"><span id="{{=id}}" class="hashstick"> </span>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('controllers',c, dict(id=id))}}
|
||||
{{=deletefile([app, 'controllers', c], dict(id=id, id2='controllers'))}}
|
||||
{{=testfile('controllers',c)}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('controllers',c, dict(id=id))}}
|
||||
</span>
|
||||
<span class="extras celled">
|
||||
{{if functions[c]:}}{{=T("exposes")}}{{pass}} {{=XML(', '.join([A(f,_href=URL(a=app,c=c[:-3],f=f)).xml() for f in functions[c]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
<div class="controls formfield">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">{{=file_create_form('%s/controllers/' % app, 'controllers')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- VIEWS -->
|
||||
|
||||
<h3 id="views" onclick="collapse('views_inner');" class="component">
|
||||
{{=T("Views")}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T("The presentations layer, views are also known as templates")}}</span></span>
|
||||
<h3 id="_views" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('views_inner');">{{=T("Views")}}</span>
|
||||
<a href="#views" rel="tooltip" data-placement="right" data-original-title="{{=T('The presentations layer, views are also known as templates')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("The presentations layer, views are also known as templates")}}</span>
|
||||
</a><span id="views" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="views_inner" class="component_contents">
|
||||
<div class="controls comptools">
|
||||
{{=button(LAYOUTS_APP, T("download layouts"))}}
|
||||
</div>
|
||||
{{if not views:}}<p><strong>{{=T("There are no views")}}</strong></p>{{pass}}
|
||||
<ul>
|
||||
{{for c in views:}}
|
||||
{{id="views__"+c.replace('/','__').replace('.','__')}}
|
||||
<li id="{{=id}}">
|
||||
<span class="filetools controls">
|
||||
{{=editfile('views',c, dict(id=id))}}
|
||||
{{=deletefile([app, 'views', c], dict(id=id, id2='views'))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('views',c, dict(id=id))}}
|
||||
</span>
|
||||
<span class="extras">
|
||||
{{if extend.has_key(c):}}{{=T("extends")}} <b>{{=extend[c]}}</b> {{pass}}
|
||||
{{if include[c]:}}{{=T("includes")}} {{pass}}{{=XML(', '.join([B(f).xml() for f in include[c]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">{{=file_create_form('%s/views/' % app, 'views')}}</div>
|
||||
{{if not views:}}<p><strong>{{=T("There are no views")}}</strong></p>{{else:}}
|
||||
<div class="controls comptools">
|
||||
{{=button(LAYOUTS_APP, T("download layouts"))}}
|
||||
</div>
|
||||
<ul class="unstyled act_edit">
|
||||
{{for c in views:}}
|
||||
{{id="views__"+c.replace('/','__').replace('.','__')}}
|
||||
<li id="{{='_'+id}}" rel="pagebookmark"><span id="{{=id}}" class="hashstick"> </span>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('views',c, dict(id=id))}}
|
||||
{{=deletefile([app, 'views', c], dict(id=id, id2='views'))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('views',c, dict(id=id))}}
|
||||
</span>
|
||||
<span class="extras celled celled-one">
|
||||
{{if extend.has_key(c):}}{{=T("extends")}} <b>{{=extend[c]}}</b> {{pass}}
|
||||
{{if include[c]:}}{{=T("includes")}} {{pass}}{{=XML(', '.join([B(f).xml() for f in include[c]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
<div class="controls formfield">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">{{=file_create_form('%s/views/' % app, 'views')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LANGUAGES -->
|
||||
|
||||
<h3 id="languages" onclick="collapse('languages_inner');" class="component">
|
||||
{{=T("Languages")}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T("Translation strings for the application")}}</span></span>
|
||||
<h3 id="_languages" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('languages_inner');">{{=T("Languages")}}</span>
|
||||
<a href="#languages" rel="tooltip" data-placement="right" data-original-title="{{=T('Translation strings for the application')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("Translation strings for the application")}}</span>
|
||||
</a><span id="languages" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="languages_inner" class="component_contents">
|
||||
<div class="controls comptools">
|
||||
{{=button(URL('update_languages/'+app), T('update all languages'))}}
|
||||
</div>
|
||||
{{if not languages:}}<p><strong>{{=T("There are no translators, only default language is supported")}}</strong></p>{{pass}}
|
||||
<table>
|
||||
{{for lang in sorted(languages):
|
||||
file = lang+'.py'
|
||||
id = "languages__"+file.replace('.','__')}}
|
||||
<tr id="{{=id}}">
|
||||
<td>
|
||||
<span class="filetools controls">
|
||||
{{=editlanguagefile('languages',file)}}
|
||||
{{=deletefile([app, 'languages', file], dict(id=id, id2='languages'))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('languages',file, dict(id=id))}}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
(
|
||||
{{=T("Plural-Forms:")}}
|
||||
{{p=languages[lang][3:7]}}
|
||||
{{if p[2] == 'default':}}
|
||||
<span class='error'>{{=T("rules are not defined")}}</span> {{=T.M("(file **gluon/contrib/plural_rules/%s.py** is not found)",lang[:2])}}
|
||||
{{else:}}
|
||||
{{if p[3] == 1:}}
|
||||
{{=B(T("are not used"))}}
|
||||
{{else:}}
|
||||
{{pfile=p[0]}}
|
||||
{{if p[1]!=0:}}
|
||||
<span class="filetools controls">
|
||||
{{=editpluralsfile('languages',pfile,dict(nplurals=p[3]))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('languages',pfile,dict(id=id))}}
|
||||
</span>
|
||||
{{else:}}
|
||||
<b>{{=T("are not used yet")}}</b>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</table>
|
||||
{{pass}}
|
||||
<div class="controls formfield">{{=file_create_form('%s/languages/' % app, 'languages')}}{{=T('(something like "it-it")')}}</div>
|
||||
{{if not languages:}}<p><strong>{{=T("There are no translators, only default language is supported")}}</strong></p>{{else:}}
|
||||
<div class="controls comptools">
|
||||
{{=button(URL('update_languages/'+app), T('update all languages'))}}
|
||||
</div>
|
||||
<ul class="unstyled act_edit">
|
||||
{{for lang in sorted(languages):
|
||||
file = lang+'.py'
|
||||
id = "languages__"+file.replace('.','__')}}
|
||||
<li id="{{='_'+id}}" rel="pagebookmark" class="li-row"><span id="{{=id}}" class="hashstick"> </span>
|
||||
<span class="li-controls">
|
||||
<span class="filetools controls">
|
||||
{{=editlanguagefile('languages',file)}}
|
||||
{{=deletefile([app, 'languages', file], dict(id=id, id2='languages'))}}
|
||||
</span>
|
||||
<span class="">
|
||||
{{=peekfile('languages',file, dict(id=id))}}
|
||||
</span>
|
||||
</span> <!-- /li-row -->
|
||||
<span class="extras celled">
|
||||
(
|
||||
{{=T("Plural-Forms:")}}
|
||||
{{p=languages[lang][3:7]}}
|
||||
{{if p[2] == 'default':}}
|
||||
<span class='error text-error'>{{=T("rules are not defined")}}</span> {{=T.M("(file **gluon/contrib/plural_rules/%s.py** is not found)",lang[:2])}}
|
||||
{{else:}}
|
||||
{{if p[3] == 1:}}
|
||||
{{=B(T("are not used"))}}
|
||||
{{else:}}
|
||||
{{pfile=p[0]}}
|
||||
{{if p[1]!=0:}}<span style="display:inline-block;margin-top:-10px;">
|
||||
<span class="filetools controls">
|
||||
{{=editpluralsfile('languages',pfile,dict(nplurals=p[3]))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('languages',pfile,dict(id=id))}}
|
||||
</span></span>
|
||||
{{else:}}
|
||||
<b>{{=T("are not used yet")}}</b>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
)
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
<div class="controls formfield">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">{{=file_create_form('%s/languages/' % app, 'languages', T('(something like "it-it")'))}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- STATIC -->
|
||||
|
||||
<h3 id="static" onclick="collapse('static_inner');" class="component">
|
||||
{{=T("Static files")}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T("These files are served without processing, your images go here")}}</span></span>
|
||||
<h3 id="_static" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('static_inner');">{{=T("Static")}}</span>
|
||||
<a href="#static" rel="tooltip" data-placement="right" data-original-title="{{=T('These files are served without processing, your images go here')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("These files are served without processing, your images go here")}}</span>
|
||||
</a><span id="static" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="static_inner" class="component_contents">
|
||||
<div class="controls comptools">
|
||||
</div>
|
||||
{{if not statics:}}<p><strong>{{=T("There are no static files")}}</strong></p>{{pass}}
|
||||
<ul>
|
||||
{{
|
||||
path=[]
|
||||
for file in statics+['']:
|
||||
items=file.split('/')
|
||||
file_path=items[:-1]
|
||||
filename=items[-1]
|
||||
while path!=file_path:
|
||||
if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
|
||||
path.append(file_path[len(path)])
|
||||
thispath='static__'+'__'.join(path)
|
||||
}}
|
||||
<li class="folder">
|
||||
<a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
|
||||
<ul id="{{=thispath}}" style="display: none;" class="sublist">{{
|
||||
else:
|
||||
path = path[:-1]
|
||||
}}
|
||||
</ul></li>
|
||||
{{
|
||||
pass
|
||||
pass
|
||||
if filename:
|
||||
}}<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('static',file, dict(id="static"))}} {{=deletefile([app,'static',file], dict(id="static",id2="static"))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
<a href="{{=URL(a=app,c='static',f=file)}}">{{=filename}}</a>
|
||||
</span>
|
||||
</li>{{
|
||||
pass
|
||||
pass
|
||||
}}
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">{{=file_create_form('%s/static/' % app, 'static')}}
|
||||
{{=file_upload_form('%s/static/' % app, 'static')}}</div>
|
||||
{{if not statics:}}<p><strong>{{=T("There are no static files")}}</strong></p>{{else:}}
|
||||
<ul class="unstyled act_edit">
|
||||
{{
|
||||
path=[]
|
||||
for file in statics+['']:
|
||||
items=file.split('/')
|
||||
file_path=items[:-1]
|
||||
filename=items[-1]
|
||||
while path!=file_path:
|
||||
if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
|
||||
path.append(file_path[len(path)])
|
||||
thispath='static__'+'__'.join(path)
|
||||
}}
|
||||
<li class="folder"><i> </i>
|
||||
<a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
|
||||
<ul id="{{=thispath}}" style="display: none;" class="sublist">{{
|
||||
else:
|
||||
path = path[:-1]
|
||||
}}
|
||||
</ul></li>
|
||||
{{
|
||||
pass
|
||||
pass
|
||||
if filename:
|
||||
}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('static',file, dict(id="static"))}} {{=deletefile([app,'static',file], dict(id="static",id2="static"))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
<a href="{{=URL(a=app,c='static',f=file)}}">{{=filename}}</a>
|
||||
</span>
|
||||
</li>{{
|
||||
pass
|
||||
pass
|
||||
}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
<div class="controls formfield">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">{{=file_create_form('%s/static/' % app, 'static')}}<em>{{=T('or alternatively')}}</em></div>
|
||||
<div class="span3">{{=file_upload_form('%s/static/' % app, 'static')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- MODULES -->
|
||||
|
||||
<h3 id="modules" onclick="collapse('modules_inner');" class="component">
|
||||
{{=T("Modules")}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T("Additional code for your application")}}</span></span>
|
||||
<h3 id="_modules" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('modules_inner');">{{=T("Modules")}}</span>
|
||||
<a href="#modules" rel="tooltip" data-placement="right" data-original-title="{{=T('Additional code for your application')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("Additional code for your application")}}</span>
|
||||
</a><span id="modules" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="modules_inner" class="component_contents">
|
||||
<div class="controls comptools">
|
||||
</div>
|
||||
{{if not modules:}}<p><strong>{{=T("There are no modules")}}</strong></p>{{pass}}
|
||||
<ul>
|
||||
{{for m in modules:}}
|
||||
{{id="modules__"+m.replace('/','__').replace('.','__')}}
|
||||
<li id="{{=id}}">
|
||||
<span class="filetols controls">
|
||||
{{=editfile('modules',m,dict(id=id))}}
|
||||
{{if m!='__init__.py':}}
|
||||
{{=deletefile([app, 'modules', m], dict(id=id, id2='modules'))}}
|
||||
{{pass}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('modules',m, dict(id=id))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">{{=file_create_form('%s/modules/' % app, 'modules')}}
|
||||
{{=file_upload_form('%s/modules/' % app, 'modules')}}</div>
|
||||
{{if not modules:}}<p><strong>{{=T("There are no modules")}}</strong></p>{{else:}}
|
||||
<ul class="unstyled act_edit">
|
||||
{{for m in modules:}}
|
||||
{{id="modules__"+m.replace('/','__').replace('.','__')}}
|
||||
<li id="{{='_'+id}}" rel="pagebookmark"><span id="{{=id}}" class="hashstick"> </span>
|
||||
<span class="filetols controls">
|
||||
{{=editfile('modules',m,dict(id=id))}}
|
||||
{{if m!='__init__.py':}}
|
||||
{{=deletefile([app, 'modules', m], dict(id=id, id2='modules'))}}
|
||||
{{pass}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('modules',m, dict(id=id))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
<div class="controls formfield">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">{{=file_create_form('%s/modules/' % app, 'modules')}}<em>{{=T('or alternatively')}}</em></div>
|
||||
<div class="span3">{{=file_upload_form('%s/modules/' % app, 'modules')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PRIVATE -->
|
||||
|
||||
<h3 id="private" onclick="collapse('private_inner');" class="component">
|
||||
{{=T("Private files")}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T("These files are not served, they are only available from within your app")}}</span></span>
|
||||
<h3 id="_private" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('private_inner');">{{=T("Private files")}}</span>
|
||||
<a href="#private" rel="tooltip" data-placement="right" data-original-title="{{=T('These files are not served, they are only available from within your app')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("These files are not served, they are only available from within your app")}}</span>
|
||||
</a><span id="private" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="private_inner" class="component_contents">
|
||||
<div class="controls comptools">
|
||||
</div>
|
||||
{{if not privates:}}<p><strong>{{=T("There are no private files")}}</strong></p>{{pass}}
|
||||
<ul>
|
||||
{{
|
||||
path=[]
|
||||
for file in privates+['']:
|
||||
items=file.split('/')
|
||||
file_path=items[:-1]
|
||||
filename=items[-1]
|
||||
while path!=file_path:
|
||||
if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
|
||||
path.append(file_path[len(path)])
|
||||
thispath='private__'+'__'.join(path)
|
||||
}}
|
||||
<li class="folder">
|
||||
<a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
|
||||
<ul id="{{=thispath}}" style="display: none;" class="sublist">{{
|
||||
else:
|
||||
path = path[:-1]
|
||||
}}
|
||||
</ul></li>
|
||||
{{
|
||||
pass
|
||||
pass
|
||||
if filename:
|
||||
}}<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('private',file, dict(id="private"))}} {{=deletefile([app,'private',file], dict(id="private",id2="private"))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('private',file, dict(id="private"))}}
|
||||
</span>
|
||||
</li>{{
|
||||
pass
|
||||
pass
|
||||
}}
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">{{=file_create_form('%s/private/' % app, 'private')}}
|
||||
{{=file_upload_form('%s/private/' % app, 'private')}}</div>
|
||||
{{if not privates:}}<p><strong>{{=T("There are no private files")}}</strong></p>{{else:}}
|
||||
<ul class="unstyled act_edit">
|
||||
{{
|
||||
path=[]
|
||||
for file in privates+['']:
|
||||
items=file.split('/')
|
||||
file_path=items[:-1]
|
||||
filename=items[-1]
|
||||
while path!=file_path:
|
||||
if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
|
||||
path.append(file_path[len(path)])
|
||||
thispath='private__'+'__'.join(path)
|
||||
}}
|
||||
<li class="folder">
|
||||
<a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
|
||||
<ul id="{{=thispath}}" style="display: none;" class="sublist">{{
|
||||
else:
|
||||
path = path[:-1]
|
||||
}}
|
||||
</ul>
|
||||
</li>
|
||||
{{
|
||||
pass
|
||||
pass
|
||||
if filename:
|
||||
}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('private',file, dict(id="private"))}} {{=deletefile([app,'private',file], dict(id="private",id2="private"))}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('private',file, dict(id="private"))}}
|
||||
</span>
|
||||
</li>{{
|
||||
pass
|
||||
pass
|
||||
}}
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">{{=file_create_form('%s/private/' % app, 'private')}}<em>{{=T('or alternatively')}}</em></div>
|
||||
<div class="span3">{{=file_upload_form('%s/private/' % app, 'private')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- PLUGINS -->
|
||||
|
||||
<h3 id="plugins" onclick="collapse('plugins_inner');" class="component">
|
||||
{{=T("Plugins")}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T("To create a plugin, name a file/folder plugin_[name]")}}</span></span>
|
||||
<h3 id="_plugins" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('plugins_inner');">{{=T("Plugins")}}</span>
|
||||
<a href="#plugins" rel="tooltip" data-placement="right" data-original-title="{{=T('To create a plugin, name a file/folder plugin_[name]')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("To create a plugin, name a file/folder plugin_[name]")}}</span>
|
||||
</a><span id="plugins" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="plugins_inner" class="component_contents">
|
||||
<div class="controls comptools">
|
||||
{{=button(PLUGINS_APP, T('download plugins'))}}
|
||||
</div>
|
||||
<div class="controls">
|
||||
</div>
|
||||
{{if plugins:}}
|
||||
<ul>
|
||||
{{for plugin in plugins:}}
|
||||
{{id="plugins__"+plugin.replace('/','__').replace('.','__')}}
|
||||
<li id="{{=id}}">
|
||||
{{=A('plugin_%s' % plugin, _class='file', _href=URL('plugin', args=[app, plugin], vars=dict(id=id, id2='plugins')))}}
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{else:}}
|
||||
<p><strong>{{=T('There are no plugins')}}</strong></p>
|
||||
{{pass}}
|
||||
<div class="controls formfield">{{=upload_plugin_form(app, 'plugins')}}</div>
|
||||
<div class="controls comptools">
|
||||
{{=button(PLUGINS_APP, T('download plugins'))}}
|
||||
</div>
|
||||
{{if plugins:}}
|
||||
<ul class="unstyled act_edit">
|
||||
{{for plugin in plugins:}}
|
||||
{{id="plugins__"+plugin.replace('/','__').replace('.','__')}}
|
||||
<li id="{{=id}}">
|
||||
{{=A('plugin_%s' % plugin, _class='file', _href=URL('plugin', args=[app, plugin], vars=dict(id=id, id2='plugins')))}}
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{else:}}
|
||||
<p><strong>{{=T('There are no plugins')}}</strong></p>
|
||||
{{pass}}
|
||||
<div class="controls formfield">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">{{=upload_plugin_form(app, 'plugins')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function filter_files() {
|
||||
if(jQuery('#search').val()){
|
||||
@@ -417,4 +481,4 @@ jQuery(document).ready(function(){
|
||||
jQuery('#search_start').click(function(e){ filter_files(); });
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- end "design" block -->
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
<!-- begin "edit" block -->
|
||||
{{
|
||||
def shortcut(combo, description):
|
||||
return XML('<li><tt>%s</tt> %s</li>' % (combo, description))
|
||||
return XML('<li><span class="teletype-text">%s</span><span>%s</span></li>' % (combo, description))
|
||||
}}
|
||||
{{if TEXT_EDITOR == 'amy':}}
|
||||
{{include 'default/amy_ajax.html'}}
|
||||
@@ -88,7 +88,7 @@ jQuery(document).ready(function(){
|
||||
<h2>{{=T('Editing file "%s"',filename)}}</h2>
|
||||
|
||||
{{if functions:}}
|
||||
<p class="formfield">
|
||||
<p class="formfield well well-small">
|
||||
<span style="text-align:left;" id="exposed">
|
||||
{{=B(T('exposes:'))}} {{=XML(', '.join([A(f,_href=URL(a=app,c=controller,f=f)).xml() for f in functions]))}}
|
||||
</span>
|
||||
@@ -98,15 +98,15 @@ jQuery(document).ready(function(){
|
||||
{{pass}}
|
||||
</p>
|
||||
{{pass}}
|
||||
|
||||
<p class="right controls">
|
||||
<div class='row-fluid'>
|
||||
<p class="right controls pull-right">
|
||||
{{if filetype=='python':}}
|
||||
{{=A(SPAN(T('toggle breakpoint')),
|
||||
_value="breakpoint", _name="breakpoint",
|
||||
_onclick="return doToggleBreakpoint('%s','%s://%s%s');" % (filename,
|
||||
request.env['wsgi_url_scheme'], request.env['http_host'],
|
||||
URL(c='debug', f='toggle_breakpoint')),
|
||||
_class="button special")}}
|
||||
_class="button special btn btn-inverse")}}
|
||||
{{pass}}
|
||||
{{=button(URL('design',args=request.vars.app if request.vars.app else request.args[0], anchor=request.vars.id), T('back'))}}
|
||||
{{if edit_controller:}}
|
||||
@@ -116,20 +116,31 @@ jQuery(document).ready(function(){
|
||||
{{=button(view_link, T('try view'))}}
|
||||
{{pass}}
|
||||
{{if request.args[1]=='models':}}
|
||||
<a class="button" href="http://www.web2py.com/sqldesigner" target="_blank"><span>{{=T('online designer')}}</span></a>
|
||||
<a class="button btn" href="http://www.web2py.com/sqldesigner" target="_blank"><span>{{=T('online designer')}}</span></a>
|
||||
{{pass}}
|
||||
<a class="button" href="http://www.web2py.com/examples/static/epydoc/index.html" target="_blank"><span>{{=T('docs')}}</span></a>
|
||||
<a class="button btn" href="http://www.web2py.com/examples/static/epydoc/index.html" target="_blank"><span>{{=T('docs')}}</span></a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div id="editor_area">
|
||||
<form action="{{=URL('edit',args=filename)}}" method="post" name="editform" id="editform">
|
||||
<a value="save" name="save" onclick="return doClickSave();" class="icon saveicon">
|
||||
{{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
|
||||
</a>
|
||||
{{=T('Saved file hash:')}}
|
||||
<input type="input" name="file_hash" value="{{=file_hash}}" readonly="readonly"/>
|
||||
{{=T('Last saved on:')}} <input type="input" name="saved_on" value="{{=saved_on}}" readonly="readonly"/>
|
||||
<br><hr>
|
||||
<div class="editor-bar-column">
|
||||
<label>{{=T('Save file:')}}</label>
|
||||
<a value="save" name="save" onclick="return doClickSave();" class="icon saveicon btn btn-mini" style="background-image: -webkit-linear-gradient(top,white,#E6E6E6);">
|
||||
{{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="editor-bar-column">
|
||||
<div class="row-fluid">
|
||||
<div class="span7">
|
||||
<label>{{=T('Saved file hash:')}}</label>
|
||||
<input type="input" name="file_hash" value="{{=file_hash}}" class="input-long uneditable-input" readonly="readonly"/>
|
||||
</div>
|
||||
<div class="span5">
|
||||
<label>{{=T('Last saved on:')}}</label>
|
||||
<input type="input" name="saved_on" value="{{=saved_on}}" class="input-normal uneditable-input" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if TEXT_EDITOR == 'amy':}}
|
||||
<textarea style="width: auto; height:400px;direction:ltr;" rows="58" cols="100" -amy-enabled="true" id="body" name="data">{{=data}}</textarea>
|
||||
<script>window.eamy = eamy;</script>
|
||||
@@ -227,52 +238,59 @@ window.onload = function() {
|
||||
<textarea cols="80" rows="25" id="body" style="direction:ltr;" name="data">{{=data}}</textarea>
|
||||
<script>window.textarea = area.textarea;</script>
|
||||
{{pass}}
|
||||
<button class="editbutton" onclick="window.location.reload(); return false">{{=T('restore')}}</button> {{=T('currently saved or')}} <button class="editbutton" type="submit" name="revert">{{=T('revert')}}</button>
|
||||
{{=T('to previous version.')}}
|
||||
<div class="editor-bar-bottom" style="margin-top:9px;">
|
||||
<button class="editbutton btn" onclick="window.location.reload(); return false">{{=T('restore')}}</button>
|
||||
{{=T('currently saved or')}}
|
||||
<button class="editbutton btn" type="submit" name="revert">{{=T('revert')}}</button>
|
||||
{{=T('to previous version.')}}
|
||||
</div>
|
||||
<br/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="help">
|
||||
{{if TEXT_EDITOR=='edit_area' and filetype=='html':}}
|
||||
<h3>{{=T('Key bindings for ZenCoding Plugin')}}</h3>
|
||||
<ul>
|
||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||
{{=shortcut('Ctrl+,', T('Expand Abbreviation'))}}
|
||||
{{=shortcut('Ctrl+M', T('Match Pair'))}}
|
||||
{{=shortcut('Ctrl+H', T('Wrap with Abbreviation'))}}
|
||||
{{=shortcut('Shift+Ctrl+M', T('Merge Lines'))}}
|
||||
{{=shortcut('Ctrl+Shift+←', T('Previous Edit Point'))}}
|
||||
{{=shortcut('Ctrl+Shift+→', T('Next Edit Point'))}}
|
||||
{{=shortcut('Ctrl+Shift+↑', T('Go to Matching Pair'))}}
|
||||
</ul>
|
||||
{{elif TEXT_EDITOR == 'codemirror' and filetype=='html':}}
|
||||
<h3>{{=T('Key bindings for ZenCoding Plugin')}}</h3>
|
||||
<ul>
|
||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||
{{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}}
|
||||
{{=shortcut('Ctrl-F / Cmd-F', T('Start searching'))}}
|
||||
{{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}}
|
||||
{{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}}
|
||||
{{=shortcut('Shift-Ctrl-F / Cmd-Option-F', T('Replace'))}}
|
||||
{{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}}
|
||||
{{=shortcut('Tab', T('Expand Abbreviation'))}}
|
||||
</ul>
|
||||
{{elif TEXT_EDITOR == 'codemirror':}}
|
||||
<h3>{{=T("Key bindings")}}</h3>
|
||||
<ul>
|
||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||
{{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}}
|
||||
{{=shortcut('Ctrl-F / Cmd-F', T('Start searching'))}}
|
||||
{{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}}
|
||||
{{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}}
|
||||
{{=shortcut('Shift-Ctrl-F / Cmd-Option-F', T('Replace'))}}
|
||||
{{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}}
|
||||
</ul>
|
||||
{{else:}}
|
||||
<h3>{{=T("Key bindings")}}</h3>
|
||||
<ul>
|
||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
<div class="row-fluid">
|
||||
<div class="help span4 alert alert-block alert-info">
|
||||
{{if TEXT_EDITOR=='edit_area' and filetype=='html':}}
|
||||
<h3>{{=T('Key bindings for ZenCoding Plugin')}}</h3>
|
||||
<ul class="keybindings unstyled">
|
||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||
{{=shortcut('Ctrl+,', T('Expand Abbreviation'))}}
|
||||
{{=shortcut('Ctrl+M', T('Match Pair'))}}
|
||||
{{=shortcut('Ctrl+H', T('Wrap with Abbreviation'))}}
|
||||
{{=shortcut('Shift+Ctrl+M', T('Merge Lines'))}}
|
||||
{{=shortcut('Ctrl+Shift+←', T('Previous Edit Point'))}}
|
||||
{{=shortcut('Ctrl+Shift+→', T('Next Edit Point'))}}
|
||||
{{=shortcut('Ctrl+Shift+↑', T('Go to Matching Pair'))}}
|
||||
</ul>
|
||||
{{elif TEXT_EDITOR == 'codemirror' and filetype=='html':}}
|
||||
<h3>{{=T('Key bindings for ZenCoding Plugin')}}</h3>
|
||||
<ul class="keybindings unstyled">
|
||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||
{{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}}
|
||||
{{=shortcut('Ctrl-F / Cmd-F', T('Start searching'))}}
|
||||
{{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}}
|
||||
{{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}}
|
||||
{{=shortcut('Shift-Ctrl-F / Cmd-Option-F', T('Replace'))}}
|
||||
{{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}}
|
||||
{{=shortcut('Tab', T('Expand Abbreviation'))}}
|
||||
</ul>
|
||||
{{elif TEXT_EDITOR == 'codemirror':}}
|
||||
<h3>{{=T("Key bindings")}}</h3>
|
||||
<ul class="keybindings unstyled">
|
||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||
{{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}}
|
||||
{{=shortcut('Ctrl-F / Cmd-F', T('Start searching'))}}
|
||||
{{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}}
|
||||
{{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}}
|
||||
{{=shortcut('Shift-Ctrl-F / Cmd-Option-F', T('Replace'))}}
|
||||
{{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}}
|
||||
</ul>
|
||||
{{else:}}
|
||||
<h3>{{=T("Key bindings")}}</h3>
|
||||
<ul class="keybindings unstyled">
|
||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- end "edit" block -->
|
||||
@@ -7,18 +7,19 @@ function delkey(id) {
|
||||
return false;
|
||||
}
|
||||
function hideShowTranslated(){
|
||||
jQuery(".translated").closest("p").toggle();
|
||||
jQuery(".translated").closest("div.row-fluid").toggle();
|
||||
}
|
||||
</script>
|
||||
|
||||
{{block sectionclass}}edit_language{{end}}
|
||||
|
||||
<!-- begin "edit_language" block -->
|
||||
<h2>{{=T('Editing Language file')}} "{{=filename}}"</h2>
|
||||
<a class="button" href="#" onclick="hideShowTranslated(this);">
|
||||
<div class="controls">
|
||||
<a class="button btn" href="#" onclick="hideShowTranslated(this);">
|
||||
<span>{{=T('Hide/Show Translated strings')}}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="languageform">
|
||||
{{=form}}
|
||||
</div>
|
||||
|
||||
|
||||
<!-- end "edit_language" block -->
|
||||
@@ -6,11 +6,10 @@ function delkey(id) {
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
{{block sectionclass}}edit_language{{end}}
|
||||
|
||||
<!-- begin "edit_language(plurals)" block -->
|
||||
<h2>{{=T("Editing Plural Forms File")}} "{{=filename}}"</h2>
|
||||
<div class="pluralsform">
|
||||
{{=form}}
|
||||
</div>
|
||||
|
||||
<!-- end "edit_language(plurals)" block -->
|
||||
@@ -1,142 +1,124 @@
|
||||
{{extend 'layout.html'}}
|
||||
{{import os, stat, time}}
|
||||
|
||||
{{block sectionclass}}errors{{end}}
|
||||
|
||||
<style>
|
||||
table.sortable {
|
||||
border-spacing:0px;
|
||||
}
|
||||
table.sortable td, table.sortable th {
|
||||
padding: 2px 5px 2px 5px;
|
||||
}
|
||||
table.sortable thead {
|
||||
background-color:#eee;
|
||||
color:#666666;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
tr.error_ticket:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
.controls a.button.unavailable {
|
||||
color: #ff0000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script language="JavaScript">
|
||||
function check(){
|
||||
for (var i = 0; i < document.myform.elements.length; i++) {
|
||||
var e = document.myform.elements[i];
|
||||
if (e.type == 'checkbox') e.checked = true;
|
||||
}
|
||||
}
|
||||
function uncheck(){
|
||||
for (var i = 0; i < document.myform.elements.length; i++) {
|
||||
var e = document.myform.elements[i];
|
||||
if (e.type == 'checkbox') e.checked = false;
|
||||
}
|
||||
}
|
||||
jQuery(document).ready(function() { jQuery('.traceback').hide(); });
|
||||
</script>
|
||||
<!-- begin "errors" block -->
|
||||
{{if db_ready['status'] == False:
|
||||
switchbutton = A(SPAN("switch to : db"), _href=db_ready['errlink'], _class="button unavailable", _title="%s" % (db_ready['errmessage']))
|
||||
switchbutton = A(SPAN("switch to : db"), _href=db_ready['errlink'], _class="button unavailable btn btn-danger", _title="%s" % (db_ready['errmessage']))
|
||||
else:
|
||||
switchbutton = A(SPAN("switch to : db"), _href=URL(args=[app, 'dbnew']), _class="button")
|
||||
switchbutton = A(SPAN("switch to : db"), _href=URL(args=[app, 'dbnew']), _class="button btn")
|
||||
pass}}
|
||||
|
||||
<h2>{{=T('Error logs for "%(app)s"',dict(app=app))}}</h2>
|
||||
|
||||
<div class="errorform">
|
||||
<form name="myform" method="post">
|
||||
<input name="CheckAll" value="{{=T('check all')}}"
|
||||
onclick="check()" type="button">
|
||||
<input name="CheckAll" value="{{=T('uncheck all')}}"
|
||||
onclick="uncheck()" type="button">
|
||||
<input value="{{=T('delete all checked')}}" type="submit"><br><br>
|
||||
|
||||
{{ if 'new' in method: }}
|
||||
{{base_url = 'db' in method and 'ticketdb' or 'ticket' }}
|
||||
<h3>{{=T('Click row to expand traceback')}}</h3>
|
||||
<p class="controls">
|
||||
{{if 'db' in method:}}
|
||||
source : db
|
||||
<a class="button" href="{{=URL(args=[app, 'new'])}}"><span>switch to : filesystem</span></a>
|
||||
<a class="button" href="{{=URL(args=[app, 'dbold'])}}"><span>lists by ticket</span></a>
|
||||
{{else:}}
|
||||
source : filesystem
|
||||
{{=switchbutton}}
|
||||
<a class="button" href="{{=URL(args=[app, 'old'])}}"><span>lists by ticket</span></a>
|
||||
{{pass}}
|
||||
</p>
|
||||
<table id="trck_errors" class="sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{=T("Delete")}}</th>
|
||||
<th>{{=T("Count")}}</th>
|
||||
<th>{{=T("File")}}</th>
|
||||
<th>{{=T("Error")}}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{for e in errors:}}
|
||||
<tr class="error_ticket">
|
||||
<td><input type="checkbox" name="delete_{{=e['hash']}}" /></td>
|
||||
<td>{{=e['count']}}</td>
|
||||
<td>{{=e['causer']}}</td>
|
||||
<td>{{=A(e['last_line'],_href="#",_onclick="collapse('%s');"%e['hash'])}}</td>
|
||||
<td>+</td>
|
||||
<td>{{=A(T('details'),_href=URL(base_url,args=[app,e['ticket']]))}}</td>
|
||||
</tr>
|
||||
<tr id="{{=e['hash']}}" class="traceback">
|
||||
<td colspan="6">
|
||||
<div>
|
||||
{{=CODE(e['pickel']['traceback'])}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ else: }}
|
||||
<h3>{{=T('Click row to view a ticket')}}</h3>
|
||||
<p class="controls">
|
||||
{{if 'db' in method:}}
|
||||
source : db
|
||||
<a class="button" href="{{=URL(args=[app, 'old'])}}"><span>switch to : filesystem</span></a>
|
||||
<a class="button" href="{{=URL(args=[app, 'dbnew'])}}"><span>lists by exception</span></a>
|
||||
{{else:}}
|
||||
source : filesystem
|
||||
{{=switchbutton}}
|
||||
<a class="button" href="{{=URL(args=[app, 'new'])}}"><span>lists by exception</span></a>
|
||||
{{pass}}
|
||||
</p>
|
||||
<table class="sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{=T("Delete")}}</th>
|
||||
<th>{{=T("Ticket")}}</th>
|
||||
<th>{{=T("Date and Time")}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{for ticket in tickets:}}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="delete_{{=ticket}}"/></td>
|
||||
{{if 'db' in method:}}
|
||||
<td><a href="{{=URL('ticketdb',args=[app,ticket])}}">{{=ticket}}</a></td>
|
||||
<td>{{=time.strftime('%Y-%m-%d %H:%M:%S',times[ticket].timetuple())}}</td>
|
||||
{{else:}}
|
||||
<td><a href="{{=URL('ticket',args=[app,ticket])}}">{{=ticket}}</a></td>
|
||||
<td>{{=time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(os.stat(os.path.join(request.folder,'../%s/errors/%s' % (app,ticket)))[stat.ST_CTIME]))}}</td>
|
||||
{{pass}}
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ pass }}
|
||||
</form>
|
||||
<form name="myform" method="post">
|
||||
{{ if 'new' in method: }}
|
||||
{{base_url = 'db' in method and 'ticketdb' or 'ticket' }}
|
||||
<p class="controls row-fluid">
|
||||
<div class="controls controls-row">
|
||||
{{if 'db' in method:}}
|
||||
<span class="uneditable-input">source : db</span>
|
||||
<a class="button btn" href="{{=URL(args=[app, 'new'])}}"><span>switch to : filesystem</span></a>
|
||||
<a class="button btn" href="{{=URL(args=[app, 'dbold'])}}"><span>lists by ticket</span></a>
|
||||
{{else:}}
|
||||
<span class="uneditable-input">source : filesystem</span>
|
||||
{{=switchbutton}}
|
||||
<a class="button btn" href="{{=URL(args=[app, 'old'])}}"><span>lists by ticket</span></a>
|
||||
{{pass}}
|
||||
</div>
|
||||
</p>
|
||||
<div class="tablebar">
|
||||
<input value="{{=T('delete all checked')}}" type="submit" class="btn"/>
|
||||
<span class="help label label-info">{{=T('Click row to expand traceback')}}</span>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<table id="trck_errors" class="sortable table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="column1 cbcentered"><input type="checkbox" name="delete_all}" /></th>
|
||||
<th class="column2">{{=T("Count")}}</th>
|
||||
<th class="column3">{{=T("File")}}</th>
|
||||
<th>{{=T("Error")}}</th>
|
||||
<th class="columnN"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{for e in errors:}}
|
||||
<tr class="error_ticket">
|
||||
<td class="cbcentered"><input type="checkbox" name="delete_{{=e['hash']}}" /></td>
|
||||
<td>{{=e['count']}}</td>
|
||||
<td>{{=e['causer']}}</td>
|
||||
<td>{{=A(e['last_line'],_href="#",_onclick="collapse('%s');return false;"%e['hash'])}}</td>
|
||||
<td>+ {{=A(T('details'),_href=URL(base_url,args=[app,e['ticket']]))}}</td>
|
||||
</tr>
|
||||
<tr id="{{=e['hash']}}" class="traceback">
|
||||
<td colspan="5">
|
||||
<div class="ticket_code">
|
||||
{{=CODE(e['pickel']['traceback'])}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ else: }}
|
||||
<p class="controls row-fluid">
|
||||
<div class="controls controls-row">
|
||||
{{if 'db' in method:}}
|
||||
<span class="uneditable-input">source : db</span>
|
||||
<a class="button btn" href="{{=URL(args=[app, 'old'])}}"><span>switch to : filesystem</span></a>
|
||||
<a class="button btn" href="{{=URL(args=[app, 'dbnew'])}}"><span>lists by exception</span></a>
|
||||
{{else:}}
|
||||
<span class="uneditable-input">source : filesystem</span>
|
||||
{{=switchbutton}}
|
||||
<a class="button btn" href="{{=URL(args=[app, 'new'])}}"><span>lists by exception</span></a>
|
||||
{{pass}}
|
||||
</div>
|
||||
</p>
|
||||
<div class="tablebar">
|
||||
<input value="{{=T('delete all checked')}}" type="submit" class="btn"/>
|
||||
<span class="help label label-info">{{=T('Click row to expand traceback')}}</span>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<table id="trck_errors" class="sortable table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="column1 cbcentered"><input type="checkbox" name="delete_all}" /></th>
|
||||
<th>{{=T("Ticket")}}</th>
|
||||
<th class="columnN1">{{=T("Date and Time")}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{for ticket in tickets:}}
|
||||
<tr>
|
||||
<td class="cbcentered"><input type="checkbox" name="delete_{{=ticket}}"/></td>
|
||||
{{if 'db' in method:}}
|
||||
<td><a href="{{=URL('ticketdb',args=[app,ticket])}}">{{=ticket}}</a></td>
|
||||
<td>{{=time.strftime('%Y-%m-%d %H:%M:%S',times[ticket].timetuple())}}</td>
|
||||
{{else:}}
|
||||
<td><a href="{{=URL('ticket',args=[app,ticket])}}">{{=ticket}}</a></td>
|
||||
<td>{{=time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(os.stat(os.path.join(request.folder,'../%s/errors/%s' % (app,ticket)))[stat.ST_CTIME]))}}</td>
|
||||
{{pass}}
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ pass }}
|
||||
</form><!-- /errorform -->
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('.traceback').hide();
|
||||
jQuery("#trck_errors thead tr th:first input[type=checkbox]").click(function() {
|
||||
var checkedStatus = this.checked;
|
||||
jQuery("#trck_errors tbody tr td:first-child input[type=checkbox]").each(function() {
|
||||
this.checked = checkedStatus;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- end "errors" block -->
|
||||
@@ -1,5 +1,15 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{
|
||||
dlg = dialog
|
||||
smt_button = dlg.element(_type="submit")
|
||||
smt_button['_class'] = 'btn'
|
||||
smt_button['_style'] = 'margin-right:4px;'
|
||||
ccl_button = dlg.element(_type="button")
|
||||
ccl_button['_class'] = 'btn'
|
||||
}}
|
||||
<!-- begin "git_pull" block -->
|
||||
<div class="center">
|
||||
<h2>{{=T('This will pull changes from the remote repo for application "%s"?', app)}}</h2>
|
||||
{{=dialog}}
|
||||
</div>
|
||||
<!-- end "git_pull" block -->
|
||||
@@ -1,6 +1,15 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{
|
||||
frm = form
|
||||
smt_button = frm.element(_type="submit")
|
||||
smt_button['_class'] = 'btn'
|
||||
smt_button['_style'] = 'margin-right:4px;'
|
||||
ccl_button = frm.element(_type="button")
|
||||
ccl_button['_class'] = 'btn'
|
||||
}}
|
||||
<!-- begin "git_push" block -->
|
||||
<h2>{{=T('This will push changes to the remote repo for application "%s".', app)}}</h2>
|
||||
<center>
|
||||
{{=form}}
|
||||
</center>
|
||||
<!-- end "git_push" block -->
|
||||
@@ -1,26 +1,23 @@
|
||||
{{extend 'layout.html'}}
|
||||
<script type="text/javascript">
|
||||
jQuery(function() {
|
||||
jQuery("#password").focus();
|
||||
});
|
||||
</script>
|
||||
|
||||
{{block sectionclass}}login{{end}}
|
||||
|
||||
<!-- begin "index" block -->
|
||||
<h2>web2py™ {{=T('Web Framework')}}</h2>
|
||||
<h3>{{=T('Login to the Administrative Interface')}}</h3>
|
||||
<div class="form row-fluid">
|
||||
{{if request.is_https or request.is_local:}}
|
||||
<div class="form">
|
||||
<form action="{{=URL(r=request)}}" method="post">
|
||||
<div><input type="hidden" name="send" value="{{=send}}"/></div>
|
||||
<table>
|
||||
<tr><td>{{=T('Administrator Password:')}}</td><td><input type="password" name="password" id="password"/></td></tr>
|
||||
<tr><td></td><td><input type="submit" name="login" value="{{=T('Login')}}"/></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<form action="{{=URL(r=request)}}" method="post" class="span4 well">
|
||||
<label for="password">{{=T('Administrator Password:')}}</label>
|
||||
<input type="password" name="password" id="password"/>
|
||||
<input type="hidden" name="send" value="{{=send}}"/>
|
||||
<div class="controls"><button type="submit" name="login" class="btn">{{=T('Login')}}</button></div>
|
||||
</form>
|
||||
{{else:}}
|
||||
<p class="help">{{=T('ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.')}}</p>
|
||||
<p class="help span7 alert alert-block alert-warning">{{=T('ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.')}}</p>
|
||||
{{pass}}
|
||||
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
jQuery("#password").focus();
|
||||
});
|
||||
</script>
|
||||
<!-- end "index" block -->
|
||||
@@ -1,5 +1,163 @@
|
||||
{{extend 'layout.html'}}
|
||||
{{
|
||||
#grid['_class'] = 'web2py_grid'
|
||||
if not request.args:
|
||||
add_btn = grid.elements('div.web2py_console a.w2p_trap',replace=None)[0]
|
||||
add_btn['_id'] = 'w2p_grid_addbtn'
|
||||
add_btn['_class'] = 'w2p_trap btn'
|
||||
qry_pnl_rows = grid.elements('div',_class="w2p_query_row hidden")
|
||||
for qry_pnl_row in qry_pnl_rows:
|
||||
qry_pnl_btn1 = qry_pnl_row.elements('input',_value="New",replace=None)[0]
|
||||
qry_pnl_btn2 = qry_pnl_row.elements('input',_value="And",replace=None)[0]
|
||||
qry_pnl_btn3 = qry_pnl_row.elements('input',_value="Or",replace=None)[0]
|
||||
qry_pnl_btngrp = qry_pnl_row.elements('input',_value="Close",replace=lambda me:DIV(qry_pnl_btn1,qry_pnl_btn2,qry_pnl_btn3,me,_class="qry_pnl_btns"))
|
||||
pass
|
||||
qry_pnl = grid.elements('div#w2p_query_panel',replace=None)
|
||||
csl_frm = grid.elements('div.web2py_console form')[0]
|
||||
csl_frm['_class'] = 'form-inline'
|
||||
csl_frm_search = grid.elements('#web2py_keywords',replace=lambda me:DIV(me,TAG['button'](T('Search'),_class='btn',_type='submit'),TAG['button'](T('Clear'),_class='btn',_type='button',_onclick='jQuery("#web2py_keywords").val("");'),_class="input-append"))
|
||||
csl_frm_search_btn1 = grid.elements('input',_value="Search",replace=None)
|
||||
csl_frm_search_btn2 = grid.elements('input',_value="Clear",replace=None)
|
||||
new_console = grid.elements('div.web2py_console form',replace=lambda frm_csl:DIV(SPAN(add_btn,_class='span1'),SPAN(DIV(frm_csl,qry_pnl[0],_id='w2p_search-form'),_class='span5'),_class='row-fluid'))
|
||||
w2p_grid_tbl = grid.element('table')
|
||||
if w2p_grid_tbl:
|
||||
w2p_grid_tbl['_class'] = 'table table-condensed table-hover table-bordered'
|
||||
tbl_button_rows = grid.elements('td',_class="row_buttons")
|
||||
for tbl_button_row in tbl_button_rows:
|
||||
buttons = tbl_button_row.elements('a.w2p_trap')
|
||||
for button in buttons:
|
||||
button['_class'] = 'w2p_trap btn'
|
||||
pass
|
||||
pass
|
||||
export_menu = grid.element('div.w2p_export_menu')
|
||||
export_menu_links = export_menu.elements('a')
|
||||
export_menu_items = []
|
||||
for link in export_menu_links:
|
||||
item = LI(link)
|
||||
export_menu_items.append(item)
|
||||
pass
|
||||
new_export_menu = DIV(A(T('Exports:'),SPAN(_class='caret'),_href='#',_class='btn dropdown-toggle',**{'_data-toggle':"dropdown"}),UL(*export_menu_items,_class='dropdown-menu'),_class='w2p_export_menu btn-group pull-left')
|
||||
grid_pagination = grid.element('div.web2py_paginator')
|
||||
if grid_pagination:
|
||||
export_menu = grid.element('div.w2p_export_menu',replace=None)
|
||||
new_grid_pagination = grid.element('div.web2py_paginator',replace=lambda me:DIV(new_export_menu,me,_class='w2p_grid_bottom_bar'))
|
||||
grid_pagination['_class'] = 'web2py_paginator pagination pagination-right'
|
||||
grid_page_active = grid.element('li.current')
|
||||
grid_page_active['_class'] = 'current active'
|
||||
else:
|
||||
new_grid_pagination = grid.element('div.w2p_export_menu',replace=DIV(new_export_menu))
|
||||
pass
|
||||
records_counter = grid.element('div.web2py_counter')
|
||||
records_found = int(records_counter[0].partition('records')[0].strip())
|
||||
paginate = 5 # TODO: get it from the controller
|
||||
pages = records_found/paginate
|
||||
tot_pages = pages if records_found%paginate == 0 else pages+1
|
||||
current_page = int(request.vars.page) if request.vars.page else 1
|
||||
end_record = paginate*current_page if current_page < tot_pages else records_found
|
||||
begin_record = 1 if current_page == 1 else (paginate*(current_page-1))+1
|
||||
rec = "records" if records_found>1 else "record"
|
||||
record_shown_in_the_page = T("Showing %s to %s of %s %s found")%(begin_record,end_record,records_found,rec)
|
||||
new_record_counter = grid.element('div.web2py_counter',replace=DIV(record_shown_in_the_page,_class="web2py_counter span6 pull-right"))
|
||||
pass
|
||||
elif request.args(0)=='new':
|
||||
bck_btn = grid.element('div.web2py_grid span.leftarrow').parent
|
||||
bck_btn['_id'] = 'w2p_grid_bckbtn'
|
||||
bck_btn['_class'] = 'w2p_trap btn'
|
||||
frm = grid.element('div.web2py_grid form')
|
||||
frm['_class'] = 'web2py_form span4 well well-small'
|
||||
|
||||
checkbox_lbl = frm.element('label',_for='auth_user_is_manager')
|
||||
checkbox_inp = frm.element(_name='is_manager',replace=CAT())
|
||||
checkbox_lbl[0] = checkbox_inp
|
||||
checkbox_lbl[1] = 'Is Manager'
|
||||
checkbox_lbl['_class'] = "checkbox"
|
||||
|
||||
inp_smt = frm.element('input',_type='submit',replace=TAG['button'](T('Submit'),_type='submit',_class='btn'))
|
||||
|
||||
new_form_flds = []
|
||||
frm_trs = frm.elements('tr')
|
||||
for tr in frm_trs:
|
||||
label = tr[0][0]
|
||||
input = tr[1][0]
|
||||
help = tr[2][0]
|
||||
new_form_flds.append(label)
|
||||
new_form_flds.append(input)
|
||||
new_form_flds.append(help)
|
||||
pass
|
||||
new_frm_content = frm.element('table',replace=CAT(*new_form_flds))
|
||||
new_frm = grid.element('div.web2py_grid form',replace=lambda me:DIV(me,_class='row-fluid'))
|
||||
elif request.args(0)=='view':
|
||||
bck_btn = grid.element('div.web2py_grid span.leftarrow').parent
|
||||
bck_btn['_id'] = 'w2p_grid_bckbtn'
|
||||
bck_btn['_class'] = 'w2p_trap btn'
|
||||
pen_btn = grid.element('div.web2py_grid span.pen').parent
|
||||
pen_btn['_id'] = 'w2p_grid_penbtn'
|
||||
pen_btn['_class'] = 'w2p_trap btn'
|
||||
frm = grid.element('div.web2py_grid form')
|
||||
frm['_class'] = 'web2py_form span4 well well-small'
|
||||
|
||||
checkbox_lbl = frm.element('label',_for='auth_user_is_manager')
|
||||
checkbox_inp = frm.element(_name='is_manager',replace=CAT())
|
||||
checkbox_lbl[0] = checkbox_inp
|
||||
checkbox_lbl[1] = 'Is Manager'
|
||||
checkbox_lbl['_class'] = "checkbox"
|
||||
|
||||
new_form_flds = []
|
||||
frm_trs = frm.elements('tr')
|
||||
for tr in frm_trs:
|
||||
label = tr[0][0]
|
||||
input = tr[1][0]
|
||||
help = tr[2][0]
|
||||
new_form_flds.append(label)
|
||||
if len(input) > 0 :
|
||||
new_form_flds.append(SPAN(input,_class='uneditable-input'))
|
||||
pass
|
||||
new_form_flds.append(help)
|
||||
pass
|
||||
new_frm_content = frm.element('table',replace=CAT(*new_form_flds))
|
||||
new_frm = grid.element('div.web2py_grid form',replace=lambda me:DIV(me,_class='row-fluid'))
|
||||
elif request.args(0)=='edit':
|
||||
bck_btn = grid.element('div.web2py_grid span.leftarrow').parent
|
||||
bck_btn['_id'] = 'w2p_grid_bckbtn'
|
||||
bck_btn['_class'] = 'w2p_trap btn'
|
||||
viw_btn = grid.element('div.web2py_grid span.magnifier').parent
|
||||
viw_btn['_id'] = 'w2p_grid_viwbtn'
|
||||
viw_btn['_class'] = 'w2p_trap btn'
|
||||
frm = grid.element('div.web2py_grid form')
|
||||
frm['_class'] = 'web2py_form span4 well well-small'
|
||||
|
||||
checkbox_lbl = frm.element('label',_for='auth_user_is_manager')
|
||||
checkbox_inp = frm.element(_name='is_manager',replace=CAT())
|
||||
checkbox_lbl[0] = checkbox_inp
|
||||
checkbox_lbl[1] = 'Is Manager'
|
||||
checkbox_lbl['_class'] = "checkbox"
|
||||
|
||||
checkbox1_lbl = frm.element('label',_for='delete_record')
|
||||
checkbox1_inp = frm.element(_id='delete_record',replace=CAT())
|
||||
checkbox1_lbl[0] = checkbox1_inp
|
||||
checkbox1_lbl[1] = T('Check to delete')
|
||||
checkbox1_lbl['_class'] = "checkbox"
|
||||
|
||||
inp_smt = frm.element('input',_type='submit',replace=TAG['button'](T('Submit'),_type='submit',_class='btn'))
|
||||
|
||||
id_input = frm.element(_id='auth_user_id')
|
||||
id_input['_class'] = 'uneditable-input'
|
||||
|
||||
new_form_flds = []
|
||||
frm_trs = frm.elements('tr')
|
||||
for tr in frm_trs:
|
||||
label = tr[0][0]
|
||||
input = tr[1][0]
|
||||
help = tr[2][0]
|
||||
new_form_flds.append(label)
|
||||
print label
|
||||
new_form_flds.append(input)
|
||||
new_form_flds.append(help)
|
||||
pass
|
||||
new_frm_content = frm.element('table',replace=CAT(*new_form_flds))
|
||||
new_frm = grid.element('div.web2py_grid form',replace=lambda me:DIV(me,_class='row-fluid'))
|
||||
pass
|
||||
}}
|
||||
|
||||
<h1>{{=T('Manage Admin Users/Students')}}</h1>
|
||||
|
||||
{{=grid}}
|
||||
<h2>{{=T('Manage Admin Users/Students')}}</h2>
|
||||
{{=grid}}
|
||||
@@ -1,17 +1,16 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}peek{{end}}
|
||||
|
||||
<!-- begin "peek" block -->
|
||||
<h2>{{=T("Peeking at file")}} "{{=filename}}"</h2>
|
||||
|
||||
<p class="controls">
|
||||
{{=button(URL('design',args=request.vars.app if request.vars.app else request.args[0], anchor=request.vars.id), T('back'))}}
|
||||
{{=button(URL('edit',args=request.args, vars=request.vars), T('Edit'))}}
|
||||
</p>
|
||||
|
||||
<div class="code-wrapper">
|
||||
{{
|
||||
if filename[-3:]=='.py': language='python'
|
||||
else: language='html'
|
||||
}}
|
||||
{{=CODE(data,language=language,link='/examples/global/vars/')}}
|
||||
|
||||
</div>
|
||||
<!-- end "peek" block -->
|
||||
@@ -6,9 +6,15 @@ def all(items):
|
||||
def peekfile(path,file):
|
||||
return A(file.replace('\\\\','/'),_href=URL('peek', args=(app, path, file)))
|
||||
def editfile(path,file):
|
||||
return A(SPAN(T('Edit')),_class='button editbutton',_href=URL('edit', args=(app, path, file)))
|
||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit', args=(app, path, file)))
|
||||
def testfile(path,file):
|
||||
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')), SPAN(T("Run tests in this file"))), _class='icon test tooltip',_href=URL('test', args=(app, file)))
|
||||
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
||||
SPAN(T("Run tests in this file"))),
|
||||
_class='icon test',
|
||||
_href=URL('test', args=(app, file)),
|
||||
_rel="tooltip",
|
||||
**{'_data-placement':'right',
|
||||
'_data-original-title':T("Run tests in this file")})
|
||||
def editlanguagefile(path,file):
|
||||
return A(SPAN(T('Edit')),_class='button editbutton',_href=URL('edit_language', args=(app, path, file)))
|
||||
def file_upload_form(location):
|
||||
@@ -29,57 +35,62 @@ def file_create_form(location):
|
||||
INPUT(_type="submit",_value=T("submit")),_action=URL('create_file'))
|
||||
return form
|
||||
def deletefile(arglist):
|
||||
return A(TAG[''](IMG(_src=URL('static', 'images/delete_icon.png')), SPAN(T('Delete this file (you will be asked to confirm deletion)'))), _class='icon delete tooltip', _href=URL('delete',args=arglist,vars=dict(sender=request.function+'/'+app+'/'+request.args[1])))
|
||||
return A(TAG[''](IMG(_src=URL('static', 'images/delete_icon.png')),
|
||||
SPAN(T('Delete this file (you will be asked to confirm deletion)'))),
|
||||
_href=URL('delete',args=arglist,vars=dict(sender=request.function+'/'+app+'/'+request.args[1])),
|
||||
_class='icon delete',
|
||||
_rel="tooltip",
|
||||
**{'_data-placement':'right',
|
||||
'_data-original-title':T('Delete this file (you will be asked to confirm deletion)')})
|
||||
}}
|
||||
|
||||
{{block sectionclass}}plugin{{end}}
|
||||
<!-- begin "plugin" block -->
|
||||
<h2>{{=T('Plugin "%s" in application', request.args(1))}} "{{=app}}"</h2>
|
||||
|
||||
<h2>
|
||||
{{=T('Plugin "%s" in application', request.args(1))}} "{{=app}}"
|
||||
</h2>
|
||||
<!-- COLLAPSE/JUMP-TO BUTTONS -->
|
||||
<div class="right-full controls">
|
||||
<a class="button special" href="#" onclick="jQuery('h3').click();return false"><span>{{=T("collapse/expand all")}}</span></a>
|
||||
<span class="buttongroup">
|
||||
{{=button("#models", T("models"))}}
|
||||
{{=button("#controllers", T("controllers"))}}
|
||||
{{=button("#views", T("views"))}}
|
||||
{{=button("#static", T("static"))}}
|
||||
{{=button("#modules", T("modules"))}}
|
||||
</span>
|
||||
<span class="buttongroup">
|
||||
{{=sp_button(URL('design',args=request.args, anchor=request.vars.id), T("back"))}}
|
||||
{{=sp_button(URL('delete_plugin',args=request.args, vars=request.vars), T("delete plugin"))}}
|
||||
{{=sp_button(URL('pack_plugin',args=request.args), T("pack plugin"))}}
|
||||
</span>
|
||||
<p class="buttons-row">
|
||||
<a class="button special btn btn-inverse" href="#" onclick="jQuery('h3>span').click();return false"><span>{{=T("collapse/expand all")}}</span></a>
|
||||
<span class="buttongroup">
|
||||
{{=button('#models', T("models"))}}
|
||||
{{=button('#controllers', T("controllers"))}}
|
||||
{{=button('#views', T("views"))}}
|
||||
{{=button('#static', T("static"))}}
|
||||
{{=button('#modules', T("modules"))}}
|
||||
</span>
|
||||
<span class="buttongroup">
|
||||
{{=sp_button(URL('design',args=request.args, anchor=request.vars.id), T("back"))}}
|
||||
{{=sp_button(URL('delete_plugin',args=request.args, vars=request.vars), T("delete plugin"))}}
|
||||
{{=sp_button(URL('pack_plugin',args=request.args), T("pack plugin"))}}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- MODELS -->
|
||||
|
||||
<h3 id="models" onclick="collapse('models_inner');" class="component">
|
||||
{{=T("Models")}}
|
||||
<h3 id="_models" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('models_inner');">{{=T("Models")}}</span>
|
||||
<span id="models" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="models_inner" class="component_contents">
|
||||
{{if not models:}}
|
||||
<p><strong>{{=T("There are no models")}}</strong></p>
|
||||
{{pass}}
|
||||
<div class="controls comptools">
|
||||
</div>
|
||||
<ul>
|
||||
{{for m in models:}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('models',m)}}
|
||||
{{=deletefile([app, 'models', m])}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('models',m)}}
|
||||
</span>
|
||||
<span class="extras">
|
||||
{{if len(defines[m]):}}{{=T("defines tables")}} {{pass}}{{=XML(', '.join([B(table).xml() for table in defines[m]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{if not models:}}<p><strong>{{=T("There are no models")}}</strong></p>{{else:}}
|
||||
<ul class="unstyled act-edit">
|
||||
{{for m in models:}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('models',m)}}
|
||||
{{=deletefile([app, 'models', m])}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('models',m)}}
|
||||
</span>
|
||||
<span class="extras">
|
||||
{{if len(defines[m]):}}{{=T("defines tables")}} {{pass}}{{=XML(', '.join([B(table).xml() for table in defines[m]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
|
||||
<!-- FIND CONTROLLER FUNCTIONS -->
|
||||
@@ -89,131 +100,124 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
||||
}}
|
||||
|
||||
<!-- CONTROLLERS -->
|
||||
|
||||
<h3 id="controllers" onclick="collapse('controllers_inner');" class="component">
|
||||
{{=T("Controllers")}}
|
||||
<h3 id="_controllers" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('controllers_inner');">{{=T("Controllers")}}</span>
|
||||
<span id="controllers" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="controllers_inner" class="component_contents">
|
||||
{{if not controllers:}}
|
||||
<p><strong>{{=T("There are no controllers")}}</strong></p>
|
||||
{{pass}}
|
||||
<div class="controls comptools">
|
||||
</div>
|
||||
<ul>
|
||||
{{for c in controllers:}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('controllers',c)}}
|
||||
{{=deletefile([app,'controllers',c])}}
|
||||
{{=testfile('controllers',c)}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('controllers',c)}}
|
||||
</span>
|
||||
<span class="extras">
|
||||
{{if functions[c]:}}{{=T("exposes")}} {{pass}}{{=XML(', '.join([A(f,_href=URL(a=app,c=c[:-3],f=f)).xml() for f in functions[c]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{if not controllers:}}<p><strong>{{=T("There are no controllers")}}</strong></p>{{else:}}
|
||||
<ul class="unstyled act_edit">
|
||||
{{for c in controllers:}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('controllers',c)}}
|
||||
{{=deletefile([app,'controllers',c])}}
|
||||
{{=testfile('controllers',c)}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('controllers',c)}}
|
||||
</span>
|
||||
<span class="extras celled">
|
||||
{{if functions[c]:}}{{=T("exposes")}} {{pass}}{{=XML(', '.join([A(f,_href=URL(a=app,c=c[:-3],f=f)).xml() for f in functions[c]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
|
||||
<!-- VIEWS -->
|
||||
|
||||
<h3 id="views" onclick="collapse('views_inner');" class="component">
|
||||
{{=T("Views")}}
|
||||
<h3 id="_views" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('views_inner');">{{=T("Views")}}</span>
|
||||
<span id="views" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="views_inner" class="component_contents">
|
||||
{{if not views:}}
|
||||
<p><strong>{{=T("There are no views")}}</strong></p>
|
||||
{{pass}}
|
||||
<div class="controls comptools">
|
||||
</div>
|
||||
<ul>
|
||||
{{for c in views:}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('views',c)}}
|
||||
{{=deletefile([app,'views',c])}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('views',c)}}
|
||||
</span>
|
||||
<span class="extras">
|
||||
{{if extend.has_key(c):}}{{=T("extends")}} <b>{{=extend[c]}}</b> {{pass}}
|
||||
{{if include[c]:}}{{=T("includes")}} {{pass}}{{=XML(', '.join([B(f).xml() for f in include[c]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{if not views:}}<p><strong>{{=T("There are no views")}}</strong></p>{{else:}}
|
||||
<ul class="unstyled act_edit">
|
||||
{{for c in views:}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('views',c)}}
|
||||
{{=deletefile([app, 'views', c])}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('views',c)}}
|
||||
</span>
|
||||
<span class="extras celled">
|
||||
{{if extend.has_key(c):}}{{=T("extends")}} <b>{{=extend[c]}}</b> {{pass}}
|
||||
{{if include[c]:}}{{=T("includes")}} {{pass}}{{=XML(', '.join([B(f).xml() for f in include[c]]))}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
|
||||
<!-- STATIC -->
|
||||
|
||||
<h3 id="static" onclick="collapse('static_inner');" class="component">
|
||||
{{=T("Static files")}}
|
||||
<h3 id="_static" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('static_inner');">{{=T("Static files")}}</span>
|
||||
<span id="static" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="static_inner" class="component_contents">
|
||||
{{if not statics:}}<p><strong>{{=T("There are no static files")}}</strong></p>{{pass}}
|
||||
<ul>
|
||||
{{
|
||||
path=[]
|
||||
for file in statics+['']:
|
||||
items=file.split('/')
|
||||
file_path=items[:-1]
|
||||
filename=items[-1]
|
||||
while path!=file_path:
|
||||
if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
|
||||
path.append(file_path[len(path)])
|
||||
thispath='static__'+'__'.join(path)
|
||||
}}
|
||||
<li class="folder">
|
||||
<a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
|
||||
<ul id="{{=thispath}}" style="display: none;" class="sublist">{{
|
||||
else:
|
||||
path = path[:-1]
|
||||
}}
|
||||
</ul></li>
|
||||
{{
|
||||
pass
|
||||
pass
|
||||
if filename:
|
||||
}}<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('static',file)}} {{=deletefile([app,'static',file])}}
|
||||
</span>
|
||||
<span class="file">
|
||||
<a href="{{=URL(a=app,c='static',f=file)}}">{{=filename}}</a>
|
||||
</span>
|
||||
</li>{{
|
||||
pass
|
||||
pass
|
||||
}}
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{if not statics:}}<p><strong>{{=T("There are no static files")}}</strong></p>{{else:}}
|
||||
<ul class="unstyled act_edit">
|
||||
{{
|
||||
path=[]
|
||||
for file in statics+['']:
|
||||
items=file.split('/')
|
||||
file_path=items[:-1]
|
||||
filename=items[-1]
|
||||
while path!=file_path:
|
||||
if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
|
||||
path.append(file_path[len(path)])
|
||||
thispath='static__'+'__'.join(path)
|
||||
}}
|
||||
<li class="folder"><i> </i>
|
||||
<a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
|
||||
<ul id="{{=thispath}}" style="display: none;" class="sublist">
|
||||
{{
|
||||
else:
|
||||
path = path[:-1]
|
||||
}}
|
||||
</ul>
|
||||
</li>
|
||||
{{
|
||||
pass
|
||||
pass
|
||||
if filename:
|
||||
}}
|
||||
<li>
|
||||
<span class="filetools controls">
|
||||
{{=editfile('static',file)}} {{=deletefile([app,'static',file])}}
|
||||
</span>
|
||||
<span class="file">
|
||||
<a href="{{=URL(a=app,c='static',f=file)}}">{{=filename}}</a>
|
||||
</span>
|
||||
</li>
|
||||
{{
|
||||
pass
|
||||
pass
|
||||
}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
|
||||
<!-- MODULES -->
|
||||
|
||||
<h3 id="modules" onclick="collapse('modules_inner');" class="component">
|
||||
{{=T("Modules")}}
|
||||
<h3 id="_modules" rel="pagebookmark">
|
||||
<span class="component" onclick="collapse('modules_inner');">{{=T("Modules")}}</span>
|
||||
<span id="modules" class="hashstick"> </span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
|
||||
</h3>
|
||||
<div id="modules_inner" class="component_contents">
|
||||
{{if not modules:}}
|
||||
<p><strong>{{=T("There are no modules")}}</strong></p>
|
||||
{{pass}}
|
||||
<div class="controls comptools">
|
||||
</div>
|
||||
<ul>
|
||||
{{for m in modules:}}
|
||||
<li>
|
||||
{{=editfile('modules',m)}}
|
||||
{{if m!='__init__.py':}}<a class="button" href="{{=URL('delete',args=[app,'modules',m],vars=dict(sender=request.function+'/'+app))}}">{{=T("delete")}}</a>{{pass}}
|
||||
{{=peekfile('modules',m)}}
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{if not modules:}}<p><strong>{{=T("There are no modules")}}</strong></p>{{else:}}
|
||||
<ul class="unstyled act_edit">
|
||||
{{for m in modules:}}
|
||||
<li>
|
||||
{{=editfile('modules',m)}}
|
||||
{{if m!='__init__.py':}}<a class="button btn" href="{{=URL('delete',args=[app,'modules',m],vars=dict(sender=request.function+'/'+app))}}">{{=T("delete")}}</a>{{pass}}
|
||||
{{=peekfile('modules',m)}}
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- end "plugin" block -->
|
||||
@@ -1,25 +1,21 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}resolve{{end}}
|
||||
|
||||
<!-- begin "resolve" block -->
|
||||
<h2>{{=T('Resolve Conflict file')}} "{{=filename}}"</h2>
|
||||
|
||||
<script>
|
||||
function plus() {jQuery('.plus').show(); jQuery('.minus').hide(); }
|
||||
function minus() {jQuery('.plus').hide(); jQuery('.minus').show(); }
|
||||
function all() {jQuery('.plus').show(); jQuery('.minus').show(); }
|
||||
</script>
|
||||
|
||||
<div class="controls">
|
||||
<button onclick="plus()">new</button>
|
||||
<button onclick="minus()">old</button>
|
||||
<button onclick="all()">all</button>
|
||||
<button class="btn" onclick="plus()">new</button>
|
||||
<button class="btn" onclick="minus()">old</button>
|
||||
<button class="btn" onclick="all()">all</button>
|
||||
</div>
|
||||
|
||||
<div class="form">
|
||||
<form action="{{=URL(r=request,args=request.args)}}" method="post">
|
||||
{{=diff}}
|
||||
<input type="submit" name="merge" value="{{=T('merge')}}" /><br/>
|
||||
<input class="btn" type="submit" name="merge" value="{{=T('merge')}}" /><br/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- end "resolve" block -->
|
||||
@@ -1,158 +1,145 @@
|
||||
{{extend 'layout.html'}}
|
||||
{{import os, glob}}
|
||||
|
||||
{{block sectionclass}}site{{end}}
|
||||
|
||||
<div class="applist f60">
|
||||
<div class="applist_inner">
|
||||
<h2>{{=T("Installed applications")}}</h2>
|
||||
<ul>
|
||||
{{for a in apps:}}
|
||||
<li class="application"> <!-- onmouseover="jQuery(this).children('p').show()" onmouseout="jQuery(this).children('p').hide()"-->
|
||||
{{if a==request.application:}}
|
||||
<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"))}}
|
||||
{{else:}}
|
||||
{{=button(URL(a,'appadmin','index'), T("appadmin"))}}
|
||||
{{pass}}
|
||||
{{=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"))}}
|
||||
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
||||
{{=button(URL('compile_app',args=a), T("Compile"))}}
|
||||
{{else:}}
|
||||
{{=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"))}}
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
{{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }}
|
||||
{{=button(URL('git_pull',args=a), T("Git Pull"))}}
|
||||
{{=button(URL('git_push',args=a), T("Git Push"))}}
|
||||
{{pass}}
|
||||
{{if a!=request.application:}}
|
||||
{{=button(URL('uninstall',args=a), T("Uninstall"))}}
|
||||
{{=button_enable(URL('enable',args=a), a)}}
|
||||
{{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'))}}
|
||||
{{pass}}
|
||||
</div>
|
||||
<!-- VERSION -->
|
||||
{{if is_manager():}}
|
||||
<div class="box">
|
||||
<h3>{{=T("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(URL('default','reload_routes'), T('Reload routes'))}}
|
||||
</p>
|
||||
{{pass}}
|
||||
<p>
|
||||
{{=T("Running on %s", request.env.server_software)}}
|
||||
</p>
|
||||
{{if session.is_mobile=='auto':}}<p>
|
||||
{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}</p>
|
||||
{{pass}}
|
||||
</div>
|
||||
{{pass}}
|
||||
<!-- MULTI_USER_INTERFACE -->
|
||||
{{if MULTI_USER_MODE and is_manager():}}
|
||||
<div class="box">
|
||||
<h3>{{=T("Multi User Mode")}}</h3>
|
||||
<p>
|
||||
{{=button(URL('bulk_register'),T('Bulk Register'))}}
|
||||
{{=button(URL('manage_students'),T('Manage Students'))}}
|
||||
</p>
|
||||
</div>
|
||||
{{pass}}
|
||||
<!-- APP WIZARD -->
|
||||
<div class="box">
|
||||
<h3>{{=T("New application wizard")}}</h3>
|
||||
<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_create.custom.begin}}
|
||||
<table><tr><td>
|
||||
{{=LABEL(T("Application name:"))}}
|
||||
</td><td>
|
||||
{{=form_create.custom.widget.name}}
|
||||
</td><td>
|
||||
<button type="submit">{{=T('Create')}}</button>
|
||||
</td></tr></table>
|
||||
{{=form_create.custom.end}}
|
||||
</div>
|
||||
<!-- UPLOAD PACKAGE -->
|
||||
<div class="box">
|
||||
<h3>{{=T("Upload and install packed application")}}</h3>
|
||||
{{=form_update.custom.begin}}
|
||||
<table><tr><td>
|
||||
{{=LABEL(T("Application name:"))}}
|
||||
</td><td>
|
||||
{{=form_update.custom.widget.name}}
|
||||
</td></tr><tr><td>
|
||||
{{=LABEL(T("Upload a package:"))}}
|
||||
</td><td>
|
||||
{{=form_update.custom.widget.file}}
|
||||
</td></tr><tr><td>
|
||||
{{=LABEL('Or ',T("Get from URL:"))}}
|
||||
</td><td>
|
||||
{{=form_update.custom.widget.url}}
|
||||
</td></tr><tr><td>
|
||||
({{=T('can be a git repo')}})
|
||||
</td><td>
|
||||
{{=form_update.custom.widget.overwrite}}
|
||||
{{=LABEL(T("Overwrite installed app"))}}
|
||||
</td></tr><tr><td>
|
||||
</td><td>
|
||||
<button type="submit">{{=T('Install')}}</button>
|
||||
</td></tr></table>
|
||||
{{=form_update.custom.end}}
|
||||
</div>
|
||||
<!-- DEPLOY ON GAE -->
|
||||
<div class="box">
|
||||
<h3>{{=T("Deploy")}}</h3>
|
||||
<p>
|
||||
{{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}}
|
||||
{{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}}
|
||||
</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.load')}}');});
|
||||
</script>
|
||||
</div>
|
||||
{{pass}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- begin "site" block -->
|
||||
<div class="row-fluid">
|
||||
<div class="applist f60 span7">
|
||||
<div class="applist_inner">
|
||||
<h2>{{=T("Installed applications")}}</h2>
|
||||
<ul class="unstyled">
|
||||
{{for a in apps:}}
|
||||
<li class="application"> <!-- onmouseover="jQuery(this).children('p').show()" onmouseout="jQuery(this).children('p').hide()"-->
|
||||
{{if a==request.application:}}
|
||||
<h3 class="currentapp muted">{{=a}} ({{=T('currently running')}})</h3>
|
||||
<p class="controls row-buttons">
|
||||
{{else:}}
|
||||
<h3 class="editableapp muted">{{=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 row-buttons">
|
||||
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
||||
{{=sp_button(URL('design',args=a), T("Edit"))}}
|
||||
{{else:}}
|
||||
{{=button(URL(a,'appadmin','index'), T("appadmin"))}}
|
||||
{{pass}}
|
||||
{{=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"))}}
|
||||
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
||||
{{=button(URL('compile_app',args=a), T("Compile"))}}
|
||||
{{else:}}
|
||||
{{=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"))}}
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
{{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }}
|
||||
{{=button(URL('git_pull',args=a), T("Git Pull"))}}
|
||||
{{=button(URL('git_push',args=a), T("Git Push"))}}
|
||||
{{pass}}
|
||||
{{if a!=request.application:}}
|
||||
{{=button(URL('uninstall',args=a), T("Uninstall"))}}
|
||||
{{=button_enable(URL('enable',args=a), a)}}
|
||||
{{pass}}
|
||||
</p>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- /applist -->
|
||||
<div class="sidebar fl60 span5">
|
||||
<div class="sidebar_inner controls well well-small">
|
||||
<!-- CHANGE ADMIN PWD -->
|
||||
<div class="pwdchange pull-right">
|
||||
{{if MULTI_USER_MODE:}}
|
||||
{{=auth.navbar()}}
|
||||
{{else:}}
|
||||
{{=sp_button(URL('change_password'), T('Change admin password'))}}
|
||||
{{pass}}
|
||||
</div> <!-- /CHANGE ADMIN PWD -->
|
||||
{{if is_manager():}}
|
||||
<!-- VERSION -->
|
||||
<div class="box">
|
||||
<h3>{{=T("Version %s.%s.%s %s (%s)", myversion)}}</h3>
|
||||
<p id="check_version" class="row-buttons">
|
||||
{{if session.check_version:}}
|
||||
{{=T('Checking for upgrades...')}}
|
||||
</p>
|
||||
<script>ajax('{{=URL('check_version')}}',[],'check_version');</script>
|
||||
{{session.check_version=False}}
|
||||
{{else:}}
|
||||
{{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('Check for upgrades'))}}
|
||||
{{=button(URL('default','reload_routes'), T('Reload routes'))}}
|
||||
</p>
|
||||
{{pass}}
|
||||
<p>{{=T("Running on %s", request.env.server_software)}}</p>
|
||||
{{if session.is_mobile=='auto':}}
|
||||
<p>{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}</p>
|
||||
{{pass}}
|
||||
</div> <!-- /VERSION -->
|
||||
{{pass}}
|
||||
{{if MULTI_USER_MODE and is_manager():}}
|
||||
<!-- MULTI_USER_INTERFACE -->
|
||||
<div class="box">
|
||||
<h3>{{=T("Multi User Mode")}}</h3>
|
||||
<p class="row-buttons">
|
||||
{{=button(URL('bulk_register'),T('Bulk Register'))}}
|
||||
{{=button(URL('manage_students',vars={'order':'auth_user.id'}),T('Manage Students'))}}
|
||||
</p>
|
||||
</div> <!-- /MULTI_USER_INTERFACE -->
|
||||
{{pass}}
|
||||
<!-- APP WIZARD -->
|
||||
<div class="box">
|
||||
<h3>{{=T("New application wizard")}}</h3>
|
||||
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}
|
||||
{{=T("(requires internet access)")}}</p>
|
||||
</div> <!-- /APP WIZARD -->
|
||||
<!-- SCAFFOLD APP -->
|
||||
<div class="box">
|
||||
<h3>{{=T("New simple application")}}</h3>
|
||||
{{=form_create.custom.begin}}
|
||||
{{=LABEL(T("Application name:"))}}
|
||||
{{=form_create.custom.widget.name}}
|
||||
<div class="controls"><button type="submit" class="btn">{{=T('Create')}}</button></div>
|
||||
{{=form_create.custom.end}}
|
||||
</div> <!-- /SCAFFOLD APP -->
|
||||
<!-- UPLOAD PACKAGE -->
|
||||
<div class="box">
|
||||
<h3>{{=T("Upload and install packed application")}}</h3>
|
||||
{{=form_update.custom.begin}}
|
||||
<label for="appupdate_name">{{=T("Application name:")}}</label>
|
||||
{{=form_update.custom.widget.name}}
|
||||
<label for="appupdate_file">{{=T("Upload a package:")}}</label>
|
||||
{{=form_update.custom.widget.file}}
|
||||
<label for="appupdate_url">{{=T("Or Get from URL:")}}</label>
|
||||
{{=form_update.custom.widget.url}}<small class="help-block">({{=T('can be a git repo')}})</small>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
{{=form_update.custom.widget.overwrite}} {{=T("Overwrite installed app")}}
|
||||
</label>
|
||||
<button type="submit" class='btn'>{{=T('Install')}}</button>
|
||||
</div>
|
||||
{{=form_update.custom.end}}
|
||||
</div> <!-- /UPLOAD PACKAGE -->
|
||||
<!-- DEPLOY ON GAE -->
|
||||
<div class="box">
|
||||
<h3>{{=T("Deploy")}}</h3>
|
||||
<p class="row-buttons">
|
||||
{{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}}
|
||||
{{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}}
|
||||
</p>
|
||||
</div> <!-- /DEPLOY ON GAE -->
|
||||
<br/>
|
||||
{{if TWITTER_HASH:}}
|
||||
<!-- TWITTER -->
|
||||
<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.load')}}');});</script>
|
||||
</div> <!-- /TWITTER -->
|
||||
{{pass}}
|
||||
</div>
|
||||
</div> <!-- /sidebar -->
|
||||
</div> <!-- /row-fluid
|
||||
<!-- end "site" block -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}test{{end}}
|
||||
|
||||
<!-- begin "test" block -->
|
||||
<h2>{{=T('Testing application')}} "{{=app}}"</h2>
|
||||
|
||||
{{for controller in sorted(controllers):}}
|
||||
@@ -14,8 +14,14 @@ ajax('{{=URL(a=app,c=controller[:-3],f='_TEST')}}',[],'output_{{=controller[:-3]
|
||||
//--></script>
|
||||
{{pass}}
|
||||
|
||||
<p class="help">{{=T("""If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.
|
||||
A green title indicates that all tests (if defined) passed. In this case test results are not shown.""")}}</p>
|
||||
<p class="help">{{=T('Functions with no doctests will result in [passed] tests.')}}</p>
|
||||
<p class="help">{{=T('ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.')}}</p>
|
||||
|
||||
<div class="row-fluid">
|
||||
<p class="help alert alert-info span6">{{=T("""If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.
|
||||
A green title indicates that all tests (if defined) passed. In this case test results are not shown.""")}}</p>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<p class="help alert alert-info span6">{{=T('Functions with no doctests will result in [passed] tests.')}}</p>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<p class="help alert alert-info span6">{{=T('ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.')}}</p>
|
||||
</div>
|
||||
<!--end "test" block -->
|
||||
@@ -1,139 +1,154 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}ticket{{end}}
|
||||
|
||||
<!-- begin "ticket" block -->
|
||||
<h2>{{=T('Error ticket')}} for "{{=app}}"</h2>
|
||||
<h3>{{=T('Ticket ID')}}</h3>
|
||||
<p>{{=ticket}}</p>
|
||||
{{if output:}}<h4>{{=output}}</h4>{{pass}}
|
||||
<h3>{{=T('Version')}}</h3>
|
||||
<table class="versions">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>web2py™</th>
|
||||
<td>{{=myversion}}</td>
|
||||
</tr>
|
||||
{{if snapshot:}}
|
||||
<tr>
|
||||
<th>Python</th>
|
||||
<td>{{=snapshot.get('pyver','')}}</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>web2py™</th>
|
||||
<td>{{=myversion}}</td>
|
||||
</tr>
|
||||
{{if snapshot:}}
|
||||
<tr>
|
||||
<th>Python</th>
|
||||
<td>{{=snapshot.get('pyver','')}}</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{if traceback or code or layer:}}
|
||||
<h3>{{=T('Traceback')}}</h3>
|
||||
<div class="inspect">
|
||||
{{=traceback}}
|
||||
</div>
|
||||
|
||||
{{if snapshot:}}
|
||||
{{try:}}
|
||||
|
||||
<!-- ERROR SNAPSHOT -->
|
||||
|
||||
<h3>
|
||||
{{=T('Error snapshot')}}
|
||||
<span class="tooltip">{{=helpicon()}} <span>{{=T('Detailed traceback description')}}</span></span>
|
||||
</h3>
|
||||
|
||||
<!-- SNAPSHOT LIST -->
|
||||
|
||||
<div id="snapshot">
|
||||
<!-- Exception details -->
|
||||
<p class="exception_object inspect">
|
||||
<code>{{=snapshot['etype']}}({{=snapshot['evalue']}})</code>
|
||||
</p>
|
||||
<p class="controls">
|
||||
<a class="button" onclick="collapse('exception_inner');"><span>{{=T('inspect attributes')}}</span></a>
|
||||
</p>
|
||||
<div id="exception_inner" class="hide">
|
||||
<div class="inspect">
|
||||
<h5>{{=T("Exception instance attributes")}}</h5>
|
||||
<table>
|
||||
<tbody>
|
||||
{{for k,v in snapshot['exception'].items():}}
|
||||
<tr>
|
||||
<th>{{=k}}</th>
|
||||
<td>{{=v}}</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- FRAMES -->
|
||||
<div id="frames">
|
||||
<h4>{{=T('Frames')}}</h4>
|
||||
<ul>
|
||||
{{for i, frame in enumerate(snapshot['frames']):}}
|
||||
<li>
|
||||
{{is_hidden = (i != len(snapshot['frames'])-1 and 'hide' or 'inspect')}}
|
||||
<div class="framefile inspect controls">
|
||||
<p>
|
||||
<strong>File {{="%s in %s at line %s" % (frame['file'], frame['func'], frame['lnum'])}}</strong>
|
||||
<a class="button tbbutton" onclick="collapse('{{="%s_code_inner" % i}}');"><span>{{=T("code")}}</span></a>
|
||||
<a class="button tbbutton" onclick="collapse('{{="%s_args_inner" % i}}');"><span>{{=T("arguments")}}</span></a>
|
||||
<a class="button tbbutton" onclick="collapse('{{="%s_vars_inner" % i}}');"><span>{{=T("variables")}}</span></a>
|
||||
</p>
|
||||
<div id="{{="%s_args_inner" % i}}" class="{{=is_hidden}}">
|
||||
<h5>Function argument list</h5>
|
||||
<p>{{=frame['call']}}</p>
|
||||
</div>
|
||||
<div id="{{="%s_code_inner" % i}}" class="{{=is_hidden}}">
|
||||
<h5>Code listing</h5>
|
||||
{{if frame['lines']:}}
|
||||
<pre>{{=CODE('\n'.join([x[1] for x in sorted(frame['lines'].items(),key=lambda x: x[0])]),
|
||||
language='python', link=None, counter=min(frame['lines'].keys()), highlight_line=frame['lnum'])}}</pre>
|
||||
{{pass}}
|
||||
</div>
|
||||
<div id="{{="%s_vars_inner" % i}}" class="{{=is_hidden}}">
|
||||
<h5>Variables</h5>
|
||||
<table>
|
||||
<tbody>
|
||||
{{for k,v in frame['dump'].items():}}
|
||||
<tr>
|
||||
<th>{{=k}}</th>
|
||||
<td>{{=v}}</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- VIEW ENVIRONMENT -->
|
||||
<div class="viewenv">
|
||||
<h4>Context</h4>
|
||||
<p class="controls">
|
||||
<a class="button" onclick="jQuery('#locals').slideToggle()"><span>{{=T('locals')}}</span></a>
|
||||
<a class="button" onclick="jQuery('#request').slideToggle()"><span>{{=T('request')}}</span></a>
|
||||
<a class="button" onclick="jQuery('#session').slideToggle()"><span>{{=T('session')}}</span></a>
|
||||
<a class="button" onclick="jQuery('#response').slideToggle()"><span>{{=T('response')}}</span></a>
|
||||
</p>
|
||||
<div class="hide inspect" id="locals"><h6>locals</h6>{{=BEAUTIFY(snapshot['locals'])}}</div>
|
||||
<div class="hide inspect" id="request"><h6>request</h6>{{=BEAUTIFY(snapshot['request'])}}</div>
|
||||
<div class="hide inspect" id="session"><h6>session</h6>{{=BEAUTIFY(snapshot['session'])}}</div>
|
||||
<div class="hide inspect" id="response"><h6>response</h6>{{=BEAUTIFY(snapshot['response'])}}</div>
|
||||
</div>
|
||||
{{except Exception, e:}}
|
||||
<!-- this should not happen, just in case... (cannot output normal hmtl as we don't know current open tags) -->
|
||||
{{import traceback;tb=traceback.format_exc().replace("\n","\\n") }}
|
||||
<script language='javascript'>alert("Exception during snapshot rendering: {{=tb}} ");</script>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
|
||||
<div class="errorsource">
|
||||
<h3>In file: {{=layer}}</h3>
|
||||
{{=CODE(code.replace('\r',''),language='python',link='/examples/global/vars/')}}
|
||||
</div>
|
||||
<h3>{{=T('Traceback')}}</h3>
|
||||
<div class="inspect resp1">{{=traceback}}</div>
|
||||
{{if snapshot:}}
|
||||
{{try:}}
|
||||
<!-- ERROR SNAPSHOT -->
|
||||
<h3>{{=T('Error snapshot')}}
|
||||
<a href="#" rel="tooltip" data-placement="right" data-original-title="{{=T('Detailed traceback description')}}">
|
||||
{{=helpicon()}}
|
||||
<span>{{=T("Detailed traceback description")}}</span>
|
||||
</a>
|
||||
</h3>
|
||||
<!-- SNAPSHOT LIST -->
|
||||
<div id="snapshot">
|
||||
<!-- Exception details -->
|
||||
<p class="exception_object inspect">
|
||||
<code>{{=snapshot['etype']}}({{=snapshot['evalue']}})</code>
|
||||
</p>
|
||||
<p class="controls">
|
||||
<a class="button btn" onclick="collapse('exception_inner');"><span>{{=T('inspect attributes')}}</span></a>
|
||||
</p>
|
||||
<div id="exception_inner" class="hide">
|
||||
<div class="inspect">
|
||||
<h5>{{=T("Exception instance attributes")}}</h5>
|
||||
<table>
|
||||
<tbody>
|
||||
{{for k,v in snapshot['exception'].items():}}
|
||||
<tr>
|
||||
<th>{{=k}}</th>
|
||||
<td>{{=v}}</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- FRAMES -->
|
||||
<div id="frames">
|
||||
<h4>{{=T('Frames')}}</h4>
|
||||
<ul class="unstyled">
|
||||
{{for i, frame in enumerate(snapshot['frames']):}}
|
||||
<li>
|
||||
{{is_hidden = (i != len(snapshot['frames'])-1 and 'hide' or 'inspect')}}
|
||||
<div class="framefile inspect controls">
|
||||
<p>
|
||||
<strong>File {{="%s in %s at line %s" % (frame['file'], frame['func'], frame['lnum'])}}</strong>
|
||||
<a class="button tbbutton btn" onclick="collapse('{{='%s_code_inner' % i}}');"><span>{{=T("code")}}</span></a>
|
||||
<a class="button tbbutton btn" onclick="collapse('{{='%s_args_inner' % i}}');"><span>{{=T("arguments")}}</span></a>
|
||||
<a class="button tbbutton btn" onclick="collapse('{{='%s_vars_inner' % i}}');"><span>{{=T("variables")}}</span></a>
|
||||
</p>
|
||||
<div id="{{='%s_args_inner' % i}}" class="{{=is_hidden}}" style="width:100%;overflow:auto">
|
||||
<h5>Function argument list</h5>
|
||||
<p>{{=frame['call']}}</p>
|
||||
</div>
|
||||
<div id="{{='%s_code_inner' % i}}" class="{{=is_hidden}}" style="width:100%;overflow:auto">
|
||||
<h5>Code listing</h5>
|
||||
{{if frame['lines']:}}
|
||||
<pre>{{=CODE('\n'.join([x[1] for x in sorted(frame['lines'].items(),key=lambda x: x[0])]),
|
||||
language='python', link=None, counter=min(frame['lines'].keys()), highlight_line=frame['lnum'])}}</pre>
|
||||
{{pass}}
|
||||
</div>
|
||||
<div id="{{='%s_vars_inner' % i}}" class="{{=is_hidden}}" style="width:100%;overflow:auto">
|
||||
<h5>Variables</h5>
|
||||
<table>
|
||||
<tbody>
|
||||
{{for k,v in frame['dump'].items():}}
|
||||
<tr>
|
||||
<th>{{=k}}</th>
|
||||
<td>{{=v}}</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- VIEW ENVIRONMENT -->
|
||||
<div class="viewenv">
|
||||
<h4><span>Context</span></h4>
|
||||
<p class="controls">
|
||||
<a class="button btn" onclick="jQuery('#locals').slideToggle()"><span>{{=T('locals')}}</span></a>
|
||||
<a class="button btn" onclick="jQuery('#request').slideToggle()"><span>{{=T('request')}}</span></a>
|
||||
<a class="button btn" onclick="jQuery('#session').slideToggle()"><span>{{=T('session')}}</span></a>
|
||||
<a class="button btn" onclick="jQuery('#response').slideToggle()"><span>{{=T('response')}}</span></a>
|
||||
</p>
|
||||
<div class="hide inspect resp1" id="locals"><h6>locals</h6>
|
||||
{{try:}}
|
||||
{{=BEAUTIFY(snapshot['locals'])}}
|
||||
{{except:}}
|
||||
{{=BEAUTIFY('no locals available in snapshot')}}
|
||||
{{pass}}
|
||||
</div>
|
||||
<div class="hide inspect" id="request"><h6>request</h6>
|
||||
{{try:}}
|
||||
{{=BEAUTIFY(snapshot['request'])}}
|
||||
{{except:}}
|
||||
{{=BEAUTIFY('no request available in snapshot')}}
|
||||
{{pass}}
|
||||
</div>
|
||||
<div class="hide inspect" id="session"><h6>session</h6>
|
||||
{{try:}}
|
||||
{{=BEAUTIFY(snapshot['session'])}}
|
||||
{{except:}}
|
||||
{{=BEAUTIFY('no session available in snapshot')}}
|
||||
{{pass}}
|
||||
</div>
|
||||
<div class="hide inspect" id="response"><h6>response</h6>
|
||||
{{try:}}
|
||||
{{=BEAUTIFY(snapshot['response'])}}
|
||||
{{except:}}
|
||||
{{=BEAUTIFY('no response available in snapshot')}}
|
||||
{{pass}}
|
||||
</div>
|
||||
</div>
|
||||
{{except Exception, e:}}
|
||||
<!-- this should not happen, just in case... (cannot output normal hmtl as we don't know current open tags) -->
|
||||
{{import traceback;tb=traceback.format_exc().replace("\n","\\n") }}
|
||||
<script language='javascript'>alert("Exception during snapshot rendering: {{=tb}} ");</script>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
<div class="errorsource">
|
||||
<h3>In file: {{=layer}}</h3>
|
||||
{{=CODE(code.replace('\r',''),language='python',link='/examples/global/vars/')}}
|
||||
</div>
|
||||
{{else:}}
|
||||
<h3>{{=T('Ticket Missing')}}</h3>
|
||||
<h3>{{=T('Ticket Missing')}}</h3>
|
||||
{{pass}}
|
||||
<!-- end "ticket" block -->
|
||||
@@ -1,7 +1,7 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
<!-- begin "uninstall" block -->
|
||||
<h2>{{=T('Are you sure you want to uninstall application "%s"?', app)}}</h2>
|
||||
<div class="center">
|
||||
{{=dialog}}
|
||||
</div>
|
||||
|
||||
<!-- end "uninstall" block -->
|
||||
@@ -1,13 +1,17 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{
|
||||
dlg = dialog
|
||||
smt_button = dlg.element(_type="submit")
|
||||
smt_button['_class'] = 'btn'
|
||||
smt_button['_style'] = 'margin-right:4px;'
|
||||
ccl_button = dlg.element(_type="button")
|
||||
ccl_button['_class'] = 'btn'
|
||||
}}
|
||||
{{block sectionclass}}upgrade{{end}}
|
||||
|
||||
<!-- begin "shell" block -->
|
||||
<h2>{{=T('web2py upgrade')}}</h2>
|
||||
|
||||
<p class="center"><strong class="att">{{=T('ATTENTION:')}}</strong> {{=T('This is an experimental feature and it needs more testing. If you decide to upgrade you do it at your own risk')}}<br />
|
||||
{{=T('If start the upgrade, be patient, it may take a while to download')}}</p>
|
||||
|
||||
<p class="center"><div class="alert"><strong class="att">{{=T('ATTENTION:')}}</strong> {{=T('This is an experimental feature and it needs more testing. If you decide to upgrade you do it at your own risk')}}<br />
|
||||
{{=T('If start the upgrade, be patient, it may take a while to download')}}</p></div>
|
||||
<div class="center">
|
||||
{{=dialog}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1,20 +1,67 @@
|
||||
{{extend 'layout.html'}}
|
||||
<!-- begin "user" block -->
|
||||
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
|
||||
<div id="web2py_user_form">
|
||||
{{if 'auth' in globals():}}
|
||||
{{
|
||||
# add bootstrap class to form
|
||||
form['_class']='span4 well well-small'
|
||||
# change form.custom.begin
|
||||
form.custom.begin=XML("<%s %s>" % (form.tag,form._xml()[0]))
|
||||
if request.args(0)=='login':
|
||||
# delete empty label
|
||||
d = form.elements("tr#auth_user_remember__row")
|
||||
d[0][0] = " "
|
||||
# remake remember checkbox
|
||||
cbx_inp=form.element(_name='remember')
|
||||
cbx_inp['_class']=""
|
||||
cbx_lbl=form.element(_for='auth_user_remember')[0]
|
||||
form.element('div',replace=LABEL(cbx_inp,cbx_lbl,_class="checkbox"))
|
||||
# new form buttons
|
||||
smt = form.element('input',_type='submit')
|
||||
smt['_class']='btn'
|
||||
btns = [smt]
|
||||
if not 'register' in auth.settings.actions_disabled:
|
||||
btns.append(A(T('register'),_href=URL(r=request,args='register'),_class='btn btn-lnk'))
|
||||
pass
|
||||
if not 'request_reset_password' in auth.settings.actions_disabled:
|
||||
btns.append(A(T('lost password'),_href=URL(r=request,args='request_reset_password'),_class='btn btn-lnk'))
|
||||
pass
|
||||
form.element('input[type=submit]',replace=DIV(*btns,_class="controls-inline"))
|
||||
pass
|
||||
if request.args(0)in['register','profile']:
|
||||
# remake is_manager checkbox
|
||||
cbx_inp=form.element(_name='is_manager')
|
||||
cbx_lbl=form.element(_for='auth_user_is_manager')[0]
|
||||
form.element(_name='is_manager',replace=lambda cbx_inp : LABEL(cbx_inp,cbx_lbl,_class="checkbox"))
|
||||
# delete is manager label
|
||||
d = form.elements("tr#auth_user_is_manager__row")
|
||||
d[0][0][0] = " "
|
||||
# new form buttons
|
||||
smt = form.element('input',_type='submit')
|
||||
smt['_class']='btn'
|
||||
form.element('input[type=submit]',replace=lambda button: DIV(button,_class="controls-inline"))
|
||||
pass
|
||||
if request.args(0)in ['request_reset_password','change_password']:
|
||||
# new form buttons
|
||||
smt = form.element('input',_type='submit')
|
||||
smt['_class']='btn'
|
||||
form.element('input[type=submit]',replace=lambda button: DIV(button,_class="controls-inline"))
|
||||
pass
|
||||
}}
|
||||
{{=form.custom.begin}}
|
||||
{{for e in form.components[0]:}}
|
||||
{{= e[0][0]}}
|
||||
{{= e[1][0]}}
|
||||
{{pass}}
|
||||
{{=form.custom.end}}
|
||||
{{else:}}
|
||||
{{=form}}
|
||||
{{if request.args(0)=='login':}}
|
||||
{{if not 'register' in auth.settings.actions_disabled:}}
|
||||
<br/><a href="{{=URL(r=request,args='register')}}">register</a>
|
||||
{{pass}}
|
||||
{{if not 'request_reset_password' in auth.settings.actions_disabled:}}
|
||||
<br/><a href="{{=URL(r=request,args='request_reset_password')}}">lost password</a>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
</div>
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
//<!--
|
||||
jQuery("#web2py_user_form input:visible:enabled:first").focus();
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<!-- end "user" block -->
|
||||
|
||||
@@ -1,44 +1,85 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="P3P" content="CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{=response.title or URL()}}</title>
|
||||
{{response.files.append(URL('static','css/styles.css'))}}
|
||||
{{
|
||||
response.files.append(URL('static','css/bootstrap.min.css'))
|
||||
response.files.append(URL('static','css/styles.css'))
|
||||
response.files.append(URL('static','css/bootstrap_essentials.css'))
|
||||
response.files.append(URL('static','css/bootstrap_adapters.css'))
|
||||
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
|
||||
}}
|
||||
{{include 'web2py_ajax.html'}}
|
||||
<script>jQuery.noConflict();</script>
|
||||
</head>
|
||||
|
||||
<body class="{{=T('direction: ltr') == 'direction: rtl' and 'RTLbody' or ''}} {{block sectionclass}}home{{end}}">
|
||||
<div id="header">
|
||||
<h1 id="start">
|
||||
<a href="{{=URL('default', 'index')}}" class="button"><span>web2py™ {{=T('administrative interface')}}</span></a>
|
||||
</h1>
|
||||
{{if response.menu is not None:}}
|
||||
<ul id="menu">
|
||||
{{for _name,_active,_link in response.menu:}}
|
||||
<li>{{=A(SPAN(_name), _href=_link, _class=_active and 'button select' or 'button')}}</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="main_inner">
|
||||
<div class="flash">{{=response.flash or ''}}</div>
|
||||
{{include}}
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer" class="fixed">
|
||||
{{=T('Powered by')}} {{=A('web2py', _href='http://www.web2py.com')}}™ {{=T('created by')}} Massimo Di Pierro ©2007-{{=request.now.year}} -
|
||||
{{if hasattr(T,'get_possible_languages_info'):}}
|
||||
<span>
|
||||
{{=T('Admin language')}}
|
||||
<select name="adminlanguage" onchange="var date = new Date();cookieDate=date.setTime(date.getTime()+(100*24*60*60*1000));document.cookie='adminLanguage='+this.options[this.selectedIndex].id+'; expires='+cookieDate+'; path=/';window.location.reload()">
|
||||
{{for langinfo in sorted([(code,info[1]) for code,info in T.get_possible_languages_info().iteritems() if code != 'default']):}}
|
||||
<option {{=T.accepted_language==langinfo[0] and 'selected' or ''}} {{='id='+langinfo[0]}} >{{=langinfo[1]}}</option>
|
||||
{{pass}}
|
||||
</select>
|
||||
</span>
|
||||
{{pass}}
|
||||
</div>
|
||||
|
||||
<!-- NAVBAR
|
||||
============== -->
|
||||
<div id="header" class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div id="start" class="brand_wrapper">
|
||||
<a href="{{=URL('default', 'index')}}" class="button brand" ><span>web2py™ {{=T('administrative interface')}}</span></a>
|
||||
</div>
|
||||
<div class="nav-collapse">
|
||||
{{if response.menu is not None:}}
|
||||
<ul id="menu" class="nav pull-right">
|
||||
{{for _name,_active,_link in response.menu:}}
|
||||
<li>{{=A(SPAN(_name), _href=_link, _class=_active and 'button select' or 'button')}}</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!-- /container-fluid -->
|
||||
</div><!-- /navbar-inner -->
|
||||
</div><!-- /#header -->
|
||||
|
||||
<!-- MAIN
|
||||
=========== -->
|
||||
<div id="main" class="container-fluid">
|
||||
<div id="main_inner" class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="flash alert">{{=response.flash or ''}}</div>
|
||||
{{include}}
|
||||
</div><!-- /main span12 -->
|
||||
</div><!-- /main row-fluid -->
|
||||
</div><!-- /#main -->
|
||||
|
||||
<!-- FOOTER
|
||||
============== -->
|
||||
<footer id="footer" class="fixed">
|
||||
<p><span>{{=T('Powered by')}} {{=A('web2py', _href='http://www.web2py.com')}}™ {{=T('created by')}} Massimo Di Pierro ©2007-{{=request.now.year}}
|
||||
{{if hasattr(T,'get_possible_languages_info'):}}
|
||||
- {{=T('Admin language')}}</span>
|
||||
<select name="adminlanguage" onchange="var date = new Date();cookieDate=date.setTime(date.getTime()+(100*24*60*60*1000));document.cookie='adminLanguage='+this.options[this.selectedIndex].id+'; expires='+cookieDate+'; path=/';window.location.reload()">
|
||||
{{for langinfo in sorted([(code,info[1]) for code,info in T.get_possible_languages_info().iteritems() if code != 'default']):}}
|
||||
<option {{=T.accepted_language==langinfo[0] and 'selected' or ''}} {{='id='+langinfo[0]}} >{{=langinfo[1]}}</option>
|
||||
{{pass}}
|
||||
</select>
|
||||
{{else:}}
|
||||
</span>{{pass}}
|
||||
</p>
|
||||
</footer><!-- /#footer -->
|
||||
|
||||
<!-- BS JAVASCRIPT
|
||||
====================== -->
|
||||
<script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
jQuery("[rel=tooltip]").tooltip();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,92 +1,42 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}shell{{end}}
|
||||
<!--style type="text/css">
|
||||
|
||||
.prompt, #output {
|
||||
width: 45em;
|
||||
border: 1px solid #CCCCCC;
|
||||
font-size: 10pt;
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
padding-right: 0em;
|
||||
overflow: auto;
|
||||
wrap: hard;
|
||||
}
|
||||
|
||||
#output {
|
||||
height:250px;overflow:auto;
|
||||
}
|
||||
|
||||
#toolbar {
|
||||
margin-left: 0.5em;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
#caret {
|
||||
width: 2.5em;
|
||||
margin-right: 0px;
|
||||
padding-right: 0px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
#statement {
|
||||
width: 43em;
|
||||
margin-left: -1em;
|
||||
padding-left: 0px;
|
||||
border-left: 0px;
|
||||
background-position: top right;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.processing {
|
||||
background-image: url("{{=URL('static','images/spinner.gif')}}");
|
||||
}
|
||||
|
||||
#ajax-status {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.message {
|
||||
color: #8AD;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #F44;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
</style-->
|
||||
|
||||
<!-- begin "shell" block -->
|
||||
<div id="wrapper">
|
||||
<textarea id="output" readonly="readonly">web2py Shell {{=request.env.web2py_version}}</textarea>
|
||||
<div class="row-fluid">
|
||||
<div class="output-wrapper span8">
|
||||
<textarea id="output" readonly="readonly">web2py Shell {{=request.env.web2py_version}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="form" action="{{=URL('callback',args=app)}}" method="get">
|
||||
<div id="shellwrapper">
|
||||
<div id="caret">>>></div>
|
||||
<div class="tooltip">
|
||||
<textarea class="prompt" name="statement" id="statement"></textarea>
|
||||
<span>Type some Python code in here and hit Return (Enter) to execute it.</span>
|
||||
</div>
|
||||
<div id="autoscroll" style="cursor:pointer;float:right;">autoscroll</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row-fluid">
|
||||
<form id="form" action="{{=URL(r=request,f='callback',args=app)}}" method="get" class="span8">
|
||||
<div id="shellwrapper">
|
||||
<div class="prompt-wrapper">
|
||||
<div class="prompt-container">
|
||||
<textarea class="prompt" name="statement" id="statement"></textarea>
|
||||
</div>
|
||||
<a href="#" rel="tooltip" data-placement="right" data-original-title="{{=T('Type some Python code in here and hit Return (Enter) to execute it.')}}">
|
||||
{{=helpicon()}}
|
||||
<span>Type some Python code in here and hit Return (Enter) to execute it.</span>
|
||||
</a>
|
||||
</div>
|
||||
<div id="caret"><span>>>></span></div>
|
||||
<div id="autoscroll">autoscroll</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid clearfix">
|
||||
<div class="help alert alert-info span6">
|
||||
<ul>
|
||||
<li>Using the shell may lock the database to other users of this app.</li>
|
||||
<li>Each db statement is automatically committed.</li>
|
||||
<li>Creating new tables dynamically is not allowed.</li>
|
||||
<li>Models are automatically imported in the shell.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="help">
|
||||
<ul>
|
||||
<li>Using the shell may lock the database to other users of this app.</li>
|
||||
<li>Each db statement is automatically committed.</li>
|
||||
<li>Creating new tables dynamically is not allowed.</li>
|
||||
<li>Models are automatically imported in the shell.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="{{=URL('static', 'js/autoscroll.js')}}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -103,7 +53,7 @@ jQuery(document).ready(function(){
|
||||
if(s.length>1 && s.substr(s.length-1,1)=='\n' && s.substr(s.length-2,1)!=':' &&
|
||||
(s.indexOf(':\n ')<0 || s.substr(s.length-2,1)=='\n')) {
|
||||
t.val('');
|
||||
jQuery.post("{{=URL('callback',args=app)}}",
|
||||
jQuery.post("{{=URL(r=request,f='callback',args=app)}}",
|
||||
{statement:s},function(data){o.html(o.html()+data).attr('scrollTop',o.attr('scrollHeight'));});
|
||||
} else { };
|
||||
if(event.keyCode==RETURN){
|
||||
@@ -163,4 +113,4 @@ jQuery(document).ready(function(){
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- end "shell" block -->
|
||||
@@ -1,14 +1,15 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}generated{{end}}
|
||||
|
||||
<a class="button" href="{{=URL(app,'default','index')}}">Open new app in new window</a>
|
||||
<a class="button" href="{{=URL('step1')}}">Back to wizard</a>
|
||||
<a class="button" href="{{=URL('default','design',args=app)}}">Admin design page</a>
|
||||
{{if have_mercurial:}}
|
||||
<a class="button" href="{{=URL('mercurial','commit',args=app)}}">Admin versioning page</a>
|
||||
{{pass}}
|
||||
<a class="button" href="{{=URL(app,'appadmin','index')}}">Database administration</a>
|
||||
<!-- begin "generated" block -->
|
||||
<div class="controls row-buttons">
|
||||
{{=button(URL(app,'default','index'), T('Open new app in new window'))}}
|
||||
{{=button(URL('step1'), T('Back to wizard'))}}
|
||||
{{=button(URL('default','design',args=app), T('Admin design page'))}}
|
||||
{{if have_mercurial:}}
|
||||
{{=button(URL('mercurial','commit',args=app), T('Admin versioning page'))}}
|
||||
{{pass}}
|
||||
{{=button(URL(app,'appadmin','index'), T('Database administration'))}}
|
||||
</div>
|
||||
<br/><br/>
|
||||
<iframe style="width: 100%; height: 100%; min-height:600px" src="{{=URL(app,'default','index')}}"></iframe>
|
||||
|
||||
<!-- end "generated" block -->
|
||||
@@ -1,141 +1,183 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}step{{end}}
|
||||
|
||||
<!-- begin "step" block -->
|
||||
<h2>{{=T('New Application Wizard')}}</h2>
|
||||
|
||||
<div id="wizard_nav" class="f20 controls">
|
||||
{{if request.function=='index':}}
|
||||
<h3>{{=T('Start a new app')}}</h3>
|
||||
{{else:}}
|
||||
<div class="box">
|
||||
<h3>{{=T('Basics')}}</h3>
|
||||
<p>{{=button(URL('index'), T('restart'))}}</p>
|
||||
<p><strong>App Name:</strong> {{=session.app['name']}}</p>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>Current settings</h3>
|
||||
<p>{{=button(URL('step1'), T('Edit'))}}</p>
|
||||
<ul id="current_settings">
|
||||
{{for key,value in session.app['params']:}}
|
||||
<li><b>{{=key}}:</b> {{=value}}</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>Tables</h3>
|
||||
<p>{{=button(URL('step2'), T('edit all'))}}</p>
|
||||
<ul>
|
||||
{{for i,table in enumerate(session.app['tables']):}}
|
||||
<li>{{=button(URL('step3',args=i), T('Edit'))}} <strong>{{=table}}</strong></li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>Pages</h3>
|
||||
<p>{{=button(URL('step4'), T('edit all'))}}</p>
|
||||
<ul>
|
||||
{{for i,page in enumerate(session.app['pages']):}}
|
||||
<li>{{=button(URL('step5',args=i), T('Edit'))}} <strong>{{=page}}</strong></li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>{{=T('Generate')}}</h3>
|
||||
<p>{{=button(URL('step6'), T('go!'))}}</p>
|
||||
</div>
|
||||
{{pass}}
|
||||
<div class='row-fluid'>
|
||||
<div id="wizard_nav" class="f20 controls span3">
|
||||
{{if request.function=='index':}}
|
||||
<h3>{{=T('Start a new app')}}</h3>
|
||||
{{else:}}
|
||||
<div class="box first-box">
|
||||
<h3>{{=T('Basics')}}</h3>
|
||||
<p>{{=button(URL('index'), T('restart'))}}</p>
|
||||
<p><strong>App Name:</strong> {{=session.app['name']}}</p>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>Current settings</h3>
|
||||
<p>{{=button(URL('step1')+'/#xwizard_form', T('Edit'))}}</p>
|
||||
<ul id="current_settings" class="unstyled">
|
||||
{{for key,value in session.app['params']:}}
|
||||
<li><b>{{=key}}:</b> {{=value}}</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>Tables</h3>
|
||||
<p>{{=button(URL('step2')+'/#xwizard_form', T('edit all'))}}</p>
|
||||
<ul class="unstyled">
|
||||
{{for i,table in enumerate(session.app['tables']):}}
|
||||
<li>{{=button(URL('step3',args=[i])+'/#xwizard_form', T('Edit'))}} <strong>{{=table}}</strong></li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>Pages</h3>
|
||||
<p>{{=button(URL('step4')+'/#xwizard_form', T('edit all'))}}</p>
|
||||
<ul class="unstyled">
|
||||
{{for i,page in enumerate(session.app['pages']):}}
|
||||
<li>{{=button(URL('step5',args=i)+'/#xwizard_form', T('Edit'))}} <strong>{{=page}}</strong></li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h3>{{=T('Generate')}}</h3>
|
||||
<p>{{=button(URL('step6')+'/#xwizard_form', T('go!'))}}</p>
|
||||
</div>
|
||||
{{pass}}
|
||||
</div> <!-- /wizard nav -->
|
||||
<div id="wizard_form" class="fl20 controls span9" rel="pagebookmark"><span id="xwizard_form" class="hashstick"> </span>
|
||||
<!-- FORM -->
|
||||
{{if 'step' in request.function:}}
|
||||
<h3>{{=T('Step')}} {{=step}}</h3>
|
||||
{{if request.function!='step1':}}
|
||||
{{=button(URL('step' + str(int(request.function[-1])-1)) + '/#xwizard_form', T('back'))}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
<h3>{{=T('Begin')}}</h3>
|
||||
{{pass}}
|
||||
{{if request.function in ('step1','step2','step3','step4','step5'):}}
|
||||
{{=button(URL('step6') + '/#xwizard_form', T('skip to generate'))}}
|
||||
{{pass}}
|
||||
<br /><br />
|
||||
{{if request.function in ('step1','step6'):}}
|
||||
{{pass}}
|
||||
{{if request.function!='step6':}}
|
||||
<div class="form row-fluid">
|
||||
{{=form.custom.begin}}
|
||||
{{ for fieldname in form.table.fields: }}
|
||||
{{if fieldname is not 'id':}}
|
||||
<label>{{=form.custom.label[fieldname]}}:</label>
|
||||
{{=form.custom.widget[fieldname]}}
|
||||
{{if fieldname=='layout_theme':}}
|
||||
<span class="help-inline">
|
||||
<img src="{{=LAYOUTS_APP}}/static/plugin_layouts/layouts/{{=dict(session.app['params'])['layout_theme']}}/preview.png" alt="" align="right" id="preview" class="img-polaroid"/>
|
||||
</span>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
<div class="controls"><button type="submit" class="btn">{{=T('Submit')}}</button></div>
|
||||
{{=form.custom.end}}
|
||||
</div>
|
||||
<script>
|
||||
jQuery(function(){
|
||||
var t=jQuery('#no_table_layout_theme');
|
||||
t.change(function(){
|
||||
jQuery('#preview').attr('src','{{=LAYOUTS_APP}}/static/plugin_layouts/layouts/'+t.val()+'/preview.png');
|
||||
});
|
||||
jQuery("#preview").error(function (){
|
||||
jQuery('#preview').attr('src','http://placehold.it/190x141&text=no+preview+available');
|
||||
});
|
||||
jQuery('ul[id$="_grow_input"] li').addClass('input-append');
|
||||
jQuery('ul[id$="_grow_input"] li a').addClass('btn');
|
||||
});
|
||||
</script>
|
||||
{{else:}}
|
||||
<div class="form row-fluid">
|
||||
{{=form.custom.begin}}
|
||||
{{ for fieldname in form.table.fields: }}
|
||||
{{if fieldname is not 'id':}}
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{=form.custom.label[fieldname]}}:</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">{{=form.custom.widget[fieldname]}}</label>
|
||||
</div>
|
||||
</div>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
<div class="control-group">
|
||||
<label class="control-label empty"> </label>
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn">{{=T('Submit')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
{{=form.custom.end}}
|
||||
</div>
|
||||
{{pass}}
|
||||
<!-- INSTRUCTIONS -->
|
||||
<div class="box">
|
||||
<h4>Instructions</h4>
|
||||
<div class="row-fluid">
|
||||
<div class="help span7 alert alert-block alert-info">
|
||||
{{if request.function=='index':}}
|
||||
<ul class="unstyled">
|
||||
<li>Insert the name of a new app.</li>
|
||||
<li>If the app exists and was created with the wizard, you will be able to edit it, but any manual editing to the app <b>will be lost</b>.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step1':}}
|
||||
<ul class="unstyled">
|
||||
<li>This Wizard will help you build a new web2py app.</li>
|
||||
<li>You can create an app with a name that already exists.</li>
|
||||
<li>If you do not have an email server set email server to "logging".</li>
|
||||
<li>If you want to use Janrain Engage for login: 1) Sign up for a <a href="http://www.janrain.com/products/engage">Janrain Engage</a> account; 2) Register you hostname, domain, and obtain an api key; 3) Set Login Config above to "domain:api_key".</li>
|
||||
<li>ATTENTION: you can use the wizard to download plugins BUT we cannot guarantee the stability or backward compatibility of plugins. Moreover plugins may conflict with each other. Anyway, we do recommend installing plugin "wiki" with adds CMS like capabilities to your app.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step2':}}
|
||||
<ul class="unstyled">
|
||||
<li>List the names of table that you need.</li>
|
||||
<li>If you do not need authentication remove the table "auth_user".</li>
|
||||
<li>Press enter to create a new input row.</li>
|
||||
<li>Empty rows are ignored.</li>
|
||||
<li>Other tables for role based access control will be created automatically, and do not need to be listed.</li>
|
||||
<li>You will be able to add fields later.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step3':}}
|
||||
<ul class="unstyled">
|
||||
<li>List the fields for this table (do not include an id field, it is automatic), for example "name unique" or "birthday date" or "image upload" or "comments multiple" or "description wiki required"</li>
|
||||
<li>The first keyword(s) for each entry will be used to generate a name for the table field and its label. You can use spaces an other unicode characters.</li>
|
||||
<li>Keywords "string" (default), "text", "integer", "boolean", "float", "double", "file", "date", "time", "datetime", "file", "upload" will be used to determine the field type and they will not be made part of the field name.</ li>
|
||||
<li>For a reference field use a field name, followed by the name of the referenced table.</li>
|
||||
<li>Other special keywords are "required", "notnull" or "notempty", "unique". They map into equivalent validators but (at this time) should only be used with string and text types.</li>
|
||||
<li>The keywords "html" and "wiki" force a text type and set a representation for the field value as sanitized HTML and MARKMIN resepectively.</li>
|
||||
<li>string, integer and reference fields can be "multiple", i.e. multiple values will be allowed</li>
|
||||
<li>For the "auth_user" table do not add attributes to the default fields (username, first_name, last_name, password and email). They are handled automatically.</li>
|
||||
<li>Some fields will be added automatically upon creation and handled automatically: "created_by", "created_on", "modified_by", "modified_on", "active" (only active fields can be selected).</li>
|
||||
<li>For every table "table" another table "table_archive" is created and it contains the previous versions of each record. This is only accessible via appadmin or programmatically.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step4':}}
|
||||
<ul class="unstyled">
|
||||
<li>List the names of the pages you want to create.</li>
|
||||
<li>Some pages are listed automatically because they expose Create/Read/Update/Delete for each tables you have created.</li>
|
||||
<li>All pages, except "error" and those with name starting in underscore willbe listed in the menu. You will be able to edit the menu later.</li>
|
||||
<li>You should have page "index", the starting point of your app, and page "error", where web2py will redirect to in case of error.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step5':}}
|
||||
<ul class="unstyled">
|
||||
<li>Use the markmin syntax to add text to your pages.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step6':}}
|
||||
<ul class="unstyled">
|
||||
<li>Almost done. Click on the button above to create your new app.</li>
|
||||
<li>Once done you will be able to edit it as any normal web2py app.</li>
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /wizard form -->
|
||||
</div>
|
||||
|
||||
<div id="wizard_form" class="fl20 controls">
|
||||
|
||||
<!-- FORM -->
|
||||
|
||||
{{if 'step' in request.function:}}
|
||||
<h3>{{=T('Step')}} {{=step}}</h3>
|
||||
{{if request.function!='step1':}}
|
||||
{{=button(URL('step' + str(int(request.function[-1])-1)), T('back'))}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
<h3>{{=T('Begin')}}</h3>
|
||||
{{pass}}
|
||||
{{if request.function in ('step1','step2','step3','step4','step5'):}}
|
||||
{{=button(URL('step6'), T('skip to generate'))}}
|
||||
{{pass}}
|
||||
<br /><br />
|
||||
{{if request.function in ('step1','step6'):}}
|
||||
<img src="{{=LAYOUTS_APP}}/static/plugin_layouts/layouts/{{=dict(session.app['params'])['layout_theme']}}/preview.png" alt="" align="right" id="preview"/>
|
||||
{{pass}}
|
||||
<div class="form">
|
||||
{{=form}}
|
||||
</div>
|
||||
<script>
|
||||
jQuery(function(){
|
||||
var t=jQuery('#no_table_layout_theme');
|
||||
t.change(function(){
|
||||
jQuery('#preview').attr('src','{{=LAYOUTS_APP}}/static/plugin_layouts/layouts/'+t.val()+'/preview.png');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- INSTRUCTIONS -->
|
||||
<div class="box">
|
||||
<h4>Instructions</h4>
|
||||
<div class="help">
|
||||
{{if request.function=='index':}}
|
||||
<ul>
|
||||
<li>Insert the name of a new app.</li>
|
||||
<li>If the app exists and was created with the wizard, you will be able to edit it, but any manual editing to the app <b>will be lost</b>.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step1':}}
|
||||
<ul>
|
||||
<li>This Wizard will help you build a new web2py app.</li>
|
||||
<li>You can create an app with a name that already exists.</li>
|
||||
<li>If you do not have an email server set email server to "logging".</li>
|
||||
<li>If you want to use Janrain Engage for login: 1) Sign up for a <a href="http://www.janrain.com/products/engage">Janrain Engage</a> account; 2) Register you hostname, domain, and obtain an api key; 3) Set Login Config above to "domain:api_key".</li>
|
||||
<li>ATTENTION: you can use the wizard to download plugins BUT we cannot guarantee the stability or backward compatibility of plugins. Moreover plugins may conflict with each other. Anyway, we do recommend installing plugin "wiki" with adds CMS like capabilities to your app.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step2':}}
|
||||
<ul>
|
||||
<li>List the names of table that you need.</li>
|
||||
<li>If you do not need authentication remove the table "auth_user".</li>
|
||||
<li>Press enter to create a new input row.</li>
|
||||
<li>Empty rows are ignored.</li>
|
||||
<li>Other tables for role based access control will be created automatically, and do not need to be listed.</li>
|
||||
<li>You will be able to add fields later.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step3':}}
|
||||
<ul>
|
||||
<li>List the fields for this table (do not include an id field, it is automatic), for example "name unique" or "birthday date" or "image upload" or "comments multiple" or "description wiki required"</li>
|
||||
<li>The first keyword(s) for each entry will be used to generate a name for the table field and its label. You can use spaces an other unicode characters.</li>
|
||||
<li>Keywords "string" (default), "text", "integer", "boolean", "float", "double", "file", "date", "time", "datetime", "file", "upload" will be used to determine the field type and they will not be made part of the field name.</ li>
|
||||
<li>For a reference field use a field name, followed by the name of the referenced table.</li>
|
||||
<li>Other special keywords are "required", "notnull" or "notempty", "unique". They map into equivalent validators but (at this time) should only be used with string and text types.</li>
|
||||
<li>The keywords "html" and "wiki" force a text type and set a representation for the field value as sanitized HTML and MARKMIN resepectively.</li>
|
||||
<li>string, integer and reference fields can be "multiple", i.e. multiple values will be allowed</li>
|
||||
<li>For the "auth_user" table do not add attributes to the default fields (username, first_name, last_name, password and email). They are handled automatically.</li>
|
||||
<li>Some fields will be added automatically upon creation and handled automatically: "created_by", "created_on", "modified_by", "modified_on", "active" (only active fields can be selected).</li>
|
||||
<li>For every table "table" another table "table_archive" is created and it contains the previous versions of each record. This is only accessible via appadmin or programmatically.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step4':}}
|
||||
<ul>
|
||||
<li>List the names of the pages you want to create.</li>
|
||||
<li>Some pages are listed automatically because they expose Create/Read/Update/Delete for each tables you have created.</li>
|
||||
<li>All pages, except "error" and those with name starting in underscore willbe listed in the menu. You will be able to edit the menu later.</li>
|
||||
<li>You should have page "index", the starting point of your app, and page "error", where web2py will redirect to in case of error.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step5':}}
|
||||
<ul>
|
||||
<li>Use the markmin syntax to add text to your pages.</li>
|
||||
</ul>
|
||||
{{elif request.function=='step6':}}
|
||||
<ul>
|
||||
<li>Almost done. Click on the button above to create your new app.</li>
|
||||
<li>Once done you will be able to edit it as any normal web2py app.</li>
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//jQuery(document).ready(function() {
|
||||
//jQuery(":input:visible:enabled:first").focus();
|
||||
//});
|
||||
</script>
|
||||
<!-- end "step" block -->
|
||||
Reference in New Issue
Block a user