Class: OLE_QA::Framework::OLELS::Item_Editor

Inherits:
Editor show all
Defined in:
lib/olels/pages/item_editor.rb

Overview

The OLE Library System MARC Item Record Editor Screen

Instance Attribute Summary

Attributes inherited from Page

#url

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Editor

#create_line, #initialize, #remove_line, #wait_for_elements

Methods inherited from Page

#initialize, #open, #wait_for_element, #wait_for_elements, #wait_for_page_to_load

Methods inherited from Common_Object

#initialize

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

This class inherits a constructor from OLE_QA::Framework::OLELS::Editor

Instance Method Details

#create_item_note(which = 1) ⇒ Object Also known as: add_item_note

Add an item note line object.



80
81
82
# File 'lib/olels/pages/item_editor.rb', line 80

def create_item_note(which = 1)
  create_line("item_note_#{which}","Item_Note",which)
end

#remove_item_note(which = 1) ⇒ Object Also known as: delete_item_note

Remove an item note line object.



86
87
88
# File 'lib/olels/pages/item_editor.rb', line 86

def remove_item_note(which = 1)
  remove_line("item_note_#{which}")
end

#set_elementsObject

Set Item Editor screen elements.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/olels/pages/item_editor.rb', line 19

def set_elements
  super
  # Override message in Editor base class, add multi-message element.
  element(:message)                                   {b.span(:id => "workItemMessage_span")}
  element(:messages)                                  {b.span(:id => "workItemMessage_span").font}
  # Holdings Location/Call Number Information
  element(:holdings_location_field)                   {b.span(:id => "OleHoldingLocationLevelName_control")}
  element(:holdings_prefix_field)                     {b.span(:id => "OleHoldingCallNumberPrefix_control")}
  element(:holdings_shelving_order_field)             {b.span(:id => "OleHoldingShelvingOrder_control")}
  element(:holdings_call_number_field)                {b.span(:id => "OleHoldingCallNumber_control")}
  element(:holdings_call_number_type_field)           {b.span(:id => "OleHoldingShelvingScheme_control")}
  # Item Location/Call Number Information
  element(:location_field)                            {b.text_field(:id => "OleItemLocationLevelName_control")}
  element(:prefix_field)                              {b.text_field(:id => "OleItemCallNumberPrefix_control")}
  element(:shelving_order_field)                      {b.text_field(:id => "OleItemShelvingOrder_control")}
  element(:call_number_field)                         {b.text_field(:id => "OleItemCallNumber_control")}
  element(:call_number_type_selector)                 {b.select_list(:id => "OleItemShelvingScheme_control")}
  element(:browse_button)                             {b.button(:id => "callNumberItemBrowseLink")}
  # Item Information
  element(:item_id_field)                             {b.text_field(:id => "oleItemIdentifier_ID_control")}
  element(:barcode_field)                             {b.text_field(:id => "oleItemAccessInformationBarcode_control")}
  element(:barcode_arsl_field)                        {b.text_field(:id => "oleItemBarcodeARSL_control")}
  element(:former_identifiers_field)                  {b.text_field(:id => "oleItemFormerIdentifier_control")}
  element(:statistical_searching_codes_selector)      {b.select_list(:id => "oleItemStatisticalSearchingCodes_control")}
  element(:temp_item_type_selector)                   {b.select_list(:id => "oleItemTemporaryItemType_control")}
  element(:enumeration_field)                         {b.text_field(:id => "oleItemEnumeration_control")}
  element(:chronology_field)                          {b.text_field(:id => "oleItemChronology_control")}
  element(:copy_number_field)                         {b.text_field(:id => "oleItemCopyNumber_control")}
  element(:access_info_uri_field)                     {b.text_field(:id => "oleItemAccessInformationURI_control")}
  element(:item_type_selector)                        {b.select_list(:id => "oleItemItemType_control")}
  element(:number_of_pieces_field)                    {b.select_list(:id => "oleItemNumberOfPiece_control")}
  # Acquisition Information
  element(:po_line_item_id_field)                     {b.text_field(:id => "oleItemPoID_control")}
  element(:vendor_line_item_id_field)                 {b.text_field(:id => "oleItemVendorLineItemID_control")}
  element(:fund_field)                                {b.text_field(:id => "oleItemFund_control")}
  element(:price_field)                               {b.text_field(:id => "oleItemPrice_control")}
  element(:donor_public_display_field)                {b.text_field(:id => "oleItemDonorPublicDisplay_control")}
  element(:donor_note_field)                          {b.text_field(:id => "oleItemDonorNote_control")}
  # Circulation Information
  element(:item_status_selector)                      {b.select_list(:id => "oleItemStatus_control")}
  element(:checkin_note_field)                        {b.text_field(:id => "oleItemCheckinNote_control")}
  element(:item_effective_status_date)                {b.text_field(:id => "oleItemStatusEffectiveDate_control")}
  element(:fast_add_checkbox)                         {b.checkbox(:id => "oleItemFastAdd_control")}
  element(:staff_only_checkbox)                       {b.checkbox(:id => "oleItemStaffOnly_control")}
  # Extended Information
  element(:high_density_storage_field)                {b.text_field(:id => "oleItemHighDensityStorage_control")}
end

#set_functionsObject

Set commonly-used functions on the Item Editor page.



68
69
70
71
72
# File 'lib/olels/pages/item_editor.rb', line 68

def set_functions
  super
  # Return an array containing the text of multiple message elements.
  function(:get_messages)                             {ary_out = [] ; messages.each {|msg| ary_out << msg.text} ; ary_out}
end

#set_linesObject

Create an item note line object.



75
76
77
# File 'lib/olels/pages/item_editor.rb', line 75

def set_lines
  create_item_note(1)
end