Files @ c796135bb2e9
Branch filter:

Location: django-shaker/djangoshaker/templates/djangoshaker/index.html

branko
Added checks for adding ingredients to user's list to make sure the session data is properly set.
{% extends "djangoshaker/template.html" %}

{% load djangoshaker_html_helpers %}

{% block title %}Django Shaker{% endblock %}

{% block content %}

{% if recipes_added %}
<h2 class="title_section">Recently added recipes</h2>
<ul class="unstyled">
  {% for recipe in recipes_added %}
  <li class="item">{% html_link 'recipe' recipe.name recipe.id "btn btn-link btn-fixed" %}</li>
  {% endfor %}
</ul>
{% endif %}

{% if recipes_modified %}
<h2 class="title_section">Recently modified recipes</h2>
<ul class="unstyled">
  {% for recipe in recipes_modified %}
  <li class="item">{% html_link 'recipe' recipe.name recipe.id "btn btn-link btn-fixed" %}</li>
  {% endfor %}
</ul>
{% endif %}

{% if brands_added %}
<h2 class="title_section">Recently added brands</h2>
<ul class="unstyled">
  {% for brand in brands_added %}
  <li class="item">{% html_link 'brand' brand.name brand.id "btn btn-link btn-fixed" %}</li>
  {% endfor %}
</ul>
{% endif %}

{% if brands_modified %}
<h2 class="title_section">Recently modified brands</h2>
<ul class="unstyled">
  {% for brand in brands_modified %}
  <li class="item">{% html_link 'brand' brand.name brand.id "btn btn-link btn-fixed" %}</li>
  {% endfor %}
</ul>
{% endif %}

{% endblock %}