aboutsummaryrefslogtreecommitdiffstats
path: root/templates/layerindex/duplicates.html
blob: c6d06b2195aaa784790be74a5620d4252163ca50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{% extends "base.html" %}
{% load i18n %}

{% comment %}

  layerindex-web - duplicates page template

  Copyright (C) 2013 Intel Corporation
  Licensed under the MIT license, see COPYING.MIT for details

{% endcomment %}


<!--
{% block title_append %} - duplicates{% endblock %}
-->

{% block content %}
{% autoescape on %}

        <div class="row-fluid">
            <div class="span9 offset1">
                <h2>Duplicate recipes</h2>
{% if recipes %}
                <p>Recipes with the same name in different layers:</p>
                <table class="table table-striped table-bordered recipestable">
                    <thead>
                        <tr>
                            <th>Recipe name</th>
                            <th>Version</th>
                            <th class="span9">Description</th>
                            <th>Layer</th>
                        </tr>
                    </thead>

                    <tbody>
                        {% for recipe in recipes %}
                            <tr {% if recipe.preferred_count > 0 %}class="muted"{% endif %}>
                                <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td>
                                <td>{{ recipe.pv }}</td>
                                <td>{{ recipe.short_desc }}</td>
                                <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
{% else %}
    <p>No duplicate recipes in database.</p>
{% endif %}
            </div>
        </div>


        <div class="row-fluid">
            <div class="span9 offset1">
                <h2>Duplicate classes</h2>
{% if classes %}
                <p>Classes with the same name in different layers:</p>
                <table class="table table-striped table-bordered recipestable">
                    <thead>
                        <tr>
                            <th>Class name</th>
                            <th>Layer</th>
                        </tr>
                    </thead>

                    <tbody>
                        {% for class in classes %}
                            <tr>
                                <td><a href="{% url class.vcs_web_url %}">{{ class.name }}</a></td>
                                <td><a href="{% url layer_item class.layerbranch.layer.name %}">{{ class.layerbranch.layer.name }}</a></td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
{% else %}
    <p>No duplicate classes in database.</p>
{% endif %}
            </div>
        </div>


{% endautoescape %}

{% endblock %}


{% block scripts %}
<script>
    $(document).ready(function() {
        firstfield = $("#filter-form input:text").first()
        if( ! firstfield.val() )
            firstfield.focus()
    });
</script>
{% endblock %}