diff --git a/rowers/models.py b/rowers/models.py index a70a0071..1627147c 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -1556,6 +1556,7 @@ class InstantPlan(models.Model): uuid = models.UUIDField(primary_key=False,editable=True,default=uuid.uuid4) owner = models.ForeignKey(User,on_delete=models.SET_NULL,null=True) name = models.CharField(max_length=150,blank=True) + url = models.CharField(max_length=200,blank=True, verbose_name="URL Link to plan origin") goal = models.CharField(max_length=150,blank=True,verbose_name="Goal (one sentence)") description = models.TextField(max_length=450,blank=True) duration = models.IntegerField(default=6,verbose_name='Duration in Calendar Days') @@ -1596,6 +1597,7 @@ class InstantPlanForm(ModelForm): 'target', 'hoursperweek', 'sessionsperweek', + 'url', 'yaml', ] diff --git a/rowers/templates/instantplan.html b/rowers/templates/instantplan.html index 74e56684..df55e69a 100644 --- a/rowers/templates/instantplan.html +++ b/rowers/templates/instantplan.html @@ -11,6 +11,11 @@
Created by: {{ plan.owner.first_name }} {{ plan.owner.last_name }}
+ {% if plan.url %} +Link: + {{ plan.url }} +
+ {% endif %}Plan length: {{ plan.duration }} days
{{ plan.description }}
{{ plan.target }}
@@ -18,27 +23,37 @@{{ plan.hoursperweek }} hours per week
{{ plan.sessionsperweek }} sessions per week
| Week | -Day | -Workouts | +Day 1 | +Day 2 | +Day 3 | +Day 4 | +Day 5 | +Day 6 | +Day 7 |
|---|---|---|---|---|---|---|---|---|---|
| {{ day.week }} | -{{ day.order }} | -+ | + Week {{ day.week }} + | + {% endif %} +
{% for workout in day.workouts %}
{{ workout.workoutName }}{{ workout|steptostring|safe }} {% endfor %} |
+ {% if day.order|weekend %}