Self hosted FLOSS fitness/workout, nutrition and weight tracker
Use bootstrap for the mobile version as well
Roland Geiderd713c2e04575
diff --git a/wger/core/static/css/bootstrap-custom.css b/wger/core/static/css/bootstrap-custom.cssindex 58657954a..1b167620c 100644--- a/wger/core/static/css/bootstrap-custom.css+++ b/wger/core/static/css/bootstrap-custom.css@@ -134,7 +134,3 @@ fieldset[disabled] .btn-default.active {/*************************************************************** Header**************************************************************/-header a:hover, header a:focus {- color: white;- /*text-decoration: none;*/-}\ No newline at end of filediff --git a/wger/core/static/css/workout-manager-mobile.css b/wger/core/static/css/workout-manager-mobile.cssindex ee3e6ee71..45c477123 100644--- a/wger/core/static/css/workout-manager-mobile.css+++ b/wger/core/static/css/workout-manager-mobile.css@@ -21,6 +21,12 @@***************************************************************/+body {+ background-color: white;+}++body { padding-top: 50px; }+/* Use Open Sans for the body text */.ui-body-c,@@ -687,5 +693,6 @@ div#timer-container div.progress-bar span{bottom: -1px;left: -1px;- background-color: rgb(170, 170, 170);+ background-color: #204A87;+ /*background-color: rgb(170, 170, 170);*/}diff --git a/wger/core/templates/mobile/base.html b/wger/core/templates/mobile/base.htmlindex 87832bfb7..fc1506dd5 100644--- a/wger/core/templates/mobile/base.html+++ b/wger/core/templates/mobile/base.html@@ -1,12 +1,22 @@{% extends "template.html" %}-{% load i18n %}{% block template %}- <div id="current-url" data-current-url="{{request_full_path}}"></div>- <div id="current-language" data-current-language="{{language.short_name}}"></div>+<h2 id="page-title" class="page-header">{% block title %}{% endblock %}</h2>+<div class="row">+ <div class="col-md-8" id="main-content">+ {% if messages and not no_messages %}+ {% for message in messages %}+ <div class="alert {% if message.tags == 'warning'%}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">+ <a href="#" class="close extra-bold" data-dismiss="alert">×</a>+ {{message}}+ </div>+ {% endfor %}+ {% endif %}- <div data-role="content" id="content">- <h2 style="margin-top: 0px;">{% block title %}{% endblock %}</h2>{% block content %}{% endblock %}- {% block sidebar %}{% endblock %}</div>+ <div class="col-md-4" id="main-sidebar">+ {% block sidebar %}+ {% endblock %}+ </div>+</div>{% endblock %}diff --git a/wger/core/templates/mobile/delete.html b/wger/core/templates/mobile/delete.htmldeleted file mode 100644index 48e970890..000000000--- a/wger/core/templates/mobile/delete.html+++ /dev/null@@ -1,41 +0,0 @@-{% extends "base.html" %}-{% load i18n %}-{% load staticfiles %}--<!--- Title--->-{% block title %}{{title}}{% endblock %}---<!--- Main Content--->-{% block content %}-<form action="{{form_action}}"- method="post">- {% csrf_token %}- <img src="{% static 'images/icons/warning.svg' %}"- width="48"- height="48"- class="flexible float-left"- alt="{% trans 'Are you sure you want to delete this? This action cannot be undone.' %}">- <p>{% trans "Are you sure you want to delete this? This action cannot be undone." %}</p>- <p>{{ delete_message }}</p>- <p>- <a href="{% url 'core:index' %}"- data-role="button"- data-rel="back"- data-mini="true">{% trans "Cancel" %}</a>- <input type="submit"- value="{% trans 'Delete' %}"- data-theme="f">- </p>-</form>-{% endblock %}---<!--- Side bar--->-{% block sidebar %}{{sidebar|safe}}{% endblock %}diff --git a/wger/core/templates/mobile/form.html b/wger/core/templates/mobile/form.htmldeleted file mode 100644index 6e851725b..000000000--- a/wger/core/templates/mobile/form.html+++ /dev/null@@ -1,63 +0,0 @@-{% extends "base.html" %}-{% load i18n %}-{% load staticfiles %}-{% load wger_extras %}--{% block header %}--{{ form.media }}--{% if custom_js %}-<script type="text/javascript">- {{custom_js|safe}}-</script>-{% endif %}--{% endblock %}--<!--- Title--->-{% block title %}{{title}}{% endblock %}---<!--- Main Content--->-{% block content %}-<form action="{{form_action}}"- enctype="multipart/form-data"- method="post"- data-ajax="false">-{% csrf_token %}--{% if form.non_field_errors %}-<div class="form-error">- {% for error in form.non_field_errors %}- <p class="form-error-message">{% trans error %}</p>- {% endfor %}-</div>-{% endif %}--<table>- {% for current_field in form_fields %}- {% render_form_field current_field %}- {% endfor %}- <tr>- <td colspan="2">- <a href="{% url 'core:index' %}"- data-role="button"- data-rel="back"- data-mini="true">{% trans "Cancel" %}</a>- <input type="submit" value="{{submit_text}}" id="form-save">- </td>- </tr>-</table>-</form>-{% endblock %}---<!--- Side bar--->-{% block sidebar %}{% if sidebar %}{% include sidebar %}{% endif %}{% endblock %}diff --git a/wger/core/templates/mobile/index.html b/wger/core/templates/mobile/index.htmlindex 64e132334..3e2807a1f 100644--- a/wger/core/templates/mobile/index.html+++ b/wger/core/templates/mobile/index.html@@ -6,143 +6,136 @@{% block content %}-<div data-role="popup"- id="current-workout-{{request_full_path|slugify}}"- data-overlay-theme="a">- <div data-role="header">- <h3>{% trans "Current workout" %}</h3>- </div>- <div role="main" class="ui-content">- {% if current_workout %}- <ul data-role="listview" data-inset="false" style="margin-bottom:1em;" data-theme="b">- <li>- <a href="{% url 'workout-view' current_workout.id %}"-- data-mini="true"- data-ajax="false">- {{ current_workout }}- </a>- </li>- </ul>-- <ul>- {% for day, exercises, is_workout in weekdays %}- <li>- <span {% if not is_workout %}class="dimmed"{% endif%}>- {{ day }}: {{ exercises }}- </span>- </li>- {% endfor %}- </ul>- {% if schedule %}- <p>- → {% trans "This workout is part of a schedule:" %}- <a href="{{schedule.get_absolute_url}}">{{schedule.name}}</a>- </p>- {% endif %}- {% endif %}+<div class="modal fade" id="current-workout">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title">{% trans "Current workout" %}</h4>+ {% if current_workout %}+ <h5><a href="{% url 'workout-view' current_workout.id %}">{{ current_workout }}</a></h5>+ {% endif %}+ </div>+ <div class="modal-body">+ {% if current_workout %}++ <ul class="list-group">+ {% for day, exercises, is_workout in weekdays %}+ <li class="list-group-item">+ <span {% if not is_workout %}class="dimmed"{% endif%}>+ {{ day }}: {{ exercises }}+ </span>+ </li>+ {% endfor %}+ </ul>+ {% if schedule %}+ <p>+ → {% trans "This workout is part of a schedule:" %}+ <a href="{{schedule.get_absolute_url}}">{{schedule.name}}</a>+ </p>+ {% endif %}+ {% endif %}+ </div>+ </div></div></div>-<div data-role="popup"- id="current-nutrition-plan-{{request_full_path|slugify}}"- data-overlay-theme="a">- <div data-role="header">- <h4>{% trans "Current nutrition plan" %}</h4>- </div>- <div role="main" class="ui-content">- {% if plan %}- <ul data-role="listview" data-inset="false" style="margin-bottom:1em;" data-theme="b">- <li>- <a href="{% url 'nutrition-view' plan.id %}"- data-mini="true"- data-ajax="false">- {{ plan }}- </a>- </li>- </ul>-- <ul>- <li>- {% trans "Energy" %}: {{nutritional_info.total.energy|floatformat}} kcal- </li>- <li>- {% trans "Protein" %}: {{nutritional_info.total.protein|floatformat}} g- </li>- <li>- {% trans "Carbohydrates" %}: {{nutritional_info.total.carbohydrates|floatformat}} g- </li>- <li>- {% trans "Fat" %}: {{nutritional_info.total.fat|floatformat}} g- </li>- </ul>-- {% if weight %}- <p>- {% trans "Your current weight is: "%} <strong>{{weight.weight|floatformat}} kg.</strong>- </p>- {% endif %}- {% endif %}+<div class="modal fade" id="current-nutrition-plan">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title">{% trans "Current nutrition plan" %}</h4>+ {% if plan %}+ <h5><a href="{% url 'nutrition-view' plan.id %}">{{ plan }}</a></h5>+ {% endif %}+ </div>+ <div class="modal-body">+ {% if plan %}+ <ul class="list-group">+ <li class="list-group-item">+ {% trans "Energy" %}: {{nutritional_info.total.energy|floatformat}} kcal+ </li>+ <li class="list-group-item">+ {% trans "Protein" %}: {{nutritional_info.total.protein|floatformat}} g+ </li>+ <li class="list-group-item">+ {% trans "Carbohydrates" %}: {{nutritional_info.total.carbohydrates|floatformat}} g+ </li>+ <li class="list-group-item">+ {% trans "Fat" %}: {{nutritional_info.total.fat|floatformat}} g+ </li>+ </ul>++ {% if weight %}+ <p>+ {% trans "Your current weight is: "%} <strong>{{weight.weight|floatformat}} kg.</strong>+ </p>+ {% endif %}++ {% endif %}+ </div>+ </div></div></div>-{% if not user.is_authenticated or user.userprofile.is_temporary %}-<p><em>{% trans "You are using a guest account, data entered will be deleted after a week."%}</em></p>-{% endif %}--<div data-role="popup"- id="timer-current-workout-{{request_full_path|slugify}}"- data-overlay-theme="a">- <div data-role="header">- <h4>{% trans "Start gym mode" %}</h4>- </div>-- <div role="main" class="ui-content">- <p>{% blocktrans %}Use the gym mode to+<div class="modal fade" id="timer-current-workout">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title">{% trans "Start gym mode" %}</h4>+ <h5></h5>+ </div>+ <div class="modal-body">+ <p>{% blocktrans %}Use the gym mode tostart an interactive training session. If you enter lifted weights, they willbe added to your workout log. A timer between sets helps you keep track of thepauses you do.{% endblocktrans %}</p>- <p>- <strong>{% trans "Tip:" %}</strong>- {% blocktrans %}You can deactivate the timer or set+ <p>+ <strong>{% trans "Tip:" %}</strong>+ {% blocktrans %}You can deactivate the timer or setits default duration in your settings.{% endblocktrans %}- </p>-- <ul data-role="listview" data-inset="true" style="margin-bottom:1em;">- {% if current_workout %}- {% for day in current_workout.canonical_representation.day_list %}- <li>- {% if day.set_list|length > 0 %}<a href="{% url 'workout-timer' day.obj.pk %}" data-ajax="false">{% endif %}- {{day.obj.description}}- {% if day.set_list|length > 0 %}</a>{% endif %}- </li>- {% empty %}- <li>- <a href="{% url 'day-add' current_workout.id %}" data-ajax="false">- {% trans "No days for this workout." %}<br>- {% trans "Add training day." %}+ </p>++ <div class="list-group">+ {% if current_workout %}+ {% for day in current_workout.canonical_representation.day_list %}+ {% if day.set_list|length > 0 %}+ <a href="{% url 'workout-timer' day.obj.pk %}" class="list-group-item">+ {{day.obj.description}}+ </a>+ {% else %}+ <span class="list-group-item">{{day.obj.description}}</span>+ {% endif %}+ {% empty %}+ <a href="{% url 'day-add' current_workout.id %}" class="list-group-item">+ {% trans "No days for this workout." %}<br>+ {% trans "Add training day." %}+ </a>+ {% endfor %}+ {% else %}+ <a href="{% url 'workout-add' %}" class="list-group-item">+ {% trans "No workouts found." %}<br>+ {% trans "Add one now." %}</a>- </li>- {% endfor %}- {% else %}- <li>- <a href="{% url 'workout-add' %}" data-ajax="false">- {% trans "No workouts found." %}<br>- {% trans "Add one now." %}- </a>- </li>- {% endif %}- </ul>+ {% endif %}+ </div>+ </div>+ </div></div></div>-<a href="#timer-current-workout-{{request_full_path|slugify}}"- data-role="button"- data-rel="popup">++++<a href="#timer-current-workout"+ data-toggle="modal"+ class="btn btn-default btn-block"><img src="{% static 'images/icons/play.svg' %}"width="32"height="32"@@ -152,14 +145,12 @@ its default duration in your settings.{% endblocktrans %}{% trans "Start current workout" %}</a>--<div class="ui-grid-a">- <div class="ui-block-a">+<div class="row" style="margin-top: 1em;">+ <div class="col-xs-6" style="padding-right: 7px;">{% if current_workout %}- <a href="#current-workout-{{request_full_path|slugify}}"- data-role="button"- data-rel="popup"- data-position-to="window">+ <a href="#current-workout"+ data-toggle="modal"+ class="btn btn-default btn-block"><img src="{% static 'images/icons/list.svg' %}"width="32"height="32"@@ -169,7 +160,7 @@ its default duration in your settings.{% endblocktrans %}{{current_workout}}</a>{% else %}- <a href="{% url 'workout-add' %}" data-role="button">+ <a href="{% url 'workout-add' %}" class="btn btn-default btn-block"><img src="{% static 'images/icons/add.svg' %}"width="32"height="32"@@ -180,8 +171,8 @@ its default duration in your settings.{% endblocktrans %}</a>{% endif %}</div>- <div class="ui-block-b">- <a href="{% url 'workout-calendar' %}" data-role="button" data-ajax="false">+ <div class="col-xs-6" style="padding-left: 7px;">+ <a href="{% url 'workout-calendar' %}" class="btn btn-default btn-block"><img src="{% static 'images/icons/calendar.svg' %}"width="32"height="32"@@ -190,13 +181,16 @@ its default duration in your settings.{% endblocktrans %}<br>{% trans "Calendar" %}</a>+</div>- <div class="ui-block-a">+</div>++<div class="row" style="margin-top: 1em;">+ <div class="col-xs-6" style="padding-right: 7px;">{% if plan %}- <a href="#current-nutrition-plan-{{request_full_path|slugify}}"- data-role="button"- data-rel="popup"- data-position-to="window">+ <a href="#current-nutrition-plan"+ data-toggle="modal"+ class="btn btn-default btn-block"><img src="{% static 'images/icons/list.svg' %}"width="32"height="32"@@ -206,7 +200,7 @@ its default duration in your settings.{% endblocktrans %}{{plan}}</a>{% else %}- <a href="{% url 'nutrition-add' %}" data-role="button">+ <a href="{% url 'nutrition-add' %}" class="btn btn-default btn-block"><img src="{% static 'images/icons/add.svg' %}"width="32"height="32"@@ -217,31 +211,35 @@ its default duration in your settings.{% endblocktrans %}</a>{% endif %}</div>- <div class="ui-block-b">-- <a href="{% url 'weight-overview' %}" data-role="button" data-ajax="false">- <img src="{% static 'images/icons/statistics.svg' %}"+ <div class="col-xs-6" style="padding-left: 7px;">+ <a href="{% url 'core:preferences' %}" class="btn btn-default btn-block">+ <img src="{% static 'images/icons/preferences.svg' %}"width="32"height="32"- alt="{% trans 'Weight overview' %}"- title="{% trans 'Weight overview' %}">+ alt="{% trans 'Preferences' %}"+ title="{% trans 'Preferences' %}"><br>- {% trans "Weight overview" %}+ {% trans "Preferences" %}</a></div>- <div class="ui-block-a">- <a href="{% url 'core:preferences' %}" data-role="button">- <img src="{% static 'images/icons/preferences.svg' %}"+</div>+++<div class="row" style="margin-top: 1em;">+ <div class="col-xs-6" style="padding-right: 7px;">+ <a href="{% url 'weight-overview' %}" class="btn btn-default btn-block">+ <img src="{% static 'images/icons/statistics.svg' %}"width="32"height="32"- alt="{% trans 'Preferences' %}"- title="{% trans 'Preferences' %}">+ alt="{% trans 'Weight overview' %}"+ title="{% trans 'Weight overview' %}"><br>- {% trans "Preferences" %}+ {% trans "Weight overview" %}</a></div>- <div class="ui-block-b">- <a href="{% url 'core:contact' %}" data-role="button">++ <div class="col-xs-6" style="padding-left: 7px;">+ <a href="{% url 'core:contact' %}" class="btn btn-default btn-block"><img src="{% static 'images/icons/mail.svg' %}"width="32"height="32"diff --git a/wger/core/templates/mobile/navigation.html b/wger/core/templates/mobile/navigation.htmlindex 39fef02ae..69ff8fc59 100644--- a/wger/core/templates/mobile/navigation.html+++ b/wger/core/templates/mobile/navigation.html@@ -1,186 +1,227 @@{% load i18n %}{% load cache %}{% load wger_extras %}---<div data-role="popup"- id="language-options-{{request_full_path|slugify}}"- data-overlay-theme="a">- <div data-role="header">- <h3>{% trans "Language" %}</h3>- </div>- <div role="main" class="ui-content">- {% for language in languages %}- {% language_select language %}- {% endfor %}+<div class="modal fade" id="language-options">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title">{% trans "Language" %}</h4>+ </div>+ <div class="modal-body">+ <ul class="list-group">+ {% for language in languages %}+ {% language_select language %}+ {% endfor %}+ </ul>+ </div>+ </div></div></div>-{# #}-{# Close button for panel #}-{# #}-<ul data-role="listview">- <li data-icon="delete" data-theme="a">- <a href="#" data-rel="close">{% trans "Close" %}</a>- </li>- <li data-theme="c" style="margin-top:1.5em;">- <a href="{% url 'core:index' %}">{% trans "Dashboard" %}</a>- </li>-</ul>---<div data-role="collapsible-set" data-inset="false" style="margin-top:1em;">-- {# #}- {# Workout tab #}- {# #}- <div data-role="collapsible" data-content-theme="d">- <h3>{% trans "Workouts" %}</h3>- <ul data-role="listview">- <li><a href="{% url 'workout-overview' %}" rel="nofollow">{% trans "Workouts" %}</a></li>- <li><a href="{% url 'workout-calendar' %}" rel="nofollow" data-ajax="false">{% trans "Calendar" %}</a></li>- <li><a href="{% url 'schedule-overview' %}" rel="nofollow">{% trans "Workouts schedules" %}</a></li>- </ul>- </div>-- {# #}- {# Exercises tab #}- {# #}- <div data-role="collapsible" data-content-theme="d">- <h3>{% trans "Exercises" %}</h3>- <ul data-role="listview" data-divider-theme="a">- <li><a href="{% url 'exercise-overview' %}">{% trans "Exercises" %}</a></li>- <li><a href="{% url 'muscle-overview' %}" data-ajax="false">{% trans "Muscle overview" %}</a></li>- <li><a href="{% url 'equipment-overview' %}">{% trans "Equipment overview" %}</a></li>- {% if user.is_authenticated and not user.userprofile.is_temporary %}- <li><a href="{% url 'exercise-add' %}" data-ajax="false">{% trans "Add new exercise" %}</a></li>- {% endif %}-- {% if perms.exercises %}- <li data-role="list-divider">{% trans "Administration" %}</li>- <li><a href="{% url 'exercise-pending' %}">{% trans "Exercises pending review" %}</a></li>- <li><a href="{% url 'equipment-list' %}">{% trans "Equipment" %}</a></li>- {% endif %}- </ul>- </div>-- {# #}- {# Weight tab #}- {# #}- <div data-role="collapsible" data-content-theme="d">- <h3>{% trans "Weight" %}</h3>- <ul data-role="listview">- <li><a href="{% url 'weight-overview' %}" rel="nofollow" data-ajax="false">{% trans "Weight overview" %}</a></li>- <li><a href="{% url 'weight-add' %}" rel="nofollow" >{% trans "Add weight entry" %}</a></li>- </ul>- </div>-- {# #}- {# Nutrition tab #}- {# #}- <div data-role="collapsible" data-content-theme="d">- <h3>{% trans "Nutrition" %}</h3>- <ul data-role="listview" data-divider-theme="a">- <li><a href="{% url 'nutrition-overview' %}" rel="nofollow">{% trans "Nutrition plans" %}</a></li>- <li><a href="{% url 'ingredient-list' %}">{% trans "Ingredient overview" %}</a></li>- <li><a href="{% url 'bmi-view' %}" rel="nofollow" data-ajax="false">{% trans "BMI calculator" %}</a></li>- <li><a href="{% url 'calories-calculator' %}" rel="nofollow" data-ajax="false">{% trans "Daily calories calculator" %}</a></li>- {% if perms.exercises %}- <li data-role="list-divider">{% trans "Administration" %}</li>- <li><a href="{% url 'weight-unit-list' %}">{% trans "Ingredient weight units" %}</a></li>- <li><a href="{% url 'ingredient-pending' %}">{% trans "Ingredients pending review" %}</a></li>- {% endif %}- </ul>- </div>-- {# #}- {# Software tab #}- {# #}- <div data-role="collapsible" data-content-theme="d">- <h3>{% trans "About this software" %}</h3>- <ul data-role="listview" data-divider-theme="a">- <li><a href="{% url 'software:features' %}">{% trans "Features" %}</a></li>- <li><a href="{% url 'software:contribute' %}">{% trans "Contribute!" %} </a></li>- <li><a href="{% url 'software:issues' %}">{% trans "Problems and wishes" %} </a></li>- <li data-role="list-divider">{% trans "Developers" %}</li>- <li><a href="{% url 'software:code' %}">{% trans "Get the code" %} </a></li>- <li><a href="{% url 'software:api' %}">{% trans "REST API" %} </a></li>- <li><a href="{% url 'software:license' %}">{% trans "License" %} </a></li>- <li><a href="{% url 'software:changelog' %}">{% trans "Changelog" %} </a></li>- <li><a href="https://github.com/rolandgeider/wger">{% trans "Github" %} </a></li>- <li><a href="https://www.transifex.com/projects/p/wger-workout-manager/">{% trans "Translate with Transifex" %} </a></li>- {% if perms.exercises %}- <li data-role="list-divider">{% trans "Administration" %}</li>- <li><a href="{% url 'config:language-overview' %}">{% trans "Languages" %} </a></li>- <li><a href="{% url 'core:license-list' %}">{% trans "Licenses" %} </a></li>- {% endif %}- </ul>- </div>-- {# #}- {# Options tab #}- {# #}- <div data-role="collapsible" data-content-theme="d">- <h3>{% trans "Options" %}</h3>- <ul data-role="listview">-- {# Preferences #}- {% if user.is_authenticated and not user.userprofile.is_temporary %}- <li>- <a href="{% url 'core:preferences' %}">- {% trans "Preferences" %}- </a>- </li>- {% endif %}-- {# Contact #}- <li><a href="{% url 'core:contact' %}">{% trans "Get in touch" %}</a></li>- <li><a href="{% url 'core:about' %}">{% trans "About" %}</a></li>-- {# Site version #}- <li><a href="?flavour=full" data-ajax="false" rel="nofollow">{% trans "Desktop version" %}</a></li>-- {# Language #}- <li>- <a href="#language-options-{{request_full_path|slugify}}"- data-rel="popup"- data-position-to="window">{% trans "Language" %}- </a>- </li>-- {# Logout #}- {% if user.is_authenticated and not user.userprofile.is_temporary %}- <li>- <a href="{% url 'core:logout' %}" data-ajax="false" class="browserid-logout">{% trans "Logout" %}</a>- </li>- {% endif %}- </ul>+<nav id="nav">+ <div>+ <div class="navbar navbar-default navbar-fixed-top ">+ <div class="container">+ <div class="navbar-header">+ <a class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar-navigation">+ <span class="icon-bar"></span>+ <span class="icon-bar"></span>+ <span class="icon-bar"></span>+ </a>+ </div>+ <div class="navbar-collapse collapse" id="main-navbar-navigation">+ <ul class="nav navbar-nav">+ {# #}+ {# User tab #}+ {# #}+ <li {% if active_tab == 'user' %}class="active"{% endif %}><a href="{% url 'core:index' %}">{% trans "Dashboard" %}</a></li>+++ {# #}+ {# Workout tab #}+ {# #}+ <li class="dropdown {% if active_tab == 'workout' %}active{% endif %}">+ <a href="{% url 'workout-overview' %}"+ rel="nofollow"+ class="dropdown-toggle"+ data-toggle="dropdown">{% trans "Workouts" %} <b class="caret"></b></a>+ <ul class="dropdown-menu">+ <li><a href="{% url 'workout-overview' %}" rel="nofollow">{% trans "Workouts" %}</a></li>+ <li><a href="{% url 'workout-calendar' %}" rel="nofollow">{% trans "Calendar" %}</a></li>+ <li><a href="{% url 'schedule-overview' %}" rel="nofollow">{% trans "Workouts schedules" %}</a></li>+ </ul>+ </li>+++ {# #}+ {# Exercises tab #}+ {# #}+ <li class="dropdown {% if active_tab == 'exercises' %}active{% endif %}">+ <a href="{% url 'exercise-overview' %}"+ class="dropdown-toggle"+ data-toggle="dropdown">{% trans "Exercises" %} <b class="caret"></b></a>+ <ul class="dropdown-menu">+ <li><a href="{% url 'exercise-overview' %}">{% trans "Exercises" %}</a></li>+ <li><a href="{% url 'muscle-overview' %}">{% trans "Muscle overview" %}</a></li>+ <li><a href="{% url 'equipment-overview' %}">{% trans "Equipment overview" %}</a></li>+ {% if user.is_authenticated and not user.userprofile.is_temporary %}+ <li class="divider"></li>+ <li><a href="{% url 'exercise-add' %}">{% trans "Add new exercise" %}</a><li>+ {% endif %}++ {% cache cache_timeout user-admin-exercises user.id language.id %}+ {% if perms.exercises %}+ <li class="divider"></li>+ <li class="nav-header">{% trans "Administration" %}</li>+ <li><a href="{% url 'exercise-pending' %}">{% trans "Exercises pending review" %}</a></li>+ <li><a href="{% url 'equipment-list' %}">{% trans "Equipment" %}</a></li>+ {% endif %}+ {% endcache %}+ </ul>+ </li>+++ {# #}+ {# Weight tab #}+ {# #}+ <li class="dropdown{% if active_tab == 'weight' %} active{% endif %}">++ <a href="{% url 'weight-overview' %}"+ class="dropdown-toggle"+ data-toggle="dropdown"+ rel="nofollow">{% trans "Weight" %} <b class="caret"></b></a>+ <ul class="dropdown-menu">+ <li><a href="{% url 'weight-overview' %}" rel="nofollow">{% trans "Weight overview" %}</a></li>+ <li><a href="{% url 'weight-add' %}" rel="nofollow">{% trans "Add weight entry" %}</a></li>+ </ul>+ </li>+++ {# #}+ {# Nutrition tab #}+ {# #}+ <li class="dropdown {% if active_tab == 'nutrition' %}active{% endif %}">+ <a href="{% url 'nutrition-overview' %}"+ class="dropdown-toggle"+ data-toggle="dropdown"+ rel="nofollow">{% trans "Nutrition" %} <b class="caret"></b></a>+ <ul class="dropdown-menu">+ <li><a href="{% url 'nutrition-overview' %}" rel="nofollow">{% trans "Nutrition plans" %}</a></li>+ <li><a href="{% url 'ingredient-list' %}">{% trans "Ingredient overview" %}</a></li>+ <li><a href="{% url 'bmi-view' %}" rel="nofollow">{% trans "BMI calculator" %}</a></li>+ <li><a href="{% url 'calories-calculator' %}" rel="nofollow">{% trans "Daily calories calculator" %}</a></li>+ {% cache cache_timeout user-admin-ingredients user.id language.id %}+ {% if perms.exercises %}+ <li class="divider"></li>+ <li class="nav-header">{% trans "Administration" %}</li>+ <li><a href="{% url 'weight-unit-list' %}">{% trans "Ingredient weight units" %}</a></li>+ <li><a href="{% url 'ingredient-pending' %}">{% trans "Ingredients pending review" %}</a></li>+ {% endif %}+ {% endcache %}+ </ul>+ </li>+++ {# #}+ {# Software tab #}+ {# #}+ <li class="dropdown {% if active_tab == 'software' %}active{% endif %}">+ <a href=""+ class="dropdown-toggle"+ data-toggle="dropdown">{% trans "About this software" %} <b class="caret"></b></a>+ <ul class="dropdown-menu">+ <li><a href="{% url 'software:features' %}">{% trans "Features" %}</a></li>+ <li><a href="{% url 'software:contribute' %}">{% trans "Contribute!" %} </a></li>+ <li><a href="{% url 'software:issues' %}">{% trans "Problems and wishes" %} </a></li>+ <li class="divider"></li>+ <li><a href="{% url 'software:code' %}">{% trans "Get the code" %} </a></li>+ <li><a href="{% url 'software:api' %}">{% trans "REST API" %} </a></li>+ <li><a href="{% url 'software:license' %}">{% trans "License" %} </a></li>+ <li><a href="{% url 'software:changelog' %}">{% trans "Changelog" %} </a></li>+ <li><a href="https://github.com/rolandgeider/wger">{% trans "Github" %} </a></li>+ <li><a href="https://www.transifex.com/projects/p/wger-workout-manager/">{% trans "Translate with Transifex" %} </a></li>+ {% cache cache_timeout user-admin-software user.id language.id %}+ {% if perms.exercises %}+ <li class="divider"></li>+ <li class="nav-header">{% trans "Administration" %}</li>+ <li><a href="{% url 'config:language-overview' %}">{% trans "Languages" %} </a></li>+ <li><a href="{% url 'core:license-list' %}">{% trans "Licenses" %} </a></li>+ {% endif %}+ {% endcache %}+ </ul>+ </li>++ {# #}+ {# Options and contact #}+ {# #}+ <li class="dropdown">+ <a href=""+ class="dropdown-toggle"+ data-toggle="dropdown">{% trans "Options" %} <b class="caret"></b></a>+ <ul class="dropdown-menu">++ {# Contact #}+ <li><a href="{% url 'core:contact' %}">{% trans "Get in touch" %}</a></li>+ <li><a href="{% url 'core:about' %}">{% trans "About" %}</a></li>++ {# Site version #}+ <li><a href="?flavour=full" data-ajax="false" rel="nofollow">{% trans "Desktop version" %}</a></li>++ {# Language #}+ <li class="dropdown">+ <a href="#language-options" data-toggle="modal">{% trans "Language" %}</a>+ </li>+ </ul>+ </li>+ </ul>+++ {# #}+ {# Options tab #}+ {# #}+ {% if not user.is_authenticated or user.userprofile.is_temporary %}+ <ul class="nav navbar-nav pull-right">+ <li class="divider-vertical"></li>+ <li class="dropdown">+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">+ {% trans "Login" %} / {% trans "Register" %}+ <b class="caret"></b>+ </a>+ <ul class="dropdown-menu">+ <li><a href="{% url 'core:login' %}">{% trans "Login" %}</a></li>+ <li><a href="{% url 'core:registration' %}">{% trans "Register" %}</a></li>+ <li><a href="{% url 'core:password_reset' %}">{% trans "Reset password" %}</a></li>+ </ul>+ </li>+ </ul>+ {% else %}+ <ul class="nav navbar-nav navbar-right">+ <li class="dropdown">+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">+ {% if user.email %}+ {{user.email}}+ {% else %}+ {{user.username}}+ {% endif %}+ <b class="caret"></b>+ </a>+ <ul class="dropdown-menu">+ <li>+ <a href="{% url 'core:preferences' %}">{% trans "My preferences" %}</a>+ </li>+ <li>+ <a href="{% url 'core:logout' %}" class="browserid-logout">+ <span class="glyphicon glyphicon-log-out"></span>+ {% trans "Logout" %}+ </a>+ </li>+ </ul>+ </li>+ </ul>+ {% endif %}+ </div><!--/.nav-collapse -->+ </div>+ </div></div>-</div>------{# #}-{# Login tab #}-{# #}-{% if not user.is_authenticated or user.userprofile.is_temporary %}-<!---<h4 style="margin-bottom:0px;">{% trans "Options" %}</h4>--<br>--->--<ul data-role="listview" data-inset="false" style="margin-top:2em;" data-theme="c">- <li>- <a href="{% url 'core:login' %}">{% trans "Login" %}</a>- </li>- <li>- <a href="{% url 'core:registration' %}" data-ajax="false">{% trans "Register" %}</a>- </li>-</ul>-{% endif %}---+</nav>diff --git a/wger/core/templates/mobile/template.html b/wger/core/templates/mobile/template.htmlindex 513645890..0aaa94e8e 100644--- a/wger/core/templates/mobile/template.html+++ b/wger/core/templates/mobile/template.html@@ -1,5 +1,5 @@<!DOCTYPE html>-{% load i18n %}{% load staticfiles %}{% load cache %}{% load browserid %}{% load compress %}+{% load i18n %}{% load staticfiles %}{% load cache %}{% load browserid %}{% load compress %}{% load wger_extras %}<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />@@ -29,20 +29,20 @@<link rel="icon" href="{% static 'images/favicon.png' %}" type="image/png">- {% compress css %}- <link rel="stylesheet" type="text/css" href="{% static 'css/jquery.mobile.icons.min.css' %}">- <link rel="stylesheet" type="text/css" href="{% static 'css/jquery-mobile.css' %}">- <link rel="stylesheet" type="text/css" href="{% static 'css/jquery-mobile.structure.css' %}">+ {% compress tcss %}+ <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.min.css' %}">+ <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-custom.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'css/workout-manager-common.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'css/workout-manager-mobile.css' %}">{% endcompress %}{% browserid_css %}{% compress js %}+<script src="{% static 'js/jquery.js' %}" type="text/javascript"></script>- <script src="{% static 'js/jquerymobile-conf.js' %}" type="text/javascript"></script><script src="{% static 'js/jquery-ui.js' %}" type="text/javascript"></script>- <script src="{% static 'js/jquery-mobile.js' %}" type="text/javascript"></script>+ <script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>+ <script src="{% static 'js/bootstrap-datepicker/bootstrap-datepicker.min.js' %}" type="text/javascript"></script><script src="{% static 'js/d3.js' %}"></script><script src="{% static 'js/workout-manager.js' %}" type="text/javascript"></script><script src="{% static 'js/workout-manager-mobile.js' %}" type="text/javascript"></script>@@ -57,92 +57,105 @@</head><body>{% browserid_info %}-<div data-role="page" id="page-{{request_full_path|slugify}}" data-url="{{request_full_path}}" data-theme="c">- {% block scripts %}{% endblock %}- {% if not user.is_authenticated or user.userprofile.is_temporary %}- <div data-role="popup" data-overlay-theme="a" id="popupGuestUser-{{request_full_path|slugify}}">- <div data-role="header" >- <h3>{% trans "Info" %}</h3>+<header>+ <!--+ <div class="container">+ <div class="row">+ <div class="col-md-offset-9 col-md-3">+ <a href="{% url 'core:contact' %}">{% trans "Get in touch" %}</a>+ |++ {# #}+ {# Render the links to the other languages #}+ {# #}+ <div class="btn-group">+ <button type="button" class="btn btn-primary dropdown-toggle btn-xs" data-toggle="dropdown">+ <img src="/static/images/icons/flag-{{language.short_name}}.svg"+ width="18"+ height="11"+ alt="{% trans language.full_name %}"+ title="{% trans language.full_name %}"+ style="border: 1px solid #151515;">+ {{language.full_name}} <span class="caret"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ {% for language in languages %}+ {% language_select language %}+ {% endfor %}+ <li class="divider"></li>+ <li>+ <a href="https://www.transifex.com/projects/p/wger-workout-manager/">+ <span class="glyphicon glyphicon-plus"></span>+ {% trans "Translate" %}+ </a>+ </li>+ </ul>+ </div>+ </div>+ </div>+ </div>+ -->+ <!--+ <div class="container">+ <span class="name">wger</span>+ </div>+ -->+</header>+{% include 'navigation.html' %}+<div id="main">+ <div class="container">+ <div class="modal fade" id="wger-ajax-info" tabindex="-1" role="dialog">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title" id="ajax-info-title">Modal title</h4>+ </div>+ <div class="modal-body" id="ajax-info-content">+ </div>+ <div class="modal-footer">+ <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>+ </div>+ </div></div>- <div role="main" class="ui-content">+ </div>+ <div id="current-url" data-current-url="{{request_full_path}}"></div>+ <div id="current-language" data-current-language="{{language.short_name}}"></div>++ {% if not user.is_authenticated or user.userprofile.is_temporary %}+ <div class="abox ainfo" style="padding:0.6em; margin: 0em 0em 1em 0em;text-align:center;font-size:95%;">{% trans "You are using a guest account, data entered will be deleted after a week."%}- <a href="{% url 'core:registration' %}"- rel="nofollow"- data-role="button"- data-mini="true"- data-theme="c"- data-ajax="false">{% trans "Register" %} »</a>{% if not has_demo_data %}- <a href="{% url 'core:demo-entries' %}"- rel="nofollow"- data-role="button"- data-mini="true"- data-theme="e"- data-ajax="false">{% trans "Create some demo entries" %} »</a>+ <a href="{% url 'core:demo-entries' %}" rel="nofollow" class="btn btn-success btn-xs">{% trans "Create some demo entries" %} »</a>{% endif %}</div>- </div>- {% endif %}- <header data-role="header" data-theme="b" data-position="fixed">- <h1>wger</h1>- <a href="#main-panel-navigation"- class="ui-icon-nodisc"- data-rel="popup"- data-theme="a"- data-icon="bars"- data-iconshadow="false">{% trans "Menu" %}</a>- {% if not user.is_authenticated or user.userprofile.is_temporary %}- <a href="#popupGuestUser-{{request_full_path|slugify}}"- class="ui-icon-nodisc"- data-rel="popup"- data-inline="true"- data-transition="pop"- data-theme="a"- data-icon="info"- data-iconshadow="false">{% trans "Info" %}</a>- {% endif %}- </header>-- <div data-role="panel" id="main-panel-navigation" data-display="overlay">- {% include 'navigation.html' %}+ {% endif %}+ {% block template %}{% endblock %}</div>+</div>- <div class="invisible" id="ajax-info"></div>--- {% block template %}{% endblock %}-- <div data-role="navbar">- <ul>- <li>- {% if not user.is_authenticated %}- <a href="{% url 'core:login' %}" data-ajax="false">{% trans "Login" %}</a>- {% else %}- <a href="{% url 'core:index' %}">{% trans "Dashboard" %}</a>- {% endif %}- </li>-- {% if user.is_authenticated %}- <li>- <a href="{% url 'workout-overview' %}">{% trans "Workouts" %}</a>- </li>- <li>- <a href="{% url 'nutrition-overview' %}">{% trans "Nutrition" %}</a>- </li>- {% endif %}-- {% if not user.is_authenticated %}- <li>- <a href="{% url 'software:features' %}">{% trans "Features" %}</a>- </li>- {% endif %}- </ul>+<div class="btn-group btn-group-justified" style="margin-top: 1em;">+ {% if user.is_authenticated %}+ <div class="btn-group">+ <a href="{% url 'core:index' %}" {% auto_link_css flavour %}>{% trans "Dashboard" %}</a></div>--</div><!-- /page -->+ <div class="btn-group">+ <a href="{% url 'workout-overview' %}" {% auto_link_css flavour %}>{% trans "Workouts" %}</a>+ </div>+ <div class="btn-group">+ <a href="{% url 'nutrition-overview' %}" {% auto_link_css flavour %}>{% trans "Nutrition" %}</a>+ </div>+ {% else %}+ <div class="btn-group">+ <a href="{% url 'core:login' %}" {% auto_link_css flavour %}>{% trans "Login" %}</a>+ </div>+ <div class="btn-group">+ <a href="{% url 'software:features' %}" {% auto_link_css flavour %}>{% trans "Features" %}</a>+ </div>+ {% endif %}+</div><script src="https://login.persona.org/include.js" type="text/javascript"></script>-</body></html>diff --git a/wger/core/templates/mobile/user/login.html b/wger/core/templates/mobile/user/login.htmldeleted file mode 100644index e1fd895ac..000000000--- a/wger/core/templates/mobile/user/login.html+++ /dev/null@@ -1,83 +0,0 @@-{% extends "base.html" %}-{% load browserid %}-{% load i18n %}-{% load staticfiles %}-{% load wger_extras %}--{% block title %} {% trans "Login" %}{% endblock %}---{% block header %}{% endblock %}--{% block content %}-<form action="{% url 'core:login' %}"- method="post"- data-ajax="false">- {% csrf_token %}- <div class="ym-fbox-text ym-error">- <div class="ym-message">- {{ form.non_field_errors }}- </div>- </div>- <input type="hidden" name="next" value="{{next}}">-<table>-{% render_form_field form.username %}-{% render_form_field form.password %}- <tr>- <td colspan="2">- <input type="submit" value="{% trans 'Login' %}" id="form-save">- </td>- </tr>-</table>-</form>--{% if not hide_persona %}-<div style="text-align:center;">-<h3>— {% trans "or" %} —</h3>- <div style="padding-top:1em;"></div>- <a id="browserid-login"- href="#"- class="browserid-login persona-button dark browserid-login"- data-site-name="Workout Manager"- data-next="/">- <span>{% trans "Sign in with your Email" %}</span>- </a>-</div>--<p>- {% blocktrans %}Persona (BrowserID) replaces multiple passwords, you don't- need to remember a new password for this site. For more information, please- take a look at the <a href="https://login.persona.org/" target="_blank">the- Persona website</a>.{% endblocktrans %}-</p>-{% endif %}--{% endblock %}---{% block sidebar %}-<h3>{% trans "No account?" %}</h3>-<p>- <a href="{% url 'core:registration' %}"- data-role="button"- data-ajax="false">- <img src="{% static 'images/icons/register.svg' %}"- width="32"- height="32"- alt="{% trans 'Register' %}">- {% trans "Register" %}</a>-</p>--<h3>{% trans "Forgot password?" %}</h3>-<p>- <a href="{% url 'core:password_reset' %}" data-role="button">- <img src="{% static 'images/icons/reset-password.svg' %}"- width="32"- height="32"- alt="{% trans 'Reset password' %}">- {% trans "Reset password" %}</a>-</p>----{% endblock %}diff --git a/wger/core/templates/mobile/user/preferences.html b/wger/core/templates/mobile/user/preferences.htmldeleted file mode 100644index 89a5d8ef2..000000000--- a/wger/core/templates/mobile/user/preferences.html+++ /dev/null@@ -1,91 +0,0 @@-{% extends "base.html" %}-{% load i18n %}-{% load staticfiles %}-{% load wger_extras %}--{% block title %}{% trans "Preferences" %}{% endblock %}---{% block content %}-<form action="{% url 'core:preferences' %}"- method="post">- {% csrf_token %}- {{ form.non_field_errors }}-- <div data-role="collapsible-set">- <div data-role="collapsible" data-collapsed="false">- <h3>{% trans "Email" %}</h3>- <table>- {% render_form_field email_form.email %}- </table>- </div>- <div data-role="collapsible">- <h3>{% trans "Workout reminders" %}</h3>- <table>- {% render_form_field form.workout_reminder_active %}- {% render_form_field form.workout_duration %}- {% render_form_field form.workout_reminder %}- </table>- </div>- <div data-role="collapsible">- <h3>{% trans "Gym mode" %}</h3>- <table>- {% render_form_field form.timer_active %}- {% render_form_field form.timer_pause %}- </table>- </div>- <div data-role="collapsible">- <h3>{% trans "Other settings" %}</h3>- <table>- {% render_form_field form.notification_language %}- {% render_form_field form.show_comments %}- {% render_form_field form.show_english_ingredients %}- </table>- </div>- </div>-- <a href="{% url 'core:index' %}"- data-role="button"- data-rel="back"- data-mini="true">{% trans "Cancel" %}</a>- <input type="submit" value="{% trans 'Save' %}">--</form>---{% endblock %}--{% block sidebar %}-<h3>{% trans "Options" %}</h3>-<p>- <a href="{% url 'core:api-key' %}"- data-role="button">- <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>- <a href="{% url 'core:change-password' %}"- data-role="button">- <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:logout' %}"- data-role="button"- class="browserid-logout">- <img src="{% static 'images/icons/logout.svg' %}"- width="32"- height="32"- alt="{% trans 'Logout' %}"- title="{% trans 'Logout' %}">- {% trans "Logout" %}</a>-</p>-{% endblock %}diff --git a/wger/core/templates/user/login.html b/wger/core/templates/user/login.htmlindex 7433c4724..35c3c64cc 100644--- a/wger/core/templates/user/login.html+++ b/wger/core/templates/user/login.html@@ -42,14 +42,13 @@</p></div>{% endif %}-{% endblock %}{% block sidebar %}<h3>{% trans "No account?" %}</h3><p>- <a href="{% url 'core:registration' %}">+ <a href="{% url 'core:registration' %}" {% auto_link_css flavour %}><img src="{% static 'images/icons/register.svg' %}"width="32"height="32"@@ -59,14 +58,11 @@<h3>{% trans "Forgot password?" %}</h3><p>- <a href="{% url 'core:password_reset' %}">+ <a href="{% url 'core:password_reset' %}" {% auto_link_css flavour %}><img src="{% static 'images/icons/reset-password.svg' %}"width="32"height="32"alt="{% trans 'Reset password' %}">{% trans "Reset password" %}</a></p>---{% endblock %}diff --git a/wger/core/templates/user/preferences.html b/wger/core/templates/user/preferences.htmlindex caff18983..c6c213b0f 100644--- a/wger/core/templates/user/preferences.html+++ b/wger/core/templates/user/preferences.html@@ -103,8 +103,7 @@ $(function() {{% block sidebar %}<h3>{% trans "Options" %}</h3><p>- <a href="{% url 'core:logout' %}"- class="browserid-logout">+ <a href="{% url 'core:logout' %}" {% auto_link_css flavour "browserid-logout" %}><img src="{% static 'images/icons/logout.svg' %}"width="32"height="32"@@ -113,7 +112,7 @@ $(function() {{% trans "Logout" %}</a></p><p>- <a href="{% url 'core:change-password' %}" class="wger-modal-dialog">+ <a href="{% url 'core:change-password' %}" {% auto_link_css flavour "wger-modal-dialog" %}><img src="{% static 'images/icons/preferences.svg' %}"width="32"height="32"@@ -122,7 +121,7 @@ $(function() {{% trans "Change password" %}</a></p><p>- <a href="{% url 'core:api-key' %}">+ <a href="{% url 'core:api-key' %}" {% auto_link_css flavour %}><img src="{% static 'images/icons/internet.svg' %}"width="32"height="32"diff --git a/wger/manager/templates/mobile/tags/language_select.html b/wger/manager/templates/mobile/tags/language_select.htmldeleted file mode 100644index 38c009255..000000000--- a/wger/manager/templates/mobile/tags/language_select.html+++ /dev/null@@ -1,11 +0,0 @@-{% load i18n %}-{% load staticfiles %}--<a href="{{i18n_path}}"- data-role="button">- <img src="{% static path %}"- width="22"- height="12"- alt="{% trans language_name %}"- style="border: 1px solid #151515;">- {% trans language_name %}</a>\ No newline at end of filediff --git a/wger/manager/templates/mobile/tags/pagination.html b/wger/manager/templates/mobile/tags/pagination.htmldeleted file mode 100644index bf30bef2f..000000000--- a/wger/manager/templates/mobile/tags/pagination.html+++ /dev/null@@ -1,41 +0,0 @@-{% load i18n %}--<div class="pagination" >-- <div class="ui-grid-a">- <div class="ui-block-a">- {% if page.has_previous %}- <a href="?page={{ page.previous_page_number }}"- data-role="button">« {% trans "previous" %}</a>- {% else %}- <button disabled="">« {% trans "previous" %}</button>- {% endif %}- </div>-- <div class="ui-block-b">- {% if page.has_next %}- <a href="?page={{ page.next_page_number }}"- data-role="button">{%trans "next" %} »</a>- {% else %}- <button disabled="">{%trans "next" %} »</button>- {% endif %}- </div>- </div>--- <div data-role="controlgroup" data-type="horizontal" style="text-align:center;">- {% for i in page_range %}- {% if page.number != i %}- <a href="?page={{ i }}"- data-role="button">{{i}}</a>- {% else %}- <button disabled="">- {{i}}- </button>- {% endif %}- {% endfor %}- </div>--</div>--diff --git a/wger/manager/templates/mobile/tags/render_day.html b/wger/manager/templates/mobile/tags/render_day.htmlindex 4e69ea681..76c0ba364 100644--- a/wger/manager/templates/mobile/tags/render_day.html+++ b/wger/manager/templates/mobile/tags/render_day.html@@ -4,119 +4,125 @@-<div data-role="popup"- id="editoptions-day-{{ day.obj.id }}"- data-theme="d"- data-overlay-theme="a">- <div data-role="header" data-theme="b">- <h3>{{day.obj.description}}</h3>- </div>- <div role="main" class="ui-content">- <a href="{% url 'day-log' day.obj.id %}"- title="{% trans 'Add weight log to this day' %}"- data-role="button">- <img src="{% static 'images/icons/statistics.svg' %}"- width="22"- height="22"- alt="{% trans 'Add weight log to this day' %}">- {% trans 'Add weight log to this day' %}- </a>- {% if day.set_list|length > 0 %}- <a href="{% url 'workout-timer' day.obj.id %}"- title="{% trans 'Start gym mode' %}"- data-role="button"- data-ajax="false">- <img src="{% static 'images/icons/play.svg' %}"- width="22"- height="22"- alt="{% trans 'Start gym mode' %}">- {% trans "Start gym mode" %}- </a>- {% endif %}- <a href="{% url 'day-edit' day.obj.id %}"- title="{% trans 'Edit' %}"- data-role="button">- <img src="{% static 'images/icons/edit.svg' %}"- width="22"- height="22"- alt="{% trans 'Edit' %}">- {% trans 'Edit' %}- </a>- <a href="{% url 'day-delete' day.obj.id %}"- title="{% trans 'Delete' %}"- data-role="button">- <img src="{% static 'images/icons/trash.svg' %}"- width="22"- height="22"- alt="{% trans 'Delete' %}">- {% trans "Delete" %}- </a>+<div class="modal fade" id="editoptions-day-{{ day.obj.id }}">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title">{{day.obj.description}}</h4>+ </div>+ <div class="modal-body">+ <a href="{% url 'day-log' day.obj.id %}"+ title="{% trans 'Add weight log to this day' %}"+ {% auto_link_css flavour %}>+ <img src="{% static 'images/icons/statistics.svg' %}"+ width="22"+ height="22"+ alt="{% trans 'Add weight log to this day' %}">+ {% trans 'Add weight log to this day' %}+ </a>+ {% if day.set_list|length > 0 %}+ <a href="{% url 'workout-timer' day.obj.id %}"+ title="{% trans 'Start gym mode' %}"+ {% auto_link_css flavour %}>+ <img src="{% static 'images/icons/play.svg' %}"+ width="22"+ height="22"+ alt="{% trans 'Start gym mode' %}">+ {% trans "Start gym mode" %}+ </a>+ {% endif %}+ <a href="{% url 'day-edit' day.obj.id %}"+ title="{% trans 'Edit' %}"+ {% auto_link_css flavour %}>+ <img src="{% static 'images/icons/edit.svg' %}"+ width="22"+ height="22"+ alt="{% trans 'Edit' %}">+ {% trans 'Edit' %}+ </a>+ <a href="{% url 'day-delete' day.obj.id %}"+ title="{% trans 'Delete' %}"+ {% auto_link_css flavour %}>+ <img src="{% static 'images/icons/trash.svg' %}"+ width="22"+ height="22"+ alt="{% trans 'Delete' %}">+ {% trans "Delete" %}+ </a>+ </div></div>+ </div></div>++{% for set in day.set_list %}-<div data-role="popup"- id="editoptions-set-{{ set.obj.id }}"- data-overlay-theme="a">- <div data-role="header" data-theme="b">- <h3>{% trans "Options" %}</h3>- </div>- <div role="main" class="ui-content">- <a href="{% url 'wger.manager.views.set.edit' set.obj.id %}"- title="{% trans 'Delete' %}"- data-role="button">- <img src="{% static 'images/icons/edit.svg' %}"- width="16"- height="16"- alt="{% trans 'Edit' %}"- class="ui-li-icon ui-corner-none">- {% trans "Edit" %}- </a>- <a href="{% url 'wger.manager.views.set.delete' set.obj.id %}"- title="{% trans 'Delete' %}"- data-role="button">- <img src="{% static 'images/icons/trash.svg' %}"- width="16"- height="16"- alt="{% trans 'Delete' %}"- class="ui-li-icon ui-corner-none">- {% trans "Delete" %}- </a>+<div class="modal fade" id="editoptions-set-{{ set.obj.id }}">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title">+ {% trans "Options" %} –+ {% blocktrans with set_nr=forloop.counter %}Set Nr. {{set_nr}}{% endblocktrans %}+ </h4>+ </div>+ <div class="modal-body">+ <a href="{% url 'wger.manager.views.set.edit' set.obj.id %}"+ title="{% trans 'Delete' %}"+ {% auto_link_css flavour %}>+ <img src="{% static 'images/icons/edit.svg' %}"+ width="16"+ height="16"+ alt="{% trans 'Edit' %}">+ {% trans "Edit" %}+ </a>+ <a href="{% url 'wger.manager.views.set.delete' set.obj.id %}"+ title="{% trans 'Delete' %}"+ {% auto_link_css flavour %}>+ <img src="{% static 'images/icons/trash.svg' %}"+ width="16"+ height="16"+ alt="{% trans 'Delete' %}">+ {% trans "Delete" %}+ </a>- <h5>{% trans "Exercises" %}</h5>- {% for exercise in set.exercise_list %}- <a href="{{ exercise.obj.get_absolute_url }}"- title="{{ exercise.obj.name }}"- data-role="button">- {{ exercise.obj.name }}- </a>- {% endfor %}+ <h5>{% trans "Exercises" %}</h5>+ {% for exercise in set.exercise_list %}+ <a href="{{ exercise.obj.get_absolute_url }}"+ title="{{ exercise.obj.name }}"+ {% auto_link_css flavour %}>+ {{ exercise.obj.name }}+ </a>+ {% endfor %}+ </div>+ </div></div></div>{% endfor %}-<ul data-role="listview"++<div class="list-group"id="table-day-{{ day.obj.id }}"- style="margin-top: 3em;"- data-split-icon="grid"- data-split-theme="b">- <li data-theme="b">- <a href="#editoptions-day-{{ day.obj.id }}" data-rel="popup">+ style="margin-top: 3em;">++ <a href="#editoptions-day-{{ day.obj.id }}" class="list-group-item active" data-toggle="modal"><h4>{{ day.obj.description }}</h4>{{ day.days_of_week.text }}</a>- <a href="{% url 'day-log' day.obj.id %}"></a>- </li>{% for set in day.set_list %}- <li id="set-{{ set.obj.id }}" data-icon="false">{% if set.has_settings %}<a href="#editoptions-set-{{ set.obj.id }}"- data-rel="popup"- data-position-to="window">+ class="list-group-item"+ data-toggle="modal"+ id="set-{{ set.obj.id }}">{% else %}- <a href="{% url 'set-edit' set.obj.id %}">+ <a href="{% url 'set-edit' set.obj.id %}"+ id="set-{{ set.obj.id }}"+ class="list-group-item">{% endif %}{% for exercise in set.exercise_list %}@@ -139,11 +145,10 @@</div>{% endfor %} <!--for exercise in set--></a>- </li>{% empty %}<li><a href="{% url 'set-add' day.obj.id %}"- data-ajax="false">+ class="list-group-item">{% trans "No exercises selected for this day." %}<br>{% trans "Add one now." %}</a>@@ -151,12 +156,9 @@{% endfor %} <!--for set in day-->{% if day.set_list %}- <li data-icon="arrow-r"><a href="{% url 'set-add' day.obj.id %}"- data-ajax="false"- >{% trans "Add exercises to this workout day" %}</a>- </li>+ {% auto_link_css flavour 'list-group-item' %}>{% trans "Add exercises to this workout day" %}</a>{% endif %}-</ul>+</div>diff --git a/wger/manager/templates/mobile/tags/render_form_element.html b/wger/manager/templates/mobile/tags/render_form_element.htmldeleted file mode 100644index 9ac1e5b1d..000000000--- a/wger/manager/templates/mobile/tags/render_form_element.html+++ /dev/null@@ -1,32 +0,0 @@-{% load i18n %}-{% if not field.is_hidden %}-<tr>- <td colspan="2">- <label for="{{field.auto_id}}">- {% trans field.label %}- </label>-- {% if not field.field.required %}- <span style="font-size:90%;">— <em>{% trans "Optional" %}</em></span><br>- {% endif %}-- {% if field.errors %}- <div class="form-error">- {% for error in field.errors %}- <p class="form-error-message">{% trans error %}</p>- {% endfor %}- </div>- {% endif %}-- {% if field.help_text %}- <p class="dimmed">{% trans field.help_text %}</p>- {% endif %}-- <div {% if field.errors %}class="form-error"{% endif %}>- {{ field }}- </div>- </td>-</tr>-{% else %}- {{field}}-{% endif %}diff --git a/wger/manager/templates/mobile/workout/overview.html b/wger/manager/templates/mobile/workout/overview.htmlindex c8af1ffb5..7a00ae69f 100644--- a/wger/manager/templates/mobile/workout/overview.html+++ b/wger/manager/templates/mobile/workout/overview.html@@ -1,37 +1,34 @@{% extends "base.html" %}{% load i18n %}{% load staticfiles %}+{% load wger_extras %}{% block title %}{% trans "Your workouts" %}{% endblock %}{% block content %}-<ul data-role="listview" data-inset="false">+<div class="list-group">{% for workout in workouts %}- <li>- <a href="{% url 'workout-view' workout.id %}" data-ajax="false">- <h3>{{ workout }}</h3>- <p>{{ workout.creation_date }}</p>- {% if workout == current_workout %}- <p class="ui-li-aside"><em>{% trans "active" %}</em></p>- {% endif %}- </a>- </li>+ <a href="{% url 'workout-view' workout.id %}" class="list-group-item">+ {% if workout == current_workout %}+ <span class="label label-primary pull-right"><em>{% trans "active" %}</em></span>+ {% endif %}+ <h3 class="list-group-item-heading">{{ workout }}</h3>+ <p class="list-group-item-text">{{ workout.creation_date }}</p>+ </a>{% empty %}- <li>- <a href="{% url 'workout-add' %}">+ <a href="{% url 'workout-add' %}" class="list-group-item">{% trans "No workouts found." %}<br>{% trans "Add one now." %}</a>- </li>{% endfor %}-</ul>+</div>{% endblock %}{% block sidebar %}<h3>{% trans "Options" %}</h3><p>- <a href="{% url 'workout-add' %}" data-role="button">+ <a href="{% url 'workout-add' %}" {% auto_link_css flavour %}><img src="{% static 'images/icons/new.svg' %}"width="32"height="32"diff --git a/wger/manager/templates/mobile/workout/view.html b/wger/manager/templates/mobile/workout/view.htmlindex dd52d30a7..1341307e8 100644--- a/wger/manager/templates/mobile/workout/view.html+++ b/wger/manager/templates/mobile/workout/view.html@@ -47,7 +47,7 @@ $( document ).off("pageinit").on("pageinit", function() {{% for day in workout.canonical_representation.day_list %}<div id="div-day-{{ day.obj.id }}">- {% render_day day.obj %}+ {% render_day day.obj flavour %}</div>{% empty %}@@ -105,15 +105,14 @@ $( document ).off("pageinit").on("pageinit", function() {{% trans "Images show combined muscles as trained by the exercises on the workout." %}</p>-<div class="ui-grid-a">- <div class="ui-block-a">+<div class="row">+ <div class="col-xs-6"><div id="muscle-front"class="muscle-background"style="width: 120px; height: 220px; background-size: 120px; background-image: {% for background in muscle_backgrounds_front %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};"></div></div>-- <div class="ui-block-b">+ <div class="col-xs-6"><div id="muscle-back"class="muscle-background"style="width: 120px; height: 220px; background-size: 120px; background-image: {% for background in muscle_backgrounds_back %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};">@@ -122,11 +121,10 @@ $( document ).off("pageinit").on("pageinit", function() {</div>+<h3>{% trans "Options" %}</h3>-<a href="#export-pdf-link"- data-role="button"- data-rel="popup">+<a href="#export-pdf-link" data-toggle="modal" {% auto_link_css flavour %}><img src="{% static 'images/icons/save.svg' %}"width="32"height="32"@@ -135,8 +133,7 @@ $( document ).off("pageinit").on("pageinit", function() {{% trans "Download as PDF" %}</a>-<a href="{% url 'workout-log' workout.id %}"- data-role="button">+<a href="{% url 'workout-log' workout.id %}" {% auto_link_css flavour %}><img src="{% static 'images/icons/statistics.svg' %}"width="32"height="32"@@ -145,8 +142,7 @@ $( document ).off("pageinit").on("pageinit", function() {{% trans "View weight log" %}</a>-<a href="{% url 'workout-edit' workout.id %}"- data-role="button">+<a href="{% url 'workout-edit' workout.id %}" {% auto_link_css flavour %}><img src="{% static 'images/icons/edit.svg' %}"width="32"height="32"@@ -155,10 +151,7 @@ $( document ).off("pageinit").on("pageinit", function() {{% trans "Edit workout" %}</a>-<a href="#export-ical-link"- data-rel="popup"- data-role="button"- data-position-to="window">+<a href="#export-ical-link" data-toggle="modal" {% auto_link_css flavour %}><img src="{% static 'images/icons/calendar.svg' %}"width="32"height="32"@@ -167,8 +160,7 @@ $( document ).off("pageinit").on("pageinit", function() {{% trans "Export calendar file" %}</a>-<a href="{% url 'workout-copy' workout.id %}"- data-role="button">+<a href="{% url 'workout-copy' workout.id %}" {% auto_link_css flavour %}><img src="{% static 'images/icons/copy.svg' %}"width="32"height="32"@@ -177,8 +169,7 @@ $( document ).off("pageinit").on("pageinit", function() {{% trans "Make a copy of this workout" %}</a>-<a href="{% url 'workout-delete' workout.id %}"- data-role="button">+<a href="{% url 'workout-delete' workout.id %}" {% auto_link_css flavour %}><img src="{% static 'images/icons/trash.svg' %}"width="32"height="32"@@ -187,52 +178,53 @@ $( document ).off("pageinit").on("pageinit", function() {</a>-<div data-role="popup"- id="export-ical-link"- data-overlay-theme="a">- <div data-role="header" data-theme="b">- <h3>{% trans "Export calendar file" %}</h3>- </div>- <div role="main" class="ui-content">- <p>{% trans "Export this workout as a calendar file." %}</p>- <p>{% blocktrans %}You can then import the file it into your calendar++<div class="modal fade" id="export-ical-link">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title">{% trans "Export calendar file" %}</h4>+ </div>+ <div class="modal-body">+ <p>{% trans "Export this workout as a calendar file." %}</p>+ <p>{% blocktrans %}You can then import the file it into your calendarapplication for example google calendar, outlook or iCal. This will createan appointment for each training day with the appropriate exercises.{% endblocktrans %}</p>- <p>- <a href="{% url 'workout-ical' workout.id %}"- data-role="button"- target="_blank">- <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 href="{% url 'workout-ical' workout.id %}" {% auto_link_css flavour %}>+ <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>+ </div>+ </div></div></div>-<div data-role="popup"- id="export-pdf-link"- data-overlay-theme="a">- <div data-role="header" data-theme="b">- <h3>{% trans "Download as PDF" %}</h3>- </div>- <div role="main" class="ui-content">- <a href="{% url 'workout-pdf-log' workout.id %}"- data-role="button"- data-ajax="false"- class="pdf-button">+++<div class="modal fade" id="export-pdf-link">+ <div class="modal-dialog">+ <div class="modal-content">+ <div class="modal-header">+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>+ <h4 class="modal-title">{% trans "Download as PDF" %}</h4>+ </div>+ <div class="modal-body">+ <a href="{% url 'workout-pdf-log' workout.id %}" {% auto_link_css flavour "pdf-button" %}>{% trans "Log" %}</a>- <a href="{% url 'workout-pdf-table' workout.id %}"- data-role="button"- data-ajax="false"- class="pdf-button">+ <a href="{% url 'workout-pdf-table' workout.id %}" {% auto_link_css flavour "pdf-button" %}>{% trans "Table" %}</a>+ </div>+ </div></div></div>{% endblock %}diff --git a/wger/manager/templates/workout/timer.html b/wger/manager/templates/workout/timer.htmlindex 1ea9f3765..93db1be4a 100644--- a/wger/manager/templates/workout/timer.html+++ b/wger/manager/templates/workout/timer.html@@ -252,7 +252,7 @@ $(document).ready(function() {{# #}{# Start page #}{# #}-<div id="timer-container" style="position: relative; top:-40px; margin:0px, padding: 0px;">+<div id="timer-container" style="position: relative; top:-60px; margin:0px, padding: 0px;"><ul id="workout-timer"><li class="timer-step" id="div-warmup" data-number="0"><h2>{% trans "Your workout today" %}</h2>@@ -265,12 +265,8 @@ $(document).ready(function() {{% endfor %}</div>- <a class="next bottom_button wide_link"- href="#"- data-role="button"- data-icon="arrow-r"- data-iconpos="right"- data-theme="d">{% trans "Start!" %}</a>+ <a class="next bottom_button wide_link btn btn-primary"+ href="#">{% trans "Start!" %}</a></li>{% for step in step_list %}@@ -295,26 +291,26 @@ $(document).ready(function() {id="id-date-{{step.current_step}}"value="{% now 'Y-m-j' %}"type="hidden">- <div class="filler_div">- <div class="ui-grid-a">- <div class="ui-block-a">- <label for="id-reps-{{step.current_step}}">{% trans "Repetitions" %}:</label>- <input name="reps"- id="id-reps-{{step.current_step}}"- placeholder="{% trans 'Repetitions' %}"- value="{{step.reps}}"- type="number"- autocomplete="off">- </div>- <div class="ui-block-b" style="padding-left: 0.5em;">- <label for="id-weight-{{step.current_step}}">{% trans "Weight" %}:</label>- <input name="weight"- id="id-weight-{{step.current_step}}"- placeholder="{% trans 'Weight' %}"- value="{{step.weight|unlocalize}}"- type="number"- autocomplete="off">- </div>+ <div class="row filler_div">+ <div class="col-xs-6">+ <label for="id-reps-{{step.current_step}}">{% trans "Repetitions" %}:</label>+ <input name="reps"+ id="id-reps-{{step.current_step}}"+ placeholder="{% trans 'Repetitions' %}"+ value="{{step.reps}}"+ type="number"+ autocomplete="off"+ class="form-control">+ </div>+ <div class="col-xs-6">+ <label for="id-weight-{{step.current_step}}">{% trans "Weight" %}:</label>+ <input name="weight"+ id="id-weight-{{step.current_step}}"+ placeholder="{% trans 'Weight' %}"+ value="{{step.weight|unlocalize}}"+ type="number"+ autocomplete="off"+ class="form-control"></div></div></form>@@ -329,22 +325,18 @@ $(document).ready(function() {</h2></div>- <div class="ui-grid-a bottom_buttons">- <div class="ui-block-a">- <a class="next wide_link"- href="#"- data-role="button"- data-icon="forward"- data-iconpos="right">{% trans "Skip" %}</a>+ <div class="row bottom_buttons">+ <div class="col-xs-6">+ <a class="next wide_link btn btn-default"+ href="#"><!-- {% trans "Skip" %}--> <span class="glyphicon glyphicon-forward"></span>+ </a></div>- <div class="ui-block-b">- <a class="next save_log wide_link"- href="#"- data-role="button"- data-icon="arrow-r"- data-iconpos="right">{% trans "Save" %}</a>+ <div class="col-xs-6">+ <a class="next save_log wide_link btn btn-success"+ href="#">{% trans "Save" %} <span class="glyphicon glyphicon-save"></span></a></div>- </div><!-- /grid-a -->+ </div>+<div id="progress-{{step.current_step}}" class="progress-bar"><span style="width: {{step.step_percent|stringformat:'f'}}%;"></span>@@ -366,34 +358,26 @@ $(document).ready(function() {<canvas id="canvas-div-{{step.current_step}}" width="150" height="150"></canvas></div>- <div class="ui-grid-a sub_header">- <div class="ui-block-a">- <h2><span id="counter-{{step.current_step}}">{{step.time}}</span></h2>- </div>- <div class="ui-block-b">- <div class="ui-grid-a">- <div class="ui-block-a">- <a class="start timer-plus"- href="#"- data-role="button"- id="button-plus-{{step.current_step}}">+10</a>- </div>- <div class="ui-block-b">- <a class="start timer-minus"- href="#"- data-role="button"- id="button-minus-{{step.current_step}}">-10</a>- </div>- </div>+ <div class="row sub_header">+ <div class="col-xs-4">+ <h2><span id="counter-{{step.current_step}}">{{step.time}}</span></h2>+ </div>+ <div class="col-xs-4">+ <a class="start timer-plus btn btn-default"+ href="#"+ id="button-plus-{{step.current_step}}">+10</a>+ </div>+ <div class="col-xs-4">+ <a class="start timer-minus btn btn-default"+ href="#"+ id="button-minus-{{step.current_step}}">-10</a></div></div>- <a class="next bottom_button wide_link"- href="#"- data-role="button"- data-icon="forward"- data-iconpos="right">{% trans "Skip" %}</a>++ <a class="next bottom_button wide_link btn btn-default"+ href="#"><!--{% trans "Skip" %}--> <span class="glyphicon glyphicon-forward"></a><div id="progress-{{step.current_step}}" class="progress-bar"><span style="width: {{step.step_percent|stringformat:'f'}}%;"></span>diff --git a/wger/manager/templates/workout/view.html b/wger/manager/templates/workout/view.htmlindex 18e6f1709..dd6afc03c 100644--- a/wger/manager/templates/workout/view.html+++ b/wger/manager/templates/workout/view.html@@ -43,7 +43,7 @@ $(document).ready(function() {{% for day in workout.canonical_representation.day_list %}<div id="div-day-{{ day.obj.id }}">- {% render_day day.obj %}+ {% render_day day.obj flavour %}</div>{% empty %}<p>diff --git a/wger/manager/templatetags/wger_extras.py b/wger/manager/templatetags/wger_extras.pyindex 5d143a61a..d69e690c0 100644--- a/wger/manager/templatetags/wger_extras.py+++ b/wger/manager/templatetags/wger_extras.py@@ -36,12 +36,13 @@ def get_current_settings(exercise, set_id):@register.inclusion_tag('tags/render_day.html')-def render_day(day):+def render_day(day, flavour):'''Renders a day as it will be displayed in the workout overview'''return {'day': day.canonical_representation,- 'workout': day.training}+ 'workout': day.training,+ 'flavour': flavour}@register.inclusion_tag('tags/pagination.html')@@ -114,6 +115,21 @@ def get_item(dictionary, key):'''return dictionary.get(key)+from django import template+++def auto_link_css(flavour='full', css='css'):+ '''+ dddd++ :param flavour:+ :param css:+ :return:+ '''+ css = css + ' btn btn-default btn-block' if flavour == 'mobile' else css+ return 'class="{0}"'.format(css)+## Form utilsdiff --git a/wger/software/templates/mobile/contribute.html b/wger/software/templates/mobile/contribute.htmldeleted file mode 100644index 669843657..000000000--- a/wger/software/templates/mobile/contribute.html+++ /dev/null@@ -1,110 +0,0 @@-{% extends "base_wide.html" %}-{% load staticfiles %}-{% load i18n %}---{% block title %}{% trans "Contribute!" %}{% endblock %}--{% block content %}-<p>{% blocktrans %}wger Workout Manager is build by volunteers,-the development process is open and freely accessible to anybody interested.-If you are new to the free software world, we recommend to take a-look <a href="http://schlitt.info/opensource/blog/0541_10_golden_rules_for_starting_with_open_source.html">this-article</a> which summarizes they way open source projects work very well. {% endblocktrans %}</p>---<p>{% blocktrans %}Any kind of contribution is appreciated and welcome.-Use this opportunity and influence the direction of the-project. {% endblocktrans %}</p>--- <div class="box success">- <p style="text-align:center;"><strong>{% blocktrans %}The goal is to build an awesome-and flexible fitness manager, along with a comprehensive and complete list of exercises and-ingredients, all released under a free license.{% endblocktrans %}</strong></p>- </div>-----<div class="ym-grid linearize-level-1">- <div class="ym-g25 ym-gl">- <div class="ym-gbox-left">- <h3>{% trans "Use the site" %}</h3>- </div>- </div>- <div class="ym-g66 ym-gl">- <div class="ym-gbox-left">- <p>{% blocktrans %}Simply use the site and tell your friends-how useful it is! ;) . When you find something that you specially liked,-could need some improvements or just doesn't work, tell us! This might not sound-like much, but is incredibly important!{% endblocktrans %}</p>-<a data-role="button" href="{% url 'core:contact' %}">{% trans "Get in touch" %} »</a>-- </div>-- </div>-</div>---<div class="ym-grid linearize-level-1">- <div class="ym-g25 ym-gl">- <div class="ym-gbox-left">- <h3>{% trans "Submit exercises" %}</h3>- </div>- </div>- <div class="ym-g66 ym-gl">- <div class="ym-gbox-left">- <p>{% blocktrans %}Submit those cool exercises that you absolutely-love and do every week but are not in the list yet. If you think some description-is too short or some other detail is missing or could be improved, tell!{% endblocktrans %}</p>- {% if user.is_authenticated and not user.userprofile.is_temporary %}- <a data-role="button" href="{% url 'exercise-add' %}">{% trans "Add exercise" %} »</a>- {% else %}- <a data-role="button" class="ui-disabled" href="#">{% trans "Only registered users can do this" %} »</a>- {% endif %}- </div>- </div>-</div>---<div class="ym-grid linearize-level-1">- <div class="ym-g25 ym-gl">- <div class="ym-gbox-left">- <h3>{% trans "Translate" %}</h3>- </div>- </div>- <div class="ym-g66 ym-gl">- <div class="ym-gbox-left">- <p>{% blocktrans %}Do you want to use wger in your own language?-Do you think the current translation could be improved?-The translations are easily managed and edited online, if you are interested,-go to the transifex site, request access and we will set everything-up. {% endblocktrans %}</p>-- <a data-role="button"- href="https://www.transifex.com/projects/p/wger-workout-manager/">{% trans "Translate with Transifex" %} »</a>- </div>- </div>-</div>--<div class="ym-grid linearize-level-1">- <div class="ym-g25 ym-gl">- <div class="ym-gbox-left">- <h3>{% trans "Code" %}</h3>- </div>- </div>- <div class="ym-g66 ym-gl">- <div class="ym-gbox-left">- <p>{% blocktrans %}Obviously, you are highly encouraged to clone the-repo and start hacking! Once you are ready, send a pull request and we-will show the world. Take a look at the developer guide for more details-on this.{% endblocktrans %}</p>-- <a data-role="button" href="{% url 'software:code' %}">{% trans "Get the code" %} »</a>- </div>- </div>-</div>---{% endblock %}diff --git a/wger/software/templates/mobile/issues.html b/wger/software/templates/mobile/issues.htmldeleted file mode 100644index 6d59da6fc..000000000--- a/wger/software/templates/mobile/issues.html+++ /dev/null@@ -1,52 +0,0 @@-{% extends "base.html" %}-{% load staticfiles %}-{% load i18n %}---{% block title %}{% trans "Reporting a problem" %}{% endblock %}--{% block content %}--<img src="{% static 'images/icons/bug.svg' %}"- width="48"- height="48"- alt=""- class="float-left">-<p>{% blocktrans %}-No software is perfect. For some severe errors, an email will be automatically sent, but-not always, so I depend on you reporting everything that didn't behave as expected.-Please describe in as much detail as you can what you were doing when the error-happened.-{% endblocktrans %}</p>----<p>-<a class="btn btn-primary"- href="https://github.com/rolandgeider/wger/issues"- data-role="button">{% trans "report problem to the issue tracker" %} »</a>-</p>---<h2>{% trans "Enhancements" %}</h2>--<p>{% blocktrans %}-The issue tracker can also be used to document enhancements to the software.-If you have some suggestions or think a feature is missing, feel-free to open a ticket. This can be anything from a slight change to a whole-new section of the site. Please keep in mind that not all wishes can be-implemented.{% endblocktrans %}</p>--<p>-<a class="btn btn-primary"- href="https://github.com/rolandgeider/wger/issues"- data-role="button">{% trans "report wish to the issue tracker" %} »</a>-</p>-{% endblock %}--{% block sidebar %}-<h3>{% trans "No Github account?" %}</h3>-<p>{% blocktrans %}Filing an issue requires a github account, if you don't-have one and don't want to register, you can also send it to-<a href="https://groups.google.com/group/wger">the mailing list</a>.{% endblocktrans %}</p>-{% endblock %}