Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: elcio/badmin
base: 7dcf7b0e77
...
head fork: elcio/badmin
compare: d94aa98040
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 17 additions and 0 deletions.
  1. +3 −0  pack.sh
  2. +14 −0 plugin_badmin/controllers/badmin.py
View
3  pack.sh
@@ -0,0 +1,3 @@
+cd plugin_badmin
+tar -czvf ../web2py.plugin.badmin.w2p *
+
View
14 plugin_badmin/controllers/badmin.py
@@ -50,16 +50,28 @@ def mkfilter(table,column):
@auth.requires_membership('badmin')
def index():
+
tables=badmin_tables
if not request.args:
return redirect(URL(f='index',args=tables.keys()[0]))
+
page=1
if 'page' in request.vars:
page=int(request.vars.page)
+
table=request.args[0]
columns=tables[table]['columns']
dbtable=db[table]
+
+ if 'delid' in request.vars:
+ d=request.vars.delid
+ if not isinstance(d,list):
+ d=[d]
+ db(dbtable.id.belongs(d)).delete()
+ response.flash=T("Deleted successfully!")
+
q=dbtable.id>0
+
for f in tables[table]['filters']:
if dbtable[f].type=='string':
if f in request.vars and request.vars[f]:
@@ -78,8 +90,10 @@ def index():
o='id'
if 'orderby' in request.vars:
o=request.vars.orderby
+
data=db(q).select(*([dbtable.id]+[dbtable[f] for f in columns]),orderby=o,limitby=((page-1)*50,page*50))
pages=int(math.ceil(db(q).count()/50.0))
+
if tables[table]['filters']:
filters=FORM(
FIELDSET(

No commit comments for this range

Something went wrong with that request. Please try again.