Skip to content

Commit

Permalink
Revert "Html edits from bootstrap 3 to bootstrap 5 (#1058)"
Browse files Browse the repository at this point in the history
This reverts commit c21e5a0.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
  • Loading branch information
victorgarcia98 committed Jun 7, 2024
1 parent 60fbace commit 8972dae
Show file tree
Hide file tree
Showing 20 changed files with 726 additions and 800 deletions.
65 changes: 0 additions & 65 deletions flexmeasures/ui/static/css/flexmeasures.css
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,6 @@ p.error {
color: var(--secondary-color);
}

.navbar{
padding-top : 0 !important;
padding-bottom: 0 !important;
}
.navbar-default {
background-color: var(--nav-default-background-color);
border: none;
Expand Down Expand Up @@ -278,14 +274,6 @@ p.error {
color: var(--secondary-color) !important;
}

.fa-bars{
color: var(--white);
}

.d-none{
display: none !important;
}

.navbar-default .navbar-collapse, .navbar-default .navbar-form {
border-color: var(--primary-border-color);
}
Expand Down Expand Up @@ -839,42 +827,6 @@ table.dataTable.nav-on-click tbody tr:hover {
background-color: var(--nav-current-hover-background-color) !important;
cursor: pointer;
}
.table tbody tr {
border-top-width: 1px;
border-color: var(--gray);
}


table.dataTable td {
padding: 8px;
}


table.dataTable th {
padding: 10px;
}


table.dataTable button {
margin: 5px;
}


table.dataTable input[type="checkbox"] {
margin: 5px;
}


div.dataTables_filter input {
margin-left: 5px;
padding: 5px;
}


div.dataTables_paginate {
margin-top: 10px;
}


/* scrolling */
.floatThead-wrapper table {
Expand Down Expand Up @@ -1007,9 +959,6 @@ body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
vertical-align: top;
border-top: 1px solid var(--light-gray) ;
}
.left-sidepanel-label{
margin-left: 20px !important;
}


/* --- End Tables ---- */
Expand Down Expand Up @@ -1911,17 +1860,6 @@ div.heading-group {
margin: 0px;
background: var(--light-gray);
}
.breadcrumb .dropdown-menu {
z-index: 1050;
position: absolute;
}
.breadcrumb .dropdown-menu li a {
text-decoration: none;
color: var(--white);
}
.breadcrumb li a {
text-decoration: none;
}
.breadcrumb a {
color: var(--primary-color);
}
Expand All @@ -1933,6 +1871,3 @@ div.heading-group {
color: var(--primary-color);
}

.table-responsive{
padding: 20px;
}
30 changes: 15 additions & 15 deletions flexmeasures/ui/templates/admin/forgot_password.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

{% set active_page = "logged-in-user" %}

{% block title %} Forgot Password {% endblock %}
{% block title %} Forgot password {% endblock %}

{% from "security/_macros.html" import render_field_with_errors, render_field %}

{% block divs %}

<div class="container-fluid">
<div class="row">
<div class="forgot-pwd-form col-md-12">
{% include "security/_messages.html" %}
<div class="container-fluid">
<div class="row">
<div class="forgot-pwd-form col-sm-12">
{% include "security/_messages.html" %}

<h1>{{ _fsdomain('Send password reset instructions') }}</h1>
<form action="{{ url_for_security('forgot_password') }}" method="POST" name="forgot_password_form">
{{ forgot_password_form.hidden_tag() }}
{{ render_field_with_errors(forgot_password_form.email) }}
{{ render_field(forgot_password_form.submit) }}
</form>
</div>
</div>
</div>
<h1>{{ _fsdomain('Send password reset instructions') }}</h1>
<form action="{{ url_for_security('forgot_password') }}" method="POST" name="forgot_password_form">
{{ forgot_password_form.hidden_tag() }}
{{ render_field_with_errors(forgot_password_form.email) }}
{{ render_field(forgot_password_form.submit) }}
</form>
</div>
</div>
</div>

{% endblock %}
{% endblock %}
195 changes: 110 additions & 85 deletions flexmeasures/ui/templates/admin/logged_in_user.html
Original file line number Diff line number Diff line change
@@ -1,92 +1,117 @@
{% extends "base.html" %}
{% set active_page = "logged-in-user" %}
{% block title %} Your User Overview {% endblock %}
{% block divs %}
{% extends "base.html" %} {% set active_page = "logged-in-user" %} {% block title %} Your user overview {% endblock %} {% block divs %}

<div class="container-fluid">
<div class="row">
<div class="col-md-2 on-top-md">
<div class="header-action-button mt-3">
<div class="user-action-button">
<form action="/logout" method="get">
<button class="btn btn-sm btn-responsive btn-info" type="submit">Log Out</button>
</form>
<div class="row">
<div class="col-sm-2 on-top-md">
<div class="header-action-button">
<div class="user-action-button">
<form action="/logout" method="get">
<button class="btn btn-sm btn-responsive btn-info" type="submit">Log out</button>
</form>
</div>
<div class="user-action-button">
<form action="/users/reset_password_for/{{ logged_in_user.id }}" method="get">
<button class="btn btn-sm btn-responsive btn-info delete-button" type="submit" title="Reset the password and send instructions how to choose a new one.">Reset password</button>
</form>
</div>
</div>
</div>
<div class="user-action-button">
<form action="/users/reset_password_for/{{ logged_in_user.id }}" method="get">
<button class="btn btn-sm btn-info delete-button" type="submit" title="Reset the password and send instructions how to choose a new one.">Reset Password</button>
</form>
<div class="col-sm-8">
<div class="user-data-table card">
<h2>User overview</h2>
<small>Logged-in user: {{ logged_in_user.username }}</small>
<table class="table table-striped table-responsive">
<tbody>
<tr>
<td>
Email address
</td>
<td>
{{logged_in_user.email }}
</td>
</tr>
<tr>
<td>
Account
</td>
<td>
{{ logged_in_user.account.name }}
</td>
</tr>
{% if account_roles %}
<tr>
<td>
Account Roles
</td>
<td>
{{ account_role_names|join(", ") }}
</td>
</tr>
{% endif %}
<tr>
<td>
Assets in account
</td>
<td>
<a href="/assets/owned_by/{{ logged_in_user.account.id }}">{{ num_assets }}</a>
</td>
</tr>
<tr>
<td>
Time Zone
</td>
<td>
{{logged_in_user.timezone }}
</td>
</tr>
<tr>
<td>
Last login
</td>
<td title="{{ logged_in_user.last_login_at | localized_datetime }}">
{{ logged_in_user.last_login_at | naturalized_datetime }}
</td>
</tr>
<tr>
<td>
Last seen
</td>
<td title="{{ logged_in_user.last_seen_at | localized_datetime }}">
{{ logged_in_user.last_seen_at | naturalized_datetime }}
</td>
</tr>
<tr>
<td>
Roles
</td>
<td>
{{ roles }}
</td>
</tr>
{% if not user_is_anonymous %}
<tr>
<td>
Fresh access token
</td>
<td>
{{ logged_in_user.get_auth_token() }}
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
<div class="col-sm-2"></div>
<form action="/accounts/auditlog/{{ logged_in_user.account.id }}" method="get">
<button class="btn btn-sm btn-responsive btn-info delete-button" type="submit"
title="View history of account actions.">Account audit log</button>
</form>
<form action="/users/auditlog/{{ logged_in_user.id }}" method="get">
<button class="btn btn-sm btn-responsive btn-info delete-button" type="submit"
title="View history of user actions.">User audit log</button>
</form>
</div>
<div class="col-md-8 mt-4">
<div class="card user-data-table">
<h2>User Overview</h2>
<small>Logged-in user: {{ logged_in_user.username }}</small>
<div class="table-responsive">
<table class="table table-striped table-responsive">
<tbody>
<tr>
<td>Email address</td>
<td>{{ logged_in_user.email }}</td>
</tr>
<tr>
<td>Account</td>
<td>{{ logged_in_user.account.name }}</td>
</tr>
{% if account_roles %}
<tr>
<td>Account Roles</td>
<td>{{ account_role_names | join(", ") }}</td>
</tr>
{% endif %}
<tr>
<td>Assets in account</td>
<td><a href="/assets/owned_by/{{ logged_in_user.account.id }}">{{ num_assets }}</a></td>
</tr>
<tr>
<td>Time Zone</td>
<td>{{ logged_in_user.timezone }}</td>
</tr>
<tr>
<td>Last Login</td>
<td title="{{ logged_in_user.last_login_at | localized_datetime }}">
{{ logged_in_user.last_login_at | naturalized_datetime }}
</td>
</tr>
<tr>
<td>Last Seen</td>
<td title="{{ logged_in_user.last_seen_at | localized_datetime }}">
{{ logged_in_user.last_seen_at | naturalized_datetime }}
</td>
</tr>
<tr>
<td>Roles</td>
<td>{{ roles }}</td>
</tr>
{% if not user_is_anonymous %}
<tr>
<td>Fresh Access Token</td>
<td>{{ logged_in_user.get_auth_token() }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-2">
<form action="/accounts/auditlog/{{ logged_in_user.account.id }}" method="get" class="bt-md-0 mb-3 mt-3">
<button class="btn btn-sm btn-responsive btn-info delete-button" type="submit"
title="View history of account actions.">Account audit log</button>
</form>
<form action="/users/auditlog/{{ logged_in_user.id }}" method="get" class="mb-md-0 mb-3 mt-3">
<button class="btn btn-sm btn-responsive btn-info delete-button" type="submit"
title="View history of user actions.">User audit log</button>
</form>
</div>

</div>
</div>

{% endblock %}
{% endblock %}
8 changes: 4 additions & 4 deletions flexmeasures/ui/templates/admin/login_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="col-sm-12">
{% include "security/_messages.html" %}
</div>
<div class="login-form col-md-4">
<div class="login-form col-sm-4">
<h1>{{ _fsdomain('Login') }}</h1>
<form action="{{ url_for_security('login') }}" method="POST" name="login_user_form">
{{ login_user_form.hidden_tag() }}
Expand All @@ -27,7 +27,7 @@ <h1>{{ _fsdomain('Login') }}</h1>
<button class="btn btn-sm btn-responsive btn-link" type="submit">Forgot password?</button>
</form>
{% if FLEXMEASURES_MODE == "demo" and FLEXMEASURES_PUBLIC_DEMO_CREDENTIALS %}
<div class="alert alert-info col-md-8">
<div class="alert alert-info col-sm-8">
<h2>Interested in a demo?</h2>
<p>
Simply log in as our demo user.
Expand All @@ -39,7 +39,7 @@ <h2>Interested in a demo?</h2>
</div>
{% endif %}
</div>
<div class="col-md-8">
<div class="col-sm-8">
{% block teaser %}
<h1>The FlexMeasures Platform</h1>
<div class="carousel-container">
Expand Down

0 comments on commit 8972dae

Please sign in to comment.