2 [% ctx.page_title = l('Distribution Formulas') %]
4 <div id='formula-list-div'>
5 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
6 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
7 <div>[% l('Distribution Formulas') %]</div>
9 <button dojoType='dijit.form.Button' onClick='fListGrid.showCreateDialog()'>[% l('New Formula') %]</button>
10 <button dojoType='dijit.form.Button' onClick='fListGrid.deleteSelected()'>[% l('Delete Selected') %]</button>
11 <button dojoType='dijit.form.Button' onClick='cloneSelectedFormula()'>[% l('Clone Selected') %]</button>
14 <table jsId="fListGrid"
15 dojoType="openils.widget.AutoGrid"
16 fieldOrder="['id', 'name', 'owner', 'item_count']"
17 suppressFields="['skip_count']"
25 <th field='name' get='getFormulaName' formatter='formatName'></th>
26 <th field='item_count' get='getItemCount'></th>
34 <div id='formula-entry-div'>
35 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
36 <div><a href='javascript:void(0);' id="formula_head"></a></div>
42 <button dojoType='dijit.form.Button' onClick='addEntry()'>[% l('New Entry') %]</button>
43 <span style='padding-right:20px;'></span>
44 <button dojoType='dijit.form.Button' onClick='saveFormula()'>[% l('Apply Changes') %]</button>
47 <table class='oils-generic-table'>
51 <th>[% l('Owning Library') %]</th>
52 <th>[% l('Copy Location') %]</th>
53 <th>[% l('Fund') %]</th>
54 <th>[% l('Circ Modifier') %]</th>
55 <th>[% l('Collection Code') %]</th>
56 <th>[% l('Item Count') %]</th>
60 <tbody id='formula-entry-tbody'>
61 <tr id='formula-entry-tempate'>
62 <td><div name='delete' dojoType='dijit.form.Button' style='color:red;' scrollOnFocus='false'>X</div></td>
63 <td><div name='owning_lib'></div></td>
64 <td><div name='location'></div></td>
65 <td><div name='fund'></div></td>
66 <td><div name='circ_modifier'></div></td>
67 <td><div name='collection_code'></div></td>
68 <td><div name='item_count'></div></td>
70 <img src='[% ctx.media_prefix %]/images/dimple.png'/>
71 <img src='[% ctx.media_prefix %]/images/dimple.png'/>
72 <img src='[% ctx.media_prefix %]/images/dimple.png'/>
79 <button dojoType='dijit.form.Button' onClick='addEntry()'>[% l('New Entry') %]</button>
80 <span style='padding-right:20px;'></span>
81 <button dojoType='dijit.form.Button' onClick='saveFormula()'>[% l('Apply Changes') %]</button>
85 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/distribution_formula.js'></script>
87 <script type="text/javascript">
88 var formulaId = '[% ctx.page_args.0 %]';
90 function getFormulaName(rowIndex, item) {
92 var name = this.grid.store.getValue(item, 'name');
93 var id = this.grid.store.getValue(item, 'id');
94 return id + ':' + name;
97 function formatName(value) {
99 var vals = value.split(/:/);
100 return '<a href="'+location.href+ '/'+vals[0]+'">'+vals[1]+'</a>';