Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Move further templates to using options in navbar

Roland Geiderfb10cb5eb36a
diff --git a/wger/config/templates/language/view.html b/wger/config/templates/language/view.html
index 8a85b71a7..274fcb479 100644
--- a/wger/config/templates/language/view.html
+++ b/wger/config/templates/language/view.html
@@ -58,11 +58,11 @@ in A).{% endblocktrans %}</p>
</a>
</td>
<td>
-
- <img src="{% if config.show %}{% static 'images/icons/status-on.svg' %}{% else %}{% static 'images/icons/status-off.svg' %}{% endif %}"
- width="16"
- height="16"
- alt="">
+ {% if config.show %}
+ <span class="{% fa_class 'check' %} text-success"></span>
+ {% else %}
+ <span class="{% fa_class 'times' %}"></span>
+ {% endif %}
</td>
</tr>
{% endfor %}
@@ -72,31 +72,36 @@ in A).{% endblocktrans %}</p>
+{# #}
+{# Side bar #}
+{# #}
{% block sidebar %}
-<h4>{% trans "Options" %}</h4>
-
-<p>
- <a href="{% url 'core:language:edit' view_language.id %}"
- {% auto_link_css flavour "wger-modal-dialog" %}>
- <img src="{% static 'images/icons/edit.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Edit' %}"
- >
- {% trans "Edit" %}
- </a>
-</p>
-
-<p>
- <a href="{% url 'core:language:delete' view_language.id %}"
- {% auto_link_css flavour "wger-modal-dialog" %}>
- <img src="{% static 'images/icons/trash.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Delete' %}"
- >
- {% trans "Delete" %}
- </a>
-</p>
-
{% endblock %}
+
+
+
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+<div class="btn-group">
+ <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ <span class="glyphicon glyphicon-cog"></span>
+ {% trans "Options" %}
+ </button>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="{% url 'core:language:edit' view_language.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'pencil-square-o' %}"></span>
+ {% trans "Edit" %}
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'core:language:delete' view_language.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'trash' %}"></span>
+ {% trans "Delete" %}
+ </a>
+ </li>
+ </ul>
+</div>
+{% endblock %}
\ No newline at end of file
diff --git a/wger/core/templates/base.html b/wger/core/templates/base.html
index c16118017..0101516fd 100644
--- a/wger/core/templates/base.html
+++ b/wger/core/templates/base.html
@@ -21,18 +21,10 @@ browsing the site as the user "{{current_user}}", all actions are performed on h
<h2 id="page-title" class="page-header">
{% block title %}{% endblock %}
-
<div class="btn-group navbar-right">
- <div class="btn-group">
- <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span class="glyphicon glyphicon-cog"></span>
- {% trans "Options" %}
- </button>
- <ul class="dropdown-menu">
- {% block options %}
- {% endblock %}
- </ul>
- </div>
+
+ {% block options %}
+ {% endblock %}
{% if show_shariff %}
<button type="button"
@@ -43,7 +35,7 @@ browsing the site as the user "{{current_user}}", all actions are performed on h
{% trans "Share" %}
</button>
{% endif %}
-</div>
+ </div>
</h2>
diff --git a/wger/core/templates/navigation.html b/wger/core/templates/navigation.html
index 187485a10..a84a6f30a 100644
--- a/wger/core/templates/navigation.html
+++ b/wger/core/templates/navigation.html
@@ -204,8 +204,8 @@
<li class="divider"></li>
<li>
<a href="{% url 'core:user:logout' %}" class="browserid-logout">
- <span class="glyphicon glyphicon-log-out"></span>
- {% trans "Logout" %}
+ <span class="{% fa_class 'sign-out' %}"></span>
+ {% trans "Logout" %}
</a>
</li>
{% endif %}
diff --git a/wger/core/templates/user/preferences.html b/wger/core/templates/user/preferences.html
index 25d18e43d..5d05356ba 100644
--- a/wger/core/templates/user/preferences.html
+++ b/wger/core/templates/user/preferences.html
@@ -26,7 +26,7 @@ $(function() {
<div class="panel panel-default">
<div class="panel-heading">
- <h3 class="panel-title">
+ <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#preferences-accordion" href="#collapseEmail">
{% trans "Email" %}
</a>
@@ -108,42 +108,45 @@ $(function() {
{% block sidebar %}
-<h4>{% trans "Options" %}</h4>
-<p>
- <a href="{% url 'core:user:logout' %}" {% auto_link_css flavour "browserid-logout" %}>
- <img src="{% static 'images/icons/logout.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Logout' %}"
- title="{% trans 'Logout' %}">
- {% trans "Logout" %}</a>
-</p>
-<p>
- <a href="{% url 'core:user:change-password' %}" {% auto_link_css flavour "wger-modal-dialog" %}>
- <img src="{% static 'images/icons/preferences.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Change password' %}"
- title="{% trans 'Change password' %}">
- {% trans "Change password" %}</a>
-</p>
-<p>
- <a href="{% url 'core:user:api-key' %}" {% auto_link_css flavour %}>
- <img src="{% static 'images/icons/internet.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'API key' %}"
- title="{% trans 'API key' %}">
- {% trans "API key" %}</a>
-</p>
-
-<p style="margin-top: 2em;">
- <a href="{% url 'core:user:delete' %}" {% auto_link_css flavour "wger-modal-dialog" %}>
- <img src="{% static 'images/icons/trash.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Delete account' %}"
- title="{% trans 'Delete account' %}">
- {% trans "Delete account" %}</a>
- </p>
{% endblock %}
+
+
+
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+<div class="btn-group">
+ <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ <span class="glyphicon glyphicon-cog"></span>
+ {% trans "Options" %}
+ </button>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="{% url 'core:user:logout' %}" class="browserid-logout">
+ <span class="{% fa_class 'sign-out' %}"></span>
+ {% trans "Logout" %}
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'core:user:change-password' %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'key' %}"></span>
+ {% trans "Change password" %}
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'core:user:api-key' %}">
+ <span class="{% fa_class 'globe' %}"></span>
+ {% trans "API key" %}
+ </a>
+ </li>
+ <li role="separator" class="divider"></li>
+ <li>
+ <a href="{% url 'core:user:delete' %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'trash' %}"></span>
+ {% trans "Delete account" %}
+ </a>
+ </li>
+ </ul>
+</div>
+{% endblock %}
\ No newline at end of file
diff --git a/wger/exercises/templates/exercise/view.html b/wger/exercises/templates/exercise/view.html
index 00850a8aa..2ad517166 100644
--- a/wger/exercises/templates/exercise/view.html
+++ b/wger/exercises/templates/exercise/view.html
@@ -370,17 +370,25 @@ $(document).ready(function() {
{# #}
{% block options %}
{% if perms.exercises.change_exercise %}
-<li>
- <a href="{% url 'exercise:exercise:edit' exercise.id %}">
- <span class="{% fa_class 'pencil-square-o' %}"></span>
- {% trans "Edit" %}
- </a>
-</li>
-<li>
- <a href="{% url 'exercise:exercise:delete' exercise.id %}" class="wger-modal-dialog" %}>
- <span class="{% fa_class 'trash' %}"></span>
- {% trans "Delete" %}
- </a>
-</li>
+<div class="btn-group">
+ <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ <span class="glyphicon glyphicon-cog"></span>
+ {% trans "Options" %}
+ </button>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="{% url 'exercise:exercise:edit' exercise.id %}">
+ <span class="{% fa_class 'pencil-square-o' %}"></span>
+ {% trans "Edit" %}
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'exercise:exercise:delete' exercise.id %}" class="wger-modal-dialog" %}>
+ <span class="{% fa_class 'trash' %}"></span>
+ {% trans "Delete" %}
+ </a>
+ </li>
+ </ul>
+</div>
{% endif %}
{% endblock %}
\ No newline at end of file
diff --git a/wger/manager/templates/schedule/view.html b/wger/manager/templates/schedule/view.html
index 8325e4c32..415bce5e4 100644
--- a/wger/manager/templates/schedule/view.html
+++ b/wger/manager/templates/schedule/view.html
@@ -111,26 +111,16 @@
{% if is_owner %}
<td style="min-width: 6em;">
<span class="editoptions">
- <img src="{% static 'images/icons/move.svg' %}"
- width="22"
- height="22"
- alt="{% trans 'Move me' %}"
- title="{% trans 'Move me' %}"
- class="dragndrop-handle">
+ <span title="{% trans 'Move me' %}" class="dragndrop-handle {% fa_class 'bars' %}"></span>
+
<a href="{% url 'manager:step:edit' step.id %}"
title="{% trans 'Edit' %}"
class="wger-modal-dialog">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="22"
- height="22"
- alt="{% trans 'Edit' %}"></a>
+ <span class="{% fa_class 'pencil-square-o' %}"></span></a>
<a href="{% url 'manager:step:delete' step.id %}"
title="{% trans 'Delete' %}"
class="wger-modal-dialog">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="22"
- height="22"
- alt="{% trans 'Delete' %}"></a>
+ <span class="{% fa_class 'trash' %}"></span></a>
</span>
</td>
{% endif %}
@@ -230,52 +220,6 @@ edit the order by dragging and dropping them. It's also possible to add one work
than once.{% endblocktrans %}</p>
{% endif %}
-<h4>{% trans "Options" %}</h4>
-<p>
- <a href="#" data-toggle="modal" data-target="#export-ical-popup">
- <img src="{% static 'images/icons/calendar.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Export calendar file' %}"
- title="{% trans 'Export calendar file' %}">
- {% trans "Export calendar file" %}</a>
-</p>
-
-<p>
- <a data-toggle="modal" data-target="#download-pdf-popup">
- <img src="{% static 'images/icons/save.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Download as PDF' %}"
- title="{% trans 'Download as PDF' %}">
- {% trans "Download as PDF" %}
- </a>
-</p>
-
-{% if is_owner %}
-<p>
- <a href="{% url 'manager:schedule:edit' schedule.id %}"
- class="wger-modal-dialog">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Edit schedule' %}"
- title="{% trans 'Edit schedule' %}">
- {% trans "Edit schedule" %}</a>
-</p>
-
-<p>
- <a href="{% url 'manager:schedule:delete' schedule.id %}"
- class="wger-modal-dialog">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Delete schedule' %}"
- title="{% trans 'Delete schedule' %}">
- {% trans "Delete schedule" %}</a>
-</p>
-{% endif %}
-
<div class="modal fade" id="export-ical-popup">
<div class="modal-dialog">
<div class="modal-content">
@@ -290,11 +234,6 @@ application for example google calendar, outlook or iCal. This will create
an appointment for each training day with the appropriate exercises.{% endblocktrans %}</p>
<p>
<a href="{% url 'manager:schedule:ical' schedule.id uid token %}" class="btn btn-block btn-default">
- <img src="{% static 'images/icons/calendar.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Export calendar file' %}"
- title="{% trans 'Export calendar file' %}">
{% trans "Export calendar file" %}
</a>
</p>
@@ -354,11 +293,6 @@ an appointment for each training day with the appropriate exercises.{% endblockt
<p>
<a href="" class="btn btn-block btn-default" id="download-pdf-button-schedule">
- <img src="{% static 'images/icons/save.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Download' %}"
- title="{% trans 'Download' %}">
{% trans "Download" %}
</a>
</p>
@@ -367,3 +301,44 @@ an appointment for each training day with the appropriate exercises.{% endblockt
</div>
</div>
{% endblock %}
+
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+ <div class="btn-group">
+ <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ <span class="glyphicon glyphicon-cog"></span>
+ {% trans "Options" %}
+ </button>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="#" data-toggle="modal" data-target="#export-ical-popup">
+ <span class="{% fa_class 'calendar' %}"></span>
+ {% trans "Export calendar file" %}
+ </a>
+ </li>
+ <li>
+ <a data-toggle="modal" data-target="#download-pdf-popup">
+ <span class="{% fa_class 'download' %}"></span>
+ {% trans "Download as PDF" %}
+ </a>
+ </li>
+ {% if is_owner %}
+ <li>
+ <a href="{% url 'manager:schedule:edit' schedule.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'pencil-square-o' %}"></span>
+ {% trans "Edit schedule" %}
+ </a>
+ </li>
+ <li role="separator" class="divider"></li>
+ <li>
+ <a href="{% url 'manager:schedule:delete' schedule.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'trash' %}"></span>
+ {% trans "Delete schedule" %}
+ </a>
+ </li>
+ {% endif %}
+ </ul>
+ </div>
+{% endblock %}
\ No newline at end of file
diff --git a/wger/manager/templates/workout/view.html b/wger/manager/templates/workout/view.html
index 3f879483b..0f81b5801 100644
--- a/wger/manager/templates/workout/view.html
+++ b/wger/manager/templates/workout/view.html
@@ -207,45 +207,53 @@ an appointment for each training day with the appropriate exercises.{% endblockt
{# Options #}
{# #}
{% block options %}
-<li>
- <a data-toggle="modal" data-target="#download-pdf-popup">
- <span class="{% fa_class 'download' %}"></span>
- {% trans "Download as PDF" %}
- </a>
-</li>
-<li>
- <a href="{% url 'manager:log:log' workout.id %}">
- <span class="{% fa_class 'line-chart' %}"></span>
- {% trans "View weight log" %}
- </a>
-</li>
-{% if is_owner %}
-<li>
- <a href="{% url 'manager:workout:edit' workout.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'pencil-square-o' %}"></span>
- {% trans "Edit workout" %}
- </a>
-</li>
-{% endif %}
-<li>
- <a data-toggle="modal" data-target="#export-ical-popup">
- <span class="{% fa_class 'calendar' %}"></span>
- {% trans "Export calendar file" %}
- </a>
-</li>
-<li>
- <a href="{% url 'manager:workout:copy' workout.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'clone' %}"></span>
- {% trans "Make a copy of this workout" %}
- </a>
-</li>
-{% if is_owner %}
-<li role="separator" class="divider"></li>
-<li>
- <a href="{% url 'manager:workout:delete' workout.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'trash' %}"></span>
- {% trans "Delete this workout" %}
- </a>
-</li>
+<div class="btn-group">
+ <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ <span class="glyphicon glyphicon-cog"></span>
+ {% trans "Options" %}
+ </button>
+ <ul class="dropdown-menu">
+ <li>
+ <a data-toggle="modal" data-target="#download-pdf-popup">
+ <span class="{% fa_class 'download' %}"></span>
+ {% trans "Download as PDF" %}
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'manager:log:log' workout.id %}">
+ <span class="{% fa_class 'line-chart' %}"></span>
+ {% trans "View weight log" %}
+ </a>
+ </li>
+ {% if is_owner %}
+ <li>
+ <a href="{% url 'manager:workout:edit' workout.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'pencil-square-o' %}"></span>
+ {% trans "Edit workout" %}
+ </a>
+ </li>
+ {% endif %}
+ <li>
+ <a data-toggle="modal" data-target="#export-ical-popup">
+ <span class="{% fa_class 'calendar' %}"></span>
+ {% trans "Export calendar file" %}
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'manager:workout:copy' workout.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'clone' %}"></span>
+ {% trans "Make a copy of this workout" %}
+ </a>
+ </li>
+ {% if is_owner %}
+ <li role="separator" class="divider"></li>
+ <li>
+ <a href="{% url 'manager:workout:delete' workout.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'trash' %}"></span>
+ {% trans "Delete this workout" %}
+ </a>
+ </li>
+ </ul>
+</div>
{% endif %}
{% endblock %}
\ No newline at end of file
diff --git a/wger/nutrition/templates/plan/view.html b/wger/nutrition/templates/plan/view.html
index b52470195..9b7058ede 100644
--- a/wger/nutrition/templates/plan/view.html
+++ b/wger/nutrition/templates/plan/view.html
@@ -77,27 +77,15 @@ function custom_modal_init()
<div class="editoptions">
<a href="{% url 'nutrition:meal:delete' meal.id %}"
title="{% trans 'Delete' %}">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="16"
- height="16"
- alt="{% trans 'Delete meal' %}"
- title="{% trans 'Delete meal' %}"></a>
+ <span class="{% fa_class 'trash' %}"></span></a>
<a href="{% url 'nutrition:meal:edit' meal.id %}"
title="{% trans 'Edit' %}"
class="wger-modal-dialog">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="16"
- height="16"
- alt="{% trans 'Edit meal' %}"
- title="{% trans 'Edit meal' %}"></a>
+ <span class="{% fa_class 'pencil-square-o' %}"></span></a>
<a href="{% url 'nutrition:meal_item:add' meal.id %}"
title="{% trans 'Add' %}"
class="wger-modal-dialog edit-meal">
- <img src="{% static 'images/icons/add.svg' %}"
- width="16"
- height="16"
- alt="{% trans 'Add item to meal' %}"
- title="{% trans 'Add item to meal' %}"></a>
+ <span class="{% fa_class 'plus' %}"></span></a>
</div>
{% endif %}
</td>
@@ -114,17 +102,11 @@ function custom_modal_init()
<a href="{% url 'nutrition:meal_item:delete' item.id %}"
title="{% trans 'Delete' %}"
class="delete-mealitem">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="16"
- height="16"
- alt="{% trans 'Delete' %}"></a>
+ <span class="{% fa_class 'trash' %}"></span></a>
<a href="{% url 'nutrition:meal_item:edit' item.id %}"
title="{% trans 'Edit' %}"
class="wger-modal-dialog edit-meal edit-mealitem">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="16"
- height="16"
- alt="{% trans 'Edit' %}"></a>
+ <span class="{% fa_class 'pencil-square-o' %}"></span></a>
</span>
{% endif %}
</td>
@@ -164,11 +146,7 @@ function custom_modal_init()
<td colspan="6">
<a href="{% url 'nutrition:meal:add' plan.id %}"
class="wger-modal-dialog">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="16"
- height="16"
- alt="{% trans 'Add a new meal' %}"
- title="{% trans 'Add a new meal' %}">
+ <span class="{% fa_class 'plus' %}"></span>
{% trans "Add a new meal" %}
</a>
</td>
@@ -177,13 +155,6 @@ function custom_modal_init()
</tbody>
</table>
-{% if language.short_name != 'en' and is_owner %}
- <p>
- {% trans "If you find the ingredient list too short, you might want to activate the preference to also show English ingredients." %}
- <a href="{% url 'core:user:preferences' %}" id="ajax-english-ingredients">{% trans "That's done here" %}</a>.
- </p>
-{% endif %}
-
<h4>{% trans "Nutritional data" %}</h4>
{% if weight_entry %}
{% blocktrans with date=weight_entry.date weight=weight_entry.weight %}
@@ -298,53 +269,53 @@ function custom_modal_init()
{% endif %}
+{% if language.short_name != 'en' and is_owner %}
+ <p>
+ {% trans "If you find the ingredient list too short, you might want to activate the preference to also show English ingredients." %}
+ <a href="{% url 'core:user:preferences' %}" id="ajax-english-ingredients">{% trans "That's done here" %}</a>.
+ </p>
+{% endif %}
+{% endblock %}
-<h4>{% trans "Options" %}</h4>
-<p>
-<a href="{% url 'nutrition:plan:export-pdf' plan.id uid token %}"
- target="_blank">
- <img src="{% static 'images/icons/save.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Download as PDF' %}"
- title="{% trans 'Download as PDF' %}">
- {% trans "Download as PDF" %}
-</a>
-</p>
-
-{% if is_owner %}
-<p>
-<a href="{% url 'nutrition:plan:edit' plan.id %}"
- class="wger-modal-dialog">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Edit nutrition plan' %}">
- {% trans "Edit nutrition plan" %}
-</a>
-</p>
-
-
-<p>
-<a href="{% url 'nutrition:plan:copy' plan.id %}">
- <img src="{% static 'images/icons/copy.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Make a copy of this nutrition plan' %}">
- {% trans "Make a copy of this nutrition plan" %}
-</a>
-</p>
-<p>
-<a href="{% url 'nutrition:plan:delete' plan.id %}"
- class="wger-modal-dialog">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Delete nutrition plan' %}">
- {% trans "Delete nutrition plan" %}
-</a>
-</p>
-{% endif %}
-{% endblock %}
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+<div class="btn-group">
+ <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ <span class="glyphicon glyphicon-cog"></span>
+ {% trans "Options" %}
+ </button>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="{% url 'nutrition:plan:export-pdf' plan.id uid token %}" target="_blank">
+ <span class="{% fa_class 'download' %}"></span>
+ {% trans "Download as PDF" %}
+ </a>
+ </li>
+ {% if is_owner %}
+ <li>
+ <a href="{% url 'nutrition:plan:edit' plan.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'pencil-square-o' %}"></span>
+ {% trans "Edit nutrition plan" %}
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'nutrition:plan:copy' plan.id %}">
+ <span class="{% fa_class 'clone' %}"></span>
+ {% trans "Make a copy of this nutrition plan" %}
+ </a>
+ </li>
+ <li role="separator" class="divider"></li>
+ <li>
+ <a href="{% url 'nutrition:plan:delete' plan.id %}" class="wger-modal-dialog">
+ <span class="{% fa_class 'trash' %}"></span>
+ {% trans "Delete nutrition plan" %}
+ </a>
+ </li>
+ {% endif %}
+ </ul>
+</div>
+{% endblock %}
\ No newline at end of file
diff --git a/wger/weight/templates/overview.html b/wger/weight/templates/overview.html
index 5c94cb929..eeb3ed469 100644
--- a/wger/weight/templates/overview.html
+++ b/wger/weight/templates/overview.html
@@ -88,32 +88,34 @@
{% trans "Add weight entry" %}
</a>
</p>
+{% endblock %}
-{% if is_owner %}
-<h4>{% trans "Options" %}</h4>
-<p>
- <a href="{% url 'weight:export-csv' %}"
- target="_blank"
- {% auto_link_css flavour %}>
- <img src="{% static 'images/icons/save.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Export as CSV' %}"
- title="{% trans 'Export as CSV' %}">
- {% trans "Export as CSV" %}
- </a>
-</p>
-<p>
- <a href="{% url 'weight:import-csv' %}" {% auto_link_css flavour %}>
- <img src="{% static 'images/icons/csv-table.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Import from spreadsheet' %}"
- title="{% trans 'Import from spreadsheet' %}">
- {% trans "Import from spreadsheet" %}
- </a>
-</p>
-{% endif %}
-{% endblock %}
+{# #}
+{# Options #}
+{# #}
+{% block options %}
+{% if is_owner %}
+<div class="btn-group">
+ <button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ <span class="glyphicon glyphicon-cog"></span>
+ {% trans "Options" %}
+ </button>
+ <ul class="dropdown-menu">
+ <li>
+ <a href="{% url 'weight:export-csv' %}" target="_blank">
+ <span class="{% fa_class 'download' %}"></span>
+ {% trans "Export as CSV" %}
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'weight:import-csv' %}" {% auto_link_css flavour %}>
+ <span class="{% fa_class 'upload' %}"></span>
+ {% trans "Import from spreadsheet" %}
+ </a>
+ </li>
+ </ul>
+</div>
+{% endif %}
+{% endblock %}
\ No newline at end of file