Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Remove mobile templates, not needed anymore

Rolandc3b158e7db0e
diff --git a/wger/core/templates/mobile/index.html b/wger/core/templates/mobile/index.html
deleted file mode 100644
index 1d0054394..000000000
--- a/wger/core/templates/mobile/index.html
+++ /dev/null
@@ -1,235 +0,0 @@
-{% extends "base.html" %}
-{% load i18n static wger_extras %}
-
-{% block title %}{% trans "Dashboard" %}{% endblock %}
-
-
-{% block content %}
-<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">&times;</button>
- <h4 class="modal-title">{% trans "Current workout" %}</h4>
- {% if current_workout %}
- <h5><a href="{{ current_workout.get_absolute_url }}">{{ 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="text-muted"{% 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 class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-
-
-
-<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">&times;</button>
- <h4 class="modal-title">{% trans "Current nutrition plan" %}</h4>
- {% if plan %}
- <h5><a href="{{ plan.get_absolute_url }}">{{ 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}} {% trans "kcal" %}
- </li>
- <li class="list-group-item">
- {% trans "Protein" %}: {{nutritional_info.total.protein|floatformat}} {% trans_weight_unit 'g' user %}
- </li>
- <li class="list-group-item">
- {% trans "Carbohydrates" %}: {{nutritional_info.total.carbohydrates|floatformat}} {% trans_weight_unit 'g' user %}
- </li>
- <li class="list-group-item">
- {% trans "Fat" %}: {{nutritional_info.total.fat|floatformat}} {% trans_weight_unit 'g' user %}
- </li>
- </ul>
-
- {% if weight %}
- <p>
- {% trans "Your current weight is: "%}
- <strong>
- {{weight.weight|floatformat}} {% trans_weight_unit 'kg' user %}
- </strong>
- </p>
- {% endif %}
-
- {% endif %}
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-
-<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">&times;</button>
- <h4 class="modal-title">{% trans "Start gym mode" %}</h4>
- <h5></h5>
- </div>
- <div class="modal-body">
- <p>{% blocktrans %}Use the gym mode to
-start an interactive training session. If you enter lifted weights, they will
-be added to your workout log. A timer between sets helps you keep track of the
-pauses you do.{% endblocktrans %}</p>
- <p>
- <strong>{% trans "Tip:" %}</strong>
- {% blocktrans %}You can deactivate the timer or set
-its default duration in your settings.{% endblocktrans %}
- </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 'manager:workout:timer' day.obj.pk %}" class="list-group-item wger-list-group-item">
- <span class="glyphicon glyphicon-chevron-right pull-right"></span>
- {{day.obj.description}}
- </a>
- {% else %}
- <span class="list-group-item">{{day.obj.description}}</span>
- {% endif %}
- {% empty %}
- <a href="{% url 'manager:day:add' current_workout.id %}" class="list-group-item">
- <span class="glyphicon glyphicon-chevron-right pull-right"></span>
- {% trans "No days for this workout." %}<br>
- {% trans "Add training day." %}
- </a>
- {% endfor %}
- {% else %}
- <a href="{% url 'manager:workout:add' %}" class="list-group-item">
- <span class="glyphicon glyphicon-chevron-right pull-right"></span>
- {% trans "No workouts found." %}<br>
- {% trans "Add one now." %}
- </a>
- {% endif %}
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-
-
-
-
-
-
-<a href="#timer-current-workout"
- data-toggle="modal"
- class="btn btn-default btn-block">
- <span class="{% fa_class 'play' 'lg' %}"></span>
- <br>
- {% trans "Start current workout" %}
-</a>
-
-<div class="row" style="margin-top: 1em;">
- <div class="col-xs-6" style="padding-right: 7px;">
- {% if current_workout %}
- <a href="#current-workout"
- data-toggle="modal"
- class="btn btn-default btn-block"
- style="white-space: normal;">
- <span class="{% fa_class 'list' 'lg' %}"></span>
- <br>
- {{current_workout}}
- </a>
- {% else %}
- <a href="{% url 'manager:workout:add' %}" class="btn btn-default btn-block">
- <span class="{% fa_class 'plus' 'lg' %}"></span>
- <br>
- {% trans "Workout" %}
- </a>
- {% endif %}
- </div>
- <div class="col-xs-6" style="padding-left: 7px;">
- <a href="{% url 'manager:workout:calendar' %}"
- class="btn btn-default btn-block"
- style="white-space: normal;">
- <span class="{% fa_class 'calendar' 'lg' %}"></span>
- <br>
- {% trans "Calendar" %}
- </a>
-
- </div>
-</div>
-
-<div class="row" style="margin-top: 1em;">
- <div class="col-xs-6" style="padding-right: 7px;">
- {% if plan %}
- <a href="#current-nutrition-plan"
- data-toggle="modal"
- class="btn btn-default btn-block"
- style="white-space: normal;">
- <span class="{% fa_class 'cutlery' 'lg' %}"></span>
- <br>
- {{plan}}
- </a>
- {% else %}
- <a href="{% url 'nutrition:plan:add' %}" class="btn btn-default btn-block">
- <span class="{% fa_class 'plus' 'lg' %}"></span>
- <br>
- {% trans "Nutrition plan" %}
- </a>
- {% endif %}
- </div>
- <div class="col-xs-6" style="padding-left: 7px;">
- <a href="{% url 'weight:overview' user.username %}" class="btn btn-default btn-block">
- <span class="{% fa_class 'line-chart' 'lg' %}"></span>
- <br>
- {% trans "Weight overview" %}
- </a>
- </div>
-</div>
-
-
-<div class="row" style="margin-top: 1em;">
- <div class="col-xs-6" style="padding-right: 7px;">
- <a href="{% url 'core:user:preferences' %}" class="btn btn-default btn-block">
- <span class="{% fa_class 'cogs' 'lg' %}"></span>
- <br>
- {% trans "Preferences" %}
- </a>
- </div>
-
- <div class="col-xs-6" style="padding-left: 7px;">
- <a href="{% url 'core:contact' %}" class="btn btn-default btn-block">
- <span class="{% fa_class 'envelope-o' 'lg' %}"></span>
- <br>
- {% trans "Get in touch" %}
- </a>
- </div>
-</div>
-{% endblock %}
diff --git a/wger/core/templates/mobile/misc/contact.html b/wger/core/templates/mobile/misc/contact.html
deleted file mode 100644
index 78fb23cd8..000000000
--- a/wger/core/templates/mobile/misc/contact.html
+++ /dev/null
@@ -1,41 +0,0 @@
-{% extends "base_wide.html" %}
-{% load i18n wger_extras %}
-
-{% block title%}{% trans "Get in touch" %}{% endblock %}
-
-
-{% block content %}
-<p>{% blocktrans %}Thank you for your interest. Feel free to use any of the
-ways below to send feedback you have about any aspect of the site. For
-support, it's better to use the mailing list
-(<a href="mailto:[email protected]">[email protected]</a>), to report
-a bug, consider doing it through the <a href="{{issues}}">issue tracker</a>
-.{% endblocktrans %}</p>
-
-<div class="alert alert-block alert-info">
-{% blocktrans %}If you want to further help and improve this project,
-you might also be interested <a href="{{contribute}}">in contributing</a>.{% endblocktrans %}
-</div>
-
-
-<h4>{% trans "Feedback form" %}</h4>
-<p>{% blocktrans %}A simple contact form. Remember that
-if you want an answer, you need to include some way to contact you.{% endblocktrans %}</p>
-<p><a {% auto_link_css request.user_agent.is_mobile %} href="{{feedback}}" data-ajax="false">{% trans "Open feedback form" %}</a></p>
-
-<h4>{% trans "Twitter" %}</h4>
-<p>{% blocktrans %}We are also on twitter. Write us and tell us what
-you think! Except patches, don't send patches via twitter.{% endblocktrans %}</p>
-<p><a href="https://twitter.com/wger_de"
- rel="noopener"
- target="_blank"
- {% auto_link_css request.user_agent.is_mobile %}>{% trans "tweet to @wger_de" %}</a></p>
-
-<h4>{% trans "Forum / Mailing list" %}</h4>
-<p>{% blocktrans %}Use the public group to get support for your
-local wger installation, discuss issues or your new idea, etc.
-(no registration needed){% endblocktrans %}</p>
-<p><a href="https://groups.google.com/group/wger" {% auto_link_css request.user_agent.is_mobile %}>{% trans "Go to mailing list" %}</a></p>
-
-
-{% endblock %}
diff --git a/wger/core/templates/mobile/template.html b/wger/core/templates/mobile/template.html
deleted file mode 100644
index e6ccb9e98..000000000
--- a/wger/core/templates/mobile/template.html
+++ /dev/null
@@ -1,219 +0,0 @@
-<!DOCTYPE html>
-<!--
- This file is part of wger Workout Manager
-
- wger is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- wger is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.
--->
-
-{% load i18n static wger_extras compress django_bootstrap_breadcrumbs %}
-{% block breadcrumbs %}
- {% clear_breadcrumbs %}
-{% endblock %}
-<html lang="{{language.short_name}}">
-{% spaceless_config %}
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="author" content="Roland Geider">
-
- <!-- OpenGraph -->
- {% block opengraph %}
- <meta property="og:url" content="{{ request_absolute_path }}">
- <meta property="og:type" content="website">
- {% endblock %}
- {% block opengraphimages %}
- <meta property="og:image" content="{{ image_absolute_path }}">
- {% endblock %}
-
- <!-- twitter cards -->
- {% block twittercard %}
- {% if twitter %}
- <meta content="summary" name="twitter:card">
- <meta content="@{{ twitter }}" name="twitter:site">
- {% endif %}
- {% endblock %}
-
-
- {% compress css %}
- <link rel="stylesheet" type="text/css" href="{% static 'bower_components/bootstrap/dist/css/bootstrap.min.css' %}">
- <link rel="stylesheet" type="text/css" href="{% static 'bower_components/components-font-awesome/css/font-awesome.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' %}">
- <link rel="stylesheet" type="text/css" href="{% static 'bower_components/shariff/build/shariff.min.css' %}">
- <link rel="stylesheet" type="text/css" href="{% static 'bower_components/metrics-graphics/dist/metricsgraphics.css' %}">
- <link rel="stylesheet" type="text/css" href="{% static 'css/metricsgraphics-custom.css' %}">
- {% endcompress %}
-
- <link rel="icon" href="{% static 'images/favicon.png' %}" type="image/png">
-
- {% compress js %}
- <script src="{% static 'bower_components/jquery/dist/jquery.js' %}"></script>
- <script src="{% static 'bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>
- <script src="{% static 'bower_components/Sortable/Sortable.min.js' %}"></script>
- <script src="{% static 'bower_components/d3/d3.js' %}"></script>
- <script src="{% static 'bower_components/metrics-graphics/dist/metricsgraphics.min.js' %}"></script>
- <script src="{% static 'bower_components/devbridge-autocomplete/dist/jquery.autocomplete.min.js' %}"></script>
- <script src="{% static 'js/wger-core.js' %}"></script>
- <script src="{% static 'js/exercises.js' %}"></script>
- <script src="{% static 'js/nutrition.js' %}"></script>
- {% endcompress %}
-
- {% compress js %}
- <script src="{% static 'js/wger-core-mobile.js' %}"></script>
- {% endcompress %}
- {% block header %}{% endblock %}
-
- <script>
- $(document).ready(function() {
- $('[data-toggle=offcanvas]').click(function () {
- $('.row-offcanvas').toggleClass('active')
- });
-
- if (typeof wgerCustomPageInit !== "undefined")
- {
- wgerCustomPageInit();
- }
-
- // Init the modal dialog for editing forms
- wgerFormModalDialog();
-
- // Check for RO-access before allowing sharing
- wgerToggleReadOnlyAccess();
- });
- </script>
-
-
- <title>{% block title %}{% endblock %}</title>
-</head>
-<body>
-<header>
- <div class="navbar navbar-fixed-top" style="background-color: #204A87;">
- <button type="button"
- class="btn btn-primary pull-left visible-xs"
- data-toggle="offcanvas"
- style="margin-top: 0.5em;margin-left: 0.5em;">
- <span class="glyphicon glyphicon-th-list"></span>
- </button>
- <span class="center-block application-name">
- {# Show application's name or user's gym #}
- {% if custom_header %}
- {{ custom_header }}
- {% else %}
- wger
- {% endif %}
- </span>
- </div>
-
- <div class="hidden-xs" role="navigation">
- {% include 'navigation.html' %}
- </div>
-</header>
-
-<div class="container">
-
- <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">&times;</button>
- <h4 class="modal-title">{% trans "Language" %}</h4>
- </div>
- <div class="modal-body">
- <div class="list-group">
- {% for language in languages %}
- {% language_select language %}
- {% endfor %}
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
- </div>
-
- <div id="main" class="row-offcanvas row-offcanvas-left">
- <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">&times;</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>
- <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="alert alert-warning" role="alert" style="padding:0.6em; margin-top: 1em; text-align:center; font-size:95%;">
- {% trans "You are using a guest account, data entered will be deleted after a week."%}
- {% if not has_demo_data %}
- <a href="{% url 'core:user:demo-entries' %}" rel="nofollow" class="btn btn-success btn-xs">
- {% trans "Create some demo entries" %}
- <span class="glyphicon glyphicon-chevron-right"></span>
- </a>
- {% else %}
- <a href="{% url 'core:user:registration' %}" class="btn btn-success btn-xs">
- {% trans "Register" %}
- <span class="glyphicon glyphicon-chevron-right"></span>
- </a>
- {% endif %}
- </div>
- {% endif %}
-
- <div id="main-template">
- {% block template %}{% endblock %}
- </div>
-
- <div class="sidebar-offcanvas visible-xs" role="navigation">
- {% include 'navigation.html' %}
- </div>
- </div>
-</div>
-
-
-<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 request.user_agent.is_mobile %}>{% trans "Dashboard" %}</a>
- </div>
- <div class="btn-group">
- <a href="{% url 'manager:workout:overview' %}" {% auto_link_css request.user_agent.is_mobile %}>{% trans "Workouts" %}</a>
- </div>
- <div class="btn-group">
- <a href="{% url 'nutrition:plan:overview' %}" {% auto_link_css request.user_agent.is_mobile %}>{% trans "Nutrition" %}</a>
- </div>
- {% else %}
- <div class="btn-group">
- <a href="{% url 'core:user:login' %}" {% auto_link_css request.user_agent.is_mobile %}>{% trans "Login" %}</a>
- </div>
- <div class="btn-group">
- <a href="{% url 'software:features' %}" {% auto_link_css request.user_agent.is_mobile %}>{% trans "Features" %}</a>
- </div>
- {% endif %}
-</div>
-
-<script src="{% static 'bower_components/shariff/build/shariff.min.js' %}"></script>
-</body>
-{% endspaceless_config %}
-</html>
diff --git a/wger/exercises/templates/mobile/exercise/overview.html b/wger/exercises/templates/mobile/exercise/overview.html
deleted file mode 100644
index 9ce72f256..000000000
--- a/wger/exercises/templates/mobile/exercise/overview.html
+++ /dev/null
@@ -1,118 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load static %}
-{% load wger_extras %}
-{% load thumbnail %}
-{% load cache %}
-
-<!--
- Title
--->
-{% block title %}{% trans "Exercises" %}{% endblock %}
-
-{% block header %}
-<script>
-$(document).ready(function() {
- // Init the autocompleter
- $('#exercise-search').devbridgeAutocomplete({
- showNoSuggestionNotice: true,
- serviceUrl: '{% url 'exercise-search' %}',
- onSelect: function (suggestion) {
- window.location.href = '/exercise/' + suggestion.data.id + '/view/'
- },
- groupBy: 'category',
- paramName: 'term'
- });
-});
-</script>
-{% endblock %}
-
-
-<!--
- Main Content
--->
-{% block content %}
-{% cache cache_timeout exercise-overview-mobile language.id %}
-{% regroup exercises by category as exercise_list %}
-<div class="panel-group" id="accordion">
- {% for item in exercise_list %}
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion" href="#collapse-{{item.grouper.pk}}">
- {% trans item.grouper.name %}
- </a>
- </h4>
- </div>
- <div id="collapse-{{item.grouper.pk}}" class="panel-collapse collapse">
- <div class="panel-body">
- <div class="list-group">
- {% for exercise in item.list|dictsort:"name" %}
- <a href="{{ exercise.get_absolute_url }}" class="list-group-item wger-list-group-item">
- <div class="media">
- <span class="glyphicon glyphicon-chevron-right pull-right"></span>
- <div style="width:60px;height:60px;" class="media-left">
-
- {% if exercise.main_image %}
- <img alt="{{ exercise.name }}"
- class="media-object "
- style="max-width:100%; max-height:100%;"
- src="{{ exercise.main_image.image|thumbnail_url:'thumbnail' }}">
- {% else %}
- <img alt="{% trans 'Placeholder image for exercise' %}"
- class="media-object "
- style="max-width:100%; max-height:100%; opacity: 0.4;"
- src="{% static 'images/icons/image-placeholder.svg' %}">
- {% endif %}
- </div>
- <div class="media-body" style="position: absolute; top: 10px; left: 100px;">
- <h4 class="media-heading">{{ exercise.name }}</h4>
- <span class="text-muted">
- {% for equipment in exercise.equipment.all %}
- {% trans equipment.name %}
- {% if not forloop.last %},{% endif %}
- {% endfor %}
- </span>
- </div>
- </div>
- </a>
- {% endfor %}
- </div>
- </div>
- </div>
- </div>
- {% empty %}
- <li>{% trans "No categories." %} {% trans "Use link to create one" %}</li>
- {% endfor %}
-</div>
-{% endcache %}
-{% endblock %}
-
-
-<!--
- Side bar
--->
-{% block sidebar %}
- <h4>{% trans "Search" %}</h4>
- <input name="term"
- type="search"
- id="exercise-search"
- class="ajax-form-element form-control"
- placeholder="{% trans 'exercise name' %}">
-
-
-<p>
- {% if user.is_authenticated and not user.userprofile.is_temporary %}
- <a href="{% url 'exercise:exercise:add' %}" class="btn btn-success btn-sm">
- {% trans "Add new exercise" %}
- </a>
- {% else %}
- <a href="#" class="btn btn-success btn-sm disabled">
- {% trans "Add new exercise" %}<br>
- <small>
- {% trans "Only registered users can do this" %}
- </small>
- </a>
- {% endif %}
-</p>
-{% endblock %}
diff --git a/wger/manager/templates/mobile/schedule/view.html b/wger/manager/templates/mobile/schedule/view.html
deleted file mode 100644
index 23d3ed9c7..000000000
--- a/wger/manager/templates/mobile/schedule/view.html
+++ /dev/null
@@ -1,292 +0,0 @@
-{% extends "base.html" %}
-{% load i18n static wger_extras %}
-
-{% block title %}{{schedule.name}}{% endblock %}
-
-{% block header %}
-{% endblock %}
-
-{% block content %}
-{% for step in schedule.schedulestep_set.select_related %}
-<div class="modal fade" id="step-{{step.id}}">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">{%trans "Options" %}</h4>
- </div>
- <div class="modal-body">
- <a href="{{ step.workout.get_absolute_url }}"
- title="{% trans 'Workout' %}"
- class="btn btn-default btn-block">
- {% trans 'Workout' %}</a>
-
- <a href="{% url 'manager:step:edit' step.id %}"
- title="{% trans 'Edit' %}"
- class="btn btn-default btn-block wger-modal-dialog">
- <span class="{% fa_class 'pencil-square-o' %}"></span>
- {% trans 'Edit' %}</a>
- <a href="{% url 'manager:step:delete' step.id %}"
- title="{% trans 'Delete' %}"
- class="btn btn-default btn-block">
- <span class="{% fa_class 'trash' %}"></span>
- {% trans 'Delete' %}</a>
- </p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-{% endfor %}
-
-
-<table class="table">
- <tr>
- <th style="width: 30%;">{% trans "Start date" %}</th>
- <td>{{schedule.start_date}}</td>
- </tr>
- <tr>
- <th>{% trans "Schedule active" %}</th>
- <td>
- {% if schedule.is_active %}
- <span class="{% fa_class 'check' %}"></span>
- {% else %}
- <span class="{% fa_class 'times' %}"></span>
- {% endif %}
- </td>
- </tr>
- <tr>
- <th>{% trans "Is a loop" %}</th>
- <td>
- {% if schedule.is_loop %}
- <span class="{% fa_class 'check' %}"></span>
- <small>{% trans "This schedule is a loop and will go through the workouts above till you deactivate it" %}</small>
- {% else %}
- <span class="{% fa_class 'times' %}"></span>
- {% endif %}
- </td>
- </tr>
- {% if not schedule.is_active %}
- <tr>
- <td colspan="2">
- <a href="{% url 'manager:schedule:start' schedule.pk %}" class="btn btn-success btn-sm">
- <span class="{% fa_class 'play' %}"></span>
- {% trans "Start schedule" %}
- </a>
- </td>
- </tr>
- {% endif %}
-</table>
-
-<div class="list-group">
-{% for step in schedule.schedulestep_set.select_related %}
- <a href="#step-{{step.id}}" data-toggle="modal" class="list-group-item wger-list-group-item">
- <span class="glyphicon glyphicon-cog pull-right"></span>
-
- {% if active_workout == step %}
- <span class="label label-primary pull-right"><em>{% trans "active" %}</em></span>
- {% endif %}
-
- <h4 class="list-group-item-heading">{{ forloop.counter }} - {{ step.workout }}</h4>
- <div class="list-group-item-text">
- <p>{{ workout.creation_date }}</p>
- <p>{% trans "Weeks" %}: {{ step.duration }}</p>
- </div>
- </a>
-{% empty %}
- <a href="{% url 'manager:step:add' schedule.id %}" class="list-group-item wger-list-group-item wger-modal-dialog">
- {% trans "No workouts found." %}<br>{% trans "Add one now." %}
- </a>
-{% endfor %}
- <a href="{% url 'manager:step:add' schedule.id %}" class="list-group-item list-group-item-success wger-modal-dialog">
- <span class="{% fa_class 'plus' %}"></span>
- {% trans "Add workout" %}
- </a>
-</div>
-<p><small>{% blocktrans %}Add as many workouts to the schedule as you want. You can
-edit the order by dragging and dropping them. It's also possible to add one workout more
-than once.{% endblocktrans %}</small></p>
-
-
-
-
-{% for step in schedule.schedulestep_set.select_related %}
-{% with step_dates=step.get_dates %}
- <div class="row">
- <div class="col-md-3">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4 class="panel-title">
- {% blocktrans count weeks=step.duration %}{{ weeks }} Week
- {% plural %}{{ weeks }} Weeks
- {% endblocktrans %}
- </h4>
-
- {% if active_workout == step %}
- <span class="label label-info">{% trans "active" %}</span>
- {% endif %}
- </div>
- <div class="panel-body">
- <span>{{step_dates.0}} <br> {{step_dates.1}}</span>
- </div>
- <div class="panel-footer">
- <a href="{% url 'manager:workout:view' step.workout.id %}"
- class="btn btn-default btn-block btn-sm"
- style="white-space: normal;">
- <span class="glyphicon glyphicon-chevron-right pull-right"></span>
- {{ step.workout }}
- </a>
- </div>
- </div>
- </div>
- <div class="col-md-9">
- {% for day in step.workout.canonical_representation.day_list %}
- <div id="div-day-{{ day.obj.id }}">
- {% render_day day.obj False %}
- </div>
- {% endfor %}
- </div>
- </div>
-{% endwith %}
-{% endfor %}
-
-
-
-
-
-{% endblock %}
-
-
-{% block sidebar %}
-<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">&times;</button>
- <h4 class="modal-title">{% trans "Export calendar file" %}</h4>
- </div>
- <div class="modal-body">
- <p>{% trans "Export this schedule as a calendar file." %}</p>
- <p>{% blocktrans %}You can then import the file it into your calendar
-application for example google calendar, outlook or iCal. This will create
-an appointment for each training day with the appropriate exercises.{% endblocktrans %}</p>
- <p>
- <a href="{% url 'manager:schedule:ical' schedule.id uid token %}" {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Export calendar file" %}
- </a>
- </p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-
-<div class="modal fade" id="download-pdf-popup">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">{% trans "Download as PDF" %}</h4>
- </div>
- <div class="modal-body">
- <form class="wger-form">
- <div id="pdf-download-info" data-schedule-id="{{ schedule.id }}" data-uid="{{ uid }}" data-token="{{ token }}"></div>
- <div class="form-group">
- <div>
- <label for="id_images" class="col-md-3 control-label">
- {% trans "Type" %}
- </label>
- </div>
- <div class="col-md-9" style="padding-left: 35px;">
- <div class="radio">
- <input type="radio" name="pdf_type" id="id_type_log" value="log" checked>
- {% trans "Log" %}
- </div>
- <div class="radio">
- <input type="radio" name="pdf_type" id="id_type_table" value="table">
- {% trans "Table" %}
- </div>
- </div>
- </div>
- <div class="form-group">
- <div>
- <label for="id_images" class="col-md-3 control-label">
- {% trans "with images" %}
- </label>
- </div>
- <div class="col-md-9">
- <input type="checkbox" class="checkbox" name="images" id="id_images" checked>
- </div>
- </div>
- <div class="form-group">
- <div>
- <label for="id_comments" class="col-md-3 control-label">
- {% trans "with comments" %}
- </label>
- </div>
- <div class="col-md-9">
- <input type="checkbox" class="checkbox" name="comments" id="id_comments" checked>
- </div>
- </div>
- </form>
-
- <p>
- <a href="" class="btn btn-block btn-default" id="download-pdf-button">
- {% trans "Download" %}
- </a>
- </p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-{% endblock %}
-
-
-
-{# #}
-{# Options #}
-{# #}
-{% block options %}
- <div class="btn-group">
- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span class="{% fa_class 'cog' %}"></span>
- {% trans "Options" %}
- </button>
- <ul class="dropdown-menu">
- <li>
- <a href="#" data-toggle="modal" data-target="#export-ical-popup">
- <span class="{% fa_class 'calendar' %}"></span>
- {% trans "Export calendar file" %}
- </a>
- </li>
- <li>
- <a data-toggle="modal" data-target="#download-pdf-popup">
- <span class="{% fa_class 'download' %}"></span>
- {% trans "Download as PDF" %}
- </a>
- </li>
- {% if is_owner %}
- <li>
- <a href="{% url 'manager:schedule:edit' schedule.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'pencil-square-o' %}"></span>
- {% trans "Edit schedule" %}
- </a>
- </li>
- <li role="separator" class="divider"></li>
- <li>
- <a href="{% url 'manager:schedule:delete' schedule.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'trash' %}"></span>
- {% trans "Delete schedule" %}
- </a>
- </li>
- {% endif %}
- </ul>
- </div>
-{% endblock %}
diff --git a/wger/manager/templates/mobile/set/add.html b/wger/manager/templates/mobile/set/add.html
deleted file mode 100644
index 82b10b781..000000000
--- a/wger/manager/templates/mobile/set/add.html
+++ /dev/null
@@ -1,74 +0,0 @@
-{% extends extend_template %}
-{% load i18n static wger_extras %}
-
-
-<!--
- Title
--->
-
-{% block title %}{% with day_name=day.description %}{% blocktrans %}Add exercises to day "{{day_name}}"{% endblocktrans %}{% endwith %}{% endblock %}
-
-
-<!--
- Header
--->
-{% block header %}
-<script>
-$(document).ready(function() {
- wgerInitEditSet();
-});
-</script>
-{% endblock %}
-
-<!--
- Main Content
--->
-{% block content %}
-
-<form action="{{form_action}}"
- method="post"
- class="wger-form">
-
- {% csrf_token %}
- {% render_form_field form.categories_list %}
- {% render_form_field form.exercise_list %}
- <div class="form-group">
- <div class="offset-md-3 col-md-9">
- <div id="exercise-search-log"></div>
- </div>
- </div>
-
- <div class="form-group">
- <label for="id_sets" class="control-label col-md-3">
- {{form.sets.label}}
- - <span id="id_sets_value">{{ form.sets.value }}</span>
- </label>
- <div class="col-md-9">
- <input name="sets"
- id="id_sets"
- min="1"
- max="10"
- value="{{ form.sets.value }}"
- type="range"
- class="form-control">
- </div>
- </div>
- <div class="form-group">
- <div class="col-md-offset-3 col-md-9">
- <span class="text-muted">{% blocktrans %}If you do the same repetitions for all sets,
-you can just enter one value: e.g. for 4 sets just enter one "10" for the repetitions, this
-automatically becomes "4 x 10".{% endblocktrans %}</span>
- </div>
- </div>
-
-
- <div class="form-group">
- <div class="col-md-offset-3 col-md-9" id="formsets">
- {% for formset in formsets %}
- {% include 'set/formset.html' with exercise=formset.exercise formset=formset.formset %}
- {% endfor %}
- </div>
- </div>
- {% render_form_submit %}
-</form>
-{% endblock %}
diff --git a/wger/manager/templates/mobile/tags/language_select.html b/wger/manager/templates/mobile/tags/language_select.html
deleted file mode 100644
index 0d04720be..000000000
--- a/wger/manager/templates/mobile/tags/language_select.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{% load i18n %}
-{% load static %}
-
-<a href="{{i18n_path}}" class="list-group-item wger-list-group-item">
-<span class="glyphicon glyphicon-chevron-right pull-right"></span>
-
- <img src="{% static path %}"
- width="18"
- height="11"
- alt="{% trans language_name %}"
- title="{% trans language_name %}"
- style="border: 1px solid #151515;">
- {% trans language_name %}
-</a>
diff --git a/wger/manager/templates/mobile/tags/render_day.html b/wger/manager/templates/mobile/tags/render_day.html
deleted file mode 100644
index 48de2c47c..000000000
--- a/wger/manager/templates/mobile/tags/render_day.html
+++ /dev/null
@@ -1,199 +0,0 @@
-{% load i18n %}
-{% load static wger_extras thumbnail %}
-
-{% if editable %}
-<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">&times;</button>
- <h4 class="modal-title">{{day.obj.description}}</h4>
- </div>
- <div class="modal-body">
- <a href="{% url 'manager:day:log' day.obj.id %}"
- title="{% trans 'Add weight log to this day' %}"
- class="btn btn-default btn-block"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans 'Add weight log to this day' %}
- </a>
- {% if day.set_list|length > 0 %}
- <a href="{% url 'manager:workout:timer' day.obj.id %}"
- title="{% trans 'Start gym mode' %}"
- class="btn btn-default btn-block"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Start gym mode" %}
- </a>
- {% endif %}
- <a href="{% url 'manager:day:edit' day.obj.id %}"
- title="{% trans 'Edit' %}"
- class="btn btn-default btn-block"
- {% auto_link_css request.user_agent.is_mobile "wger-modal-dialog" %}>
- {% trans 'Edit' %}
- </a>
- <a href="{% url 'manager:day:delete' day.obj.id %}"
- title="{% trans 'Delete' %}"
- class="btn btn-default btn-block"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Delete" %}
- </a>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-{% endif %}
-
-
-{% if editable %}
-{% for set in day.set_list %}
-<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">&times;</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 'manager:set:edit' set.obj.id %}"
- title="{% trans 'Edit' %}"
- class="btn btn-default btn-block"
- {% auto_link_css request.user_agent.is_mobile "wger-modal-dialog" %}>
- {% trans "Edit" %}
- </a>
- <a href="{% url 'manager:set:delete' set.obj.id %}"
- title="{% trans 'Delete' %}"
- class="btn btn-default btn-block"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Delete" %}
- </a>
-
- <h5>{% trans "Exercises" %}</h5>
- {% for exercise in set.exercise_list %}
- <a href="{{ exercise.obj.get_absolute_url }}"
- title="{{ exercise.obj.name }}"
- class="btn btn-default btn-block"
- {% auto_link_css request.user_agent.is_mobile %}>
- {{ exercise.obj.name }}
- </a>
- {% endfor %}
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-{% endfor %}
-{% endif %}
-
-
-<div class="list-group"
- id="table-day-{{ day.obj.id }}"
- style="margin-top: 3em;">
-
- {# #}
- {# Day #}
- {# #}
- <a href="#editoptions-day-{{ day.obj.id }}" class="list-group-item active" data-toggle="modal">
- {% if editable %}
- <span class="glyphicon glyphicon-cog pull-right"></span>
- {% endif %}
-
- <h4>{{ day.obj.description }}</h4>
- {{ day.days_of_week.text }}
- </a>
-
-
- {# #}
- {# Sets #}
- {# #}
- {% for set in day.set_list %}
- {% if set.has_settings %}
- <a href="#editoptions-set-{{ set.obj.id }}"
- class="list-group-item wger-list-group-item"
- data-toggle="modal"
- id="set-{{ set.obj.id }}">
- {% else %}
- <a href="{% url 'manager:set:edit' set.obj.id %}"
- id="set-{{ set.obj.id }}"
- class="list-group-item wger-modal-dialog">
- {% endif %}
-
- {% if editable %}
- <span class="glyphicon glyphicon-cog pull-right"></span>
- {% endif %}
-
-
- {% for exercise in set.exercise_list %}
- <div id="exercise-{{ exercise.obj.id }}" class="ajax-manager:set:edit-target">
- <div class="media">
- <div class="media-left">
-
- <div style="width: 64px; height: 64px;">
- {% if exercise.obj.main_image %}
- <img class="img-responsive"
- src="{{ exercise.obj.main_image.image|thumbnail_url:'small' }}"
- alt="{{exercise.obj}}"
- style="max-width: 100%; max-height: 100%;">
- {% else %}
- <img class="img-responsive"
- src="{% static 'images/icons/image-placeholder.svg' %}"
- alt="{% trans 'Placeholder image for exercise' %}"
- style="opacity: 0.4;">
- {% endif %}
- </div>
-
- </div>
- <div class="media-body">
- <h4 class="media-heading">
- {{ exercise.obj.name }}
- </h4>
- <p>{{exercise.setting_text}}</p>
-
- {% if not exercise.setting_list %}
- <p>
- {% trans "This exercise has no repetitions." %}<br>
- {% trans "Edit them now."%}
- </p>
- {% endif %}
-
- {% if editable %}
- {% if exercise.comment_list %}
- <p class="text-muted exercise-comments">
- {% for comment in exercise.comment_list %}
- {{comment}}<br>
- {% endfor %}
- </p>
- {% endif %}
- {% endif %}
- </div>
- </div>
- </div>
- {% endfor %} <!--for exercise in set-->
- </a>
- {% empty %}
- {% if editable %}
- <a href="{% url 'manager:set:add' day.obj.id %}"
- class="list-group-item list-group-item-success wger-modal-dialog">
- {% trans "No exercises selected for this day." %}<br>
- {% trans "Add one now." %}
- </a>
- {% endif %}
- {% endfor %} <!--for set in day-->
-
- {% if day.set_list %}
- {% if editable %}
- <a href="{% url 'manager:set:add' day.obj.id %}" class="list-group-item list-group-item-success wger-modal-dialog">
- <span class="{% fa_class 'plus' %}"></span>
- {% trans "Add exercises to this workout day" %}
- </a>
- {% endif %}
- {% endif %}
-
-</div>
-
diff --git a/wger/manager/templates/mobile/workout/view.html b/wger/manager/templates/mobile/workout/view.html
deleted file mode 100644
index f6ed3117d..000000000
--- a/wger/manager/templates/mobile/workout/view.html
+++ /dev/null
@@ -1,270 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load static %}
-{% load wger_extras %}
-
-{# #}
-{# Opengraph #}
-{# #}
-{% block opengraph %}
- {{ block.super }}
- <meta property="og:title" content="{% trans 'Workout' %}">
- <meta property="og:description" content="{{ workout }} / {{owner_user.username}}">
-{% endblock %}
-
-
-{# #}
-{# Title #}
-{# #}
-{% block title %}{% trans "Workout" %} – {{ workout.creation_date }}{% endblock %}
-
-
-{# #}
-{# Header #}
-{# #}
-{% block header %}
-<script>
-function wgerCustomModalInit()
-{
- // Set up the edit set functions on modal dialogs
- wgerInitEditSet();
-}
-
-
-$(document).ready(function() {
- var $exercisecomments = $(".exercise-comments");
- /*
- * Show/Hide the comments to the exercises
- */
- {% if user.userprofile.show_comments %}
- $exercisecomments.show();
- {% else %}
- $exercisecomments.hide();
- {% endif %}
- wgerToggleComments();
-});
-</script>
-{% endblock %}
-
-
-{# #}
-{# Content #}
-{# #}
-{% block content %}
-{% if workout.comment %}
-<p>
- <span class="text-muted">{{workout.comment}}</span>
-</p>
-{% endif %}
-
-{% for day in workout.canonical_representation.day_list %}
- <div id="div-day-{{ day.obj.id }}">
- {% render_day day.obj is_owner %}
- </div>
-{% empty %}
-
- <div class="list-group">
- <a href="{% url 'manager:day:add' workout.id %}" class="list-group-item list-group-item-success wger-modal-dialog">
- {% trans "No days for this workout." %}<br>
- {% trans "Add training day." %}
- </a>
- </div>
-{% endfor %}
-
-
-<p style="margin-top:2em;">
- {% if is_owner %}
- <a href="{% url 'manager:day:add' workout.id %}" {% auto_link_css request.user_agent.is_mobile "wger-modal-dialog" %}>
- {% trans "Add training day" %}
- </a>
-
- <a id="exercise-comments-toggle"
- href="{% url 'core:user:preferences' %}"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Show/Hide exercise comments" %}
- </a>
- {% endif %}
-</p>
-{% endblock %}
-
-
-
-{# #}
-{# Side bar #}
-{# #}
-{% block sidebar %}
-<h4>{% trans "Steps" %}</h4>
-
-<ol>
- <li>{% trans "Add training days" %}</li>
- <li>{% trans "Add workout sets to days" %}</li>
- <li>{% trans "Set the repetitions for each set" %}</li>
-</ol>
-
-
-<h4>{% trans "Muscles trained" %}</h4>
-
-<p>
- {% trans "Images show combined muscles as trained by the exercises on the workout." %}
-</p>
-
-<div class="row">
- <div class="col-xs-6">
- <div id="muscle-front"
- class="muscle-background center-block"
- 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="col-xs-6">
- <div id="muscle-back"
- class="muscle-background center-block"
- 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 %};">
- </div>
- </div>
-</div>
-
-
-
-<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">&times;</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 calendar
-application for example google calendar, outlook or iCal. This will create
-an appointment for each training day with the appropriate exercises.{% endblocktrans %}</p>
- <p>
- <a href="{% url 'manager:workout:ical' workout.id uid token %}" {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Export calendar file" %}
- </a>
- </p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-
-
-<div class="modal fade" id="download-pdf-popup">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">{% trans "Download as PDF" %}</h4>
- </div>
- <div class="modal-body">
- <form class="wger-form">
- <div id="pdf-download-info" data-workout-id="{{ workout.id }}" data-uid="{{ uid }}" data-token="{{ token }}"></div>
- <div class="form-group">
- <div>
- <label for="id_images" class="col-md-3 control-label">
- {% trans "Type" %}
- </label>
- </div>
- <div class="col-md-9" style="padding-left: 35px;">
- <div class="radio">
- <input type="radio" name="pdf_type" id="id_type_log" value="log" checked>
- {% trans "Log" %}
- </div>
- <div class="radio">
- <input type="radio" name="pdf_type" id="id_type_table" value="table">
- {% trans "Table" %}
- </div>
- </div>
- </div>
- <div class="form-group">
- <div>
- <label for="id_images" class="col-md-3 control-label">
- {% trans "with images" %}
- </label>
- </div>
- <div class="col-md-9">
- <input type="checkbox" class="checkbox" name="images" id="id_images" checked>
- </div>
- </div>
- <div class="form-group">
- <div>
- <label for="id_comments" class="col-md-3 control-label">
- {% trans "with comments" %}
- </label>
- </div>
- <div class="col-md-9">
- <input type="checkbox" class="checkbox" name="comments" id="id_comments" checked>
- </div>
- </div>
- </form>
-
- <p>
- <a href="" class="btn btn-block btn-default" id="download-pdf-button">
- {% trans "Download" %}
- </a>
- </p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-{% endblock %}
-
-{# #}
-{# Options #}
-{# #}
-{% block options %}
-<div class="btn-group">
- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span class="{% fa_class 'cog' %}"></span>
- {% trans "Options" %}
- </button>
- <ul class="dropdown-menu">
- <li>
- <a data-toggle="modal" data-target="#download-pdf-popup">
- <span class="{% fa_class 'download' %}"></span>
- {% trans "Download as PDF" %}
- </a>
- </li>
- <li>
- <a href="{% url 'manager:log:log' workout.id %}">
- <span class="{% fa_class 'line-chart' %}"></span>
- {% trans "View weight log" %}
- </a>
- </li>
- {% if is_owner %}
- <li>
- <a href="{% url 'manager:workout:edit' workout.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'pencil-square-o' %}"></span>
- {% trans "Edit workout" %}
- </a>
- </li>
- {% endif %}
- <li>
- <a data-toggle="modal" data-target="#export-ical-popup">
- <span class="{% fa_class 'calendar' %}"></span>
- {% trans "Export calendar file" %}
- </a>
- </li>
- <li>
- <a href="{% url 'manager:workout:copy' workout.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'clone' %}"></span>
- {% trans "Make a copy of this workout" %}
- </a>
- </li>
- {% if is_owner %}
- <li role="separator" class="divider"></li>
- <li>
- <a href="{% url 'manager:workout:delete' workout.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'trash' %}"></span>
- {% trans "Delete this workout" %}
- </a>
- </li>
- </ul>
-</div>
-{% endif %}
-{% endblock %}
diff --git a/wger/nutrition/templates/mobile/plan/view.html b/wger/nutrition/templates/mobile/plan/view.html
deleted file mode 100644
index 637087d37..000000000
--- a/wger/nutrition/templates/mobile/plan/view.html
+++ /dev/null
@@ -1,384 +0,0 @@
-{% extends "base.html" %}
-{% load i18n static wger_extras %}
-
-
-{# #}
-{# Opengraph #}
-{# #}
-{% block opengraph %}
- {{ block.super }}
- <meta property="og:title" content="{% trans 'Nutrition plan' %}">
- <meta property="og:description" content="{{ plan }} / {{owner_user.username}}">
-{% endblock %}
-
-
-{# #}
-{# Title #}
-{# #}
-{% block title %}{% trans "Nutrition plan" %} – {{ plan.creation_date}}{% endblock %}
-
-
-{# #}
-{# Header #}
-{# #}
-{% block header %}
-<script>
-function wgerCustomModalInit()
-{
- // Init the autocompleter after loading the modal dialog
- wgerInitIngredientAutocompleter();
-}
-
-$(document).ready(function() {
-
- // Check if the user wants to see ingredients in english
- init_english_ingredients();
-});
-</script>
-{% endblock %}
-
-
-{# #}
-{# Content #}
-{# #}
-{% block content %}
-{% if plan.description %}
-<p>
- <span class="text-muted">{{plan.description}}</span>
-</p>
-{% endif %}
-
-
-{% if is_owner %}
-{% for meal in plan.meal_set.select_related %}
-<div class="modal fade" id="editoptions-meal-{{ meal.id }}">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">
- {% trans "Options" %} {% if meal.time %} – {{meal.time|time:"H:i"}}{% endif %}
- </h4>
- </div>
- <div class="modal-body">
- <a href="{% url 'nutrition:meal:delete' meal.id %}"
- title="{% trans 'Delete' %}"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Delete meal" %}
- </a>
- <a href="{% url 'nutrition:meal:edit' meal.id %}"
- title="{% trans 'Edit' %}"
- {% auto_link_css request.user_agent.is_mobile "wger-modal-dialog" %}>
- {% trans "Edit meal" %}
- </a>
- <a href="{% url 'nutrition:meal_item:add' meal.id %}"
- title="{% trans 'Add' %}"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Add item to meal" %}
- </a>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
-</div>
-
-
-
-
-
-{% for item in meal.mealitem_set.select_related %}
- <div class="modal fade" id="editoptions-item-{{ item.id }}">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">
- {% trans "Options" %}
- </h4>
- </div>
- <div class="modal-body">
- <h4>{{item.ingredient}}</h4>
- <h4>
- {% if item.get_unit_type == MEALITEM_WEIGHT_GRAM %}{{ item.amount|floatformat:"0" }}g
- {% else %}
- {{ item.amount|floatformat:"0" }} × {{ item.weight_unit.unit.name }}
- {% endif %}
- </h4>
-
- <table class="table">
- <thead>
- <tr>
- <th colspan="2">{% trans "Nutritional data" %}</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{% trans "Energy" %}</td>
- <td class="align-right">{{item.get_nutritional_values.energy|floatformat}} {% trans "kcal" %}</td>
- </tr>
- <tr>
- <td>{% trans "Protein" %}</td>
- <td class="align-right">{{item.get_nutritional_values.protein|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- </tr>
- <tr>
- <td>{% trans "Carbohydrates" %}</td>
- <td class="align-right">{{item.get_nutritional_values.carbohydrates|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- </tr>
- <tr>
- <td>{% trans "Fat" %}</td>
- <td class="align-right">{{item.get_nutritional_values.fat|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- </tr>
- </tbody>
- </table>
-
- <a href="{% url 'nutrition:meal_item:delete' item.id %}"
- title="{% trans 'Delete' %}"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Delete" %}
- </a>
- <a href="{% url 'nutrition:meal_item:edit' item.id %}"
- title="{% trans 'Edit' %}"
- {% auto_link_css request.user_agent.is_mobile %}>
- {% trans "Edit" %}
- </a>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
- </div>
- </div>
- </div>
- </div>
-
-{% endfor %}
-
-{% endfor %}
-{% endif %}
-
-
-{% for meal in plan.meal_set.select_related %}
-<div class="list-group">
-
- <a href="#editoptions-meal-{{ meal.id }}" class="list-group-item active" data-toggle="modal">
- {% if is_owner %}
- <span class="glyphicon glyphicon-cog pull-right"></span>
- {% endif %}
- {% trans "Nr."%} {{ forloop.counter }}
- {% if meal.time %} &ndash; {{meal.time|time:"H:i"}}{% endif %}
- </a>
-
- {% for item in meal.mealitem_set.select_related %}
- <a href="#editoptions-item-{{ item.id }}" data-toggle="modal" class="list-group-item wger-list-group-item">
- {% if is_owner %}
- <span class="glyphicon glyphicon-cog pull-right"></span>
- {% endif %}
- <h4>{{ item.ingredient.name }}</h4>
- <p>
- {% if item.get_unit_type == MEALITEM_WEIGHT_GRAM %}{{ item.amount|floatformat:"0" }}g
- {% else %}
- {{ item.amount|floatformat:"0" }} × {{ item.weight_unit.unit.name }}
- {% endif %}
- </p>
- </a>
- {% if forloop.last and is_owner %}
- <a href="{% url 'nutrition:meal_item:add' meal.id %}"
- class="list-group-item list-group-item-success">
- <span class="{% fa_class 'plus' %}"></span>
- {% trans "Add item to meal" %}
- </a>
- {% endif %}
- {% empty %}
- {% if is_owner %}
- <a href="{% url 'nutrition:meal_item:add' meal.id %}"
- title="{% trans 'Add one now.' %}"
- class="list-group-item list-group-item-success">
- {% trans "No items for this meal." %}<br>
- {% trans "Add one now." %}
- </a>
- {% endif %}
- {% endfor %}
-</div>
-{% empty %}
- {% if is_owner %}
- <a href="{% url 'nutrition:meal:add' plan.id %}"
- {% auto_link_css request.user_agent.is_mobile "wger-modal-dialog" %}>
- {% trans "No meals for this plan." %}<br>
- {% trans "Add one now." %}
- </a>
- {% endif %}
-{% endfor %}
-
-{% if is_owner %}
-<p style="margin-top:2em;">
- <a href="{% url 'nutrition:meal:add' plan.id %}"
- {% auto_link_css request.user_agent.is_mobile "wger-modal-dialog" %}>{% trans "Add a new meal" %}</a>
-</p>
-{% endif %}
-
-
-{% if is_owner and language.short_name != 'en' %}
- <p>
- {% trans "If you find the ingredient list too short, you might want to activate the preference to also show English ingredients." %}
- <a href="{% url 'core:user:preferences' %}" id="ajax-english-ingredients">{% trans "That's done here" %}</a>:
- {% if owner_user.userprofile.show_english_ingredients %}
- <span class="{% fa_class 'check' %}" data-show-ingredients="true"></span>
- {% else %}
- <span class="{% fa_class 'times' %}" data-show-ingredients="false"></span>
- {% endif %}
- </p>
-{% endif %}
-
-{% endblock %}
-
-
-{# #}
-{# Side bar #}
-{# #}
-{% block sidebar %}
-<h4>{% trans "Energy" %}</h4>
-<table id="nutritional-data-energy" class="table">
- <thead>
- <tr>
- <th>{% trans "Energy" %}</th>
- <th class="align-right">{{nutritional_data.total.energy|floatformat:"0"}} {% trans "kcal" %}</th>
- </tr>
- </thead>
- <tbody>
- {% if is_owner and owner_user.userprofile.calories and plan.has_goal_calories %}
- {% with total=plan.get_calories_approximation %}
- <tr style="background-color:{% if total == 1 %}#8ae234;{% elif total == 2 %}#fce94f;{% elif total == 3 %}#fcaf3e;{% elif total > 3 %}#ef2929;{% endif %}">
- <td>{% trans "Goal" %}</td>
- <td class="align-right">
- <strong>{{owner_user.userprofile.calories|floatformat:"0"}} {% trans "kcal" %}</strong>
- </td>
- </tr>
- {% endwith %}
- {% endif %}
- </tbody>
-</table>
-
-
-{% if is_owner and plan.has_goal_calories %}
- <p>{% blocktrans %}You have selected that this nutritional plan has a
- goal amount of calories. Use the calculator or enter the value yourself.{% endblocktrans %}
- <a href="{% url 'nutrition:calories:view' %}">{% trans "That's done here" %}</a>
- </p>
-{% endif %}
-
-<h4>{% trans "Nutritional data" %}</h4>
-<table class="table table-condensed">
- <thead>
- <tr style="height:4em;">
- <th>{% trans "Macronutrients" %}</th>
- <th class="align-right">{% trans "Total" %}</th>
- <th class="align-right">{% trans "Percent of energy" %}</th>
- <th class="align-right">
- {% if owner_user.userprofile.use_metric %}
- {% trans "g per body kg" %}
- {% else %}
- {% trans "oz per body lb" %}
- {% endif %}
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{% trans "Energy" %}</td>
- <td class="align-right">{{nutritional_data.total.energy|floatformat}} {% trans "kcal" %}</td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>{% trans "Protein" %}</td>
- <td class="align-right">{{nutritional_data.total.protein|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- <td class="align-right">{{nutritional_data.percent.protein|floatformat}} %</td>
- <td class="align-right">{{nutritional_data.per_kg.protein|floatformat:2}}</td>
- </tr>
- <tr>
- <td>{% trans "Carbohydrates" %}</td>
- <td class="align-right">{{nutritional_data.total.carbohydrates|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- <td class="align-right">{{nutritional_data.percent.carbohydrates|floatformat}} %</td>
- <td class="align-right">{{nutritional_data.per_kg.carbohydrates|floatformat:2}}</td>
- </tr>
- <tr>
- <td style="padding-left: 2em;">{% trans "Sugar content in carbohydrates" %}</td>
- <td class="align-right">{{nutritional_data.total.carbohydrates_sugar|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>{% trans "Fat" %}</td>
- <td class="align-right">{{nutritional_data.total.fat|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- <td class="align-right">{{nutritional_data.percent.fat|floatformat}} %</td>
- <td class="align-right">{{nutritional_data.per_kg.fat|floatformat:2}}</td>
- </tr>
- <tr>
- <td style="padding-left: 2em;">{% trans "Saturated fat content in fats" %}</td>
- <td class="align-right">{{nutritional_data.total.fat_saturated|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- <td></td>
- <td></td>
- </tr>
-
-
- <tr>
- <th colspan="4">{% trans "Others" %}</th>
- </tr>
- <tr>
- <td>{% trans "Fibres" %}</td>
- <td class="align-right">{{nutritional_data.total.fibres|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>{% trans "Sodium" %}</td>
- <td class="align-right">{{nutritional_data.total.sodium|floatformat}} {% trans_weight_unit 'g' owner_user %}</td>
- <td></td>
- <td></td>
- </tr>
- </tbody>
-</table>
-{% endblock %}
-
-
-
-{# #}
-{# Options #}
-{# #}
-{% block options %}
-<div class="btn-group">
- <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span class="{% fa_class 'cog' %}"></span>
- {% trans "Options" %}
- </button>
- <ul class="dropdown-menu">
- <li>`
- <a href="{% url 'nutrition:plan:export-pdf' plan.id uid token %}" target="_blank">
- <span class="{% fa_class 'download' %}"></span>
- {% trans "Download as PDF" %}
- </a>
- </li>
- {% if is_owner %}
- <li>
- <a href="{% url 'nutrition:plan:edit' plan.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'pencil-square-o' %}"></span>
- {% trans "Edit nutrition plan" %}
- </a>
- </li>
- <li>
- <a href="{% url 'nutrition:plan:copy' plan.id %}">
- <span class="{% fa_class 'clone' %}"></span>
- {% trans "Make a copy of this nutrition plan" %}
- </a>
- </li>
- <li role="separator" class="divider"></li>
- <li>
- <a href="{% url 'nutrition:plan:delete' plan.id %}" class="wger-modal-dialog">
- <span class="{% fa_class 'trash' %}"></span>
- {% trans "Delete nutrition plan" %}
- </a>
- </li>
- {% endif %}
- </ul>
-</div>
-{% endblock %}