From 8dae539ba791bd353dee3484d757b2a0d1e80d4b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 11 Sep 2012 07:35:56 -0400 Subject: [PATCH] Bug 8215 - Add Course Reserves - Followup Content-Type: text/plain; charset="utf-8" This follow adds the following: * New flags and permissions for each language * Fixes capitalization issues * Document new tables --- installer/data/mysql/de-DE/mandatory/userflags.sql | 1 + .../data/mysql/de-DE/mandatory/userpermissions.sql | 5 ++- installer/data/mysql/es-ES/mandatory/userflags.sql | 1 + .../data/mysql/es-ES/mandatory/userpermissions.sql | 5 ++- .../data/mysql/fr-FR/1-Obligatoire/userflags.sql | 1 + .../mysql/fr-FR/1-Obligatoire/userpermissions.sql | 6 ++- installer/data/mysql/it-IT/necessari/userflags.sql | 1 + .../data/mysql/it-IT/necessari/userpermissions.sql | 5 ++- installer/data/mysql/kohastructure.sql | 50 +++++++++++++------ .../data/mysql/nb-NO/1-Obligatorisk/userflags.sql | 1 + .../mysql/nb-NO/1-Obligatorisk/userpermissions.sql | 5 ++- installer/data/mysql/pl-PL/mandatory/userflags.sql | 1 + .../data/mysql/pl-PL/mandatory/userpermissions.sql | 5 ++- .../ru-RU/mandatory/permissions_and_user_flags.sql | 8 ++- .../uk-UA/mandatory/permissions_and_user_flags.sql | 8 ++- .../en/modules/course_reserves/add_items-step1.tt | 6 +- .../en/modules/course_reserves/add_items-step2.tt | 4 +- .../en/modules/course_reserves/course-details.tt | 4 +- .../en/modules/course_reserves/course-reserves.tt | 4 +- .../prog/en/modules/course_reserves/course.tt | 4 +- 20 files changed, 87 insertions(+), 38 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/userflags.sql b/installer/data/mysql/de-DE/mandatory/userflags.sql index aeccf76..ec2312f 100644 --- a/installer/data/mysql/de-DE/mandatory/userflags.sql +++ b/installer/data/mysql/de-DE/mandatory/userflags.sql @@ -15,3 +15,4 @@ INSERT INTO `userflags` VALUES(14,'editauthorities','Normdaten ändern',0); INSERT INTO `userflags` VALUES(15,'serials','Zugang auf Abonnementverwaltung/Zeitschriftenmodul',0); INSERT INTO `userflags` VALUES(16,'reports','Zugang auf Reportmodul',0); INSERT INTO `userflags` VALUES(17,'staffaccess','Berechtigungen für Bibliotheksmitarbeiter vergeben',0); +INSERT INTO `userflags` VALUES(18,'coursereserves','Course Reserves',0); diff --git a/installer/data/mysql/de-DE/mandatory/userpermissions.sql b/installer/data/mysql/de-DE/mandatory/userpermissions.sql index 7282cce..cd68774 100644 --- a/installer/data/mysql/de-DE/mandatory/userpermissions.sql +++ b/installer/data/mysql/de-DE/mandatory/userpermissions.sql @@ -51,5 +51,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES (15, 'renew_subscription', 'Abonnements verlängern'), (15, 'routing', 'Umlauflisten verwalten'), (16, 'execute_reports', 'SQL-Reports ausführen'), - (16, 'create_reports', 'SQL-Reports erstellen') + (16, 'create_reports', 'SQL-Reports erstellen'), + (18, 'manage_courses', 'Add, edit and delete courses'), + (18, 'add_reserves', 'Add course reserves'), + (18, 'delete_reserves', 'Remove course reserves') ; diff --git a/installer/data/mysql/es-ES/mandatory/userflags.sql b/installer/data/mysql/es-ES/mandatory/userflags.sql index e9d9b2e..cc683fd 100644 --- a/installer/data/mysql/es-ES/mandatory/userflags.sql +++ b/installer/data/mysql/es-ES/mandatory/userflags.sql @@ -15,3 +15,4 @@ INSERT INTO `userflags` VALUES(14,'editauthorities','Allow to edit authorities', INSERT INTO `userflags` VALUES(15,'serials','Allow to manage serials subscriptions',0); INSERT INTO `userflags` VALUES(16,'reports','Allow to access to the reports module',0); INSERT INTO `userflags` VALUES(17,'staffaccess','Modify login / permissions for staff users',0); +INSERT INTO `userflags` VALUES(18,'coursereserves','Course Reserves',0); diff --git a/installer/data/mysql/es-ES/mandatory/userpermissions.sql b/installer/data/mysql/es-ES/mandatory/userpermissions.sql index 070e8f5..a0cc833 100644 --- a/installer/data/mysql/es-ES/mandatory/userpermissions.sql +++ b/installer/data/mysql/es-ES/mandatory/userpermissions.sql @@ -51,5 +51,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES (15, 'renew_subscription', 'Renew a subscription'), (15, 'routing', 'Routing'), (16, 'execute_reports', 'Execute SQL reports'), - (16, 'create_reports', 'Create SQL Reports') + (16, 'create_reports', 'Create SQL Reports'), + (18, 'manage_courses', 'Add, edit and delete courses'), + (18, 'add_reserves', 'Add course reserves'), + (18, 'delete_reserves', 'Remove course reserves') ; diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userflags.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userflags.sql index 68fea6e..46fe0b0 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/userflags.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/userflags.sql @@ -16,3 +16,4 @@ INSERT INTO `userflags` VALUES(13,'tools','Outils (export, import, impression de INSERT INTO `userflags` VALUES(14,'editauthorities','Gestion des autorités',0); INSERT INTO `userflags` VALUES(15,'serials','Gestion du module périodique',0); INSERT INTO `userflags` VALUES(16,'reports','Accès aux statistiques',0); +INSERT INTO `userflags` VALUES(18,'coursereserves','Course Reserves',0); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql index 4b8c66e..88bb818 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql @@ -51,6 +51,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES (15, 'renew_subscription', 'Renouveler les abonnements'), (15, 'routing', 'Mettre en circulation'), (16, 'execute_reports', 'Lancer les rapports SQL'), - (16, 'create_reports', 'Créer les rapports SQL Reports') - + (16, 'create_reports', 'Créer les rapports SQL Reports'), + (18, 'manage_courses', 'Add, edit and delete courses'), + (18, 'add_reserves', 'Add course reserves'), + (18, 'delete_reserves', 'Remove course reserves') ; diff --git a/installer/data/mysql/it-IT/necessari/userflags.sql b/installer/data/mysql/it-IT/necessari/userflags.sql index eaabb50..4cfc4ba 100644 --- a/installer/data/mysql/it-IT/necessari/userflags.sql +++ b/installer/data/mysql/it-IT/necessari/userflags.sql @@ -17,5 +17,6 @@ INSERT INTO `userflags` VALUES(14,'editauthorities','autorizza la modifica delle INSERT INTO `userflags` VALUES(15,'serials','autorizza la gestione degli abbonamenti ai periodici',0); INSERT INTO `userflags` VALUES(16,'reports','autorizza accesso al modulo dei reports',0); INSERT INTO `userflags` VALUES(17,'staffaccess','modifica la login o i permessi degli staff users',0); +INSERT INTO `userflags` VALUES(18,'coursereserves','Course Reserves',0); SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file diff --git a/installer/data/mysql/it-IT/necessari/userpermissions.sql b/installer/data/mysql/it-IT/necessari/userpermissions.sql index d0b5348..57f5250 100644 --- a/installer/data/mysql/it-IT/necessari/userpermissions.sql +++ b/installer/data/mysql/it-IT/necessari/userpermissions.sql @@ -53,6 +53,9 @@ INSERT INTO permissions (module_bit, code, description) VALUES (15, 'renew_subscription', 'Rinnova un abbonamento'), (15, 'routing', 'Crea/Manipola liste di distribuzione dei fascicoli ( routing list)'), (16, 'execute_reports', 'Esegui reports SQL'), - (16, 'create_reports', 'Crea reports SQL') + (16, 'create_reports', 'Crea reports SQL'), + (18, 'manage_courses', 'Add, edit and delete courses'), + (18, 'add_reserves', 'Add course reserves'), + (18, 'delete_reserves', 'Remove course reserves') ; SET FOREIGN_KEY_CHECKS=1; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 5be5049..2254932 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -468,18 +468,22 @@ CREATE TABLE collections_tracking ( -- -- Table structure for table `courses` -- + +-- The courses table stores the courses created for the +-- course reserves feature. + DROP TABLE IF EXISTS courses; CREATE TABLE `courses` ( `course_id` int(11) NOT NULL AUTO_INCREMENT, - `department` varchar(20) DEFAULT NULL, - `course_number` varchar(255) DEFAULT NULL, - `section` varchar(255) DEFAULT NULL, + `department` varchar(20) DEFAULT NULL, -- Stores the authorised value DEPT + `course_number` varchar(255) DEFAULT NULL, -- An arbitrary field meant to store the "course number" assigned to a course + `section` varchar(255) DEFAULT NULL, -- Also arbitrary, but for the 'section' of a course. `course_name` varchar(255) DEFAULT NULL, - `term` varchar(20) DEFAULT NULL, + `term` varchar(20) DEFAULT NULL, -- Stores the authorised value TERM `staff_note` mediumtext, `public_note` mediumtext, - `students_count` varchar(20) DEFAULT NULL, - `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + `students_count` varchar(20) DEFAULT NULL, -- Meant to be just an estimate of how many students will be taking this course/section + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', -- Determines whether the course is active `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`course_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -487,6 +491,11 @@ CREATE TABLE `courses` ( -- -- Table structure for table `course_instructors` -- + +-- The course instructors table links Koha borrowers to the +-- courses they are teaching. Many instructors can teach many +-- courses. course_instructors is just a many-to-many join table. + DROP TABLE IF EXISTS course_instructors; CREATE TABLE `course_instructors` ( `course_id` int(11) NOT NULL, @@ -498,15 +507,20 @@ CREATE TABLE `course_instructors` ( -- -- Table structure for table `course_items` -- + +-- If an item is placed on course reserve for one or more courses +-- it will have an entry in this table. No matter how many courses an item +-- is part of, it will only have one row in this table. + DROP TABLE IF EXISTS course_items; CREATE TABLE `course_items` ( `ci_id` int(11) NOT NULL AUTO_INCREMENT, - `itemnumber` int(11) NOT NULL, - `itype` varchar(10) DEFAULT NULL, - `ccode` varchar(10) DEFAULT NULL, - `holdingbranch` varchar(10) DEFAULT NULL, - `location` varchar(80) DEFAULT NULL, - `enabled` enum('yes','no') NOT NULL DEFAULT 'no', + `itemnumber` int(11) NOT NULL, -- items.itemnumber for the item on reserve + `itype` varchar(10) DEFAULT NULL, -- an optional new itemtype for the item to have while on reserve + `ccode` varchar(10) DEFAULT NULL, -- an optional new category code for the item to have while on reserve + `holdingbranch` varchar(10) DEFAULT NULL, -- an optional new holding branch for the item to have while on reserve + `location` varchar(80) DEFAULT NULL, -- an optional new shelving location for the item to have while on reseve + `enabled` enum('yes','no') NOT NULL DEFAULT 'no', -- If at least one enabled course has this item on reseve, this field will be 'yes', otherwise it will be 'no' `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`ci_id`), UNIQUE KEY `itemnumber` (`itemnumber`) @@ -515,13 +529,17 @@ CREATE TABLE `course_items` ( -- -- Table structure for table `course_reserves` -- + +-- This table connects an item placed on course reserve to a course it is on reserve for. +-- There will be a row in this table for each course an item is on reserve for. + DROP TABLE IF EXISTS course_reserves; CREATE TABLE `course_reserves` ( `cr_id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` int(11) NOT NULL, - `ci_id` int(11) NOT NULL, - `staff_note` mediumtext, - `public_note` mediumtext, + `course_id` int(11) NOT NULL, -- Foreign key to the courses table + `ci_id` int(11) NOT NULL, -- Foreign key to the course_items table + `staff_note` mediumtext, -- Staff only note + `public_note` mediumtext, -- Public, OPAC visible note `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`cr_id`), UNIQUE KEY `psuedo_key` (`course_id`,`ci_id`), diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/userflags.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/userflags.sql index 2e73c7f4..afd4652 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/userflags.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/userflags.sql @@ -36,3 +36,4 @@ INSERT INTO `userflags` VALUES(14,'editauthorities','Tilgang til å endre autori INSERT INTO `userflags` VALUES(15,'serials','Tilgang til å endre abonnementer',0); INSERT INTO `userflags` VALUES(16,'reports','Tilgang til rapportmodulen',0); INSERT INTO `userflags` VALUES(17,'staffaccess','Endre innlogging og rettigheter for bibliotekansatte',0); +INSERT INTO `userflags` VALUES(18,'coursereserves','Course Reserves',0); diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql index a00535f..6ef0668 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql @@ -72,5 +72,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES (15, 'renew_subscription', 'Fornye abonnementer'), (15, 'routing', 'Sirkulasjon'), (16, 'execute_reports', 'Kjøre SQL-rapporter'), - (16, 'create_reports', 'Opprette SQL-rapporter') + (16, 'create_reports', 'Opprette SQL-rapporter'), + (18, 'manage_courses', 'Add, edit and delete courses'), + (18, 'add_reserves', 'Add course reserves'), + (18, 'delete_reserves', 'Remove course reserves') ; diff --git a/installer/data/mysql/pl-PL/mandatory/userflags.sql b/installer/data/mysql/pl-PL/mandatory/userflags.sql index e9d9b2e..cc683fd 100644 --- a/installer/data/mysql/pl-PL/mandatory/userflags.sql +++ b/installer/data/mysql/pl-PL/mandatory/userflags.sql @@ -15,3 +15,4 @@ INSERT INTO `userflags` VALUES(14,'editauthorities','Allow to edit authorities', INSERT INTO `userflags` VALUES(15,'serials','Allow to manage serials subscriptions',0); INSERT INTO `userflags` VALUES(16,'reports','Allow to access to the reports module',0); INSERT INTO `userflags` VALUES(17,'staffaccess','Modify login / permissions for staff users',0); +INSERT INTO `userflags` VALUES(18,'coursereserves','Course Reserves',0); diff --git a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql index 1165af1..d2f6d4b 100644 --- a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql +++ b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql @@ -52,5 +52,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES (15, 'renew_subscription', 'Renew a subscription'), (15, 'routing', 'Routing'), (16, 'execute_reports', 'Execute SQL reports'), - (16, 'create_reports', 'Create SQL Reports') + (16, 'create_reports', 'Create SQL Reports'), + (18, 'manage_courses', 'Add, edit and delete courses'), + (18, 'add_reserves', 'Add course reserves'), + (18, 'delete_reserves', 'Remove course reserves') ; diff --git a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql b/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql index 00d6538..663c1fd 100644 --- a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql +++ b/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql @@ -17,7 +17,8 @@ INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (14,'editauthorities', 'Разрешение на изменение авторитетных источников',0), (15,'serials', 'Разрешение на управление подпиской периодических изданий',0), (16,'reports', 'Разрешение на доступ к модулю отчетов',0), - (17,'staffaccess', 'Смена имени(логина)/привилегий для работников библиотеки',0) + (17,'staffaccess', 'Смена имени(логина)/привилегий для работников библиотеки',0), + (18,'coursereserves', 'Course Reserves',0); ; TRUNCATE permissions; @@ -75,6 +76,9 @@ INSERT INTO permissions (module_bit, code, description) VALUES (15, 'renew_subscription', 'Renew a subscription'), (15, 'routing', 'Routing'), (16, 'execute_reports', 'Execute SQL reports'), - (16, 'create_reports', 'Create SQL Reports') + (16, 'create_reports', 'Create SQL Reports'), + (18, 'manage_courses', 'Add, edit and delete courses'), + (18, 'add_reserves', 'Add course reserves'), + (18, 'delete_reserves', 'Remove course reserves') ; diff --git a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql b/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql index 188a146..21aa10b 100644 --- a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql +++ b/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql @@ -17,7 +17,8 @@ INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (14,'editauthorities', 'Дозвіл на редагування авторитетних джерел',0), (15,'serials', 'Дозвіл на керування підпискою періодичних видань',0), (16,'reports', 'Дозвіл на доступ до модуля звітів',0), - (17,'staffaccess', 'Зміна імені(логіну)/привілеїв для працівників бібліотеки',0) + (17,'staffaccess', 'Зміна імені(логіну)/привілеїв для працівників бібліотеки',0), + (18,'coursereserves', 'Course Reserves',0); ; TRUNCATE permissions; @@ -75,6 +76,9 @@ INSERT INTO permissions (module_bit, code, description) VALUES (15, 'renew_subscription', 'Renew a subscription'), (15, 'routing', 'Routing'), (16, 'execute_reports', 'Execute SQL reports'), - (16, 'create_reports', 'Create SQL Reports') + (16, 'create_reports', 'Create SQL Reports'), + (18, 'manage_courses', 'Add, edit and delete courses'), + (18, 'add_reserves', 'Add course reserves'), + (18, 'delete_reserves', 'Remove course reserves') ; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt index 092bef8..a3afafa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Course Reserves › Add Items +Koha › Course reserves › Add items [% INCLUDE 'doc-head-close.inc' %] @@ -18,7 +18,7 @@ $(document).ready(function() { [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
@@ -35,7 +35,7 @@ $(document).ready(function() {
- Add Items: Scan Barcode + Add items: Scan barcode

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt index 0ff5dca..e939e0a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Course Reserves › Add Items +Koha › Course reserves › Add items [% INCLUDE 'doc-head-close.inc' %] @@ -9,7 +9,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] -

+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt index 1bf678b..bb3feae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Course Reserves › [% IF course_name %] Edit [% course_name %] [% ELSE %] New Course [% END %] +Koha › Course reserves › [% IF course_name %] Edit [% course_name %] [% ELSE %] New course [% END %] [% INCLUDE 'doc-head-close.inc' %]