Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Convert the exercise options to menu form

Roland Geider31aa77aea5c2
diff --git a/wger/core/templates/base.html b/wger/core/templates/base.html
index 28054aa0f..c16118017 100644
--- a/wger/core/templates/base.html
+++ b/wger/core/templates/base.html
@@ -20,10 +20,13 @@ 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" %}
+ <span class="glyphicon glyphicon-cog"></span>
+ {% trans "Options" %}
</button>
<ul class="dropdown-menu">
{% block options %}
diff --git a/wger/exercises/templates/exercise/view.html b/wger/exercises/templates/exercise/view.html
index bccc39d8a..00850a8aa 100644
--- a/wger/exercises/templates/exercise/view.html
+++ b/wger/exercises/templates/exercise/view.html
@@ -360,30 +360,27 @@ $(document).ready(function() {
</p>
{% endif %}
+{% license_sidebar exercise.license exercise.license_author %}
+{% endblock %}
+
+
+{# #}
+{# Options #}
+{# #}
+{% block options %}
{% if perms.exercises.change_exercise %}
-<h4>{% trans "Options" %}</h4>
-<p>
- <a href="{% url 'exercise:exercise:edit' exercise.id %}" {% auto_link_css flavour %}>
- <img src="{% static 'images/icons/edit.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Edit' %}">
+<li>
+ <a href="{% url 'exercise:exercise:edit' exercise.id %}">
+ <span class="{% fa_class 'pencil-square-o' %}"></span>
{% trans "Edit" %}
</a>
-</p>
-<p>
- <a href="{% url 'exercise:exercise:delete' exercise.id %}"
- {% auto_link_css flavour "wger-modal-dialog" %}>
- <img src="{% static 'images/icons/trash.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Delete' %}">
- {% trans "Delete" %}
+</li>
+<li>
+ <a href="{% url 'exercise:exercise:delete' exercise.id %}" class="wger-modal-dialog" %}>
+ <span class="{% fa_class 'trash' %}"></span>
+ {% trans "Delete" %}
</a>
-</p>
+</li>
{% endif %}
-
-{% license_sidebar exercise.license exercise.license_author %}
-
-{% endblock %}
+{% endblock %}
\ No newline at end of file