view farol/templates/producttree/edit_relationship.j2 @ 137:5a44d377aad5

Simplify code, don't use the map filter (Jinja>=2.7)
author Benoît Allard <benoit.allard@greenbone.net>
date Mon, 27 Oct 2014 11:20:06 +0100
parents 309330b215d3
children
line wrap: on
line source
{#
# Description:
# Web Template used in Farol Design
#
# Authors:
# BenoƮt Allard <benoit.allard@greenbone.net>
#
# Copyright:
# Copyright (C) 2014 Greenbone Networks GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#}

{% extends "base.j2" %}
{% from "macros.j2" import selectinput, selectinput2 %}
{% block title %}Edit the product{% endblock %}

{% block content %}
<p>The <strong>Relationship</strong element establishes a link between two existing <strong>Full Product Name</strong> elements, allowing the document producer to define a combination of two products that form a new <strong>Full Product Name</strong> entry.</p>
<p>This situation arises when a product is vulnerable only when installed together with another, or to describe operating system components. As a <strong>Relationship</strong> connects two existing products with each other, there need to be at least two <strong>Full Product Name</strong> entries present in the <strong>Product Tree</strong> before a Relationship element can be created.</p>
<p><strong>Relationship</strong> elements live at the root of a <strong>Product Tree</strong>, and they have three mandatory attributes: Product Reference and Relates To Product Reference each contain the Product ID token for the two products that will form the relationship, and the Type attribute defines how the products are related.</p>
<form role="form" method="POST">

{{ selectinput2('productreference', "ProductReference", products, productreference) }}
{% call selectinput('relationtype', "Relation Type", types, relationtype) %}
<p>Consider two previously constructed products with <em>Product IDs</em> CVRFPID-0001 and CVRFPID-0002. CVRF v1.1 supports the following <strong>Relationship</strong> <em>Type</em> values:</p>
<dl class="dl-horizontal">
  <dt>default component of:</dt><dd>CVRFPID-0001 is a default component of CVRFPID-0002</dd>
  <dt>optional component of:</dt><dd>CVRFPID-0001 is an optional component of CVRFPID-0002</dd>
  <dt>external component of:</dt><dd>CVRFPID-0001 is an external component of CVRFPID-0002</dd>
  <dt>installed on:</dt><dd>CVRFPID-0001 is installed on CVRFPID-0002</dd>
  <dt>installed with:</dt><dd>CVRFPID-0001 is installed with CVRFPID-0002</dd>
</dl>
{% endcall %}
{{ selectinput2('relatestoproductreference', "Relates to Product Reference", products, relatestoproductreference) }}

<button class="btn btn-primary" type="submit">{{ action or 'Update' }}</button>
<a class="btn btn-danger" href="{{ url_for('.view') }}">Cancel</a>
</form>
{% endblock %}

http://farol.wald.intevation.org