FAF: Documentation UI Twig Blocks - HTML result

This commit is contained in:
Eric
2021-06-04 12:17:33 +02:00
parent 5da54f2525
commit 38dcc29569
256 changed files with 47123 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 6149ae3197f8334e2a3d9ac599bd553e
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@@ -0,0 +1,226 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Twig Base Presentation &mdash; iTop UI 3.0.0 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/ui-doc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Twig Base Tutorial" href="../TwigBaseTuto/TwigBaseTuto.html" />
<link rel="prev" title="Welcome to iTop 3.0 UIs documentation!" href="../index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> iTop UI
<img src="../_static/itop-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Twig Base:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Twig Base Presentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TwigBaseTuto/TwigBaseTuto.html">Twig Base Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TwigBaseReference/TwigBaseReference.html">Twig Base Reference</a></li>
</ul>
<p class="caption"><span class="caption-text">Tags reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../generated/Component/Component.html">UI Components</a></li>
<li class="toctree-l1"><a class="reference internal" href="../generated/Layout/Layout.html">UI Layouts</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">iTop UI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Twig Base Presentation</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/TwigBase/TwigBase.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="twig-base-presentation">
<h1>Twig Base Presentation<a class="headerlink" href="#twig-base-presentation" title="Permalink to this headline"></a></h1>
<p>The <strong>Twig Base</strong> feature is based on MVC structure:</p>
<img alt="../_images/MVC.png" src="../_images/MVC.png" />
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../TwigBaseTuto/TwigBaseTuto.html" class="btn btn-neutral float-right" title="Twig Base Tutorial" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../index.html" class="btn btn-neutral float-left" title="Welcome to iTop 3.0 UIs documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Combodo
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,224 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Twig Base Reference &mdash; iTop UI 3.0.0 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/ui-doc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="UI Components" href="../generated/Component/Component.html" />
<link rel="prev" title="4. Adding new operations" href="../TwigBaseTuto/Step4/Step4.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> iTop UI
<img src="../_static/itop-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Twig Base:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../TwigBase/TwigBase.html">Twig Base Presentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TwigBaseTuto/TwigBaseTuto.html">Twig Base Tutorial</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Twig Base Reference</a></li>
</ul>
<p class="caption"><span class="caption-text">Tags reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../generated/Component/Component.html">UI Components</a></li>
<li class="toctree-l1"><a class="reference internal" href="../generated/Layout/Layout.html">UI Layouts</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">iTop UI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Twig Base Reference</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/TwigBaseReference/TwigBaseReference.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="twig-base-reference">
<h1>Twig Base Reference<a class="headerlink" href="#twig-base-reference" title="Permalink to this headline"></a></h1>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../generated/Component/Component.html" class="btn btn-neutral float-right" title="UI Components" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../TwigBaseTuto/Step4/Step4.html" class="btn btn-neutral float-left" title="4. Adding new operations" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Combodo
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,291 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1. Creating the structure &mdash; iTop UI 3.0.0 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/ui-doc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="2. Hello World!" href="../Step2/Step2.html" />
<link rel="prev" title="Twig Base Tutorial" href="../TwigBaseTuto.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home" alt="Documentation Home"> iTop UI
<img src="../../_static/itop-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Twig Base:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../TwigBase/TwigBase.html">Twig Base Presentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../TwigBaseTuto.html">Twig Base Tutorial</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">1. Creating the structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Step2/Step2.html">2. Hello World!</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Step3/Step3.html">3. Passing variables to templates</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Step4/Step4.html">4. Adding new operations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../TwigBaseReference/TwigBaseReference.html">Twig Base Reference</a></li>
</ul>
<p class="caption"><span class="caption-text">Tags reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../generated/Component/Component.html">UI Components</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../generated/Layout/Layout.html">UI Layouts</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">iTop UI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../TwigBaseTuto.html">Twig Base Tutorial</a> &raquo;</li>
<li>1. Creating the structure</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/TwigBaseTuto/Step1/Step1.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="creating-the-structure">
<span id="step1"></span><h1>1. Creating the structure<a class="headerlink" href="#creating-the-structure" title="Permalink to this headline"></a></h1>
<p>Create a module using the <a class="reference external" href="https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Adatamodel#creating_your_own_extension">helper to create a new extension</a> youll get the following structure:</p>
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="x">my-module</span>
<span class="x">├── assets</span>
<span class="x">│   ├── css</span>
<span class="x">│   ├── img</span>
<span class="x">│   └── js</span>
<span class="x">├── doc</span>
<span class="x">├── src</span>
<span class="x">│   ├── Controller</span>
<span class="x">│   ├── Helper</span>
<span class="x">│   ├── Hook</span>
<span class="x">│   ├── Model</span>
<span class="x">│   └── Service</span>
<span class="x">└── vendor</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">src/Controller</span></code></p>
<blockquote>
<div><p>Contains all the PHP to control the display of the different pages of the module.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">src/Service</span></code></p>
<blockquote>
<div><p>Contains the PHP used to generate the data to be displayed.</p>
</div></blockquote>
<p>Create a folder <code class="docutils literal notranslate"><span class="pre">templates</span></code> for the <em>Twig</em> templates used for the presentation:</p>
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="x">my-module</span>
<span class="x">├── assets</span>
<span class="x">│   ├── css</span>
<span class="x">│   ├── img</span>
<span class="x">│   └── js</span>
<span class="x">├── doc</span>
<span class="x">├── src</span>
<span class="x">│   ├── Controller</span>
<span class="x">│   ├── Helper</span>
<span class="x">│   ├── Hook</span>
<span class="x">│   ├── Model</span>
<span class="x">│   └── Service</span>
<span class="x">├── templates</span>
<span class="x">└── vendor</span>
</pre></div>
</div>
<p>If your module is for iTop version 3.0 and above, you can put all the dictionaries into a dedicated folder <code class="docutils literal notranslate"><span class="pre">dictionaries</span></code>:</p>
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="x">my-module</span>
<span class="x">├── assets</span>
<span class="x">│   ├── css</span>
<span class="x">│   ├── img</span>
<span class="x">│   └── js</span>
<span class="x">├── dictionaries</span>
<span class="x">├── doc</span>
<span class="x">├── src</span>
<span class="x">│   ├── Controller</span>
<span class="x">│   ├── Helper</span>
<span class="x">│   ├── Hook</span>
<span class="x">│   ├── Model</span>
<span class="x">│   └── Service</span>
<span class="x">├── templates</span>
<span class="x">└── vendor</span>
</pre></div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Step2/Step2.html" class="btn btn-neutral float-right" title="2. Hello World!" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../TwigBaseTuto.html" class="btn btn-neutral float-left" title="Twig Base Tutorial" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Combodo
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,339 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2. Hello World! &mdash; iTop UI 3.0.0 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/ui-doc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="3. Passing variables to templates" href="../Step3/Step3.html" />
<link rel="prev" title="1. Creating the structure" href="../Step1/Step1.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home" alt="Documentation Home"> iTop UI
<img src="../../_static/itop-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Twig Base:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../TwigBase/TwigBase.html">Twig Base Presentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../TwigBaseTuto.html">Twig Base Tutorial</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../Step1/Step1.html">1. Creating the structure</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">2. Hello World!</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#the-controller">The controller</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-template">The template</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-end-point">The end point</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../Step3/Step3.html">3. Passing variables to templates</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Step4/Step4.html">4. Adding new operations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../TwigBaseReference/TwigBaseReference.html">Twig Base Reference</a></li>
</ul>
<p class="caption"><span class="caption-text">Tags reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../generated/Component/Component.html">UI Components</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../generated/Layout/Layout.html">UI Layouts</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">iTop UI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../TwigBaseTuto.html">Twig Base Tutorial</a> &raquo;</li>
<li>2. Hello World!</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/TwigBaseTuto/Step2/Step2.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="hello-world">
<span id="step2"></span><h1>2. Hello World!<a class="headerlink" href="#hello-world" title="Permalink to this headline"></a></h1>
<div class="section" id="the-controller">
<h2>The controller<a class="headerlink" href="#the-controller" title="Permalink to this headline"></a></h2>
<p>Create a controller into <code class="docutils literal notranslate"><span class="pre">my-module/src/Controller</span></code>, lets call it <code class="docutils literal notranslate"><span class="pre">MyModuleController</span></code> extending <code class="docutils literal notranslate"><span class="pre">Combodo\iTop\Application\TwigBase\Controller\Controller</span></code></p>
<div class="literal-block-wrapper docutils container" id="id1">
<div class="code-block-caption"><span class="caption-text">src/Controller/MyModuleController.php</span><a class="headerlink" href="#id1" title="Permalink to this code"></a></div>
<div class="highlight-php notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7
8</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span>
<span class="k">namespace</span> <span class="nx">MyCompany\iTop\MyModule\Controller</span><span class="p">;</span>
<span class="k">use</span> <span class="nx">Combodo\iTop\Application\TwigBase\Controller\Controller</span><span class="p">;</span>
<span class="k">class</span> <span class="nc">MyModuleController</span> <span class="k">extends</span> <span class="nx">Controller</span>
<span class="p">{</span>
<span class="p">}</span>
</pre></div>
</td></tr></table></div>
</div>
<p>Lets add a <em>Hello World</em> operation</p>
<div class="literal-block-wrapper docutils container" id="id2">
<div class="code-block-caption"><span class="caption-text">src/Controller/MyModuleController.php</span><a class="headerlink" href="#id2" title="Permalink to this code"></a></div>
<div class="highlight-php notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7
8
9</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span>
<span class="k">class</span> <span class="nc">MyModuleController</span> <span class="k">extends</span> <span class="nx">Controller</span>
<span class="p">{</span>
<span class="k">public</span> <span class="k">function</span> <span class="nf">OperationHelloWorld</span><span class="p">()</span>
<span class="p">{</span>
<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">DisplayPage</span><span class="p">();</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</td></tr></table></div>
</div>
<p>This will just display the Twig template corresponding to this operation.
Here the operation is <strong>HelloWorld</strong> without space.
The name of the method is built from the operation name by adding <em>Operation</em> at the beginning: <code class="docutils literal notranslate"><span class="pre">OperationHelloWorld</span></code>.</p>
<p>Calling the method <code class="docutils literal notranslate"><span class="pre">DisplayPage()</span></code> will render the template named after the operation: <code class="docutils literal notranslate"><span class="pre">HelloWorld.html.twig</span></code> it will be located in the folder <code class="docutils literal notranslate"><span class="pre">my-module/templates</span></code>.</p>
</div>
<div class="section" id="the-template">
<h2>The template<a class="headerlink" href="#the-template" title="Permalink to this headline"></a></h2>
<p>Lets create the template <code class="docutils literal notranslate"><span class="pre">my-module/templates/HelloWorld.html.twig</span></code> with a nice title.</p>
<div class="literal-block-wrapper docutils container" id="id3">
<div class="code-block-caption"><span class="caption-text">templates/HelloWorld.html.twig</span><a class="headerlink" href="#id3" title="Permalink to this code"></a></div>
<div class="highlight-twig notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UITitle</span> <span class="p">F</span><span class="nv">orPage</span> <span class="o">{</span><span class="nv">sTitle</span><span class="s1">:&#39;Hello World!&#39;</span><span class="o">}</span> <span class="cp">%}{%</span> <span class="k">EndUITitle</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</td></tr></table></div>
</div>
<p>Twig syntax can be found <a class="reference external" href="https://twig.symfony.com/doc/3.x/">Here</a>.</p>
<p>For more information on specific iTop Twig tags you can check <a class="reference internal" href="../../generated/Component/Component.html#components"><span class="std std-ref">UI Components</span></a> and <a class="reference internal" href="../../generated/Layout/Layout.html#layouts"><span class="std std-ref">UI Layouts</span></a></p>
</div>
<div class="section" id="the-end-point">
<h2>The end point<a class="headerlink" href="#the-end-point" title="Permalink to this headline"></a></h2>
<p>Then create landing page for your module <code class="docutils literal notranslate"><span class="pre">my-module/index.php</span></code></p>
<div class="literal-block-wrapper docutils container" id="id4">
<div class="code-block-caption"><span class="caption-text">index.php</span><a class="headerlink" href="#id4" title="Permalink to this code"></a></div>
<div class="highlight-php notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span>
<span class="k">namespace</span> <span class="nx">MyCompany\iTop\SystemInformation</span><span class="p">;</span>
<span class="k">use</span> <span class="nx">MyCompany\iTop\MyModule\Controller\MyModuleController</span><span class="p">;</span>
<span class="k">require_once</span><span class="p">(</span><span class="nx">APPROOT</span><span class="o">.</span><span class="s1">&#39;application/startup.inc.php&#39;</span><span class="p">);</span>
<span class="nv">$oUpdateController</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">MyModuleController</span><span class="p">(</span><span class="nx">MODULESROOT</span><span class="o">.</span><span class="s1">&#39;my-module/templates&#39;</span><span class="p">,</span> <span class="s1">&#39;my-module&#39;</span><span class="p">);</span>
<span class="nv">$oUpdateController</span><span class="o">-&gt;</span><span class="na">SetDefaultOperation</span><span class="p">(</span><span class="s1">&#39;HelloWorld&#39;</span><span class="p">);</span>
<span class="nv">$oUpdateController</span><span class="o">-&gt;</span><span class="na">HandleOperation</span><span class="p">();</span>
</pre></div>
</td></tr></table></div>
</div>
<p>Create an instance of the controller indicating the templates path and the module name.
The default operation is set to the operation we want when entering the module.
The method <code class="docutils literal notranslate"><span class="pre">HandleOperation()</span></code> will call the method corresponding to the specified operation.</p>
<p>Now you have to build the autoloader by running <code class="docutils literal notranslate"><span class="pre">composer</span> <span class="pre">dump-autoload</span></code> into the module folder <code class="docutils literal notranslate"><span class="pre">my-module</span></code>.</p>
<p>The next operation is the <a class="reference external" href="https://www.itophub.io/wiki/page?id=latest%3Ainstall%3Ainstall_wizard">setup</a>. You will be able to select your module.</p>
<img alt="../../_images/Setup.png" src="../../_images/Setup.png" />
<p>For more comfort during the development of your module, you can <a class="reference external" href="https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Adatamodel#installing_the_toolkit">install the toolkit</a> and update your iTop with symlinks.</p>
<p>if you go to your module page <code class="docutils literal notranslate"><span class="pre">https://localhost/itop/pages/exec.php?exec_module=my-module&amp;exec_page=index.php</span></code> you should see:</p>
<img alt="../../_images/Step2.png" src="../../_images/Step2.png" />
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Step3/Step3.html" class="btn btn-neutral float-right" title="3. Passing variables to templates" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../Step1/Step1.html" class="btn btn-neutral float-left" title="1. Creating the structure" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Combodo
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,353 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3. Passing variables to templates &mdash; iTop UI 3.0.0 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/ui-doc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="4. Adding new operations" href="../Step4/Step4.html" />
<link rel="prev" title="2. Hello World!" href="../Step2/Step2.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home" alt="Documentation Home"> iTop UI
<img src="../../_static/itop-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Twig Base:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../TwigBase/TwigBase.html">Twig Base Presentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../TwigBaseTuto.html">Twig Base Tutorial</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../Step1/Step1.html">1. Creating the structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Step2/Step2.html">2. Hello World!</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">3. Passing variables to templates</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Step4/Step4.html">4. Adding new operations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../TwigBaseReference/TwigBaseReference.html">Twig Base Reference</a></li>
</ul>
<p class="caption"><span class="caption-text">Tags reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../generated/Component/Component.html">UI Components</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../generated/Layout/Layout.html">UI Layouts</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">iTop UI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../TwigBaseTuto.html">Twig Base Tutorial</a> &raquo;</li>
<li>3. Passing variables to templates</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/TwigBaseTuto/Step3/Step3.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="passing-variables-to-templates">
<span id="step3"></span><h1>3. Passing variables to templates<a class="headerlink" href="#passing-variables-to-templates" title="Permalink to this headline"></a></h1>
<p>We have seen in <a class="reference internal" href="../Step2/Step2.html#step2"><span class="std std-ref">2. Hello World!</span></a> how to create a static template. Lets send some variables to have a more dynamic display.</p>
<div class="literal-block-wrapper docutils container" id="id1">
<div class="code-block-caption"><span class="caption-text">src/Controller/MyModuleController.php</span><a class="headerlink" href="#id1" title="Permalink to this code"></a></div>
<div class="highlight-php notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span>
<span class="k">namespace</span> <span class="nx">MyCompany\iTop\MyModule\Controller</span><span class="p">;</span>
<span class="k">use</span> <span class="nx">Combodo\iTop\Application\TwigBase\Controller\Controller</span><span class="p">;</span>
<span class="k">use</span> <span class="nx">UserRights</span><span class="p">;</span>
<span class="k">class</span> <span class="nc">MyModuleController</span> <span class="k">extends</span> <span class="nx">Controller</span>
<span class="p">{</span>
<span class="k">public</span> <span class="k">function</span> <span class="nf">OperationHelloWorld</span><span class="p">()</span>
<span class="p">{</span>
<span class="nv">$aParams</span><span class="p">[</span><span class="s1">&#39;sName&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nx">UserRights</span><span class="o">::</span><span class="na">GetUser</span><span class="p">();</span>
<span class="nv">$aParams</span><span class="p">[</span><span class="s1">&#39;sDate&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">date</span><span class="p">(</span><span class="s2">&quot;r&quot;</span><span class="p">);</span>
<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">DisplayPage</span><span class="p">(</span><span class="nv">$aParams</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</td></tr></table></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">DisplayPage()</span></code> method accept an array of parameters. This array is transformed into variables for the Twig template.</p>
<p>Here two variables are created: <code class="docutils literal notranslate"><span class="pre">sName</span></code> and <code class="docutils literal notranslate"><span class="pre">sDate</span></code>, we can use them in the template.</p>
<div class="literal-block-wrapper docutils container" id="id2">
<div class="code-block-caption"><span class="caption-text">templates/HelloWorld.html.twig</span><a class="headerlink" href="#id2" title="Permalink to this code"></a></div>
<div class="highlight-twig notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UITitle</span> <span class="p">F</span><span class="nv">orPage</span> <span class="o">{</span><span class="nv">sTitle</span><span class="s1">:&#39;Hello &#39;</span> <span class="o">~</span> <span class="nv">sName</span> <span class="o">~</span> <span class="s1">&#39;!&#39;</span><span class="o">}</span> <span class="cp">%}{%</span> <span class="k">EndUITitle</span> <span class="cp">%}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">UIContentBlock</span> <span class="p">S</span><span class="nv">tandard</span> <span class="o">{</span><span class="p">D</span><span class="nv">ataAttributes</span><span class="o">:</span> <span class="o">{</span><span class="nv">role</span><span class="o">:</span> <span class="s1">&#39;date&#39;</span><span class="o">}}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> We are currently </span><span class="cp">{{</span> <span class="nv">sDate</span> <span class="cp">}}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">EndUIContentBlock</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</td></tr></table></div>
</div>
<p>The output is then</p>
<img alt="../../_images/Hello2.png" src="../../_images/Hello2.png" />
<p>The variables can be of any type, for example you can give an array as a variable:</p>
<div class="literal-block-wrapper docutils container" id="id3">
<div class="code-block-caption"><span class="caption-text">src/Controller/MyModuleController.php</span><a class="headerlink" href="#id3" title="Permalink to this code"></a></div>
<div class="highlight-php notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span>
<span class="k">namespace</span> <span class="nx">MyCompany\iTop\MyModule\Controller</span><span class="p">;</span>
<span class="k">use</span> <span class="nx">Combodo\iTop\Application\TwigBase\Controller\Controller</span><span class="p">;</span>
<span class="k">use</span> <span class="nx">UserRights</span><span class="p">;</span>
<span class="k">class</span> <span class="nc">MyModuleController</span> <span class="k">extends</span> <span class="nx">Controller</span>
<span class="p">{</span>
<span class="k">public</span> <span class="k">function</span> <span class="nf">OperationHelloWorld</span><span class="p">()</span>
<span class="p">{</span>
<span class="nv">$aParams</span><span class="p">[</span><span class="s1">&#39;sName&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nx">UserRights</span><span class="o">::</span><span class="na">GetUser</span><span class="p">();</span>
<span class="nv">$aParams</span><span class="p">[</span><span class="s1">&#39;sDate&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">date</span><span class="p">(</span><span class="s2">&quot;r&quot;</span><span class="p">);</span>
<span class="nv">$aParams</span><span class="p">[</span><span class="s1">&#39;aQuarter&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;January&#39;</span><span class="p">,</span> <span class="s1">&#39;February&#39;</span><span class="p">,</span> <span class="s1">&#39;March&#39;</span><span class="p">];</span>
<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">DisplayPage</span><span class="p">(</span><span class="nv">$aParams</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</td></tr></table></div>
</div>
<p>Here <code class="docutils literal notranslate"><span class="pre">aQuarter</span></code> is an array containing some months, we can use it in a selector:</p>
<div class="literal-block-wrapper docutils container" id="id4">
<div class="code-block-caption"><span class="caption-text">templates/HelloWorld.html.twig</span><a class="headerlink" href="#id4" title="Permalink to this code"></a></div>
<div class="highlight-twig notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UITitle</span> <span class="p">F</span><span class="nv">orPage</span> <span class="o">{</span><span class="nv">sTitle</span><span class="s1">:&#39;Hello &#39;</span> <span class="o">~</span> <span class="nv">sName</span> <span class="o">~</span> <span class="s1">&#39;!&#39;</span><span class="o">}</span> <span class="cp">%}{%</span> <span class="k">EndUITitle</span> <span class="cp">%}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">UIContentBlock</span> <span class="p">S</span><span class="nv">tandard</span> <span class="o">{</span><span class="p">D</span><span class="nv">ataAttributes</span><span class="o">:</span> <span class="o">{</span><span class="nv">role</span><span class="o">:</span> <span class="s1">&#39;date&#39;</span><span class="o">}}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> We are currently </span><span class="cp">{{</span> <span class="nv">sDate</span> <span class="cp">}}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">EndUIContentBlock</span> <span class="cp">%}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">UIForm</span> <span class="p">S</span><span class="nv">tandard</span> <span class="o">{</span><span class="nv">sId</span><span class="s1">:&#39;my-form&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> Select Month:</span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">UISelect</span> <span class="p">F</span><span class="nv">orSelect</span> <span class="o">{</span><span class="nv">sName</span><span class="s1">:&#39;month&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">for</span> <span class="nv">index</span><span class="o">,</span><span class="nv">sMonth</span> <span class="k">in</span> <span class="nv">aQuarter</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">UISelectOption</span> <span class="p">F</span><span class="nv">orSelectOption</span> <span class="o">{</span><span class="nv">sValue</span><span class="o">:</span> <span class="nv">index</span><span class="o">,</span> <span class="nv">sLabel</span><span class="o">:</span> <span class="nv">sMonth</span><span class="o">,</span> <span class="nv">bSelected</span><span class="o">:</span><span class="kp">false</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">EndUISelect</span> <span class="cp">%}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">EndUIForm</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</td></tr></table></div>
</div>
<p>The output is:</p>
<img alt="../../_images/Hello3.png" src="../../_images/Hello3.png" />
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Step4/Step4.html" class="btn btn-neutral float-right" title="4. Adding new operations" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../Step2/Step2.html" class="btn btn-neutral float-left" title="2. Hello World!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Combodo
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,319 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>4. Adding new operations &mdash; iTop UI 3.0.0 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/ui-doc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Twig Base Reference" href="../../TwigBaseReference/TwigBaseReference.html" />
<link rel="prev" title="3. Passing variables to templates" href="../Step3/Step3.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home" alt="Documentation Home"> iTop UI
<img src="../../_static/itop-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Twig Base:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../TwigBase/TwigBase.html">Twig Base Presentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../TwigBaseTuto.html">Twig Base Tutorial</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../Step1/Step1.html">1. Creating the structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Step2/Step2.html">2. Hello World!</a></li>
<li class="toctree-l2"><a class="reference internal" href="../Step3/Step3.html">3. Passing variables to templates</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">4. Adding new operations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../TwigBaseReference/TwigBaseReference.html">Twig Base Reference</a></li>
</ul>
<p class="caption"><span class="caption-text">Tags reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../generated/Component/Component.html">UI Components</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../generated/Layout/Layout.html">UI Layouts</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">iTop UI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../TwigBaseTuto.html">Twig Base Tutorial</a> &raquo;</li>
<li>4. Adding new operations</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/TwigBaseTuto/Step4/Step4.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="adding-new-operations">
<span id="step4"></span><h1>4. Adding new operations<a class="headerlink" href="#adding-new-operations" title="Permalink to this headline"></a></h1>
<p>We currently have only one operation <code class="docutils literal notranslate"><span class="pre">HelloWorld</span></code>. Generally multiple operations are needed, lets add a new one.</p>
<p>In the previous part <a class="reference internal" href="../Step3/Step3.html#step3"><span class="std std-ref">3. Passing variables to templates</span></a> we have created a form, it will be used to call the operation <code class="docutils literal notranslate"><span class="pre">SelectMonth</span></code>.</p>
<p>Modify the form to add an hidden input to set the operation and add a submit button:</p>
<div class="literal-block-wrapper docutils container" id="id1">
<div class="code-block-caption"><span class="caption-text">templates/HelloWorld.html.twig</span><a class="headerlink" href="#id1" title="Permalink to this code"></a></div>
<div class="highlight-twig notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 6
7
8
9
10
11
12
13
14
15
16
17</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UIForm</span> <span class="p">S</span><span class="nv">tandard</span> <span class="o">{</span><span class="nv">sId</span><span class="s1">:&#39;myform&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> Select Month:</span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">UISelect</span> <span class="p">F</span><span class="nv">orSelect</span> <span class="o">{</span><span class="nv">sName</span><span class="s1">:&#39;month&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">for</span> <span class="nv">index</span><span class="o">,</span><span class="nv">sMonth</span> <span class="k">in</span> <span class="nv">aQuarter</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">UISelectOption</span> <span class="p">F</span><span class="nv">orSelectOption</span> <span class="o">{</span><span class="nv">sValue</span><span class="o">:</span> <span class="nv">index</span><span class="o">,</span> <span class="nv">sLabel</span><span class="o">:</span> <span class="nv">sMonth</span><span class="o">,</span> <span class="nv">bSelected</span><span class="o">:</span><span class="kp">false</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">EndUISelect</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">UIInput</span> <span class="p">F</span><span class="nv">orHidden</span> <span class="o">{</span><span class="nv">sName</span><span class="s1">:&#39;operation&#39;</span><span class="o">,</span> <span class="nv">sValue</span><span class="s1">:&#39;SelectMonth&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">UIContentBlock</span> <span class="p">S</span><span class="nv">tandard</span> <span class="o">{</span><span class="p">D</span><span class="nv">ataAttributes</span><span class="o">:</span> <span class="o">{</span><span class="nv">role</span><span class="o">:</span> <span class="s1">&#39;actions&#39;</span><span class="o">}}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">UIButton</span> <span class="p">F</span><span class="nv">orPrimaryAction</span> <span class="o">{</span><span class="nv">sLabel</span><span class="s1">:&#39;Ok&#39;</span><span class="o">,</span> <span class="nv">bIsSubmit</span><span class="o">:</span><span class="kp">true</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> </span><span class="cp">{%</span> <span class="k">EndUIContentBlock</span> <span class="cp">%}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">EndUIForm</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</td></tr></table></div>
</div>
<p>The output of this template is:</p>
<img alt="../../_images/form.png" src="../../_images/form.png" />
<p>Now add the operation in the controller:</p>
<div class="literal-block-wrapper docutils container" id="id2">
<div class="code-block-caption"><span class="caption-text">src/Controller/MyModuleController.php</span><a class="headerlink" href="#id2" title="Permalink to this code"></a></div>
<div class="highlight-php notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span>
<span class="c1">// ...</span>
<span class="k">class</span> <span class="nc">MyModuleController</span> <span class="k">extends</span> <span class="nx">Controller</span>
<span class="p">{</span>
<span class="c1">// ...</span>
<span class="k">public</span> <span class="k">function</span> <span class="nf">OperationSelectMonth</span><span class="p">()</span>
<span class="p">{</span>
<span class="nv">$aMonths</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;January&#39;</span><span class="p">,</span> <span class="s1">&#39;February&#39;</span><span class="p">,</span> <span class="s1">&#39;March&#39;</span><span class="p">];</span>
<span class="nv">$iMonth</span> <span class="o">=</span> <span class="nx">utils</span><span class="o">::</span><span class="na">ReadParam</span><span class="p">(</span><span class="s1">&#39;month&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
<span class="nv">$aParams</span><span class="p">[</span><span class="s1">&#39;sSelectedMonth&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$aMonths</span><span class="p">[</span><span class="nv">$iMonth</span><span class="p">];</span>
<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">DisplayPage</span><span class="p">(</span><span class="nv">$aParams</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</td></tr></table></div>
</div>
<p>The corresponding template must be created <code class="docutils literal notranslate"><span class="pre">templates/SelectMonth.html.twig</span></code></p>
<div class="literal-block-wrapper docutils container" id="id3">
<div class="code-block-caption"><span class="caption-text">templates/SelectMonth.html.twig</span><a class="headerlink" href="#id3" title="Permalink to this code"></a></div>
<div class="highlight-twig notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UITitle</span> <span class="p">F</span><span class="nv">orPage</span> <span class="o">{</span><span class="nv">sTitle</span><span class="s1">:&#39;Selected month&#39;</span><span class="o">}</span> <span class="cp">%}{%</span> <span class="k">EndUITitle</span> <span class="cp">%}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">UIContentBlock</span> <span class="p">S</span><span class="nv">tandard</span> <span class="o">{</span><span class="p">D</span><span class="nv">ataAttributes</span><span class="o">:</span> <span class="o">{</span><span class="nv">role</span><span class="o">:</span> <span class="s1">&#39;Information&#39;</span><span class="o">}}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> The selected month is </span><span class="cp">{{</span> <span class="nv">sSelectedMonth</span> <span class="cp">}}</span><span class="x"></span>
<span class="cp">{%</span> <span class="k">EndUIContentBlock</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</td></tr></table></div>
</div>
<p>The output of this operation is:</p>
<img alt="../../_images/SelectMonth.png" src="../../_images/SelectMonth.png" />
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../../TwigBaseReference/TwigBaseReference.html" class="btn btn-neutral float-right" title="Twig Base Reference" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../Step3/Step3.html" class="btn btn-neutral float-left" title="3. Passing variables to templates" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Combodo
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,239 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Twig Base Tutorial &mdash; iTop UI 3.0.0 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/ui-doc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="1. Creating the structure" href="Step1/Step1.html" />
<link rel="prev" title="Twig Base Presentation" href="../TwigBase/TwigBase.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> iTop UI
<img src="../_static/itop-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Twig Base:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../TwigBase/TwigBase.html">Twig Base Presentation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Twig Base Tutorial</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Step1/Step1.html">1. Creating the structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="Step2/Step2.html">2. Hello World!</a></li>
<li class="toctree-l2"><a class="reference internal" href="Step3/Step3.html">3. Passing variables to templates</a></li>
<li class="toctree-l2"><a class="reference internal" href="Step4/Step4.html">4. Adding new operations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../TwigBaseReference/TwigBaseReference.html">Twig Base Reference</a></li>
</ul>
<p class="caption"><span class="caption-text">Tags reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../generated/Component/Component.html">UI Components</a></li>
<li class="toctree-l1"><a class="reference internal" href="../generated/Layout/Layout.html">UI Layouts</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">iTop UI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Twig Base Tutorial</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/TwigBaseTuto/TwigBaseTuto.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="twig-base-tutorial">
<h1>Twig Base Tutorial<a class="headerlink" href="#twig-base-tutorial" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Tutorial:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Step1/Step1.html">1. Creating the structure</a></li>
<li class="toctree-l1"><a class="reference internal" href="Step2/Step2.html">2. Hello World!</a></li>
<li class="toctree-l1"><a class="reference internal" href="Step3/Step3.html">3. Passing variables to templates</a></li>
<li class="toctree-l1"><a class="reference internal" href="Step4/Step4.html">4. Adding new operations</a></li>
</ul>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Step1/Step1.html" class="btn btn-neutral float-right" title="1. Creating the structure" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../TwigBase/TwigBase.html" class="btn btn-neutral float-left" title="Twig Base Presentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, Combodo
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -0,0 +1,9 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Twig Base Presentation
======================
The **Twig Base** feature is based on MVC structure:
.. image:: MVC.png

View File

@@ -0,0 +1,5 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Twig Base Reference
===================

View File

@@ -0,0 +1,70 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Step1:
1. Creating the structure
=========================
Create a module using the `helper to create a new extension <https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Adatamodel#creating_your_own_extension>`_ you'll get the following structure::
my-module
├── assets
│   ├── css
│   ├── img
│   └── js
├── doc
├── src
│   ├── Controller
│   ├── Helper
│   ├── Hook
│   ├── Model
│   └── Service
└── vendor
``src/Controller``
Contains all the PHP to control the display of the different pages of the module.
``src/Service``
Contains the PHP used to generate the data to be displayed.
Create a folder ``templates`` for the *Twig* templates used for the presentation::
my-module
├── assets
│   ├── css
│   ├── img
│   └── js
├── doc
├── src
│   ├── Controller
│   ├── Helper
│   ├── Hook
│   ├── Model
│   └── Service
├── templates
└── vendor
If your module is for iTop version 3.0 and above, you can put all the dictionaries into a dedicated folder ``dictionaries``::
my-module
├── assets
│   ├── css
│   ├── img
│   └── js
├── dictionaries
├── doc
├── src
│   ├── Controller
│   ├── Helper
│   ├── Hook
│   ├── Model
│   └── Service
├── templates
└── vendor

View File

@@ -0,0 +1,99 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Step2:
2. Hello World!
===============
The controller
--------------
Create a controller into ``my-module/src/Controller``, let's call it ``MyModuleController`` extending ``Combodo\iTop\Application\TwigBase\Controller\Controller``
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
namespace MyCompany\iTop\MyModule\Controller;
use Combodo\iTop\Application\TwigBase\Controller\Controller;
class MyModuleController extends Controller
{
}
Let's add a *Hello World* operation
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
class MyModuleController extends Controller
{
public function OperationHelloWorld()
{
$this->DisplayPage();
}
}
This will just display the Twig template corresponding to this operation.
Here the operation is **HelloWorld** without space.
The name of the method is built from the operation name by adding *Operation* at the beginning: ``OperationHelloWorld``.
Calling the method ``DisplayPage()`` will render the template named after the operation: ``HelloWorld.html.twig`` it will be located in the folder ``my-module/templates``.
The template
------------
Let's create the template ``my-module/templates/HelloWorld.html.twig`` with a nice title.
.. code-block:: twig
:linenos:
:caption: templates/HelloWorld.html.twig
{% UITitle ForPage {sTitle:'Hello World!'} %}{% EndUITitle %}
Twig syntax can be found `Here <https://twig.symfony.com/doc/3.x/>`_.
For more information on specific iTop Twig tags you can check :ref:`Components` and :ref:`Layouts`
The end point
-------------
Then create landing page for your module ``my-module/index.php``
.. code-block:: php
:linenos:
:caption: index.php
<?php
namespace MyCompany\iTop\SystemInformation;
use MyCompany\iTop\MyModule\Controller\MyModuleController;
require_once(APPROOT.'application/startup.inc.php');
$oUpdateController = new MyModuleController(MODULESROOT.'my-module/templates', 'my-module');
$oUpdateController->SetDefaultOperation('HelloWorld');
$oUpdateController->HandleOperation();
Create an instance of the controller indicating the templates path and the module name.
The default operation is set to the operation we want when entering the module.
The method ``HandleOperation()`` will call the method corresponding to the specified operation.
Now you have to build the autoloader by running ``composer dump-autoload`` into the module folder ``my-module``.
The next operation is the `setup <https://www.itophub.io/wiki/page?id=latest%3Ainstall%3Ainstall_wizard>`_. You will be able to select your module.
.. image:: Setup.png
For more comfort during the development of your module, you can `install the toolkit <https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Adatamodel#installing_the_toolkit>`_ and update your iTop with symlinks.
if you go to your module page ``https://localhost/itop/pages/exec.php?exec_module=my-module&exec_page=index.php`` you should see:
.. image:: Step2.png

View File

@@ -0,0 +1,93 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Step3:
3. Passing variables to templates
=================================
We have seen in :ref:`Step2` how to create a static template. Let's send some variables to have a more dynamic display.
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
namespace MyCompany\iTop\MyModule\Controller;
use Combodo\iTop\Application\TwigBase\Controller\Controller;
use UserRights;
class MyModuleController extends Controller
{
public function OperationHelloWorld()
{
$aParams['sName'] = UserRights::GetUser();
$aParams['sDate'] = date("r");
$this->DisplayPage($aParams);
}
}
The ``DisplayPage()`` method accept an array of parameters. This array is transformed into variables for the Twig template.
Here two variables are created: ``sName`` and ``sDate``, we can use them in the template.
.. code-block:: twig
:linenos:
:caption: templates/HelloWorld.html.twig
{% UITitle ForPage {sTitle:'Hello ' ~ sName ~ '!'} %}{% EndUITitle %}
{% UIContentBlock Standard {DataAttributes: {role: 'date'}} %}
We are currently {{ sDate }}
{% EndUIContentBlock %}
The output is then
.. image:: Hello2.png
The variables can be of any type, for example you can give an array as a variable:
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
namespace MyCompany\iTop\MyModule\Controller;
use Combodo\iTop\Application\TwigBase\Controller\Controller;
use UserRights;
class MyModuleController extends Controller
{
public function OperationHelloWorld()
{
$aParams['sName'] = UserRights::GetUser();
$aParams['sDate'] = date("r");
$aParams['aQuarter'] = ['January', 'February', 'March'];
$this->DisplayPage($aParams);
}
}
Here ``aQuarter`` is an array containing some months, we can use it in a selector:
.. code-block:: twig
:linenos:
:caption: templates/HelloWorld.html.twig
{% UITitle ForPage {sTitle:'Hello ' ~ sName ~ '!'} %}{% EndUITitle %}
{% UIContentBlock Standard {DataAttributes: {role: 'date'}} %}
We are currently {{ sDate }}
{% EndUIContentBlock %}
{% UIForm Standard {sId:'my-form'} %}
Select Month:
{% UISelect ForSelect {sName:'month'} %}
{% for index,sMonth in aQuarter %}
{% UISelectOption ForSelectOption {sValue: index, sLabel: sMonth, bSelected:false} %}
{% endfor %}
{% EndUISelect %}
{% EndUIForm %}
The output is:
.. image:: Hello3.png

View File

@@ -0,0 +1,76 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Step4:
4. Adding new operations
========================
We currently have only one operation ``HelloWorld``. Generally multiple operations are needed, let's add a new one.
In the previous part :ref:`Step3` we have created a form, it will be used to call the operation ``SelectMonth``.
Modify the form to add an hidden input to set the operation and add a submit button:
.. code-block:: twig
:lineno-start: 6
:caption: templates/HelloWorld.html.twig
{% UIForm Standard {sId:'myform'} %}
Select Month:
{% UISelect ForSelect {sName:'month'} %}
{% for index,sMonth in aQuarter %}
{% UISelectOption ForSelectOption {sValue: index, sLabel: sMonth, bSelected:false} %}
{% endfor %}
{% EndUISelect %}
{% UIInput ForHidden {sName:'operation', sValue:'SelectMonth'} %}
{% UIContentBlock Standard {DataAttributes: {role: 'actions'}} %}
{% UIButton ForPrimaryAction {sLabel:'Ok', bIsSubmit:true} %}
{% EndUIContentBlock %}
{% EndUIForm %}
The output of this template is:
.. image:: form.png
Now add the operation in the controller:
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
// ...
class MyModuleController extends Controller
{
// ...
public function OperationSelectMonth()
{
$aMonths = ['January', 'February', 'March'];
$iMonth = utils::ReadParam('month', 0);
$aParams['sSelectedMonth'] = $aMonths[$iMonth];
$this->DisplayPage($aParams);
}
}
The corresponding template must be created ``templates/SelectMonth.html.twig``
.. code-block:: twig
:linenos:
:caption: templates/SelectMonth.html.twig
{% UITitle ForPage {sTitle:'Selected month'} %}{% EndUITitle %}
{% UIContentBlock Standard {DataAttributes: {role: 'Information'}} %}
The selected month is {{ sSelectedMonth }}
{% EndUIContentBlock %}
The output of this operation is:
.. image:: SelectMonth.png

View File

@@ -0,0 +1,14 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Twig Base Tutorial
==================
.. toctree::
:maxdepth: 1
:caption: Tutorial:
Step1/Step1
Step2/Step2
Step3/Step3
Step4/Step4

View File

@@ -0,0 +1,282 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Alert:
Alert
=====
Alerts are the main component to give feedback to the user or communicate page specific to system wide messages.
Alerts are a rectangular component displaying a title and a message.
----
.. include:: /manual/Component/Alert/AlertAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIAlert**
:Syntax:
.. code-block:: twig
{% UIAlert Type {Parameters} %}
Content Goes Here
{% EndUIAlert %}
:Type:
+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Neutral <AlertNeutral>` | Make a basis Alert component |
+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`ForInformation <AlertForInformation>` | Make an Alert component for informational messages |
+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`ForSuccess <AlertForSuccess>` | Make an Alert component for successful messages |
+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`ForWarning <AlertForWarning>` | Make an Alert component for warning messages |
+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`ForDanger <AlertForDanger>` | Make an Alert component for danger messages |
+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`ForFailure <AlertForFailure>` | Make an Alert component for failure messages |
+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`WithBrandingPrimaryColor <AlertWithBrandingPrimaryColor>` | Make an Alert component with primary color scheme |
+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`WithBrandingSecondaryColor <AlertWithBrandingSecondaryColor>` | Make an Alert component with secondary color scheme |
+---------------------------------------------------------------------+-----------------------------------------------------+
.. _AlertNeutral:
Alert Neutral
^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIAlert Neutral {sTitle:'value', sContent:'value', sId:'value'} %}
Content Goes Here
{% EndUIAlert %}
:parameters:
+----------+--------+----------+------+-------------------------------------------------+
| sTitle | string | optional | '' | Title of the alert |
+----------+--------+----------+------+-------------------------------------------------+
| sContent | string | optional | '' | The raw HTML content, must be already sanitized |
+----------+--------+----------+------+-------------------------------------------------+
| sId | string | optional | NULL | id of the html block |
+----------+--------+----------+------+-------------------------------------------------+
.. _AlertForInformation:
Alert ForInformation
^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIAlert ForInformation {sTitle:'value', sContent:'value', sId:'value'} %}
Content Goes Here
{% EndUIAlert %}
:parameters:
+----------+--------+----------+------+-------------------------------------------------+
| sTitle | string | optional | '' | Title of the alert |
+----------+--------+----------+------+-------------------------------------------------+
| sContent | string | optional | '' | The raw HTML content, must be already sanitized |
+----------+--------+----------+------+-------------------------------------------------+
| sId | string | optional | NULL | id of the html block |
+----------+--------+----------+------+-------------------------------------------------+
.. _AlertForSuccess:
Alert ForSuccess
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIAlert ForSuccess {sTitle:'value', sContent:'value', sId:'value'} %}
Content Goes Here
{% EndUIAlert %}
:parameters:
+----------+--------+----------+------+-------------------------------------------------+
| sTitle | string | optional | '' | Title of the alert |
+----------+--------+----------+------+-------------------------------------------------+
| sContent | string | optional | '' | The raw HTML content, must be already sanitized |
+----------+--------+----------+------+-------------------------------------------------+
| sId | string | optional | NULL | |
+----------+--------+----------+------+-------------------------------------------------+
.. _AlertForWarning:
Alert ForWarning
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIAlert ForWarning {sTitle:'value', sContent:'value', sId:'value'} %}
Content Goes Here
{% EndUIAlert %}
:parameters:
+----------+--------+----------+------+-------------------------------------------------+
| sTitle | string | optional | '' | Title of the alert |
+----------+--------+----------+------+-------------------------------------------------+
| sContent | string | optional | '' | The raw HTML content, must be already sanitized |
+----------+--------+----------+------+-------------------------------------------------+
| sId | string | optional | NULL | id of the html block |
+----------+--------+----------+------+-------------------------------------------------+
.. _AlertForDanger:
Alert ForDanger
^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIAlert ForDanger {sTitle:'value', sContent:'value', sId:'value'} %}
Content Goes Here
{% EndUIAlert %}
:parameters:
+----------+--------+----------+------+-------------------------------------------------+
| sTitle | string | optional | '' | Title of the alert |
+----------+--------+----------+------+-------------------------------------------------+
| sContent | string | optional | '' | The raw HTML content, must be already sanitized |
+----------+--------+----------+------+-------------------------------------------------+
| sId | string | optional | NULL | id of the html block |
+----------+--------+----------+------+-------------------------------------------------+
.. _AlertForFailure:
Alert ForFailure
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIAlert ForFailure {sTitle:'value', sContent:'value', sId:'value'} %}
Content Goes Here
{% EndUIAlert %}
:parameters:
+----------+--------+----------+------+-------------------------------------------------+
| sTitle | string | optional | '' | Title of the alert |
+----------+--------+----------+------+-------------------------------------------------+
| sContent | string | optional | '' | The raw HTML content, must be already sanitized |
+----------+--------+----------+------+-------------------------------------------------+
| sId | string | optional | NULL | id of the html block |
+----------+--------+----------+------+-------------------------------------------------+
.. _AlertWithBrandingPrimaryColor:
Alert WithBrandingPrimaryColor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIAlert WithBrandingPrimaryColor {sTitle:'value', sContent:'value', sId:'value'} %}
Content Goes Here
{% EndUIAlert %}
:parameters:
+----------+--------+----------+------+-------------------------------------------------+
| sTitle | string | optional | '' | Title of the alert |
+----------+--------+----------+------+-------------------------------------------------+
| sContent | string | optional | '' | The raw HTML content, must be already sanitized |
+----------+--------+----------+------+-------------------------------------------------+
| sId | string | optional | NULL | id of the html block |
+----------+--------+----------+------+-------------------------------------------------+
.. _AlertWithBrandingSecondaryColor:
Alert WithBrandingSecondaryColor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIAlert WithBrandingSecondaryColor {sTitle:'value', sContent:'value', sId:'value'} %}
Content Goes Here
{% EndUIAlert %}
:parameters:
+----------+--------+----------+------+-------------------------------------------------+
| sTitle | string | optional | '' | Title of the alert |
+----------+--------+----------+------+-------------------------------------------------+
| sContent | string | optional | '' | The raw HTML content, must be already sanitized |
+----------+--------+----------+------+-------------------------------------------------+
| sId | string | optional | NULL | id of the html block |
+----------+--------+----------+------+-------------------------------------------------+
Alert common parameters
^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------------------+
| Color | string | Color of the alert (check CSS classes ibo-is-<color> for colors) |
+-----------------------------+----------+------------------------------------------------------------------------+
| Content | string | The raw HTML content, must be already sanitized |
+-----------------------------+----------+------------------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------------------+
| IsClosable | bool | Indicates if the user can remove the alert from the screen |
+-----------------------------+----------+------------------------------------------------------------------------+
| IsCollapsible | bool | Indicates if the user can collapse the alert to display only the title |
+-----------------------------+----------+------------------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------------------+
| OpenedByDefault | bool | Indicates if the alert is collapsed or not by default |
+-----------------------------+----------+------------------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------------------+
| Title | string | Title of the alert |
+-----------------------------+----------+------------------------------------------------------------------------+
----
.. include:: /manual/Component/Alert/AlertFooter.rst

View File

@@ -0,0 +1,478 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Button:
Button
======
Class Button
----
.. include:: /manual/Component/Button/ButtonAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIButton**
:Syntax:
.. code-block:: twig
{% UIButton Type {Parameters} %}
:Type:
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Neutral <ButtonNeutral>` | Make a basis Button component for any purpose |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForPrimaryAction <ButtonForPrimaryAction>` | Make a Button component for a primary action, should be used to tell the user this is the main choice |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForSecondaryAction <ButtonForSecondaryAction>` | Make a Button component for a secondary action, should be used to tell the user this is an second hand choice |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForPositiveAction <ButtonForPositiveAction>` | Make a Button component for a success action, should be used to tell the user he/she going to make a positive action/choice |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForDestructiveAction <ButtonForDestructiveAction>` | Make a Button component for a destructive action, should be used to tell the user he/she going to make something that cannot be |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AlternativeNeutral <ButtonAlternativeNeutral>` | Make a basis Button component for any purpose |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForAlternativePrimaryAction <ButtonForAlternativePrimaryAction>` | Make a Button component for an alternative primary action, should be used to avoid the user to consider this action as the first |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForAlternativeSecondaryAction <ButtonForAlternativeSecondaryAction>` | Make a Button component for an alternative secondary action, should be used to avoid the user to focus on this |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForAlternativeValidationAction <ButtonForAlternativeValidationAction>` | Make a Button component for a validation action, should be used to avoid the user to focus on this |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForAlternativeDestructiveAction <ButtonForAlternativeDestructiveAction>` | Make a Button component for a destructive action, should be used to avoid the user to focus on this |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ForCancel <ButtonForCancel>` | Make a Button component for a cancel, should be used only for UI navigation, not destructive action |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`IconAction <ButtonIconAction>` | @param string $sIconClasses |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`LinkNeutral <ButtonLinkNeutral>` | Make a link Button component to open an URL instead of triggering a form action |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`IconLink <ButtonIconLink>` | @param string $sIconClasses |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| :ref:`DestructiveIconLink <ButtonDestructiveIconLink>` | @param string $sIconClasses |
+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
.. _ButtonNeutral:
Button Neutral
^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton Neutral {sLabel:'value', sName:'value', sId:'value'} %}
:parameters:
+--------+--------+-----------+------+----------------------------+
| sLabel | string | mandatory | | |
+--------+--------+-----------+------+----------------------------+
| sName | string | optional | NULL | See {@link Button::$sName} |
+--------+--------+-----------+------+----------------------------+
| sId | string | optional | NULL | |
+--------+--------+-----------+------+----------------------------+
.. _ButtonForPrimaryAction:
Button ForPrimaryAction
^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForPrimaryAction {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonForSecondaryAction:
Button ForSecondaryAction
^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForSecondaryAction {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonForPositiveAction:
Button ForPositiveAction
^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForPositiveAction {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonForDestructiveAction:
Button ForDestructiveAction
^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForDestructiveAction {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonAlternativeNeutral:
Button AlternativeNeutral
^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton AlternativeNeutral {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonForAlternativePrimaryAction:
Button ForAlternativePrimaryAction
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForAlternativePrimaryAction {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonForAlternativeSecondaryAction:
Button ForAlternativeSecondaryAction
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForAlternativeSecondaryAction {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonForAlternativeValidationAction:
Button ForAlternativeValidationAction
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForAlternativeValidationAction {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonForAlternativeDestructiveAction:
Button ForAlternativeDestructiveAction
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForAlternativeDestructiveAction {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+-------+---------------------+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+-----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+-----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+-----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+-----------+-------+---------------------+
.. _ButtonForCancel:
Button ForCancel
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton ForCancel {sLabel:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+-----------+--------+----------+-------+---------------------+
| sLabel | string | optional | NULL | |
+-----------+--------+----------+-------+---------------------+
| sName | string | optional | NULL | See Button::$sName |
+-----------+--------+----------+-------+---------------------+
| sValue | string | optional | NULL | See Button::$sValue |
+-----------+--------+----------+-------+---------------------+
| bIsSubmit | bool | optional | false | See Button::$sType |
+-----------+--------+----------+-------+---------------------+
| sId | string | optional | NULL | |
+-----------+--------+----------+-------+---------------------+
.. _ButtonIconAction:
Button IconAction
^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton IconAction {sIconClasses:'value', sTooltipText:'value', sName:'value', sValue:'value', bIsSubmit:true, sId:'value'} %}
:parameters:
+--------------+--------+-----------+-------+--+
| sIconClasses | string | mandatory | | |
+--------------+--------+-----------+-------+--+
| sTooltipText | string | optional | '' | |
+--------------+--------+-----------+-------+--+
| sName | string | optional | NULL | |
+--------------+--------+-----------+-------+--+
| sValue | string | optional | NULL | |
+--------------+--------+-----------+-------+--+
| bIsSubmit | bool | optional | false | |
+--------------+--------+-----------+-------+--+
| sId | string | optional | NULL | |
+--------------+--------+-----------+-------+--+
.. _ButtonLinkNeutral:
Button LinkNeutral
^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton LinkNeutral {sURL:'value', sLabel:'value', sIconClasses:'value', sTarget:'value', sId:'value'} %}
:parameters:
+--------------+--------+-----------+------+--+
| sURL | string | mandatory | | |
+--------------+--------+-----------+------+--+
| sLabel | string | optional | '' | |
+--------------+--------+-----------+------+--+
| sIconClasses | string | optional | NULL | |
+--------------+--------+-----------+------+--+
| sTarget | string | optional | NULL | |
+--------------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+--------------+--------+-----------+------+--+
.. _ButtonIconLink:
Button IconLink
^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton IconLink {sIconClasses:'value', sTooltipText:'value', sURL:'value', sTarget:'value', sId:'value'} %}
:parameters:
+--------------+--------+-----------+------+--+
| sIconClasses | string | mandatory | | |
+--------------+--------+-----------+------+--+
| sTooltipText | string | mandatory | | |
+--------------+--------+-----------+------+--+
| sURL | string | optional | '' | |
+--------------+--------+-----------+------+--+
| sTarget | string | optional | NULL | |
+--------------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+--------------+--------+-----------+------+--+
.. _ButtonDestructiveIconLink:
Button DestructiveIconLink
^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButton DestructiveIconLink {sIconClasses:'value', sTooltipText:'value', sURL:'value', sName:'value', sTarget:'value', sId:'value'} %}
:parameters:
+--------------+--------+-----------+------+--+
| sIconClasses | string | mandatory | | |
+--------------+--------+-----------+------+--+
| sTooltipText | string | mandatory | | |
+--------------+--------+-----------+------+--+
| sURL | string | optional | NULL | |
+--------------+--------+-----------+------+--+
| sName | string | optional | NULL | |
+--------------+--------+-----------+------+--+
| sTarget | string | optional | NULL | |
+--------------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+--------------+--------+-----------+------+--+
Button common parameters
^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+--------+------------------------------------------------------------+
| ActionType | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| Color | string | |
+-----------------------------+--------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+--------+------------------------------------------------------------+
| IconClass | string | |
+-----------------------------+--------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+--------+------------------------------------------------------------+
| JsCode | string | |
+-----------------------------+--------+------------------------------------------------------------+
| Label | string | |
+-----------------------------+--------+------------------------------------------------------------+
| OnClickJsCode | string | |
+-----------------------------+--------+------------------------------------------------------------+
| Tooltip | string | |
+-----------------------------+--------+------------------------------------------------------------+
----
.. include:: /manual/Component/Button/ButtonFooter.rst

View File

@@ -0,0 +1,88 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _ButtonGroup:
ButtonGroup
===========
Class ButtonGroup
----
.. include:: /manual/Component/ButtonGroup/ButtonGroupAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIButtonGroup**
:Syntax:
.. code-block:: twig
{% UIButtonGroup Type {Parameters} %}
:Type:
+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+
| :ref:`ButtonWithOptionsMenu <ButtonGroupButtonWithOptionsMenu>` | Make a button that has a primary action ($oButton) but also an options menu ($oMenu) on the side |
+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+
.. _ButtonGroupButtonWithOptionsMenu:
ButtonGroup ButtonWithOptionsMenu
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIButtonGroup ButtonWithOptionsMenu {oButton:value, oMenu:value} %}
:parameters:
+---------+-------------+-----------+--+--+
| oButton | Button | mandatory | | |
+---------+-------------+-----------+--+--+
| oMenu | PopoverMenu | mandatory | | |
+---------+-------------+-----------+--+--+
ButtonGroup common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddButton | Button | |
+-----------------------------+----------+------------------------------------------------------------+
| AddButtons | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddExtraBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| Buttons | array | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/ButtonGroup/ButtonGroupFooter.rst

View File

@@ -0,0 +1,94 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _CollapsibleSection:
CollapsibleSection
==================
Class CollapsibleSection
----
.. include:: /manual/Component/CollapsibleSection/CollapsibleSectionAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UICollapsibleSection**
:Syntax:
.. code-block:: twig
{% UICollapsibleSection Type {Parameters} %}
Content Goes Here
{% EndUICollapsibleSection %}
:Type:
+----------------------------------------------+------------+
| :ref:`Standard <CollapsibleSectionStandard>` | No comment |
+----------------------------------------------+------------+
.. _CollapsibleSectionStandard:
CollapsibleSection Standard
^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UICollapsibleSection Standard {sTitle:'value', sId:'value'} %}
Content Goes Here
{% EndUICollapsibleSection %}
:parameters:
+--------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+--------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+--------+--------+-----------+------+--+
CollapsibleSection common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| OpenedByDefault | bool | |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/CollapsibleSection/CollapsibleSectionFooter.rst

View File

@@ -0,0 +1,32 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Components:
UI Components
=============
A UI component is a unitary block used to display information in iTop console.
.. toctree::
:maxdepth: 1
:caption: Components:
Alert/Alert
Button/Button
ButtonGroup/ButtonGroup
CollapsibleSection/CollapsibleSection
DataTable/DataTable
Field/Field
FieldBadge/FieldBadge
FieldSet/FieldSet
Form/Form
Input/FileSelect/FileSelect
Input/Input
Input/Select/Select
Input/Select/SelectOption
Panel/Panel
Spinner/Spinner
Title/Title
Toolbar/Toolbar
Toolbar/ToolbarSpacer/ToolbarSpacer

View File

@@ -0,0 +1,245 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _DataTable:
DataTable
=========
Class DataTable
----
.. include:: /manual/Component/DataTable/DataTableAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIDataTable**
:Syntax:
.. code-block:: twig
{% UIDataTable Type {Parameters} %}
Content Goes Here
{% EndUIDataTable %}
:Type:
+---------------------------------------------------------+------------------------------+
| :ref:`ForResult <DataTableForResult>` | @param \WebPage $oPage |
+---------------------------------------------------------+------------------------------+
| :ref:`ForObject <DataTableForObject>` | @param \WebPage $oPage |
+---------------------------------------------------------+------------------------------+
| :ref:`ForRendering <DataTableForRendering>` | Make a basis Panel component |
+---------------------------------------------------------+------------------------------+
| :ref:`ForRenderingObject <DataTableForRenderingObject>` | @param string $sListId |
+---------------------------------------------------------+------------------------------+
| :ref:`ForStaticData <DataTableForStaticData>` | No comment |
+---------------------------------------------------------+------------------------------+
| :ref:`ForForm <DataTableForForm>` | @param string $sRef |
+---------------------------------------------------------+------------------------------+
.. _DataTableForResult:
DataTable ForResult
^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIDataTable ForResult {oPage:value, sListId:'value', oSet:value, aExtraParams:value} %}
Content Goes Here
{% EndUIDataTable %}
:parameters:
+--------------+-------------+-----------+----------+--+
| oPage | WebPage | mandatory | | |
+--------------+-------------+-----------+----------+--+
| sListId | string | mandatory | | |
+--------------+-------------+-----------+----------+--+
| oSet | DBObjectSet | mandatory | | |
+--------------+-------------+-----------+----------+--+
| aExtraParams | | optional | array () | |
+--------------+-------------+-----------+----------+--+
.. _DataTableForObject:
DataTable ForObject
^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIDataTable ForObject {oPage:value, sListId:'value', oSet:value, aExtraParams:value} %}
Content Goes Here
{% EndUIDataTable %}
:parameters:
+--------------+-------------+-----------+----------+--+
| oPage | WebPage | mandatory | | |
+--------------+-------------+-----------+----------+--+
| sListId | string | mandatory | | |
+--------------+-------------+-----------+----------+--+
| oSet | DBObjectSet | mandatory | | |
+--------------+-------------+-----------+----------+--+
| aExtraParams | | optional | array () | |
+--------------+-------------+-----------+----------+--+
.. _DataTableForRendering:
DataTable ForRendering
^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIDataTable ForRendering {sListId:'value', oSet:value, aExtraParams:value} %}
Content Goes Here
{% EndUIDataTable %}
:parameters:
+--------------+-------------+-----------+----------+--+
| sListId | string | mandatory | | |
+--------------+-------------+-----------+----------+--+
| oSet | DBObjectSet | mandatory | | |
+--------------+-------------+-----------+----------+--+
| aExtraParams | | optional | array () | |
+--------------+-------------+-----------+----------+--+
.. _DataTableForRenderingObject:
DataTable ForRenderingObject
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIDataTable ForRenderingObject {sListId:'value', oSet:value, aExtraParams:value} %}
Content Goes Here
{% EndUIDataTable %}
:parameters:
+--------------+-------------+-----------+----------+--+
| sListId | string | mandatory | | |
+--------------+-------------+-----------+----------+--+
| oSet | DBObjectSet | mandatory | | |
+--------------+-------------+-----------+----------+--+
| aExtraParams | | optional | array () | |
+--------------+-------------+-----------+----------+--+
.. _DataTableForStaticData:
DataTable ForStaticData
^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIDataTable ForStaticData {sTitle:'value', aColumns:{name:value, name:value}, aData:{name:value, name:value}, sId:'value', aExtraParams:{name:value, name:value}, sFilter:'value', aOptions:{name:value, name:value}} %}
Content Goes Here
{% EndUIDataTable %}
:parameters:
+--------------+--------+-----------+----------+--+
| sTitle | string | mandatory | | |
+--------------+--------+-----------+----------+--+
| aColumns | array | mandatory | | |
+--------------+--------+-----------+----------+--+
| aData | array | mandatory | | |
+--------------+--------+-----------+----------+--+
| sId | string | optional | NULL | |
+--------------+--------+-----------+----------+--+
| aExtraParams | array | optional | array () | |
+--------------+--------+-----------+----------+--+
| sFilter | string | optional | '' | |
+--------------+--------+-----------+----------+--+
| aOptions | array | optional | array () | |
+--------------+--------+-----------+----------+--+
.. _DataTableForForm:
DataTable ForForm
^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIDataTable ForForm {sRef:'value', aColumns:{name:value, name:value}, aData:{name:value, name:value}, sFilter:'value'} %}
Content Goes Here
{% EndUIDataTable %}
:parameters:
+----------+--------+-----------+----------+--+
| sRef | string | mandatory | | |
+----------+--------+-----------+----------+--+
| aColumns | array | mandatory | | |
+----------+--------+-----------+----------+--+
| aData | array | optional | array () | |
+----------+--------+-----------+----------+--+
| sFilter | string | optional | '' | |
+----------+--------+-----------+----------+--+
DataTable common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AjaxData | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AjaxUrl | string | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| DisplayColumns | | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| JSRefresh | string | |
+-----------------------------+----------+------------------------------------------------------------+
| Options | | |
+-----------------------------+----------+------------------------------------------------------------+
| ResultColumns | | |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/DataTable/DataTableFooter.rst

View File

@@ -0,0 +1,218 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Field:
Field
=====
Class Field
----
.. include:: /manual/Component/Field/FieldAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIField**
:Syntax:
.. code-block:: twig
{% UIField Type {Parameters} %}
Content Goes Here
{% EndUIField %}
:Type:
+-------------------------------------+------------+
| :ref:`FromParams <FieldFromParams>` | No comment |
+-------------------------------------+------------+
| :ref:`FromObject <FieldFromObject>` | No comment |
+-------------------------------------+------------+
| :ref:`Large <FieldLarge>` | No comment |
+-------------------------------------+------------+
| :ref:`Small <FieldSmall>` | No comment |
+-------------------------------------+------------+
| :ref:`Standard <FieldStandard>` | No comment |
+-------------------------------------+------------+
.. _FieldFromParams:
Field FromParams
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIField FromParams {aParams:value} %}
Content Goes Here
{% EndUIField %}
:parameters:
+---------+--+-----------+--+--+
| aParams | | mandatory | | |
+---------+--+-----------+--+--+
.. _FieldFromObject:
Field FromObject
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIField FromObject {sLabel:'value', oInput:value, sLayout:'value'} %}
Content Goes Here
{% EndUIField %}
:parameters:
+---------+---------+-----------+------+--+
| sLabel | string | mandatory | | |
+---------+---------+-----------+------+--+
| oInput | UIBlock | mandatory | | |
+---------+---------+-----------+------+--+
| sLayout | string | optional | NULL | |
+---------+---------+-----------+------+--+
.. _FieldLarge:
Field Large
^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIField Large {sLabel:'value', sValueHtml:'value'} %}
Content Goes Here
{% EndUIField %}
:parameters:
+------------+--------+-----------+----+--+
| sLabel | string | mandatory | | |
+------------+--------+-----------+----+--+
| sValueHtml | string | optional | '' | |
+------------+--------+-----------+----+--+
.. _FieldSmall:
Field Small
^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIField Small {sLabel:'value', sValueHtml:'value'} %}
Content Goes Here
{% EndUIField %}
:parameters:
+------------+--------+-----------+----+--+
| sLabel | string | mandatory | | |
+------------+--------+-----------+----+--+
| sValueHtml | string | optional | '' | |
+------------+--------+-----------+----+--+
.. _FieldStandard:
Field Standard
^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIField Standard {sLabel:'value', sLayout:'value', sId:'value'} %}
Content Goes Here
{% EndUIField %}
:parameters:
+---------+--------+----------+---------+--+
| sLabel | string | optional | '' | |
+---------+--------+----------+---------+--+
| sLayout | string | optional | 'small' | |
+---------+--------+----------+---------+--+
| sId | string | optional | NULL | |
+---------+--------+----------+---------+--+
Field common parameters
^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AttCode | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AttLabel | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AttType | string | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| Comments | string | |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| InputId | string | |
+-----------------------------+----------+------------------------------------------------------------+
| InputType | string | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| IsMandatory | bool | |
+-----------------------------+----------+------------------------------------------------------------+
| IsReadOnly | bool | |
+-----------------------------+----------+------------------------------------------------------------+
| IsSlave | bool | |
+-----------------------------+----------+------------------------------------------------------------+
| Label | string | |
+-----------------------------+----------+------------------------------------------------------------+
| Layout | string | |
+-----------------------------+----------+------------------------------------------------------------+
| MustChange | bool | |
+-----------------------------+----------+------------------------------------------------------------+
| MustPrompt | bool | |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| Value | UIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| ValueId | string | |
+-----------------------------+----------+------------------------------------------------------------+
| ValueRaw | string | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/Field/FieldFooter.rst

View File

@@ -0,0 +1,92 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _FieldBadge:
FieldBadge
==========
Class FieldBadge
----
.. include:: /manual/Component/FieldBadge/FieldBadgeAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIFieldBadge**
:Syntax:
.. code-block:: twig
{% UIFieldBadge Type {Parameters} %}
Content Goes Here
{% EndUIFieldBadge %}
:Type:
+--------------------------------------+-----------------------+
| :ref:`ForField <FieldBadgeForField>` | @param string $sValue |
+--------------------------------------+-----------------------+
.. _FieldBadgeForField:
FieldBadge ForField
^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIFieldBadge ForField {sValue:'value', oStyle:value} %}
Content Goes Here
{% EndUIFieldBadge %}
:parameters:
+--------+----------+-----------+--+--+
| sValue | string | mandatory | | |
+--------+----------+-----------+--+--+
| oStyle | ormStyle | mandatory | | |
+--------+----------+-----------+--+--+
FieldBadge common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/FieldBadge/FieldBadgeFooter.rst

View File

@@ -0,0 +1,92 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _FieldSet:
FieldSet
========
Class FieldSet
----
.. include:: /manual/Component/FieldSet/FieldSetAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIFieldSet**
:Syntax:
.. code-block:: twig
{% UIFieldSet Type {Parameters} %}
Content Goes Here
{% EndUIFieldSet %}
:Type:
+------------------------------------+------------+
| :ref:`Standard <FieldSetStandard>` | No comment |
+------------------------------------+------------+
.. _FieldSetStandard:
FieldSet Standard
^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIFieldSet Standard {sLegend:'value', sId:'value'} %}
Content Goes Here
{% EndUIFieldSet %}
:parameters:
+---------+--------+-----------+------+--+
| sLegend | string | mandatory | | |
+---------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+---------+--------+-----------+------+--+
FieldSet common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/FieldSet/FieldSetFooter.rst

View File

@@ -0,0 +1,94 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Form:
Form
====
Class Form
----
.. include:: /manual/Component/Form/FormAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIForm**
:Syntax:
.. code-block:: twig
{% UIForm Type {Parameters} %}
Content Goes Here
{% EndUIForm %}
:Type:
+--------------------------------+------------+
| :ref:`Standard <FormStandard>` | No comment |
+--------------------------------+------------+
.. _FormStandard:
Form Standard
^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIForm Standard {sId:'value'} %}
Content Goes Here
{% EndUIForm %}
:parameters:
+-----+--------+----------+------+--+
| sId | string | optional | NULL | |
+-----+--------+----------+------+--+
Form common parameters
^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| Action | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| OnSubmitJsCode | string | |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/Form/FormFooter.rst

View File

@@ -0,0 +1,86 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _FileSelect:
FileSelect
==========
Class FileSelect
----
.. include:: /manual/Component/Input/FileSelect/FileSelectAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIFileSelect**
:Syntax:
.. code-block:: twig
{% UIFileSelect Type {Parameters} %}
:Type:
+--------------------------------------+------------+
| :ref:`Standard <FileSelectStandard>` | No comment |
+--------------------------------------+------------+
.. _FileSelectStandard:
FileSelect Standard
^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIFileSelect Standard {sName:'value', sId:'value'} %}
:parameters:
+-------+--------+-----------+------+--+
| sName | string | mandatory | | |
+-------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+-------+--------+-----------+------+--+
FileSelect common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| ButtonText | string | |
+-----------------------------+--------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+--------+------------------------------------------------------------+
| FileName | | |
+-----------------------------+--------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+--------+------------------------------------------------------------+
| ShowFilename | bool | |
+-----------------------------+--------+------------------------------------------------------------+
----
.. include:: /manual/Component/Input/FileSelect/FileSelectFooter.rst

View File

@@ -0,0 +1,148 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Input:
Input
=====
Class Input
----
.. include:: /manual/Component/Input/InputAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIInput**
:Syntax:
.. code-block:: twig
{% UIInput Type {Parameters} %}
:Type:
+---------------------------------------------------+------------------------------------------------------------------------------------+
| :ref:`ForHidden <InputForHidden>` | No comment |
+---------------------------------------------------+------------------------------------------------------------------------------------+
| :ref:`Standard <InputStandard>` | No comment |
+---------------------------------------------------+------------------------------------------------------------------------------------+
| :ref:`ForInputWithLabel <InputForInputWithLabel>` | @see Field component that is better adapter when dealing with a standard iTop form |
+---------------------------------------------------+------------------------------------------------------------------------------------+
.. _InputForHidden:
Input ForHidden
^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIInput ForHidden {sName:'value', sValue:'value', sId:'value'} %}
:parameters:
+--------+--------+-----------+------+--+
| sName | string | mandatory | | |
+--------+--------+-----------+------+--+
| sValue | string | mandatory | | |
+--------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+--------+--------+-----------+------+--+
.. _InputStandard:
Input Standard
^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIInput Standard {sType:'value', sName:'value', sValue:'value', sId:'value'} %}
:parameters:
+--------+--------+-----------+------+--+
| sType | string | mandatory | | |
+--------+--------+-----------+------+--+
| sName | string | mandatory | | |
+--------+--------+-----------+------+--+
| sValue | string | mandatory | | |
+--------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+--------+--------+-----------+------+--+
.. _InputForInputWithLabel:
Input ForInputWithLabel
^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIInput ForInputWithLabel {sLabel:'value', sInputName:'value', sInputValue:'value', sInputId:'value', sInputType:'value'} %}
:parameters:
+-------------+--------+-----------+--------+--+
| sLabel | string | mandatory | | |
+-------------+--------+-----------+--------+--+
| sInputName | string | mandatory | | |
+-------------+--------+-----------+--------+--+
| sInputValue | string | optional | NULL | |
+-------------+--------+-----------+--------+--+
| sInputId | string | optional | NULL | |
+-------------+--------+-----------+--------+--+
| sInputType | string | optional | 'type' | |
+-------------+--------+-----------+--------+--+
Input common parameters
^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+--------+------------------------------------------------------------+
| IsChecked | | |
+-----------------------------+--------+------------------------------------------------------------+
| IsDisabled | bool | |
+-----------------------------+--------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+--------+------------------------------------------------------------+
| IsReadonly | bool | |
+-----------------------------+--------+------------------------------------------------------------+
| Name | string | |
+-----------------------------+--------+------------------------------------------------------------+
| Placeholder | string | |
+-----------------------------+--------+------------------------------------------------------------+
| Type | string | |
+-----------------------------+--------+------------------------------------------------------------+
| Value | string | |
+-----------------------------+--------+------------------------------------------------------------+
----
.. include:: /manual/Component/Input/InputFooter.rst

View File

@@ -0,0 +1,129 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Select:
Select
======
Class Select
----
.. include:: /manual/Component/Input/Select/SelectAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UISelect**
:Syntax:
.. code-block:: twig
{% UISelect Type {Parameters} %}
Content Goes Here
{% EndUISelect %}
:Type:
+------------------------------------------------------+------------------------------------+
| :ref:`ForSelect <SelectForSelect>` | Create a default Select input |
+------------------------------------------------------+------------------------------------+
| :ref:`ForSelectWithLabel <SelectForSelectWithLabel>` | Create a Select input with a label |
+------------------------------------------------------+------------------------------------+
.. _SelectForSelect:
Select ForSelect
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UISelect ForSelect {sName:'value', sId:'value'} %}
Content Goes Here
{% EndUISelect %}
:parameters:
+-------+--------+-----------+------+-------------------------+
| sName | string | mandatory | | Input name for the form |
+-------+--------+-----------+------+-------------------------+
| sId | string | optional | NULL | $sId |
+-------+--------+-----------+------+-------------------------+
.. _SelectForSelectWithLabel:
Select ForSelectWithLabel
^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UISelect ForSelectWithLabel {sName:'value', sLabel:'value', sId:'value'} %}
Content Goes Here
{% EndUISelect %}
:parameters:
+--------+--------+-----------+------+-----------------------------------------------------+
| sName | string | mandatory | | Input name for the form |
+--------+--------+-----------+------+-----------------------------------------------------+
| sLabel | string | mandatory | | Label to display with the input (null for no label) |
+--------+--------+-----------+------+-----------------------------------------------------+
| sId | string | optional | NULL | $sId |
+--------+--------+-----------+------+-----------------------------------------------------+
Select common parameters
^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+--------------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+--------------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+--------------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+--------------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+--------------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+--------------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+--------------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+--------------+------------------------------------------------------------+
| AddOption | SelectOption | Select option UIBlock |
+-----------------------------+--------------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+--------------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+--------------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+--------------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+--------------+------------------------------------------------------------+
| IsLabelBefore | bool | If true the label will be positioned before the input |
+-----------------------------+--------------+------------------------------------------------------------+
| IsMultiple | bool | Allow multiple selection |
+-----------------------------+--------------+------------------------------------------------------------+
| Label | string | Label to display with the input (null for no label) |
+-----------------------------+--------------+------------------------------------------------------------+
| Name | string | Input name for the form |
+-----------------------------+--------------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+--------------+------------------------------------------------------------+
| SubmitOnChange | bool | if true submit the form as soon as a change is detected |
+-----------------------------+--------------+------------------------------------------------------------+
----
.. include:: /manual/Component/Input/Select/SelectFooter.rst

View File

@@ -0,0 +1,92 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _SelectOption:
SelectOption
============
Class SelectOption
----
.. include:: /manual/Component/Input/Select/SelectOptionAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UISelectOption**
:Syntax:
.. code-block:: twig
{% UISelectOption Type {Parameters} %}
:Type:
+------------------------------------------------------+------------+
| :ref:`ForSelectOption <SelectOptionForSelectOption>` | No comment |
+------------------------------------------------------+------------+
.. _SelectOptionForSelectOption:
SelectOption ForSelectOption
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UISelectOption ForSelectOption {sValue:'value', sLabel:'value', bSelected:true, sId:'value'} %}
:parameters:
+-----------+--------+-----------+------+--+
| sValue | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sLabel | string | mandatory | | |
+-----------+--------+-----------+------+--+
| bSelected | bool | mandatory | | |
+-----------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+-----------+--------+-----------+------+--+
SelectOption common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+--------+------------------------------------------------------------+
| Disabled | bool | |
+-----------------------------+--------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+--------+------------------------------------------------------------+
| Label | string | |
+-----------------------------+--------+------------------------------------------------------------+
| Selected | bool | |
+-----------------------------+--------+------------------------------------------------------------+
| Value | string | |
+-----------------------------+--------+------------------------------------------------------------+
----
.. include:: /manual/Component/Input/Select/SelectOptionFooter.rst

View File

@@ -0,0 +1,316 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Panel:
Panel
=====
Class Panel
----
.. include:: /manual/Component/Panel/PanelAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIPanel**
:Syntax:
.. code-block:: twig
{% UIPanel Type {Parameters} %}
Content Goes Here
{% EndUIPanel %}
:Type:
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`Neutral <PanelNeutral>` | Make a basis Panel component |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`ForInformation <PanelForInformation>` | Make a Panel component for informational messages |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`ForSuccess <PanelForSuccess>` | Make a Panel component for successful messages |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`ForWarning <PanelForWarning>` | Make a Panel component for warning messages |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`ForDanger <PanelForDanger>` | Make a Panel component for danger messages |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`ForFailure <PanelForFailure>` | Make a Panel component for failure messages |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`WithBrandingPrimaryColor <PanelWithBrandingPrimaryColor>` | Make a Panel component with primary color scheme |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`WithBrandingSecondaryColor <PanelWithBrandingSecondaryColor>` | Make a Panel component with secondary color scheme |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| :ref:`ForClass <PanelForClass>` | Make a Panel component with the specific $sClass color scheme |
+---------------------------------------------------------------------+---------------------------------------------------------------+
.. _PanelNeutral:
Panel Neutral
^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel Neutral {sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--+
.. _PanelForInformation:
Panel ForInformation
^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel ForInformation {sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--+
.. _PanelForSuccess:
Panel ForSuccess
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel ForSuccess {sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--+
.. _PanelForWarning:
Panel ForWarning
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel ForWarning {sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--+
.. _PanelForDanger:
Panel ForDanger
^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel ForDanger {sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--+
.. _PanelForFailure:
Panel ForFailure
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel ForFailure {sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--+
.. _PanelWithBrandingPrimaryColor:
Panel WithBrandingPrimaryColor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel WithBrandingPrimaryColor {sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--+
.. _PanelWithBrandingSecondaryColor:
Panel WithBrandingSecondaryColor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel WithBrandingSecondaryColor {sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--+
.. _PanelForClass:
Panel ForClass
^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIPanel ForClass {sClass:'value', sTitle:'value', sSubTitle:'value'} %}
Content Goes Here
{% EndUIPanel %}
:parameters:
+-----------+--------+-----------+------+--------------------------------------+
| sClass | string | mandatory | | Class of the object the panel is for |
+-----------+--------+-----------+------+--------------------------------------+
| sTitle | string | mandatory | | |
+-----------+--------+-----------+------+--------------------------------------+
| sSubTitle | string | optional | NULL | |
+-----------+--------+-----------+------+--------------------------------------+
Panel common parameters
^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+-----------------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddMainBlock | iUIBlock | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddMainBlocks | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddSubTitleBlock | iUIBlock | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddSubTitleBlocks | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddTitleBlock | iUIBlock | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddTitleBlocks | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddToolbarBlock | iUIBlock | |
+-----------------------------+-----------------+------------------------------------------------------------+
| AddToolbarBlocks | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+-----------------+------------------------------------------------------------+
| Color | string | |
+-----------------------------+-----------------+------------------------------------------------------------+
| ColorFromClass | string | |
+-----------------------------+-----------------+------------------------------------------------------------+
| ColorFromOrmStyle | ormStyle | |
+-----------------------------+-----------------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+-----------------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| IsCollapsible | bool | |
+-----------------------------+-----------------+------------------------------------------------------------+
| IsHeaderVisibleOnScroll | bool | |
+-----------------------------+-----------------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+-----------------+------------------------------------------------------------+
| MainBlocks | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
| SubTitle | string | |
+-----------------------------+-----------------+------------------------------------------------------------+
| SubTitleBlock | iUIContentBlock | |
+-----------------------------+-----------------+------------------------------------------------------------+
| Title | string | |
+-----------------------------+-----------------+------------------------------------------------------------+
| TitleBlock | iUIContentBlock | |
+-----------------------------+-----------------+------------------------------------------------------------+
| ToolBlocks | array | |
+-----------------------------+-----------------+------------------------------------------------------------+
----
.. include:: /manual/Component/Panel/PanelFooter.rst

View File

@@ -0,0 +1,78 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Spinner:
Spinner
=======
Class Spinner
----
.. include:: /manual/Component/Spinner/SpinnerAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UISpinner**
:Syntax:
.. code-block:: twig
{% UISpinner Type {Parameters} %}
:Type:
+-----------------------------------+------------+
| :ref:`Standard <SpinnerStandard>` | No comment |
+-----------------------------------+------------+
.. _SpinnerStandard:
Spinner Standard
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UISpinner Standard {sId:'value'} %}
:parameters:
+-----+--------+----------+------+--+
| sId | string | optional | NULL | |
+-----+--------+----------+------+--+
Spinner common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+--------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+--------+------------------------------------------------------------+
----
.. include:: /manual/Component/Spinner/SpinnerFooter.rst

View File

@@ -0,0 +1,171 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Title:
Title
=====
Class Title
----
.. include:: /manual/Component/Title/TitleAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UITitle**
:Syntax:
.. code-block:: twig
{% UITitle Type {Parameters} %}
Content Goes Here
{% EndUITitle %}
:Type:
+-----------------------------------------------+------------+
| :ref:`ForPage <TitleForPage>` | No comment |
+-----------------------------------------------+------------+
| :ref:`ForPageWithIcon <TitleForPageWithIcon>` | No comment |
+-----------------------------------------------+------------+
| :ref:`Neutral <TitleNeutral>` | No comment |
+-----------------------------------------------+------------+
| :ref:`Standard <TitleStandard>` | No comment |
+-----------------------------------------------+------------+
.. _TitleForPage:
Title ForPage
^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UITitle ForPage {sTitle:'value', sId:'value'} %}
Content Goes Here
{% EndUITitle %}
:parameters:
+--------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+--------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+--------+--------+-----------+------+--+
.. _TitleForPageWithIcon:
Title ForPageWithIcon
^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UITitle ForPageWithIcon {sTitle:'value', sIconUrl:'value', sIconCoverMethod:'value', bIsMedallion:true, sId:'value'} %}
Content Goes Here
{% EndUITitle %}
:parameters:
+------------------+--------+-----------+-----------+--+
| sTitle | string | mandatory | | |
+------------------+--------+-----------+-----------+--+
| sIconUrl | string | mandatory | | |
+------------------+--------+-----------+-----------+--+
| sIconCoverMethod | string | optional | 'contain' | |
+------------------+--------+-----------+-----------+--+
| bIsMedallion | bool | optional | true | |
+------------------+--------+-----------+-----------+--+
| sId | string | optional | NULL | |
+------------------+--------+-----------+-----------+--+
.. _TitleNeutral:
Title Neutral
^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UITitle Neutral {sTitle:'value', iLevel:value, sId:'value'} %}
Content Goes Here
{% EndUITitle %}
:parameters:
+--------+--------+-----------+------+--+
| sTitle | string | mandatory | | |
+--------+--------+-----------+------+--+
| iLevel | int | optional | 1 | |
+--------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+--------+--------+-----------+------+--+
.. _TitleStandard:
Title Standard
^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UITitle Standard {oTitle:value, iLevel:value, sId:'value'} %}
Content Goes Here
{% EndUITitle %}
:parameters:
+--------+---------+-----------+------+--+
| oTitle | UIBlock | mandatory | | |
+--------+---------+-----------+------+--+
| iLevel | int | optional | 1 | |
+--------+---------+-----------+------+--+
| sId | string | optional | NULL | |
+--------+---------+-----------+------+--+
Title common parameters
^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/Title/TitleFooter.rst

View File

@@ -0,0 +1,136 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Toolbar:
Toolbar
=======
Class Toolbar
----
.. include:: /manual/Component/Toolbar/ToolbarAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIToolbar**
:Syntax:
.. code-block:: twig
{% UIToolbar Type {Parameters} %}
Content Goes Here
{% EndUIToolbar %}
:Type:
+-------------------------------------+------------+
| :ref:`ForAction <ToolbarForAction>` | No comment |
+-------------------------------------+------------+
| :ref:`Standard <ToolbarStandard>` | No comment |
+-------------------------------------+------------+
| :ref:`ForButton <ToolbarForButton>` | No comment |
+-------------------------------------+------------+
.. _ToolbarForAction:
Toolbar ForAction
^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIToolbar ForAction {sId:'value'} %}
Content Goes Here
{% EndUIToolbar %}
:parameters:
+-----+--------+----------+------+--+
| sId | string | optional | NULL | |
+-----+--------+----------+------+--+
.. _ToolbarStandard:
Toolbar Standard
^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIToolbar Standard {sId:'value', aContainerClasses:{name:value, name:value}} %}
Content Goes Here
{% EndUIToolbar %}
:parameters:
+-------------------+--------+----------+----------+--+
| sId | string | optional | NULL | |
+-------------------+--------+----------+----------+--+
| aContainerClasses | array | optional | array () | |
+-------------------+--------+----------+----------+--+
.. _ToolbarForButton:
Toolbar ForButton
^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIToolbar ForButton {sId:'value', aContainerClasses:{name:value, name:value}} %}
Content Goes Here
{% EndUIToolbar %}
:parameters:
+-------------------+--------+----------+----------+--+
| sId | string | optional | NULL | |
+-------------------+--------+----------+----------+--+
| aContainerClasses | array | optional | array () | |
+-------------------+--------+----------+----------+--+
Toolbar common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Component/Toolbar/ToolbarFooter.rst

View File

@@ -0,0 +1,78 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _ToolbarSpacer:
ToolbarSpacer
=============
Class ButtonToolbarSpacer
----
.. include:: /manual/Component/Toolbar/ToolbarSpacer/ToolbarSpacerAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIToolbarSpacer**
:Syntax:
.. code-block:: twig
{% UIToolbarSpacer Type {Parameters} %}
:Type:
+-----------------------------------------+-------------------------+
| :ref:`Standard <ToolbarSpacerStandard>` | @param string|null $sId |
+-----------------------------------------+-------------------------+
.. _ToolbarSpacerStandard:
ToolbarSpacer Standard
^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIToolbarSpacer Standard {sId:'value'} %}
:parameters:
+-----+--------+----------+------+--+
| sId | string | optional | NULL | |
+-----+--------+----------+------+--+
ToolbarSpacer common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+--------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+--------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+--------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+--------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+--------+------------------------------------------------------------+
----
.. include:: /manual/Component/Toolbar/ToolbarSpacer/ToolbarSpacerFooter.rst

View File

@@ -0,0 +1,17 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Layouts:
UI Layouts
==========
A UI block that serves as a layout for the page.
.. toctree::
:maxdepth: 1
:caption: Components:
MultiColumn/Column/Column
MultiColumn/MultiColumn
UIContentBlock

View File

@@ -0,0 +1,113 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _Column:
Column
======
Class Column
----
.. include:: /manual/Layout/MultiColumn/Column/ColumnAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIColumn**
:Syntax:
.. code-block:: twig
{% UIColumn Type {Parameters} %}
Content Goes Here
{% EndUIColumn %}
:Type:
+----------------------------------+------------+
| :ref:`Standard <ColumnStandard>` | No comment |
+----------------------------------+------------+
| :ref:`ForBlock <ColumnForBlock>` | No comment |
+----------------------------------+------------+
.. _ColumnStandard:
Column Standard
^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIColumn Standard {sId:'value'} %}
Content Goes Here
{% EndUIColumn %}
:parameters:
+-----+--------+----------+------+--+
| sId | string | optional | NULL | |
+-----+--------+----------+------+--+
.. _ColumnForBlock:
Column ForBlock
^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIColumn ForBlock {oBlock:value, sId:'value'} %}
Content Goes Here
{% EndUIColumn %}
:parameters:
+--------+---------+-----------+------+--+
| oBlock | UIBlock | mandatory | | |
+--------+---------+-----------+------+--+
| sId | string | optional | NULL | |
+--------+---------+-----------+------+--+
Column common parameters
^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Layout/MultiColumn/Column/ColumnFooter.rst

View File

@@ -0,0 +1,92 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _MultiColumn:
MultiColumn
===========
Class MultiColumn
----
.. include:: /manual/Layout/MultiColumn/MultiColumnAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIMultiColumn**
:Syntax:
.. code-block:: twig
{% UIMultiColumn Type {Parameters} %}
Content Goes Here
{% EndUIMultiColumn %}
:Type:
+---------------------------------------+------------+
| :ref:`Standard <MultiColumnStandard>` | No comment |
+---------------------------------------+------------+
.. _MultiColumnStandard:
MultiColumn Standard
^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIMultiColumn Standard {sId:'value'} %}
Content Goes Here
{% EndUIMultiColumn %}
:parameters:
+-----+--------+----------+------+--+
| sId | string | optional | NULL | |
+-----+--------+----------+------+--+
MultiColumn common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddColumn | Column | |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Layout/MultiColumn/MultiColumnFooter.rst

View File

@@ -0,0 +1,116 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
.. _UIContentBlock:
UIContentBlock
==============
Class UIContentBlock
Base block containing sub-blocks
----
.. include:: /manual/Layout/UIContentBlockAdditionalDescription.rst
----
Twig Tag
--------
:Tag: **UIContentBlock**
:Syntax:
.. code-block:: twig
{% UIContentBlock Type {Parameters} %}
Content Goes Here
{% EndUIContentBlock %}
:Type:
+------------------------------------------+-------------------------------------------------------------------+
| :ref:`Standard <UIContentBlockStandard>` | No comment |
+------------------------------------------+-------------------------------------------------------------------+
| :ref:`ForCode <UIContentBlockForCode>` | Used to display a block of code like <pre> but allows line break. |
+------------------------------------------+-------------------------------------------------------------------+
.. _UIContentBlockStandard:
UIContentBlock Standard
^^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIContentBlock Standard {sId:'value', aContainerClasses:{name:value, name:value}} %}
Content Goes Here
{% EndUIContentBlock %}
:parameters:
+-------------------+--------+----------+----------+--+
| sId | string | optional | NULL | |
+-------------------+--------+----------+----------+--+
| aContainerClasses | array | optional | array () | |
+-------------------+--------+----------+----------+--+
.. _UIContentBlockForCode:
UIContentBlock ForCode
^^^^^^^^^^^^^^^^^^^^^^
:syntax:
.. code-block:: twig
{% UIContentBlock ForCode {sCode:'value', sId:'value'} %}
Content Goes Here
{% EndUIContentBlock %}
:parameters:
+-------+--------+-----------+------+--+
| sCode | string | mandatory | | |
+-------+--------+-----------+------+--+
| sId | string | optional | NULL | |
+-------+--------+-----------+------+--+
UIContentBlock common parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClass | string | CSS class to add to the generated html block |
+-----------------------------+----------+------------------------------------------------------------+
| AddCSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| AddCssFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddDeferredBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| AddHtml | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddJsFileRelPath | string | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleCssFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddMultipleJsFilesRelPaths | array | |
+-----------------------------+----------+------------------------------------------------------------+
| AddSubBlock | iUIBlock | |
+-----------------------------+----------+------------------------------------------------------------+
| CSSClasses | array | like <code>['ibo-is-hidden', 'ibo-alert--body']</code> |
+-----------------------------+----------+------------------------------------------------------------+
| DataAttributes | array | Array of data attributes in the format ['name' => 'value'] |
+-----------------------------+----------+------------------------------------------------------------+
| DeferredBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
| IsHidden | bool | Indicates if the block is hidden by default |
+-----------------------------+----------+------------------------------------------------------------+
| SubBlocks | array | |
+-----------------------------+----------+------------------------------------------------------------+
----
.. include:: /manual/Layout/UIContentBlockFooter.rst

View File

@@ -0,0 +1,24 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Welcome to iTop 3.0 UI's documentation!
=======================================
.. toctree::
:maxdepth: 1
:caption: Twig Base:
TwigBase/TwigBase
TwigBaseTuto/TwigBaseTuto
TwigBaseReference/TwigBaseReference
.. toctree::
:maxdepth: 1
:caption: Tags reference:
generated/Component/Component
generated/Layout/Layout

View File

@@ -0,0 +1,21 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
:Success Alert:
.. image:: /manual/Component/Alert/AlertSuccess.png
:Failure Alert:
.. image:: /manual/Component/Alert/AlertFailure.png
:Information Alert:
.. image:: /manual/Component/Alert/AlertInformation.png
:Warning Alert:
.. image:: /manual/Component/Alert/AlertWarning.png

View File

@@ -0,0 +1,57 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
Example to generate an temporary information with a spinner (on the real display the spinner is animated)
.. code-block:: twig
{% UIAlert ForInformation {'sId':'header-requirements', 'IsCollapsible':false, 'IsClosable':false} %}
{% UIContentBlock Standard {'aContainerClasses':['ibo-update-core-header-requirements'],
'sId':'can-core-update'} %}
{{ 'iTopUpdate:UI:CanCoreUpdate:Loading'|dict_s }}
{% UISpinner Standard {} %}
{% EndUIContentBlock %}
{% EndUIAlert %}
The information displayed:
.. image:: /manual/Component/Alert/AlertInformationExample.png
The javascript to set a success or a failure in return of an ajax call
.. code-block:: js
function (data) {
var oRequirements = $("#header-requirements");
var oCanCoreUpdate = $("#can-core-update");
oCanCoreUpdate.html(data.sMessage);
oRequirements.removeClass("ibo-is-information");
if (data.bStatus) {
oRequirements.addClass("ibo-is-success");
} else {
oRequirements.addClass("ibo-is-failure");
}
}
----
Example to generate a hidden alert to display using javascript in case of error
.. code-block:: twig
{% UIAlert ForFailure {sId:"dir_error_outer", IsCollapsible:false, IsClosable:false, IsHidden:true} %}
*The content goes here*
{% EndUIAlert %}
The javascript to show the alert
.. code-block:: js
$("#dir_error_outer").removeClass("ibo-is-hidden");
The error displayed:
.. image:: /manual/Component/Alert/AlertFailureExample.png

View File

@@ -0,0 +1,10 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
:Example Buttons:
.. image:: /manual/Component/Button/Button-all.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Button/Button.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/ButtonGroup/ButtonGroup.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/ButtonGroup/ButtonGroup.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/CollapsibleSection/CollapsibleSection.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/CollapsibleSection/CollapsibleSection.png

View File

@@ -0,0 +1,14 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
Dynamic DataTable
.. image:: /manual/Component/Datatable/Datatable.png
Static DataTable
.. image:: /manual/Component/Datatable/DatatableStatic.png

View File

@@ -0,0 +1,27 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
The columns (*aColumns*) have the following format:
::
[
'nameField1' => ['label' => labelField1, 'description' => descriptionField1],
...
]
The data (*aData*) format has to be:
::
[
['nameField1' => valueField1, 'nameField2' => valueField2, ...],
...
]
----
Examples
--------
No examples provided yet

View File

@@ -0,0 +1,10 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
:Example Fields:
.. image:: /manual/Component/Field/Field.png

View File

@@ -0,0 +1,23 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
:Related Tag: :ref:`FieldSet`
----
Examples
--------
Example to generate a Field
.. code-block:: twig
{% UIField Small {sLabel: "Product"} %}
iTop
{% EndUIField %}
The result:
.. image:: /manual/Component/Field/Field.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/FieldBadge/FieldBadge.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/FieldBadge/FieldBadge.png

View File

@@ -0,0 +1,10 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
:Example FieldSets:
.. image:: /manual/Component/FieldSet/FieldSet.png

View File

@@ -0,0 +1,22 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
:Related Tag: :ref:`Field`
----
Examples
--------
Example to generate a FieldSet::
{% UIFieldSet Standard {sLegend: "iTop environment"} %}
{% UIField ... %}
...
{% EndUIFieldSet %}
The result:
.. image:: /manual/Component/FieldSet/FieldSet-explained.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Form/Form.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Form/Form.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Input/FileSelect/FileSelect.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Input/FileSelect/FileSelect.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Input/Input.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Input/Input.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Input/Select/Select.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Input/Select/Select.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Input/Select/SelectOption.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Input/Select/SelectOption.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Panel/Panel.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Panel/Panel.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Spinner/Spinner.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Spinner/Spinner.png

View File

@@ -0,0 +1,8 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
.. image:: /manual/Component/Title/Title.png

View File

@@ -0,0 +1,17 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
:The following code:
.. code-block:: twig
{% UITitle ForPage {sTitle: 'UI:FullTextSearchTitle_Text'|dict_format(sFullText)} %}{% EndUITitle %}
:Will display:
.. image:: /manual/Component/Title/Title.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Toolbar/Toolbar.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Toolbar/Toolbar.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Component/Toolbar/ToolbarSpacer/ToolbarSpacer.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Component/Toolbar/ToolbarSpacer/ToolbarSpacer.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Layout/MultiColumn/Column/Column.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Layout/MultiColumn/Column/Column.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Layout/MultiColumn/MultiColumn.png

View File

@@ -0,0 +1,11 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Examples
--------
No examples provided yet
.. example of image
.. image:: /manual/Layout/MultiColumn/MultiColumn.png

View File

@@ -0,0 +1,12 @@
.. Copyright (C) 2010-2021 Combodo SARL
.. http://opensource.org/licenses/AGPL-3.0
Output
------
No output provided yet
.. example of image
.. image:: /manual/Layout/UIContentBlock.png

Some files were not shown because too many files have changed in this diff Show More