mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2026-01-27 09:01:24 +01:00
Use a more modern version of Bootstrap and take the opportunity to upgrade jQuery to the latest version at the same time. This provides better browser compatibility, moves to MIT license, allows us to make the site more responsive for different devices in future, and provides theming capabilities for custom installs among other improvements. (I chose to upgrade to v3 for now rather than straight to v4 as it was easier to do this gradually.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
99 lines
6.2 KiB
HTML
99 lines
6.2 KiB
HTML
{% extends "layerindex/recipedetail.html" %}
|
|
{% load i18n %}
|
|
|
|
{% comment %}
|
|
|
|
layerindex-web - comparison recipe selection detail page template
|
|
|
|
Copyright (C) 2018 Intel Corporation
|
|
Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
{% endcomment %}
|
|
|
|
<!--
|
|
{% block title_append %} - comparison - select match for {{ select_for.name }}{% endblock %}
|
|
-->
|
|
|
|
{% block page_heading %}
|
|
<div class="page-header">
|
|
<h1>{{ recipe.name }} {{ recipe.pv }}</h1>
|
|
<div class="pull-right"><a href="#selectRecipeDialog" role="button" data-toggle="modal" class="select_recipe_button btn {% if recipe.id == existing_cover_recipe.id %}btn-primary{% else %}btn-default{% endif %}" recipe-pn="{{ recipe.pn }}" recipe-layerbranch="{{ recipe.layerbranch.id }}">Select</a> <a href="javascript:history.back()" class="btn btn-default">Back</a></div>
|
|
</div>
|
|
|
|
<form id="comparison_form" class="form-inline" method="post">
|
|
<div id="selectRecipeDialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="selectRecipeDialogLabel">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h3 id="selectRecipeDialogLabel">Select <span id="id_span_select_recipe">recipe</span> to match {{ select_for.pn }}</h3>
|
|
</div>
|
|
<div class="modal-body">
|
|
{% csrf_token %}
|
|
{% for hidden in comparison_form.hidden_fields %}
|
|
{{ hidden }}
|
|
{% endfor %}
|
|
|
|
<select class="hidden-select" id="id_hidden_selectbox">
|
|
</select>
|
|
|
|
Coverage {{ comparison_form.cover_status }}
|
|
{% if comparison_form.cover_verified %}
|
|
<label class="checkbox" id="id_label_cover_verified">
|
|
{{ comparison_form.cover_verified }} verified
|
|
</label>
|
|
{% endif %}
|
|
{% if comparison_form.classic_category %}
|
|
<p>
|
|
<label for="id_selectrecipedialog-classic_category">Category</label>
|
|
{{ comparison_form.classic_category }}
|
|
</p>
|
|
{% endif %}
|
|
<p>
|
|
<label for="id_selectrecipedialog-cover_comment">Comment</label>
|
|
{{ comparison_form.cover_comment }}
|
|
</p>
|
|
{% if comparison_form.needs_attention %}
|
|
<p>
|
|
<label class="checkbox" id="id_label_needs_attention">
|
|
{{ comparison_form.needs_attention }}
|
|
Needs attention
|
|
</label>
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-primary" id="id_selectrecipedialog_save" data-dismiss="modal">Save</button>
|
|
<button class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
</div>
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-dialog -->
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script>
|
|
$('.select_recipe_button').click(function (e) {
|
|
pn = "{{ recipe.pn }}";
|
|
$('#id_span_select_recipe').text(pn);
|
|
$('#id_selectrecipedialog-cover_pn').val(pn);
|
|
$('#id_selectrecipedialog-cover_layerbranch').val("{{ recipe.layerbranch.id }}");
|
|
{% if existing_cover_recipe %}
|
|
$('#id_selectrecipedialog-cover_status').val('{{ select_for.cover_status }}');
|
|
{% else %}
|
|
$('#id_selectrecipedialog-cover_status').val('D');
|
|
{% endif %}
|
|
});
|
|
$('#id_selectrecipedialog_save').click(function (e) {
|
|
$('#comparison_form').submit()
|
|
$('#selectRecipeDialog').modal('hide')
|
|
});
|
|
$(document).ready(function() {
|
|
$('#id_selectrecipedialog-cover_status option[value="N"]').remove();
|
|
$('#id_selectrecipedialog-cover_status option[value="S"]').remove();
|
|
$('#id_selectrecipedialog-cover_status option[value="U"]').remove();
|
|
});
|
|
</script>
|
|
{% endblock %}
|