Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix dropdown markup

Roland Geider0311ad2b2177
diff --git a/wger/gym/templates/gym/member_list.html b/wger/gym/templates/gym/member_list.html
index 9afa3cdf3..b1158c30c 100644
--- a/wger/gym/templates/gym/member_list.html
+++ b/wger/gym/templates/gym/member_list.html
@@ -79,18 +79,14 @@
{# Gym details #}
{# #}
{% if perms.gym.change_gym %}
-<div class="btn-group float-right">
- <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
+<div class="dropdown float-right">
+ <a type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
{% trans "Actions" %} <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" role="menu">
- <li>
- <a href="{% url 'gym:gym:edit' gym.id %}" class="wger-modal-dialog">{% trans "Edit"%}</a>
- </li>
- <li>
- <a href="{% url 'gym:export:users' gym.id %}">{% trans "Export"%}</a>
- </li>
- </ul>
+ </a>
+ <div class="dropdown-menu dropdown-menu-right" role="menu">
+ <a href="{% url 'gym:gym:edit' gym.id %}" class="dropdown-item wger-modal-dialog">{% trans "Edit"%}</a>
+ <a href="{% url 'gym:export:users' gym.id %}" class="dropdown-item">{% trans "Export"%}</a>
+ </div>
</div>
{% endif %}
@@ -136,15 +132,13 @@
{# Gym configuration #}
{# #}
{% if perms.gym.change_gymconfig %}
-<div class="btn-group float-right">
- <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
+<div class="dropdown float-right">
+ <a role="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
{% trans "Actions" %} <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" role="menu">
- <li>
- <a href="{% url 'gym:config:edit' gym.config.id %}" class="wger-modal-dialog">{% trans "Edit"%}</a>
- </li>
- </ul>
+ </a>
+ <div class="dropdown-menu dropdown-menu-right">
+ <a href="{% url 'gym:config:edit' gym.config.id %}" class="wger-modal-dialog dropdown-item">{% trans "Edit"%}111</a>
+ </div>
</div>
{% endif %}
@@ -173,15 +167,15 @@
{# Admin configuration #}
{# #}
{% if user.gymadminconfig and user.userprofile.gym_id == gym.id %}
-<div class="btn-group float-right">
- <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
- {% trans "Actions" %} <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" role="menu">
- <li>
- <a href="{% url 'gym:admin_config:edit' user.gymadminconfig.id %}" class="wger-modal-dialog">{% trans "Edit"%}</a>
- </li>
- </ul>
+<div class="dropdown float-right">
+ <div class="btn-group ">
+ <a role="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
+ {% trans "Actions" %} <span class="caret"></span>
+ </a>
+ <div class="dropdown-menu dropdown-menu-right" role="menu">
+ <a href="{% url 'gym:admin_config:edit' user.gymadminconfig.id %}" class="dropdown-item wger-modal-dialog">{% trans "Edit"%}</a>
+ </div>
+ </div>
</div>
<h4>{% trans "My configuration" %}</h4>
@@ -208,18 +202,14 @@
<h4>{% trans "Contracts" %}</h4>
{% endif %}
{% if perms.gym.change_contracttype %}
-<div class="btn-group float-right">
- <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
+<div class="dropdown float-right">
+ <a role="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
{% trans "Actions" %} <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" role="menu">
- <li>
- <a href="{% url 'gym:contract_type:list' gym.id %}">{% trans "Overview" %}</a>
- </li>
- <li>
- <a href="{% url 'gym:contract_type:add' gym.id %}" class="wger-modal-dialog">{% trans "Add" %}</a>
- </li>
- </ul>
+ </a>
+ <div class="dropdown-menu dropdown-menu-right" role="menu">
+ <a href="{% url 'gym:contract_type:list' gym.id %}" class="dropdown-item">{% trans "Overview" %}</a>
+ <a href="{% url 'gym:contract_type:add' gym.id %}" class="dropdown-item wger-modal-dialog">{% trans "Add" %}</a>
+ </div>
</div>
<h5>{% trans "Types" %}</h5>
@@ -245,18 +235,14 @@
{% if perms.gym.change_contractoption %}
-<div class="btn-group float-right">
+<div class="dropdown float-right">
<button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
{% trans "Actions" %} <span class="caret"></span>
</button>
- <ul class="dropdown-menu" role="menu">
- <li>
- <a href="{% url 'gym:contract-option:list' gym.id %}">{% trans "Overview" %}</a>
- </li>
- <li>
- <a href="{% url 'gym:contract-option:add' gym.id %}" class="wger-modal-dialog">{% trans "Add" %}</a>
- </li>
- </ul>
+ <div class="dropdown-menu dropdown-menu-right" role="menu">
+ <a href="{% url 'gym:contract-option:list' gym.id %}" class="dropdown-item">{% trans "Overview" %}</a>
+ <a href="{% url 'gym:contract-option:add' gym.id %}" class="dropdown-item wger-modal-dialog">{% trans "Add" %}</a>
+ </div>
</div>
<h5>{% trans "Options" %}</h5>
@@ -286,18 +272,14 @@
{# Email lists #}
{# #}
{% if perms.email.change_log %}
-<div class="btn-group float-right">
- <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
+<div class="dropdown float-right">
+ <a role="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown">
{% trans "Actions" %} <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" role="menu">
- <li>
- <a href="{% url 'email:email:overview' gym.id %}">{% trans "Overview"%}</a>
- </li>
- <li>
- <a href="{% url 'email:email:add-gym' gym.id %}">{% trans "Add"%}</a>
- </li>
- </ul>
+ </a>
+ <div class="dropdown-menu dropdown-menu-right" role="menu">
+ <a href="{% url 'email:email:overview' gym.id %}" class="dropdown-item">{% trans "Overview"%}</a>
+ <a href="{% url 'email:email:add-gym' gym.id %}" class="dropdown-item">{% trans "Add"%}</a>
+ </div>
</div>
<h4>{% trans "Emails" %}</h4>