admin2 - experimental

This commit is contained in:
mdipierro
2016-03-09 11:53:07 -06:00
parent 702e7cbea2
commit b487583f92
17 changed files with 451 additions and 1072 deletions
+5 -10
View File
@@ -12,29 +12,24 @@ def button(href, label):
if is_mobile:
ret = A_button(SPAN(label), _href=href)
else:
ret = A(SPAN(label), _class='button btn', _href=href)
ret = A(SPAN(label), _class='btn rounded', _href=href)
return ret
def button_enable(href, app):
if os.path.exists(os.path.join(apath(app, r=request), 'DISABLED')):
label = SPAN(T('Enable'), _style='color:red')
text, classes = T("Enable"), "btn rounded red"
else:
label = SPAN(T('Disable'), _style='color:green')
text, classes = T("Disable"), "btn rounded gree"
id = 'enable_' + app
return A(label, _class='button btn', _id=id, callback=href, target=id)
return A(text, _class=classes, _id=id, callback=href, target=id)
def sp_button(href, label):
if request.user_agent().get('is_mobile'):
ret = A_button(SPAN(label), _href=href)
else:
ret = A(SPAN(label), _class='button special btn btn-inverse', _href=href)
ret = A(SPAN(label), _class='btn pink rounded', _href=href)
return ret
def helpicon():
return IMG(_src=URL('static', 'images/help.png'), _alt='help')
def searchbox(elementid):
return SPAN(LABEL(IMG(_id="search_start", _src=URL('static', 'images/search.png'), _alt=T('filter')),
_class='icon', _for=elementid), ' ',
INPUT(_id=elementid, _type='text', _size=12, _class="input-medium"),
_class="searchbox")