1 [% WRAPPER default/base.tt2 %]
2 [% ctx.page_title = 'Distribution Formulas' %]
3 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/distribution_formula.js'></script>
5 <script type="text/javascript">
6 var formulaId = '[% ctx.page_args.0 %]';
8 function getFormulaName(rowIndex, item) {
10 var name = this.grid.store.getValue(item, 'name');
11 var id = this.grid.store.getValue(item, 'id');
12 return id + ':' + name;
15 function formatName(value) {
17 var vals = value.split(/:/);
18 return '<a href="'+location.href+ '/'+vals[0]+'">'+vals[1]+'</a>';
24 <div id='formula-list-div'>
25 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
26 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
27 <div>Distribution Formulas</div>
29 <button dojoType='dijit.form.Button' onClick='fListGrid.showCreateDialog()'>New Formula</button>
30 <button dojoType='dijit.form.Button' onClick='fListGrid.deleteSelected()'>Delete Selected</button>
31 <button dojoType='dijit.form.Button' onClick='cloneSelectedFormula()'>Clone Selected</button>
34 <table jsId="fListGrid"
35 dojoType="openils.widget.AutoGrid"
36 fieldOrder="['id', 'name', 'owner', 'item_count']"
37 suppressFields="['skip_count']"
44 <th field='name' get='getFormulaName' formatter='formatName'/>
45 <th field='item_count' get='getItemCount'/>
53 <div id='formula-entry-div'>
54 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
55 <div><a href='javascript:void(0);' id="formula_head"></a></div>
61 <button dojoType='dijit.form.Button' onClick='addEntry()'>New Entry</button>
62 <span style='padding-right:20px;'></span>
63 <button dojoType='dijit.form.Button' onClick='saveFormula()'>Apply Changes</button>
66 <table class='oils-generic-table'>
70 <th>Owning Library</th>
71 <th>Shelving Location</th>
76 <tbody id='formula-entry-tbody'>
77 <tr id='formula-entry-tempate'>
78 <td><div name='delete' dojoType='dijit.form.Button' style='color:red;' scrollOnFocus='false'>X</div></td>
79 <td><div name='owning_lib'></td>
80 <td><div name='location'></td>
81 <td><div name='item_count'></td>
83 <img src='[% ctx.media_prefix %]/images/dimple.png'/>
84 <img src='[% ctx.media_prefix %]/images/dimple.png'/>
85 <img src='[% ctx.media_prefix %]/images/dimple.png'/>
92 <button dojoType='dijit.form.Button' onClick='addEntry()'>New Entry</button>
93 <span style='padding-right:20px;'></span>
94 <button dojoType='dijit.form.Button' onClick='saveFormula()'>Apply Changes</button>