Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Move the "add" button to options block

Roland Geiderd94af357bf78
diff --git a/wger/config/templates/language/overview.html b/wger/config/templates/language/overview.html
index 9b89808f6..4542238d2 100644
--- a/wger/config/templates/language/overview.html
+++ b/wger/config/templates/language/overview.html
@@ -21,10 +21,11 @@
-{% block sidebar %}
-<p>
+{# #}
+{# Options #}
+{# #}
+{% block options %}
<a href="{% url 'core:language:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
{% trans "Add" %}
</a>
-</p>
{% endblock %}
diff --git a/wger/core/models.py b/wger/core/models.py
index 51a1ffb1e..6b7cc92af 100644
--- a/wger/core/models.py
+++ b/wger/core/models.py
@@ -530,7 +530,10 @@ class License(models.Model):
'''
full_name = models.CharField(max_length=60,
- verbose_name=_('Full name'))
+ verbose_name=_('Full name'),
+ help_text=_('If a license has been localized, e.g. the Creative '
+ 'Commons licenses for the different countries, add '
+ 'them as separate entries here.'))
'''Full name'''
short_name = models.CharField(max_length=15,
diff --git a/wger/core/templates/base_wide.html b/wger/core/templates/base_wide.html
index 7dd84501b..fdd534993 100644
--- a/wger/core/templates/base_wide.html
+++ b/wger/core/templates/base_wide.html
@@ -1,22 +1,52 @@
-{% extends "template.html" %}{% load i18n %}
+{% 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 %}
- <button type="button"
- class="btn btn-default btn-xs pull-right"
- data-toggle="modal"
- data-target="#shariffModal"
- style="margin-top: 0.5em;">
- <span class="glyphicon glyphicon-retweet"></span>
- {% trans "Share" %}
- </button>
+
+{% if trainer_identity %}
+<div class="alert alert-info" style="margin-top: 1em;">
+ {% blocktrans with current_user=user|format_username %}You are
+browsing the site as the user "{{current_user}}", all actions are performed on his data.
+ {% endblocktrans %}
+ <a href="{% url 'core:user:trainer-login' trainer_identity %}" class="alert-link">
+ {% blocktrans with target=user.userprofile.gym.name %}Back to "{{ target }}"{% endblocktrans %}
+ </a>
+</div>
{% endif %}
-<h2 id="page-title" class="page-header">{% block title %}{% endblock %}</h2>
+
+
+
+<div class="row">
+ <div class="col-sm-8">
+ <h2 id="page-title" class="page-header">
+ {% block title %}{% endblock %}
+ </h2>
+ </div>
+ <div class="col-sm-4" style="padding-top: 15px;">
+ <div class="btn-group">
+
+ {% block options %}
+ {% endblock %}
+
+ {% if show_shariff %}
+ <button type="button"
+ class="btn btn-default btn-sm"
+ data-toggle="modal"
+ data-target="#shariffModal">
+ <span class="glyphicon glyphicon-retweet"></span>
+ {% trans "Share" %}
+ </button>
+ {% endif %}
+ </div>
+ </div>
+</div>
+
+
+
<div class="row">
- <div class="col-md-12" id="main-content">
+ <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 %}">
@@ -26,7 +56,11 @@
{% endfor %}
{% endif %}
+ {% render_breadcrumbs "django_bootstrap_breadcrumbs/bootstrap3.html" %}
+
+ <div id="content">
{% block content %}{% endblock %}
+ </div>
</div>
</div>
{% endblock %}
diff --git a/wger/core/templates/license/list.html b/wger/core/templates/license/list.html
index 984bbefd5..17ccbf09f 100644
--- a/wger/core/templates/license/list.html
+++ b/wger/core/templates/license/list.html
@@ -33,16 +33,13 @@
-
-{% block sidebar %}
+{# #}
+{# Options #}
+{# #}
+{% block options %}
{% if perms.core.add_license %}
-<p>
<a href="{% url 'core:license:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
{% trans "Add" %}
</a>
-</p>
-
-<p>{% blocktrans %}If a license has been localized, e.g. the Creative Commons
-licenses for the different countries, add them as separate entries here.{% endblocktrans %}</p>
{% endif %}
{% endblock %}
diff --git a/wger/core/templates/repetition_unit/list.html b/wger/core/templates/repetition_unit/list.html
index 46a56b007..034d39eb1 100644
--- a/wger/core/templates/repetition_unit/list.html
+++ b/wger/core/templates/repetition_unit/list.html
@@ -36,7 +36,10 @@
-{% block sidebar %}
+{# #}
+{# Options #}
+{# #}
+{% block options %}
{% if perms.core.add_license %}
<a href="{% url 'core:repetition-unit:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
{% trans "Add" %}
diff --git a/wger/core/templates/user/overview.html b/wger/core/templates/user/overview.html
index b8cfbf708..62b439fa4 100644
--- a/wger/core/templates/user/overview.html
+++ b/wger/core/templates/user/overview.html
@@ -196,13 +196,6 @@
{% block sidebar %}
-{% if perms.gym.gym_trainer %}
-<a href="{% url 'core:user:trainer-login' current_user.pk %}" class="btn btn-success btn-sm">{% trans "Log in as this user" %}</a>
-<div class="clear-fix" style="margin-bottom: 1em;"></div>
-{% endif %}
-
-
-
{% if perms.gym.manage_gyms or perms.gym.manage_gym %}
<div class="btn-group pull-right">
<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown">
@@ -494,3 +487,13 @@
</tr>
</table>
{% endblock %}
+
+
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+{% if perms.gym.gym_trainer %}
+ <a href="{% url 'core:user:trainer-login' current_user.pk %}" class="btn btn-success btn-sm">{% trans "Log in as this user" %}</a>
+{% endif %}
+{% endblock %}
diff --git a/wger/core/templates/weight_unit/list.html b/wger/core/templates/weight_unit/list.html
index f825a6676..8d78db364 100644
--- a/wger/core/templates/weight_unit/list.html
+++ b/wger/core/templates/weight_unit/list.html
@@ -36,7 +36,10 @@
-{% block sidebar %}
+{# #}
+{# Options #}
+{# #}
+{% block options %}
{% if perms.core.add_license %}
<a href="{% url 'core:weight-unit:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
{% trans "Add" %}
diff --git a/wger/email/templates/email/gym/overview.html b/wger/email/templates/email/gym/overview.html
index ab5252439..9b6523a86 100644
--- a/wger/email/templates/email/gym/overview.html
+++ b/wger/email/templates/email/gym/overview.html
@@ -31,12 +31,15 @@
</li>
{% endfor %}
</ul>
+{% endblock %}
-{% endblock %}
-{% block sidebar %}
- <a href="{% url 'email:email:add-gym' gym.pk %}" class="btn btn-success">
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+ <a href="{% url 'email:email:add-gym' gym.pk %}" class="btn btn-sm btn-success">
{% trans "Add" %}
</a>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/wger/exercises/templates/categories/admin-overview.html b/wger/exercises/templates/categories/admin-overview.html
index b2d2f99a8..debf58f84 100644
--- a/wger/exercises/templates/categories/admin-overview.html
+++ b/wger/exercises/templates/categories/admin-overview.html
@@ -33,8 +33,7 @@
-
-{% block sidebar %}
+{% block options %}
{% if perms.exercises.add_exercisecategory %}
<p>
<a href="{% url 'exercise:category:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
diff --git a/wger/exercises/templates/equipment/overview.html b/wger/exercises/templates/equipment/overview.html
index 2d217f3af..321129aa9 100644
--- a/wger/exercises/templates/equipment/overview.html
+++ b/wger/exercises/templates/equipment/overview.html
@@ -96,23 +96,6 @@ $(function() {
Side bar
-->
{% block sidebar %}
-<p>
- {% if user.is_authenticated and not user.userprofile.is_temporary %}
- <a href="{% url 'exercise:exercise:add' %}" class="btn btn-success btn-sm">
- {% trans "Add new exercise" %}
- </a>
- {% else %}
- <a href="#" class="btn btn-success btn-sm disabled">
- {% trans "Add new exercise" %}<br>
- <small>
- {% trans "Only registered users can do this" %}
- </small>
- </a>
- {% endif %}
-</p>
-
-
-
<h4>{% trans "Search" %}</h4>
<input name="term"
type="search"
@@ -121,3 +104,19 @@ $(function() {
placeholder="{% trans 'exercise name' %}"
style="width:100%;">
{% endblock %}
+
+
+{% block options %}
+ {% if user.is_authenticated and not user.userprofile.is_temporary %}
+ <a href="{% url 'exercise:exercise:add' %}" class="btn btn-success btn-sm">
+ {% trans "Add new exercise" %}
+ </a>
+ {% else %}
+ <a href="#" class="btn btn-success btn-sm disabled">
+ {% trans "Add new exercise" %}<br>
+ <small>
+ {% trans "Only registered users can do this" %}
+ </small>
+ </a>
+ {% endif %}
+{% endblock %}
diff --git a/wger/exercises/templates/exercise/overview.html b/wger/exercises/templates/exercise/overview.html
index ebdf02498..8864645b9 100644
--- a/wger/exercises/templates/exercise/overview.html
+++ b/wger/exercises/templates/exercise/overview.html
@@ -106,21 +106,6 @@ $(document).ready(function() {
Side bar
-->
{% block sidebar %}
-<p>
- {% if user.is_authenticated and not user.userprofile.is_temporary %}
- <a href="{% url 'exercise:exercise:add' %}" class="btn btn-success btn-sm">
- {% trans "Add new exercise" %}
- </a>
- {% else %}
- <a href="#" class="btn btn-success btn-sm disabled">
- {% trans "Add new exercise" %}<br>
- <small>
- {% trans "Only registered users can do this" %}
- </small>
- </a>
- {% endif %}
-</p>
-
<h4>{% trans "Search" %}</h4>
<input name="term"
type="search"
@@ -128,3 +113,20 @@ $(document).ready(function() {
class="ajax-form-element form-control"
placeholder="{% trans 'exercise name' %}">
{% endblock %}
+
+
+
+{% block options %}
+ {% if user.is_authenticated and not user.userprofile.is_temporary %}
+ <a href="{% url 'exercise:exercise:add' %}" class="btn btn-success btn-sm">
+ {% trans "Add new exercise" %}
+ </a>
+ {% else %}
+ <a href="#" class="btn btn-success btn-sm disabled">
+ {% trans "Add new exercise" %}<br>
+ <small>
+ {% trans "Only registered users can do this" %}
+ </small>
+ </a>
+ {% endif %}
+{% endblock %}
diff --git a/wger/exercises/templates/muscles/admin-overview.html b/wger/exercises/templates/muscles/admin-overview.html
index 81c3e6809..34a1be05e 100644
--- a/wger/exercises/templates/muscles/admin-overview.html
+++ b/wger/exercises/templates/muscles/admin-overview.html
@@ -34,16 +34,10 @@
-{% block sidebar %}
+{% block options %}
{% if perms.exercises.add_equipment %}
-<p>
<a href="{% url 'exercise:muscle:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
{% trans "Add muscle" %}
</a>
-</p>
-
-<p>{% blocktrans %}<strong>Important:</strong> After adding a muscle, you need
-to create a new SVG image with the contours of the muscle and place it in the
-folder <em>images/muscles</em>.{% endblocktrans %}</p>
{% endif %}
{% endblock %}
diff --git a/wger/gym/templates/admin_notes/list.html b/wger/gym/templates/admin_notes/list.html
index ec1c6c99b..ef26bd0b9 100644
--- a/wger/gym/templates/admin_notes/list.html
+++ b/wger/gym/templates/admin_notes/list.html
@@ -58,10 +58,13 @@
-{% block sidebar %}
+{# #}
+{# Options #}
+{# #}
+{% block options %}
{% if perms.gym.add_adminusernote %}
- <a href="{% url 'gym:admin_note:add' member.pk %}" class="wger-modal-dialog btn btn-success">
- {% trans "Add" %}
+ <a href="{% url 'gym:admin_note:add' member.pk %}" class="wger-modal-dialog btn btn-success btn-sm">
+ {% trans "Add" %}
</a>
{% endif %}
{% endblock %}
diff --git a/wger/gym/templates/contract/list.html b/wger/gym/templates/contract/list.html
index 8739d764c..7097751e9 100644
--- a/wger/gym/templates/contract/list.html
+++ b/wger/gym/templates/contract/list.html
@@ -65,7 +65,9 @@
-
-{% block sidebar %}
- <a href="{% url 'gym:contract:add' member.pk %}" class="wger-modal-dialog btn btn-success">{% trans "Add" %}</a>
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+ <a href="{% url 'gym:contract:add' member.pk %}" class="wger-modal-dialog btn btn-sm btn-success">{% trans "Add" %}</a>
{% endblock %}
diff --git a/wger/gym/templates/contract_option/list.html b/wger/gym/templates/contract_option/list.html
index 873b0b7d7..fa0fd7f00 100644
--- a/wger/gym/templates/contract_option/list.html
+++ b/wger/gym/templates/contract_option/list.html
@@ -62,6 +62,11 @@
-{% block sidebar %}
- <a href="{% url 'gym:contract-option:add' gym.id %}" class="wger-modal-dialog btn btn-success">{% trans "Add" %}</a>
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+ <a href="{% url 'gym:contract-option:add' gym.id %}" class="wger-modal-dialog btn btn-sm btn-success">
+ {% trans "Add" %}
+ </a>
{% endblock %}
diff --git a/wger/gym/templates/contract_type/list.html b/wger/gym/templates/contract_type/list.html
index 91ef22a38..12925e64b 100644
--- a/wger/gym/templates/contract_type/list.html
+++ b/wger/gym/templates/contract_type/list.html
@@ -62,6 +62,11 @@
-{% block sidebar %}
- <a href="{% url 'gym:contract_type:add' gym.id %}" class="wger-modal-dialog btn btn-success">{% trans "Add" %}</a>
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+ <a href="{% url 'gym:contract_type:add' gym.id %}" class="wger-modal-dialog btn btn-sm btn-success">
+ {% trans "Add" %}
+ </a>
{% endblock %}
diff --git a/wger/gym/templates/document/list.html b/wger/gym/templates/document/list.html
index 1f7cabd36..5cccace2c 100644
--- a/wger/gym/templates/document/list.html
+++ b/wger/gym/templates/document/list.html
@@ -69,9 +69,12 @@
-{% block sidebar %}
+{# #}
+{# Options #}
+{# #}
+{% block options %}
{% if perms.gym.add_userdocument %}
- <a href="{% url 'gym:document:add' member.pk %}" class="btn btn-success" %}>
+ <a href="{% url 'gym:document:add' member.pk %}" class="btn btn-sm btn-success" %}>
{% trans "Add" %}
</a>
{% endif %}
diff --git a/wger/gym/templates/gym/list.html b/wger/gym/templates/gym/list.html
index 653960ff6..ab3c97ce8 100644
--- a/wger/gym/templates/gym/list.html
+++ b/wger/gym/templates/gym/list.html
@@ -38,13 +38,6 @@
{% block sidebar %}
-{% if perms.gym.add_gym %}
- <a href="{% url 'gym:gym:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
- {% trans "Add new gym" %}
- </a>
- <div class="clearfix" style="padding-bottom: 2em;"></div>
-{% endif %}
-
{% if perms.config.change_gymconfig %}
<div class="btn-group pull-right">
<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown">
@@ -64,6 +57,17 @@
<td>{{ global_gym_config.default_gym|default:"-/-" }}</td>
</tr>
</table>
+{% endblock %}
+
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+{% if perms.gym.add_gym %}
+ <a href="{% url 'gym:gym:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
+ {% trans "Add new gym" %}
+ </a>
+{% endif %}
{% endblock %}
diff --git a/wger/gym/templates/gym/member_list.html b/wger/gym/templates/gym/member_list.html
index a6b2bdf9f..2d7e2ac9f 100644
--- a/wger/gym/templates/gym/member_list.html
+++ b/wger/gym/templates/gym/member_list.html
@@ -68,25 +68,13 @@
<tr>
<td colspan="4">{% trans "This gym has no administrators or trainers" %}</td>
</tr>
-{% endfor %}
+{% endfor %}
</tbody>
</table>
{% endblock %}
{% block sidebar %}
-{# #}
-{# Other options #}
-{# #}
-{% if perms.gym.manage_gym or perms.gym.manage_gyms %}
-<a href="{% url 'gym:gym:add-user' gym.pk %}" class="btn btn-success wger-modal-dialog">
- {% trans "Add member" %}
-</a>
-<div class="clear-fix" style="margin-bottom: 1em;"></div>
-{% endif %}
-
-
-
{# #}
{# Gym details #}
{# #}
@@ -323,3 +311,16 @@
</table>
{% endif %}
{% endblock %}
+
+
+
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+{% if perms.gym.manage_gym or perms.gym.manage_gyms %}
+ <a href="{% url 'gym:gym:add-user' gym.pk %}" class="btn btn-success btn-sm wger-modal-dialog">
+ {% trans "Add member" %}
+ </a>
+{% endif %}
+{% endblock %}
diff --git a/wger/manager/templates/calendar/month.html b/wger/manager/templates/calendar/month.html
index 53274add1..d5b84bd14 100644
--- a/wger/manager/templates/calendar/month.html
+++ b/wger/manager/templates/calendar/month.html
@@ -106,15 +106,6 @@ $(document).ready(function() {
{# Side bar #}
{# #}
{% block sidebar %}
-{% if is_owner %}
-<p>
- <a href="#" id="calendar-day-select-link" data-toggle="modal" data-target="#ecalendar-day-select-popup" class="btn btn-success btn-sm">
- {% trans "Add new log" %}
- </a>
-</p>
-{% endif %}
-
-
<div class="modal fade" id="ecalendar-day-select-popup">
<div class="modal-dialog">
<div class="modal-content">
@@ -187,3 +178,12 @@ you can click on them to see the details.{% endblocktrans %}</p>
{% endfor %}
</div>
{% endblock %}
+
+
+{% 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">
+ {% trans "Add new log" %}
+ </a>
+{% endif %}
+{% endblock %}
diff --git a/wger/manager/templates/schedule/overview.html b/wger/manager/templates/schedule/overview.html
index 7590a7aca..7c517bfbf 100644
--- a/wger/manager/templates/schedule/overview.html
+++ b/wger/manager/templates/schedule/overview.html
@@ -33,12 +33,6 @@
{% block sidebar %}
-<p>
- <a href="{% url 'manager:schedule:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
- {% trans "Add schedule" %}
- </a>
-</p>
-
<p>{% blocktrans %}Schedules are collections of workouts that you do in
succession.{% endblocktrans %}</p>
@@ -50,3 +44,10 @@ always do the same workouts in succession, e.g. A > B > C > A > B > C and so on.
shown e.g. in your dashboard) till it reaches the last workout or till you
deactivate it, if it is a loop.{% endblocktrans %}</p>
{% endblock %}
+
+
+{% block options %}
+ <a href="{% url 'manager:schedule:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
+ {% trans "Add schedule" %}
+ </a>
+{% endblock %}
diff --git a/wger/manager/templates/workout/overview.html b/wger/manager/templates/workout/overview.html
index ba12003fb..f8e37213d 100644
--- a/wger/manager/templates/workout/overview.html
+++ b/wger/manager/templates/workout/overview.html
@@ -29,10 +29,8 @@
{% endblock %}
-{% block sidebar %}
-<p>
- <a href="{% url 'manager:workout:add' %}" class="btn btn-success btn-sm">
- {% trans "Add workout" %}
- </a>
-</p>
+{% block options %}
+<a href="{% url 'manager:workout:add' %}" class="btn btn-success btn-sm">
+ {% trans "Add workout" %}
+</a>
{% endblock %}
diff --git a/wger/nutrition/templates/ingredient/overview.html b/wger/nutrition/templates/ingredient/overview.html
index ffc67e58f..5386562a2 100644
--- a/wger/nutrition/templates/ingredient/overview.html
+++ b/wger/nutrition/templates/ingredient/overview.html
@@ -57,21 +57,6 @@
{% endblock %}
{% block sidebar %}
- <p>
- {% if user.is_authenticated and not user.userprofile.is_temporary %}
- <a href="{% url 'nutrition:ingredient:add' %}"
- class="btn btn-success btn-sm">
- {% trans "Add ingredient" %}
- </a>
- {% else %}
- <a href="#" class="btn btn-success btn-sm disabled">
- {% trans "Add ingredient" %}<br>
- <small>
- {% trans "Only registered users can do this" %}
- </small>
- </a>
- {% endif %}
- </p>
<h4>{% trans "Search" %}</h4>
<form action="{% url 'ingredient-search' %}"
@@ -86,3 +71,23 @@
style="width:100%;">
</form>
{% endblock %}
+
+
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+ {% if user.is_authenticated and not user.userprofile.is_temporary %}
+ <a href="{% url 'nutrition:ingredient:add' %}"
+ class="btn btn-success btn-sm">
+ {% trans "Add ingredient" %}
+ </a>
+ {% else %}
+ <a href="#" class="btn btn-success btn-sm disabled">
+ {% trans "Add ingredient" %}<br>
+ <small>
+ {% trans "Only registered users can do this" %}
+ </small>
+ </a>
+ {% endif %}
+{% endblock %}
diff --git a/wger/nutrition/templates/plan/overview.html b/wger/nutrition/templates/plan/overview.html
index 1aaea347b..fceba273c 100644
--- a/wger/nutrition/templates/plan/overview.html
+++ b/wger/nutrition/templates/plan/overview.html
@@ -28,10 +28,11 @@
-{% block sidebar%}
-<p>
+{# #}
+{# Options #}
+{# #}
+{% block options %}
<a href="{% url 'nutrition:plan:add' %}" class="btn btn-success btn-sm">
{% trans "Add nutrition plan" %}
</a>
-</p>
{% endblock %}
diff --git a/wger/nutrition/templates/units/list.html b/wger/nutrition/templates/units/list.html
index 44e19b02d..09e06e220 100644
--- a/wger/nutrition/templates/units/list.html
+++ b/wger/nutrition/templates/units/list.html
@@ -39,10 +39,11 @@
-{% block sidebar %}
-<p>
+{# #}
+{# Options #}
+{# #}
+{% block options %}
<a href="{% url 'nutrition:weight_unit:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
{% trans "Add new weight unit" %}
</a>
-</p>
{% endblock %}
diff --git a/wger/weight/templates/overview.html b/wger/weight/templates/overview.html
index 57f4bd527..c1793b69f 100644
--- a/wger/weight/templates/overview.html
+++ b/wger/weight/templates/overview.html
@@ -40,9 +40,9 @@
{% if is_owner %}
-{% if last_five_weight_entries_details %}
+{% if last_five_weight_entries_details %}
<table class="table">
- <tr>
+ <tr>
<th>{% trans 'Date' %}</th>
<th>{% trans 'Weight' %}</th>
<th>{% trans 'Change' context "Noun, not verb" %}</th>
@@ -64,7 +64,7 @@
{% endif %}
</td>
<td>
- {% if entry_detail.2 %}
+ {% if entry_detail.2 %}
{{ entry_detail.2 }}
{% else %}
-/-
@@ -83,13 +83,6 @@
{# Side bar #}
{# #}
{% block sidebar %}
-{% if is_owner %}
-<p>
- <a href="{% url 'weight:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
- {% trans "Add weight entry" %}
- </a>
-</p>
-{% endif %}
{% endblock %}
@@ -119,5 +112,8 @@
</li>
</ul>
</div>
+<a href="{% url 'weight:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
+ {% trans "Add" %}
+</a>
{% endif %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}