Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Html edits from bootstrap 3 to bootstrap 5 #1058

Merged
merged 43 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3f9ed48
Html edits from bootstrap 3 to bootstrap 5
brownlenox May 9, 2024
0c3d107
Correction on the cdn links and script link
brownlenox May 10, 2024
3675954
comments moved to PR description
brownlenox May 10, 2024
9068d5c
fixed Assets page: table seems too narrow and others..
brownlenox May 11, 2024
fb28278
Menu enhancement etc...
brownlenox May 13, 2024
897c002
Compared current layout and made changes requested changes
brownlenox May 14, 2024
c9303da
Compared current layout and made changes requested changes
brownlenox May 14, 2024
00eec35
Compared current layout and made changes requested changes
brownlenox May 14, 2024
871bf86
Compared current layout and made changes requested changes
brownlenox May 14, 2024
000cdd8
ensuring similarity between the versions
brownlenox May 14, 2024
e3372b0
Correction of requested changes
brownlenox May 15, 2024
5d6e7c4
Adjusting menu height
brownlenox May 15, 2024
ff92633
Adjusting menu height
brownlenox May 15, 2024
661a814
Resolving the latest issues
brownlenox May 16, 2024
008f5c8
Correction of table, menu hamburger etc
brownlenox May 16, 2024
f21e657
Fixed everything
brownlenox May 17, 2024
dbceb34
Fixes
brownlenox May 21, 2024
c5b3e42
Merge branch 'main' into lenox-branch
nhoening May 21, 2024
3a119a3
updated fixes
brownlenox May 23, 2024
40d6043
updated fixes
brownlenox May 23, 2024
496729e
other updated fixes
brownlenox May 23, 2024
8450644
flex and s margin
brownlenox May 24, 2024
35ce5f7
Merge branch 'main' into lenox-branch
nhoening May 24, 2024
8f1b6e2
breadcrumb toggle
brownlenox May 24, 2024
491ae27
breadcrumb toggle
brownlenox May 24, 2024
8a35c36
page load on clicked breadcrumb dropdown
brownlenox May 25, 2024
fb3099f
style attributes to custom css file
brownlenox May 26, 2024
76efa47
auto-commit
brownlenox May 26, 2024
b1c9f13
changes on requested changes
brownlenox May 26, 2024
fc8704d
changes on requested changes
brownlenox May 27, 2024
bb99873
auto-commit
brownlenox May 29, 2024
16789c6
auto-commit
brownlenox May 30, 2024
4a0cd5d
custom css to flexmeasures.css
brownlenox May 30, 2024
a59eda1
custom css to flexmeasures.css
brownlenox May 30, 2024
d303d2e
custom css to flexmeasures.css
brownlenox May 31, 2024
246fbf7
breadcrumb
brownlenox Jun 3, 2024
48e6c5d
auto-commit
brownlenox Jun 3, 2024
738b6a4
Fix wrong click event on breadcrumb dropdown
nhoening Jun 3, 2024
bea8e70
add back space between 'active' and 'users'
nhoening Jun 3, 2024
faafb79
select date-div, margin
brownlenox Jun 3, 2024
d9c918f
removed unnecessary style
brownlenox Jun 5, 2024
c145bd0
improve/fix some indentation
nhoening Jun 5, 2024
ea6aab4
Merge branch 'main' into lenox-branch
nhoening Jun 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flexmeasures/ui/static/js/flexmeasures.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function ready() {

$('table').floatThead({
position: 'absolute',
top: $('#topnavbar').height(),
top: $('#').height(),
brownlenox marked this conversation as resolved.
Show resolved Hide resolved
scrollContainer: true
});

Expand Down
28 changes: 14 additions & 14 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-sm-12">
{% include "security/_messages.html" %}
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-6 forgot-pwd-form">
{% 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>
<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, class="form-control") }}
{{ render_field(forgot_password_form.submit, class="btn btn-primary") }}
</form>
</div>
</div>
</div>

{% endblock %}
{% endblock %}
191 changes: 81 additions & 110 deletions flexmeasures/ui/templates/admin/logged_in_user.html
Original file line number Diff line number Diff line change
@@ -1,117 +1,88 @@
{% 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-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 class="row">
<div class="col-md-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="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 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>
<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>
<div class="col-md-8">
<div class="card user-data-table">
<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 class="col-md-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>

{% 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-sm-12">
<div class="col-md-12">
{% include "security/_messages.html" %}
</div>
<div class="login-form col-sm-4">
<div class="login-form col-md-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-sm-8">
<div class="alert alert-info col-md-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-sm-8">
<div class="col-md-8">
{% block teaser %}
<h1>The FlexMeasures Platform</h1>
<div class="carousel-container">
Expand Down
30 changes: 15 additions & 15 deletions flexmeasures/ui/templates/admin/reset_password.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@

{% block divs %}

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

<h1>{{ _fsdomain('Reset password') }}</h1>
<form action="{{ url_for_security('reset_password', token=reset_password_token) }}" method="POST" name="reset_password_form">
{{ reset_password_form.hidden_tag() }}
{{ render_field_with_errors(reset_password_form.password) }}
{{ render_field_with_errors(reset_password_form.password_confirm) }}
{{ render_field(reset_password_form.submit) }}
</form>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12 forgot-pwd-form">
{% include "security/_messages.html" %}

<h1>{{ _fsdomain('Reset password') }}</h1>
<form action="{{ url_for_security('reset_password', token=reset_password_token) }}" method="POST" name="reset_password_form">
{{ reset_password_form.hidden_tag() }}
{{ render_field_with_errors(reset_password_form.password) }}
{{ render_field_with_errors(reset_password_form.password_confirm) }}
{{ render_field(reset_password_form.submit) }}
</form>
</div>
</div>
</div>

{% endblock%}
{% endblock %}
Loading