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

(-)a/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql (-3 / +4 lines)
Lines 1-3 Link Here
1
INSERT IGNORE INTO systempreferences (variable,value,explanation,type) VALUES ('OPACDigitalSigns',0,'Turn digital signs in the OPAC on or off.','YesNo');
1
INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES
2
INSERT IGNORE INTO systempreferences (variable,explanation,type) VALUES ('OPACDigitalSignsCSS','Extra CSS to be included in all signs','Textarea');
2
('OPACDigitalSigns',0,NULL,'Turn digital signs in the OPAC on or off.','YesNo'),
3
INSERT IGNORE INTO systempreferences (variable,value,explanation,type) VALUES ('OPACDigitalSignsSwatches','abcde','List the swatches that can be chosen when creating a new sign','free');
3
('OPACDigitalSignsCSS','',NULL,'Extra CSS to be included in all signs','Textarea'),
4
('OPACDigitalSignsSwatches','abcde',NULL,'List the swatches that can be chosen when creating a new sign','free');
(-)a/installer/data/mysql/kohastructure.sql (+45 lines)
Lines 4337-4342 CREATE TABLE IF NOT EXISTS stockrotationitems ( Link Here
4337
      ON UPDATE CASCADE ON DELETE CASCADE
4337
      ON UPDATE CASCADE ON DELETE CASCADE
4338
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4338
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4339
4339
4340
--
4341
-- Table structure for table 'sign_streams'
4342
--
4343
4344
DROP TABLE IF EXISTS sign_streams;
4345
CREATE TABLE sign_streams (
4346
  `sign_stream_id` int(11) NOT NULL auto_increment, -- primary key, used to identify streams
4347
  `saved_sql_id` int(11) NOT NULL, -- foreign key from the saved_sql table
4348
  `name` varchar(64), -- name/title of the sign
4349
  PRIMARY KEY (`sign_stream_id`),
4350
  CONSTRAINT `sign_streams_ibfk_1` FOREIGN KEY (`saved_sql_id`) REFERENCES `saved_sql` (`id`) ON DELETE CASCADE
4351
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4352
4353
--
4354
-- Table structure for table 'signs'
4355
--
4356
4357
DROP TABLE IF EXISTS signs;
4358
CREATE TABLE signs (
4359
  `sign_id` int(11) NOT NULL auto_increment, -- primary key, used to identify signs
4360
  `name` varchar(64), -- name/title of the deck
4361
  `webapp` int(1) NOT NULL DEFAULT 0, -- display as web app or normal page
4362
  `transition` char(16) NOT NULL DEFAULT 'none', -- transition to use between pages, must be one of the transitions defined by jQuery Mobile (see their docs)
4363
  `swatch` char(1) NOT NULL DEFAULT '', -- swatches determine the colors of page elements
4364
  `idleafter` int(11) NOT NULL default 0, -- seconds to wait before automatic page turning clicks in
4365
  `pagedelay` int(11) NOT NULL default 0, -- seconds to wait before turning to a new page/record
4366
  `reloadafter` int(11) NOT NULL default 0, -- seconds to wait before reloading all the pages
4367
  PRIMARY KEY (`sign_id`)
4368
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4369
4370
--
4371
-- Table structure for table 'signs_to_streams'
4372
--
4373
4374
DROP TABLE IF EXISTS signs_to_streams;
4375
CREATE TABLE signs_to_streams (
4376
  `sign_to_stream_id` int(11) NOT NULL auto_increment, -- primary key, used to identify connections between signs and streams (the same stream can be attached to a sign more than once, with different parameters)
4377
  `sign_stream_id` int(11) NOT NULL, -- foreign key from the decks sign_streams table
4378
  `sign_id` int(11) NOT NULL, -- foreign key from the signs table
4379
  `params` varchar(255) NOT NULL DEFAULT '', -- list of parameters for the SQL associated with the sign_stream
4380
  PRIMARY KEY (`sign_to_stream_id`),
4381
  CONSTRAINT `signs_to_streams_ibfk_1` FOREIGN KEY (`sign_stream_id`) REFERENCES `sign_streams` (`sign_stream_id`) ON DELETE CASCADE,
4382
  CONSTRAINT `signs_to_streams_ibfk_2` FOREIGN KEY (`sign_id`) REFERENCES `signs` (`sign_id`) ON DELETE CASCADE
4383
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4384
4340
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4385
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4341
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4386
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4342
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4387
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
(-)a/installer/data/mysql/sysprefs.sql (+5 lines)
Lines 86-91 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
86
('BatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch','Free'),
86
('BatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch','Free'),
87
('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'),
87
('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'),
88
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
88
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
89
('BibtexExportAdditionalFields', '', NULL, 'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'),
89
('BlockExpiredPatronOpacActions','1',NULL,'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis','YesNo'),
90
('BlockExpiredPatronOpacActions','1',NULL,'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis','YesNo'),
90
('BlockReturnOfLostItems','0','0','If enabled, items that are marked as lost cannot be returned.','YesNo'),
91
('BlockReturnOfLostItems','0','0','If enabled, items that are marked as lost cannot be returned.','YesNo'),
91
('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'),
92
('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'),
Lines 344-349 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
344
('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
345
('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
345
('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'),
346
('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'),
346
('OPACdidyoumean','',NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
347
('OPACdidyoumean','',NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
348
('OPACDigitalSigns',0,NULL, 'Turn digital signs in the OPAC on or off.','YesNo'),
349
('OPACDigitalSignsCSS','',NULL,'Extra CSS to be included in all signs','Textarea'),
350
('OPACDigitalSignsSwatches','abcde',NULL,'List the swatches that can be chosen when creating a new sign','free'),
347
('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'),
351
('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'),
348
('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd','','Define export options available on OPAC detail page.','multiple'),
352
('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd','','Define export options available on OPAC detail page.','multiple'),
349
('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'),
353
('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'),
Lines 493-498 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
493
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
497
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
494
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
498
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
495
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
499
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
500
('RisExportAdditionalFields', '', NULL, 'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'),
496
('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
501
('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
497
('RotationPreventTransfers','0',NULL,'If ON, prevent any transfers for items on stock rotation rotas, except for stock rotation transfers','YesNo'),
502
('RotationPreventTransfers','0',NULL,'If ON, prevent any transfers for items on stock rotation rotas, except for stock rotation transfers','YesNo'),
498
('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
503
('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (-1 / +1 lines)
Lines 139-148 Link Here
139
    [%- CASE 'edit_templates' -%]<span>Create and edit club templates</span>
139
    [%- CASE 'edit_templates' -%]<span>Create and edit club templates</span>
140
    [%- CASE 'enroll' -%]<span>Enroll patrons in clubs</span>
140
    [%- CASE 'enroll' -%]<span>Enroll patrons in clubs</span>
141
    [%- CASE 'edi_manage' -%]<span>Manage EDIFACT transmissions</span>
141
    [%- CASE 'edi_manage' -%]<span>Manage EDIFACT transmissions</span>
142
  [%# self_check %]
143
    [%- CASE 'self_checkin_module' -%]<span>Log into the self check-in module. Note: this permission prevents the patron from using any other OPAC functionality</span>
142
    [%- CASE 'self_checkin_module' -%]<span>Log into the self check-in module. Note: this permission prevents the patron from using any other OPAC functionality</span>
144
    [%- CASE 'self_checkout_module' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span>
143
    [%- CASE 'self_checkout_module' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span>
145
    [%- CASE 'manage_rota_items' -%]<span>Add and remove items from rotas</span>
144
    [%- CASE 'manage_rota_items' -%]<span>Add and remove items from rotas</span>
146
    [%- CASE 'manage_rotas' -%]<span>Create, edit and delete rotas</span>
145
    [%- CASE 'manage_rotas' -%]<span>Create, edit and delete rotas</span>
146
    [%- CASE 'edit_digital_signs' -%]<span>Create and edit digital signs for the OPAC</span>
147
  [%- END -%]
147
  [%- END -%]
148
[%- END -%]
148
[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt (-20 / +31 lines)
Lines 7-14 Link Here
7
<script type="text/javascript">
7
<script type="text/javascript">
8
//<![CDATA[
8
//<![CDATA[
9
9
10
	// prepare DOM for YUI Toolbar
10
    $(document).ready(function() {
11
	 $(document).ready(function() {
12
        $("#table_signs").dataTable($.extend(true, {}, dataTablesDefaults, {
11
        $("#table_signs").dataTable($.extend(true, {}, dataTablesDefaults, {
13
            "aoColumns": [
12
            "aoColumns": [
14
                null,
13
                null,
Lines 26-36 Link Here
26
            "sPaginationType": "four_button"
25
            "sPaginationType": "four_button"
27
        } ));
26
        } ));
28
        $("#table_streams").dataTable($.extend(true, {}, dataTablesDefaults, {
27
        $("#table_streams").dataTable($.extend(true, {}, dataTablesDefaults, {
29
            "aoColumns": [
28
            "aoColumnDefs": [
30
                null,
29
                { "aTargets": [ -1 ], "bSearchable": false, "bSortable": false },
31
                {"bSearchable": false},
32
                {"bSearchable": false, "bSortable": false},
33
                {"bSearchable": false, "bSortable": false},
34
            ],
30
            ],
35
            "sPaginationType": "four_button"
31
            "sPaginationType": "four_button"
36
        } ));
32
        } ));
Lines 98-105 Link Here
98
[% IF ( else ) %]
94
[% IF ( else ) %]
99
  <div id="toolbar">
95
  <div id="toolbar">
100
    <ul class="toolbar">
96
    <ul class="toolbar">
101
      <li><a id="newsign" href="?op=add_sign" class="btn btn-small"><i class="icon-plus"></i>New sign</a></li>
97
      <li><a id="newsign" href="/cgi-bin/koha/tools/signs.pl?op=add_sign" class="btn btn-default btn-sm"><i class="fa fa-plus"></i> New sign</a></li>
102
      <li><a id="newstream" href="?op=add_stream" class="btn btn-small"><i class="icon-plus"></i>New stream</a></li>
98
      <li><a id="newstream" href="/cgi-bin/koha/tools/signs.pl?op=add_stream" class="btn btn-default btn-sm"><i class="fa fa-plus"></i> New stream</a></li>
103
    </ul>
99
    </ul>
104
  </div>
100
  </div>
105
[% END %]
101
[% END %]
Lines 231-240 Link Here
231
    <tbody>
227
    <tbody>
232
    [% FOREACH s IN attached %]
228
    [% FOREACH s IN attached %]
233
      <tr>
229
      <tr>
234
      <td>[% s.name %]</td>
230
        <td>[% s.sign_stream.name %]</td>
235
      <td>[% s.params %]</td>
231
        <td>[% IF ( s.params ) %][% s.params %][% ELSE %]None[% END %]</td>
236
      <td>[% IF s.savedsql.match('<<') %]<a href="?op=get_params&sign_to_stream_id=[% s.sign_to_stream_id %]&sign_stream_id=[% s.sign_stream_id %]&sign_id=[% sign.sign_id %]">Edit parameters</a>[% ELSE %]No parameters[% END %]</td>
232
        <td class="actions">
237
      <td><a href="?op=detach_stream_from_sign&sign_id=[% sign.sign_id %]&sign_to_stream_id=[% s.sign_to_stream_id %]">Detach</a></td>
233
            [% IF ( s.params ) %]
234
                <a href="/cgi-bin/koha/tools/signs.pl?op=get_params&sign_to_stream_id=[% s.sign_to_stream_id %]&sign_stream_id=[% s.sign_stream_id %]&sign_id=[% s.sign_id %]" class="btn btn-default btn-xs" title="Edit parameters"><i class="fa fa-pencil"></i></a>
235
            [% ELSE %]
236
                <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% s.sign_stream.saved_sql_id %]&phase=Edit SQL" class="btn btn-default btn-xs" title="Edit SQL"><i class="fa fa-pencil"></i></a>
237
            [% END %]
238
        </td>
239
        <td class="actions"><a href="/cgi-bin/koha/tools/signs.pl?op=detach_stream_from_sign&sign_id=[% sign.sign_id %]&sign_to_stream_id=[% s.sign_to_stream_id %]" class="btn btn-default btn-xs detach"><i class="fa fa-times"></i> Detach</a></td>
238
      </tr>
240
      </tr>
239
    [% END %]
241
    [% END %]
240
    </tbody>
242
    </tbody>
Lines 407-416 Link Here
407
                <td>[% s.idleafter %]</td>
409
                <td>[% s.idleafter %]</td>
408
                <td>[% s.pagedelay %]</td>
410
                <td>[% s.pagedelay %]</td>
409
                <td>[% s.reloadafter %]</td>
411
                <td>[% s.reloadafter %]</td>
410
                <td><a href="?op=edit_sign&amp;sign_id=[% s.sign_id %]">Edit</a></td>
412
                <td>
411
                <td><a href="?op=edit_streams&amp;sign_id=[% s.sign_id %]">Edit streams</a></td>
413
                    <div class="dropdown">
412
                <td><a href="?op=del_sign&amp;sign_id=[% s.sign_id %]">Delete</a></td>
414
                        <a class="btn btn-default btn-xs dropdown-toggle" id="opensignsactions[% s.sign_id %]" role="button" data-toggle="dropdown" href="#"> Actions <b class="caret"></b></a>
413
                <td>[% IF ( OPACBaseURL ) %]<a href="http://[% OPACBaseURL %]/cgi-bin/koha/opac-signs.pl?sign=[% s.sign_id %]" title="View this sign in the OPAC">View sign</a>[% END %]</td>
415
                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opensignsactions[% s.sign_id %]">
416
                            <li><a href="/cgi-bin/koha/tools/signs.pl?op=edit_sign&amp;sign_id=[% s.sign_id %]"><i class="fa fa-pencil"></i> Edit</a></li>
417
                            <li><a href="/cgi-bin/koha/tools/signs.pl?op=edit_streams&amp;sign_id=[% s.sign_id %]"><i class="fa fa-pencil"></i> Edit streams</a></li>
418
                            <li><a href="/cgi-bin/koha/tools/signs.pl?op=del_sign&amp;sign_id=[% s.sign_id %]"><i class="fa fa-trash"></i> Delete</a></li>
419
                            [% IF ( OPACBaseURL ) %]<li><a href="[% OPACBaseURL %]/cgi-bin/koha/opac-signs.pl?sign=[% s.sign_id %]" title="View this sign in the OPAC"><i class="fa fa-eye"></i> View sign</a></li>[% END %]
420
                        </ul>
421
                    </div>
422
                </td>
414
            </tr>
423
            </tr>
415
        [% END %]
424
        [% END %]
416
        </tbody>
425
        </tbody>
Lines 435-443 Link Here
435
        [% FOREACH s IN streams %]
444
        [% FOREACH s IN streams %]
436
            <tr>
445
            <tr>
437
                <td><a href="?op=view_stream&amp;sign_stream_id=[% s.sign_stream_id %]">[% s.name %]</a></td>
446
                <td><a href="?op=view_stream&amp;sign_stream_id=[% s.sign_stream_id %]">[% s.name %]</a></td>
438
                <td title="ID: [% s.saved_sql_id %]">[% s.report_name %]</td>
447
                <td>[% FOREACH r IN reports %][% IF r.id == s.saved_sql_id %][% r.report_name %][% END %][% END %]</td>
439
                <td><a href="?op=edit_stream&amp;sign_stream_id=[% s.sign_stream_id %]">Edit</a></td>
448
                <td class="actions">
440
                <td><a href="?op=del_stream&amp;sign_stream_id=[% s.sign_stream_id %]">Delete</a></td>
449
                    <a href="/cgi-bin/koha/tools/signs.pl?op=edit_stream&amp;sign_stream_id=[% s.sign_stream_id %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
450
                    <a href="/cgi-bin/koha/tools/signs.pl?op=del_stream&amp;sign_stream_id=[% s.sign_stream_id %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
451
                </td>
441
            </tr>
452
            </tr>
442
        [% END %]
453
        [% END %]
443
        </tbody>
454
        </tbody>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-signs.tt (-10 / +10 lines)
Lines 64-73 Link Here
64
      <style type="text/css">
64
      <style type="text/css">
65
        [% Koha.Preference( 'OPACDigitalSignsCSS' ) %]
65
        [% Koha.Preference( 'OPACDigitalSignsCSS' ) %]
66
      </style>
66
      </style>
67
      <link rel="stylesheet" href="/opac-tmpl/lib/jquery/mobile/jquery.mobile.structure.min.css" />
67
      <link rel="stylesheet" href="[% interface %]/lib/jquery/mobile/jquery.mobile.structure.min.css" />
68
    [%- ELSE -%]
68
    [%- ELSE -%]
69
      <link rel="stylesheet" href="/opac-tmpl/bootstrap/css/signs.css" />
69
      <link rel="stylesheet" href="[% interface %]/[% theme %]/css/signs.css" />
70
      <link rel="stylesheet" href="/opac-tmpl/lib/jquery/mobile/jquery.mobile.min.css" />
70
      <link rel="stylesheet" href="[% interface %]/lib/jquery/mobile/jquery.mobile.min.css" />
71
    [%- END -%]
71
    [%- END -%]
72
[% END # BLOCK cssinclude %]
72
[% END # BLOCK cssinclude %]
73
[% INCLUDE 'doc-head-close.inc' %]
73
[% INCLUDE 'doc-head-close.inc' %]
Lines 445-453 Link Here
445
445
446
                /* item info */
446
                /* item info */
447
                var $info = $('<div/>')
447
                var $info = $('<div/>')
448
                $info.append($('<span><strong>'+_('Author')+':</strong> ' + cover.record.author+'</span>'));
448
                $info.append($('<span><strong>'+_("Author")+':</strong> ' + cover.record.author+'</span>'));
449
                if(cover.record.publisher) {
449
                if(cover.record.publisher) {
450
                    $info.append($('<br/><span><strong>'+_('Publisher')+':</strong> ' + cover.record.publisher + '</span>'));
450
                    $info.append($('<br/><span><strong>'+_("Publisher")+':</strong> ' + cover.record.publisher + '</span>'));
451
                }
451
                }
452
452
453
                if(cover.record.items.length > 0) {
453
                if(cover.record.items.length > 0) {
Lines 461-471 Link Here
461
                    if(item.type) {
461
                    if(item.type) {
462
                        $li.append($('<img src="/opac-tmpl/lib/famfamfam/'+item.type+'.png" class="ui-li-icon"/>'));
462
                        $li.append($('<img src="/opac-tmpl/lib/famfamfam/'+item.type+'.png" class="ui-li-icon"/>'));
463
                    }
463
                    }
464
                    var location = item.location_description ?  item.location_description + _(' in ') + item.home_branch: item.home_branch;
464
                    var location = item.location_description ?  item.location_description + _(" in ") + item.home_branch: item.home_branch;
465
                    var item_info = item.status + _(' at ') + location;
465
                    var item_info = item.status + _(" at ") + location;
466
                    $li.append($('<h4>'+item_info+'</h4>'));
466
                    $li.append($('<h4>'+item_info+'</h4>'));
467
                    if(item.datedue) {
467
                    if(item.datedue) {
468
                        $li.append('<p>'+_('Date due') + ': ' + item.datedue+'</p>');
468
                        $li.append('<p>'+_("Date due") + ': ' + item.datedue+'</p>');
469
                    }
469
                    }
470
                    $items.append($li);
470
                    $items.append($li);
471
                }
471
                }
Lines 475-481 Link Here
475
                /***************
475
                /***************
476
                * footer
476
                * footer
477
                *******/
477
                *******/
478
                $foot.append($('<a href="#stream_'+sid+'" data-role="button" data-theme="[% sign.swatch %]" data-transition="[% sign.transition %]">'+_('Back')+'</a>'));
478
                $foot.append($('<a href="#stream_'+sid+'" data-role="button" data-theme="[% sign.swatch %]" data-transition="[% sign.transition %]">'+_("Back")+'</a>'));
479
479
480
480
481
                /***************
481
                /***************
Lines 540-546 Link Here
540
540
541
                    cover.render(function(cover_rendered) {
541
                    cover.render(function(cover_rendered) {
542
                        var $coverPage = create_CoverPage(cover_rendered, sid);
542
                        var $coverPage = create_CoverPage(cover_rendered, sid);
543
                        /* initilize active_record with first loaded record from active stream */
543
                        /* initialize active_record with first loaded record from active stream */
544
                        if(firstLoadedRecord && sid == $(active_stream).data('stream-id') ){
544
                        if(firstLoadedRecord && sid == $(active_stream).data('stream-id') ){
545
                            active_record = cover_rendered.$cover.attr('href');
545
                            active_record = cover_rendered.$cover.attr('href');
546
                            firstLoadedRecord = false;
546
                            firstLoadedRecord = false;
(-)a/opac/opac-signs.pl (-2 / +2 lines)
Lines 6-12 Link Here
6
#
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
10
# version.
11
#
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
Lines 33-39 my ( $template, $borrowernumber, $cookie ) = get_template_and_user({ Link Here
33
    'query'           => $query,
33
    'query'           => $query,
34
    'type'            => 'opac',
34
    'type'            => 'opac',
35
    'authnotrequired' => ( C4::Context->preference('OpacPublic') ? 1 : 0 ),
35
    'authnotrequired' => ( C4::Context->preference('OpacPublic') ? 1 : 0 ),
36
    'flagsrequired'   => { borrow => 1 },
36
    'flagsrequired'   => { borrowers => 1 },
37
});
37
});
38
38
39
if ( C4::Context->preference('OPACDigitalSigns') ) {
39
if ( C4::Context->preference('OPACDigitalSigns') ) {
(-)a/tools/signs.pl (-11 / +29 lines)
Lines 6-12 Link Here
6
#
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
10
# version.
11
#
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
Lines 146-154 if ( $op eq 'add_stream' ) { Link Here
146
} elsif ( $op eq 'save_sign' ) {
146
} elsif ( $op eq 'save_sign' ) {
147
147
148
    if ($cgi->param('sign_id')) {
148
    if ($cgi->param('sign_id')) {
149
        ModSign( $cgi->param('name'), $cgi->param('webapp'), $cgi->param('swatch'), $cgi->param('transition'), $cgi->param('idleafter'), $cgi->param('pagedelay'), $cgi->param('reloadafter'), $cgi->param('sign_id') );
149
        Koha::Signs->find( scalar $cgi->param('sign_id') )->set({
150
            name        => scalar $cgi->param('name'),
151
            webapp      => scalar $cgi->param('webapp'),
152
            swatch      => scalar $cgi->param('swatch'),
153
            transition  => scalar $cgi->param('transition'),
154
            idleafter   => scalar $cgi->param('idleafter'),
155
            pagedelay   => scalar $cgi->param('pagedelay'),
156
            reloadafter => scalar $cgi->param('reloadafter')
157
        })->store; # modify
150
    } else {
158
    } else {
151
        AddSign(  $cgi->param('name'), $cgi->param('webapp'), $cgi->param('swatch'), $cgi->param('transition'), $cgi->param('idleafter'), $cgi->param('pagedelay'), $cgi->param('reloadafter') );
159
        Koha::Sign->new({
160
            name        => scalar $cgi->param('name'),
161
            webapp      => scalar $cgi->param('webapp'),
162
            swatch      => scalar $cgi->param('swatch'),
163
            transition  => scalar $cgi->param('transition'),
164
            idleafter   => scalar $cgi->param('idleafter'),
165
            pagedelay   => scalar $cgi->param('pagedelay'),
166
            reloadafter => scalar $cgi->param('reloadafter')
167
        })->store; # add new
152
    }
168
    }
153
    print $cgi->redirect($script_name);
169
    print $cgi->redirect($script_name);
154
170
Lines 193-204 if ( $op eq 'add_stream' ) { Link Here
193
209
194
} elsif ( $op eq 'attach_stream_to_sign' && $sign_stream_id ne '' && $sign_id ne '' ) {
210
} elsif ( $op eq 'attach_stream_to_sign' && $sign_stream_id ne '' && $sign_id ne '' ) {
195
211
196
    my $sign_to_stream_id = AttachSignStreamToSign( $sign_stream_id, $sign_id );
212
    my $sign_to_stream = Koha::SignsToStream->new({ sign_stream_id => $sign_stream_id, sign_id => $sign_id })->store;
197
213
198
    # Check if the SQL associated with the stream needs parameters
214
    # Check if the SQL associated with the stream needs parameters
199
    my $stream = GetSignStream( $sign_stream_id );
215
    my $stream = Koha::SignStreams->find( $sign_stream_id );
200
    if ( $stream->{'savedsql'} =~ m/<</ ) {
216
    my $sql = get_saved_report($stream->saved_sql_id);
201
        print $cgi->redirect( $script_name . '?op=get_params&sign_to_stream_id=' . $sign_to_stream_id . '&sign_stream_id=' . $sign_stream_id . '&sign_id=' . $sign_id );
217
    if ( $sql->{'savedsql'} =~ m/WHERE/ ) {
218
        print $cgi->redirect( $script_name . '?op=get_params&sign_to_stream_id=' . $sign_to_stream->sign_to_stream_id . '&sign_stream_id=' . $sign_stream_id . '&sign_id=' . $sign_id );
202
    } else {
219
    } else {
203
        print $cgi->redirect( $script_name . '?op=edit_streams&sign_id=' . $sign_id );
220
        print $cgi->redirect( $script_name . '?op=edit_streams&sign_id=' . $sign_id );
204
    }
221
    }
Lines 236-246 if ( $op eq 'add_stream' ) { Link Here
236
253
237
} else {
254
} else {
238
255
239
    # TODO Check the setting of OPACDigitalSigns, give a warning if it is off
256
    my @streams = Koha::SignStreams->search({});
257
    my @signs   = Koha::Signs->search({});
240
258
241
    $template->param(
259
    $template->param(
242
        'streams'     => GetSignStreams(),
260
        'streams'     => \@streams,
243
        'signs'       => GetSigns(),
261
        'signs'       => \@signs,
262
        'reports'     => get_saved_reports( { group => 'SIG' } ),
244
        'OPACBaseURL' => C4::Context->preference( 'OPACBaseURL' ) || '',
263
        'OPACBaseURL' => C4::Context->preference( 'OPACBaseURL' ) || '',
245
        'else'        => 1
264
        'else'        => 1
246
    );
265
    );
247
- 

Return to bug 8628