admin based on bootstrap, thanks Paolo

This commit is contained in:
mdipierro
2012-12-24 13:49:06 -06:00
parent 9981ae4d5f
commit ebda5cb2bc
112 changed files with 6839 additions and 1371 deletions
+78 -60
View File
@@ -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 -->