Private
Public Access
1
0

added OTW and workouttype to favoritechart model

This commit is contained in:
Sander Roosendaal
2016-12-07 18:12:38 +01:00
parent bfc05a7de6
commit 84c3b7e175
5 changed files with 82 additions and 11 deletions

View File

@@ -15,6 +15,9 @@
</table>
</div>
{% endfor %}
<div class="grid_12 alpha">
<p>&nbsp;</p>
</div>
<div class="grid_12 alpha">
<div class="grid_2">
<p><input type="submit" value="Update Favorites" class="button green small"/></p>
@@ -22,6 +25,8 @@
</div>
</form>
<!-- Include formset plugin - including jQuery dependency -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="/static/js/jquery.formset.js"></script>

View File

@@ -163,6 +163,7 @@
</div>
{% if user.rower.rowerplan == 'pro' %}
<div id="favorites" class="grid_12 alpha">
<div class="grid_2 suffix_4 alpha">
{% if maxfav >= 0 %}
@@ -193,7 +194,7 @@
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% endlocaltime %}

View File

@@ -198,6 +198,38 @@
</div>
{% if user.rower.rowerplan == 'pro' %}
<div id="favorites" class="grid_12 alpha">
<div class="grid_2 suffix_4 alpha">
{% if maxfav >= 0 %}
<a class="button gray small" href="/rowers/me/favoritecharts">Manage Favorites</a>
{% else %}
&nbsp;
{% endif %}
</div>
<div class="grid_1">
{% if favoritenr > 0 %}
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:-1 }}">&lt</a>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
<div class="grid_2">
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
{% csrf_token %}
<input class="grid_2 alpha button blue small" type="hidden" name="savefavorite" value="True">
<input class="grid_2 alpha button blue small" value="Make Favorite" type="Submit">
</form>
</div>
<div class="grid_1">
{% if favoritenr < maxfav %}
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:1 }}">&gt</a>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% endlocaltime %}