Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | {% extends "basebuildpage.html" %} |
| 2 | |
| 3 | {% load projecttags %} |
| 4 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 5 | {% block title %} Recipes - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | {% block localbreadcrumb %} |
| 7 | <li>Recipes</li> |
| 8 | {% endblock %} |
| 9 | |
| 10 | {% block nav-recipes %} |
| 11 | <li class="active"><a href="{% url 'recipes' build.pk %}">Recipes</a></li> |
| 12 | {% endblock %} |
| 13 | |
| 14 | {% block buildinfomain %} |
| 15 | <div class="span10"> |
| 16 | <div class="page-header"> |
| 17 | <h1> |
| 18 | {% if request.GET.search and objects.paginator.count > 0 %} |
| 19 | {{objects.paginator.count}} recipe{{objects.paginator.count|pluralize}} found |
| 20 | {%elif request.GET.search and objects.paginator.count == 0%} |
| 21 | No recipes found |
| 22 | {%else%} |
| 23 | Recipes |
| 24 | {%endif%} |
| 25 | </h1> |
| 26 | </div> |
| 27 | |
| 28 | {% if objects.paginator.count == 0 %} |
| 29 | <div class="row-fluid"> |
| 30 | <div class="alert"> |
| 31 | <form class="no-results input-append" id="searchform"> |
| 32 | <input id="search" name="search" class="input-xxlarge" type="text" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %} |
| 33 | <button class="btn" type="submit" value="Search">Search</button> |
| 34 | <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all recipes</button> |
| 35 | </form> |
| 36 | </div> |
| 37 | </div> |
| 38 | |
| 39 | {% else %} |
| 40 | {% include "basetable_top.html" %} |
| 41 | |
| 42 | {% for recipe in objects %} |
| 43 | |
| 44 | <tr class="data"> |
| 45 | <td class="recipe__name"> |
| 46 | <a href="{% url "recipe" build.pk recipe.pk %}">{{recipe.name}}</a> |
| 47 | </td> |
| 48 | <td class="recipe__version"> |
| 49 | <a href="{% url "recipe" build.pk recipe.pk %}">{{recipe.version}}</a> |
| 50 | </td> |
| 51 | <!-- Depends --> |
| 52 | <td class="depends_on"> |
| 53 | {% with deps=recipe_deps|get_dict_value:recipe.pk %} |
| 54 | {% with count=deps|length %} |
| 55 | {% if count %} |
| 56 | <a class="btn" |
| 57 | title="<a href='{% url "recipe" build.pk recipe.pk %}#dependencies'>{{recipe.name}}</a> dependencies" |
| 58 | data-content="<ul class='unstyled'> |
| 59 | {% for i in deps|dictsort:"depends_on.name"%} |
| 60 | <li><a href='{% url "recipe" build.pk i.depends_on.pk %}'>{{i.depends_on.name}}</a></li> |
| 61 | {% endfor %} |
| 62 | </ul>"> |
| 63 | {{count}} |
| 64 | </a> |
| 65 | {% endif %} |
| 66 | {% endwith %} |
| 67 | {% endwith %} |
| 68 | </td> |
| 69 | <!-- Brought in by --> |
| 70 | <td class="depends_by"> |
| 71 | {% with revs=recipe_revs|get_dict_value:recipe.pk %} |
| 72 | {% with count=revs|length %} |
| 73 | {% if count %} |
| 74 | <a class="btn" |
| 75 | title="<a href='{% url "recipe" build.pk recipe.pk %}#brought-in-by'>{{recipe.name}}</a> reverse dependencies" |
| 76 | data-content="<ul class='unstyled'> |
| 77 | {% for i in revs|dictsort:"recipe.name" %} |
| 78 | <li><a href='{% url "recipe" build.pk i.recipe.pk %}'>{{i.recipe.name}}</a></li> |
| 79 | {% endfor %} |
| 80 | </ul>"> |
| 81 | {{count}} |
| 82 | </a> |
| 83 | {% endif %} |
| 84 | {% endwith %} |
| 85 | {% endwith %} |
| 86 | </td> |
| 87 | <!-- Recipe file --> |
| 88 | <td class="recipe_file">{{recipe.file_path}} {% if recipe.pathflags %}<i>({{recipe.pathflags}})</i>{% endif %}</td> |
| 89 | <!-- Section --> |
| 90 | <td class="recipe_section">{{recipe.section}}</td> |
| 91 | <!-- License --> |
| 92 | <td class="recipe_license">{{recipe.license}}</td> |
| 93 | <!-- Layer --> |
| 94 | <td class="layer_version__layer__name">{{recipe.layer_version.layer.name}}</td> |
| 95 | <!-- Layer branch --> |
| 96 | <td class="layer_version__branch">{{recipe.layer_version.branch}}</td> |
| 97 | <!-- Layer commit --> |
| 98 | <td class="layer_version__layer__commit"> |
| 99 | <a class="btn" |
| 100 | data-content="<ul class='unstyled'> |
| 101 | <li>{{recipe.layer_version.commit}}</li> |
| 102 | </ul>"> |
| 103 | {{recipe.layer_version.commit|truncatechars:13}} |
| 104 | </a> |
| 105 | </td> |
| 106 | </tr> |
| 107 | |
| 108 | {% endfor %} |
| 109 | |
| 110 | {% include "basetable_bottom.html" %} |
| 111 | {% endif %} |
| 112 | </div> |
| 113 | {% endblock %} |