Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Further integration of bootstrap

Roland Geider11788e88adc2
diff --git a/wger/core/static/css/bootstrap-custom.css b/wger/core/static/css/bootstrap-custom.css
index 3f3546145..d10795bfe 100644
--- a/wger/core/static/css/bootstrap-custom.css
+++ b/wger/core/static/css/bootstrap-custom.css
@@ -13,6 +13,10 @@ body {
margin-bottom: 0px;
}
+#main-content{
+ min-height: 40em;
+}
+
#nav, .navbar-inverse .navbar-inner {
background-color: #1b1b1b;
background-image: -moz-linear-gradient(top, #222222, #111111);
diff --git a/wger/core/static/css/bootstrap.css b/wger/core/static/css/bootstrap.css
index 6c93e8162..318100619 100644
--- a/wger/core/static/css/bootstrap.css
+++ b/wger/core/static/css/bootstrap.css
@@ -5630,7 +5630,7 @@ button.close {
.nav:after,
.navbar:after,
.navbar-header:after,
-.navbar-collapse:after,
+.navbar-collapse:after,modal-dialog
.pager:after,
.panel-body:after,
.modal-footer:after {
diff --git a/wger/core/static/css/workout-manager.css b/wger/core/static/css/workout-manager.css
index 0af963614..a4f613669 100644
--- a/wger/core/static/css/workout-manager.css
+++ b/wger/core/static/css/workout-manager.css
@@ -219,7 +219,7 @@ header span.regular{
* Make more space for the page title
*/
#page-title{
- margin-top: 0px;
+ margin-top: 0.5em;
}
#content-wrapper{
diff --git a/wger/core/templates/base.html b/wger/core/templates/base.html
index 6e6802603..fc1506dd5 100644
--- a/wger/core/templates/base.html
+++ b/wger/core/templates/base.html
@@ -1,6 +1,6 @@
{% extends "template.html" %}
{% block template %}
-<h2 id="page-title">{% block title %}{% endblock %}</h2>
+<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 %}
diff --git a/wger/core/templates/base_wide.html b/wger/core/templates/base_wide.html
index 1d058e362..d75d119d8 100644
--- a/wger/core/templates/base_wide.html
+++ b/wger/core/templates/base_wide.html
@@ -1,17 +1,18 @@
{% extends "template.html" %}
{% block template %}
- <h2 id="page-title">{% block title %}{% endblock %}</h2>
- <article class="ym-grid ym-gl content">
- <div class="ym-gbox-left ym-clearfix" 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">&times;</a>
- {{message}}
- </div>
- {% endfor %}
- {% endif %}
- {% block content %}{% endblock %}
- </div>
- </article>
+<h2 id="page-title" class="page-header">{% block title %}{% endblock %}</h2>
+<div class="row">
+ <div class="col-md-12" 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">&times;</a>
+ {{message}}
+ </div>
+ {% endfor %}
+ {% endif %}
+
+ {% block content %}{% endblock %}
+ </div>
+</div>
{% endblock %}
diff --git a/wger/core/templates/index.html b/wger/core/templates/index.html
index 9161f95dc..800c07d7c 100644
--- a/wger/core/templates/index.html
+++ b/wger/core/templates/index.html
@@ -21,146 +21,136 @@ $(document).ready(function() {
{% block content %}
-<div class="ym-grid linearize-level-1">
- <div class="ym-g50 ym-gl">
- <div class="ym-gbox-left">
- <h3>{% trans "Workout"%}</h3>
- {% if current_workout %}
- <div id="calendar-day-select-popup"
- style="display:none;"
- title="{% trans 'Add log to day' %}">
- <div>
- {% if current_workout %}
- <p>{% blocktrans %}Click to add weight logs to a training
+<div class="row">
+ <div class="col-md-6">
+ <h3>{% trans "Workout"%}</h3>
+ {% if current_workout %}
+ <div id="calendar-day-select-popup"
+ style="display:none;"
+ title="{% trans 'Add log to day' %}">
+ <div>
+ {% if current_workout %}
+ <p>{% blocktrans %}Click to add weight logs to a training
day in your current workout:{% endblocktrans %} {{current_workout}}</p>
- {% for day in current_workout.day_set.all %}
- <a href="{% url 'day-log' day.pk %}" class="btn btn-block">{{day.description}}</a>
- {% endfor %}
- {% endif %}
- </div>
+ {% for day in current_workout.day_set.all %}
+ <a href="{% url 'day-log' day.pk %}" class="btn btn-block">{{day.description}}</a>
+ {% endfor %}
+ {% endif %}
</div>
+ </div>
- <p>
- <a href="{% url 'workout-view' current_workout.id %}">
- {% if current_workout.comment %}
- {{ current_workout.comment }}
- {% else %}
- {% trans "Workout" %}
- {% endif %}
- </a>
- </p>
- – {{ current_workout.creation_date }}
-
- <ul>
- {% for day, exercise, is_workout in weekdays %}
- <li>
- {% if not is_workout %}<span class="dimmed">{% endif%}
- {{ day }}:
-
- {{ exercise }}
- {% if not is_workout %}</span>{% endif%}
-
- </li>
- {% endfor %}
- </ul>
-
- {% if current_workout.day_set.all %}
- <p><a href="" id="logging-popup-link">{% trans "Add new log" %}</a></p>
+ <p>
+ <a href="{% url 'workout-view' current_workout.id %}">
+ {% if current_workout.comment %}
+ {{ current_workout.comment }}
+ {% else %}
+ {% trans "Workout" %}
{% endif %}
-
- {% if schedule %}
+ </a>
+ </p>
+ – {{ current_workout.creation_date }}
+
+ <ul>
+ {% for day, exercise, is_workout in weekdays %}
+ <li>
+ {% if not is_workout %}<span class="dimmed">{% endif%}
+ {{ day }}:
+
+ {{ exercise }}
+ {% if not is_workout %}</span>{% endif%}
+
+ </li>
+ {% endfor %}
+ </ul>
+
+ {% if current_workout.day_set.all %}
+ <p><a href="" id="logging-popup-link">{% trans "Add new log" %}</a></p>
+ {% endif %}
+
+ {% if schedule %}
+ <p>
+ → {% trans "This workout is part of a schedule:" %}
+ <a href="{{schedule.get_absolute_url}}">{{schedule.name}}</a>
+ </p>
+ {% endif %}
+
+ {% else %}
<p>
- → {% trans "This workout is part of a schedule:" %}
- <a href="{{schedule.get_absolute_url}}">{{schedule.name}}</a>
+ <a href="{% url 'workout-add' %}" class="btn btn-block">
+ {% trans "No workouts found." %} {% trans "Add one now." %}
+ </a>
</p>
- {% endif %}
-
- {% else %}
- <p>
- <a href="{% url 'workout-add' %}" class="btn btn-block">
- {% trans "No workouts found." %} {% trans "Add one now." %}
- </a>
- </p>
- {% endif %}
- </div>
+ {% endif %}
</div>
- <div class="ym-g50 ym-gr">
- <div class="ym-gbox-right">
-
-
- <h3>{% trans "Nutrition plan"%}</h3>
-
- {% if plan %}
- <p>
- <a href="{% url 'nutrition-view' plan.id %}">
- {% if plan.description %}
- {{ plan.description }}
- {% else %}
- {% trans "Nutrition plan" %}
- {% endif %}
- </a>
- </p>
- – {{ plan.creation_date }}
- <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>
+ <div class="col-md-6">
+ <h3>{% trans "Nutrition plan"%}</h3>
- {% else %}
- <p>
- <a href="{% url 'nutrition-add' %}" class="btn btn-block">
- {% trans "No nutrition plans." %} {% trans "Add one now." %}
- </a>
- </p>
- {% endif %}
- {% if weight %}
+ {% if plan %}
+ <p>
+ <a href="{% url 'nutrition-view' plan.id %}">
+ {% if plan.description %}
+ {{ plan.description }}
+ {% else %}
+ {% trans "Nutrition plan" %}
+ {% endif %}
+ </a>
+ </p>
+ – {{ plan.creation_date }}
+ <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>
+
+ {% else %}
<p>
- {% trans "Your current weight is: "%} <strong>{{weight.weight|floatformat}} kg.</strong>
+ <a href="{% url 'nutrition-add' %}" class="btn btn-block">
+ {% trans "No nutrition plans." %} {% trans "Add one now." %}
+ </a>
</p>
- {% endif %}
- </div>
+ {% endif %}
+ {% if weight %}
+ <p>
+ {% trans "Your current weight is: "%} <strong>{{weight.weight|floatformat}} kg.</strong>
+ </p>
+ {% endif %}
</div>
</div>
-<div class="ym-grid linearize-level-1">
- <div class="ym-g50 ym-gl">
- <div class="ym-gbox-left">
- <p>
- <a href="{% url 'workout-add' %}">
- <img src="{% static 'images/icons/new.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Add workout' %}"
- title="{% trans 'Add workout' %}">
- {% trans "Add workout" %}</a>
- </p>
- </div>
+<div class="row">
+ <div class="col-md-6">
+ <p>
+ <a href="{% url 'workout-add' %}">
+ <img src="{% static 'images/icons/new.svg' %}"
+ width="32"
+ height="32"
+ alt="{% trans 'Add workout' %}"
+ title="{% trans 'Add workout' %}">
+ {% trans "Add workout" %}</a>
+ </p>
</div>
- <div class="ym-g50 ym-gr">
- <div class="ym-gbox-right">
- <p>
- <a href="{% url 'nutrition-add' %}">
- <img src="{% static 'images/icons/new.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Add nutrition plan' %}"
- title="{% trans 'Add nutrition plan' %}">
- {% trans "Add nutrition plan" %}</a>
- </p>
- </div>
+ <div class="col-md-6">
+ <p>
+ <a href="{% url 'nutrition-add' %}">
+ <img src="{% static 'images/icons/new.svg' %}"
+ width="32"
+ height="32"
+ alt="{% trans 'Add nutrition plan' %}"
+ title="{% trans 'Add nutrition plan' %}">
+ {% trans "Add nutrition plan" %}</a>
+ </p>
</div>
</div>
{% endblock %}
diff --git a/wger/exercises/templates/exercise/view.html b/wger/exercises/templates/exercise/view.html
index a6422a50b..dc41d0d4d 100644
--- a/wger/exercises/templates/exercise/view.html
+++ b/wger/exercises/templates/exercise/view.html
@@ -40,31 +40,27 @@ included in the database.{% endblocktrans %}
</p>
{% if perms.exercises %}
-<div class="ym-grid linearize-level-1">
- <div class="ym-g50 ym-gl">
- <div class="ym-gbox-left">
- <div class="alert alert-success">
- <a href="{% url 'exercise-accept' exercise.id %}">
- <img src="{% static 'images/icons/status-on.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Accept' %}">
- {% trans "Accept" %}
- </a>
- </div>
+<div class="container-fluid">
+ <div class="col-md-6">
+ <div class="alert alert-success">
+ <a href="{% url 'exercise-accept' exercise.id %}">
+ <img src="{% static 'images/icons/status-on.svg' %}"
+ width="32"
+ height="32"
+ alt="{% trans 'Accept' %}">
+ {% trans "Accept" %}
+ </a>
</div>
</div>
- <div class="ym-g50 ym-gl">
- <div class="ym-gbox-left">
- <div class="alert alert-error">
- <a href="{% url 'exercise-decline' exercise.id %}">
- <img src="{% static 'images/icons/status-off.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Decline' %}">
- {% trans "Decline" %}
- </a>
- </div>
+ <div class="col-md-6">
+ <div class="alert alert-error">
+ <a href="{% url 'exercise-decline' exercise.id %}">
+ <img src="{% static 'images/icons/status-off.svg' %}"
+ width="32"
+ height="32"
+ alt="{% trans 'Decline' %}">
+ {% trans "Decline" %}
+ </a>
</div>
</div>
</div>
@@ -223,44 +219,42 @@ included in the database.{% endblocktrans %}
{% trans "Secondary muscles" %}
</div>
-<div class="ym-grid linearize-level-1" style="margin-top:1em;">
- <div class="ym-g33 ym-gl">
- <div class="ym-gbox-left">
- <div id="muscle-front" class="muscle-background" style="background-image: {% for background in muscle_backgrounds_front %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};">
- </div>
- <ul>
- {% for muscle in muscles %}
- {% if muscle.is_front %}
- <li>{{muscle.name}}</li>
- {% endif %}
- {% endfor %}
-
- {% for muscle in muscles_secondary %}
- {% if muscle.is_front %}
- <li>{{muscle.name}}</li>
- {% endif %}
- {% endfor %}
- </ul>
+
+
+<div class="container-fluid" style="margin-top:1em;">
+ <div class="col-md-6">
+ <div id="muscle-front" class="muscle-background" style="background-image: {% for background in muscle_backgrounds_front %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};">
</div>
+ <ul>
+ {% for muscle in muscles %}
+ {% if muscle.is_front %}
+ <li>{{muscle.name}}</li>
+ {% endif %}
+ {% endfor %}
+
+ {% for muscle in muscles_secondary %}
+ {% if muscle.is_front %}
+ <li>{{muscle.name}}</li>
+ {% endif %}
+ {% endfor %}
+ </ul>
</div>
- <div class="ym-g33 ym-gl">
- <div class="ym-gbox-right">
+ <div class="col-md-6">
<div id="muscle-back" class="muscle-background" style="background-image: {% for background in muscle_backgrounds_back %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};">
</div>
<ul>
- {% for muscle in muscles %}
- {% if not muscle.is_front %}
- <li>{{muscle.name}}</li>
- {% endif %}
- {% endfor %}
-
- {% for muscle in muscles_secondary %}
- {% if not muscle.is_front %}
- <li>{{muscle.name}}</li>
- {% endif %}
- {% endfor %}
+ {% for muscle in muscles %}
+ {% if not muscle.is_front %}
+ <li>{{muscle.name}}</li>
+ {% endif %}
+ {% endfor %}
+
+ {% for muscle in muscles_secondary %}
+ {% if not muscle.is_front %}
+ <li>{{muscle.name}}</li>
+ {% endif %}
+ {% endfor %}
</ul>
- </div>
</div>
</div>
diff --git a/wger/exercises/templates/muscles/overview.html b/wger/exercises/templates/muscles/overview.html
index c928a247c..ca8385b67 100644
--- a/wger/exercises/templates/muscles/overview.html
+++ b/wger/exercises/templates/muscles/overview.html
@@ -41,62 +41,56 @@ $(document).ready(function() {
{% cache cache_timeout muscle-overview language.id %}
{% trans "Hover with the mouse over the muscles to show corresponding exercises." %}
-<div class="ym-grid linearize-level-1">
- <div class="ym-g33 ym-gl">
- <div class="ym-gbox-left">
- <h3 style="padding-bottom:0.5em;">{% trans "Muscles" %}</h3>
- <div id="muscle-system"
- class="muscle-background"
- style="background-image: url('/static/images/muscles/muscular_system_front.svg');">
- </div>
+<div class="row">
+ <div class="col-md-4">
+ <h3 style="padding-bottom:0.5em;">{% trans "Muscles" %}</h3>
+ <div id="muscle-system"
+ class="muscle-background"
+ style="background-image: url('/static/images/muscles/muscular_system_front.svg');">
</div>
</div>
- <div class="ym-g33 ym-gl">
- <div class="ym-gbox-left">
- {# Why do we need to use |first? #}
- {% regroup muscle_list|first by is_front as muscle_group %}
- {% for group in muscle_group %}
- {% if group.grouper %}
- <h3>{% trans "Front side" %}</h3>
- {% else %}
- <h3>{% trans "Back side" %}</h3>
- {% endif %}
-
- <ul class="muscle-list">
- {% for muscle in group.list %}
- <li class="muscle"
- data-target="muscle-{{muscle.id}}"
- data-is-front="{{muscle.is_front}}"
- data-name="{{muscle.name}}"
- itemscope itemtype="http://schema.org/Muscle">
- <span itemprop="name">{{muscle.name}}</span>
- </li>
- {% endfor %}
- </ul>
+ <div class="col-md-4">
+ {# Why do we need to use |first? #}
+ {% regroup muscle_list|first by is_front as muscle_group %}
+ {% for group in muscle_group %}
+ {% if group.grouper %}
+ <h3>{% trans "Front side" %}</h3>
+ {% else %}
+ <h3>{% trans "Back side" %}</h3>
+ {% endif %}
+
+ <ul class="muscle-list">
+ {% for muscle in group.list %}
+ <li class="muscle"
+ data-target="muscle-{{muscle.id}}"
+ data-is-front="{{muscle.is_front}}"
+ data-name="{{muscle.name}}"
+ itemscope itemtype="http://schema.org/Muscle">
+ <span itemprop="name">{{muscle.name}}</span>
+ </li>
{% endfor %}
- </div>
+ </ul>
+ {% endfor %}
</div>
- <div class="ym-g33 ym-gr">
- <div class="ym-gbox-right">
- {% for muscle in muscle_list|first %}
- <div id="muscle-{{muscle.id}}" style="display:none;" class="exercise-list">
- <h3>{% trans "Exercises" %}</h3>
- <ul class="exercise-overview">
- {% for exercise in muscle.exercise_set.select_related %}
- {% if exercise.language in active_languages %}
- <li class="exercise">
- <a href="{{exercise.get_absolute_url}}">{{exercise}}</a>
- </li>
- {% endif %}
- {% empty %}
- <li>
- <em>{% trans "No exercises that mainly train this muscle" %}</em>
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endfor %}
- </div>
+ <div class="col-md-4">
+ {% for muscle in muscle_list|first %}
+ <div id="muscle-{{muscle.id}}" style="display:none;" class="exercise-list">
+ <h3>{% trans "Exercises" %}</h3>
+ <ul class="exercise-overview">
+ {% for exercise in muscle.exercise_set.select_related %}
+ {% if exercise.language in active_languages %}
+ <li class="exercise">
+ <a href="{{exercise.get_absolute_url}}">{{exercise}}</a>
+ </li>
+ {% endif %}
+ {% empty %}
+ <li>
+ <em>{% trans "No exercises that mainly train this muscle" %}</em>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endfor %}
</div>
</div>
{% endcache %}
diff --git a/wger/manager/templates/schedule/overview.html b/wger/manager/templates/schedule/overview.html
index 80027c064..823996bee 100644
--- a/wger/manager/templates/schedule/overview.html
+++ b/wger/manager/templates/schedule/overview.html
@@ -17,7 +17,7 @@ function custom_modal_init()
{% endblock %}
{% block content %}
-<table id="workout-table">
+<table class="table">
<thead>
<tr>
<th>{% trans "Description" %}</th>
@@ -32,7 +32,7 @@ function custom_modal_init()
{{ schedule.name }}
</a>
{% if schedule.is_active %}
- <span class="label label-info">{% trans "active" %}</span>
+ <span class="label label-primary">{% trans "active" %}</span>
{% endif %}
</td>
<td>
diff --git a/wger/manager/templates/schedule/view.html b/wger/manager/templates/schedule/view.html
index 995606437..60f6d90b5 100644
--- a/wger/manager/templates/schedule/view.html
+++ b/wger/manager/templates/schedule/view.html
@@ -58,7 +58,7 @@ $(document).ready(function() {
{% block content %}
<div id="schedule-table-container">
-<table id="schedule-table">
+<table id="schedule-table" class="table">
<thead>
<tr>
<th>{% trans "Nr." %}</th>
@@ -74,8 +74,6 @@ $(document).ready(function() {
{{ forloop.counter }}
</td>
<td style="min-width: 6em;">
-<!-- {{ forloop.counter }} -->
-
<span class="editoptions">
<img src="{% static 'images/icons/move.svg' %}"
width="22"
diff --git a/wger/manager/templates/tags/render_day.html b/wger/manager/templates/tags/render_day.html
index 81d14ab5e..eef7f7841 100644
--- a/wger/manager/templates/tags/render_day.html
+++ b/wger/manager/templates/tags/render_day.html
@@ -15,10 +15,10 @@ $(document).ready(function() {
})
</script>
-<table class="bordertable workout-table" id="table-day-{{ day.obj.id }}">
+<table class="table table-bordered workout-table" id="table-day-{{ day.obj.id }}">
<thead>
<tr id="day-{{ day.obj.id }}">
- <th colspan="2">
+ <th colspan="2" style="background: none repeat scroll 0% 0% #E0E0E0;">
{{ day.days_of_week.text }} – {{ day.obj.description }}
diff --git a/wger/manager/templates/workout/calendar.html b/wger/manager/templates/workout/calendar.html
index 415a7183f..58282ba2d 100644
--- a/wger/manager/templates/workout/calendar.html
+++ b/wger/manager/templates/workout/calendar.html
@@ -38,15 +38,25 @@ $(document).ready(function() {
{% with tmp=grouped_logs|first %}
{% with first_log=tmp.list|first %}
{% with session=first_log.get_workout_session %}
- <p>
- <a href="{{first_log.workout.get_absolute_url}}" class="btn">{{ first_log.workout }}</a>
- <a href="{% url 'workout-log' first_log.workout.id %}" class="btn">{% trans "Log overview" %}</a>
- {% if session %}
- <a href="{% url 'workout-session-edit' session.pk %}" class="btn modal-dialog">{% trans "Edit workout session" %}</a>
- {% else %}
- <a href="{% url 'workout-session-add' first_log.workout_id date|date:'Y' date|date:'m' date|date:'d' %}" class="btn modal-dialog">{% trans "Add workout impression" %}</a>
- {% endif %}
- </p>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-4">
+ <a href="{{first_log.workout.get_absolute_url}}" class="btn btn-default btn-block">{{ first_log.workout }}</a>
+ </div>
+
+ <div class="col-md-4">
+ <a href="{% url 'workout-log' first_log.workout.id %}" class="btn btn-default btn-block">{% trans "Log overview" %}</a>
+ </div>
+
+ <div class="col-md-4">
+ {% if session %}
+ <a href="{% url 'workout-session-edit' session.pk %}" class="btn btn-default btn-block modal-dialog">{% trans "Edit workout session" %}</a>
+ {% else %}
+ <a href="{% url 'workout-session-add' first_log.workout_id date|date:'Y' date|date:'m' date|date:'d' %}" class="btn btn-default btn-block modal-dialog">{% trans "Add workout impression" %}</a>
+ {% endif %}
+ </div>
+ </div>
+ </div>
{% if session %}
<p>
<strong>{% trans "Time" %}:</strong>
diff --git a/wger/manager/templates/workout/overview.html b/wger/manager/templates/workout/overview.html
index e6fc4d0fc..1547c6408 100644
--- a/wger/manager/templates/workout/overview.html
+++ b/wger/manager/templates/workout/overview.html
@@ -7,7 +7,7 @@
{% block content %}
{% if workouts %}
- <table id="workout-table">
+<table class="table">
<thead>
<tr>
<th>{% trans "Description" %}</th>
@@ -22,7 +22,7 @@
{{ workout }}
</a>
{% if workout == current_workout %}
- <span class="label label-info">{% trans "active" %}</span>
+ <span class="label label-primary">{% trans "active" %}</span>
{% endif %}
</td>
<td>
@@ -31,7 +31,7 @@
</tr>
{% endfor %}
</tbody>
- </table>
+</table>
{% else %}
<p>
<a href="{% url 'workout-add' %}" class="btn btn-block">
diff --git a/wger/manager/views/log.py b/wger/manager/views/log.py
index 06967305b..b9e3236ed 100644
--- a/wger/manager/views/log.py
+++ b/wger/manager/views/log.py
@@ -315,6 +315,7 @@ class WorkoutCalendar(HTMLCalendar):
super(WorkoutCalendar, self).__init__()
self.workout_logs = self.group_by_day(workout_logs)
+
def formatday(self, day, weekday):
if day != 0:
cssclass = self.cssclasses[weekday]
@@ -336,8 +337,25 @@ class WorkoutCalendar(HTMLCalendar):
return self.day_cell('noday', '&nbsp;')
def formatmonth(self, year, month):
+ '''
+ Format the table header. This is the same code from python's calendar module
+ but with an additional 'table' class
+ '''
self.year, self.month = year, month
- return super(WorkoutCalendar, self).formatmonth(year, month)
+ v = []
+ a = v.append
+ a('<table border="0" cellpadding="0" cellspacing="0" class="month table">')
+ a('\n')
+ a(self.formatmonthname(year, month))
+ a('\n')
+ a(self.formatweekheader())
+ a('\n')
+ for week in self.monthdays2calendar(year, month):
+ a(self.formatweek(week))
+ a('\n')
+ a('</table>')
+ a('\n')
+ return ''.join(v)
def group_by_day(self, workout_logs):
'''