"Dropdown userlist plus administration"
Bootstrap 3.0.0 Snippet by DenstonHD

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <br><br> <div class="container"> <div class="well col-sm-12 col-md-8 col-md-offset-2"> <div class="row user-row"> <div class="col-md-1"> <img class="img-circle" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=50" alt="User Pic"> </div> <div class="col-md-10"> <strong>Cyruxx</strong><br> <span class="text-muted">User level: Administrator</span> </div> <div class="col-md-1 dropdown-user" data-for=".cyruxx"> <i class="glyphicon glyphicon-chevron-down text-muted"></i> </div> </div> <div class="row user-infos cyruxx"> <div class="col-sm-10 col-md-10 col-md-offset-1"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">User information</h3> </div> <div class="panel-body"> <div class="row"> <div class="col-md-3"> <img class="img-circle" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=100" alt="User Pic"> </div> <div class="col-md-6"> <strong>Cyruxx</strong><br> <table class="table table-condensed table-responsive table-user-information"> <tbody> <tr> <td>User level:</td> <td>Administrator</td> </tr> <tr> <td>Registered since:</td> <td>11/12/2013</td> </tr> <tr> <td>Topics</td> <td>15</td> </tr> <tr> <td>Warnings</td> <td>0</td> </tr> </tbody> </table> </div> </div> </div> <div class="panel-footer"> <button class="btn btn-sm btn-primary" type="button" data-toggle="tooltip" data-original-title="Send message to user"><i class="glyphicon glyphicon-envelope"></i></button> <span class="pull-right"> <button class="btn btn-sm btn-warning" type="button" data-toggle="tooltip" data-original-title="Edit this user"><i class="glyphicon glyphicon-edit"></i></button> <button class="btn btn-sm btn-danger" type="button" data-toggle="tooltip" data-original-title="Remove this user"><i class="glyphicon glyphicon-remove"></i></button> </span> </div> </div> </div> </div> <div class="row user-row"> <div class="col-md-1"> <img class="img-circle" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=50" alt="User Pic"> </div> <div class="col-md-10"> <strong>Alexander Mahrt</strong><br> <span class="text-muted">User level: Moderator</span> </div> <div class="col-md-1 dropdown-user" data-for=".alexanderMahrt"> <i class="glyphicon glyphicon-chevron-down text-muted"></i> </div> </div> <div class="row user-infos alexanderMahrt"> <div class="col-sm-10 col-md-10 col-md-offset-1"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">User information</h3> </div> <div class="panel-body"> <div class="row"> <div class="col-md-3"> <img class="img-circle" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=100" alt="User Pic"> </div> <div class="col-md-6"> <strong>Alexander Mahrt</strong><br> <table class="table table-condensed table-responsive table-user-information"> <tbody> <tr> <td>User level:</td> <td>Moderator</td> </tr> <tr> <td>Registered since:</td> <td>11/12/2013</td> </tr> <tr> <td>Topics</td> <td>5</td> </tr> <tr> <td>Warnings</td> <td>0</td> </tr> </tbody> </table> </div> </div> </div> <div class="panel-footer"> <button class="btn btn-sm btn-primary" type="button" data-toggle="tooltip" data-original-title="Send message to user"><i class="glyphicon glyphicon-envelope"></i></button> <span class="pull-right"> <button class="btn btn-sm btn-warning" type="button" data-toggle="tooltip" data-original-title="Edit this user"><i class="glyphicon glyphicon-edit"></i></button> <button class="btn btn-sm btn-danger" type="button" data-toggle="tooltip" data-original-title="Remove this user"><i class="glyphicon glyphicon-remove"></i></button> </span> </div> </div> </div> </div> <div class="row user-row"> <div class="col-md-1"> <img class="img-circle" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=50" alt="User Pic"> </div> <div class="col-md-10"> <strong>MyUsername</strong><br> <span class="text-muted">User level: Registered user</span> </div> <div class="col-md-1 dropdown-user" data-for=".myUsername"> <i class="glyphicon glyphicon-chevron-down text-muted"></i> </div> </div> <div class="row user-infos myUsername"> <div class="col-sm-10 col-md-10 col-md-offset-1"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">User information</h3> </div> <div class="panel-body"> <div class="row"> <div class="col-md-3"> <img class="img-circle" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=100" alt="User Pic"> </div> <div class="col-md-6"> <strong>MyUsername</strong><br> <table class="table table-condensed table-responsive table-user-information"> <tbody> <tr> <td>User level:</td> <td>Registered user</td> </tr> <tr> <td>Registered since:</td> <td>11/12/2013</td> </tr> <tr> <td>Topics</td> <td>1</td> </tr> <tr> <td>Warnings</td> <td>1</td> </tr> </tbody> </table> </div> </div> </div> <div class="panel-footer"> <button class="btn btn-sm btn-primary" type="button" data-toggle="tooltip" data-original-title="Send message to user"><i class="glyphicon glyphicon-envelope"></i></button> <span class="pull-right"> <button class="btn btn-sm btn-warning" type="button" data-toggle="tooltip" data-original-title="Edit this user"><i class="glyphicon glyphicon-edit"></i></button> <button class="btn btn-sm btn-danger" type="button" data-toggle="tooltip" data-original-title="Remove this user"><i class="glyphicon glyphicon-remove"></i></button> </span> </div> </div> </div> </div> </div> </div>
.user-row { margin-bottom: 14px; } .user-row:last-child { margin-bottom: 0; } .dropdown-user { margin: 13px 0; padding: 5px; height: 100%; } .dropdown-user:hover { cursor: pointer; } .table-user-information > tbody > tr { border-top: 1px solid rgb(221, 221, 221); } .table-user-information > tbody > tr:first-child { border-top: 0; } .table-user-information > tbody > tr > td { border-top: 0; }
$(document).ready(function() { var panels = $('.user-infos'); var panelsButton = $('.dropdown-user'); panels.hide(); //Click dropdown panelsButton.click(function() { //get data-for attribute var dataFor = $(this).attr('data-for'); var idFor = $(dataFor); //current button var currentButton = $(this); idFor.slideToggle(400, function() { //Completed slidetoggle if(idFor.is(':visible')) { currentButton.html('<i class="glyphicon glyphicon-chevron-up text-muted"></i>'); } else { currentButton.html('<i class="glyphicon glyphicon-chevron-down text-muted"></i>'); } }) }); $('[data-toggle="tooltip"]').tooltip(); $('button').click(function(e) { e.preventDefault(); alert("This is a demo.\n :-)"); }); });

Related: See More


Questions / Comments: