View | Details | Raw Unified | Return to bug 32721
Collapse All | Expand All

(-)a/api/v1/swagger/definitions/library.yaml (+10 lines)
Lines 107-112 properties: Link Here
107
  public:
107
  public:
108
    type: boolean
108
    type: boolean
109
    description: If the library is visible to the public
109
    description: If the library is visible to the public
110
  userjs:
111
    type:
112
      - string
113
      - "null"
114
    description: Any branch-specific UserJS for the OPAC
115
  usercss:
116
    type:
117
      - string
118
      - "null"
119
    description: Any branch-specific UserCSS for the OPAC
110
  smtp_server:
120
  smtp_server:
111
    type:
121
    type:
112
      - object
122
      - object
(-)a/installer/data/mysql/atomicupdate/bug_32721-add_branch_level_js.pl (+25 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "32721",
5
    description => "Allow branch specific javascript and css to be injected into the OPAC depending on a branchcode",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        if( !column_exists( 'branches', 'userjs' ) ) {
11
          $dbh->do(q{
12
              ALTER TABLE branches ADD COLUMN `userjs` longtext DEFAULT NULL AFTER `public`
13
          });
14
15
          say $out "Added column 'branches.userjs'";
16
        }
17
        if( !column_exists( 'branches', 'usercss' ) ) {
18
          $dbh->do(q{
19
              ALTER TABLE branches ADD COLUMN `usercss` longtext DEFAULT NULL AFTER `userjs`
20
          });
21
22
          say $out "Added column 'branches.usercss'";
23
        }
24
    },
25
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 1538-1543 CREATE TABLE `branches` ( Link Here
1538
  `marcorgcode` varchar(16) DEFAULT NULL COMMENT 'MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode',
1538
  `marcorgcode` varchar(16) DEFAULT NULL COMMENT 'MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode',
1539
  `pickup_location` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'the ability to act as a pickup location',
1539
  `pickup_location` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'the ability to act as a pickup location',
1540
  `public` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'whether this library should show in the opac',
1540
  `public` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'whether this library should show in the opac',
1541
  `userjs` longtext DEFAULT NULL COMMENT 'branch specific javascript for the OPAC',
1542
  `usercss` longtext DEFAULT NULL COMMENT 'branch specific css for the OPAC',
1541
  PRIMARY KEY (`branchcode`)
1543
  PRIMARY KEY (`branchcode`)
1542
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1544
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1543
/*!40101 SET character_set_client = @saved_cs_client */;
1545
/*!40101 SET character_set_client = @saved_cs_client */;
1544
- 

Return to bug 32721