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

(-)a/installer/data/mysql/atomicupdate/bug_30955-move-notices-to-lists.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "30955",
5
    description => "Move existing list-based notices to new lists category",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do( q{ UPDATE IGNORE letter SET module = 'lists' WHERE code = 'SHARE_ACCEPT'; } );
11
        say $out "Moved SHARE_ACCEPT notice to lists module";
12
13
        $dbh->do( q{ UPDATE IGNORE letter SET module = 'lists' WHERE code = 'SHARE_INVITE'; } );
14
        say $out "Moved SHARE_INVITE notice to lists module";
15
    },
16
};
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-40 / +40 lines)
Lines 1305-1310 tables: Link Here
1305
            - "[% branch.branchillemail %]"
1305
            - "[% branch.branchillemail %]"
1306
            - "[% branch.branchemail %]"
1306
            - "[% branch.branchemail %]"
1307
1307
1308
        - module: lists
1309
          code: SHARE_ACCEPT
1310
          branchcode: ""
1311
          name: "Notification about an accepted share"
1312
          is_html: 0
1313
          title: "Share on list <<listname>> accepted"
1314
          message_transport_type: email
1315
          lang: default
1316
          content:
1317
            - "Dear patron,"
1318
            - ""
1319
            - "We want to inform you that <<borrowers.firstname>> <<borrowers.surname>> accepted your invitation to share your list <<listname>> in our library catalog."
1320
            - ""
1321
            - "Thank you."
1322
            - ""
1323
            - "Your library."
1324
1325
        - module: lists
1326
          code: SHARE_INVITE
1327
          branchcode: ""
1328
          name: "Invitation for sharing a list"
1329
          is_html: 0
1330
          title: "Share list <<listname>>"
1331
          message_transport_type: email
1332
          lang: default
1333
          content:
1334
            - "Dear patron,"
1335
            - ""
1336
            - "One of our patrons, <<borrowers.firstname>> <<borrowers.surname>>, invites you to share a list <<listname>> in our library catalog."
1337
            - ""
1338
            - "To access this shared list, please click on the following URL or copy-and-paste it into your browser address bar."
1339
            - ""
1340
            - "<<shareurl>>"
1341
            - ""
1342
            - "In case you are not a patron in our library or do not want to accept this invitation, please ignore this mail. Note also that this invitation expires within two weeks."
1343
            - ""
1344
            - "Thank you."
1345
            - ""
1346
            - "Your library."
1347
1308
        - module: lists
1348
        - module: lists
1309
          code: TRANSFER_OWNERSHIP
1349
          code: TRANSFER_OWNERSHIP
1310
          branchcode: ""
1350
          branchcode: ""
Lines 1446-1491 tables: Link Here
1446
            - "<p>This link will be valid for 5 days from this email's reception, then you must reapply if you do not change your password.</p>"
1486
            - "<p>This link will be valid for 5 days from this email's reception, then you must reapply if you do not change your password.</p>"
1447
            - "<p>Thank you.</p>"
1487
            - "<p>Thank you.</p>"
1448
1488
1449
        - module: members
1450
          code: SHARE_ACCEPT
1451
          branchcode: ""
1452
          name: "Notification about an accepted share"
1453
          is_html: 0
1454
          title: "Share on list <<listname>> accepted"
1455
          message_transport_type: email
1456
          lang: default
1457
          content:
1458
            - "Dear patron,"
1459
            - ""
1460
            - "We want to inform you that <<borrowers.firstname>> <<borrowers.surname>> accepted your invitation to share your list <<listname>> in our library catalog."
1461
            - ""
1462
            - "Thank you."
1463
            - ""
1464
            - "Your library."
1465
1466
        - module: members
1467
          code: SHARE_INVITE
1468
          branchcode: ""
1469
          name: "Invitation for sharing a list"
1470
          is_html: 0
1471
          title: "Share list <<listname>>"
1472
          message_transport_type: email
1473
          lang: default
1474
          content:
1475
            - "Dear patron,"
1476
            - ""
1477
            - "One of our patrons, <<borrowers.firstname>> <<borrowers.surname>>, invites you to share a list <<listname>> in our library catalog."
1478
            - ""
1479
            - "To access this shared list, please click on the following URL or copy-and-paste it into your browser address bar."
1480
            - ""
1481
            - "<<shareurl>>"
1482
            - ""
1483
            - "In case you are not a patron in our library or do not want to accept this invitation, please ignore this mail. Note also that this invitation expires within two weeks."
1484
            - ""
1485
            - "Thank you."
1486
            - ""
1487
            - "Your library."
1488
1489
        - module: members
1489
        - module: members
1490
          code: WELCOME
1490
          code: WELCOME
1491
          branchcode: ""
1491
          branchcode: ""
(-)a/opac/opac-shareshelf.pl (-3 / +2 lines)
Lines 191-197 sub notify_owner { Link Here
191
191
192
    #prepare letter
192
    #prepare letter
193
    my $letter = C4::Letters::GetPreparedLetter(
193
    my $letter = C4::Letters::GetPreparedLetter(
194
        module      => 'members',
194
        module      => 'lists',
195
        letter_code => 'SHARE_ACCEPT',
195
        letter_code => 'SHARE_ACCEPT',
196
        branchcode  => C4::Context->userenv->{"branch"},
196
        branchcode  => C4::Context->userenv->{"branch"},
197
        lang        => $patron->lang,
197
        lang        => $patron->lang,
Lines 257-263 sub send_invitekey { Link Here
257
257
258
        #prepare letter
258
        #prepare letter
259
        my $letter = C4::Letters::GetPreparedLetter(
259
        my $letter = C4::Letters::GetPreparedLetter(
260
            module      => 'members',
260
            module      => 'lists',
261
            letter_code => 'SHARE_INVITE',
261
            letter_code => 'SHARE_INVITE',
262
            branchcode  => C4::Context->userenv->{"branch"},
262
            branchcode  => C4::Context->userenv->{"branch"},
263
            lang        => 'default', # Not sure how we could use something more useful else here
263
            lang        => 'default', # Not sure how we could use something more useful else here
264
- 

Return to bug 30955