initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}about{{end}}
|
||||
|
||||
<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>
|
||||
<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>
|
||||
@@ -0,0 +1,76 @@
|
||||
<style>
|
||||
.acw-chap pre, .acw-chap pre span, span.acw-char-check, .acw-chap .selection-area div
|
||||
{
|
||||
font:11px 'Courier', monospaced;
|
||||
line-height:11px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
border:0;
|
||||
}
|
||||
|
||||
.acw-chap .wrapped-row
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-wrapped-row.gif');
|
||||
background-repeat:no-repeat;
|
||||
background-position:25px 4px;
|
||||
}
|
||||
.acw-chap .sidebar
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bg-sidebar.gif');
|
||||
line-height:11px;
|
||||
}
|
||||
.acw-chap .sidebar .row-number
|
||||
{
|
||||
text-align:right;
|
||||
font-size:9px;
|
||||
font-family:'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
|
||||
color:#999;
|
||||
}
|
||||
|
||||
.acw-chap .folding-expand-inner
|
||||
{
|
||||
width:14px;
|
||||
height:10px;
|
||||
margin-left:2px;
|
||||
display:inline;
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand-inner.gif');
|
||||
}
|
||||
.acw-chap .folding-expand
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand.gif');
|
||||
}
|
||||
.acw-chap .folding-start
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-start.gif');
|
||||
}
|
||||
.acw-chap .folding-stop
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-stop.gif');
|
||||
}
|
||||
.acw-chap .bookmark-default
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bookmark-default.gif');
|
||||
}
|
||||
.acw-chap .void
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/void.gif');
|
||||
}
|
||||
</style>
|
||||
<script src="{{=URL(r=request,c='static',f='eamy/eamy.js')}}" type="text/javascript"></script>
|
||||
<script src="{{=URL(r=request,c='static',f='js/jquery.hotkeys.js')}}" type="text/javascript" charset="utf-8"></script>
|
||||
{{if request.args[1]=="views":}}
|
||||
<script src="{{=URL(r=request,c='static',f='eamy/bundle_markup.js')}}" type="text/javascript"></script>
|
||||
{{else:}}
|
||||
<script src="{{=URL(r=request,c='static',f='eamy/bundle_python.js')}}" type="text/javascript"></script>
|
||||
{{pass}}
|
||||
<script language="Javascript" type="text/javascript" src="/{{=request.application}}/static/js/ajax_editor.js"></script>
|
||||
|
||||
<script language="Javascript" type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
setTimeout("keepalive('{{=URL('keepalive')}}')",10000);
|
||||
|
||||
});
|
||||
jQuery(document).bind('keydown', 'alt+f1',function (evt){
|
||||
doClickSave();
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,9 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}change_password{{end}}
|
||||
|
||||
<h2>Change Admin Password</h2>
|
||||
|
||||
<div class="pwform">
|
||||
{{=form}}
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}delete{{end}}
|
||||
|
||||
<div class="center">
|
||||
<h2>{{=T('Are you sure you want to delete file "%s"?', filename)}}</h2>
|
||||
<p>{{=FORM(INPUT(_type='submit',_name='nodelete',_value=T('Abort')),INPUT(_type='hidden',_name='sender',_value=sender), _class="inline")}}{{=FORM(INPUT(_type='submit',_name='delete',_value=T('Delete')),INPUT(_type='hidden',_name='sender',_value=sender), _class="inline")}}</p>
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}delete_plugin{{end}}
|
||||
|
||||
<div class="center">
|
||||
<h2>{{=T('Are you sure you want to delete plugin "%s"?', plugin)}}</h2>
|
||||
<p>{{=FORM(INPUT(_type='submit',_name='nodelete',_value=T('NO')))}}</p>
|
||||
<p>{{=FORM(INPUT(_type='submit',_name='delete',_value=T('YES')))}}</p>
|
||||
</div>
|
||||
@@ -0,0 +1,313 @@
|
||||
{{extend 'layout.html'}}
|
||||
{{
|
||||
def all(items):
|
||||
return reduce(lambda a,b:a and b,items,True)
|
||||
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)))
|
||||
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)))
|
||||
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):
|
||||
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="sender",_value=URL('design',args=app)),
|
||||
INPUT(_type="submit",_value=T("upload")),_action=URL('upload_file'))
|
||||
return form
|
||||
def file_create_form(location):
|
||||
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="submit",_value=T("Create")),_action=URL('create_file'))
|
||||
return form
|
||||
def upload_plugin_form(app):
|
||||
form=FORM(T("upload plugin file:")," ",
|
||||
INPUT(_type="file",_name="pluginfile"),
|
||||
INPUT(_type="submit",_value=T("upload")))
|
||||
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)))
|
||||
}}
|
||||
|
||||
{{block sectionclass}}design{{end}}
|
||||
|
||||
<h2>{{=T("Edit application")}} "{{=A(app,_href=URL(app,'default','index'),_target="_blank")}}"</h2>
|
||||
|
||||
<!-- COLLAPSE/JUMP-TO BUTTONS -->
|
||||
<div class="right-full controls">
|
||||
<p>
|
||||
{{=searchbox('search')}}
|
||||
<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('#languages', T("languages"))}}
|
||||
{{=button('#static', T("static"))}}
|
||||
{{=button('#modules', T("modules"))}}
|
||||
{{=button('#plugins', T("plugins"))}}
|
||||
</span>
|
||||
</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>
|
||||
<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}}
|
||||
</div>
|
||||
{{pass}}
|
||||
|
||||
<ul>
|
||||
{{for m in models:}}
|
||||
<li id="models__{{=m.replace('.','__')}}">
|
||||
<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>
|
||||
<div class="controls formfield">{{=file_create_form('%s/models/' % app)}}</div>
|
||||
</div>
|
||||
|
||||
<!-- FIND CONTROLLER FUNCTIONS -->
|
||||
{{
|
||||
controller_functions=[]
|
||||
for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functions[c]]
|
||||
}}
|
||||
|
||||
<!-- 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>
|
||||
<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:}}
|
||||
<li id="controllers__{{=c.replace('.','__')}}">
|
||||
<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>
|
||||
<div class="controls formfield">{{=file_create_form('%s/controllers/' % app)}}</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>
|
||||
<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:}}
|
||||
<li id="views__{{=c.replace('/','__').replace('.','__')}}">
|
||||
<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>
|
||||
<div class="controls formfield">{{=file_create_form('%s/views/' % app)}}</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>
|
||||
<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}}
|
||||
<ul>
|
||||
{{for file in languages:}}
|
||||
<li id="languages__{{=file.replace('.','__')}}">
|
||||
<span class="filetools controls">
|
||||
{{=editlanguagefile('languages',file)}}
|
||||
{{=deletefile([app, 'languages', file])}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('languages',file)}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">{{=file_create_form('%s/languages/' % app)}}{{=T('(something like "it-it")')}}</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>
|
||||
<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)}} {{=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>
|
||||
<div class="controls formfield">{{=file_create_form('%s/static/' % app)}}
|
||||
{{=file_upload_form('%s/static/' % app)}}</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>
|
||||
<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:}}
|
||||
<li id="modules__{{=m.replace('/','__').replace('.','__')}}">
|
||||
<span class="filetols controls">
|
||||
{{=editfile('modules',m)}}
|
||||
{{if m!='__init__.py':}}{{=deletefile([app, 'modules', m])}}{{pass}}
|
||||
</span>
|
||||
<span class="file">
|
||||
{{=peekfile('modules',m)}}
|
||||
</span>
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
<div class="controls formfield">{{=file_create_form('%s/modules/' % app)}}
|
||||
{{=file_upload_form('%s/modules/' % app)}}</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>
|
||||
<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:}}
|
||||
<li>
|
||||
{{=A('plugin_%s' % plugin, _class='file', _href=URL('plugin', args=[app, plugin]))}}
|
||||
</li>
|
||||
{{pass}}
|
||||
</ul>
|
||||
{{else:}}
|
||||
<p><strong>{{=T('There are no plugins')}}</strong></p>
|
||||
{{pass}}
|
||||
<div class="controls formfield">{{=upload_plugin_form(app)}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function(){
|
||||
jQuery('#search').keyup(function(e){
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if(code==13 && jQuery('#search').val()){
|
||||
jQuery.getJSON('{{=URL('search',args=request.args)}}?keywords='+escape(jQuery('#search').val()),null,function(data, textStatus, xhr){
|
||||
jQuery('.component_contents li, .formfield, .comptools').hide();
|
||||
files=data['files'];
|
||||
for(var i=0; i<files.length; i++)
|
||||
jQuery('li#'+files[i].replace(/\//g,'__').replace('.','__')).slideDown();
|
||||
jQuery('.flash').html('{{=T("Searching:")}} '+files.length+' {{=T("files")}}').slideDown();
|
||||
});
|
||||
} else if(code==13) {
|
||||
jQuery('.component_contents li, .formfield, .comptools').slideDown();
|
||||
jQuery('.flash').html('').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,13 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}upgrade{{end}}
|
||||
|
||||
<h2>{{=T('web2py downgrade')}}</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 downgrade you do it at your own risk')}}<br />
|
||||
{{=T('If start the downgrade, be patient, it may take a while to rollback')}}</p>
|
||||
|
||||
<div class="center">
|
||||
{{=FORM(INPUT(_type='submit',_name='nodowngrade',_value=T('Cancel')), _class='inline')}}
|
||||
{{=FORM(INPUT(_type='submit',_name='downgrade',_value=T('Downgrade')), _class='inline')}}
|
||||
</div>
|
||||
@@ -0,0 +1,92 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{
|
||||
def shortcut(combo, description):
|
||||
return XML('<li><tt>%s</tt> %s</li>' % (combo, description))
|
||||
}}
|
||||
|
||||
{{if TEXT_EDITOR == 'amy':}}
|
||||
{{include 'default/amy_ajax.html'}}
|
||||
{{else:}}
|
||||
<script language="Javascript" type="text/javascript" src="{{=URL(r=request,c='static',f='edit_area/edit_area_full.js')}}"></script><script language="Javascript" type="text/javascript">
|
||||
editAreaLoader.init({id: "body",start_highlight: true,allow_resize: "both",allow_toggle: {{=editarea_preferences['ALLOW_TOGGLE']}},language: "en",syntax: "{{=filetype}}",replace_tab_by_spaces: {{=editarea_preferences['REPLACE_TAB_BY_SPACES']}}, font_size: {{=editarea_preferences['FONT_SIZE']}}, fullscreen: {{=editarea_preferences['FULL_SCREEN']}}, display: "{{=editarea_preferences['DISPLAY']}}", show_line_colors: true, word_wrap: true, save_callback: "doClickSave" {{if filetype=='html':}},plugins: "zencoding"{{pass}} });
|
||||
</script>
|
||||
<script language="Javascript" type="text/javascript" src="{{=URL('static','js/ajax_editor.js')}}"></script>
|
||||
<script language="Javascript" type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
setTimeout("keepalive('{{=URL('keepalive')}}')",10000);
|
||||
});
|
||||
</script>
|
||||
{{pass}}
|
||||
|
||||
{{block sectionclass}}edit{{end}}
|
||||
|
||||
<h2>{{=T('Editing file "%s"',filename)}}</h2>
|
||||
|
||||
{{if functions:}}
|
||||
<p class="formfield">
|
||||
<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>
|
||||
{{if editviewlinks:}}<br/>
|
||||
{{=B(T('edit views:'))}}
|
||||
{{=XML(', '.join([v.xml() for v in editviewlinks]))}}
|
||||
{{pass}}
|
||||
</p>
|
||||
{{pass}}
|
||||
|
||||
<p class="right controls">
|
||||
{{=button(URL('design',args=request.args[0]), T('back'))}}
|
||||
{{if edit_controller:}}
|
||||
{{=button(edit_controller, T('edit controller'))}}
|
||||
{{pass}}
|
||||
{{if view_link:}}
|
||||
{{=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>
|
||||
{{pass}}
|
||||
<a class="button" href="http://www.web2py.com/examples/static/epydoc/index.html" target="_blank"><span>{{=T('docs')}}</span></a>
|
||||
</p>
|
||||
|
||||
<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"/>
|
||||
{{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>
|
||||
{{else:}}
|
||||
<textarea cols="80" rows="25" id="body" style="direction:ltr;" name="data">{{=data}}</textarea>
|
||||
{{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.')}}
|
||||
<br/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{if filetype=='html':}}
|
||||
<div class="help">
|
||||
<h3>Key bindings for ZenCoding Plugin</h3>
|
||||
<ul>
|
||||
{{=shortcut('Ctrl+S', 'Save via Ajax')}}
|
||||
{{=shortcut('Ctrl+,', 'Expand Abbreviation')}}
|
||||
{{=shortcut('Ctrl+M', 'Match Pair')}}
|
||||
{{=shortcut('Ctrl+H', 'Wrap with Abbreviation')}}
|
||||
{{=shortcut('Shift+Ctrl+M', 'Merge Lines')}}
|
||||
{{=shortcut('Ctrl+Shift+←', 'Previous Edit Point')}}
|
||||
{{=shortcut('Ctrl+Shift+→', 'Next Edit Point')}}
|
||||
{{=shortcut('Ctrl+Shift+↑', 'Go to Matching Pair')}}
|
||||
</ul>
|
||||
</div>
|
||||
{{else:}}
|
||||
<div class="help">
|
||||
<h3>Key bindings</h3>
|
||||
<ul>
|
||||
{{=shortcut('Ctrl+S', 'Save via Ajax')}}
|
||||
</ul>
|
||||
</div>
|
||||
{{pass}}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{extend 'layout.html'}}
|
||||
<script>
|
||||
function delkey(id) {
|
||||
jQuery('#'+id).hide();
|
||||
jQuery('#'+id+' INPUT').val(String.fromCharCode(127));
|
||||
jQuery('#'+id+' TEXTAREA').val(String.fromCharCode(127));
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
{{block sectionclass}}edit_language{{end}}
|
||||
|
||||
<h2>{{=T('Editing Language file')}} "{{=filename}}"</h2>
|
||||
|
||||
<div class="languageform">
|
||||
{{=form}}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
{{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;
|
||||
}
|
||||
</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>
|
||||
|
||||
<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
|
||||
<a class="button" href="{{=URL(args=[app, 'dbnew'])}}"><span>switch to : db</span></a>
|
||||
<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
|
||||
<a class="button" href="{{=URL(args=[app, 'dbold'])}}"><span>switch to : db</span></a>
|
||||
<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>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
{{extend 'layout.html'}}
|
||||
<script type="text/javascript">
|
||||
jQuery(function() {
|
||||
jQuery("#password").focus();
|
||||
});
|
||||
</script>
|
||||
|
||||
{{block sectionclass}}login{{end}}
|
||||
|
||||
<h2>web2py™ {{=T('Web Framework')}}</h2>
|
||||
<h3>{{=T('Login to the Administrative Interface')}}</h3>
|
||||
<p class="help">{{=T('ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.')}}</p>
|
||||
<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>
|
||||
@@ -0,0 +1,16 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}peek{{end}}
|
||||
|
||||
<h2>{{=T("Peeking at file")}} "{{=filename}}"</h2>
|
||||
|
||||
<p class="controls">
|
||||
{{=button(URL('design',args=request.args[0]), T('back'))}}
|
||||
{{=button(URL('edit',args=request.args), T('Edit'))}}
|
||||
</p>
|
||||
|
||||
{{
|
||||
if filename[-3:]=='.py': language='python'
|
||||
else: language='html'
|
||||
}}
|
||||
{{=CODE(data,language=language,link='/examples/global/vars/')}}
|
||||
@@ -0,0 +1,221 @@
|
||||
{{extend 'layout.html'}}
|
||||
{{
|
||||
import os
|
||||
def all(items):
|
||||
return reduce(lambda a,b:a and b,items,True)
|
||||
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)))
|
||||
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)))
|
||||
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):
|
||||
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="sender",_value=URL('design/'+app)),
|
||||
INPUT(_type="submit",_value=T("submit")),_action=URL('upload_file'))
|
||||
return form
|
||||
def file_create_form(location):
|
||||
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/'+app)),
|
||||
INPUT(_type="submit",_value=T("submit")),_action=URL('create_file'))
|
||||
return form
|
||||
def upload_plugin_form(app):
|
||||
form=FORM(T("upload plugin file:")," ",
|
||||
INPUT(_type="file",_name="pluginfile"),
|
||||
INPUT(_type="submit",_value=T("submit")))
|
||||
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)))
|
||||
}}
|
||||
|
||||
{{block sectionclass}}plugin{{end}}
|
||||
|
||||
<h2>
|
||||
{{=T('Plugin "%s" in application', request.args(1))}} "{{=app}}"
|
||||
</h2>
|
||||
<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('plugin',args=app), T("back"))}}
|
||||
{{=sp_button(URL('delete_plugin',args=request.args), T("delete plugin"))}}
|
||||
{{=sp_button(URL('pack_plugin',args=request.args), T("pack plugin"))}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- MODELS -->
|
||||
|
||||
<h3 id="models" onclick="collapse('models_inner');" class="component">
|
||||
{{=T("Models")}}
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<!-- FIND CONTROLLER FUNCTIONS -->
|
||||
{{
|
||||
controller_functions=[]
|
||||
for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functions[c]]
|
||||
}}
|
||||
|
||||
<!-- CONTROLLERS -->
|
||||
|
||||
<h3 id="controllers" onclick="collapse('controllers_inner');" class="component">
|
||||
{{=T("Controllers")}}
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<!-- VIEWS -->
|
||||
|
||||
<h3 id="views" onclick="collapse('views_inner');" class="component">
|
||||
{{=T("Views")}}
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<!-- STATIC -->
|
||||
|
||||
<h3 id="static" onclick="collapse('static_inner');" class="component">
|
||||
{{=T("Static files")}}
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<!-- MODULES -->
|
||||
|
||||
<h3 id="modules" onclick="collapse('modules_inner');" class="component">
|
||||
{{=T("Modules")}}
|
||||
</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>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}resolve{{end}}
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="form">
|
||||
<form action="{{=URL(r=request,args=request.args)}}" method="post">
|
||||
{{=diff}}
|
||||
<input type="submit" name="merge" value="{{=T('merge')}}" /><br/>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,158 @@
|
||||
{{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 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>{{="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'))}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<div class="formfield">
|
||||
Running on {{=request.env.server_software}}
|
||||
</div>
|
||||
<p>{{=button(URL('default','reload_routes'), T('Reload routes'))}}</p>
|
||||
</div>
|
||||
{{pass}}
|
||||
<!-- APP WIZARD -->
|
||||
<div class="box">
|
||||
<h3>{{=T("New application wizard")}}</h3>
|
||||
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}
|
||||
{{=T("(requires internet access)")}}</p>
|
||||
</div>
|
||||
<!-- SCAFFOLD APP -->
|
||||
<div class="box">
|
||||
<h3>{{=T("New simple application")}}</h3>
|
||||
<form action="" enctype="multipart/form-data" method="post">
|
||||
<div class="formfield">
|
||||
{{=LABEL(T("Application name:"), _for="scaffold_filename")}}
|
||||
<input name="filename" type="text" id="scaffold_filename" />
|
||||
<button type="submit" class="button">{{=T('Create')}}</button>
|
||||
</div>
|
||||
<div class="hidden"></div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- UPLOAD PACKAGE -->
|
||||
<div class="box">
|
||||
<h3>{{=T("Upload and install packed application")}}</h3>
|
||||
<form action="" enctype="multipart/form-data" method="post">
|
||||
<div class="formfield">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
{{=LABEL(T("Application name:"), _form='upload_filename')}}
|
||||
</td>
|
||||
<td>
|
||||
<input id="appname" name="filename" type="text" id="upload_filename" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{=LABEL(T("Upload a package:"), _for='upload_file')}}
|
||||
</td>
|
||||
<td>
|
||||
<input id="file" name="file" type="file" id="upload_file" />
|
||||
<b>OR</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{=LABEL(T("Get from URL:"), _for='upload_url')}}
|
||||
</td>
|
||||
<td>
|
||||
<input id="appurl" name="appurl" type="text" id="upload_url"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<input type="checkbox" name="overwrite_check" id="upload_overwrite" />
|
||||
{{=LABEL(T("Overwrite installed app"), _for='upload_overwrite')}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<button type="submit">{{=T('Install')}}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- DEPLOY ON GAE -->
|
||||
<div class="box">
|
||||
<h3>{{=T("Deploy on Google App Engine")}}</h3>
|
||||
<p>{{=button(URL('gae','deploy'), T('Deploy'))}}</p>
|
||||
</div><br/>
|
||||
{{if TWITTER_HASH:}}
|
||||
<div class="box">
|
||||
<h3>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h3>
|
||||
<div id="tweets">{{=T('loading...')}}</div>
|
||||
<script>
|
||||
jQuery(document).ready(function(){jQuery('#tweets').load('{{=URL('twitter')}}')});
|
||||
</script>
|
||||
</div>
|
||||
{{pass}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,20 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}test{{end}}
|
||||
|
||||
<h2>{{=T('Testing application')}} "{{=app}}"</h2>
|
||||
|
||||
{{for controller in sorted(controllers):}}
|
||||
<div id='output_{{=controller[:-3]}}'>
|
||||
<h3>Testing controller "{{=controller}}"... <blink>please wait!</blink></h3>
|
||||
</div>
|
||||
|
||||
<script><!--
|
||||
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>
|
||||
@@ -0,0 +1,132 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}ticket{{end}}
|
||||
|
||||
<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>
|
||||
<tr>
|
||||
<th>Python</th>
|
||||
<td>{{=snapshot.get('pyver','')}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
@@ -0,0 +1,130 @@
|
||||
{{block sectionclass}}ticket{{end}}
|
||||
|
||||
<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>
|
||||
<tr>
|
||||
<th>Python</th>
|
||||
<td>{{=snapshot.get('pyver','')}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
@@ -0,0 +1,9 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
<center>
|
||||
<h2>{{=T('Are you sure you want to uninstall application "%s"?', app)}}</h2>
|
||||
<table><tr>
|
||||
<td>{{=FORM(INPUT(_type='submit',_name='nodelete',_value=T('Abort')))}}</td>
|
||||
<td>{{=FORM(INPUT(_type='submit',_name='delete',_value=T('Uninstall')))}}</td>
|
||||
</tr></table>
|
||||
</center>
|
||||
@@ -0,0 +1,13 @@
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block sectionclass}}upgrade{{end}}
|
||||
|
||||
<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>
|
||||
|
||||
<div class="center">
|
||||
{{=FORM(INPUT(_type='submit',_name='noupgrade',_value=T('Cancel')), _class='inline')}}
|
||||
{{=FORM(INPUT(_type='submit',_name='upgrade',_value=T('Upgrade')), _class='inline')}}
|
||||
</div>
|
||||
@@ -0,0 +1,19 @@
|
||||
{{extend 'layout.html'}}
|
||||
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
|
||||
<div id="web2py_user_form">
|
||||
{{=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>
|
||||
Reference in New Issue
Block a user