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 1558-1563 CREATE TABLE `branches` ( Link Here
1558
  `marcorgcode` varchar(16) DEFAULT NULL COMMENT 'MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode',
1558
  `marcorgcode` varchar(16) DEFAULT NULL COMMENT 'MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode',
1559
  `pickup_location` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'the ability to act as a pickup location',
1559
  `pickup_location` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'the ability to act as a pickup location',
1560
  `public` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'whether this library should show in the opac',
1560
  `public` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'whether this library should show in the opac',
1561
  `userjs` longtext DEFAULT NULL COMMENT 'branch specific javascript for the OPAC',
1562
  `usercss` longtext DEFAULT NULL COMMENT 'branch specific css for the OPAC',
1561
  PRIMARY KEY (`branchcode`)
1563
  PRIMARY KEY (`branchcode`)
1562
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1564
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1563
/*!40101 SET character_set_client = @saved_cs_client */;
1565
/*!40101 SET character_set_client = @saved_cs_client */;
1564
- 

Return to bug 32721