fixed some layout problems

This commit is contained in:
Massimo
2013-03-08 16:30:11 -06:00
parent 7ee638bc36
commit 523c813439
16 changed files with 248 additions and 213 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.2-stable+timestamp.2013.03.08.12.05.24
Version 2.4.2-stable+timestamp.2013.03.08.16.29.39
+4 -8
View File
@@ -148,9 +148,7 @@ def check_version():
elif platform.system().lower() in ('windows', 'win32', 'win64') and os.path.exists("web2py.exe"):
return SPAN('You should upgrade to version %s.%s.%s' % version_number[:3])
else:
return sp_button(URL('upgrade_web2py'), T('upgrade now')) \
+ XML(' <strong class="upgrade_version">%s.%s.%s</strong>'
% version_number[:3])
return sp_button(URL('upgrade_web2py'), T('upgrade now to %s') % version_number.split('-')[0])
def logout():
@@ -205,14 +203,12 @@ def site():
is_appname = IS_VALID_APPNAME()
form_create = SQLFORM.factory(Field('name', requires=is_appname),
table_name='appcreate',
_class='well well-small')
table_name='appcreate')
form_update = SQLFORM.factory(Field('name', requires=is_appname),
Field('file', 'upload', uploadfield=False),
Field('url'),
Field('overwrite', 'boolean'),
table_name='appupdate',
_class='well well-small')
table_name='appupdate')
form_create.process()
form_update.process()
@@ -1430,7 +1426,7 @@ def errors():
hash2error[hash]['count'] += 1
except KeyError:
error_lines = error['traceback'].split("\n")
last_line = error_lines[-2]
last_line = error_lines[-2] if len(error_lines)>1 else 'unknown'
error_causer = os.path.split(error['layer'])[1]
hash2error[hash] = dict(count=1, pickel=error,
causer=error_causer,
+1 -1
View File
@@ -23,7 +23,7 @@ if request.vars.app or request.args:
if os.path.exists('applications/examples'):
response.menu.append(
(T('Help'), False, URL('examples', 'default', 'index')))
(T('Help'), False, URL('examples', 'default', 'examples')))
else:
response.menu.append((T('Help'), False, 'http://web2py.com/examples'))
+18 -3
View File
@@ -99,7 +99,7 @@ margin-bottom:7px;
{
clear:right;
margin-top:2em;
border-top:1px dotted;
border-top:1px solid #d1d1d1;
padding:0 1em;
}
.pwdchange>.button{margin-bottom:10px;}
@@ -188,14 +188,15 @@ vertical-align:middle;
.celled
{
display:inline-block;
padding: 4px 0 0 0;
padding: 0 0 0 4px;
vertical-align:top;
margin-top:4px;
width:700px;
}
.folder
{
border-left: 1px dotted #AAA;
list-style-type:none;
#border-left: 1px dotted #AAA;
}
.folder li
{
@@ -819,4 +820,18 @@ background-color:#FC0;
{
width:165px;
}
}
h4.editableapp,
h4.currentapp {
padding: 5px 0 5px 54px;
display: inline;
}
h4.editableapp {
background: #fff url(../images/folder.png) no-repeat;
}
h4.currentapp {
background: #fff url(../images/folder_locked.png) no-repeat;
}
+48 -39
View File
@@ -7,7 +7,7 @@ def peekfile(path,file,vars={},title=None):
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 btn',_href=URL('edit', args=args, vars=vars))
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_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')"))),
@@ -17,9 +17,9 @@ def testfile(path,file):
**{'_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 btn',_href=URL('edit_language', args=(app, path, file), vars=vars))
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit_language', args=(app, path, file), vars=vars))
def editpluralsfile(path,file,vars={}):
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit_plurals', args=(app, path, file), vars=vars))
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit_plurals', args=(app, path, file), vars=vars))
def file_upload_form(location, anchor=None):
form=FORM(
LABEL(T("upload file:")),
@@ -92,7 +92,7 @@ def deletefile(arglist, vars={}):
<!-- MODELS -->
<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')}}">
<a href="#models" rel="tooltip" data-placement="span3" 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">&nbsp;</span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
@@ -125,9 +125,10 @@ def deletefile(arglist, vars={}):
</ul>
{{pass}}
<div class="controls formfield">
<div class="row-fluid">
<div class="span3">{{=file_create_form('%s/models/' % app, 'models')}}</div>
</div>
<button onclick="jQuery('#form1').slideToggle()" class="btn btn-mini">Create</button>
<div id="form1" class="row-fluid" style="display:none">
<div class="span3">{{=file_create_form('%s/models/' % app, 'models')}}</div>
</div>
</div>
</div>
@@ -140,7 +141,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
<!-- CONTROLLERS -->
<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')}}">
<a href="#controllers" rel="tooltip" data-placement="span3" 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">&nbsp;</span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
@@ -172,16 +173,17 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
</ul>
{{pass}}
<div class="controls formfield">
<div class="row-fluid">
<div class="span3">{{=file_create_form('%s/controllers/' % app, 'controllers')}}</div>
</div>
<button onclick="jQuery('#form2').slideToggle()" class="btn btn-mini">Create</button>
<div id="form2" class="row-fluid" style="display:none">
<div class="span3">{{=file_create_form('%s/controllers/' % app, 'controllers')}}</div>
</div>
</div>
</div>
<!-- VIEWS -->
<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')}}">
<a href="#views" rel="tooltip" data-placement="span3" 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">&nbsp;</span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
@@ -211,16 +213,17 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
</ul>
{{pass}}
<div class="controls formfield">
<div class="row-fluid">
<div class="span3">{{=file_create_form('%s/views/' % app, 'views')}}</div>
</div>
<button onclick="jQuery('#form3').slideToggle()" class="btn btn-mini">Create</button>
<div id="form3" class="row-fluid" style="display:none">
<div class="span3">{{=file_create_form('%s/views/' % app, 'views')}}</div>
</div>
</div>
</div>
<!-- LANGUAGES -->
<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')}}">
<a href="#languages" rel="tooltip" data-placement="span3" data-original-title="{{=T('Translation strings for the application')}}">
{{=helpicon()}}
<span>{{=T("Translation strings for the application")}}</span>
</a><span id="languages" class="hashstick">&nbsp;</span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
@@ -274,16 +277,17 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
</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>
<button onclick="jQuery('#form4').slideToggle()" class="btn btn-mini">Create</button>
<div id="form4" class="row-fluid" style="display:none">
<div class="span3">{{=file_create_form('%s/languages/' % app, 'languages', T('(something like "it-it")'))}}</div>
</div>
</div>
</div>
<!-- STATIC -->
<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')}}">
<a href="#static" rel="tooltip" data-placement="span3" 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">&nbsp;</span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
@@ -328,17 +332,18 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
</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>
<button onclick="jQuery('#form4').slideToggle()" class="btn btn-mini">Create/Upload</button>
<div id="form4" class="row-fluid" style="display:none">
<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" 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')}}">
<a href="#modules" rel="tooltip" data-placement="span3" data-original-title="{{=T('Additional code for your application')}}">
{{=helpicon()}}
<span>{{=T("Additional code for your application")}}</span>
</a><span id="modules" class="hashstick">&nbsp;</span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
@@ -363,17 +368,18 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
</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>
<button onclick="jQuery('#form5').slideToggle()" class="btn btn-mini">Create/Upload</button>
<div id="form5" class="row-fluid" style="display:none">
<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" 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')}}">
<a href="#private" rel="tooltip" data-placement="span3" 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">&nbsp;</span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
@@ -419,17 +425,18 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
{{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>
<button onclick="jQuery('#form6').slideToggle()" class="btn btn-mini">Create/Upload</button>
<div id="form6" class="row-fluid" style="display:none">
<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" 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]')}}">
<a href="#plugins" rel="tooltip" data-placement="span3" 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">&nbsp;</span><a href="#" class="tophashlink btn btn-mini btn-warning"><span>top</span></a>
@@ -451,10 +458,12 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
<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>
<button onclick="jQuery('#form7').slideToggle()" class="btn btn-mini">Upload</button>
<div id="form7" class="row-fluid" style="display:none">
<div class="row-fluid">
<div class="span3">{{=upload_plugin_form(app, 'plugins')}}</div>
</div>
</div>
</div>
<script>
+1 -1
View File
@@ -132,7 +132,7 @@ jQuery(document).ready(function(){
<form action="{{=URL('edit',args=filename)}}" method="post" name="editform" id="editform">
<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);">
<a value="save" name="save" onclick="return doClickSave();" class="icon saveicon" style="background-image: -webkit-linear-gradient(top,white,#E6E6E6);">
{{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
</a>
</div>
+3 -3
View File
@@ -6,7 +6,7 @@ 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 btn',_href=URL('edit', args=(app, path, file)))
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_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"))),
@@ -16,7 +16,7 @@ def testfile(path,file):
**{'_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)))
return A(SPAN(T('Edit')),_class='button editbutton btn-mini',_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:")," ",
@@ -220,4 +220,4 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
</ul>
{{pass}}
</div>
<!-- end "plugin" block -->
<!-- end "plugin" block -->
+152 -138
View File
@@ -3,143 +3,157 @@
{{block sectionclass}}site{{end}}
<!-- 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 class="applist f60 span7">
<div class="applist_inner">
<h2>{{=T("Installed applications")}}</h2>
<table width="100%" class="table">
{{for a in apps:}}
<tr>{{buttons = []}}
<td>
{{if a==request.application:}}
<h4 class="currentapp">{{=a}} ({{=T('currently running')}})</h4>
{{else:}}
<h4 class="editableapp">{{=A(a,_href=URL(a,'default','index'))}}</h4>
{{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}}
{{if not os.path.exists('applications/%s/compiled' % a):}}
{{buttons.append((URL('design',args=a), T("Edit")))}}
{{else:}}
{{buttons.append((URL(a,'appadmin','index'), T("appadmin")))}}
{{pass}}
{{buttons.append((URL('about',args=a), T("About")))}}
{{pass}}
{{buttons.append((URL('errors',args=a), T("Errors")))}}
{{buttons.append((URL('cleanup',args=a), T("Clean")))}}
{{buttons.append((URL('pack',args=a), T("Pack all")))}}
{{if not os.path.exists('applications/%s/compiled' % a):}}
{{buttons.append((URL('compile_app',args=a), T("Compile")))}}
{{else:}}
{{buttons.append((URL('pack',args=(a, 'compiled')), T("Pack compiled")))}}
{{if glob.glob('applications/%s/controllers/*.py' % a):}}
{{buttons.append((URL('remove_compiled_app',args=a), T("Remove compiled")))}}
{{pass}}
{{pass}}
{{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }}
{{buttons.append((URL('git_pull',args=a), T("Git Pull")))}}
{{buttons.append((URL('git_push',args=a), T("Git Push")))}}
{{pass}}
{{if a!=request.application:}}
{{buttons.append((URL('uninstall',args=a), T("Uninstall")))}}
{{pass}}
</td>
<td>
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
{{=T('Manage')}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{{for link,name in buttons:}}
{{=LI(A(name,_href=link))}}
{{pass}}
</ul>
</div>
{{=button_enable(URL('enable',args=a), a)}}
</td>
</tr>
{{pass}}
</table>
</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'))}}
{{=button(URL('default','reload_routes'), T('Reload routes'))}}
{{pass}}
</div> <!-- /CHANGE ADMIN PWD -->
{{if is_manager():}}
<!-- VERSION -->
<div class="box">
<h4>{{=T("Version")}}</h4>
<p>
<tt>{{=myversion}}</tt><br/>
({{=T("Running on %s", request.env.server_software)}})
</p>
<p id="check_version" class="row-buttons">
{{if session.check_version:}}
{{=T('Checking for upgrades...')}}
<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'))}}
{{pass}}
</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">
<h4>{{=T("Multi User Mode")}}</h4>
<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}}
<!-- SCAFFOLD APP -->
<div class="box">
<h4>{{=T("New simple application")}}</h4>
{{=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">
<h4>{{=T("Upload and install packed application")}}</h4>
{{=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">
<h4>{{=T("Deploy")}}</h4>
<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 -->
<!-- APP WIZARD -->
<div class="box">
<h4>{{=T("New application wizard")}}</h4>
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}<br/>
{{=T("(requires internet access, experimental)")}}</p>
</div> <!-- /APP WIZARD -->
{{if TWITTER_HASH:}}
<!-- TWITTER -->
<div class="box">
<h4>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h4>
<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 -1
View File
@@ -10,7 +10,7 @@
<tbody>
<tr>
<th>web2py&trade;</th>
<td>{{=myversion}}</td>
<td>Version {{=myversion}}</td>
</tr>
{{if snapshot:}}
<tr>
+1
View File
@@ -8,6 +8,7 @@
<title>{{=response.title or URL()}}</title>
{{
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'))
@@ -7,7 +7,6 @@ for application "{{=request.args[0]}}"</h2>
<h3>Commit form</h3>
{{=form}}
{{if repo['.'].rev()>=0:}}
<h3>Last Revision</h3>
<table>
+1 -2
View File
@@ -76,8 +76,7 @@ def license():
def version():
return 'Version %s.%s.%s (%s) %s' % request.env.web2py_version
return 'Version '+request.env.web2py_version
@cache('examples', time_expire=cache_expire)
def examples():
@@ -37,7 +37,7 @@ random.shuffle(quotes)
<h3>WEB2PY<sup>TM</sup> WEB FRAMEWORK</h3>
<p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a>. <a href="http://www.gnu.org/licenses/lgpl.html">LGPLv3 License</a>.
Current version: {{="%s.%s.%s (%s) %s" % request.env.web2py_version}}</p>
Current version: <a href="{{=URL('download')}}">{{=request.env.web2py_version}}</strong></p>
{{block extra}}
<div class="container aboutW2P">
+8 -4
View File
@@ -373,12 +373,16 @@ def check_new_version(myversion, version_URL):
the most up-to-version available
"""
try:
from urllib import urlopen
version = parse_version(urlopen(version_URL).read())
except Exception:
from urllib import urlopen
version = urlopen(version_URL).read()
pversion = parse_version(version)
pmyversion = parse_version(myversion)
except Exception,e:
import traceback
print traceback.format_exc()
return -1, myversion
if version > myversion:
if pversion[:3]+pversion[-6:] > pmyversion[:3]+pmyversion[-6:]:
return True, version
else:
return False, version
+2 -2
View File
@@ -47,8 +47,8 @@ __all__ = [
def parse_semantic(version="Version 1.99.0-rc.1+timestamp.2011.09.19.08.23.26"):
"http://semver.org/"
re_version = re.compile('Version (\d+)\.(\d+)\.(\d+)(\-(?P<pre>[^\s+]*))?(\+(?P<build>\S*))')
m = re_version.match(version)
re_version = re.compile('(\d+)\.(\d+)\.(\d+)(\-(?P<pre>[^\s+]*))?(\+(?P<build>\S*))')
m = re_version.match(version.strip().split()[-1])
if not m:
return None
a, b, c = int(m.group(1)), int(m.group(2)), int(m.group(3))
+6 -8
View File
@@ -102,16 +102,14 @@ requests = 0 # gc timer
# pattern used to validate client address
regex_client = re.compile('[\w\-:]+(\.[\w\-]+)*\.?') # ## to account for IPV6
#try:
if 1:
try:
version_info = open(pjoin(global_settings.gluon_parent, 'VERSION'), 'r')
raw_version_string = version_info.read().strip()
raw_version_string = version_info.read().split()[-1].strip()
version_info.close()
global_settings.web2py_version = parse_version(raw_version_string)
#except:
# raise RuntimeError("Cannot determine web2py version")
web2py_version = global_settings.web2py_version
global_settings.web2py_version = raw_version_string
web2py_version = global_settings.web2py_version
except:
raise RuntimeError("Cannot determine web2py version")
try:
import rocket