Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / part / test_page.html
index 61aa105..0101db1 100644 (file)
 [% USE L %]
+[% USE P %]
 
-<h1>Waren Picker Testpage</h1>
+<h1>Part Picker Testpage</h1>
 
 <br>
 Alle: <br>
-[% L.part_picker('part_id') %] text<br>
+[% P.part.picker('part_id') %] text<br>
 Nur Waren: <br>
-[% L.part_picker('part_id2', undef, type='part') %]<br>
+[% P.part.picker('part_id2', undef, part_type='part') %]<br>
 Nur Dienstleistungen: <br>
-[% L.part_picker('part_id3', undef, type='service') %]<br>
+[% P.part.picker('part_id3', undef, part_type='service') %]<br>
+Nur Erzeugnisse: <br>
+[% P.part.picker('part_id4', undef, part_type='assembly') %]<br>
 Waren und Dienstleistungen: <br>
-[% L.part_picker('part_id4', undef, type='part,service') %]<br>
+[% P.part.picker('part_id5', undef, part_type='part,service') %]<br>
+Artikel-Klassifizierung: Einkauf <br>
+[% P.part.picker('part_id10', undef, classification_id='1') %]<br>
+Artikel-Klassifizierung: Verkauf <br>
+[% P.part.picker('part_id11', undef, classification_id='2') %]<br>
+Artikel-Klassifizierung: Handelsware <br>
+[% P.part.picker('part_id12', undef, classification_id='3') %]<br>
+Artikel-Klassifizierung: Produktion <br>
+[% P.part.picker('part_id13', undef, classification_id='4') %]<br>
+Artikel-Klassifizierung: Eink.,Verk.,Prod. <br>
+[% P.part.picker('part_id14', undef, classification_id='1,2,4') %]<br>
+Artikel-Status: Aktiv (default)<br>
+[% P.part.picker('part_id15') %]<br>
+Artikel-Status: Aktiv (explizit)<br>
+[% P.part.picker('part_id16', undef, status="active") %]<br>
+Artikel-Status: Ungültig<br>
+[% P.part.picker('part_id17', undef, status="obsolete") %]<br>
+Artikel-Status: Alle<br>
+[% P.part.picker('part_id18', undef, status="all") %]<br>
+<br>
+Pre-filled:<br>
+[% P.part.picker('part_id6', pre_filled_part) %]<br>
+Convertible unit 'Std': (only select parts with unit Tag/Std/Min)<br>
+[% P.part.picker('part_id7', undef, convertible_unit='Std') %]<br>
+<br>
+With multi select popup<br>
+[% P.part.picker('part_id8', undef, multiple=1) %]<br>
+With multi select popup (only obsolete)<br>
+[% P.part.picker('part_id9', undef, multiple=1, status='obsolete') %]<br>
+<br>
+All parts including make models of all vendors: <br>
+[% P.part.picker('part_id21', undef, with_makemodel=1) %]<br>
+All parts including make models of all vendors with multi select popup: <br>
+[% P.part.picker('part_id22', undef, with_makemodel=1, multiple=1) %]<br>
+All parts including customer partnumbers of all customers: <br>
+[% P.part.picker('part_id23', undef, with_customer_partnumber=1) %]<br>
+<br>
+single select dialog for glass-popup-button; multi select with extra button (and limited to 5 results):<br>
+[% P.part.picker('part_id31', undef, multiple=0, multiple_limit=5) %]
+[% L.button_tag('$("#part_id31").data("part_picker").o.multiple=1; $("#part_id31").data("part_picker").open_dialog()', 'Add multiple items') %]<br>
+
+<h2>Styling</h2>
+
+In a span:
+<span>Leading text: [% P.part.picker('p1', undef, part_type='part,service') %] and text after with spacing</span><br>
+<span>Leading text:[% P.part.picker('p2', undef, part_type='part,service') %]and text after without spacing</span><br>
+<div>Leading text: [% P.part.picker('p3', undef, part_type='part,service') %] and text after with spacing with div</div><br>
+<div>Leading text:[% P.part.picker('p4', undef, part_type='part,service') %]and text after with spacing with div</div><br>
 
+<span>Picker + input next to each other: [% P.part.picker('p5', undef, part_type='part,service', width="100%") %]<input type=text></span>
+
+<div>[% P.part.picker('p6', undef, part_type='part,service', style="width:500px") %] 500px width</div>
+<div>[% P.part.picker('p7', undef, part_type='part,service', style="width:200px") %] 200px width</div>
+<div>[% P.part.picker('p8', undef, part_type='part,service', style="height:40px") %] 40px height</div>
 
 [%# FOREACH i IN 1..50 %]
-[%# L.part_picker('part_id_' _ i) %] <br>
+[%# P.part.picker('part_id_' _ i) %] <br>
 [%# END %]
+
+<h2>In tables</h2>
+
+<p>No classes:</p>
+
+<table>
+ <tr>
+  <th>Part picker in table heading</th>
+  <th>[% P.part.picker('p9', undef, part_type='part,service') %]</th>
+ </tr>
+ <tr>
+  <td>Part picker in table cell</td>
+  <td>[% P.part.picker('p10', undef, part_type='part,service') %]</td>
+ </tr>
+</table>
+
+<p>With classes:</p>
+
+<table>
+ <tr class=listheading>
+  <th>Part picker in table heading</th>
+  <th>[% P.part.picker('p11', undef, part_type='part,service') %]</th>
+ </tr>
+ <tr class=listrow>
+  <td>Part picker in table cell</td>
+  <td>[% P.part.picker('p12', undef, part_type='part,service') %]</td>
+ </tr>
+</table>