-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from andela/ft-set-up-support-for-drop-sets-140…
…649403 Ft set up support for drop sets 140649403
- Loading branch information
Showing
11 changed files
with
307 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.12 on 2017-03-20 07:51 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('exercises', '0004_auto_20170301_1156'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='equipment', | ||
name='weight_choice', | ||
field=models.CharField(choices=[('5', '5 Kgs'), ('10', '10 Kgs'), ('15', '15 Kgs'), ('20', '20 Kgs')], max_length=10, null=True), | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
wger/exercises/migrations/0006_remove_equipment_weight_choice.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.12 on 2017-03-21 07:33 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('exercises', '0005_equipment_weight_choice'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='equipment', | ||
name='weight_choice', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.12 on 2017-03-20 07:51 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('gym', '0007_auto_20170301_1156'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='gymconfig', | ||
name='weeks_inactive', | ||
field=models.PositiveIntegerField(default=4, help_text='Number of weeks since the last time a user logged his presence to be considered inactive', verbose_name='Reminder of inactive members'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{% extends extend_template %} | ||
{% load i18n %} | ||
{% load staticfiles %} | ||
{% load wger_extras %} | ||
|
||
|
||
<!-- | ||
Title | ||
--> | ||
|
||
{% block title %}{% with day_name=day.description %}{% blocktrans %}Add drop set exercises to day "{{day_name}}"{% endblocktrans %}{% endwith %}{% endblock %} | ||
|
||
|
||
<!-- | ||
Header | ||
--> | ||
{% block header %} | ||
<script> | ||
function wgerCustomPageInit() | ||
{ | ||
wgerInitEditSet(); | ||
} | ||
</script> | ||
{% endblock %} | ||
|
||
<!-- | ||
Main Content | ||
--> | ||
{% block content %} | ||
|
||
|
||
<form action="{{form_action}}" | ||
method="post" | ||
class="form-horizontal"> | ||
|
||
{% csrf_token %} | ||
{% render_form_field form.exercises %} | ||
<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"> | ||
<label class="col-md-3 control-label"> | ||
{% trans "Repetitions" %} | ||
</label> | ||
<div class=" col-md-9"> | ||
<span class="help-block">{% 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-12"> | ||
<div id="formsets"> | ||
{% for formset in formsets %} | ||
{% include 'set/formset.html' with exercise=formset.exercise formset=formset.formset %} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
{% render_form_submit %} | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters