[open-ils-commits] r16976 - in branches/seials-integration/Open-ILS: examples src/sql/Pg web/opac/skin/default/js (dbwells)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 19 10:00:43 EDT 2010
Author: dbwells
Date: 2010-07-19 10:00:41 -0400 (Mon, 19 Jul 2010)
New Revision: 16976
Modified:
branches/seials-integration/Open-ILS/examples/fm_IDL.xml
branches/seials-integration/Open-ILS/src/sql/Pg/210.schema.serials.sql
branches/seials-integration/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
- Latest serials development schema and IDL
- Changes to rdetail.js (default only for now) to send serial 'drawn' event information to client
Modified: branches/seials-integration/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/seials-integration/Open-ILS/examples/fm_IDL.xml 2010-07-19 12:47:02 UTC (rev 16975)
+++ branches/seials-integration/Open-ILS/examples/fm_IDL.xml 2010-07-19 14:00:41 UTC (rev 16976)
@@ -2937,6 +2937,7 @@
<field name="incomplete" oils_persist:virtual="true" />
</fields>
</class>
+
<class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
<fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
<field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
@@ -2967,77 +2968,382 @@
</actions>
</permacrud>
</class>
+
+ <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
+ <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
+ <field reporter:label="Type" name="type" reporter:datatype="text"/>
+ <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
+ <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
+ <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
+ <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
+ <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
+ <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
+ <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
+ <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
+ <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
+ <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
+ <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
+ <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
+ <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
+ </fields>
+ <links>
+ <link field="record" reltype="has_a" key="id" map="" class="ssub"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ </permacrud>
+ </class>
+
<class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
<fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
- <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
- <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
- <field reporter:label="URI" name="uri" reporter:datatype="link"/>
- <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
- <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Id" name="id" reporter:datatype="id"/>
+ <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
+ <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
+ <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
+ <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
+ <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
</fields>
<links>
- <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
- <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
+ <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
+ <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
+ <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
+ <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
+ <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
</links>
</class>
- <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
- <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
- <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
+
+ <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
+ <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
<field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
- <field reporter:label="Label" name="label" />
+ <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
+ <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
+ <field reporter:label="Title" name="title" reporter:datatype="text"/>
+ <field reporter:label="Value" name="value" reporter:datatype="text"/>
</fields>
<links>
<link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
+ <link field="creator" reltype="has_a" key="id" map="" class="au"/>
</links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ </permacrud>
</class>
- <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
+
+ <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
+ <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
+ <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
+ <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="link"/>
+ <field reporter:label="Label" name="label" reporter:datatype="text"/>
+ <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
+ <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
+ <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
+ <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
+ <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
+ <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
+ <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
+ </fields>
+ <links>
+ <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
+ <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
+ <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
+ <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
+ <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
+ <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
+ <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
+ <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
+ <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
+ <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
+ <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
+ <field reporter:label="Title" name="title" reporter:datatype="text"/>
+ <field reporter:label="Value" name="value" reporter:datatype="text"/>
+ </fields>
+ <links>
+ <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
+ <link field="creator" reltype="has_a" key="id" map="" class="au"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
+ <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
+ <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
+ </fields>
+ <links>
+ <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ </permacrud>
+ </class>
+
+ <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
+ <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
+ <field reporter:label="Position" name="pos" reporter:datatype="int"/>
+ <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
+ <field reporter:label="Department" name="department" reporter:datatype="text"/>
+ <field reporter:label="Note" name="note" reporter:datatype="text"/>
+ </fields>
+ <links>
+ <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
+ <link field="reader" reltype="has_a" key="id" map="" class="au"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ </permacrud>
+ </class>
+
+ <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
<fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
- <field name="id" reporter:datatype="id" />
- <field name="subscription" reporter:datatype="link"/>
- <field name="target_copy" reporter:datatype="link"/>
- <field name="location" reporter:datatype="link"/>
- <field name="binding_unit" reporter:datatype="link"/>
- <field name="label" />
+ <field reporter:label="ID" name="id" reporter:datatype="id" />
+ <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
+ <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
+ <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
+ <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
+ <field reporter:label="Label" name="label" reporter:datatype="text"/>
+ <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
+ <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
+ <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
+ <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
</fields>
<links>
+ <link field="creator" reltype="has_a" key="id" map="" class="au"/>
+ <link field="editor" reltype="has_a" key="id" map="" class="au"/>
<link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
- <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
- <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
- <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
+ <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
</links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
</class>
- <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
+
+ <class id="sunit" controller="open-ils.cstore" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
+ <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
+ <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
+ <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
+ <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
+ <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
+ <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
+ <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
+ <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
+ <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
+ <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
+ <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
+ <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
+ <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
+ <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
+ <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
+ <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
+ <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
+ <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
+ <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
+ <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
+ <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
+ <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
+ <field reporter:label="Price" name="price" reporter:datatype="money" />
+ <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
+ <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
+ <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
+ <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
+ <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
+ <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
+ <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
+ <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
+ </fields>
+ <links>
+ <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
+ <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
+ <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
+ <link field="editor" reltype="has_a" key="id" map="" class="au"/>
+ <link field="creator" reltype="has_a" key="id" map="" class="au"/>
+ <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
+ <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
+ <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
+ <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
+ <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
+ <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
+ <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
+ <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
+ <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
+ <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
+ <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
+ <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
+ <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
+ <field reporter:label="URI" name="uri" reporter:datatype="link"/>
+ <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
+ <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
+ <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
+ </fields>
+ <links>
+ <link field="creator" reltype="has_a" key="id" map="" class="au"/>
+ <link field="editor" reltype="has_a" key="id" map="" class="au"/>
+ <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
+ <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
+ <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
+ <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
+ <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
+ <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Item" name="item" reporter:datatype="link"/>
+ <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
+ <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
+ <field reporter:label="Title" name="title" reporter:datatype="text"/>
+ <field reporter:label="Value" name="value" reporter:datatype="text"/>
+ </fields>
+ <links>
+ <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
+ <link field="creator" reltype="has_a" key="id" map="" class="au"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
+ </class>
+
+ <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
<fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
<field name="id" reporter:datatype="id" />
- <field name="subscription" reporter:datatype="link"/>
+ <field name="distribution" reporter:datatype="link"/>
<field name="generated_coverage" reporter:datatype="text"/>
<field name="textual_holdings" reporter:datatype="text"/>
</fields>
<links>
- <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
+ <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
</links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
</class>
- <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
+
+ <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
<fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
<field name="id" reporter:datatype="id" />
- <field name="subscription" reporter:datatype="link"/>
+ <field name="distribution" reporter:datatype="link"/>
<field name="generated_coverage" reporter:datatype="text"/>
<field name="textual_holdings" reporter:datatype="text"/>
</fields>
<links>
- <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
+ <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
</links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
</class>
- <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
+
+ <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
<fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
<field name="id" reporter:datatype="id" />
- <field name="subscription" reporter:datatype="link"/>
+ <field name="distribution" reporter:datatype="link"/>
<field name="generated_coverage" reporter:datatype="text"/>
<field name="textual_holdings" reporter:datatype="text"/>
</fields>
<links>
- <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
+ <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
</links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create/>
+ <retrieve/>
+ <update/>
+ <delete/>
+ </actions>
+ </permacrud>
</class>
<class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
Modified: branches/seials-integration/Open-ILS/src/sql/Pg/210.schema.serials.sql
===================================================================
--- branches/seials-integration/Open-ILS/src/sql/Pg/210.schema.serials.sql 2010-07-19 12:47:02 UTC (rev 16975)
+++ branches/seials-integration/Open-ILS/src/sql/Pg/210.schema.serials.sql 2010-07-19 14:00:41 UTC (rev 16976)
@@ -1,6 +1,6 @@
-DROP SCHEMA serial CASCADE;
+DROP SCHEMA IF EXISTS serial CASCADE;
BEGIN;
@@ -17,7 +17,7 @@
edit_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
active BOOL NOT NULL DEFAULT TRUE,
deleted BOOL NOT NULL DEFAULT FALSE,
- marc TEXT NOT NULL,
+ marc TEXT,
last_xact_id TEXT NOT NULL
);
CREATE INDEX serial_record_entry_creator_idx ON serial.record_entry ( creator );
@@ -27,48 +27,243 @@
CREATE RULE protect_mfhd_delete AS ON DELETE TO serial.record_entry DO INSTEAD UPDATE serial.record_entry SET deleted = true WHERE old.id = serial.record_entry.id;
CREATE TABLE serial.subscription (
- id SERIAL PRIMARY KEY,
- callnumber BIGINT REFERENCES asset.call_number (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
- uri INT REFERENCES asset.uri (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
- start_date DATE NOT NULL,
- end_date DATE -- interpret NULL as current subscription
+ id SERIAL PRIMARY KEY,
+ owning_lib INT NOT NULL DEFAULT 1 REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
+ start_date TIMESTAMP WITH TIME ZONE NOT NULL,
+ end_date TIMESTAMP WITH TIME ZONE, -- interpret NULL as current subscription
+ record_entry BIGINT REFERENCES biblio.record_entry (id)
+ ON DELETE SET NULL
+ DEFERRABLE INITIALLY DEFERRED,
+ expected_date_offset INTERVAL
+ -- acquisitions/business-side tables link to here
);
-CREATE TABLE serial.binding_unit (
- id SERIAL PRIMARY KEY,
- subscription INT NOT NULL REFERENCES serial.subscription (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- label TEXT NOT NULL,
- CONSTRAINT bu_label_once_per_sub UNIQUE (subscription, label)
+CREATE TABLE serial.subscription_note (
+ id SERIAL PRIMARY KEY,
+ subscription INT NOT NULL
+ REFERENCES serial.subscription (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ creator INT NOT NULL
+ REFERENCES actor.usr (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ pub BOOL NOT NULL DEFAULT FALSE,
+ title TEXT NOT NULL,
+ value TEXT NOT NULL
);
+CREATE TABLE serial.caption_and_pattern (
+ id SERIAL PRIMARY KEY,
+ subscription INT NOT NULL
+ REFERENCES serial.subscription (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ type TEXT NOT NULL
+ CONSTRAINT cap_type CHECK ( type in
+ ( 'basic', 'supplement', 'index' )),
+ create_date TIMESTAMPTZ NOT NULL DEFAULT now(),
+ active BOOL NOT NULL DEFAULT FALSE,
+ pattern_code TEXT NOT NULL, -- must contain JSON
+ enum_1 TEXT,
+ enum_2 TEXT,
+ enum_3 TEXT,
+ enum_4 TEXT,
+ enum_5 TEXT,
+ enum_6 TEXT,
+ chron_1 TEXT,
+ chron_2 TEXT,
+ chron_3 TEXT,
+ chron_4 TEXT,
+ chron_5 TEXT
+);
+
+--at least one distribution per org_unit holding issues
+CREATE TABLE serial.distribution (
+ id SERIAL PRIMARY KEY,
+ record_entry BIGINT REFERENCES serial.record_entry (id)
+ ON DELETE SET NULL
+ DEFERRABLE INITIALLY DEFERRED,
+ subscription INT NOT NULL
+ REFERENCES serial.subscription (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ holding_lib INT NOT NULL
+ REFERENCES actor.org_unit (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ label TEXT NOT NULL,
+ receive_call_number BIGINT REFERENCES asset.call_number (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ receive_unit_template INT REFERENCES asset.copy_template (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ bind_call_number BIGINT REFERENCES asset.call_number (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ bind_unit_template INT REFERENCES asset.copy_template (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ unit_label_prefix TEXT,
+ unit_label_suffix TEXT
+);
+CREATE UNIQUE INDEX one_dist_per_sre_idx ON serial.distribution (record_entry);
+
+CREATE TABLE serial.distribution_note (
+ id SERIAL PRIMARY KEY,
+ distribution INT NOT NULL
+ REFERENCES serial.distribution (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ creator INT NOT NULL
+ REFERENCES actor.usr (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ pub BOOL NOT NULL DEFAULT FALSE,
+ title TEXT NOT NULL,
+ value TEXT NOT NULL
+);
+
+CREATE TABLE serial.stream (
+ id SERIAL PRIMARY KEY,
+ distribution INT NOT NULL
+ REFERENCES serial.distribution (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ routing_label TEXT
+);
+
+CREATE UNIQUE INDEX label_once_per_dist
+ ON serial.stream (distribution, routing_label)
+ WHERE routing_label IS NOT NULL;
+
+CREATE TABLE serial.routing_list_user (
+ id SERIAL PRIMARY KEY,
+ stream INT NOT NULL
+ REFERENCES serial.stream
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ pos INT NOT NULL DEFAULT 1,
+ reader INT REFERENCES actor.usr
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ department TEXT,
+ note TEXT,
+ CONSTRAINT one_pos_per_routing_list UNIQUE ( stream, pos ),
+ CONSTRAINT reader_or_dept CHECK
+ (
+ -- Recipient is a person or a department, but not both
+ (reader IS NOT NULL AND department IS NULL) OR
+ (reader IS NULL AND department IS NOT NULL)
+ )
+);
+
CREATE TABLE serial.issuance (
- id SERIAL PRIMARY KEY,
- subscription INT NOT NULL REFERENCES serial.subscription (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- target_copy BIGINT REFERENCES asset.copy (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- location BIGINT REFERENCES asset.copy_location(id) DEFERRABLE INITIALLY DEFERRED,
- binding_unit INT REFERENCES serial.binding_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- label TEXT
+ id SERIAL PRIMARY KEY,
+ creator INT NOT NULL
+ REFERENCES actor.usr (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ editor INT NOT NULL
+ REFERENCES actor.usr (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+ edit_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+ subscription INT NOT NULL
+ REFERENCES serial.subscription (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ label TEXT,
+ date_published TIMESTAMP WITH TIME ZONE,
+ caption_and_pattern INT REFERENCES serial.caption_and_pattern (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ holding_code TEXT,
+ holding_type TEXT CONSTRAINT valid_holding_type CHECK
+ (
+ holding_type IS NULL
+ OR holding_type IN ('basic','supplement','index')
+ ),
+ holding_link_id INT -- probably defunct
+ -- TODO: add columns for separate enumeration/chronology values
);
+CREATE TABLE serial.unit (
+ sort_key TEXT,
+ detailed_contents TEXT NOT NULL,
+ summary_contents TEXT NOT NULL
+) INHERITS (asset.copy);
+
+ALTER TABLE serial.unit ADD PRIMARY KEY (id);
+
+-- must create this rule explicitly; it is not inherited from asset.copy
+CREATE RULE protect_serial_unit_delete AS ON DELETE TO serial.unit DO INSTEAD UPDATE serial.unit SET deleted = TRUE WHERE OLD.id = serial.unit.id;
+
+CREATE TABLE serial.item (
+ id SERIAL PRIMARY KEY,
+ creator INT NOT NULL
+ REFERENCES actor.usr (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ editor INT NOT NULL
+ REFERENCES actor.usr (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+ edit_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+ issuance INT NOT NULL
+ REFERENCES serial.issuance (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ stream INT NOT NULL
+ REFERENCES serial.stream (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ unit INT REFERENCES serial.unit (id)
+ ON DELETE SET NULL
+ DEFERRABLE INITIALLY DEFERRED,
+ uri INT REFERENCES asset.uri (id)
+ ON DELETE SET NULL
+ DEFERRABLE INITIALLY DEFERRED,
+ date_expected TIMESTAMP WITH TIME ZONE,
+ date_received TIMESTAMP WITH TIME ZONE
+);
+
+CREATE TABLE serial.item_note (
+ id SERIAL PRIMARY KEY,
+ item INT NOT NULL
+ REFERENCES serial.item (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ creator INT NOT NULL
+ REFERENCES actor.usr (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ pub BOOL NOT NULL DEFAULT FALSE,
+ title TEXT NOT NULL,
+ value TEXT NOT NULL
+);
+
CREATE TABLE serial.bib_summary (
- id SERIAL PRIMARY KEY,
- subscription INT UNIQUE NOT NULL REFERENCES serial.subscription (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- generated_coverage TEXT NOT NULL,
- textual_holdings TEXT
+ id SERIAL PRIMARY KEY,
+ distribution INT NOT NULL
+ REFERENCES serial.distribution (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ generated_coverage TEXT NOT NULL,
+ textual_holdings TEXT
);
CREATE TABLE serial.sup_summary (
- id SERIAL PRIMARY KEY,
- subscription INT UNIQUE NOT NULL REFERENCES serial.subscription (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- generated_coverage TEXT NOT NULL,
- textual_holdings TEXT
+ id SERIAL PRIMARY KEY,
+ distribution INT NOT NULL
+ REFERENCES serial.distribution (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ generated_coverage TEXT NOT NULL,
+ textual_holdings TEXT
);
CREATE TABLE serial.index_summary (
- id SERIAL PRIMARY KEY,
- subscription INT UNIQUE NOT NULL REFERENCES serial.subscription (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- generated_coverage TEXT NOT NULL,
- textual_holdings TEXT
+ id SERIAL PRIMARY KEY,
+ distribution INT NOT NULL
+ REFERENCES serial.distribution (id)
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ generated_coverage TEXT NOT NULL,
+ textual_holdings TEXT
);
COMMIT;
Modified: branches/seials-integration/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- branches/seials-integration/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-07-19 12:47:02 UTC (rev 16975)
+++ branches/seials-integration/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-07-19 14:00:41 UTC (rev 16976)
@@ -42,6 +42,8 @@
var rdetailStart = null;
var rdetailEnd = null;
+var mfhdDetails = [];
+
/* serials are currently the only use of Dojo strings in the OPAC */
if (rdetailDisplaySerialHoldings) {
dojo.require("dijit.Menu");
@@ -243,6 +245,10 @@
dojo.forEach(holdings, _holdingsDrawMFHD);
+ // Populate XUL menus
+ if (isXUL()) {
+ runEvt('rdetail','MFHDDrawn');
+ }
}
function _holdingsDrawMFHD(holdings, entryNum) {
@@ -284,6 +290,14 @@
}
}
+ // Show entryNum + 1 in staff client for better menu correlation
+ // Maybe this should be holdings.id() instead? (which could get long after time)
+ var entryNumString = '';
+ if (isXUL()) {
+ var entryNumInc = entryNum + 1;
+ entryNumString = ' [Entry #'+entryNumInc+'] ';
+ }
+
dojo.place("<table style='width: 100%;'><caption id='mfhdHoldingsCaption" + entryNum + "' class='rdetail_header color_1'>" +
dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [hloc]) +
"</caption><tbody id='rdetail_holdings_tbody_" + entryNum +
@@ -300,6 +314,7 @@
if (hinc.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.INCOMPLETE_VOLUMES, hinc); }
if (isXUL()) {
+ mfhdDetails.push({ 'id' : holdings.id(), 'label' : hloc, 'entryNum' : entryNum, 'owning_lib' : holdings.owning_lib() });
dojo.require('openils.Event');
dojo.require('openils.PermaCrud');
var mfhd_edit = new dijit.Menu({});
More information about the open-ils-commits
mailing list