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

(-)a/installer/data/mysql/atomicupdate/bug_5770.perl (+41 lines)
Line 0 Link Here
1
$DBversion = '18.12.00.XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( q{
4
            INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES
5
            ('EmailPurchaseSuggestions','KohaAdminEmailAddress','EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that will be sent new purchase suggestions','Choice'),
6
            ('EmailAddressForSuggestions','','','If you choose EmailAddressForSuggestions you should enter a valid email address','free')
7
    });
8
9
    $dbh->do( q{
10
            INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES
11
            ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Suggestion pending approval</h3>
12
                <p><h4>Suggested by</h4>
13
                    <ul>
14
                        <li><<borrowers.firstname>> <<borrowers.surname>></li>
15
                        <li><<borrowers.cardnumber>></li>
16
                        <li><<borrowers.phone>></li>
17
                        <li><<borrowers.email>></li>
18
                    </ul>
19
                </p>
20
                <p><h4>Title suggested</h4>
21
                    <ul>
22
                        <li><b>Library:</b> <<branches.branchname>></li>
23
                        <li><b>Title:</b> <<suggestions.title>></li>
24
                        <li><b>Author:</b> <<suggestions.author>></li>
25
                        <li><b>Copyright date:</b> <<suggestions.copyrightdate>></li>
26
                        <li><b>Standard number (ISBN, ISSN or other):</b> <<suggestions.isbn>></li>
27
                        <li><b>Publisher:</b> <<suggestions.publishercode>></li>
28
                        <li><b>Collection title:</b> <<suggestions.collectiontitle>></li>
29
                        <li><b>Publication place:</b> <<suggestions.place>></li>
30
                        <li><b>Quantity:</b> <<suggestions.quantity>></li>
31
                        <li><b>Item type:</b> <<suggestions.itemtype>></li>
32
                        <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
33
                        <li><b>Notes:</b> <<suggestions.note>></li>
34
                    </ul>
35
                </p>',1, 'email')
36
    });
37
38
    # Always end with this (adjust the bug info)
39
    SetVersion( $DBversion );
40
    print "Upgrade to $DBversion done (Bug 5770 - Email librarian when purchase suggestion made)\n";
41
}
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 158-164 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
158
('EasyAnalyticalRecords','0','','If on, display in the catalogue screens tools to easily setup analytical record relationships','YesNo'),
158
('EasyAnalyticalRecords','0','','If on, display in the catalogue screens tools to easily setup analytical record relationships','YesNo'),
159
('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL),
159
('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL),
160
('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
160
('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
161
('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'),
161
('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'),
162
('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'),
163
('EmailPurchaseSuggestions','KohaAdminEmailAddress','EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that new purchase suggestions will be sent to: ','Choice'),
162
('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'),
164
('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'),
163
('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'),
165
('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'),
164
('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''),
166
('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (-1 / +11 lines)
Lines 7-12 Administration: Link Here
7
              class: email
7
              class: email
8
            - "(This is the default From: address for emails unless there is one for the particular library, and is referred to when an internal error occurs.)"
8
            - "(This is the default From: address for emails unless there is one for the particular library, and is referred to when an internal error occurs.)"
9
        -
9
        -
10
            - "Choose email address that new purchase suggestions will be sent to: "
11
            - pref: EmailPurchaseSuggestions
12
              default: KohaAdminEmailAddress
13
              choices:
14
                  EmailAddressForSuggestions: EmailAddressForSuggestions
15
                  BranchEmailAddress: email address of branch
16
                  KohaAdminEmailAddress: KohaAdminEmailAddress
17
            - "If you choose EmailAddressForSuggestions you have to enter a valid email address: "
18
            - pref: EmailAddressForSuggestions
19
              class: email
20
        -
10
            - "Email address to be set as the replyto in emails: "
21
            - "Email address to be set as the replyto in emails: "
11
            - pref: ReplytoDefault
22
            - pref: ReplytoDefault
12
              class: email
23
              class: email
13
- 

Return to bug 5770