Class: OLE_QA::Framework::OLELS::Bib_Editor
- Inherits:
-
Editor
- Object
- Common_Object
- Page
- Editor
- OLE_QA::Framework::OLELS::Bib_Editor
- Defined in:
- lib/olels/pages/bib_editor.rb
Overview
The OLE Library System MARC Bibliographic Record Editor Screen
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#create_006_line(which = 1) ⇒ Object
(also: #add_006_line)
Add a control field 006 line to the editor page model.
-
#create_007_line(which = 1) ⇒ Object
(also: #add_007_line)
Add a control field 007 line to the editor page model.
-
#create_data_line(which = 1) ⇒ Object
(also: #add_data_line)
Add a Marc data line to the editor page model.
-
#remove_006_line(which = 1) ⇒ Object
(also: #delete_006_line)
Remove a control 006 line from the editor page model.
-
#remove_007_line(which = 1) ⇒ Object
(also: #delete_007_line)
Remove a control 007 line from the editor page model.
-
#remove_data_line(which = 1) ⇒ Object
(also: #delete_data_line)
Remove a Marc data line from the editor page model.
-
#set_elements ⇒ Object
Set OLE Library System Bib Editor screen elements.
- #set_functions ⇒ Object
-
#set_lines ⇒ Object
Add the first Marc Data Line to a new Bib Editor record.
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
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_006_line(which = 1) ⇒ Object Also known as: add_006_line
Add a control field 006 line to the editor page model.
80 81 82 |
# File 'lib/olels/pages/bib_editor.rb', line 80 def create_006_line(which = 1) create_line("control_006_line_#{which}", "Control_006_Line", which) end |
#create_007_line(which = 1) ⇒ Object Also known as: add_007_line
Add a control field 007 line to the editor page model.
86 87 88 |
# File 'lib/olels/pages/bib_editor.rb', line 86 def create_007_line(which = 1) create_line("control_007_line_#{which}", "Control_007_Line", which) end |
#create_data_line(which = 1) ⇒ Object Also known as: add_data_line
Add a Marc data line to the editor page model.
92 93 94 |
# File 'lib/olels/pages/bib_editor.rb', line 92 def create_data_line(which = 1) create_line("data_line_#{which}","Data_Line", which) end |
#remove_006_line(which = 1) ⇒ Object Also known as: delete_006_line
Remove a control 006 line from the editor page model.
104 105 106 |
# File 'lib/olels/pages/bib_editor.rb', line 104 def remove_006_line(which = 1) remove_line("control_006_line_#{which}") end |
#remove_007_line(which = 1) ⇒ Object Also known as: delete_007_line
Remove a control 007 line from the editor page model.
110 111 112 |
# File 'lib/olels/pages/bib_editor.rb', line 110 def remove_007_line(which = 1) remove_line("control_007_line_#{which}") end |
#remove_data_line(which = 1) ⇒ Object Also known as: delete_data_line
Remove a Marc data line from the editor page model.
98 99 100 |
# File 'lib/olels/pages/bib_editor.rb', line 98 def remove_data_line(which = 1) remove_line("data_line_#{which}") end |
#set_elements ⇒ Object
Elements for individual Marc data lines are set on Data_Line
Set OLE Library System Bib Editor screen elements.
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 |
# File 'lib/olels/pages/bib_editor.rb', line 21 def set_elements super element(:bib_record_status_selector) {b.select_list(:id => "StatusFieldSection_control")} element(:set_button) {b.(:id => "set_button")} element(:leader_field) {b.text_field(:id => "LeaderTextInputField_control")} # Control Field Buttons element(:control_003_link) {b.a(:id => "003FieldLink")} element(:control_005_link) {b.a(:id => "005FieldLink")} element(:control_006_link) {b.a(:id => "006FieldLink")} element(:control_007_link) {b.a(:id => "007FieldLink")} element(:control_008_link) {b.a(:id => "008FieldLink")} element(:control_009_link) {b.a(:id => "009FieldLink")} # Control Fields & Related Elements # (NB - Dependent on links & leader field state!) # TODO - Update when OLE-4431 is resolved. {https://jira.kuali.org/browse/OLE-4431} element(:control_001_field) {b.text_field(:id => "Control_Field_001_control")} element(:control_003_field) {b.text_field(:id => "Control_Field_003_control")} element(:control_005_field) {b.text_field(:id => "Control_Field_005_control")} element(:control_006_format_selector) {b.select_list(:id => "006Field_0_control")} element(:control_006_set_button) {b.(:id => "ControlField_Set_button")} element(:control_006_clear_button) {b.(:id => "ControlField_Reset_button")} element(:control_007_catmtrl_selector) {b.select_list(:id => "007Field_0_control")} element(:control_007_set_button) {b.(:id => "ControlField007_Set_button")} element(:control_007_clear_button) {b.(:id => "ControlField007_Clear_button ")} element(:control_008_field) {b.text_field(:id => 'Control_Field_008_control')} # Read-Only Fields (for when the Bib Editor is opened in 'View' mode) element(:readonly_edit_button) {b.(:text => /Edit/)} element(:readonly_created_by) {b.span(:id => 'createdBy_control')} element(:readonly_created_date) {b.span(:id => 'createdDate_control')} element(:readonly_leader_field) {b.span(:id => 'LeaderTextInputField_control')} element(:readonly_control_001_field) {b.span(:id => 'Control_Field_001ReadOnly_control')} element(:readonly_control_003_field) {b.span(:id => 'Control_Field_003ReadOnly_control')} element(:readonly_control_005_field) {b.span(:id => 'Control_Field_005ReadOnly_control')} element(:readonly_control_008_field) {b.span(:id => 'Control_Field_008ReadOnly_control')} end |
#set_functions ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/olels/pages/bib_editor.rb', line 57 def set_functions super # Functions for iterative fields on the read-only version of the Marc Bib Editor. # - Invoke with numerical value (1-based) of repeatable line. # e.g. bib_editor.readonly_data_field(1).text to get the text of the first Marc data line in the record. function(:readonly_control_006_field) {|which = 1| which -= 1 ; b.span(:id => "Control_Field_006ReadOnly_line#{which}_control")} function(:readonly_control_007_field) {|which = 1| which -= 1 ; b.span(:id => "Control_Field_007ReadOnly_line#{which}_control")} function(:readonly_tag_field) {|which = 1| which -= 1 ; b.span(:id => "dataField_tag_id_readOnly_line#{which}_control")} function(:readonly_ind1_field) {|which = 1| which -= 1 ; b.span(:id => "dataField_ind1_id_readOnly_line#{which}_control")} function(:readonly_ind2_field) {|which = 1| which -= 1 ; b.span(:id => "dataField_ind2_id_readOnly_line#{which}_control")} function(:readonly_data_field) {|which = 1| which -= 1 ; b.span(:id => "dataField_value_id_readOnly_line#{which}_control")} end |
#set_lines ⇒ Object
There will always be at least one Marc Data Line on a newly-opened record, whether newly-created or previously extant.
Add the first Marc Data Line to a new Bib Editor record.
73 74 75 76 77 |
# File 'lib/olels/pages/bib_editor.rb', line 73 def set_lines create_006_line(1) create_007_line(1) create_data_line(1) end |