mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 05:04:46 +02:00

Wrap the is_pagination usage of bootstrap_pagination with comment/endcomment to avoid incompatible module. We will need to re-write the pagination code. Signed-off-by: Tim Orling <tim.orling@konsulko.com>
99 lines
3.3 KiB
HTML
99 lines
3.3 KiB
HTML
{% extends "base_toplevel.html" %}
|
|
{% load i18n %}
|
|
|
|
{% comment %}
|
|
|
|
layerindex-web - machine index page template
|
|
|
|
Copyright (C) 2013 Intel Corporation
|
|
Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
<!--
|
|
{% block title_append %} - machines{% endblock %}
|
|
-->
|
|
|
|
{% block navs %}
|
|
{% autoescape on %}
|
|
<li><a href="{% url 'layer_list' url_branch %}">Layers</a></li>
|
|
<li><a href="{% url 'recipe_search' url_branch %}">Recipes</a></li>
|
|
<li class="active"><a href="{% url 'machine_search' url_branch %}">Machines</a></li>
|
|
<li><a href="{% url 'class_search' url_branch %}">Classes</a></li>
|
|
<li><a href="{% url 'distro_search' url_branch %}">Distros</a></li>
|
|
{% endautoescape %}
|
|
{% endblock %}
|
|
|
|
|
|
{% block content_inner %}
|
|
{% autoescape on %}
|
|
|
|
|
|
<div class="bottom-margin">
|
|
<form id="filter-form" action="{% url 'machine_search' url_branch %}" method="get">
|
|
<div class="input-group col-md-6">
|
|
<input type="text" class="form-control" id="id_search_text" placeholder="Search machines" name="q" value="{{ search_keyword }}" />
|
|
<div class="input-group-btn">
|
|
<button class="btn btn-default" type="submit" name="search" value="1">search</button>
|
|
<button class="btn btn-default" type="submit" name="browse" value="1" id="id_browse_btn">browse</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
{% if machine_list %}
|
|
<table class="table table-striped table-bordered machinestable">
|
|
<thead>
|
|
<tr>
|
|
<th>Machine name</th>
|
|
<th class="col-md-9">Description</th>
|
|
<th>Layer</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for machine in machine_list %}
|
|
<tr>
|
|
<td><a href="{{ machine.vcs_web_url }}">{{ machine.name }}</a></td>
|
|
<td>{{ machine.description }}</td>
|
|
<td><a href="{% url 'layer_item' url_branch machine.layerbranch.layer.name %}">{{ machine.layerbranch.layer.name }}</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if is_paginated %}
|
|
{% comment %}
|
|
{% load bootstrap_pagination %}
|
|
<div class="text-center">
|
|
{% bootstrap_paginate page_obj range=10 show_prev_next="false" show_first_last="true" %}
|
|
</div>
|
|
{% endcomment %}
|
|
{% endif %}
|
|
{% else %}
|
|
{% if search_keyword %}
|
|
<p>No matching machines in database.</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
|
|
{% endautoescape %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block scripts %}
|
|
<script>
|
|
{% if not machine_list %}
|
|
$(document).ready(function() {
|
|
$("#filter-form input:text").first().select().focus();
|
|
});
|
|
{% endif %}
|
|
|
|
$("#id_browse_btn").click(function() {
|
|
$("#id_search_text").val("");
|
|
});
|
|
</script>
|
|
{% endblock %}
|