Self hosted FLOSS fitness/workout, nutrition and weight tracker
Miscellaneous improvements to mobile templates
Roland Geiderc50d066a7edd
diff --git a/wger/exercises/templates/mobile/overview.html b/wger/exercises/templates/mobile/overview.htmlindex f2b2a6551..d3631c628 100644--- a/wger/exercises/templates/mobile/overview.html+++ b/wger/exercises/templates/mobile/overview.html@@ -50,4 +50,77 @@{% endfor %}{% endfor %}</ul>+++<h3>{% trans "Add new exercise" %}</h3>+<p>+ {% if user.is_authenticated and not user.get_profile.is_temporary %}+ <a href="{% url 'exercise-add' %}" data-role="button">+ <img src="{% static 'images/icons/new.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Add new exercise' %}"+ title="{% trans 'Add new exercise' %}">+ {% trans "Add new exercise" %}+ </a>+ {% else %}+ <span data-role="button" class="ui-disabled">+ <img src="{% static 'images/icons/new.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Add new exercise' %}"+ title="{% trans 'Add new exercise' %}">+ {% trans "Only registered users can do this" %}+ </span>+ {% endif %}+</p>+++{% if perms.exercises %}+ <h3>{% trans "Options" %}</h3>+ {% if categories %}+ <p>+ {% with category=categories|first %}+ <a href="{% url 'exercisecategory-edit' category.id %}"+ data-role="button"+ id="current-category-edit">+ <img src="{% static 'images/icons/edit.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Edit category' %}"+ title="{% trans 'Edit category' %}">+ {% trans "Edit category" %}:+ <span class="current-category-name">{{category.name}}</span>+ </a>+ </p>+ {% endwith %}+ <p>+ {% with category=categories|first %}+ <a href="{% url 'exercisecategory-delete' category.id %}"+ data-role="button"+ id="current-category-delete">+ <img src="{% static 'images/icons/trash.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Delete category' %}"+ title="{% trans 'Delete category' %}">+ {% trans "Delete category" %}:+ <span class="current-category-name">{{category.name}}</span>+ </a>+ {% endwith %}+ </p>+ {% endif %}++ <p>+ <a href="{% url 'exercisecategory-add' %}"+ data-role="button">+ <img src="{% static 'images/icons/folder-new.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Add category' %}"+ title="{% trans 'Add category' %}">+ {% trans "Add category" %}+ </a>+ </p>+{% endif %}{% endblock %}diff --git a/wger/exercises/templates/mobile/view.html b/wger/exercises/templates/mobile/view.htmlindex a41b7ed9f..99a35c735 100644--- a/wger/exercises/templates/mobile/view.html+++ b/wger/exercises/templates/mobile/view.html@@ -40,33 +40,23 @@ included in the database.{% endblocktrans %}</p>{% if perms.exercises %}-<div class="ym-grid linearize-level-1">- <div class="ym-g50 ym-gl">- <div class="ym-gbox-left">- <div class="alert alert-success">- <a href="{% url 'exercise-accept' exercise.id %}">- <img src="{% static 'images/icons/status-on.svg' %}"- width="32"- height="32"- alt="{% trans 'Accept' %}">- {% trans "Accept" %}- </a>- </div>- </div>- </div>- <div class="ym-g50 ym-gl">- <div class="ym-gbox-left">- <div class="alert alert-error">- <a href="{% url 'exercise-decline' exercise.id %}">- <img src="{% static 'images/icons/status-off.svg' %}"- width="32"- height="32"- alt="{% trans 'Decline' %}">- {% trans "Decline" %}- </a>- </div>- </div>- </div>+<div data-role="controlgroup">+ <a href="{% url 'exercise-decline' exercise.id %}"+ data-role="button">+ <img src="{% static 'images/icons/status-off.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Decline' %}">+ {% trans "Decline" %}+ </a>+ <a href="{% url 'exercise-accept' exercise.id %}"+ data-role="button">+ <img src="{% static 'images/icons/status-on.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Accept' %}">+ {% trans "Accept" %}+ </a></div>{% endif %} {# end check permissions #}diff --git a/wger/exercises/templates/overview.html b/wger/exercises/templates/overview.htmlindex 5dca1cf97..f4accbef7 100644--- a/wger/exercises/templates/overview.html+++ b/wger/exercises/templates/overview.html@@ -131,13 +131,13 @@ $(document).ready(function() {<a href="{% url 'exercisecategory-edit' category.id %}"class="modal-dialog"id="current-category-edit">- <img src="{% static 'images/icons/edit.svg' %}"- width="32"- height="32"- alt="{% trans 'Edit category' %}"- title="{% trans 'Edit category' %}">- {% trans "Edit category" %}:- <span class="current-category-name">{{category.name}}</span>+ <img src="{% static 'images/icons/edit.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Edit category' %}"+ title="{% trans 'Edit category' %}">+ {% trans "Edit category" %}:+ <span class="current-category-name">{{category.name}}</span></a></p>{% endwith %}@@ -146,13 +146,13 @@ $(document).ready(function() {<a href="{% url 'exercisecategory-delete' category.id %}"class="modal-dialog"id="current-category-delete">- <img src="{% static 'images/icons/trash.svg' %}"- width="32"- height="32"- alt="{% trans 'Delete category' %}"- title="{% trans 'Delete category' %}">- {% trans "Delete category" %}:- <span class="current-category-name">{{category.name}}</span>+ <img src="{% static 'images/icons/trash.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Delete category' %}"+ title="{% trans 'Delete category' %}">+ {% trans "Delete category" %}:+ <span class="current-category-name">{{category.name}}</span></a>{% endwith %}</p>@@ -161,11 +161,11 @@ $(document).ready(function() {<p><a href="{% url 'exercisecategory-add' %}"class="modal-dialog">- <img src="{% static 'images/icons/folder-new.svg' %}"- width="32"- height="32"- alt="{% trans 'Add category' %}"- title="{% trans 'Add category' %}">+ <img src="{% static 'images/icons/folder-new.svg' %}"+ width="32"+ height="32"+ alt="{% trans 'Add category' %}"+ title="{% trans 'Add category' %}">{% trans "Add category" %}</a></p>diff --git a/wger/manager/static/css/jquery-mobile.css b/wger/manager/static/css/jquery-mobile.cssindex 04641be3c..1b72de456 120000--- a/wger/manager/static/css/jquery-mobile.css+++ b/wger/manager/static/css/jquery-mobile.css@@ -1 +1 @@-jquery.mobile-1.3.2-wger.css\ No newline at end of file+jquery.mobile-1.3.2-wger.min.css\ No newline at end of filediff --git a/wger/manager/static/css/workout-manager-mobile.css b/wger/manager/static/css/workout-manager-mobile.cssindex e5d7edede..20c2baabe 100644--- a/wger/manager/static/css/workout-manager-mobile.css+++ b/wger/manager/static/css/workout-manager-mobile.css@@ -147,7 +147,7 @@ div.muscle-background* Headers**************************************************************/h1 {- font-size:250%;+ font-size:220%;}h2 {@@ -579,4 +579,23 @@ header h1{.align-right{text-align: right;+}+++.alert {+ padding: 8px 35px 8px 14px;+ margin-bottom: 20px;+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);+ background-color: #fcf8e3;+ border: 1px solid #fbeed5;+ -webkit-border-radius: 4px;+ -moz-border-radius: 4px;+ border-radius: 4px;+}+.alert,+.alert h4 {+ color: #c09853;+}+.alert h4 {+ margin: 0;}\ No newline at end of filediff --git a/wger/manager/templates/mobile/day/log.html b/wger/manager/templates/mobile/day/log.htmlindex 2f2a11f44..4d6b99abd 100644--- a/wger/manager/templates/mobile/day/log.html+++ b/wger/manager/templates/mobile/day/log.html@@ -6,14 +6,7 @@{% block title %}{% trans "New weight log" %} – {{day.description}}{% endblock %}-{% block header %}-<script type="text/javascript">-$(document).ready(function () {- $( "#id_date" ).datepicker();-});-</script>--{% endblock %}+{% block header %}{% endblock %}{% block content %}<form action="{{form_action}}" method="POST" class="ym-form" style="overflow-x: auto;">diff --git a/wger/manager/templates/mobile/misc/contact.html b/wger/manager/templates/mobile/misc/contact.htmlindex ff2fdaaa3..9b7e9b3c3 100644--- a/wger/manager/templates/mobile/misc/contact.html+++ b/wger/manager/templates/mobile/misc/contact.html@@ -22,7 +22,7 @@ you might also be interested <a href="{{contribute}}">in contributing</a>.{% end<h3>{% trans "Feedback form" %}</h3><p>{% blocktrans %}A simple contact form. Remember thatif you want an answer, you need to include some way to contact you.{% endblocktrans %}</p>-<p><a data-role="button" href="{{feedback}}">{% trans "Open feedback form" %}</a></p>+<p><a data-role="button" href="{{feedback}}" data-ajax="false">{% trans "Open feedback form" %}</a></p><h3>{% trans "Twitter" %}</h3><p>{% blocktrans %}We are also on twitter. Write us and tell us whatdiff --git a/wger/manager/templates/mobile/navigation.html b/wger/manager/templates/mobile/navigation.htmlindex 78ce68d75..97a4b4662 100644--- a/wger/manager/templates/mobile/navigation.html+++ b/wger/manager/templates/mobile/navigation.html@@ -31,7 +31,7 @@<div data-role="collapsible" data-content-theme="c"><h3>{% trans "Dashboard" %}</h3><ul data-role="listview">- <li {% if active_tab == 'user' %}class="active"{% endif %}><a href="{% url 'index' %}">{% trans "Dashboard" %}</a></li>+ <li><a href="{% url 'index' %}">{% trans "Dashboard" %}</a></li></ul></div>@@ -56,7 +56,7 @@<li><a href="{% url 'wger.exercises.views.exercises.overview' %}">{% trans "Exercises" %}</a></li><li><a href="{% url 'muscle-overview' %}" data-ajax="false">{% trans "Muscle overview" %}</a></li>{% if user.is_authenticated and not user.get_profile.is_temporary %}- <li><a href="{% url 'exercise-add' %}" data-ajax="false">{% trans "Add new exercise" %}</a><li>+ <li><a href="{% url 'exercise-add' %}" data-ajax="false">{% trans "Add new exercise" %}</a></li>{% endif %}{% if perms.exercises %}@@ -117,67 +117,71 @@{% endif %}</ul></div>-</div>+ {# #}+ {# Options tab #}+ {# #}+ <div data-role="collapsible" data-content-theme="c">+ <h3>{% trans "Options" %}</h3>+ <ul data-role="listview">+ {# Preferences #}+ {% if user.is_authenticated and not user.get_profile.is_temporary %}+ <li>+ <a href="{% url 'wger.manager.views.user.preferences' %}">+ {% trans "Preferences" %}+ </a>+ </li>+ {% endif %}+ {# Contact #}+ <li><a href="{% url 'contact' %}">{% trans "Get in touch" %}</a></li>+ <li><a href="{% url 'about' %}">{% trans "About" %}</a></li>+ {# Site version #}+ <li><a href="?flavour=full" data-ajax="false">{% trans "Desktop version" %}</a></li>+ {# Language #}+ <li>+ <a href="#language-options"+ data-rel="popup"+ data-position-to="window">{% trans "Language" %}+ </a>+ </li>-<h4>{% trans "Options" %}</h4>-<br>+ {# Logout #}+ {% if user.is_authenticated and not user.get_profile.is_temporary %}+ <li>+ <a href="{% url 'logout' %}" data-ajax="false">{% trans "Logout" %}</a>+ </li>+ {% endif %}+ </ul>+ </div>+</div>-<ul data-role="listview" data-inset="false">- {# #}- {# Login tab #}- {# #}- {% if user.is_authenticated and not user.get_profile.is_temporary %}- <li>- <a href="{% url 'wger.manager.views.user.preferences' %}">- {% trans "Preferences" %}- </a>- </li>- {% else %}- <li>- <a href="{% url 'login' %}" data-ajax="false">{% trans "Login" %}</a>- </li>- <li>- <a href="{% url 'wger.manager.views.user.registration' %}">{% trans "Register" %}</a>- </li>- {% endif %}-- {# #}- {# Contact #}- {# #}- <li><a href="{% url 'contact' %}">{% trans "Get in touch" %}</a></li>- <li><a href="{% url 'about' %}">{% trans "About" %}</a></li>- {# #}- {# Site version #}- {# #}- <li><a href="?flavour=full" data-ajax="false">{% trans "Desktop version" %}</a></li>- {# #}- {# Language #}- {# #}- <li>- <a href="#language-options"- data-rel="popup"- data-position-to="window">{% trans "Language" %}- </a>- </li>- {# #}- {# Logout #}- {# #}- {% if user.is_authenticated and not user.get_profile.is_temporary %}+{# #}+{# Login tab #}+{# #}+{% if not user.is_authenticated or user.get_profile.is_temporary %}+<!--+<h4 style="margin-bottom:0px;">{% trans "Options" %}</h4>++<br>+-->++<ul data-role="listview" data-inset="false" style="margin-top:2em;" data-theme="d"><li>- <a href="{% url 'logout' %}" data-ajax="false">{% trans "Logout" %}</a>+ <a href="{% url 'login' %}" data-ajax="false">{% trans "Login" %}</a>+ </li>+ <li>+ <a href="{% url 'wger.manager.views.user.registration' %}" data-ajax="false">{% trans "Register" %}</a></li>- {% endif %}-</ul>+{% endif %}diff --git a/wger/manager/templates/mobile/schedule/view.html b/wger/manager/templates/mobile/schedule/view.htmlindex bac08bf8a..e503b041d 100644--- a/wger/manager/templates/mobile/schedule/view.html+++ b/wger/manager/templates/mobile/schedule/view.html@@ -14,8 +14,7 @@id="step-{{step.id}}"data-theme="d"data-overlay-theme="a"- class="ui-content"- >+ class="ui-content"><h3>{%trans "Options" %}</h3><a href="{% url 'step-edit' step.id %}"title="{% trans 'Edit' %}"diff --git a/wger/manager/templates/mobile/user/login.html b/wger/manager/templates/mobile/user/login.htmlindex 02a3bcc26..6314e10eb 100644--- a/wger/manager/templates/mobile/user/login.html+++ b/wger/manager/templates/mobile/user/login.html@@ -60,7 +60,9 @@{% block sidebar %}<h3>{% trans "No account?" %}</h3><p>- <a href="{% url 'wger.manager.views.user.registration' %}" data-role="button">+ <a href="{% url 'wger.manager.views.user.registration' %}"+ data-role="button"+ data-ajax="false"><img src="{% static 'images/icons/register.svg' %}"width="32"height="32"