Self hosted FLOSS fitness/workout, nutrition and weight tracker
Replace the data attributes for modals with their data-bs-* current names
Roland Geidera1f8d1798be3
diff --git a/wger/core/templates/base.html b/wger/core/templates/base.htmlindex 1f622e0c2..7cdaa1d7e 100644--- a/wger/core/templates/base.html+++ b/wger/core/templates/base.html@@ -2,72 +2,73 @@{% load i18n wger_extras django_bootstrap_breadcrumbs %}{% block template %}-{% if show_shariff %}- {% include 'misc/fragments/shariff_modal.html' %}-{% endif %}+ {% if show_shariff %}+ {% include 'misc/fragments/shariff_modal.html' %}+ {% endif %}-{% if trainer_identity %}-<div class="alert alert-info" style="margin-top: 1em;">- {% blocktranslate with current_user=user|format_username %}You are- browsing the site as the user "{{current_user}}", all actions are performed on their data.- {% endblocktranslate %}- <a href="{% url 'core:user:trainer-login' trainer_identity %}" class="alert-link">- {% blocktranslate with target=user.userprofile.gym.name %}Back to "{{ target }}"{% endblocktranslate %}- </a>-</div>-{% endif %}+ {% if trainer_identity %}+ <div class="alert alert-info" style="margin-top: 1em;">+ {% blocktranslate with current_user=user|format_username %}You are+ browsing the site as the user "{{ current_user }}", all actions are performed on their data.+ {% endblocktranslate %}+ <a href="{% url 'core:user:trainer-login' trainer_identity %}" class="alert-link">+ {% blocktranslate with target=user.userprofile.gym.name %}Back to "{{ target }}"{% endblocktranslate %}+ </a>+ </div>+ {% endif %}-<div class="row">- <div class="col-12 col-md-8">- <h2 id="page-title" class="page-header">- {% block title %}{% endblock %}- </h2>- <hr>- </div>- <div class="col-md-4 py-3">- <div class="btn-group">+ <div class="row">+ <div class="col-12 col-md-8">+ <h2 id="page-title" class="page-header">+ {% block title %}{% endblock %}+ </h2>+ <hr>+ </div>+ <div class="col-md-4 py-3">+ <div class="btn-group">- {% block options %}- {% endblock %}+ {% block options %}+ {% endblock %}+ </div>+ {% if show_shariff %}+ <button type="button"+ class="btn btn-link btn-sm float-right"+ data-bs-toggle="modal"+ data-bs-target="#shariffModal"+ title="{% trans 'Share' %}">+ <span class="{% fa_class 'share-alt' %}"></span>+ </button>+ {% endif %}</div>- {% if show_shariff %}- <button type="button"- class="btn btn-link btn-sm float-right"- data-toggle="modal"- data-target="#shariffModal"- title="{% trans 'Share' %}">- <span class="{% fa_class 'share-alt' %}"></span>- </button>- {% endif %}</div>-</div>-<div class="row">- <div class="col-md-8 order-2 order-sm-1 mt-3" id="main-content">- {% if messages and not no_messages %}- {% for message in messages %}- <div class="alert {% if message.tags == 'warning'%}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">- <a href="#" class="close extra-bold" data-dismiss="alert">×</a>- {{message}}- </div>- {% endfor %}- {% endif %}+ <div class="row">+ <div class="col-md-8 order-2 order-sm-1 mt-3" id="main-content">+ {% if messages and not no_messages %}+ {% for message in messages %}+ <div+ class="alert {% if message.tags == 'warning' %}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">+ <a href="#" class="close extra-bold" data-bs-dismiss="alert">×</a>+ {{ message }}+ </div>+ {% endfor %}+ {% endif %}- {% render_breadcrumbs "django_bootstrap_breadcrumbs/bootstrap4.html" %}+ {% render_breadcrumbs "django_bootstrap_breadcrumbs/bootstrap4.html" %}- <div id="content">- {% block content %}{% endblock %}+ <div id="content">+ {% block content %}{% endblock %}+ </div>+ </div>+ <div class="col-md-4 order-1 order-sm-2" id="main-sidebar">+ {% block sidebar %}+ {% endblock %}</div></div>- <div class="col-md-4 order-1 order-sm-2" id="main-sidebar">- {% block sidebar %}- {% endblock %}- </div>-</div>{% endblock %}diff --git a/wger/core/templates/base_empty.html b/wger/core/templates/base_empty.htmlindex 79c5b1716..31d37df75 100644--- a/wger/core/templates/base_empty.html+++ b/wger/core/templates/base_empty.html@@ -1,23 +1,24 @@{% block template %}-<h2 id="page-title" class="page-header">{% block title %}{% endblock %}</h2>-<div class="row">- <div class="col-sm-8" id="main-content">- {% if messages and not no_messages %}- {% for message in messages %}- <div class="alert {% if message.tags == 'warning'%}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">- <a href="#" class="close extra-bold" data-dismiss="alert">×</a>- {{message}}- </div>- {% endfor %}- {% endif %}+ <h2 id="page-title" class="page-header">{% block title %}{% endblock %}</h2>+ <div class="row">+ <div class="col-sm-8" id="main-content">+ {% if messages and not no_messages %}+ {% for message in messages %}+ <div+ class="alert {% if message.tags == 'warning' %}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">+ <a href="#" class="close extra-bold" data-bs-dismiss="alert">×</a>+ {{ message }}+ </div>+ {% endfor %}+ {% endif %}- <div id="content">- {% block content %}{% endblock %}+ <div id="content">+ {% block content %}{% endblock %}+ </div>+ </div>+ <div class="col-sm-4" id="main-sidebar">+ {% block sidebar %}+ {% endblock %}</div></div>- <div class="col-sm-4" id="main-sidebar">- {% block sidebar %}- {% endblock %}- </div>-</div>{% endblock %}diff --git a/wger/core/templates/base_features.html b/wger/core/templates/base_features.htmlindex ad7854a23..6ea6ab237 100644--- a/wger/core/templates/base_features.html+++ b/wger/core/templates/base_features.html@@ -2,14 +2,15 @@{% load i18n %}{% block template %}- {% if messages and not no_messages %}- {% for message in messages %}- <div class="alert {% if message.tags == 'warning'%}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">- <a href="#" class="close extra-bold" data-dismiss="alert">×</a>- {{message}}- </div>- {% endfor %}- {% endif %}+ {% if messages and not no_messages %}+ {% for message in messages %}+ <div+ class="alert {% if message.tags == 'warning' %}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">+ <a href="#" class="close extra-bold" data-bs-dismiss="alert">×</a>+ {{ message }}+ </div>+ {% endfor %}+ {% endif %}- {% block content %}{% endblock %}+ {% block content %}{% endblock %}{% endblock %}diff --git a/wger/core/templates/base_wide.html b/wger/core/templates/base_wide.htmlindex 0db45ea3c..13a51312d 100644--- a/wger/core/templates/base_wide.html+++ b/wger/core/templates/base_wide.html@@ -1,67 +1,68 @@{% extends "template.html" %}{% load i18n wger_extras django_bootstrap_breadcrumbs %}{% block template %}-{% if show_shariff %}- {% include 'misc/fragments/shariff_modal.html' %}-{% endif %}+ {% if show_shariff %}+ {% include 'misc/fragments/shariff_modal.html' %}+ {% endif %}-{% if trainer_identity %}-<div class="alert alert-info" style="margin-top: 1em;">- {% blocktranslate with current_user=user|format_username %}You are- browsing the site as the user "{{current_user}}", all actions are performed on their data.- {% endblocktranslate %}- <a href="{% url 'core:user:trainer-login' trainer_identity %}" class="alert-link">- {% blocktranslate with target=user.userprofile.gym.name %}Back to "{{ target }}"{% endblocktranslate %}- </a>-</div>-{% endif %}+ {% if trainer_identity %}+ <div class="alert alert-info" style="margin-top: 1em;">+ {% blocktranslate with current_user=user|format_username %}You are+ browsing the site as the user "{{ current_user }}", all actions are performed on their data.+ {% endblocktranslate %}+ <a href="{% url 'core:user:trainer-login' trainer_identity %}" class="alert-link">+ {% blocktranslate with target=user.userprofile.gym.name %}Back to "{{ target }}"{% endblocktranslate %}+ </a>+ </div>+ {% endif %}-<div class="row">- <div class="col-sm-8">- <h2 id="page-title" class="page-header">- {% block title %}{% endblock %}- </h2>- <hr>- </div>- <div class="col-sm-4">- <div class="btn-group">+ <div class="row">+ <div class="col-sm-8">+ <h2 id="page-title" class="page-header">+ {% block title %}{% endblock %}+ </h2>+ <hr>+ </div>+ <div class="col-sm-4">+ <div class="btn-group">- {% block options %}- {% endblock %}+ {% block options %}+ {% endblock %}- {% if show_shariff %}- <button type="button"- class="btn btn-light btn-sm"- data-toggle="modal"- data-target="#shariffModal">- <span class="glyphicon glyphicon-retweet"></span>- {% trans "Share" %}- </button>- {% endif %}+ {% if show_shariff %}+ <button type="button"+ class="btn btn-light btn-sm"+ data-bs-toggle="modal"+ data-bs-target="#shariffModal">+ <span class="glyphicon glyphicon-retweet"></span>+ {% trans "Share" %}+ </button>+ {% endif %}+ </div></div></div>-</div>-<div class="row">- <div class="col-sm-12" id="main-content">- {% if messages and not no_messages %}- {% for message in messages %}- <div class="alert {% if message.tags == 'warning'%}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">- <a href="#" class="close extra-bold" data-dismiss="alert">×</a>- {{message}}- </div>- {% endfor %}- {% endif %}+ <div class="row">+ <div class="col-sm-12" id="main-content">+ {% if messages and not no_messages %}+ {% for message in messages %}+ <div+ class="alert {% if message.tags == 'warning' %}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">+ <a href="#" class="close extra-bold" data-bs-dismiss="alert">×</a>+ {{ message }}+ </div>+ {% endfor %}+ {% endif %}- {% render_breadcrumbs "django_bootstrap_breadcrumbs/bootstrap3.html" %}+ {% render_breadcrumbs "django_bootstrap_breadcrumbs/bootstrap3.html" %}- <div id="content">- {% block content %}{% endblock %}+ <div id="content">+ {% block content %}{% endblock %}+ </div></div></div>-</div>{% endblock %}diff --git a/wger/core/templates/index.html b/wger/core/templates/index.htmlindex 11571b30f..a0b03e561 100644--- a/wger/core/templates/index.html+++ b/wger/core/templates/index.html@@ -19,7 +19,7 @@<div class="modal-content"><div class="modal-header"><h4 class="modal-title">{% translate 'Add log to day' %}</h4>- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <button type="button" class="close" data-bs-dismiss="modal" aria-hidden="true">×</button></div><div class="modal-body"><p>{% blocktranslate %}Click to add weight logs to a training@@ -34,7 +34,7 @@<div class="modal-footer"><button type="button"class="btn btn-light"- data-dismiss="modal">+ data-bs-dismiss="modal">{% translate "Close" %}</button></div>@@ -48,7 +48,7 @@<div class="modal-content"><div class="modal-header"><h4 class="modal-title">{% translate 'Add new diary entry' %}</h4>- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"><p>@@ -78,7 +78,7 @@<div class="modal-footer"><button type="button"class="btn btn-light"- data-dismiss="modal">+ data-bs-dismiss="modal">{% translate "Close" %}</button></div>diff --git a/wger/core/templates/language/view.html b/wger/core/templates/language/view.htmlindex bddec39d7..e7460a1f0 100644--- a/wger/core/templates/language/view.html+++ b/wger/core/templates/language/view.html@@ -15,20 +15,20 @@{% block content %}-<table class="table">-<thead>- <tr>- <th>{% translate "Language short name" %}</th>- <th>{% translate "Language full name" %}</th>- </tr>-</thead>-<tbody>- <tr>- <td>{{view_language.short_name}}</td>- <td>{{view_language.full_name}}</td>- </tr>-</tbody>-</table>+ <table class="table">+ <thead>+ <tr>+ <th>{% translate "Language short name" %}</th>+ <th>{% translate "Language full name" %}</th>+ </tr>+ </thead>+ <tbody>+ <tr>+ <td>{{ view_language.short_name }}</td>+ <td>{{ view_language.full_name }}</td>+ </tr>+ </tbody>+ </table>{% endblock %}@@ -45,23 +45,24 @@{# Options #}{# #}{% block options %}-<div class="btn-group"><div class="btn-group">- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">- <span class="{% fa_class 'cog' %}"></span>- {% translate "Options" %}- </button>- <div class="dropdown-menu">- <a href="{% url 'core:language:edit' view_language.id %}" class="wger-modal-dialog dropdown-item">- <span class="{% fa_class 'edit' %}"></span>- {% translate "Edit" %}- </a>- <div role="separator" class="dropdown-divider"></div>- <a href="{% url 'core:language:delete' view_language.id %}" class="wger-modal-dialog dropdown-item">- <span class="{% fa_class 'trash' %}"></span>- {% translate "Delete" %}- </a>+ <div class="btn-group">+ <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown"+ aria-haspopup="true" aria-expanded="false">+ <span class="{% fa_class 'cog' %}"></span>+ {% translate "Options" %}+ </button>+ <div class="dropdown-menu">+ <a href="{% url 'core:language:edit' view_language.id %}" class="wger-modal-dialog dropdown-item">+ <span class="{% fa_class 'edit' %}"></span>+ {% translate "Edit" %}+ </a>+ <div role="separator" class="dropdown-divider"></div>+ <a href="{% url 'core:language:delete' view_language.id %}" class="wger-modal-dialog dropdown-item">+ <span class="{% fa_class 'trash' %}"></span>+ {% translate "Delete" %}+ </a>+ </div></div></div>-</div>{% endblock %}diff --git a/wger/core/templates/license/list.html b/wger/core/templates/license/list.htmlindex d19b383c2..3741261df 100644--- a/wger/core/templates/license/list.html+++ b/wger/core/templates/license/list.html@@ -5,26 +5,28 @@{% block content %}-<ul class="list-group">- {% for license in license_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <div class="dropdown-menu" role="menu">- <a href="{% url 'core:license:edit' license.id %}" class="dropdown-item wger-modal-dialog">{% translate 'Edit' %}</a>- <a href="{% url 'core:license:delete' license.id %}" class="dropdown-item wger-modal-dialog">{% translate 'Delete' %}</a>- </div>- </div>- {{license}}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for license in license_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <div class="dropdown-menu" role="menu">+ <a href="{% url 'core:license:edit' license.id %}"+ class="dropdown-item wger-modal-dialog">{% translate 'Edit' %}</a>+ <a href="{% url 'core:license:delete' license.id %}"+ class="dropdown-item wger-modal-dialog">{% translate 'Delete' %}</a>+ </div>+ </div>+ {{ license }}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}@@ -33,9 +35,9 @@{# Options #}{# #}{% block options %}-{% if perms.core.add_license %}- <a href="{% url 'core:license:add' %}" class="btn btn-success btn-sm wger-modal-dialog">- {% translate "Add" %}- </a>-{% endif %}+ {% if perms.core.add_license %}+ <a href="{% url 'core:license:add' %}" class="btn btn-success btn-sm wger-modal-dialog">+ {% translate "Add" %}+ </a>+ {% endif %}{% endblock %}diff --git a/wger/core/templates/misc/fragments/shariff_modal.html b/wger/core/templates/misc/fragments/shariff_modal.htmlindex f408aacda..b08eb76d5 100644--- a/wger/core/templates/misc/fragments/shariff_modal.html+++ b/wger/core/templates/misc/fragments/shariff_modal.html@@ -4,29 +4,33 @@<div class="modal-content"><div class="modal-header"><h4 class="modal-title">{% translate "Share this page" %}</h4>- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>+ <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>+ </button></div><div class="modal-body"><div class="shariff {% if is_owner and not owner_user.userprofile.ro_access %}d-none{% endif %}"- data-lang="{{language.short_name}}"+ data-lang="{{ language.short_name }}"data-orientation="horizontal"data-button-style="icon"data-services="["facebook","twitter","whatsapp","telegram","info"]"></div>{% if owner_user %}- <div class="noRoAccess {% if user.is_authenticated and is_owner and owner_user.userprofile.ro_access %}d-none{% endif %}">- <p>{% blocktranslate %}Before you share links on social media you need to allow external access.{% endblocktranslate %}</p>- <p>- <a href="{% url 'core:user:preferences' %}" id="toggle-ro-access" class="btn btn-success btn-sm">- <span class="{% fa_class 'check' %}"></span>- {% translate "That's done here" %}- </a>- </p>- </div>+ <div+ class="noRoAccess {% if user.is_authenticated and is_owner and owner_user.userprofile.ro_access %}d-none{% endif %}">+ <p>{% blocktranslate %}Before you share links on social media you need to allow external+ access.{% endblocktranslate %}</p>+ <p>+ <a href="{% url 'core:user:preferences' %}" id="toggle-ro-access"+ class="btn btn-success btn-sm">+ <span class="{% fa_class 'check' %}"></span>+ {% translate "That's done here" %}+ </a>+ </p>+ </div>{% endif %}</div><div class="modal-footer">- <button type="button" class="btn btn-light" data-dismiss="modal">{% translate "Close" %}</button>+ <button type="button" class="btn btn-light" data-bs-dismiss="modal">{% translate "Close" %}</button></div></div></div>diff --git a/wger/core/templates/misc/license/list.html b/wger/core/templates/misc/license/list.htmlindex 8416acc2f..cde6934c4 100644--- a/wger/core/templates/misc/license/list.html+++ b/wger/core/templates/misc/license/list.html@@ -5,44 +5,46 @@{% block content %}-<ul class="list-group">- {% for license in license_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <ul class="dropdown-menu" role="menu">- <li>- <a href="{% url 'core:license:edit' license.id %}" class="wger-modal-dialog">{% translate 'Edit' %}</a>- </li>- <li>- <a href="{% url 'core:license:delete' license.id %}" class="wger-modal-dialog">{% translate 'Delete' %}</a>- </li>- </ul>- </div>- {{license}}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for license in license_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ <li>+ <a href="{% url 'core:license:edit' license.id %}"+ class="wger-modal-dialog">{% translate 'Edit' %}</a>+ </li>+ <li>+ <a href="{% url 'core:license:delete' license.id %}"+ class="wger-modal-dialog">{% translate 'Delete' %}</a>+ </li>+ </ul>+ </div>+ {{ license }}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}{% block sidebar %}-{% if perms.core.add_license %}-<p>- <a href="{% url 'core:license:add' %}" class="btn btn-success btn-sm wger-modal-dialog">- {% translate "Add" %}- </a>-</p>--<p>{% blocktranslate %}If a license has been localized, e.g. the Creative Commons-licenses for the different countries, add them as separate entries here.{% endblocktranslate %}</p>-{% endif %}+ {% if perms.core.add_license %}+ <p>+ <a href="{% url 'core:license:add' %}" class="btn btn-success btn-sm wger-modal-dialog">+ {% translate "Add" %}+ </a>+ </p>++ <p>{% blocktranslate %}If a license has been localized, e.g. the Creative Commons+ licenses for the different countries, add them as separate entries here.{% endblocktranslate %}</p>+ {% endif %}{% endblock %}diff --git a/wger/core/templates/repetition_unit/list.html b/wger/core/templates/repetition_unit/list.htmlindex 4358603de..020530a5b 100644--- a/wger/core/templates/repetition_unit/list.html+++ b/wger/core/templates/repetition_unit/list.html@@ -5,28 +5,30 @@{% block content %}-<ul class="list-group">- {% for unit in object_list %}- <li class="list-group-item ">- {% if unit.id != 1 and unit.id != 2 %}- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <ul class="dropdown-menu" role="menu">- <a href="{% url 'core:repetition-unit:edit' unit.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>- <a href="{% url 'core:repetition-unit:delete' unit.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>- </ul>- </div>- {% endif %}- {{unit}}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for unit in object_list %}+ <li class="list-group-item ">+ {% if unit.id != 1 and unit.id != 2 %}+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ <a href="{% url 'core:repetition-unit:edit' unit.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>+ <a href="{% url 'core:repetition-unit:delete' unit.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>+ </ul>+ </div>+ {% endif %}+ {{ unit }}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}@@ -36,9 +38,9 @@{# Options #}{# #}{% block options %}-{% if perms.core.add_license %}- <a href="{% url 'core:repetition-unit:add' %}" class="btn btn-success btn-sm wger-modal-dialog">- {% translate "Add" %}- </a>-{% endif %}+ {% if perms.core.add_license %}+ <a href="{% url 'core:repetition-unit:add' %}" class="btn btn-success btn-sm wger-modal-dialog">+ {% translate "Add" %}+ </a>+ {% endif %}{% endblock %}diff --git a/wger/core/templates/rest_framework/api.html b/wger/core/templates/rest_framework/api.htmlindex 7ac3a18f2..a03ec7a7f 100644--- a/wger/core/templates/rest_framework/api.html+++ b/wger/core/templates/rest_framework/api.html@@ -2,14 +2,14 @@{% load rest_framework wger_extras django_bootstrap_breadcrumbs static crispy_forms_tags %}{% block header %}-<link rel="stylesheet" type="text/css" href="{% static 'rest_framework/css/prettify.css' %}"/>-<script src="{% static 'rest_framework/js/prettify-min.js' %}"></script>--<script>- $(document).ready(function() {- prettyPrint();- });-</script>+ <link rel="stylesheet" type="text/css" href="{% static 'rest_framework/css/prettify.css' %}"/>+ <script src="{% static 'rest_framework/js/prettify-min.js' %}"></script>++ <script>+ $(document).ready(function () {+ prettyPrint();+ });+ </script>{% endblock %}{% block title %}REST API - {{ name }}{% endblock %}@@ -23,86 +23,93 @@{% breadcrumb "Api Documentation" "software:api" %}{% for breadcrumb_name, breadcrumb_url in breadcrumblist %}{% breadcrumb_raw breadcrumb_name breadcrumb_url %}- {% endfor %}+ {% endfor %}{% endblock %}{% block content %}- {# #}- {# GET button #}- {# #}- {% if 'GET' in allowed_methods %}- <form id="get-form" class="float-right">- <fieldset>- <div class="btn-group format-selection">- <a class="btn btn-primary js-tooltip" href='{{ request.get_full_path }}' rel="nofollow" title="Make a GET request on the {{ name }} resource">GET</a>-- <button class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" title="Specify a format for the GET request">- <span class="caret"></span>- </button>- <ul class="dropdown-menu">- {% for format in available_formats %}- <li>- <a class="js-tooltip format-option dropdown-item" href='{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %}' rel="nofollow" title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">{{ format }}</a>- </li>- {% endfor %}- </ul>- </div>-- </fieldset>- </form>- {% endif %}-- {# #}- {# OPTIONS button #}- {# #}- {% if options_form %}- <form class="float-right" action="{{ request.get_full_path }}" method="POST" style="margin-right: 1em;">- {% csrf_token %}- <input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="OPTIONS" />- <button class="btn btn-primary js-tooltip" title="Make an OPTIONS request on the {{ name }} resource">OPTIONS</button>- </form>- {% endif %}-- {# #}- {# DELETE button #}- {# #}- {% if delete_form %}- <form class="float-right" action="{{ request.get_full_path }}" method="POST" style="margin-right: 1em;">- {% csrf_token %}- <input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="DELETE" />- <button class="btn btn-danger js-tooltip" title="Make a DELETE request on the {{ name }} resource">DELETE</button>- </form>- {% endif %}- <div class="clearfix"></div>---- {# #}- {# Object/endpoint description #}- {# #}- <div>- <!--<h4>{{ name }}</h4>-->--- {% block description %}+{# #}+{# GET button #}+{# #}+{% if 'GET' in allowed_methods %}+ <form id="get-form" class="float-right">+ <fieldset>+ <div class="btn-group format-selection">+ <a class="btn btn-primary js-tooltip" href='{{ request.get_full_path }}' rel="nofollow"+ title="Make a GET request on the {{ name }} resource">GET</a>++ <button class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown"+ title="Specify a format for the GET request">+ <span class="caret"></span>+ </button>+ <ul class="dropdown-menu">+ {% for format in available_formats %}+ <li>+ <a class="js-tooltip format-option dropdown-item"+ href='{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %}'+ rel="nofollow"+ title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">{{ format }}</a>+ </li>+ {% endfor %}+ </ul>+ </div>++ </fieldset>+ </form>+{% endif %}++{# #}+{# OPTIONS button #}+{# #}+{% if options_form %}+ <form class="float-right" action="{{ request.get_full_path }}" method="POST" style="margin-right: 1em;">+ {% csrf_token %}+ <input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="OPTIONS"/>+ <button class="btn btn-primary js-tooltip" title="Make an OPTIONS request on the {{ name }} resource">OPTIONS+ </button>+ </form>+{% endif %}++{# #}+{# DELETE button #}+{# #}+{% if delete_form %}+ <form class="float-right" action="{{ request.get_full_path }}" method="POST" style="margin-right: 1em;">+ {% csrf_token %}+ <input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="DELETE"/>+ <button class="btn btn-danger js-tooltip" title="Make a DELETE request on the {{ name }} resource">DELETE+ </button>+ </form>+{% endif %}+<div class="clearfix"></div>+++{# #}+{# Object/endpoint description #}+{# #}+<div>+ <!--<h4>{{ name }}</h4>-->+++ {% block description %}<p>{{ description }}</p>- {% endblock %}+ {% endblock %}- <div class="request-info" style="clear: both" >- <pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>- </div>- <div class="response-info">+ <div class="request-info" style="clear: both">+ <pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>+ </div>+ <div class="response-info"><pre class="prettyprint">- <div class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}- {% for key, val in response_headers.items %}- <b>{{ key }}:</b>- <span class="lit">{{ val|break_long_headers|urlize }}</span>- {% endfor %}+ <div+ class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}+ {% for key, val in response_headers.items %}+ <b>{{ key }}:</b>+ <span class="lit">{{ val|break_long_headers|urlize }}</span>+ {% endfor %}</div>{{ content|urlize }}</pre>- {% endautoescape %}- </div>+ {% endautoescape %}</div>+</div>{% endblock %}diff --git a/wger/core/templates/tags/render_day.html b/wger/core/templates/tags/render_day.htmlindex e658d7c1c..37c4e19a8 100644--- a/wger/core/templates/tags/render_day.html+++ b/wger/core/templates/tags/render_day.html@@ -23,7 +23,7 @@<div class="float-right"><div class="dropdown"><button class="btn btn-sm dropdown-toggle " type="button"- id="dropdownMenuDay{{ day.id }}" data-toggle="dropdown"+ id="dropdownMenuDay{{ day.id }}" data-bs-toggle="dropdown"aria-haspopup="true" aria-expanded="false"><span class="{% fa_class 'cog' %}"></span></button>@@ -64,7 +64,7 @@{% if editable %}<div class="dropdown float-right"><button class="btn btn-link btn-sm btn-block dropdown-toggle " type="button"- id="dropdownMenuSet{{ set.id }}" data-toggle="dropdown"+ id="dropdownMenuSet{{ set.id }}" data-bs-toggle="dropdown"aria-haspopup="true" aria-expanded="false"></button><div class="dropdown-menu dropdown-menu-right"diff --git a/wger/core/templates/template.html b/wger/core/templates/template.htmlindex 5db417b63..07ba72f22 100644--- a/wger/core/templates/template.html+++ b/wger/core/templates/template.html@@ -112,7 +112,7 @@<h4 class="modal-title" id="ajax-info-title">Modal title</h4><button type="button"class="close pl-2"- data-dismiss="modal"+ data-bs-dismiss="modal"aria-hidden="true">×</button>@@ -121,7 +121,7 @@</div><div class="modal-footer"><button type="button" class="btn btn-light"- data-dismiss="modal">{% translate "Close" %}</button>+ data-bs-dismiss="modal">{% translate "Close" %}</button></div></div></div>diff --git a/wger/core/templates/template_features.html b/wger/core/templates/template_features.htmlindex 082c8303a..52db635f3 100644--- a/wger/core/templates/template_features.html+++ b/wger/core/templates/template_features.html@@ -18,9 +18,9 @@{% load i18n static compress wger_extras %}-<html lang="{{language.short_name}}">+<html lang="{{ language.short_name }}"><head>- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">@@ -36,25 +36,25 @@<!-- twitter cards -->{% block twittercard %}- {% if twitter %}- <meta content="summary" name="twitter:card">- <meta content="@{{ twitter }}" name="twitter:site">- {% endif %}+ {% if twitter %}+ <meta content="summary" name="twitter:card">+ <meta content="@{{ twitter }}" name="twitter:site">+ {% endif %}{% endblock %}{% compress css %}- <link rel="stylesheet" type="text/css" href="{% static 'yarn/bootstrap/dist/css/bootstrap.min.css' %}">- <link rel="stylesheet" type="text/css" href="{% static 'yarn/components-font-awesome/css/all.css' %}">- <link rel="stylesheet" type="text/css" href="{% static 'css/agency.css' %}">- <link rel="stylesheet" type="text/css" href="{% static 'yarn/shariff/dist/shariff.min.css' %}">+ <link rel="stylesheet" type="text/css" href="{% static 'yarn/bootstrap/dist/css/bootstrap.min.css' %}">+ <link rel="stylesheet" type="text/css" href="{% static 'yarn/components-font-awesome/css/all.css' %}">+ <link rel="stylesheet" type="text/css" href="{% static 'css/agency.css' %}">+ <link rel="stylesheet" type="text/css" href="{% static 'yarn/shariff/dist/shariff.min.css' %}">{% endcompress %}<link rel="icon" href="{% static 'images/favicon.png' %}" type="image/png">{% compress js %}- <script src="{% static 'yarn/jquery/dist/jquery.js' %}"></script>- <script src="{% static 'yarn/bootstrap/dist/js/bootstrap.min.js' %}"></script>+ <script src="{% static 'yarn/jquery/dist/jquery.js' %}"></script>+ <script src="{% static 'yarn/bootstrap/dist/js/bootstrap.min.js' %}"></script>{% endcompress %}<title>wger Workout Manager - {% translate "Features" %}</title>@@ -63,13 +63,12 @@<body id="page-top" class="index">{% if user.is_authenticated %}-{% include 'navigation.html' %}-{% endif %}-- {% block template %}{% endblock %}- <div id="current-url" data-current-url="{{request_full_path}}"></div>- <div id="current-language" data-current-language="{{language.short_name}}"></div>+ {% include 'navigation.html' %}+{% endif %}+{% block template %}{% endblock %}+<div id="current-url" data-current-url="{{ request_full_path }}"></div>+<div id="current-language" data-current-language="{{ language.short_name }}"></div><footer class="bg-darkest-gray">@@ -102,11 +101,11 @@<li class="list-inline-item">{% if show_shariff %}{% include 'misc/fragments/shariff_modal.html' %}- <a data-toggle="modal" href="#shariffModal" title="Share">+ <a data-bs-toggle="modal" href="#shariffModal" title="Share"><span class="{% fa_class 'share-alt' %}"></span></a><div class="clearfix"></div>- {% endif %}+ {% endif %}</li></ul></div>@@ -117,7 +116,8 @@</li><li class="list-inline-item">- <a href="{% url 'software:tos' %}" class="text-muted small">{% translate "Terms of service" %}</a>+ <a href="{% url 'software:tos' %}"+ class="text-muted small">{% translate "Terms of service" %}</a></li></ul></div>diff --git a/wger/core/templates/user/overview.html b/wger/core/templates/user/overview.htmlindex 12951cb23..9da63dcab 100644--- a/wger/core/templates/user/overview.html+++ b/wger/core/templates/user/overview.html@@ -198,7 +198,7 @@{% block sidebar %}{% if perms.gym.manage_gyms or perms.gym.manage_gym %}<div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></button><div class="dropdown-menu" role="menu">@@ -209,7 +209,7 @@{% else %}<a href="{% url 'core:user:activate' current_user.pk %}" class="dropdown-item">{% translate "Activate user"%}</a>{% endif %}- <a data-url="{% url 'gym:gym:reset-user-password' current_user.pk %}" data-toggle="modal" data-target="#confirmation-modal" class="dropdown-item">{% translate "Reset user password" %}</a>+ <a data-url="{% url 'gym:gym:reset-user-password' current_user.pk %}" data-bs-toggle="modal" data-bs-target="#confirmation-modal" class="dropdown-item">{% translate "Reset user password" %}</a>{% if perms.gym.manage_gym or perms.gym.manage_gyms %}{% if current_user.userprofile.gym %}<a href="{% url 'gym:gym:edit-user-permission' current_user.pk %}" class="wger-modal-dialog dropdown-item">{% translate "Roles"%}</a>@@ -224,13 +224,13 @@<div class="modal-content"><div class="modal-header"><h4 class="modal-title">{% translate 'Password reset confirmation' %}</h4>- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>+ <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><p>{% translate 'Do you really want to change this user's password?' %}</p></div><div class="modal-footer">- <button type="button" class="btn btn-danger" data-dismiss="modal">{% translate 'No' %}</button>+ <button type="button" class="btn btn-danger" data-bs-dismiss="modal">{% translate 'No' %}</button><button type="button" class="btn btn-success">{% translate 'Yes' %}</button></div></div>@@ -319,7 +319,7 @@{# #}{% if perms.gym.add_contract %}<div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></button><div class="dropdown-menu" role="menu">@@ -358,7 +358,7 @@{# #}{% if perms.gym.add_adminusernote %}<div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></button><div class="dropdown-menu" role="menu">@@ -394,7 +394,7 @@{# #}{% if perms.gym.add_userdocument %}<div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></button><div class="dropdown-menu" role="menu">@@ -439,7 +439,7 @@{# #}{% if perms.gym.change_gymuserconfig and current_user.gymuserconfig %}<div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></button><div class="dropdown-menu" role="menu">diff --git a/wger/core/templates/user/preferences.html b/wger/core/templates/user/preferences.htmlindex 007318855..826302c19 100644--- a/wger/core/templates/user/preferences.html+++ b/wger/core/templates/user/preferences.html@@ -37,27 +37,28 @@{# Options #}{# #}{% block options %}-<div class="btn-group">- <div class="btn-group" role="group">- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">- <span class="{% fa_class 'cog' %}"></span>- {% translate "Options" %}- </button>- <div class="dropdown-menu">- <a href="{% url 'core:user:change-password' %}" class="dropdown-item">- <span class="{% fa_class 'key' %}"></span>- {% translate "Change password" %}- </a>- <a href="{% url 'core:user:api-key' %}" class="dropdown-item">- <span class="{% fa_class 'globe' %}"></span>- {% translate "API key" %}- </a>- <div role="separator" class="dropdown-divider"></div>- <a href="{% url 'core:user:delete' %}" class="wger-modal-dialog dropdown-item">- <span class="{% fa_class 'trash' %}"></span>- {% translate "Delete account" %}- </a>+ <div class="btn-group">+ <div class="btn-group" role="group">+ <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown"+ aria-haspopup="true" aria-expanded="false">+ <span class="{% fa_class 'cog' %}"></span>+ {% translate "Options" %}+ </button>+ <div class="dropdown-menu">+ <a href="{% url 'core:user:change-password' %}" class="dropdown-item">+ <span class="{% fa_class 'key' %}"></span>+ {% translate "Change password" %}+ </a>+ <a href="{% url 'core:user:api-key' %}" class="dropdown-item">+ <span class="{% fa_class 'globe' %}"></span>+ {% translate "API key" %}+ </a>+ <div role="separator" class="dropdown-divider"></div>+ <a href="{% url 'core:user:delete' %}" class="wger-modal-dialog dropdown-item">+ <span class="{% fa_class 'trash' %}"></span>+ {% translate "Delete account" %}+ </a>+ </div></div></div>-</div>{% endblock %}diff --git a/wger/core/templates/weight_unit/list.html b/wger/core/templates/weight_unit/list.htmlindex 481180288..953a6b86a 100644--- a/wger/core/templates/weight_unit/list.html+++ b/wger/core/templates/weight_unit/list.html@@ -5,28 +5,30 @@{% block content %}-<ul class="list-group">- {% for unit in object_list %}- <li class="list-group-item ">- {% if unit.id != 1 and unit.id != 2 %}- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <div class="dropdown-menu" role="menu">- <a href="{% url 'core:weight-unit:edit' unit.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>- <a href="{% url 'core:weight-unit:delete' unit.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>- </div>- </div>- {% endif %}- {{unit}}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for unit in object_list %}+ <li class="list-group-item ">+ {% if unit.id != 1 and unit.id != 2 %}+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <div class="dropdown-menu" role="menu">+ <a href="{% url 'core:weight-unit:edit' unit.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>+ <a href="{% url 'core:weight-unit:delete' unit.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>+ </div>+ </div>+ {% endif %}+ {{ unit }}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}@@ -36,9 +38,9 @@{# Options #}{# #}{% block options %}-{% if perms.core.add_license %}- <a href="{% url 'core:weight-unit:add' %}" class="btn btn-success btn-sm wger-modal-dialog">- {% translate "Add" %}- </a>-{% endif %}+ {% if perms.core.add_license %}+ <a href="{% url 'core:weight-unit:add' %}" class="btn btn-success btn-sm wger-modal-dialog">+ {% translate "Add" %}+ </a>+ {% endif %}{% endblock %}diff --git a/wger/exercises/templates/categories/admin-overview.html b/wger/exercises/templates/categories/admin-overview.htmlindex ae688cc7d..9f5af3e2e 100644--- a/wger/exercises/templates/categories/admin-overview.html+++ b/wger/exercises/templates/categories/admin-overview.html@@ -5,36 +5,38 @@{% block content %}-<ul class="list-group">- {% for category in exercisecategory_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <div class="dropdown-menu dropdown-menu-right" role="menu">- <a href="{% url 'exercise:category:edit' category.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>- <a href="{% url 'exercise:category:delete' category.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>- </div>- </div>- {{ category }}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for category in exercisecategory_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <div class="dropdown-menu dropdown-menu-right" role="menu">+ <a href="{% url 'exercise:category:edit' category.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>+ <a href="{% url 'exercise:category:delete' category.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>+ </div>+ </div>+ {{ category }}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}{% block options %}-{% if perms.exercises.add_exercisecategory %}-<p>- <a href="{% url 'exercise:category:add' %}" class="btn btn-success btn-sm wger-modal-dialog">- {% translate "Add" %}- </a>-</p>-{% endif %}+ {% if perms.exercises.add_exercisecategory %}+ <p>+ <a href="{% url 'exercise:category:add' %}" class="btn btn-success btn-sm wger-modal-dialog">+ {% translate "Add" %}+ </a>+ </p>+ {% endif %}{% endblock %}diff --git a/wger/exercises/templates/equipment/admin-overview.html b/wger/exercises/templates/equipment/admin-overview.htmlindex 508ee700c..73268f1dc 100644--- a/wger/exercises/templates/equipment/admin-overview.html+++ b/wger/exercises/templates/equipment/admin-overview.html@@ -5,37 +5,39 @@{% block content %}-<ul class="list-group">- {% for equipment in equipment_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <div class="dropdown-menu dropdown-menu-right" role="menu">- <a href="{% url 'exercise:equipment:edit' equipment.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>- <a href="{% url 'exercise:equipment:delete' equipment.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>- </div>- </div>- {{equipment.name}}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for equipment in equipment_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <div class="dropdown-menu dropdown-menu-right" role="menu">+ <a href="{% url 'exercise:equipment:edit' equipment.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>+ <a href="{% url 'exercise:equipment:delete' equipment.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>+ </div>+ </div>+ {{ equipment.name }}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}{% block sidebar %}-{% if perms.exercises.add_equipment %}-<p>- <a href="{% url 'exercise:equipment:add' %}" class="btn btn-success btn-sm wger-modal-dialog">- {% translate "Add new equipment" %}- </a>-</p>-{% endif %}+ {% if perms.exercises.add_equipment %}+ <p>+ <a href="{% url 'exercise:equipment:add' %}" class="btn btn-success btn-sm wger-modal-dialog">+ {% translate "Add new equipment" %}+ </a>+ </p>+ {% endif %}{% endblock %}diff --git a/wger/exercises/templates/history/overview.html b/wger/exercises/templates/history/overview.htmlindex c8e0c7d39..540e1f6c8 100644--- a/wger/exercises/templates/history/overview.html+++ b/wger/exercises/templates/history/overview.html@@ -69,7 +69,7 @@</td>{% elif event.stream.verb == verbs.UPDATED.value %}<td>- <a class="btn btn-success btn-sm btn-block" data-toggle="collapse"+ <a class="btn btn-success btn-sm btn-block" data-bs-toggle="collapse"href="#collapse-{{ event.stream.id }}"role="button">{% translate "View changes" %}@@ -78,8 +78,8 @@<td><a href="#"id="revert-changes"- data-toggle="modal"- data-target="#revert-modal-{{ event.stream.id }}"+ data-bs-toggle="modal"+ data-bs-target="#revert-modal-{{ event.stream.id }}"class="btn btn-danger btn-sm btn-block"{% if not event.history_id %}disabled{% endif %}>@@ -102,7 +102,7 @@<div class="modal-footer"><button type="button"class="btn btn-light"- data-dismiss="modal">+ data-bs-dismiss="modal">{% translate "No" %}</button></div>diff --git a/wger/exercises/templates/muscles/admin-overview.html b/wger/exercises/templates/muscles/admin-overview.htmlindex 4d7e86907..9228e5322 100644--- a/wger/exercises/templates/muscles/admin-overview.html+++ b/wger/exercises/templates/muscles/admin-overview.html@@ -5,35 +5,37 @@{% block content %}-<ul class="list-group">- {% for muscle in muscle_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <div class="dropdown-menu dropdown-menu-right" role="menu">- <a href="{% url 'exercise:muscle:edit' muscle.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>- <a href="{% url 'exercise:muscle:delete' muscle.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>- </div>- </div>- {{ muscle }}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for muscle in muscle_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <div class="dropdown-menu dropdown-menu-right" role="menu">+ <a href="{% url 'exercise:muscle:edit' muscle.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>+ <a href="{% url 'exercise:muscle:delete' muscle.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>+ </div>+ </div>+ {{ muscle }}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}{% block options %}-{% if perms.exercises.add_equipment %}- <a href="{% url 'exercise:muscle:add' %}" class="btn btn-success btn-sm wger-modal-dialog">- {% translate "Add muscle" %}- </a>-{% endif %}+ {% if perms.exercises.add_equipment %}+ <a href="{% url 'exercise:muscle:add' %}" class="btn btn-success btn-sm wger-modal-dialog">+ {% translate "Add muscle" %}+ </a>+ {% endif %}{% endblock %}diff --git a/wger/gallery/templates/images/overview.html b/wger/gallery/templates/images/overview.htmlindex df0cb5c41..2355d5ea0 100644--- a/wger/gallery/templates/images/overview.html+++ b/wger/gallery/templates/images/overview.html@@ -15,7 +15,7 @@<div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="exampleModalLabel">{{ image.date }}</h5>- <button type="button" class="close" data-dismiss="modal" aria-label="Close">+ <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div>@@ -42,11 +42,11 @@</div>{% endfor %}- <div class="row" >+ <div class="row">{% for image in images %}<div class="col-sm-6 col-lg-4 mb-4"><div class="card">- <a href="#" data-toggle="modal" data-target="#modalImage{{ image.id }}">+ <a href="#" data-bs-toggle="modal" data-bs-target="#modalImage{{ image.id }}"><img class="card-img-top" src="{{ image.image.url }}" alt="{{ image.description }}"></a></div>diff --git a/wger/gym/templates/admin_notes/list.html b/wger/gym/templates/admin_notes/list.htmlindex 6da13a17f..33eb37696 100644--- a/wger/gym/templates/admin_notes/list.html+++ b/wger/gym/templates/admin_notes/list.html@@ -18,41 +18,41 @@{% block content %}-<ul class="list-group">- {% for note in adminusernote_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <ul class="dropdown-menu" role="menu">- {% if perms.gym.change_adminusernote %}- <li>- <a href="{% url 'gym:admin_note:edit' note.pk %}" class="wger-modal-dialog">- {% translate 'Edit' %}- </a>- </li>- {% endif %}+ <ul class="list-group">+ {% for note in adminusernote_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ {% if perms.gym.change_adminusernote %}+ <li>+ <a href="{% url 'gym:admin_note:edit' note.pk %}" class="wger-modal-dialog">+ {% translate 'Edit' %}+ </a>+ </li>+ {% endif %}- {% if perms.gym.delete_adminusernote %}- <li>- <a href="{% url 'gym:admin_note:delete' note.pk %}" class="wger-modal-dialog">- {% translate 'Delete' %}- </a>- <li>- {% endif %}- </ul>- </div>+ {% if perms.gym.delete_adminusernote %}+ <li>+ <a href="{% url 'gym:admin_note:delete' note.pk %}" class="wger-modal-dialog">+ {% translate 'Delete' %}+ </a>+ <li>+ {% endif %}+ </ul>+ </div>- <h4 class="list-group-item-heading">{{ note.timestamp_created }} - {{ note.user|format_username }}</h4>- <p class="list-group-item-text">{{ note.note }}</p>- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <h4 class="list-group-item-heading">{{ note.timestamp_created }} - {{ note.user|format_username }}</h4>+ <p class="list-group-item-text">{{ note.note }}</p>+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}@@ -62,9 +62,9 @@{# Options #}{# #}{% block options %}-{% if perms.gym.add_adminusernote %}- <a href="{% url 'gym:admin_note:add' member.pk %}" class="wger-modal-dialog btn btn-success btn-sm">- {% translate "Add" %}- </a>-{% endif %}+ {% if perms.gym.add_adminusernote %}+ <a href="{% url 'gym:admin_note:add' member.pk %}" class="wger-modal-dialog btn btn-success btn-sm">+ {% translate "Add" %}+ </a>+ {% endif %}{% endblock %}diff --git a/wger/gym/templates/contract/list.html b/wger/gym/templates/contract/list.htmlindex 30196589b..02fcb8044 100644--- a/wger/gym/templates/contract/list.html+++ b/wger/gym/templates/contract/list.html@@ -17,50 +17,50 @@{% block content %}-<div class="list-group">- {% for contract in contract_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <ul class="dropdown-menu" role="menu">- {% if perms.gym.change_contract %}- <li>- <a href="{% url 'gym:contract:edit' contract.pk %}">- {% translate 'Edit' %}- </a>- </li>- <li>- <a href="{% url 'gym:contract:view' contract.pk %}">- {% translate 'Show' %}- </a>- </li>- {% endif %}+ <div class="list-group">+ {% for contract in contract_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ {% if perms.gym.change_contract %}+ <li>+ <a href="{% url 'gym:contract:edit' contract.pk %}">+ {% translate 'Edit' %}+ </a>+ </li>+ <li>+ <a href="{% url 'gym:contract:view' contract.pk %}">+ {% translate 'Show' %}+ </a>+ </li>+ {% endif %}- </ul>- </div>+ </ul>+ </div>- <h4 class="list-group-item-heading">- {{ contract.contract_type.name }}+ <h4 class="list-group-item-heading">+ {{ contract.contract_type.name }}- <small>- {{ contract.date_start }}- {% if contract.date_end %}- - {{ contract.date_end }}- {% endif %}- </small>- </h4>+ <small>+ {{ contract.date_start }}+ {% if contract.date_end %}+ - {{ contract.date_end }}+ {% endif %}+ </small>+ </h4>- <p class="list-group-item-text">{{ contract.note }}</p>- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</div>+ <p class="list-group-item-text">{{ contract.note }}</p>+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </div>{% endblock %}@@ -69,5 +69,6 @@{# Options #}{# #}{% block options %}- <a href="{% url 'gym:contract:add' member.pk %}" class="wger-modal-dialog btn btn-sm btn-success">{% translate "Add" %}</a>+ <a href="{% url 'gym:contract:add' member.pk %}"+ class="wger-modal-dialog btn btn-sm btn-success">{% translate "Add" %}</a>{% endblock %}diff --git a/wger/gym/templates/contract_option/list.html b/wger/gym/templates/contract_option/list.htmlindex 6d563c27d..84132fcea 100644--- a/wger/gym/templates/contract_option/list.html+++ b/wger/gym/templates/contract_option/list.html@@ -17,46 +17,46 @@{% block content %}-<ul class="list-group">- {% for option in contractoption_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <ul class="dropdown-menu" role="menu">- {% if perms.gym.change_contracttype %}- <li>- <a href="{% url 'gym:contract-option:edit' option.pk %}" class="wger-modal-dialog">- {% translate 'Edit' %}- </a>- </li>- {% endif %}-- {% if perms.gym.delete_contracttype %}- <li>- <a href="{% url 'gym:contract-option:delete' option.pk %}" class="wger-modal-dialog">- {% translate 'Delete' %}- </a>- </li>- {% endif %}-- </ul>- </div>--- <h4 class="list-group-item-heading">- {{ option.name }}- </h4>-- <p class="list-group-item-text" style="white-space: pre-line;">{{ option.description }}</p>- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for option in contractoption_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ {% if perms.gym.change_contracttype %}+ <li>+ <a href="{% url 'gym:contract-option:edit' option.pk %}" class="wger-modal-dialog">+ {% translate 'Edit' %}+ </a>+ </li>+ {% endif %}++ {% if perms.gym.delete_contracttype %}+ <li>+ <a href="{% url 'gym:contract-option:delete' option.pk %}" class="wger-modal-dialog">+ {% translate 'Delete' %}+ </a>+ </li>+ {% endif %}++ </ul>+ </div>+++ <h4 class="list-group-item-heading">+ {{ option.name }}+ </h4>++ <p class="list-group-item-text" style="white-space: pre-line;">{{ option.description }}</p>+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}diff --git a/wger/gym/templates/contract_type/list.html b/wger/gym/templates/contract_type/list.htmlindex bb60e68ac..b391bdcf5 100644--- a/wger/gym/templates/contract_type/list.html+++ b/wger/gym/templates/contract_type/list.html@@ -17,46 +17,47 @@{% block content %}-<ul class="list-group">- {% for contract_type in contracttype_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <ul class="dropdown-menu" role="menu">- {% if perms.gym.change_contracttype %}- <li>- <a href="{% url 'gym:contract_type:edit' contract_type.pk %}" class="wger-modal-dialog">- {% translate 'Edit' %}- </a>- </li>- {% endif %}-- {% if perms.gym.delete_contracttype %}- <li>- <a href="{% url 'gym:contract_type:delete' contract_type.pk %}" class="wger-modal-dialog">- {% translate 'Delete' %}- </a>- </li>- {% endif %}-- </ul>- </div>--- <h4 class="list-group-item-heading">- {{ contract_type.name }}- </h4>-- <p class="list-group-item-text" style="white-space: pre-line;">{{ contract_type.description }}</p>- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <ul class="list-group">+ {% for contract_type in contracttype_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ {% if perms.gym.change_contracttype %}+ <li>+ <a href="{% url 'gym:contract_type:edit' contract_type.pk %}" class="wger-modal-dialog">+ {% translate 'Edit' %}+ </a>+ </li>+ {% endif %}++ {% if perms.gym.delete_contracttype %}+ <li>+ <a href="{% url 'gym:contract_type:delete' contract_type.pk %}"+ class="wger-modal-dialog">+ {% translate 'Delete' %}+ </a>+ </li>+ {% endif %}++ </ul>+ </div>+++ <h4 class="list-group-item-heading">+ {{ contract_type.name }}+ </h4>++ <p class="list-group-item-text" style="white-space: pre-line;">{{ contract_type.description }}</p>+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}diff --git a/wger/gym/templates/document/list.html b/wger/gym/templates/document/list.htmlindex 5f8e4065e..05aa37b65 100644--- a/wger/gym/templates/document/list.html+++ b/wger/gym/templates/document/list.html@@ -18,52 +18,53 @@{% block content %}-<ul class="list-group">- {% for document in userdocument_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <ul class="dropdown-menu" role="menu">- <li>- <a href="{{ document.document.url }}" download="{{ document.original_name }}">- <span class="glyphicon glyphicon-download"></span>- {% translate 'Download' %}- </a>- </li>- {% if perms.gym.change_userdocument %}- <li>- <a href="{% url 'gym:document:edit' document.pk %}">- {% translate 'Edit' %}- </a>- </li>- {% endif %}+ <ul class="list-group">+ {% for document in userdocument_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ <li>+ <a href="{{ document.document.url }}" download="{{ document.original_name }}">+ <span class="glyphicon glyphicon-download"></span>+ {% translate 'Download' %}+ </a>+ </li>+ {% if perms.gym.change_userdocument %}+ <li>+ <a href="{% url 'gym:document:edit' document.pk %}">+ {% translate 'Edit' %}+ </a>+ </li>+ {% endif %}- {% if perms.gym.delete_userdocument %}- <li>- <a href="{% url 'gym:document:delete' document.pk %}" class="wger-modal-dialog">- {% translate 'Delete' %}- </a>- </li>- {% endif %}+ {% if perms.gym.delete_userdocument %}+ <li>+ <a href="{% url 'gym:document:delete' document.pk %}" class="wger-modal-dialog">+ {% translate 'Delete' %}+ </a>+ </li>+ {% endif %}- </ul>- </div>+ </ul>+ </div>- <h4 class="list-group-item-heading">{{ document.name }}</h4>+ <h4 class="list-group-item-heading">{{ document.name }}</h4>- <p class="list-group-item-text">{{ document.timestamp_created }} - {{ document.user|format_username }}</p>- {% if document.note %}- <p class="list-group-item-text">{{ document.note }}</p>- {% endif %}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>+ <p class="list-group-item-text">{{ document.timestamp_created }}+ - {{ document.user|format_username }}</p>+ {% if document.note %}+ <p class="list-group-item-text">{{ document.note }}</p>+ {% endif %}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>{% endblock %}@@ -73,9 +74,9 @@{# Options #}{# #}{% block options %}-{% if perms.gym.add_userdocument %}- <a href="{% url 'gym:document:add' member.pk %}" class="btn btn-sm btn-success">- {% translate "Add" %}- </a>-{% endif %}+ {% if perms.gym.add_userdocument %}+ <a href="{% url 'gym:document:add' member.pk %}" class="btn btn-sm btn-success">+ {% translate "Add" %}+ </a>+ {% endif %}{% endblock %}diff --git a/wger/gym/templates/gym/list.html b/wger/gym/templates/gym/list.htmlindex f7dc525c1..1fda996f6 100644--- a/wger/gym/templates/gym/list.html+++ b/wger/gym/templates/gym/list.html@@ -12,7 +12,7 @@{% for gym in gym_list %}<li class="list-group-item "><div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown"><span class="{% fa_class 'cog' %}"></span></button><div class="dropdown-menu dropdown-menu-right" role="menu">@@ -36,7 +36,7 @@{% block sidebar %}{% if perms.config.change_gymconfig %}<div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></button><div class="dropdown-menu" role="menu">diff --git a/wger/gym/templates/gym/member_list.html b/wger/gym/templates/gym/member_list.htmlindex af36292ba..fb6fcd66d 100644--- a/wger/gym/templates/gym/member_list.html+++ b/wger/gym/templates/gym/member_list.html@@ -80,7 +80,7 @@{# #}{% if perms.gym.change_gym %}<div class="dropdown float-right">- <a type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <a type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></a><div class="dropdown-menu dropdown-menu-right" role="menu">@@ -133,7 +133,7 @@{# #}{% if perms.gym.change_gymconfig %}<div class="dropdown float-right">- <a role="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <a role="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></a><div class="dropdown-menu dropdown-menu-right">@@ -169,7 +169,7 @@{% if user.gymadminconfig and user.userprofile.gym_id == gym.id %}<div class="dropdown float-right"><div class="btn-group ">- <a role="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <a role="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></a><div class="dropdown-menu dropdown-menu-right" role="menu">@@ -203,7 +203,7 @@{% endif %}{% if perms.gym.change_contracttype %}<div class="dropdown float-right">- <a role="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <a role="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></a><div class="dropdown-menu dropdown-menu-right" role="menu">@@ -236,7 +236,7 @@{% if perms.gym.change_contractoption %}<div class="dropdown float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></button><div class="dropdown-menu dropdown-menu-right" role="menu">@@ -273,7 +273,7 @@{# #}{% if perms.mailer.change_log %}<div class="dropdown float-right">- <a role="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <a role="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">{% translate "Actions" %} <span class="caret"></span></a><div class="dropdown-menu dropdown-menu-right" role="menu">diff --git a/wger/manager/templates/calendar/day.html b/wger/manager/templates/calendar/day.htmlindex 075b52718..643dbc8f3 100644--- a/wger/manager/templates/calendar/day.html+++ b/wger/manager/templates/calendar/day.html@@ -9,7 +9,8 @@<meta property="og:title" content="{% translate 'Workout log' %}">{% with username=owner_user.username %}- <meta property="og:description" content="{% blocktranslate %}Workout log for {{username}} for {{date}}{% endblocktranslate %}">+ <meta property="og:description"+ content="{% blocktranslate %}Workout log for {{ username }} for {{ date }}{% endblocktranslate %}">{% endwith %}{% endblock %}@@ -28,37 +29,37 @@{# #}{# Title #}{# #}-{% block title %}{% translate "Workout log" %} – {{date}}{% endblock %}+{% block title %}{% translate "Workout log" %} – {{ date }}{% endblock %}{# #}{# Content #}{# #}{% block content %}-{% if logs %}- {% for date, value in logs.items %}+ {% if logs %}+ {% for date, value in logs.items %}- {% include 'calendar/partial_overview_table.html' %}+ {% include 'calendar/partial_overview_table.html' %}- {% for exercise, logs in value.logs.items %}- <table class="table table-hover table-bordered" style="margin-top: 2em;">- <tr class="active">- <th><a href="{{ exercise.get_absolute_url }}">{{ exercise }}</a></th>- </tr>- {% for log in logs %}- <tr>- <td>- {{log.reps}}- {% if not log.repetition_unit.is_repetition %}- {% translate log.repetition_unit.name %}- {% endif %}- ×- {{log.weight}} {% translate log.weight_unit.name %}+ {% for exercise, logs in value.logs.items %}+ <table class="table table-hover table-bordered" style="margin-top: 2em;">+ <tr class="active">+ <th><a href="{{ exercise.get_absolute_url }}">{{ exercise }}</a></th>+ </tr>+ {% for log in logs %}+ <tr>+ <td>+ {{ log.reps }}+ {% if not log.repetition_unit.is_repetition %}+ {% translate log.repetition_unit.name %}+ {% endif %}+ ×+ {{ log.weight }} {% translate log.weight_unit.name %}- {% if is_owner %}- <span class="dropdown">+ {% if is_owner %}+ <span class="dropdown"><div class="float-right">- <button type="button" class="btn btn-link dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-link dropdown-toggle btn-sm" data-bs-toggle="dropdown"></button><div class="dropdown-menu"><a href="{% url 'manager:log:edit' log.pk %}" class="wger-modal-dialog dropdown-item">@@ -71,17 +72,17 @@</div></div></span>- {% endif %}- </td>- </tr>- {% endfor %}- </table>+ {% endif %}+ </td>+ </tr>+ {% endfor %}+ </table>+ {% endfor %}{% endfor %}- {% endfor %}-{% else %}- {% translate "Nothing found" %}-{% endif %}+ {% else %}+ {% translate "Nothing found" %}+ {% endif %}{% endblock %}diff --git a/wger/manager/templates/calendar/month.html b/wger/manager/templates/calendar/month.htmlindex 21dc231ca..50c63154c 100644--- a/wger/manager/templates/calendar/month.html+++ b/wger/manager/templates/calendar/month.html@@ -78,7 +78,7 @@ $(document).ready(function() {{% if is_owner %}<div class="dropdown float-right">- <button type="button" class="btn btn-link dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-link dropdown-toggle btn-sm" data-bs-toggle="dropdown"></button><div class="dropdown-menu dropdown-menu-right" role="menu"><a href="{% url 'manager:log:edit' log.pk %}" class="wger-modal-dialog dropdown-item">@@ -113,7 +113,7 @@ $(document).ready(function() {<div class="modal-content"><div class="modal-header"><h4 class="modal-title">{% translate 'Add log to day' %}</h4>- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <button type="button" class="close" data-bs-dismiss="modal" aria-hidden="true">×</button></div><div class="modal-body">{% if current_workout %}@@ -135,7 +135,7 @@ day in your current workout:{% endblocktranslate %} <strong>{{current_workout}}<{% endif %}</div><div class="modal-footer">- <button type="button" class="btn btn-light" data-dismiss="modal">{% translate "Close" %}</button>+ <button type="button" class="btn btn-light" data-bs-dismiss="modal">{% translate "Close" %}</button></div></div></div>@@ -164,7 +164,7 @@ you can click on them to see the details.{% endblocktranslate %}</p><div class="panel panel-default"><div class="panel-heading" role="tab" id="heading{{ year.grouper }}"><h4 class="panel-title">- <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse{{ year.grouper }}" aria-expanded="true" aria-controls="collapse{{ year.grouper }}">+ <a role="button" data-bs-toggle="collapse" data-parent="#accordion" href="#collapse{{ year.grouper }}" aria-expanded="true" aria-controls="collapse{{ year.grouper }}">{{ year.grouper }}</a></h4>@@ -184,7 +184,7 @@ you can click on them to see the details.{% endblocktranslate %}</p>{% block options %}{% if is_owner %}- <a href="#" id="calendar-day-select-link" data-toggle="modal" data-target="#ecalendar-day-select-popup" class="btn btn-success btn-sm">+ <a href="#" id="calendar-day-select-link" data-bs-toggle="modal" data-bs-target="#ecalendar-day-select-popup" class="btn btn-success btn-sm">{% translate "Add new log" %}</a>{% endif %}diff --git a/wger/manager/templates/calendar/partial_overview_table.html b/wger/manager/templates/calendar/partial_overview_table.htmlindex 4de9c0c86..f821848ef 100644--- a/wger/manager/templates/calendar/partial_overview_table.html+++ b/wger/manager/templates/calendar/partial_overview_table.html@@ -8,7 +8,7 @@{% if value.session %}<div class="btn-group"><div class="btn-group" role="group">- <button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ <button type="button" class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{% translate "Workout session" %}<span class="caret"></span></button>diff --git a/wger/manager/templates/schedule/view.html b/wger/manager/templates/schedule/view.htmlindex b79c6b027..ba1fd838f 100644--- a/wger/manager/templates/schedule/view.html+++ b/wger/manager/templates/schedule/view.html@@ -6,114 +6,113 @@{# Opengraph #}{# #}{% block opengraph %}-{{ block.super }}-<meta property="og:title" content="{% translate 'Schedule' %}">-<meta property="og:description" content="{{ schedule }} / {{owner_user.username}}">+ {{ block.super }}+ <meta property="og:title" content="{% translate 'Schedule' %}">+ <meta property="og:description" content="{{ schedule }} / {{ owner_user.username }}">{% endblock %}-{% block title %}{{schedule.name}}{% endblock %}+{% block title %}{{ schedule.name }}{% endblock %}{% block header %}-<script type="text/javascript">- function init_sortable()- {- $("#schedule-table").find("tbody").off();- var elements = document.getElementsByTagName('tbody');- $.each(elements, function(index, element) {- Sortable.create(element, {- handle: '.dragndrop-handle',- animation: 150,- onUpdate: function (event) {- var schedule_id = $(event.target).parents('table').data('schedule');- $.each(($(event.from).children('tr')), function(index, tr_element) {- var tr_element = $(tr_element);- console.log(tr_element.data('id'));+ <script type="text/javascript">+ function init_sortable() {+ $("#schedule-table").find("tbody").off();+ var elements = document.getElementsByTagName('tbody');+ $.each(elements, function (index, element) {+ Sortable.create(element, {+ handle: '.dragndrop-handle',+ animation: 150,+ onUpdate: function (event) {+ var schedule_id = $(event.target).parents('table').data('schedule');+ $.each(($(event.from).children('tr')), function (index, tr_element) {+ var tr_element = $(tr_element);+ console.log(tr_element.data('id'));- // The last table element has no ID attribute (has only the- // 'add exercise' link- if( tr_element.data('id') ) {- var step_pk = tr_element.data('id');- $.ajax({- url: '/api/v2/schedulestep/' + step_pk + '/',- type: 'PATCH',- data: {'order': index + 1}- }).done(function (data) {- // console.log(data);- });- }- });+ // The last table element has no ID attribute (has only the+ // 'add exercise' link+ if (tr_element.data('id')) {+ var step_pk = tr_element.data('id');+ $.ajax({+ url: '/api/v2/schedulestep/' + step_pk + '/',+ type: 'PATCH',+ data: {'order': index + 1}+ }).done(function (data) {+ // console.log(data);+ });+ }+ });- // TODO: again, why do we need to do this twice. Otherwise, sometimes- // it doesn't get current data- var current_url = $("#current-url").data('currentUrl');- $.get(current_url);- $.get(current_url, function(data) {- $('#schedule-table').html($(data).find('#schedule-table').html());- init_sortable();- wgerFormModalDialog();- });- }- });- })- }+ // TODO: again, why do we need to do this twice. Otherwise, sometimes+ // it doesn't get current data+ var current_url = $("#current-url").data('currentUrl');+ $.get(current_url);+ $.get(current_url, function (data) {+ $('#schedule-table').html($(data).find('#schedule-table').html());+ init_sortable();+ wgerFormModalDialog();+ });+ }+ });+ })+ }- $(function() {- init_sortable();- });-</script>+ $(function () {+ init_sortable();+ });+ </script>{% endblock %}{% block content %}-<table class="table">- <tr>- <th style="width: 30%;">{% translate "Start date" %}</th>- <td>{{schedule.start_date}}</td>- </tr>- <tr>- <th>{% translate "Schedule active" %}</th>- <td>- {% if schedule.is_active %}- <span class="{% fa_class 'check' %}"></span>- {% else %}- <span class="{% fa_class 'times' %}"></span>- {% endif %}- </td>- </tr>- <tr>- <th>{% translate "Is a loop" %}</th>- <td>- {% if schedule.is_loop %}- <span class="{% fa_class 'check' %}"></span>- <small>{% translate "This schedule is a loop and will go through the workouts above till you deactivate it" %}</small>- {% else %}- <span class="{% fa_class 'times' %}"></span>- {% endif %}- </td>- </tr>-</table>---<div id="schedule-table-container">- <table id="schedule-table" class="table" data-schedule="{{schedule.id}}">- <thead>+ <table class="table"><tr>- <th>{% translate "Nr." %}</th>- {% if is_owner %}- <th>{% translate "Actions" %}</th>- {% endif %}- <th>{% translate "Workout" %}</th>- <th>{% translate "Weeks" %}</th>+ <th style="width: 30%;">{% translate "Start date" %}</th>+ <td>{{ schedule.start_date }}</td>+ </tr>+ <tr>+ <th>{% translate "Schedule active" %}</th>+ <td>+ {% if schedule.is_active %}+ <span class="{% fa_class 'check' %}"></span>+ {% else %}+ <span class="{% fa_class 'times' %}"></span>+ {% endif %}+ </td></tr>- </thead>- <tbody>- {% for step in schedule.schedulestep_set.select_related %}- <tr data-id="{{step.id}}">+ <tr>+ <th>{% translate "Is a loop" %}</th><td>- {{ forloop.counter }}+ {% if schedule.is_loop %}+ <span class="{% fa_class 'check' %}"></span>+ <small>{% translate "This schedule is a loop and will go through the workouts above till you deactivate it" %}</small>+ {% else %}+ <span class="{% fa_class 'times' %}"></span>+ {% endif %}</td>- {% if is_owner %}- <td style="min-width: 6em;">+ </tr>+ </table>+++ <div id="schedule-table-container">+ <table id="schedule-table" class="table" data-schedule="{{ schedule.id }}">+ <thead>+ <tr>+ <th>{% translate "Nr." %}</th>+ {% if is_owner %}+ <th>{% translate "Actions" %}</th>+ {% endif %}+ <th>{% translate "Workout" %}</th>+ <th>{% translate "Weeks" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for step in schedule.schedulestep_set.select_related %}+ <tr data-id="{{ step.id }}">+ <td>+ {{ forloop.counter }}+ </td>+ {% if is_owner %}+ <td style="min-width: 6em;"><span class="editoptions"><span title="{% translate 'Move me' %}" class="dragndrop-handle {% fa_class 'bars' %}"></span>@@ -126,148 +125,152 @@class="wger-modal-dialog"><span class="{% fa_class 'trash' %}"></span></a></span>- </td>- {% endif %}- <td>- <a href="{{ step.workout.get_absolute_url }}">{{ step.workout }}</a>- {% if active_workout == step %}- <span class="badge badge-info">{% translate "active" %}</span>- {% endif %}- </td>- <td>- {{ step.duration }}- </td>- </tr>- {% empty %}- {% if is_owner %}- <tr>- <td colspan="4">- <a href="{% url 'manager:step:add' schedule.id %}" class="wger-modal-dialog btn btn-block btn-light">- {% translate "No workouts found." %} {% translate "Add one now." %}- </a>- </td>- </tr>- {% endif %}- {% endfor %}- {% if is_owner %}- <tr>- <td colspan="4">- {% if not schedule.is_active %}- <a href="{% url 'manager:schedule:start' schedule.pk %}" class="btn btn-success btn-sm">- <span class="{% fa_class 'play' %}"></span>- {% translate "Start schedule" %}- </a>+ </td>+ {% endif %}+ <td>+ <a href="{{ step.workout.get_absolute_url }}">{{ step.workout }}</a>+ {% if active_workout == step %}+ <span class="badge badge-info">{% translate "active" %}</span>+ {% endif %}+ </td>+ <td>+ {{ step.duration }}+ </td>+ </tr>+ {% empty %}+ {% if is_owner %}+ <tr>+ <td colspan="4">+ <a href="{% url 'manager:step:add' schedule.id %}"+ class="wger-modal-dialog btn btn-block btn-light">+ {% translate "No workouts found." %} {% translate "Add one now." %}+ </a>+ </td>+ </tr>{% endif %}+ {% endfor %}+ {% if is_owner %}+ <tr>+ <td colspan="4">+ {% if not schedule.is_active %}+ <a href="{% url 'manager:schedule:start' schedule.pk %}" class="btn btn-success btn-sm">+ <span class="{% fa_class 'play' %}"></span>+ {% translate "Start schedule" %}+ </a>+ {% endif %}- <a href="{% url 'manager:step:add' schedule.id %}" class="wger-modal-dialog btn btn-light btn-sm">- <span class="{% fa_class 'plus' %}"></span>- {% translate "Add workout" %}- </a>- </td>- <td colspan="2">- </td>- </tr>- {% endif %}- </tbody>- </table>-</div>+ <a href="{% url 'manager:step:add' schedule.id %}"+ class="wger-modal-dialog btn btn-light btn-sm">+ <span class="{% fa_class 'plus' %}"></span>+ {% translate "Add workout" %}+ </a>+ </td>+ <td colspan="2">+ </td>+ </tr>+ {% endif %}+ </tbody>+ </table>+ </div>-{% for step in schedule.schedulestep_set.select_related %}-{% with step_dates=step.get_dates %}-<div class="row">- <div class="col-md-3">- <div class="card">- <div class="card-body">- <h4 class="card-title">- {% blocktranslate count weeks=step.duration %}{{ weeks }} Week- {% plural %}{{ weeks }} Weeks- {% endblocktranslate %}- </h4>+ {% for step in schedule.schedulestep_set.select_related %}+ {% with step_dates=step.get_dates %}+ <div class="row">+ <div class="col-md-3">+ <div class="card">+ <div class="card-body">+ <h4 class="card-title">+ {% blocktranslate count weeks=step.duration %}{{ weeks }} Week+ {% plural %}{{ weeks }} Weeks+ {% endblocktranslate %}+ </h4>- <span class="card-text">+ <span class="card-text">{% if active_workout == step %}<span class="badge badge-pill badge-primary">{% translate "active" %}</span><br>- {% endif %}- <span>{{step_dates.0}} <br> {{step_dates.1}}</span>+ {% endif %}+ <span>{{ step_dates.0 }} <br> {{ step_dates.1 }}</span></span>+ </div>+ <div class="card-footer">+ <a href="{{ step.workout.get_absolute_url }}"+ class="btn btn-light btn-block btn-sm"+ style="white-space: normal;">+ <span class="glyphicon glyphicon-chevron-right float-right"></span>+ {{ step.workout }}+ </a>+ </div>+ </div>+ </div>+ <div class="col-md-9">+ {% for day in step.workout.canonical_representation.day_list %}+ <div id="div-day-{{ day.obj.id }}">+ {% render_day day.obj False %}+ </div>+ {% endfor %}+ </div></div>- <div class="card-footer">- <a href="{{ step.workout.get_absolute_url }}"- class="btn btn-light btn-block btn-sm"- style="white-space: normal;">- <span class="glyphicon glyphicon-chevron-right float-right"></span>- {{ step.workout }}- </a>- </div>- </div>- </div>- <div class="col-md-9">- {% for day in step.workout.canonical_representation.day_list %}- <div id="div-day-{{ day.obj.id }}">- {% render_day day.obj False %}- </div>- {% endfor %}- </div>-</div>-{% endwith %}-{% endfor %}+ {% endwith %}+ {% endfor %}{% endblock %}{% block sidebar %}-{% if is_owner %}-<h4>{% translate "Adding workouts" %}</h4>+ {% if is_owner %}+ <h4>{% translate "Adding workouts" %}</h4>-<p>{% blocktranslate %}Add as many workouts to the schedule as you want. You can-edit the order by dragging and dropping them. It's also possible to add one workout more-than once.{% endblocktranslate %}</p>-{% endif %}+ <p>{% blocktranslate %}Add as many workouts to the schedule as you want. You can+ edit the order by dragging and dropping them. It's also possible to add one workout more+ than once.{% endblocktranslate %}</p>+ {% endif %}-<div class="modal fade" id="export-ical-popup">- <div class="modal-dialog">- <div class="modal-content">- <div class="modal-header">- <h4 class="modal-title">{% translate "Export calendar file" %}</h4>- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>- </div>- <div class="modal-body">- <p>{% translate "Export this schedule as a calendar file." %}</p>- <p>{% blocktranslate %}You can then import the file it into your calendar-application for example google calendar, outlook or iCal. This will create-an appointment for each training day with the appropriate exercises.{% endblocktranslate %}</p>- <p>- <a href="{% url 'manager:schedule:ical' schedule.id uid token %}" class="btn btn-block btn-light">- {% translate "Export calendar file" %}- </a>- </p>- </div>- <div class="modal-footer">- <button type="button" class="btn btn-light" data-dismiss="modal">{% translate "Close" %}</button>+ <div class="modal fade" id="export-ical-popup">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <h4 class="modal-title">{% translate "Export calendar file" %}</h4>+ <button type="button" class="close" data-bs-dismiss="modal" aria-hidden="true">×</button>+ </div>+ <div class="modal-body">+ <p>{% translate "Export this schedule as a calendar file." %}</p>+ <p>{% blocktranslate %}You can then import the file it into your calendar+ application for example google calendar, outlook or iCal. This will create+ an appointment for each training day with the appropriate exercises.{% endblocktranslate %}</p>+ <p>+ <a href="{% url 'manager:schedule:ical' schedule.id uid token %}"+ class="btn btn-block btn-light">+ {% translate "Export calendar file" %}+ </a>+ </p>+ </div>+ <div class="modal-footer">+ <button type="button" class="btn btn-light" data-bs-dismiss="modal">{% translate "Close" %}</button>+ </div></div></div></div>-</div>-<div class="modal fade" id="download-pdf-popup">- <div class="modal-dialog">- <div class="modal-content">- <div class="modal-header">- <h4 class="modal-title">{% translate "Download as PDF" %}</h4>- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>- </div>- <div class="modal-body">- <form class="wger-form">- {% crispy download_form %}- <div id="pdf-download-info" data-schedule-id="{{ schedule.id }}" data-uid="{{ uid }}" data-token="{{ token }}"></div>- </form>- </div>- <div class="modal-footer">- <button type="button" class="btn btn-light" data-dismiss="modal">{% translate "Close" %}</button>+ <div class="modal fade" id="download-pdf-popup">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <h4 class="modal-title">{% translate "Download as PDF" %}</h4>+ <button type="button" class="close" data-bs-dismiss="modal" aria-hidden="true">×</button>+ </div>+ <div class="modal-body">+ <form class="wger-form">+ {% crispy download_form %}+ <div id="pdf-download-info" data-schedule-id="{{ schedule.id }}" data-uid="{{ uid }}"+ data-token="{{ token }}"></div>+ </form>+ </div>+ <div class="modal-footer">+ <button type="button" class="btn btn-light" data-bs-dismiss="modal">{% translate "Close" %}</button>+ </div></div></div></div>-</div>{% endblock %}{# #}@@ -276,16 +279,17 @@ an appointment for each training day with the appropriate exercises.{% endblockt{% block options %}<div class="btn-group"><div class="btn-group">- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown"+ aria-haspopup="true" aria-expanded="false"><span class="{% fa_class 'cog' %}"></span>{% translate "Options" %}</button><div class="dropdown-menu">- <a href="#" data-toggle="modal" data-target="#export-ical-popup" class="dropdown-item">+ <a href="#" data-bs-toggle="modal" data-bs-target="#export-ical-popup" class="dropdown-item"><span class="{% fa_class 'calendar' %}"></span>{% translate "Export calendar file" %}</a>- <a data-toggle="modal" data-target="#download-pdf-popup" class="dropdown-item">+ <a data-bs-toggle="modal" data-bs-target="#download-pdf-popup" class="dropdown-item"><span class="{% fa_class 'download' %}"></span>{% translate "Download as PDF" %}</a>diff --git a/wger/manager/templates/workout/view.html b/wger/manager/templates/workout/view.htmlindex 28550837c..61183c9d0 100644--- a/wger/manager/templates/workout/view.html+++ b/wger/manager/templates/workout/view.html@@ -9,7 +9,7 @@{% block opengraph %}{{ block.super }}<meta property="og:title" content="{% translate 'Workout' %}">- <meta property="og:description" content="{{ workout }} / {{owner_user.username}}">+ <meta property="og:description" content="{{ workout }} / {{ owner_user.username }}">{% endblock %}@@ -23,26 +23,26 @@{# Header #}{# #}{% block header %}-<script>-function wgerCustomModalInit() {- // Set up the edit set functions on modal dialogs- wgerInitEditSet();-}--$(document).ready(function () {- var $exercisecomments = $(".exercise-comments");- // Allow the sets to be sortable- wgerSetupSortable();-- // Show/Hide the comments to the exercises- {% if user.userprofile.show_comments %}- $exercisecomments.show();- {% else %}- $exercisecomments.hide();- {% endif %}- wgerToggleComments();-});-</script>+ <script>+ function wgerCustomModalInit() {+ // Set up the edit set functions on modal dialogs+ wgerInitEditSet();+ }++ $(document).ready(function () {+ var $exercisecomments = $(".exercise-comments");+ // Allow the sets to be sortable+ wgerSetupSortable();++ // Show/Hide the comments to the exercises+ {% if user.userprofile.show_comments %}+ $exercisecomments.show();+ {% else %}+ $exercisecomments.hide();+ {% endif %}+ wgerToggleComments();+ });+ </script>{% endblock %}@@ -52,31 +52,32 @@ $(document).ready(function () {{% block content %}-{% if workout.name %}- <h4>{{workout.name }}</h4>-{% endif %}+ {% if workout.name %}+ <h4>{{ workout.name }}</h4>+ {% endif %}-{% if workout.description %}- <p>{{ workout.description }}</p>-{% endif %}+ {% if workout.description %}+ <p>{{ workout.description }}</p>+ {% endif %}-{% for day in workout.day_set.all %}- <div id="div-day-{{ day.id }}">- {% render_day day is_owner %}- </div>-{% endfor %}+ {% for day in workout.day_set.all %}+ <div id="div-day-{{ day.id }}">+ {% render_day day is_owner %}+ </div>+ {% endfor %}-{% if is_owner %}-<p>- <a href="{% url 'manager:day:add' workout.id %}" class="wger-modal-dialog btn btn-link btn-block">{% translate "Add training day" %}</a>+ {% if is_owner %}+ <p>+ <a href="{% url 'manager:day:add' workout.id %}"+ class="wger-modal-dialog btn btn-link btn-block">{% translate "Add training day" %}</a>- <!--+ <!--|<a id="exercise-comments-toggle" href="{% url 'core:user:preferences' %}">{% translate "Show/Hide exercise comments" %}</a>-->-</p>-{% endif %}+ </p>+ {% endif %}{% endblock %}@@ -85,111 +86,115 @@ $(document).ready(function () {{# Side bar #}{# #}{% block sidebar %}-<h4>{% translate "Steps" %}</h4>+ <h4>{% translate "Steps" %}</h4>-<ol>- <li>{% translate "Add training days" %}</li>- <li>{% translate "Add workout sets to days" %}</li>- <li>{% translate "Set the repetitions for each set" %}</li>-</ol>+ <ol>+ <li>{% translate "Add training days" %}</li>+ <li>{% translate "Add workout sets to days" %}</li>+ <li>{% translate "Set the repetitions for each set" %}</li>+ </ol>-<h4>{% translate "Muscles trained" %}</h4>+ <h4>{% translate "Muscles trained" %}</h4>-<p>- {% translate "Images show combined muscles as trained by the exercises on the workout." %}-</p>+ <p>+ {% translate "Images show combined muscles as trained by the exercises on the workout." %}+ </p>-<div class="row">- <div class="col-6">- {% render_muscles workout.canonical_representation.muscles.front workout.canonical_representation.muscles.front_secondary %}- </div>- <div class="col-6">- {% render_muscles workout.canonical_representation.muscles.back workout.canonical_representation.muscles.back_secondary %}+ <div class="row">+ <div class="col-6">+ {% render_muscles workout.canonical_representation.muscles.front workout.canonical_representation.muscles.front_secondary %}+ </div>+ <div class="col-6">+ {% render_muscles workout.canonical_representation.muscles.back workout.canonical_representation.muscles.back_secondary %}+ </div></div>-</div>-<div class="modal fade" id="export-ical-popup">- <div class="modal-dialog">- <div class="modal-content">- <div class="modal-header">- <h4 class="modal-title">{% translate "Export calendar file" %}</h4>- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>- </div>- <div class="modal-body">- <p>{% translate "Export this workout as a calendar file." %}</p>- <p>{% blocktranslate %}You can then import the file it into your calendar-application for example google calendar, outlook or iCal. This will create-an appointment for each training day with the appropriate exercises.{% endblocktranslate %}</p>- <p>- <a href="{% url 'manager:workout:ical' workout.id uid token %}" class="btn btn-block btn-light">- {% translate "Export calendar file" %}- </a>- </p>- </div>- <div class="modal-footer">- <button type="button" class="btn btn-light" data-dismiss="modal">{% translate "Close" %}</button>+ <div class="modal fade" id="export-ical-popup">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <h4 class="modal-title">{% translate "Export calendar file" %}</h4>+ <button type="button" class="close" data-bs-dismiss="modal" aria-hidden="true">×</button>+ </div>+ <div class="modal-body">+ <p>{% translate "Export this workout as a calendar file." %}</p>+ <p>{% blocktranslate %}You can then import the file it into your calendar+ application for example google calendar, outlook or iCal. This will create+ an appointment for each training day with the appropriate exercises.{% endblocktranslate %}</p>+ <p>+ <a href="{% url 'manager:workout:ical' workout.id uid token %}" class="btn btn-block btn-light">+ {% translate "Export calendar file" %}+ </a>+ </p>+ </div>+ <div class="modal-footer">+ <button type="button" class="btn btn-light" data-bs-dismiss="modal">{% translate "Close" %}</button>+ </div></div></div></div>-</div>--<div class="modal fade" id="download-pdf-popup">- <div class="modal-dialog">- <div class="modal-content">- <div class="modal-header">- <h4 class="modal-title">{% translate "Download as PDF" %}</h4>- <button type="button" class="close float-right" data-dismiss="modal" aria-hidden="true">×</button>- </div>- <div class="modal-body">- <form class="wger-form">- <div id="pdf-download-info" data-workout-id="{{ workout.id }}" data-uid="{{ uid }}" data-token="{{ token }}"></div>- <div class="form-group form-check-inline">- <input type="radio" name="pdf_type" class="form-check-input" id="id_type_log" value="log" checked>- <label class="form-check-label" for="id_type_log">- {% translate "Log" %}- </label>- </div>- <div class="form-group form-check-inline">- <input type="radio" name="pdf_type" id="id_type_table" class="form-check-input" value="table">- <label class="form-check-label" for="id_type_table">- {% translate "Table" %}- </label>- </div>- <div class="form-group form-check">- <input type="checkbox" class="form-check-input" name="images" id="id_images" checked>- <label for="id_images" class="form-check-label">- {% translate "with images" %}- </label>- </div>- <div class="form-group form-check">- <input type="checkbox" class="form-check-input" name="comments" id="id_comments" checked>- <label for="id_comments" class="form-check-label">- {% translate "with comments" %}- </label>- </div>- </form>-- <p>- <a href="" class="btn btn-block btn-light" id="download-pdf-button">- {% translate "Download" %}- </a>- </p>- </div>- <div class="modal-footer">- <button type="button" class="btn btn-light" data-dismiss="modal">{% translate "Close" %}</button>++ <div class="modal fade" id="download-pdf-popup">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <h4 class="modal-title">{% translate "Download as PDF" %}</h4>+ <button type="button" class="close float-right" data-bs-dismiss="modal" aria-hidden="true">×+ </button>+ </div>+ <div class="modal-body">+ <form class="wger-form">+ <div id="pdf-download-info" data-workout-id="{{ workout.id }}" data-uid="{{ uid }}"+ data-token="{{ token }}"></div>+ <div class="form-group form-check-inline">+ <input type="radio" name="pdf_type" class="form-check-input" id="id_type_log" value="log"+ checked>+ <label class="form-check-label" for="id_type_log">+ {% translate "Log" %}+ </label>+ </div>+ <div class="form-group form-check-inline">+ <input type="radio" name="pdf_type" id="id_type_table" class="form-check-input"+ value="table">+ <label class="form-check-label" for="id_type_table">+ {% translate "Table" %}+ </label>+ </div>+ <div class="form-group form-check">+ <input type="checkbox" class="form-check-input" name="images" id="id_images" checked>+ <label for="id_images" class="form-check-label">+ {% translate "with images" %}+ </label>+ </div>+ <div class="form-group form-check">+ <input type="checkbox" class="form-check-input" name="comments" id="id_comments" checked>+ <label for="id_comments" class="form-check-label">+ {% translate "with comments" %}+ </label>+ </div>+ </form>++ <p>+ <a href="" class="btn btn-block btn-light" id="download-pdf-button">+ {% translate "Download" %}+ </a>+ </p>+ </div>+ <div class="modal-footer">+ <button type="button" class="btn btn-light" data-bs-dismiss="modal">{% translate "Close" %}</button>+ </div></div></div></div>-</div>-{% if workout.canonical_representation.day_list %}-<h4>{% translate "Logs" %}</h4>-<p>- <a href="{% url 'manager:log:log' workout.id %}">{% translate 'View logs' %}</a>-</p>-{% endif %}+ {% if workout.canonical_representation.day_list %}+ <h4>{% translate "Logs" %}</h4>+ <p>+ <a href="{% url 'manager:log:log' workout.id %}">{% translate 'View logs' %}</a>+ </p>+ {% endif %}{% endblock %}@@ -199,39 +204,40 @@ an appointment for each training day with the appropriate exercises.{% endblockt{# Options #}{# #}{% block options %}-<div class="btn-group" role="group" ><div class="btn-group" role="group">- <button id="btnGroupWorkout" type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">- <span class="{% fa_class 'cog' %}"></span>- {% translate "Options" %}- </button>- <div class="dropdown-menu" aria-labelledby="btnGroupWorkout">- {% if is_owner %}- <a href="{% url 'manager:workout:edit' workout.id %}" class="dropdown-item wger-modal-dialog">- <span class="{% fa_class 'edit' %}"></span>- {% translate "Edit workout" %}+ <div class="btn-group" role="group">+ <button id="btnGroupWorkout" type="button" class="btn btn-primary btn-sm dropdown-toggle"+ data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ <span class="{% fa_class 'cog' %}"></span>+ {% translate "Options" %}+ </button>+ <div class="dropdown-menu" aria-labelledby="btnGroupWorkout">+ {% if is_owner %}+ <a href="{% url 'manager:workout:edit' workout.id %}" class="dropdown-item wger-modal-dialog">+ <span class="{% fa_class 'edit' %}"></span>+ {% translate "Edit workout" %}+ </a>+ {% endif %}+ <a class="dropdown-item" data-bs-toggle="modal" data-bs-target="#download-pdf-popup">+ <span class="{% fa_class 'download' %}"></span>+ {% translate "Download as PDF" %}</a>- {% endif %}- <a class="dropdown-item" data-toggle="modal" data-target="#download-pdf-popup">- <span class="{% fa_class 'download' %}"></span>- {% translate "Download as PDF" %}- </a>- <a class="dropdown-item" data-toggle="modal" data-target="#export-ical-popup">- <span class="{% fa_class 'calendar' %}"></span>- {% translate "Export calendar file" %}- </a>- <a href="{% url 'manager:workout:make-template' workout.id %}" class="dropdown-item wger-modal-dialog">- <span class="{% fa_class 'clone' %}"></span>- {% translate "Mark as template" %}- </a>- {% if is_owner %}- <div class="dropdown-divider"></div>- <a href="{% url 'manager:workout:delete' workout.id %}" class="dropdown-item wger-modal-dialog">- <span class="{% fa_class 'trash' %}"></span>- {% translate "Delete" %}+ <a class="dropdown-item" data-bs-toggle="modal" data-bs-target="#export-ical-popup">+ <span class="{% fa_class 'calendar' %}"></span>+ {% translate "Export calendar file" %}</a>- {% endif %}+ <a href="{% url 'manager:workout:make-template' workout.id %}" class="dropdown-item wger-modal-dialog">+ <span class="{% fa_class 'clone' %}"></span>+ {% translate "Mark as template" %}+ </a>+ {% if is_owner %}+ <div class="dropdown-divider"></div>+ <a href="{% url 'manager:workout:delete' workout.id %}" class="dropdown-item wger-modal-dialog">+ <span class="{% fa_class 'trash' %}"></span>+ {% translate "Delete" %}+ </a>+ {% endif %}+ </div></div></div>-</div>{% endblock %}diff --git a/wger/nutrition/templates/ingredient/view.html b/wger/nutrition/templates/ingredient/view.htmlindex 2964a6737..31908ae19 100644--- a/wger/nutrition/templates/ingredient/view.html+++ b/wger/nutrition/templates/ingredient/view.html@@ -191,7 +191,7 @@ the search.{% endblocktranslate %}<td>{{unit.amount}} {{unit.unit.name}} = {{unit.gram}}g<div class="dropdown float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown"><span class="{% fa_class 'cog' %}"></span></button><div class="dropdown-menu dropdown-menu-right" role="menu">@@ -221,7 +221,7 @@ the search.{% endblocktranslate %}{% if perms.nutrition.delete_ingredient %}<div class="btn-group"><div class="btn-group">- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="{% fa_class 'cog' %}"></span>{% translate "Options" %}</button>diff --git a/wger/nutrition/templates/log/detail.html b/wger/nutrition/templates/log/detail.htmlindex bd7795892..dc9b7788b 100644--- a/wger/nutrition/templates/log/detail.html+++ b/wger/nutrition/templates/log/detail.html@@ -189,7 +189,7 @@{% if is_owner %}<td><div class="dropdown">- <button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown">+ <button type="button" class="btn btn-default dropdown-toggle btn-xs" data-bs-toggle="dropdown"></button><ul class="dropdown-menu dropdown-menu-right" role="menu"><li>diff --git a/wger/nutrition/templates/plan/view.html b/wger/nutrition/templates/plan/view.htmlindex b6a0b3e87..ef4a2c76a 100644--- a/wger/nutrition/templates/plan/view.html+++ b/wger/nutrition/templates/plan/view.html@@ -71,7 +71,7 @@<div class="dropdown float-right"><button type="button"class="btn btn-link btn-block dropdown-toggle btn-xs"- data-toggle="dropdown"></button>+ data-bs-toggle="dropdown"></button><div class="dropdown-menu dropdown-menu-right" role="menu"><a href="{% url 'nutrition:log:log_meal' meal.id %}"class="dropdown-item">@@ -97,10 +97,10 @@</div></div>{% endif %}-+<h4>{% if meal.name %}{{ meal.name }}{% endif %}</h4><h5>{% if meal.time %}{{ meal.time|time:"H:i" }}{% endif %}</h5>-+</td></tr><tr>@@ -118,7 +118,7 @@<div class="dropdown float-right"><button type="button"class="btn btn-link dropdown-toggle btn-xs"- data-toggle="dropdown"></button>+ data-bs-toggle="dropdown"></button><div class="dropdown-menu dropdown-menu-right" role="menu"><a href="{% url 'nutrition:meal_item:edit' item.id %}"class="wger-modal-dialog edit-meal edit-mealitem dropdown-item">@@ -405,7 +405,7 @@{# #}{% block options %}<div class="btn-group">- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown"+ <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown"aria-haspopup="true" aria-expanded="false"><span class="{% fa_class 'cog' %}"></span>{% translate "Options" %}diff --git a/wger/nutrition/templates/units/list.html b/wger/nutrition/templates/units/list.htmlindex 6a384ffb5..98857ecf9 100644--- a/wger/nutrition/templates/units/list.html+++ b/wger/nutrition/templates/units/list.html@@ -7,30 +7,32 @@{% block content %}-<ul class="list-group">- {% for unit in unit_list %}- <li class="list-group-item ">- <div class="btn-group float-right">- <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-toggle="dropdown">- <span class="{% fa_class 'cog' %}"></span>- </button>- <div class="dropdown-menu dropdown-menu-right" role="menu">- <a href="{% url 'nutrition:weight_unit:edit' unit.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>- <div class="dropdown-divider"></div>- <a href="{% url 'nutrition:weight_unit:delete' unit.id %}" class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>- </div>- </div>- {{unit.name}}- </li>- {% empty %}- <li class="list-group-item">- {% translate "Nothing found" %}- </li>- {% endfor %}-</ul>---{% pagination paginator page_obj %}+ <ul class="list-group">+ {% for unit in unit_list %}+ <li class="list-group-item ">+ <div class="btn-group float-right">+ <button type="button" class="btn btn-light dropdown-toggle btn-sm" data-bs-toggle="dropdown">+ <span class="{% fa_class 'cog' %}"></span>+ </button>+ <div class="dropdown-menu dropdown-menu-right" role="menu">+ <a href="{% url 'nutrition:weight_unit:edit' unit.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Edit' %}</a>+ <div class="dropdown-divider"></div>+ <a href="{% url 'nutrition:weight_unit:delete' unit.id %}"+ class="wger-modal-dialog dropdown-item">{% translate 'Delete' %}</a>+ </div>+ </div>+ {{ unit.name }}+ </li>+ {% empty %}+ <li class="list-group-item">+ {% translate "Nothing found" %}+ </li>+ {% endfor %}+ </ul>+++ {% pagination paginator page_obj %}{% endblock %}diff --git a/wger/software/templates/api.html b/wger/software/templates/api.htmlindex 1c7415351..533da730d 100644--- a/wger/software/templates/api.html+++ b/wger/software/templates/api.html@@ -6,22 +6,23 @@{% block title %}REST API{% endblock %}{% block content %}-<p>wger Workout Manager provides a full REST API to all database-objects: <a href="/api/v2/" rel="nofollow">https://wger.de/api/v2/</a></p>+ <p>wger Workout Manager provides a full REST API to all database+ objects: <a href="/api/v2/" rel="nofollow">https://wger.de/api/v2/</a></p>-<h3>Authentication</h3>-<p>Public endpoints, such as the list of exercises or the-ingredients can be accessed without authentication. For <strong>user owned-objects such as workouts, you need to generate an API KEY</strong> and pass-it in the header, see the link on the sidebar for details.</p>+ <h3>Authentication</h3>+ <p>Public endpoints, such as the list of exercises or the+ ingredients can be accessed without authentication. For <strong>user owned+ objects such as workouts, you need to generate an API KEY</strong> and pass+ it in the header, see the link on the sidebar for details.</p>-<h6>JWT Authentication</h6>+ <h6>JWT Authentication</h6>-<p>-You can generate access token via <code>/token/</code> endpoint. Send a username and password, and you will get the-<code>access</code> token which you can use to access the private endpoints.-<pre>+ <p>+ You can generate access token via <code>/token/</code> endpoint. Send a username and password, and you will get+ the+ <code>access</code> token which you can use to access the private endpoints.+ <pre>curl \-X POST \-H "Content-Type: application/json" \@@ -35,11 +36,11 @@ curl \}</pre>-<p>Additionally, you can send an access token to <code>/token/verify/</code> endpoint to verify that token.</p>+ <p>Additionally, you can send an access token to <code>/token/verify/</code> endpoint to verify that token.</p>-<p>When this short-lived access token expires, you can use the longer-lived <code>refresh</code>-token to obtain another access token.-<pre>+ <p>When this short-lived access token expires, you can use the longer-lived <code>refresh</code>+ token to obtain another access token.+ <pre>curl \-X POST \-H "Content-Type: application/json" \@@ -49,104 +50,104 @@ curl \...{"access":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX3BrIjoxLCJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiY29sZF9zdHVmZiI6IuKYgyIsImV4cCI6MTIzNTY3LCJqdGkiOiJjNzE4ZTVkNjgzZWQ0NTQyYTU0NWJkM2VmMGI0ZGQ0ZSJ9.ekxRxgb9OKmHkfy-zs1Ro_xs1eMLXiR17dIDBVxeT-w"}</pre>-</p>-</p>--<p>You should always use HTTPS if possible when communicating with the server.</p>-<p>At the moment it is not possible to register via the API.</p>-<p><strong>Deprecated: </strong>You can also generate a token via the <code>login</code> endpoint. Send a-username and password, and you will get the user's token or a new one will be-generated.</p>---<div class="container">-<div class="row">- <div class="col-6">- <h4>Public endpoints</h4>- <ul>- <li>daysofweek</li>- <li>equipment</li>- <li>exercise</li>- <li>exercisealias</li>- <li>exercisecategory</li>- <li>exercisecomment</li>- <li>exerciseimage</li>- <li>exerciseinfo</li>- <li>ingredient</li>- <li>ingredientinfo</li>- <li>ingredienttoweightunit</li>- <li>language</li>- <li>license</li>- <li>muscle</li>- <li>setting-repetitionunit</li>- <li>setting-weightunit</li>- <li>variation</li>- <li>weightunit</li>- </ul>- </div>- <div class="col-6">- <h4>Private endpoints</h4>- <ul>- <li>day</li>- <li>gallery</li>- <li>meal</li>- <li>mealitem</li>- <li>nutritiondiary</li>- <li>nutritionplan</li>- <li>schedule</li>- <li>schedulestep</li>- <li>set</li>- <li>setting</li>- <li>userprofile</li>- <li>weightentry</li>- <li>workout</li>- <li>workoutlog</li>- </ul>+ </p>+ </p>++ <p>You should always use HTTPS if possible when communicating with the server.</p>+ <p>At the moment it is not possible to register via the API.</p>+ <p><strong>Deprecated: </strong>You can also generate a token via the <code>login</code> endpoint. Send a+ username and password, and you will get the user's token or a new one will be+ generated.</p>+++ <div class="container">+ <div class="row">+ <div class="col-6">+ <h4>Public endpoints</h4>+ <ul>+ <li>daysofweek</li>+ <li>equipment</li>+ <li>exercise</li>+ <li>exercisealias</li>+ <li>exercisecategory</li>+ <li>exercisecomment</li>+ <li>exerciseimage</li>+ <li>exerciseinfo</li>+ <li>ingredient</li>+ <li>ingredientinfo</li>+ <li>ingredienttoweightunit</li>+ <li>language</li>+ <li>license</li>+ <li>muscle</li>+ <li>setting-repetitionunit</li>+ <li>setting-weightunit</li>+ <li>variation</li>+ <li>weightunit</li>+ </ul>+ </div>+ <div class="col-6">+ <h4>Private endpoints</h4>+ <ul>+ <li>day</li>+ <li>gallery</li>+ <li>meal</li>+ <li>mealitem</li>+ <li>nutritiondiary</li>+ <li>nutritionplan</li>+ <li>schedule</li>+ <li>schedulestep</li>+ <li>set</li>+ <li>setting</li>+ <li>userprofile</li>+ <li>weightentry</li>+ <li>workout</li>+ <li>workoutlog</li>+ </ul>+ </div>+ </div></div>-</div>-</div>---<h3>Format negotiation</h3>-<p>- At the moment only JSON and the browsable HTML view are supported, but other- formats such as YAML or XML could be theoretically be added, should the- need arise. Because of this, for the majority of REST clients it will not be- necessary to explicitly set the format, but you have the following options:-</p>-<ul>- <li>Set the <strong>Accept</strong> header:- <ul>- <li><code>application/json</code></li>- <li>- <code>application/json; indent=4</code> - useful for debugging, will- indent the result- </li>- <li>- <code>text/html</code> - browsable HTML view- </li>- </ul>- </li>- <li>- Set the format <strong>directly in the URL</strong>:- <ul>- <li>- <code>/api/v2/<endpoint>.json/</code>- </li>- <li>- <code>/api/v2/<endpoint>/?format=json</code>- </li>- <li>- <code>/api/v2/<endpoint>.api/</code> - browsable HTML view- </li>- </ul>- </li>-</ul>---<h3>Fetching Data</h3>--<pre>+++ <h3>Format negotiation</h3>+ <p>+ At the moment only JSON and the browsable HTML view are supported, but other+ formats such as YAML or XML could be theoretically be added, should the+ need arise. Because of this, for the majority of REST clients it will not be+ necessary to explicitly set the format, but you have the following options:+ </p>+ <ul>+ <li>Set the <strong>Accept</strong> header:+ <ul>+ <li><code>application/json</code></li>+ <li>+ <code>application/json; indent=4</code> - useful for debugging, will+ indent the result+ </li>+ <li>+ <code>text/html</code> - browsable HTML view+ </li>+ </ul>+ </li>+ <li>+ Set the format <strong>directly in the URL</strong>:+ <ul>+ <li>+ <code>/api/v2/<endpoint>.json/</code>+ </li>+ <li>+ <code>/api/v2/<endpoint>/?format=json</code>+ </li>+ <li>+ <code>/api/v2/<endpoint>.api/</code> - browsable HTML view+ </li>+ </ul>+ </li>+ </ul>+++ <h3>Fetching Data</h3>++ <pre># Api-Wide/api/v2/@@ -154,269 +155,269 @@ generated.</p>/api/v2/<endpoint>/<id>/</pre>-<p>- This lists out all the different resources available. If you visit the- link with a browser, you'll get a human-browsable HTML version of the- contents. If you are logged in, you can use the built in form to try- different requests (POST, PATCH, etc.)-</p>--<p>- You can do a <code>OPTIONS /api/v2/<endpoint>/</code> to get more- information on the endpoint such as the accepted formats. It also outputs- a listing with all the resource's fields, their type (date, int, etc.) and- a short description. This is more easier done when using the browseable- version.-</p>----<h3>Miscellaneous operations</h3>-<h4>Ordering</h4>-<p>- Simply use <code>?ordering=<fieldname></code> to order by that field.- You can also specify more than one field name, just give it a list separated- by commas <code>?ordering=<field1>,<field2></code>. To reverse- the order use like in django a <code>-</code> in front of the field.-</p>----<h4>Pagination</h4>-<p>- By default all results are paginated by 20 elements per page. If you want to- change this value, add a <code>?limit=<xxx></code> to your query.- You will find in the answer JSON the <code>next</code> and <code>previous</code>- keywords with links to the next or previous result pages.-</p>----<h4>Filtering resources</h4>-<p>- You can easily filter all resources by specifying the filter queries in the- URL: <code>?<fieldname>=<value></code>, combinations are possible,- the filters will be AND-joined: <code>?<f1>=<v1>&<f2>=<v2></code>.- Please note that for boolean values you must pass 'False' or 'True' other- values, e.g. 1, 0, false, etc. will be ignored. Like with not filtered queries,- your objects will be available under the 'results' key.-</p>-<p>- Note that it is not currently possible to specify more than one value, e.g.- category 1 or 2. The <strong>only</strong> exception to this is the exercises endpoint,- there it is possible to OR different values, e.g. <code>?muscles=2,7</code>- which will search for exercises that train muscle 2 OR 7.-</p>-<p>Some examples:</p>--<ul>- <li>All exercises in German: <code>api/v2/exercise/?language=1</code></li>- <li>'Main' image for all exercises: <code>api/v2/exerciseimage/?is_main=True</code></li>- <li>Exercises that train the biceps with barbells: <code>api/v2/exercise/?muscles=1&equipment=3</code>- </li>-</ul>--<h4>Submitting exercise images</h4>-<p>- If you want to submit exercise pictures, remember that you have to set the- correct header <code>Content-Type: multipart/form-data</code>, otherwise the- file upload won't work.-</p>--<h4>Exercises</h4>-<p>- Also note that, at the moment, to actually retrieve all the details for an exercise- you will need to fire up different queries for the images, comments, etc.-</p>---<h3>Special endpoints</h3>-<p>- The following endpoints provide additional information, comfort functions, etc.:-</p>-<div style="margin-top: 1em;">- <code>api/v2/workout/<id>/canonical_representation/</code>-</div>-<div class="row">- <div class="offset-md-1 col-md-10">- This is a complete representation of a workout, including all objects- like workout days, exercises, etc. This form used by the django application- to render workouts or perform other operations. The data is cached so,- accessing or using is faster than performing many different requests.+ <p>+ This lists out all the different resources available. If you visit the+ link with a browser, you'll get a human-browsable HTML version of the+ contents. If you are logged in, you can use the built in form to try+ different requests (POST, PATCH, etc.)+ </p>++ <p>+ You can do a <code>OPTIONS /api/v2/<endpoint>/</code> to get more+ information on the endpoint such as the accepted formats. It also outputs+ a listing with all the resource's fields, their type (date, int, etc.) and+ a short description. This is more easier done when using the browseable+ version.+ </p>++++ <h3>Miscellaneous operations</h3>+ <h4>Ordering</h4>+ <p>+ Simply use <code>?ordering=<fieldname></code> to order by that field.+ You can also specify more than one field name, just give it a list separated+ by commas <code>?ordering=<field1>,<field2></code>. To reverse+ the order use like in django a <code>-</code> in front of the field.+ </p>++++ <h4>Pagination</h4>+ <p>+ By default all results are paginated by 20 elements per page. If you want to+ change this value, add a <code>?limit=<xxx></code> to your query.+ You will find in the answer JSON the <code>next</code> and <code>previous</code>+ keywords with links to the next or previous result pages.+ </p>++++ <h4>Filtering resources</h4>+ <p>+ You can easily filter all resources by specifying the filter queries in the+ URL: <code>?<fieldname>=<value></code>, combinations are possible,+ the filters will be AND-joined: <code>?<f1>=<v1>&<f2>=<v2></code>.+ Please note that for boolean values you must pass 'False' or 'True' other+ values, e.g. 1, 0, false, etc. will be ignored. Like with not filtered queries,+ your objects will be available under the 'results' key.+ </p>+ <p>+ Note that it is not currently possible to specify more than one value, e.g.+ category 1 or 2. The <strong>only</strong> exception to this is the exercises endpoint,+ there it is possible to OR different values, e.g. <code>?muscles=2,7</code>+ which will search for exercises that train muscle 2 OR 7.+ </p>+ <p>Some examples:</p>++ <ul>+ <li>All exercises in German: <code>api/v2/exercise/?language=1</code></li>+ <li>'Main' image for all exercises: <code>api/v2/exerciseimage/?is_main=True</code></li>+ <li>Exercises that train the biceps with barbells: <code>api/v2/exercise/?muscles=1&equipment=3</code>+ </li>+ </ul>++ <h4>Submitting exercise images</h4>+ <p>+ If you want to submit exercise pictures, remember that you have to set the+ correct header <code>Content-Type: multipart/form-data</code>, otherwise the+ file upload won't work.+ </p>++ <h4>Exercises</h4>+ <p>+ Also note that, at the moment, to actually retrieve all the details for an exercise+ you will need to fire up different queries for the images, comments, etc.+ </p>+++ <h3>Special endpoints</h3>+ <p>+ The following endpoints provide additional information, comfort functions, etc.:+ </p>+ <div style="margin-top: 1em;">+ <code>api/v2/workout/<id>/canonical_representation/</code></div>-</div>---<div style="margin-top: 1em;">- <code>api/v2/exerciseimage/<id>/thumbnails/</code>-</div>-<div class="row">- <div class="offset-md-1 col-md-10">- Returns a list of available thumbnails for this image. The 'settings' key- refers to the settings used by the thumbnailing application to generate- that image. The special key 'original' is simply a downloadable link to- the original image used.+ <div class="row">+ <div class="offset-md-1 col-md-10">+ This is a complete representation of a workout, including all objects+ like workout days, exercises, etc. This form used by the django application+ to render workouts or perform other operations. The data is cached so,+ accessing or using is faster than performing many different requests.+ </div></div>-</div>-<div style="margin-top: 1em;">- <code>api/v2/exerciseiinfo/<id>/</code>-</div>-<div class="row">- <div class="offset-md-1 col-md-10">- A convenience function that returns all the information about an exercise,- including, muscles, equipment, etc. This can be used to avoid having to call- the other endpoints individually.- </div>-</div>--<div style="margin-top: 1em;">- <code>api/v2/nutritionplan/<id>/nutritional_values/</code><br>- <code>api/v2/meal/<id>/nutritional_values/</code><br>- <code>api/v2/mealitem/<id>/nutritional_values/</code>-</div>-<div class="row">- <div class="offset-md-1 col-md-10">- Returns the total nutritional values for a nutritional plan, a meal or- an individual meal item. The nutritional plan lists this under the- 'total' key, the other two return a flat list.-- The nutritional plan also returns under the 'per_kg' key the calculated- values of grams per user body weight (if available) and 'percent' lists- the percent each macronutrient contributes to the total calories.+ <div style="margin-top: 1em;">+ <code>api/v2/exerciseimage/<id>/thumbnails/</code></div>-</div>--<div style="margin-top: 1em;">- <code>api/v2/nutritionplan/<id>/get_log_overview/</code><br>-</div>-<div class="row">- <div class="col-md-offset-1 col-md-10">- Returns a list with the combined nutritional values logged for the given- plan for all available days where a diary entry was logged.+ <div class="row">+ <div class="offset-md-1 col-md-10">+ Returns a list of available thumbnails for this image. The 'settings' key+ refers to the settings used by the thumbnailing application to generate+ that image. The special key 'original' is simply a downloadable link to+ the original image used.+ </div></div>-</div>--<div style="margin-top: 1em;">- <code>api/v2/nutritionplan/<id>/log_summary/?year=<year>&month=<month>&day=<day></code><br>-</div>-<div class="row">- <div class="col-md-offset-1 col-md-10">- Returns the nutritional values logged for the nutrition diary for a- plan for the given date. You can omit the GET parameters, then you- will get the values for today.+++ <div style="margin-top: 1em;">+ <code>api/v2/exerciseiinfo/<id>/</code></div>-</div>---<h3>Data documentation</h3>-<p>The data structures should be pretty forward and easy to understand: a workout-is composed of workout days. Each day has different exercises they in turn have-repetitions, and so on. These diagrams are automatically generated from the-database structure, which is basically exposed through the API 1-to-1. Click on-the images to download a bigger version.</p>---<div class="accordion mb-4" id="api-accordion">- <div class="card">- <div class="card-header">- <h4 class="mb-0">- <button class="btn btn-link btn-block text-left"- type="button"- data-toggle="collapse"- data-target="#api-workout"- aria-expanded="true"- aria-controls="api-workout">- Workouts- </button>- </h4>+ <div class="row">+ <div class="offset-md-1 col-md-10">+ A convenience function that returns all the information about an exercise,+ including, muscles, equipment, etc. This can be used to avoid having to call+ the other endpoints individually.</div>- <div id="api-workout" class="collapse" data-parent="#api-accordion">- <div class="card-body">- <a href="{% static 'images/api/db-manager.svg' %}">- <img src="{% static 'images/api/db-manager.svg' %}" class="img-fluid">- </a>- </div>+ </div>++ <div style="margin-top: 1em;">+ <code>api/v2/nutritionplan/<id>/nutritional_values/</code><br>+ <code>api/v2/meal/<id>/nutritional_values/</code><br>+ <code>api/v2/mealitem/<id>/nutritional_values/</code>+ </div>+ <div class="row">+ <div class="offset-md-1 col-md-10">+ Returns the total nutritional values for a nutritional plan, a meal or+ an individual meal item. The nutritional plan lists this under the+ 'total' key, the other two return a flat list.++ The nutritional plan also returns under the 'per_kg' key the calculated+ values of grams per user body weight (if available) and 'percent' lists+ the percent each macronutrient contributes to the total calories.</div></div>- <div class="card">- <div class="card-header">- <h4 class="mb-0">- <button class="btn btn-link btn-block text-left"- type="button"- data-toggle="collapse"- data-target="#api-nutrition"- aria-expanded="true"- aria-controls="api-nutrition">- Nutrition- </button>- </h4>+ <div style="margin-top: 1em;">+ <code>api/v2/nutritionplan/<id>/get_log_overview/</code><br>+ </div>+ <div class="row">+ <div class="col-md-offset-1 col-md-10">+ Returns a list with the combined nutritional values logged for the given+ plan for all available days where a diary entry was logged.</div>- <div id="api-nutrition" class="collapse" data-parent="#api-accordion">- <div class="card-body">- <a href="{% static 'images/api/db-nutrition.svg' %}">- <img src="{% static 'images/api/db-nutrition.svg' %}" class="img-fluid">- </a>- </div>+ </div>++ <div style="margin-top: 1em;">+ <code>api/v2/nutritionplan/<id>/log_summary/?year=<year>&month=<month>&day=<day></code><br>+ </div>+ <div class="row">+ <div class="col-md-offset-1 col-md-10">+ Returns the nutritional values logged for the nutrition diary for a+ plan for the given date. You can omit the GET parameters, then you+ will get the values for today.</div></div>- <div class="card">- <div class="card-header">- <h4 class="mb-0">- <button class="btn btn-link btn-block text-left"- type="button"- data-toggle="collapse"- data-target="#api-exercises"- aria-expanded="true"- aria-controls="api-exercises">- Exercises- </button>- </h4>++ <h3>Data documentation</h3>+ <p>The data structures should be pretty forward and easy to understand: a workout+ is composed of workout days. Each day has different exercises they in turn have+ repetitions, and so on. These diagrams are automatically generated from the+ database structure, which is basically exposed through the API 1-to-1. Click on+ the images to download a bigger version.</p>+++ <div class="accordion mb-4" id="api-accordion">+ <div class="card">+ <div class="card-header">+ <h4 class="mb-0">+ <button class="btn btn-link btn-block text-left"+ type="button"+ data-bs-toggle="collapse"+ data-bs-target="#api-workout"+ aria-expanded="true"+ aria-controls="api-workout">+ Workouts+ </button>+ </h4>+ </div>+ <div id="api-workout" class="collapse" data-parent="#api-accordion">+ <div class="card-body">+ <a href="{% static 'images/api/db-manager.svg' %}">+ <img src="{% static 'images/api/db-manager.svg' %}" class="img-fluid">+ </a>+ </div>+ </div></div>- <div id="api-exercises" class="collapse" data-parent="#api-accordion">- <div class="card-body">- <a href="{% static 'images/api/db-exercises.svg' %}">- <img src="{% static 'images/api/db-exercises.svg' %}" class="img-fluid">- </a>++ <div class="card">+ <div class="card-header">+ <h4 class="mb-0">+ <button class="btn btn-link btn-block text-left"+ type="button"+ data-bs-toggle="collapse"+ data-bs-target="#api-nutrition"+ aria-expanded="true"+ aria-controls="api-nutrition">+ Nutrition+ </button>+ </h4>+ </div>+ <div id="api-nutrition" class="collapse" data-parent="#api-accordion">+ <div class="card-body">+ <a href="{% static 'images/api/db-nutrition.svg' %}">+ <img src="{% static 'images/api/db-nutrition.svg' %}" class="img-fluid">+ </a>+ </div></div></div>- </div>- <div class="card">- <div class="card-header">- <h4 class="mb-0">- <button class="btn btn-link btn-block text-left"- type="button"- data-toggle="collapse"- data-target="#api-all"- aria-expanded="true"- aria-controls="api-all">- Complete DB- </button>- </h4>+ <div class="card">+ <div class="card-header">+ <h4 class="mb-0">+ <button class="btn btn-link btn-block text-left"+ type="button"+ data-bs-toggle="collapse"+ data-bs-target="#api-exercises"+ aria-expanded="true"+ aria-controls="api-exercises">+ Exercises+ </button>+ </h4>+ </div>+ <div id="api-exercises" class="collapse" data-parent="#api-accordion">+ <div class="card-body">+ <a href="{% static 'images/api/db-exercises.svg' %}">+ <img src="{% static 'images/api/db-exercises.svg' %}" class="img-fluid">+ </a>+ </div>+ </div></div>- <div id="api-all" class="collapse" data-parent="#api-accordion">- <div class="card-body">- <a href="{% static 'images/api/db-all.svg' %}">- <img src="{% static 'images/api/db-all.svg' %}" class="img-fluid">- </a>++ <div class="card">+ <div class="card-header">+ <h4 class="mb-0">+ <button class="btn btn-link btn-block text-left"+ type="button"+ data-bs-toggle="collapse"+ data-bs-target="#api-all"+ aria-expanded="true"+ aria-controls="api-all">+ Complete DB+ </button>+ </h4>+ </div>+ <div id="api-all" class="collapse" data-parent="#api-accordion">+ <div class="card-body">+ <a href="{% static 'images/api/db-all.svg' %}">+ <img src="{% static 'images/api/db-all.svg' %}" class="img-fluid">+ </a>+ </div></div></div></div>-</div>-<h3>Tools</h3>-<p>- You can play and experiment with the API by sending the requests with many- tools, here are two:-</p>+ <h3>Tools</h3>+ <p>+ You can play and experiment with the API by sending the requests with many+ tools, here are two:+ </p>-<pre>+ <pre># In the terminal, e.g. bashcurl -H "Authorization: Token 123456..." \-H "Accept: application/json; indent=4" \@@ -425,7 +426,7 @@ curl -H "Authorization: Token 123456..." \https://wger.de/api/v2/....</pre>-<pre>+ <pre># In the python console>>> import requests>>> import json@@ -446,11 +447,11 @@ curl -H "Authorization: Token 123456..." \{% block sidebar %}-<div class="alert alert-info" style="margin-top:1em;">- This is also new for us, if you plan on using the API,- <a href="https://github.com/wger-project/wger" class="alert-link">we'd love to hear from you</a>.-</div>+ <div class="alert alert-info" style="margin-top:1em;">+ This is also new for us, if you plan on using the API,+ <a href="https://github.com/wger-project/wger" class="alert-link">we'd love to hear from you</a>.+ </div>-<p><a href="/api/v2/" class="btn btn-block btn-light" rel="nofollow">Browse the API</a></p>-<p><a href="{% url 'core:user:api-key' %}" class="btn btn-block btn-light">Generate API KEY</a></p>+ <p><a href="/api/v2/" class="btn btn-block btn-light" rel="nofollow">Browse the API</a></p>+ <p><a href="{% url 'core:user:api-key' %}" class="btn btn-block btn-light">Generate API KEY</a></p>{% endblock %}diff --git a/wger/weight/templates/overview.html b/wger/weight/templates/overview.htmlindex 193a95e3a..d8a81a0a6 100644--- a/wger/weight/templates/overview.html+++ b/wger/weight/templates/overview.html@@ -10,7 +10,7 @@{# Header #}{# #}{% block header %}- {% react_static %}+ {% react_static %}{% endblock %}@@ -37,28 +37,29 @@{# Options #}{# #}{% block options %}-{% if is_owner %}-<div class="btn-group">- <div class="btn-group" role="group">- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">- <span class="{% fa_class 'cog' %}"></span>- {% translate "Options" %}- </button>+ {% if is_owner %}+ <div class="btn-group">+ <div class="btn-group" role="group">+ <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown"+ aria-haspopup="true" aria-expanded="false">+ <span class="{% fa_class 'cog' %}"></span>+ {% translate "Options" %}+ </button>- <div class="dropdown-menu">- <a href="{% url 'weight:export-csv' %}" target="_blank" class="dropdown-item">- <span class="{% fa_class 'download' %}"></span>- {% translate "Export as CSV" %}- </a>- <a href="{% url 'weight:import-csv' %}" class="dropdown-item">- <span class="{% fa_class 'upload' %}"></span>- {% translate "Import from spreadsheet" %}- </a>+ <div class="dropdown-menu">+ <a href="{% url 'weight:export-csv' %}" target="_blank" class="dropdown-item">+ <span class="{% fa_class 'download' %}"></span>+ {% translate "Export as CSV" %}+ </a>+ <a href="{% url 'weight:import-csv' %}" class="dropdown-item">+ <span class="{% fa_class 'upload' %}"></span>+ {% translate "Import from spreadsheet" %}+ </a>+ </div>+ </div></div>- </div>-</div>-<a href="{% url 'weight:add' %}" class="btn btn-success btn-sm wger-modal-dialog">- {% translate "Add" %}-</a>-{% endif %}+ <a href="{% url 'weight:add' %}" class="btn btn-success btn-sm wger-modal-dialog">+ {% translate "Add" %}+ </a>+ {% endif %}{% endblock %}