1{% extends "package_detail_base.html" %}
2{% load projecttags %}
3
4{% block tabcontent %}
5    {% with packageFileCount=package.buildfilelist_package.count %}
6        <!-- Generated Files -->
7        {% if package.buildtargetlist_package.count == 0 %}
8            {# Not included case #}
9            <ul class="nav nav-tabs">
10                <li class="active"> <a href="#">
11                    <span class="glyphicon glyphicon-question-sign get-help" title="Files added to a root file system when you include {{package.name}} in an image"></span>
12                    Generated files ({{packageFileCount}})
13                </a></li>
14                <li class=""><a href="{% url 'package_built_dependencies' build.id package.id %}">
15                    <span class="glyphicon glyphicon-question-sign get-help" title="Projected runtime dependencies when you include {{package.name}} in an image"></span>
16                    Runtime dependencies ({{dependency_count}})
17                </a></li>
18            </ul>
19            <div class="tab-content">
20            <div class="tab-pane active" id="files">
21            <!-- Package file list or if empty, alert pane -->
22            {% if packageFileCount > 0 %}
23                <div class="alert alert-info">
24                    <strong>{{package.fullpackagespec}}</strong> is <strong>not included</strong> in any image. This page shows you the files that would be added to an image root file system with <strong>{{package.fullpackagespec}}</strong> included in it.
25                </div>
26                {% include "tablesort.html" %}
27                    <tbody>
28						{% for file in objects %}
29                            <tr>
30                                <td class="path">{{file.path}}</td>
31                                <td class="filesize sizecol">{{file.size|filtered_filesizeformat}}</td>
32                            </tr>
33						{% endfor %}
34                    </tbody>
35                </table>
36
37            {% else %}
38                <div class="alert alert-info">
39                    <strong>{{package.fullpackagespec}}</strong> does not generate any files.
40                </div>
41            {% endif %}
42
43            </div> <!-- tab-pane active -->
44            </div> <!-- tab-content -->
45        {% else %}
46            {# Included case #}
47            <div class="tab-content">
48            <div class="tab-pane active">
49            <div class="lead well">
50                    Package included in:
51                    {% for itarget in package.buildtargetlist_package.all|dictsort:"target.target" %}
52                        <a href="{% url 'package_included_detail' build.id itarget.target.id package.id %}">
53                        {% if forloop.counter0 > 0  %}
54                        ,&nbsp;
55                        {% endif %}
56                        {{itarget.target.target}}
57                        </a>
58                    {% endfor %}
59            </div>
60            </div> <!-- tab-pane active -->
61            </div> <!-- tab-content -->
62        {% endif %}
63
64    {% endwith %}
65{% endblock tabcontent %}
66