Commits

Wilson Xu committed 18700a9

Added class to bootstrap table.

Comments (0)

Files changed (3)

fbone/templates/index.html

 {% extends 'layout.html' %}
 
 {% block body %}
-{{ render_user_table(pagination.items) }}
+{{ render_user_table(pagination.items, 'zebra-striped') }}
 {{ render_pagination(pagination=pagination, endpoint='frontend.index') }}
 {% endblock %}

fbone/templates/macros/_misc.html

     </div>
 {% endmacro %}
 
-{% macro render_user_table(users) %}
-<table>
+{% macro render_user_table(users, class='') %}
+<table class='{{ class }}'>
     <thead>
         <tr>
             <td>#</td>

fbone/views/frontend.py

     if not current_user.is_authenticated():
         login_form= LoginForm(next=request.args.get('next'))
     page = int(request.args.get('page', 1))
-    pagination = User.query.paginate(page=page, per_page=1)
+    pagination = User.query.paginate(page=page, per_page=10)
     return render_template('index.html', pagination=pagination, login_form=login_form,
                            current_user=current_user)