diff options
Diffstat (limited to 'templates/layerindex')
-rw-r--r-- | templates/layerindex/bulkchange.html | 69 | ||||
-rw-r--r-- | templates/layerindex/bulkchangeedit.html | 54 | ||||
-rw-r--r-- | templates/layerindex/bulkchangereview.html | 47 | ||||
-rw-r--r-- | templates/layerindex/bulkchangesearch.html | 153 | ||||
-rw-r--r-- | templates/layerindex/deleteconfirm.html | 2 |
5 files changed, 324 insertions, 1 deletions
diff --git a/templates/layerindex/bulkchange.html b/templates/layerindex/bulkchange.html new file mode 100644 index 0000000000..e7fc270e5c --- /dev/null +++ b/templates/layerindex/bulkchange.html @@ -0,0 +1,69 @@ +{% extends "base.html" %} +{% load i18n %} + +{% comment %} + + layerindex-web - bulk change 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>Bulk change</h2> + +<p>This tool allows you to update the value of "meta" variables (such as +DESCRIPTION and LICENSE) on more than one recipe at once, and then +generate a patch for these changes which can be submitted for merging.</p> + +<p>To get started, your changes will need to be associated with a changeset.</p> + +{% if changesets %} + <h3>Select an existing changeset</h3> + <ul> + {% for changeset in changesets %} + <li><a href="{% url bulk_change_search changeset.id %}">{{ changeset.name }}</a></li> + {% endfor %} + </ul> +{% endif %} + +<h3>Create a new changeset</h3> + +<form class="form-inline" method="POST"> + {% csrf_token %} + {% for hidden in form.hidden_fields %} + {{ hidden }} + {% endfor %} + {% for field in form.visible_fields %} + {% if field.errors %} + <div class="control-group alert alert-error"> + {{ field.errors }} + {% endif %} + <div class="control-group"> + {{ field.label_tag }} + {{ field }} + <span class="help-inline custom-help"> + {{ field.help_text }} + </span> + {% if field.errors %} + </div> + {% endif %} + </div> + {% endfor %} + <div class="control-group"> + <div class="controls"> + <button type="submit" class="btn">Create</button> + </div> + </div> +</form> + +{% endautoescape %} + +{% endblock %} diff --git a/templates/layerindex/bulkchangeedit.html b/templates/layerindex/bulkchangeedit.html new file mode 100644 index 0000000000..8d864d6621 --- /dev/null +++ b/templates/layerindex/bulkchangeedit.html @@ -0,0 +1,54 @@ +{% extends "base.html" %} +{% load i18n %} + +{% comment %} + + layerindex-web - bulk change edit 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>Edit recipe fields</h2> + +<form method="POST"> + {{ formset.non_form_errors }} + {{ formset.management_form }} + {% csrf_token %} + {% for form in formset %} + {% for hidden in form.hidden_fields %} + {{ hidden }} + {% endfor %} + <h3>{{ form.instance.recipe.filename }}</h3> + {% for field in form.visible_fields %} + {% if field.errors %} + <div class="control-group alert alert-error"> + {{ field.errors }} + {% endif %} + <div class="control-group formfields"> + <div class="control-label"> + {{ field.label_tag }} + </div> + <div class="controls"> + {{ field }} + <span class="help-inline custom-help"> + {{ field.help_text }} + </span> + </div> + </div> + {% endfor %} + {% endfor %} + <input type="submit" class="btn" name="save" value="Save"></input> +</form> + +{% endautoescape %} + +{% endblock %} diff --git a/templates/layerindex/bulkchangereview.html b/templates/layerindex/bulkchangereview.html new file mode 100644 index 0000000000..5fb971eff0 --- /dev/null +++ b/templates/layerindex/bulkchangereview.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} +{% load i18n %} + +{% comment %} + + layerindex-web - bulk change result 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>{{ changeset.name }}</h2> +{% 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 }} + <ul> + {% for field in change.changed_fields %} + <li>{{ field }}</li> + {% endfor %} + </ul> + </li> + {% endfor %} + </ul> + </li> +{% endfor %} +</ul> +<a href="{% url bulk_change_search changeset.id %}" class="btn">Add recipes</a> +<a href="{% url bulk_change_edit changeset.id %}" class="btn">Edit</a> +<a href="{% url bulk_change_patches changeset.id %}" class="btn">Get patches</a> +<a href="{% url bulk_change_delete changeset.id %}?cancel=bulk_change_review" class="btn">Delete</a> + +{% endautoescape %} + +{% endblock %} diff --git a/templates/layerindex/bulkchangesearch.html b/templates/layerindex/bulkchangesearch.html new file mode 100644 index 0000000000..662c37d2a8 --- /dev/null +++ b/templates/layerindex/bulkchangesearch.html @@ -0,0 +1,153 @@ +{% 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-fluid"> + + <div class="span9"> + + <div class="row-fluid"> + <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" 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="span9">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 recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td> + </tr> + {% endfor %} + </tbody> + </table> + <input type="submit" class="btn" name="add_selected" value="Add selected"></input> + <input type="submit" class="btn" name="add_all" value="Add all"></input> + + {% if is_paginated %} + {% load pagination %} + {% pagination page_obj %} + {% endif %} +{% else %} + {% if searched %} + <p>No matching recipes in database.</p> + {% endif %} +{% endif %} + </div> + + <div class="span3"> + {% 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" name="remove_all" value="Remove all"></input> + <a href="{% url bulk_change_edit changeset.id %}" class="btn">Edit</a> + {% endif %} + <a href="{% url bulk_change_delete changeset.id %}?cancel=bulk_change_search" class="btn">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 %} diff --git a/templates/layerindex/deleteconfirm.html b/templates/layerindex/deleteconfirm.html index 5884d998aa..08e5166254 100644 --- a/templates/layerindex/deleteconfirm.html +++ b/templates/layerindex/deleteconfirm.html @@ -26,7 +26,7 @@ <form action="" method="post"> {% csrf_token %} <input type="submit" value="Delete" class='btn btn-warning' /> - <a href="{{ return_url }}" class='btn'>Cancel</a> + <a href="{{ cancel_url }}" class='btn'>Cancel</a> </form> {% endautoescape %} |