<commit_before>{% extends 'dinner/base.html' %}
{% block title %}Dinner{% endblock %}
{% block head %}
{% load staticfiles %}
{% endblock %}
{%block header%}
{%endblock%}
{%block content %}
{% verbatim %}
<div id="app">
  <header class="no-print">
    <div class="h1">
      <span>Dinner</span>
      <button class="btn btn-default btn-sm" v-on:click="togglePlanningMode()">
        <span v-show="mode === modeEnum.NORMAL">Planning Mode</span>
        <span v-show="mode === modeEnum.PLANNING">
          Meal Editor Mode
        </span>
      </button>
    </div>
  </header>

  <div v-show="mode === modeEnum.PLANNING">
    <div class="row">
        <div class="no-print col-md-4 col-sm-6 col-xs-6">
          <h3>All Meals</h3>
          <ul class="list-unstyled">
            <li v-for="(meal, index) in meals">
              <div class="meal-box"  v-bind:class="{selected: meal.selected}" v-on:click="toggleMealSelected(meal, index)">
                <div class="meal-box-header">
                  {{meal.name}}
                </div>
              </div>
            </li>
          </ul>
        </div>
        <div class="col-md-4 col-sm-6 col-xs-6">
          <h3>Planned Meals</h3>
          <div v-if="selectedMeals.length === 0">
            <span style="font-style: italic">Click a meal on the left to add it to the weekly plan</span>
          </div>
          <ul class="list-unstyled">
            <li v-for="meal in selectedMeals">
              <div class="meal-box">
                <div class="meal-box-header">
                  {{meal.name}}
                </div>
                <div class="meal-box-ingredients">
                  <ul class="list-unstyled no-print">
                    <li v-for="(ingredient, index) in meal.ingredients">
                      <div>
                        <div class="checkbox">
                          <label>
                              <input type="checkbox" v-model="ingredient.selected" v-on:click="toggleShoppingList(ingredient)">
                              {{ingredient.name}}
                          </label>
                        </div>
                      </div>
                    </li>
                  </ul>
                </div>
              </div>
            </li>
          </ul>
        </div>
        <div class="col-md-4 col-sm-6 col-xs-6">
          <h3>Shopping List</h3>
          <div v-if="shoppingList.length === 0">
            <span style="font-style: italic">Select ingredients from planned meals to add to shopping list, or add an ingredient in the textbox below.</span>
          </div>
          <ul class="list-unstyled" v-sortable="{ handle: '.glyphicon-sort', onUpdate: sortShoppingList }">
            <li v-for="item in shoppingList">
              <div class="shopping-item-box">
                <span class="touch-target no-print">
                  <span class="glyphicon glyphicon-sort" style="cursor: pointer"></span>
                </span>
                <span>{{item.name}}
                  <span v-show="item.meal_name !== undefined">
                    ({{item.meal_name}})
                  </span>
                </span>

                <div class="pull-right no-print">
                  <button class="btn btn-xs btn-default" v-on:click="showNoteField(item)">
                    <span class="glyphicon glyphicon-pencil"></span>
                  </button>
                  <button class="btn btn-xs btn-default" v-on:click="toggleShoppingList(item)">
                    <span class="glyphicon glyphicon-trash text-danger"></span>
                  </button>
                </div>
                <div class="ingredient-notes small" style="font-style: italic" v-if="!item.showNoteField && item.note.length > 0">
                  {{item.note}}
                </div>
                <form novalidate onsubmit="return false">
                  <div class="ingredient-notes small" v-if="item.showNoteField">
                    <div class="input-group">
                      <input type="text" class="form-control input-sm" v-model="item.note" >
                      <div class="input-group-btn">
                        <button class="btn btn-sm btn-default" v-on:click="saveIngredientNote(item)">
                          <span class="glyphicon glyphicon-floppy-disk"></span>
                        </button>
                      </span>
                    </div>
                  </div>
                </form>
              </div>
            </li>
          </ul>
          
          <form novalidate onsubmit="return false" class="no-print">
            <div class="input-group">
              <input type="text" class="form-control" v-model="orphanIngredient" />
              <div class="input-group-btn">
                <button type="submit" class="btn btn-info" v-on:click="addOrphanIngredient(orphanIngredient)">Add</button>
              </div>
            </div>
          </form>

            


          <!--UNHIDE THIS WHEN TROUBLESHOOTING SORT-->
          <ul class="hidden">
            <li v-for="item in shoppingList">
              <div class="shopping-item-box">
                <span>{{item.name}} ({{item.meal_name}})</span>
              </div>
            </li>
          </ul><commit_msg>tweak icons<commit_after>{% extends 'dinner/base.html' %}
{% block title %}Dinner{% endblock %}
{% block head %}
{% load staticfiles %}
{% endblock %}
{%block header%}
{%endblock%}
{%block content %}
{% verbatim %}
<div id="app">
  <header class="no-print">
    <div class="h1">
      <span>Dinner</span>
      <button class="btn btn-default btn-sm" v-on:click="togglePlanningMode()">
        <span v-show="mode === modeEnum.NORMAL">Planning Mode</span>
        <span v-show="mode === modeEnum.PLANNING">
          Meal Editor Mode
        </span>
      </button>
    </div>
  </header>

  <div v-show="mode === modeEnum.PLANNING">
    <div class="row">
        <div class="no-print col-md-4 col-sm-6 col-xs-6">
          <h3>All Meals</h3>
          <ul class="list-unstyled">
            <li v-for="(meal, index) in meals">
              <div class="meal-box"  v-bind:class="{selected: meal.selected}" v-on:click="toggleMealSelected(meal, index)">
                <div class="meal-box-header">
                  {{meal.name}}
                </div>
              </div>
            </li>
          </ul>
        </div>
        <div class="col-md-4 col-sm-6 col-xs-6">
          <h3>Planned Meals</h3>
          <div v-if="selectedMeals.length === 0">
            <span style="font-style: italic">Click a meal on the left to add it to the weekly plan</span>
          </div>
          <ul class="list-unstyled">
            <li v-for="meal in selectedMeals">
              <div class="meal-box">
                <div class="meal-box-header">
                  {{meal.name}}
                </div>
                <div class="meal-box-ingredients">
                  <ul class="list-unstyled no-print">
                    <li v-for="(ingredient, index) in meal.ingredients">
                      <div>
                        <div class="checkbox">
                          <label>
                              <input type="checkbox" v-model="ingredient.selected" v-on:click="toggleShoppingList(ingredient)">
                              {{ingredient.name}}
                          </label>
                        </div>
                      </div>
                    </li>
                  </ul>
                </div>
              </div>
            </li>
          </ul>
        </div>
        <div class="col-md-4 col-sm-6 col-xs-6">
          <h3>Shopping List</h3>
          <div v-if="shoppingList.length === 0">
            <span style="font-style: italic">Select ingredients from planned meals to add to shopping list, or add an ingredient in the textbox below.</span>
          </div>
          <ul class="list-unstyled" v-sortable="{ handle: '.glyphicon-sort', onUpdate: sortShoppingList }">
            <li v-for="item in shoppingList">
              <div class="shopping-item-box">
                <span class="touch-target no-print">
                  <span class="glyphicon glyphicon-sort" style="cursor: pointer"></span>
                </span>
                <span>{{item.name}}
                  <span v-show="item.meal_name !== undefined">
                    ({{item.meal_name}})
                  </span>
                </span>

                <div class="pull-right no-print">
                  <button class="btn btn-xs btn-default" v-on:click="showNoteField(item)">
                    <span class="glyphicon glyphicon-comment"></span>
                  </button>
                  <button class="btn btn-xs btn-default" v-on:click="toggleShoppingList(item)">
                    <span class="glyphicon glyphicon-trash text-danger"></span>
                  </button>
                </div>
                <div class="ingredient-notes small" style="font-style: italic" v-if="!item.showNoteField && item.note.length > 0">
                  {{item.note}}
                </div>
                <form novalidate onsubmit="return false">
                  <div class="ingredient-notes small" v-if="item.showNoteField">
                    <div class="input-group">
                      <input type="text" class="form-control input-sm" v-model="item.note" >
                      <div class="input-group-btn">
                        <button class="btn btn-sm btn-default" v-on:click="saveIngredientNote(item)">
                          <span class="glyphicon glyphicon-ok"></span>
                        </button>
                      </span>
                    </div>
                  </div>
                </form>
              </div>
            </li>
          </ul>
          
          <form novalidate onsubmit="return false" class="no-print">
            <div class="input-group">
              <input type="text" class="form-control" v-model="orphanIngredient" />
              <div class="input-group-btn">
                <button type="submit" class="btn btn-info" v-on:click="addOrphanIngredient(orphanIngredient)">Add</button>
              </div>
            </div>
          </form>

            


          <!--UNHIDE THIS WHEN TROUBLESHOOTING SORT-->
          <ul class="hidden">
            <li v-for="item in shoppingList">
              <div class="shopping-item-box">
                <span>{{item.name}} ({{item.meal_name}})</span>
              </div>
            </li>
          </ul>
{'fraction_non_alphanumeric': 0.15151226935514553, 'fraction_numerical': 0.0036142286475175957, 'mean_word_length': 1.4391092553931801, 'pattern_counts': {'":': 0, '<': 243, '<?xml version=': 0, '>': 245, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6804143', 'n_tokens_mistral': 3156, 'n_tokens_neox': 2931, 'n_words': 614}