Author: |
Savoir-faire Linux |
License: |
LGPL-3 |
Branch: |
11.0_web_widget_table |
Repository: |
savoirfairelinux/web |
Dependencies: |
web |
Languages: |
CSS (6, 4.2%),
JavaScript (54, 37.5%),
Python (14, 9.7%),
XML (13, 9.0%),
and
reStructuredText (57, 39.6%) |
Other branches: |
11.0,
and
11_web_widget_table |
<h1 class="title">Web Widget Table</h1>
<p>A module to add datatable <a class="reference external" href="https://datatables.net/">https://datatables.net/</a> as a widget</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<a name="usage"></a>
<h2><a class="toc-backref" href="#id1">Usage</a></h2>
<p>Use this widget by saying:</p>
<dl class="docutils">
<dt><field name="my_table" widget="widget_table" options="{</dt>
<dd>'field_name': 'child_ids',
'datatable_params':{'searching': False,
'paging': False,
'info': False},
'fields': ['name','date_start', 'date_end', 'real_date_start', 'real_date_end', 'total_time'],
'headers': ['Name','Date Start', 'Date End', 'Real Date Start', 'Real Date End', 'Total Time']}"/></dd>
</dl>
<p>"my_table" field must be of type char, it is only used to display the table. For example:</p>
<dl class="docutils">
<dt>my_table = fields.Char(</dt>
<dd>store=False)</dd>
</dl>
<p>You need to pass the following parameters:</p>
<dl class="docutils">
<dt>field_name</dt>
<dd>This required parameter indicates a One2many field present in the model from which
the fields parameter will refer</dd>
<dt>fields</dt>
<dd>This required parameter is a list that indicates the fields from child_ids records
that will be displayed in the datatable</dd>
<dt>headers</dt>
<dd>The required parameter is a list of used string to display in the table header,
they should be in the same order as the fields</dd>
<dt>datatable_params</dt>
<dd><dl class="first last docutils">
<dt>This is to pass the datatable parameters <a class="reference external" href="https://datatables.net/manual/options">https://datatables.net/manual/options</a>, like:</dt>
<dd>paging;
info;
searching;
scrollY;
etc.</dd>
</dl>
</dd>
</dl>
<a name="bug-tracker"></a>
<h2><a class="toc-backref" href="#id2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/savoirfairelinux/web-addons/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
<a name="credits"></a>
<h2><a class="toc-backref" href="#id3">Credits</a></h2>
<a name="authors"></a>
<h3><a class="toc-backref" href="#id4">Authors</a></h3>
<ul class="simple">
<li>Savoir-faire Linux</li>
</ul>
<a name="contributors"></a>
<h3><a class="toc-backref" href="#id5">Contributors</a></h3>
<ul class="simple">
<li>Luis Garcia (<a class="reference external" href="mailto:luis.garcia@savoirfairelinux.com">luis.garcia@savoirfairelinux.com</a>)</li>
<li>Rim Ben Dhaou (<a class="reference external" href="mailto:rim.bendhaou@savoirfairelinux.com">rim.bendhaou@savoirfairelinux.com</a>)</li>
<li>Larbi Gharib (<a class="reference external" href="mailto:larbi.gharib@savoirfairelinux.com">larbi.gharib@savoirfairelinux.com</a>)</li>
<li>William Beverly (<a class="reference external" href="mailto:william.beverly@savoirfairelinux.com">william.beverly@savoirfairelinux.com</a>)</li>
<li>Jananjoy Rajkumar (<a class="reference external" href="mailto:jananjoy.rajkumar@savoirfairelinux.com">jananjoy.rajkumar@savoirfairelinux.com</a>)</li>
<li>Pierre Gault (<a class="reference external" href="mailto:pierre.gault@savoirfairelinux.com">pierre.gault@savoirfairelinux.com</a>)</li>
</ul>
<a name="maintainers"></a>
<h3><a class="toc-backref" href="#id6">Maintainers</a></h3>
<ul class="simple">
<li>Luis Garcia (<a class="reference external" href="mailto:luis.garcia@savoirfairelinux.com">luis.garcia@savoirfairelinux.com</a>)</li>
</ul>