mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Remove dummy /users route
This commit is contained in:
parent
29900f3ab1
commit
1f3ca9664d
@ -1,45 +0,0 @@
|
||||
{% extends "base.html.j2" %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h1 id="title">{{ title }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="col s12 nopaque-ressource-list no-autoinit" data-ressource-type="User" id="users">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">search</i>
|
||||
<input id="search-user" class="search" type="text"></input>
|
||||
<label for="search-user">Search user</label>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Username</th>
|
||||
<th>Email</th>
|
||||
<th>Last seen</th>
|
||||
<th>Role</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="list"></tbody>
|
||||
</table>
|
||||
<ul class="pagination"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock page_content %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
let userList = new UserList(document.querySelector('#users'));
|
||||
userList.init({{ dict_users|tojson }});
|
||||
</script>
|
||||
{% endblock scripts %}
|
@ -2,4 +2,4 @@ from flask import Blueprint
|
||||
|
||||
|
||||
bp = Blueprint('users', __name__)
|
||||
from . import events, routes # noqa
|
||||
from . import events
|
||||
|
@ -1,17 +0,0 @@
|
||||
from app.decorators import admin_required
|
||||
from app.models import User
|
||||
from flask import render_template, request
|
||||
from flask_login import login_required
|
||||
from . import bp
|
||||
|
||||
|
||||
@bp.route('/')
|
||||
@login_required
|
||||
@admin_required
|
||||
def users():
|
||||
dict_users = [u.to_dict(backrefs=True, relationships=False) for u in User.query.all()]
|
||||
return render_template(
|
||||
'users/users.html.j2',
|
||||
title='Users',
|
||||
dict_users=dict_users
|
||||
)
|
Loading…
Reference in New Issue
Block a user