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>
158 lines
5.9 KiB
HTML
158 lines
5.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% comment %}
|
|
|
|
layerindex-web - bulk change search page template
|
|
|
|
Copyright (C) 2013 Intel Corporation
|
|
Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
<!--
|
|
{% block title_append %} - bulk change{% endblock %}
|
|
-->
|
|
|
|
{% block content %}
|
|
{% autoescape on %}
|
|
|
|
<h2>Add recipes to changeset</h2>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-9">
|
|
|
|
<div class="row">
|
|
<form id="search-form" class="form-inline" method="GET">
|
|
<table class="search-form-table">
|
|
<tbody>
|
|
<tr>
|
|
<td></td>
|
|
<td>
|
|
{{ search_form.field.errors }}
|
|
{{ search_form.match_type.errors }}
|
|
{{ search_form.value.errors }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Field:</td>
|
|
<td>
|
|
{{ search_form.field }}
|
|
{{ search_form.match_type }}
|
|
{{ search_form.value }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>
|
|
{{ search_form.layer.errors }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Layer:</td>
|
|
<td>{{ search_form.layer }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<button class="btn btn-default" type="submit">Search</button>
|
|
</form>
|
|
</div>
|
|
|
|
{% if recipe_list %}
|
|
<form id="recipe-select-form" method="POST">
|
|
{% csrf_token %}
|
|
<table class="table table-striped table-bordered recipestable">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Recipe name</th>
|
|
<th>Version</th>
|
|
<th class="col-md-9">Description</th>
|
|
<th>Layer</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for recipe in recipe_list %}
|
|
<tr>
|
|
<td><input type="checkbox" name="selecteditems" value="{{ recipe.id }}"></input></td>
|
|
<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' current_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<input type="submit" class="btn btn-default" name="add_selected" value="Add selected"></input>
|
|
<input type="submit" class="btn btn-default" name="add_all" value="Add all"></input>
|
|
|
|
{% 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 searched %}
|
|
<p>No matching recipes in database.</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
{% if changeset %}
|
|
<div class="well">
|
|
<p>{{ changeset.name }}</p>
|
|
{% if changeset.recipechange_set.all %}
|
|
<small>
|
|
{% regroup changeset.recipechange_set.all by recipe.layerbranch.layer as changeset_recipes %}
|
|
<ul>
|
|
{% for layer in changeset_recipes %}
|
|
<li>{{ layer.grouper }}
|
|
<ul>
|
|
{% for change in layer.list %}
|
|
<li>{{ change.recipe.filename }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</small>
|
|
<input type="submit" class="btn btn-default" name="remove_all" value="Remove all"></input>
|
|
<a href="{% url 'bulk_change_edit' changeset.id %}" class="btn btn-default">Edit</a>
|
|
{% endif %}
|
|
<a href="{% url 'bulk_change_delete' changeset.id %}?cancel=bulk_change_search" class="btn btn-default">Delete</a>
|
|
</div>
|
|
{% endif %}
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endautoescape %}
|
|
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script>
|
|
enable_value_field = function() {
|
|
if($('#id_match_type').val() == 'B')
|
|
$('#id_value').prop('disabled', true);
|
|
else
|
|
$('#id_value').prop('disabled', false);
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
$('#id_match_type').change(enable_value_field)
|
|
enable_value_field()
|
|
});
|
|
</script>
|
|
{% endblock %}
|