Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Hide the edit options (edit, delete) on tables, only show them when the mouse is over the row

Roland Geider779afbc38979
diff --git a/manager/static/css/yaml401/custom-yaml.css b/manager/static/css/yaml401/custom-yaml.css
index e69de29bb..557ad5bdc 100644
--- a/manager/static/css/yaml401/custom-yaml.css
+++ b/manager/static/css/yaml401/custom-yaml.css
@@ -0,0 +1,13 @@
+/*
+ * Hide the edit options (edit, delete) on tables, only show them when the mouse is over the row
+ */
+div.editoptions
+{
+ visibility: hidden;
+}
+
+tbody tr:hover td div.editoptions
+{
+ visibility: visible;
+}
+
diff --git a/manager/templates/exercise/overview.html b/manager/templates/exercise/overview.html
index 6fcb956f8..51912fc7f 100644
--- a/manager/templates/exercise/overview.html
+++ b/manager/templates/exercise/overview.html
@@ -60,8 +60,13 @@
<a href="/exercise/view/{{ exercise.id }}">{{ exercise.name }}</a>
</td>
<td style="text-align:right;">
- <a href="/exercise/edit/{{ exercise.id }}"
- title="{% trans "Edit" %}">[e]</a>
+ <div class="editoptions">
+ <a href="/exercise/edit/{{ exercise.id }}"
+ title="{% trans "Edit" %}">[e]</a>
+
+ <a href="/exercise/delete/{{ exercise.id }}"
+ title="{% trans "Delete" %}">[x]</a>
+ </div>
</td>
</tr>
{% empty %}
@@ -83,7 +88,7 @@
<!--
- Side bar?
+ Side bar
-->
{% block sidebar %}
<h3>{% trans "Options" %}</h3>