LP#1277194 - Add staff_visible column to actor.org_unit
authorChris Sharp <csharp@georgialibraries.org>
Mon, 6 Aug 2018 15:08:11 +0000 (11:08 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 7 Nov 2018 15:29:31 +0000 (10:29 -0500)
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm
Open-ILS/src/sql/Pg/005.schema.actors.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.lp1277194.schema.add_staff_visible_column_aou.sql [new file with mode: 0644]
Open-ILS/web/conify/global/actor/org_unit.html
Open-ILS/web/opac/locale/en-US/conify.dtd

index e9b2323..6aba82e 100644 (file)
@@ -6698,6 +6698,7 @@ SELECT  usr,
                        <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
                        <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
                        <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
+            <field reporter:label="Staff Visible" name="staff_visible" reporter:datatype="bool"/>
                        <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
                        <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
index a4047f7..edcab93 100644 (file)
@@ -82,7 +82,7 @@ use base qw/actor/;
 __PACKAGE__->table( 'actor_org_unit' );
 __PACKAGE__->columns( Primary => qw/id/);
 __PACKAGE__->columns( Essential => qw/parent_ou ou_type mailing_address billing_address
-                ill_address holds_address shortname name email phone opac_visible fiscal_calendar/);
+                ill_address holds_address shortname name email phone opac_visible fiscal_calendar staff_visible/);
 
 #-------------------------------------------------------------------------------
 package actor::org_unit::hours_of_operation;
index 61d5bae..0029db4 100644 (file)
@@ -345,6 +345,7 @@ CREATE TABLE actor.org_unit (
        email           TEXT,
        phone           TEXT,
        opac_visible    BOOL    NOT NULL DEFAULT TRUE,
+    staff_visible   BOOL    NOT NULL DEFAULT TRUE,
        fiscal_calendar INT     NOT NULL DEFAULT 1   -- foreign key constraint to be added later
 );
 CREATE INDEX actor_org_unit_parent_ou_idx ON actor.org_unit (parent_ou);
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.lp1277194.schema.add_staff_visible_column_aou.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.lp1277194.schema.add_staff_visible_column_aou.sql
new file mode 100644 (file)
index 0000000..082a1b3
--- /dev/null
@@ -0,0 +1,7 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('XXXX', :eg_version);
+
+ALTER TABLE actor.org_unit ADD COLUMN staff_visible BOOLEAN NOT NULL DEFAULT TRUE;
+
+COMMIT;
index aca9335..d16008f 100644 (file)
                                                }
 
                                                editor_pane_opac_visible.setChecked( this.store.getValue( current_ou, 'opac_visible' ) == 't' ? true : false );
+                                               editor_pane_staff_visible.setChecked( this.store.getValue( current_ou, 'staff_visible' ) == 't' ? true : false );
 
                                                hoo_load();
                                                addr_load();
                                                                        />
                                                                </td>
                                                        </tr>
+                                                       <tr>
+                                                               <th>&conify.org_unit.editor_pane.staff_visible;</th>
+                                                               <td>
+                                                                       <input
+                                                                         id="editor_pane_staff_visible"
+                                                                         jsId="editor_pane_staff_visible"
+                                                                         type="checkbox"
+                                                                         dojoType="dijit.form.CheckBox"
+                                                                         onChange="if (current_ou) ou_list_store.setValue( current_ou, 'staff_visible', this.checked ? 't' : 'f' );"
+                                                                       />
+                                                               </td>
+                                                       </tr>
                                                </table>
        
                                                <div dojoType="dijit.layout.ContentPane" orientation="horizontal" style="margin-bottom: 20px;">
index c0cf5a7..0d1683e 100644 (file)
@@ -33,6 +33,7 @@
 <!ENTITY conify.org_unit.editor_pane.org_unit_type "Organization Unit Type">
 <!ENTITY conify.org_unit.editor_pane.parent "Parent Organization Unit">
 <!ENTITY conify.org_unit.editor_pane.opac_visible "OPAC Visible">
+<!ENTITY conify.org_unit.editor_pane.staff_visible "Staff Visible">
 <!-- Hours of operation --> 
 <!ENTITY conify.org_unit.hoo_pane.title "Hours of Operation">
 <!ENTITY conify.org_unit.hoo_pane.open_time "Open time">