diff --git a/cookbook/forms.py b/cookbook/forms.py index b3a925a02..51d59ed3e 100644 --- a/cookbook/forms.py +++ b/cookbook/forms.py @@ -92,7 +92,7 @@ class InternalRecipeForm(forms.ModelForm): } widgets = {'keywords': MultiSelectWidget} help_texts = { - 'instructions': _('You can use markdown to format the instructions. See the docs here') + 'instructions': _('You can use markdown to format this field. See the docs here') } @@ -264,4 +264,9 @@ class MealPlanForm(forms.ModelForm): model = MealPlan fields = ('recipe', 'title', 'meal', 'note', 'date', 'shared') + help_texts = { + 'shared': _('You can list default users to share recipes with in the settings.'), + 'note': _('You can use markdown to format this field. See the docs here') + } + widgets = {'recipe': SelectWidget, 'date': DateWidget, 'shared': MultiSelectWidget} diff --git a/cookbook/models.py b/cookbook/models.py index e6b3b1c49..b6d04b44e 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -234,6 +234,10 @@ class MealPlan(models.Model): return self.title return str(self.recipe) + def get_meal_name(self): + meals = dict(self.MEAL_TYPES) + return meals.get(self.meal) + class CookLog(models.Model): recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE) diff --git a/cookbook/static/custom/css/markdown_blockquote.css b/cookbook/static/custom/css/markdown_blockquote.css new file mode 100644 index 000000000..17f2645f3 --- /dev/null +++ b/cookbook/static/custom/css/markdown_blockquote.css @@ -0,0 +1,21 @@ +/* css classes needed to render markdown blockquotes */ +blockquote { + background: #f9f9f9; + border-left: 4px solid #ccc; + margin: 1.5em 10px; + padding: .5em 10px; + quotes: none; +} + +blockquote:before { + color: #ccc; + content: open-quote; + font-size: 4em; + line-height: .1em; + margin-right: .25em; + vertical-align: -.4em; +} + +blockquote p { + display: inline; +} \ No newline at end of file diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index dbd849281..945d50fc1 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -70,7 +70,7 @@ class="sr-only">(current) -