Last active
August 29, 2015 13:56
-
-
Save leonguyen/9284921 to your computer and use it in GitHub Desktop.
ad_user list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% include ../header %> | |
| <% include ../admin/menu %> | |
| <% include ../admin/msg %> | |
| <div class="page-header"> | |
| <% if(typeof(sess.AuthList['N'])!='undefined'){%> | |
| <button type="button" class="btn btn-default pull-right" id="btnAdd" name="btnAdd" onclick="location.href='/ad_user/create'"><span class="glyphicon glyphicon-plus"></span> Add new</button> | |
| <%}//if%> | |
| <h2><%=title%></h2> | |
| </div> | |
| <form id="frm" name="frm" class="form" role="form" method="post" action="/ad_user/search"> | |
| <table class="table"> | |
| <thead><tr> | |
| <th width="88px;" style="border-bottom:none"> | |
| <label class="control-label" for="txtNo">No.</label> | |
| <input type="text" class="form-control" id="txtNo" name="txtNo" value="<%=typeof(sess.search)!='undefined'?sess.search.no:''%>" placeholder="No." autofocus autocomplete="off"></th> | |
| <th width="88px;" style="border-bottom:none"> | |
| <label class="control-label" for="btnSearch"> </label> | |
| <button class="form-control" type="submit" class="btn btn-default" id="btnSearch" name="btnSearch"><span class="glyphicon glyphicon-search"></span> Search</button> | |
| </th> | |
| </tr></thead></table> | |
| <p> | |
| <table class="table table-bordered"> | |
| <thead> | |
| <tr> | |
| <th><input type="checkbox" id="chkA" name="chkA" onclick="chkAll(this.checked)"></th> | |
| <th>Username <a href="/ad_user/search?uName=ASC">▲</a><a href="/ad_user/search?uName=DESC">▼</a></th> | |
| <th>Email <a href="/ad_user/search?uEmail=ASC">▲</a><a href="/ad_user/search?uEmail=DESC">▼</a></th> | |
| <th>Status <a href="/ad_user/search?uStatus=ASC">▲</a><a href="/ad_user/search?uStatus=DESC">▼</a></th> | |
| <th>Action</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <% mlist.forEach(function(ml){ %> | |
| <tr <%=ml.uId!=sess.uId&&ml.uType<=sess.uType?'style=display:none':''%>> | |
| <td> | |
| <input type="checkbox" id="chkId[]" name="chkId[]" <%=ml.uId==sess.uId||ml.uType<sess.uType?'style=display:none':''%> value="<%=ml.uId==sess.uId||ml.uType<sess.uType?'':ml.uId%>"> | |
| </td> | |
| <td><%=ml.uName?ml.uName:''%></td> | |
| <td><%=ml.uEmail?ml.uEmail:''%></td> | |
| <td> | |
| <div class="btn-group" <%=ml.uId==sess.uId||ml.uType<sess.uType?'style=display:none':''%>> | |
| <button type="button" class="btn btn-default btn-sm" id="btnEna" <%=ml.uStatus==1?'disabled="disabled"':''%> onclick="location.href='/ad_user/status/<%=ml.uId?ml.uId:''%>/1'">Enable</button> | |
| <button type="button" class="btn btn-default btn-sm" id="btnDis" <%=ml.uStatus==0?'disabled="disabled"':''%> onclick="location.href='/ad_user/status/<%=ml.uId?ml.uId:''%>/0'">Disable</button> | |
| </div> | |
| </td> | |
| <td> | |
| <div class="btn-group" <%=ml.uType<sess.uType?'style=display:none':''%>> | |
| <% if(typeof(sess.AuthList['E'])!='undefined' || typeof(sess.AuthList['R'])!='undefined'){%> | |
| <button type="button" id="btnEdit" class="btn btn-default" onclick="location.href='/ad_user/edit/<%=ml.uId?ml.uId:''%>'"> | |
| <span class="glyphicon glyphicon-pencil"></span> | |
| </button> | |
| <%}//if%> | |
| <% if(typeof(sess.AuthList['D'])!='undefined'){%> | |
| <button type="button" id="btnDel" class="btn btn-default" onclick="del(<%=ml.uId?ml.uId:''%>)" <%=ml.uId==sess.uId||ml.uType<sess.uType?'style=display:none':''%>> | |
| <span class="glyphicon glyphicon-remove"></span> | |
| </button> | |
| <%}//if%> | |
| </div> | |
| </td> | |
| </tr> | |
| <% });//mlist %> | |
| </tbody> | |
| </table> | |
| <div class="row"><div class="col-md-2"> | |
| <label class="control-label" for="selUpd">Update</label> | |
| <select class="form-control" id="selUpd" name="selUpd"> | |
| <option value="" selected="selected">---</option> | |
| <% if(typeof(sess.AuthList['D'])!='undefined'){%> | |
| <option value="del">Delete selected</option> | |
| <%}//if%> | |
| <% if(typeof(sess.AuthList['V'])!='undefined'){%> | |
| <option value="ena">Enable selected</option> | |
| <option value="dis">Disable selected</option> | |
| <%}//if%> | |
| </select> | |
| </div> | |
| <div class="col-md-8"> | |
| <div id="pg" style="margin:5px 0px;<%=typeof(pg)!='undefined'&&pg.pageCount=='1'?'display:none':''%>"></div> | |
| </div> | |
| <div class="col-md-2" <%=typeof(pg)!='undefined'&&pg.pageCount=='1'?'style=display:none':''%>> | |
| <label class="control-label" for="selLimit">Limit</label> | |
| <select class="form-control" id="selLimit" name="selLimit"> | |
| <option value="10" <%=typeof(sess.search)!='undefined'&&sess.search.per_page=='10'?'selected="selected"':''%>>10 items</option> | |
| <option value="20" <%=typeof(sess.search)!='undefined'&&sess.search.per_page=='20'?'selected="selected"':''%>>20 items</option> | |
| <option value="50" <%=typeof(sess.search)!='undefined'&&sess.search.per_page=='50'?'selected="selected"':''%>>50 items</option> | |
| <option value="100" <%=typeof(sess.search)!='undefined'&&sess.search.per_page=='100'?'selected="selected"':''%>>100 items</option> | |
| </select> | |
| </div></div> | |
| </form> | |
| <% include list_js %> | |
| <% include js %> | |
| <% include ../footer %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment