Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development

This commit is contained in:
Stephan Porada 2019-09-04 14:50:33 +02:00
commit c6184976b8
2 changed files with 29 additions and 59 deletions

View File

@ -72,6 +72,7 @@
</div> </div>
<ul id="nav-account-dropdown" class="dropdown-content"> <ul id="nav-account-dropdown" class="dropdown-content">
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<li><a href="{{ url_for('auth.settings') }}"><i class="material-icons">settings</i>Settings</a></li>
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons">chevron_left</i>Log out</a></li> <li><a href="{{ url_for('auth.logout') }}"><i class="material-icons">chevron_left</i>Log out</a></li>
{% else %} {% else %}
<li><a href="{{ url_for('auth.login') }}"><i class="material-icons">chevron_right</i>Log in</a></li> <li><a href="{{ url_for('auth.login') }}"><i class="material-icons">chevron_right</i>Log in</a></li>
@ -81,61 +82,35 @@
<div class="navbar-fixed"> <div class="navbar-fixed">
<nav> <nav>
<div class="nav-wrapper"> <div class="nav-wrapper">
<a href="{{ url_for('main.index') }}" class="brand-logo"><i class="material-icons">opacity</i>Opaque</a> <a href="{{ url_for('main.index') }}" class="brand-logo center"><i class="material-icons">opacity</i>Opaque</a>
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a> <a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down"> <ul class="right hide-on-med-and-down">
<li><a id="nav-notifications" class="dropdown-trigger no-autoinit" href="#!" data-target="nav-notifications-dropdown"><i class="material-icons">notifications</i></a></li> <li><a id="nav-notifications" class="dropdown-trigger no-autoinit" href="#!" data-target="nav-notifications-dropdown"><i class="material-icons">notifications</i></a></li>
<li><a id="nav-account" class="dropdown-trigger no-autoinit" href="#!" data-target="nav-account-dropdown"><i class="material-icons">account_circle</i></a></li> <li>
<a id="nav-account" class="dropdown-trigger no-autoinit" href="#!" data-target="nav-account-dropdown">
{% if current_user.is_authenticated %}
{{ current_user.username }}<i class="material-icons right">account_circle</i>
{% else %}
<i class="material-icons">account_circle</i>
{% endif %}
</a>
</li>
</ul> </ul>
</div> </div>
</nav> </nav>
</div> </div>
<ul id="slide-out" class="sidenav sidenav-fixed"> <ul id="slide-out" class="sidenav sidenav-fixed">
<li>
<div class="user-view">
<div class="background" style="background-color: #ee6e73;"></div>
<img class="circle" src="{{ url_for('static', filename='images/account_circle.png') }}">
<span class="white-text name">
{% if current_user.is_authenticated %}
{{ current_user.username }}
{% else %}
Unknown
{% endif %}
</span>
<span class="white-text email">
{% if current_user.is_authenticated %}
{{ current_user.email }}
{% else %}
Unknown
{% endif %}
</span>
</div>
</li>
<li><a href="{{ url_for('main.index') }}"><i class="material-icons">opacity</i>Opaque</a></li> <li><a href="{{ url_for('main.index') }}"><i class="material-icons">opacity</i>Opaque</a></li>
<li><a href="{{ url_for('main.dashboard') }}"><i class="material-icons">dashboard</i>Dashboard</a></li> <li><a href="{{ url_for('main.dashboard') }}"><i class="material-icons">dashboard</i>Dashboard</a></li>
<li class="no-padding">
<ul class="collapsible collapsible-accordion">
<li>
<a class="collapsible-header">Services<i class="material-icons">arrow_drop_down</i></a>
<div class="collapsible-body">
<ul>
<li><a href="{{ url_for('services.nlp') }}"><i class="material-icons">format_textdirection_l_to_r</i>NLP</a></li>
<li><a href="{{ url_for('services.ocr') }}"><i class="material-icons">find_in_page</i>OCR</a></li>
</ul>
</div>
</li>
</ul>
</li>
{% if current_user.is_authenticated %}
<li><div class="divider"></div></li> <li><div class="divider"></div></li>
<li><a class="subheader">Account</a></li> <li><a class="subheader">Services</a></li>
<li><a href="{{ url_for('auth.settings') }}"><i class="material-icons">settings</i>Settings</a></li> <li><a href="{{ url_for('services.nlp') }}"><i class="material-icons">format_textdirection_l_to_r</i>NLP</a></li>
{% endif %} <li><a href="{{ url_for('services.ocr') }}"><i class="material-icons">find_in_page</i>OCR</a></li>
{% if current_user.is_administrator() %} <!-- Shows only for admins --> {% if current_user.is_administrator() %}
<li><div class="divider"></div></li> <li><div class="divider"></div></li>
<li><a class="subheader">Administration</a></li> <li><a class="subheader">Administration</a></li>
<li><a href="{{ url_for('admin.for_admins_only') }}"><i class="material-icons">build</i>Administration tools</a></li> <li><a href="{{ url_for('admin.for_admins_only') }}"><i class="material-icons">build</i>Administration tools</a></li>
{% endif %} {% endif %}
</ul> </ul>
</header> </header>
@ -144,14 +119,7 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<h2> <h2>{% if title %}{{ title }}{% else %}Unnamed page{% endif %}</h2>
{% if title %}
{{ title }}
{% else %}
Unnamed page
{% endif %}
</h2>
<p>&nbsp;</p>
</div> </div>
{% block page_content %} {% block page_content %}
{% endblock %} {% endblock %}
@ -201,6 +169,8 @@
<script type="text/javascript" src="{{ url_for('static', filename='js/materialize.min.js') }}"></script> <script type="text/javascript" src="{{ url_for('static', filename='js/materialize.min.js') }}"></script>
<script> <script>
var foo = document.querySelector("main");
console.log(foo);
M.AutoInit(); M.AutoInit();
M.Dropdown.init( M.Dropdown.init(
document.getElementById("nav-notifications"), document.getElementById("nav-notifications"),

View File

@ -75,14 +75,14 @@
</div> </div>
</div> </div>
<script> <script>
var jobList = new JobList("job-list", { var jobList = new JobList("job-list", {
item: '<div><span class="title"></span><span class="description"></span></div>', item: '<div><span class="title"></span><span class="description"></span></div>',
page: 4, page: 4,
pagination: true, pagination: true,
valueNames: ["description", "title", {data: ["id"]}] valueNames: ["description", "title", {data: ["id"]}]
}); });
jobList.on("filterComplete", List.updatePagination); jobList.on("filterComplete", List.updatePagination);
jobList.on("searchComplete", List.updatePagination); jobList.on("searchComplete", List.updatePagination);
</script> </script>
<div id="new-corpus-modal" class="modal"> <div id="new-corpus-modal" class="modal">