2015-11-04 15:46:24 +00:00
{% extends "base.html" %}
{% load projecttags %}
{% load humanize %}
{% load static %}
{% block pagecontent %}
2016-04-12 14:56:43 +00:00
< ul class = "breadcrumb" >
< li >
< a href = "{% url 'project' project.id %}" > {{project.name}}< / a >
< span class = "divider" > → < / span >
< / li >
< li >
{% if recipe.is_image %}
< a href = "{% url 'projectimagerecipes' project.id %}" > Image recipes< / a >
{% else %}
< a href = "{% url 'projectsoftwarerecipes' project.id %}" > Software recipes< / a >
{% endif %}
< span class = "divider" > → < / span >
< / li >
< li class = "active" >
{{recipe.name}} ({{recipe.layer_version.layer.name}})
< / li >
< / ul >
2015-11-04 15:46:24 +00:00
< script src = "{% static 'js/recipedetails.js' %}" > < / script >
< script >
$(document).ready(function (){
var ctx = {
recipe : {
id: {{recipe.pk}},
name: "{{recipe.name}}",
totalPackages: {{packages.count}},
layer_version : {
id: {{recipe.layer_version.pk}},
name: "{{recipe.layer_version.layer.name}}",
layerdetailurl: "{% url 'layerdetails' project.pk recipe.layer_version.pk %}"
}
}
};
try {
recipeDetailsPageInit(ctx);
} catch (e) {
document.write("Sorry, An error has occurred loading this page");
console.warn(e);
}
});
< / script >
{% include 'newcustomimage_modal.html' %}
2016-04-12 14:56:43 +00:00
< div class = "alert alert-success lead" id = "image-created-notification" style = "margin-top: 15px; display: none" >
< button type = "button" data-dismiss = "alert" class = "close" > x< / button >
Your custom image < strong > {{recipe.name}}< / strong > has been created. You can now add or remove packages as needed.
< / div >
< div class = "page-header" >
< h1 >
{{recipe.name}}
< small > ({{recipe.layer_version.layer.name}})< / small >
< / h1 >
2015-11-04 15:46:24 +00:00
< / div >
2016-04-12 14:56:43 +00:00
< div class = "row" >
< div class = "col-md-8" >
2015-11-04 15:46:24 +00:00
< div class = "button-place btn-group" id = "customise-build-btns"
style="width: 100%;
{% if not in_project %}
display:none;
{% endif %}">
2016-04-12 14:56:43 +00:00
< button class = "btn btn-default btn-lg build-recipe-btn" style = "width: 50%" >
2015-11-04 15:46:24 +00:00
Build {{recipe.name}}
< / button >
{% if recipe.is_image %}
2016-04-12 14:56:43 +00:00
< button class = "btn btn-default btn-lg customise-btn" data-recipe = "{{recipe.pk}}" style = "width: 50%" >
2015-11-04 15:46:24 +00:00
Customise {{recipe.name}}
< / button >
{% endif %}
< / div >
< div class = "button-place" >
2016-04-12 14:56:43 +00:00
< button class = "btn btn-default btn-block btn-lg" id = "add-layer-btn"
2015-11-04 15:46:24 +00:00
style="width:100%;
{% if in_project %}
display:none;
{% endif %}">
2016-04-12 14:56:43 +00:00
< i class = "glyphicon glyphicon-plus" > < / i >
2015-11-04 15:46:24 +00:00
Add the {{recipe.layer_version.layer.name}} layer to your project to build or customise this image recipe
< / button >
< / div >
< div id = "packages-table" >
{% if packages.count %}
{% url 'recipepackages' project.id recipe.id as xhr_table_url %}
< h2 > {{title}} (< span class = "table-count-{{table_name}}" > 0< / span > ) < / h2 >
{% include "toastertable.html" %}
{% else %}
< h2 > {{title}}< / h2 >
{% endif %}
< div class = "alert alert-info air" id = "build-to-get-packages-msg"
{# if there are packages and it's in the project don't show this msg #}
{% if packages.count or not packages.count and not in_project %}
style="display:none"
{% endif %} >
< p class = "lead" > Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}< / p >
2016-04-12 14:56:43 +00:00
< button class = "btn btn-info btn-lg build-recipe-btn" style = "margin:20px 0 10px 0;" > Build {{recipe.name}}< / button >
2015-11-04 15:46:24 +00:00
< / div >
< div class = "alert alert-info air" id = "packages-alert"
{% if packages.count or in_project %}
style="display:none"
{% endif %}
>
< p class = "lead" > Toaster has no package information for {{recipe.name}}
< / p >
< / div >
< / div >
< / div >
2016-04-12 14:56:43 +00:00
< div class = "col-md-4" >
< div class = "well" >
< h2 > About {{recipe.name}}< / h2 >
< dl >
< dt >
2015-11-04 15:46:24 +00:00
Approx. packages included
2016-04-12 14:56:43 +00:00
< span class = "glyphicon glyphicon-question-sign get-help" title = "The number of packages included is based on information from previous builds and from parsing layers, so we can never be sure it is 100% accurate" > < / span >
< / dt >
< dd class = "no-packages" > {{packages.count}}< / dd >
< dt >
2015-11-04 15:46:24 +00:00
Approx. package size
2016-04-12 14:56:43 +00:00
< span class = "glyphicon glyphicon-question-sign get-help" title = "Package size is based on information from previous builds, so we can never be sure it is 100% accurate" > < / span >
< / dt >
< dd > {{approx_pkg_size.size__sum|filtered_filesizeformat}}< / dd >
{% if last_build %}
< dt > Last build< / dt >
< dd >
< span class = "glyphicon glyphicon-ok-circle" > < / span >
2015-11-04 15:46:24 +00:00
< a href = "{% url 'projectbuilds' project.id%}" > {{last_build.completed_on|date:"d/m/y H:i"}}< / a >
2016-04-12 14:56:43 +00:00
< / dd >
{% endif %}
< dt > Recipe file< / dt >
< dd >
2015-11-04 15:46:24 +00:00
< code > {{recipe.file_path|cut_path_prefix:recipe.layer_version.local_path}}< / code >
2016-04-12 14:56:43 +00:00
< a href = "{{recipe.get_vcs_recipe_file_link_url}}" > < span class = "glyphicon glyphicon-new-window" title = "View recipe file" data-toggle = "tooltip" > < / span > < / a >
< / dd >
< dt > Layer< / dt >
< dd > < a href = "{% url 'layerdetails' project.id recipe.layer_version.pk %}" > {{recipe.layer_version.layer.name}}< / a > < / dd >
< dt >
2015-11-04 15:46:24 +00:00
Summary
2016-04-12 14:56:43 +00:00
< / dt >
< dd >
2015-11-04 15:46:24 +00:00
{{recipe.summary}}
2016-04-12 14:56:43 +00:00
< / dd >
< dt >
2015-11-04 15:46:24 +00:00
Description
2016-04-12 14:56:43 +00:00
< / dt >
< dd >
2015-11-04 15:46:24 +00:00
{{recipe.description}}
2016-04-12 14:56:43 +00:00
< / dd >
< dt > Version< / dt >
< dd >
2015-11-04 15:46:24 +00:00
{{recipe.version}}
2016-04-12 14:56:43 +00:00
< / dd >
< dt > Section< / dt >
< dd >
2015-11-04 15:46:24 +00:00
{{recipe.section}}
2016-04-12 14:56:43 +00:00
< / dd >
< dt > License< / dt >
< dd >
2015-11-04 15:46:24 +00:00
{{recipe.license}}
2016-04-12 14:56:43 +00:00
< / dd >
< / dl >
< / div >
2015-11-04 15:46:24 +00:00
< / div >
< / div >
{% endblock %}