Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
authorBill Erickson <berick@esilibrary.com>
Thu, 8 Sep 2011 19:55:36 +0000 (15:55 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 8 Sep 2011 19:55:36 +0000 (15:55 -0400)
1  2 
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/Makefile.am
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/templates/booking/reservation.tt2
Open-ILS/src/templates/conify/global/acq/provider.tt2

Simple merge
Simple merge
index 5888049,0000000..ece7c58
mode 100644,000000..100644
--- /dev/null
@@@ -1,118 -1,0 +1,122 @@@
 +[% WRAPPER "base.tt2" %]
 +<link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/booking.css" />
 +<div id="auto_l10n_start_here">
 +    <div id="brt_search_block" class="container">
 +        <h1 class="booking AUTO_choose_a_brt"></h1>
 +        <form onsubmit="return false;">
 +            <div id="select_noncat_brt_block">
 +                <div id="brt_selector_here" class="nice_vertical_padding"></div>
 +                <div class="nice_vertical_padding">
 +                    <input type="button" class="AUTO_ATTR_VALUE_next"
 +                        onclick="init_resv_iface_sel(); return false"
 +                        />
 +                </div>
 +                <hr />
 +                <div class="nice_vertical_padding AUTO_or" id="or"></div>
 +            </div>
 +            <div id="arbitrary_resource_block">
 +                <label for="arbitrary_resource" class="AUTO_arbitrary_resource">
 +                </label>
 +                <input id="arbitrary_resource" name="arbitrary_resource" />
 +                <input type="button"
 +                    onclick="init_resv_iface_arb(); return false;"
 +                    class="AUTO_ATTR_VALUE_next" />
 +                <p class="AUTO_explain_bookable"></p>
 +            </div>
 +        </form>
 +    </div>
 +
 +    <div id="brt_reserve_block" class="container">
 +        <form onsubmit="return false;">
 +            <div id="brsrc_available_outer">
 +                <h1 class="booking" id="brsrc_list_header"></h1>
 +                <!-- I'm reluctantly hardcoding the size attribute below to 12
 +                    since you can't get the behavior of the size attribute with
 +                    anything in CSS. -->
 +                <select id="brsrc_list" name="brsrc_list" multiple="multiple"
 +                    size="12"></select>
 +                <div id="contain_patron_barcode" class="nice_vertical_padding">
 +                    <label class="AUTO_patron_barcode"
 +                        for="patron_barcode" /></label>
 +                    <input name="patron_barcode" id="patron_barcode"
 +                        onchange="update_bresv_grid();" />
 +                </div>
 +                <div id="pickup_lib_selector_row" class="nice_vertical_padding">
 +                    <label for="pickup_lib_selector"
 +                        class="AUTO_pickup_lib_selector"></label>
 +                    <select dojoType="openils.widget.OrgUnitFilteringSelect"
 +                        id="pickup_lib_selector" jsId="pickup_lib_selector"
 +                        searchAttr="shortname" labelAttr="shortname"></select>
 +                </div>
++                <div id="contain_email_notify" class="nice_vertical_padding">
++                    <input type="checkbox" name="email_notify" id="email_notify" />
++                    <label class="AUTO_email_notify" for="email_notify"></label>
++                </div>
 +                <div class="nice_vertical_padding">
 +                    <span class="two_buttons">
 +                        <input type="button"
 +                            class="AUTO_ATTR_VALUE_reserve_brsrc"
 +                            onclick="create_bresv_on_brsrc();" />
 +                        &nbsp;
 +                        <input type="button"
 +                            class="AUTO_ATTR_VALUE_reserve_brt"
 +                            onclick="create_bresv_on_brt();" />
 +                    </span>
 +                </div>
 +            </div>
 +            <div id="reserve_right_side">
 +                <h2 class="booking AUTO_i_need_this_resource"></h2>
 +                <div id="reserve_datetime_start">
 +                    <label class="reserve_datetime AUTO_starting_at"
 +                        for="reserve_date_start"></label><br />
 +                    <input id="reserve_date_start" />
 +                    <input id="reserve_time_start" />
 +                </div>
 +                <div id="reserve_datetime_end">
 +                    <label class="reserve_datetime AUTO_ending_at"
 +                        for="reserve_date_end"></label><br />
 +                    <input id="reserve_date_end" />
 +                    <input id="reserve_time_end" />
 +                </div>
 +                <h2 id="bra_and_brav_header"
 +                    class="booking AUTO_with_these_attr"></h2>
 +                <div id="bra_and_brav"></div>
 +            </div>
 +        </form>
 +    </div>
 +
 +    <div id="reserve_under">
 +        <hr />
 +        <h2 class="booking" id="existing_reservation_patron_line"></h2>
 +        <div id="bresv_grid_alt_explanation"></div>
 +        <table id="bresv_grid" jsId="bresvGrid"
 +            dojoType="dojox.grid.DataGrid" query="{id: '*'}"
 +            rowSelector="20px" autoHeight="true" width="auto">
 +            <thead>
 +                <tr><!-- FIXME: i18n problem: init_auto_l10n() runs
 +                        too late to take care of the below elements. -->
 +                    <th width="35%" field="type">Type</th>
 +                    <th width="25%" field="resource">Resource</th>
 +                    <th width="20%" field="start_time">Start time</th>
 +                    <th width="20%" field="end_time">End time</th>
 +                </tr>
 +            </thead>
 +        </table>
 +        <div class="nice_vertical_padding"
 +            id="existing_bresv_under_buttons">
 +            <!-- <input type="button" id="button_edit_existing"
 +                class="AUTO_ATTR_VALUE_button_edit_existing" /> -->
 +            <input type="button" id="button_cancel_existing"
 +                class="AUTO_ATTR_VALUE_button_cancel_existing"
 +                onclick="cancel_selected_bresv(bresvGrid.selection.getSelected());" />
 +        </div>
 +    </div>
 +</div>
 +
 +<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/common.js"></script>
 +<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/reservation.js"></script>
 +<script type="text/javascript">
 +    dojo.require("dojox.grid.DataGrid");
 +    openils.Util.addOnLoad(my_init);
 +</script>
 +[% END %]
index 117f8e2,0000000..655d838
mode 100644,000000..100644
--- /dev/null
@@@ -1,211 -1,0 +1,219 @@@
 +[% WRAPPER base.tt2 %]
 +[% ctx.page_title = 'Providers' %]
 +
 +<div class="hidden">
 +    <select dojoType="dijit.form.FilteringSelect" jsId="nameSelect">
 +        <option value='owning_lib'>Owning Library</option>
 +        <option value='quantity'>Quantity</option>
 +        <option value='call_number'>Call Number</option>
 +        <option value='fund_code'>Fund Code</option>
 +        <option value='local_note'>Local Note</option>
 +        <option value='price'>Price</option>
 +        <option value='circ_modifier'>Circulation Modifier</option>
 +        <option value='copy_location'>Copy Location</option>
 +        <option value='collection_code'>Collection Code</option>
 +    </select>
 +</div> 
 +
 +<div id='provider-list-div'>
 +    <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Provider</div>
 +            <div>
 +                <button dojoType='dijit.form.Button' onClick='pListGrid.showCreatePane()'>New Provider</button>
 +                <button dojoType='dijit.form.Button' onClick='pListGrid.deleteSelected()'>Delete Selected</button> 
 +            </div>
 +        </div>
 +    </div>
 +    <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
++        <span>Context Org Unit</span>
++        <select dojoType="openils.widget.OrgUnitFilteringSelect"
++            jsId='contextOrgSelector'
++            searchAttr='shortname'
++            labelAttr='shortname'>
++        </select>
++    </div>
++    <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
 +        <table  jsId="pListGrid"
 +                dojoType="openils.widget.AutoGrid"
 +                fieldOrder="['id', 'name', 'code', 'owner', 'currency_type']"
 +                query="{id: '*'}"
 +                defaultCellWidth='"auto"'
 +                fmClass='acqpro'
 +                showPaginator='true'
 +                editOnEnter='true'>
 +            <thead>
 +                <tr><th field='name' get='getProviderName' formatter='formatName'/></tr>
 +            </thead>
 +        </table>
 +    </div>
 +</div>
 +
 +<div id='provider-summary-pane'></div>     
 +<div id='provider-details-div' style='height:600px'>
 +<div dojoType="dijit.layout.TabContainer" style='height:100%' jsId='providerTabs'>
 +
 +    <div dojoType="dijit.layout.ContentPane" title='Provider Address' select='true' id='provider-address'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Provider Address</div>
 +            <div>
 +            <button dojoType='dijit.form.Button' onClick='paListGrid.showCreateDialog()'>New Provider Address</button>
 +            <button dojoType='dijit.form.Button' onClick='paListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:100px'>
 +            <table  jsId="paListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'address_type', 'provider', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
 +                    requiredFields="['street1', 'city', 'state', 'country', 'post_code']"
 +                    query="{id: '*'}"
 +                    fmClass='acqpa'
 +                    defaultCellWidth='"auto"' 
 +                    editOnEnter='true'>
 +            </table>
 +        </div>
 +    </div>
 +
 +    <div dojoType="dijit.layout.ContentPane" title='Provider Contact' id='tab-pro-contact'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Provider Contact</div>
 +            <div>
 +            <button dojoType='dijit.form.Button' onClick='pcListGrid.showCreateDialog()'>New Contact</button>
 +            <button dojoType='dijit.form.Button' onClick='pcListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
 +            <table  jsId="pcListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'name', 'provider', 'role', 'email']"
 +                    requiredFields="['name']"
 +                    defaultCellWidth='"auto"'
 +                    query="{id: '*'}"
 +                    fmClass='acqpc'
 +                    editOnEnter='true'>
 +            </table>
 +        </div>
 +      
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Contact Address</div>
 +            <div>
 +                <button dojoType='dijit.form.Button' onClick='pcaListGrid.showCreateDialog()'>New Contact Address</button>
 +                <button dojoType='dijit.form.Button' onClick='pcaListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
 +            <table  jsId="pcaListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'address_type', 'contact', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
 +                    requiredFields="['street1', 'city', 'state', 'country', 'post_code']"
 +                    query="{id: '*'}"
 +                    fmClass='acqpca'
 +                    defaultCellWidth='"auto"' 
 +                    editOnEnter='true'>
 +            </table>
 +        </div>
 +       
 +    </div>
 +    <div dojoType="dijit.layout.ContentPane" title='Attribute Definitions' id='tab-attr'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div> Attribute Definitions</div>
 +            <div>
 +                <button dojoType='dijit.form.Button' onClick='padListGrid.showCreateDialog()'>New Attribute Definition</button>
 +                <button dojoType='dijit.form.Button' onClick='padListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
 +            <table  jsId="padListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'provider', 'code', 'description',  'provider', 'ident', 'remove',  'tag', 'subfield', 'xpath']"
 +                    requiredFields="['code', 'description', 'xpath']"
 +                    query="{id: '*'}"
 +                    fmClass='acqlipad'
 +                    editOnEnter='true'>
 +                <thead>
 +                    <tr>
 +                        <th field="xpath" width='auto'/>
 +                        <th field="tag" name="Tag" get='getParsedTag'/>
 +                        <th field="subfield" name="Subfield" get='getParsedSubf'/>
 +                    </tr>
 +                </thead>
 +            </table>
 +        </div>
 +    </div>
 +
 +    <div dojoType="dijit.layout.ContentPane" title='Holding Subfield' id='tab-hold'>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
 +            <div>Holding Subfield</div>
 +            <div>
 +            <button dojoType='dijit.form.Button' onClick='phsListGrid.showCreateDialog()'>New Holding Subfield</button>
 +            <button dojoType='dijit.form.Button' onClick='phsListGrid.deleteSelected()'>Delete Selected</button>
 +            </div>
 +        </div>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
 +            <table  jsId="phsListGrid"
 +                    dojoType="openils.widget.AutoGrid"
 +                    fieldOrder="['id', 'provider', 'name', 'subfield']"
 +                    requiredFields="['name', 'subfield']"
 +                    query="{id: '*'}"
 +                    fmClass='acqphsm'
 +                    editOnEnter='true'>
 +            </table>
 +        </div>
 +    </div>
 +
 +    <div dojoType="dijit.layout.ContentPane" title="Invoices" id="tab-invoice">
 +        <big class="oils-acq-basic-roomy"><strong>Invoices</strong></big>
 +        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style="height:400px">
 +            <table jsId="invListGrid"
 +                dojoType="openils.widget.AutoGrid"
 +                fieldOrder="['inv_ident', 'receiver', 'shipper']"
 +                suppressFields="['id', 'provider']"
 +                query="{id: '*'}"
 +                showPaginator='true'
 +                fmClass="acqinv">
 +                <thead>
 +                    <tr>
 +                        <th field="inv_ident" get="getInvIdent" formatter="formatInvIdent" />
 +                    </tr>
 +                </thead>
 +            </table>
 +        </div>
 +    </div>
 +</div>
 +</div>
 +
 +<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/provider.js'> </script>
 +
 +<script type="text/javascript"> 
 +    var providerId = '[% ctx.page_args.0 %]';
 +
 +function getInvIdent(rowIndex, item) {
 +    if (!item) return {};
 +    return {
 +          "id": this.grid.store.getValue(item, "id"),
 +        "name": this.grid.store.getValue(item, "inv_ident")
 +    };
 +}
 +
 +function formatInvIdent(o) {
 +    return "<a href='" + oilsBasePath + "/acq/invoice/view/" + o.id + "'>" + o.name + "</a>";
 +}
 +
 +function getProviderName(rowIndex, item) {
 +    if(!item) return '';
 +    var name = this.grid.store.getValue(item, 'name');
 +    var id   = this.grid.store.getValue(item, 'id');
 +    return id + ':' + name;
 +}
 +
 +function formatName(value) {
 +    if(value) {
 +        var vals = value.split(/:/);
 +        return '<a href="[% ctx.base_path %]/conify/global/acq/provider/'+vals[0]+'">'+vals[1]+'</a>';
 +    }
 +}
 +
 +</script>
 +
 +[% END %]
 +