Bugzilla – Attachment 77143 Details for
Bug 8628
Add digital signs to the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8628: [FOLLOW-UP] More fixes
Bug-8628-FOLLOW-UP-More-fixes.patch (text/plain), 24.12 KB, created by
Aleisha Amohia
on 2018-07-20 01:39:00 UTC
(
hide
)
Description:
Bug 8628: [FOLLOW-UP] More fixes
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2018-07-20 01:39:00 UTC
Size:
24.12 KB
patch
obsolete
>From beb4e8dcba8b67884a143084a3578241e8b78fd3 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 13 Jun 2017 04:18:43 +0000 >Subject: [PATCH] Bug 8628: [FOLLOW-UP] More fixes > >This patch fixes qa tool issues, problems in comment 13, merge >conflicts, other issues with patches > >Same test plan applies >--- > .../bug_8628-digital-signs-sysprefs.sql | 7 +-- > installer/data/mysql/kohastructure.sql | 45 +++++++++++++++++++ > installer/data/mysql/sysprefs.sql | 5 +++ > .../intranet-tmpl/prog/en/includes/permissions.inc | 2 +- > .../intranet-tmpl/prog/en/modules/tools/signs.tt | 51 +++++++++++++--------- > .../opac-tmpl/bootstrap/en/modules/opac-signs.tt | 20 ++++----- > opac/opac-signs.pl | 4 +- > tools/signs.pl | 39 ++++++++++++----- > 8 files changed, 127 insertions(+), 46 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql b/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql >index 8aff962..d2a08f5 100644 >--- a/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql >+++ b/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql >@@ -1,3 +1,4 @@ >-INSERT IGNORE INTO systempreferences (variable,value,explanation,type) VALUES ('OPACDigitalSigns',0,'Turn digital signs in the OPAC on or off.','YesNo'); >-INSERT IGNORE INTO systempreferences (variable,explanation,type) VALUES ('OPACDigitalSignsCSS','Extra CSS to be included in all signs','Textarea'); >-INSERT IGNORE INTO systempreferences (variable,value,explanation,type) VALUES ('OPACDigitalSignsSwatches','abcde','List the swatches that can be chosen when creating a new sign','free'); >+INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES >+('OPACDigitalSigns',0,NULL,'Turn digital signs in the OPAC on or off.','YesNo'), >+('OPACDigitalSignsCSS','',NULL,'Extra CSS to be included in all signs','Textarea'), >+('OPACDigitalSignsSwatches','abcde',NULL,'List the swatches that can be chosen when creating a new sign','free'); >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 34545d0..9a3545d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4196,6 +4196,51 @@ CREATE TABLE `oauth_access_tokens` ( > PRIMARY KEY (`access_token`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >+-- >+-- Table structure for table 'sign_streams' >+-- >+ >+DROP TABLE IF EXISTS sign_streams; >+CREATE TABLE sign_streams ( >+ `sign_stream_id` int(11) NOT NULL auto_increment, -- primary key, used to identify streams >+ `saved_sql_id` int(11) NOT NULL, -- foreign key from the saved_sql table >+ `name` varchar(64), -- name/title of the sign >+ PRIMARY KEY (`sign_stream_id`), >+ CONSTRAINT `sign_streams_ibfk_1` FOREIGN KEY (`saved_sql_id`) REFERENCES `saved_sql` (`id`) ON DELETE CASCADE >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+ >+-- >+-- Table structure for table 'signs' >+-- >+ >+DROP TABLE IF EXISTS signs; >+CREATE TABLE signs ( >+ `sign_id` int(11) NOT NULL auto_increment, -- primary key, used to identify signs >+ `name` varchar(64), -- name/title of the deck >+ `webapp` int(1) NOT NULL DEFAULT 0, -- display as web app or normal page >+ `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) >+ `swatch` char(1) NOT NULL DEFAULT '', -- swatches determine the colors of page elements >+ `idleafter` int(11) NOT NULL default 0, -- seconds to wait before automatic page turning clicks in >+ `pagedelay` int(11) NOT NULL default 0, -- seconds to wait before turning to a new page/record >+ `reloadafter` int(11) NOT NULL default 0, -- seconds to wait before reloading all the pages >+ PRIMARY KEY (`sign_id`) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+ >+-- >+-- Table structure for table 'signs_to_streams' >+-- >+ >+DROP TABLE IF EXISTS signs_to_streams; >+CREATE TABLE signs_to_streams ( >+ `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) >+ `sign_stream_id` int(11) NOT NULL, -- foreign key from the decks sign_streams table >+ `sign_id` int(11) NOT NULL, -- foreign key from the signs table >+ `params` varchar(255) NOT NULL DEFAULT '', -- list of parameters for the SQL associated with the sign_stream >+ PRIMARY KEY (`sign_to_stream_id`), >+ CONSTRAINT `signs_to_streams_ibfk_1` FOREIGN KEY (`sign_stream_id`) REFERENCES `sign_streams` (`sign_stream_id`) ON DELETE CASCADE, >+ CONSTRAINT `signs_to_streams_ibfk_2` FOREIGN KEY (`sign_id`) REFERENCES `signs` (`sign_id`) ON DELETE CASCADE >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index fddb376..e8d4924 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -84,6 +84,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('BatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch','Free'), > ('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'), > ('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'), >+('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'), > ('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'), > ('BlockReturnOfLostItems','0','0','If enabled, items that are marked as lost cannot be returned.','YesNo'), > ('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'), >@@ -332,6 +333,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), > ('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'), > ('OPACdidyoumean','',NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), >+('OPACDigitalSigns',0,NULL, 'Turn digital signs in the OPAC on or off.','YesNo'), >+('OPACDigitalSignsCSS','',NULL,'Extra CSS to be included in all signs','Textarea'), >+('OPACDigitalSignsSwatches','abcde',NULL,'List the swatches that can be chosen when creating a new sign','free'), > ('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'), > ('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd','','Define export options available on OPAC detail page.','multiple'), > ('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'), >@@ -478,6 +482,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'), > ('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'), > ('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'), >+('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'), > ('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), > ('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'), > ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index c533086..742a9d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -112,8 +112,8 @@ > [%- CASE 'edit_templates' -%]<span>Create and edit club templates</span> > [%- CASE 'enroll' -%]<span>Enroll patrons in clubs</span> > [%- CASE 'edi_manage' -%]<span>Manage EDIFACT transmissions</span> >- [%# self_check %] > [%- 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> > [%- CASE 'self_checkout_module' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span> >+ [%- CASE 'edit_digital_signs' -%]<span>Create and edit digital signs for the OPAC</span> > [%- END -%] > [%- END -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt >index 100c814..187e41e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt >@@ -7,8 +7,7 @@ > <script type="text/javascript"> > //<![CDATA[ > >- // prepare DOM for YUI Toolbar >- $(document).ready(function() { >+ $(document).ready(function() { > $("#table_signs").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumns": [ > null, >@@ -26,11 +25,8 @@ > "sPaginationType": "four_button" > } )); > $("#table_streams").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumns": [ >- null, >- {"bSearchable": false}, >- {"bSearchable": false, "bSortable": false}, >- {"bSearchable": false, "bSortable": false}, >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSearchable": false, "bSortable": false }, > ], > "sPaginationType": "four_button" > } )); >@@ -98,8 +94,8 @@ > [% IF ( else ) %] > <div id="toolbar"> > <ul class="toolbar"> >- <li><a id="newsign" href="?op=add_sign" class="btn btn-small"><i class="icon-plus"></i>New sign</a></li> >- <li><a id="newstream" href="?op=add_stream" class="btn btn-small"><i class="icon-plus"></i>New stream</a></li> >+ <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> >+ <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> > </ul> > </div> > [% END %] >@@ -231,10 +227,16 @@ > <tbody> > [% FOREACH s IN attached %] > <tr> >- <td>[% s.name %]</td> >- <td>[% s.params %]</td> >- <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> >- <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> >+ <td>[% s.sign_stream.name %]</td> >+ <td>[% IF ( s.params ) %][% s.params %][% ELSE %]None[% END %]</td> >+ <td class="actions"> >+ [% IF ( s.params ) %] >+ <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> >+ [% ELSE %] >+ <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> >+ [% END %] >+ </td> >+ <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> > </tr> > [% END %] > </tbody> >@@ -407,10 +409,17 @@ > <td>[% s.idleafter %]</td> > <td>[% s.pagedelay %]</td> > <td>[% s.reloadafter %]</td> >- <td><a href="?op=edit_sign&sign_id=[% s.sign_id %]">Edit</a></td> >- <td><a href="?op=edit_streams&sign_id=[% s.sign_id %]">Edit streams</a></td> >- <td><a href="?op=del_sign&sign_id=[% s.sign_id %]">Delete</a></td> >- <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> >+ <td> >+ <div class="dropdown"> >+ <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> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opensignsactions[% s.sign_id %]"> >+ <li><a href="/cgi-bin/koha/tools/signs.pl?op=edit_sign&sign_id=[% s.sign_id %]"><i class="fa fa-pencil"></i> Edit</a></li> >+ <li><a href="/cgi-bin/koha/tools/signs.pl?op=edit_streams&sign_id=[% s.sign_id %]"><i class="fa fa-pencil"></i> Edit streams</a></li> >+ <li><a href="/cgi-bin/koha/tools/signs.pl?op=del_sign&sign_id=[% s.sign_id %]"><i class="fa fa-trash"></i> Delete</a></li> >+ [% 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 %] >+ </ul> >+ </div> >+ </td> > </tr> > [% END %] > </tbody> >@@ -435,9 +444,11 @@ > [% FOREACH s IN streams %] > <tr> > <td><a href="?op=view_stream&sign_stream_id=[% s.sign_stream_id %]">[% s.name %]</a></td> >- <td title="ID: [% s.saved_sql_id %]">[% s.report_name %]</td> >- <td><a href="?op=edit_stream&sign_stream_id=[% s.sign_stream_id %]">Edit</a></td> >- <td><a href="?op=del_stream&sign_stream_id=[% s.sign_stream_id %]">Delete</a></td> >+ <td>[% FOREACH r IN reports %][% IF r.id == s.saved_sql_id %][% r.report_name %][% END %][% END %]</td> >+ <td class="actions"> >+ <a href="/cgi-bin/koha/tools/signs.pl?op=edit_stream&sign_stream_id=[% s.sign_stream_id %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> >+ <a href="/cgi-bin/koha/tools/signs.pl?op=del_stream&sign_stream_id=[% s.sign_stream_id %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a> >+ </td> > </tr> > [% END %] > </tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-signs.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-signs.tt >index 812e8f1..e65629c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-signs.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-signs.tt >@@ -64,10 +64,10 @@ > <style type="text/css"> > [% Koha.Preference( 'OPACDigitalSignsCSS' ) %] > </style> >- <link rel="stylesheet" href="/opac-tmpl/lib/jquery/mobile/jquery.mobile.structure.min.css" /> >+ <link rel="stylesheet" href="[% interface %]/lib/jquery/mobile/jquery.mobile.structure.min.css" /> > [%- ELSE -%] >- <link rel="stylesheet" href="/opac-tmpl/bootstrap/css/signs.css" /> >- <link rel="stylesheet" href="/opac-tmpl/lib/jquery/mobile/jquery.mobile.min.css" /> >+ <link rel="stylesheet" href="[% interface %]/[% theme %]/css/signs.css" /> >+ <link rel="stylesheet" href="[% interface %]/lib/jquery/mobile/jquery.mobile.min.css" /> > [%- END -%] > [% END # BLOCK cssinclude %] > [% INCLUDE 'doc-head-close.inc' %] >@@ -445,9 +445,9 @@ > > /* item info */ > var $info = $('<div/>') >- $info.append($('<span><strong>'+_('Author')+':</strong> ' + cover.record.author+'</span>')); >+ $info.append($('<span><strong>'+_("Author")+':</strong> ' + cover.record.author+'</span>')); > if(cover.record.publisher) { >- $info.append($('<br/><span><strong>'+_('Publisher')+':</strong> ' + cover.record.publisher + '</span>')); >+ $info.append($('<br/><span><strong>'+_("Publisher")+':</strong> ' + cover.record.publisher + '</span>')); > } > > if(cover.record.items.length > 0) { >@@ -461,11 +461,11 @@ > if(item.type) { > $li.append($('<img src="/opac-tmpl/lib/famfamfam/'+item.type+'.png" class="ui-li-icon"/>')); > } >- var location = item.location_description ? item.location_description + _(' in ') + item.home_branch: item.home_branch; >- var item_info = item.status + _(' at ') + location; >+ var location = item.location_description ? item.location_description + _(" in ") + item.home_branch: item.home_branch; >+ var item_info = item.status + _(" at ") + location; > $li.append($('<h4>'+item_info+'</h4>')); > if(item.datedue) { >- $li.append('<p>'+_('Date due') + ': ' + item.datedue+'</p>'); >+ $li.append('<p>'+_("Date due") + ': ' + item.datedue+'</p>'); > } > $items.append($li); > } >@@ -475,7 +475,7 @@ > /*************** > * footer > *******/ >- $foot.append($('<a href="#stream_'+sid+'" data-role="button" data-theme="[% sign.swatch %]" data-transition="[% sign.transition %]">'+_('Back')+'</a>')); >+ $foot.append($('<a href="#stream_'+sid+'" data-role="button" data-theme="[% sign.swatch %]" data-transition="[% sign.transition %]">'+_("Back")+'</a>')); > > > /*************** >@@ -540,7 +540,7 @@ > > cover.render(function(cover_rendered) { > var $coverPage = create_CoverPage(cover_rendered, sid); >- /* initilize active_record with first loaded record from active stream */ >+ /* initialize active_record with first loaded record from active stream */ > if(firstLoadedRecord && sid == $(active_stream).data('stream-id') ){ > active_record = cover_rendered.$cover.attr('href'); > firstLoadedRecord = false; >diff --git a/opac/opac-signs.pl b/opac/opac-signs.pl >index 66057df..a090ed4 100755 >--- a/opac/opac-signs.pl >+++ b/opac/opac-signs.pl >@@ -6,7 +6,7 @@ > # > # Koha is free software; you can redistribute it and/or modify it under the > # terms of the GNU General Public License as published by the Free Software >-# Foundation; either version 2 of the License, or (at your option) any later >+# Foundation; either version 3 of the License, or (at your option) any later > # version. > # > # Koha is distributed in the hope that it will be useful, but WITHOUT ANY >@@ -33,7 +33,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user({ > 'query' => $query, > 'type' => 'opac', > 'authnotrequired' => ( C4::Context->preference('OpacPublic') ? 1 : 0 ), >- 'flagsrequired' => { borrow => 1 }, >+ 'flagsrequired' => { borrowers => 1 }, > }); > > if ( C4::Context->preference('OPACDigitalSigns') ) { >diff --git a/tools/signs.pl b/tools/signs.pl >index 702829d..e431504 100755 >--- a/tools/signs.pl >+++ b/tools/signs.pl >@@ -6,7 +6,7 @@ > # > # Koha is free software; you can redistribute it and/or modify it under the > # terms of the GNU General Public License as published by the Free Software >-# Foundation; either version 2 of the License, or (at your option) any later >+# Foundation; either version 3 of the License, or (at your option) any later > # version. > # > # Koha is distributed in the hope that it will be useful, but WITHOUT ANY >@@ -146,9 +146,25 @@ if ( $op eq 'add_stream' ) { > } elsif ( $op eq 'save_sign' ) { > > if ($cgi->param('sign_id')) { >- 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') ); >+ Koha::Signs->find( scalar $cgi->param('sign_id') )->set({ >+ name => scalar $cgi->param('name'), >+ webapp => scalar $cgi->param('webapp'), >+ swatch => scalar $cgi->param('swatch'), >+ transition => scalar $cgi->param('transition'), >+ idleafter => scalar $cgi->param('idleafter'), >+ pagedelay => scalar $cgi->param('pagedelay'), >+ reloadafter => scalar $cgi->param('reloadafter') >+ })->store; # modify > } else { >- AddSign( $cgi->param('name'), $cgi->param('webapp'), $cgi->param('swatch'), $cgi->param('transition'), $cgi->param('idleafter'), $cgi->param('pagedelay'), $cgi->param('reloadafter') ); >+ Koha::Sign->new({ >+ name => scalar $cgi->param('name'), >+ webapp => scalar $cgi->param('webapp'), >+ swatch => scalar $cgi->param('swatch'), >+ transition => scalar $cgi->param('transition'), >+ idleafter => scalar $cgi->param('idleafter'), >+ pagedelay => scalar $cgi->param('pagedelay'), >+ reloadafter => scalar $cgi->param('reloadafter') >+ })->store; # add new > } > print $cgi->redirect($script_name); > >@@ -193,12 +209,13 @@ if ( $op eq 'add_stream' ) { > > } elsif ( $op eq 'attach_stream_to_sign' && $sign_stream_id ne '' && $sign_id ne '' ) { > >- my $sign_to_stream_id = AttachSignStreamToSign( $sign_stream_id, $sign_id ); >+ my $sign_to_stream = Koha::SignsToStream->new({ sign_stream_id => $sign_stream_id, sign_id => $sign_id })->store; > > # Check if the SQL associated with the stream needs parameters >- my $stream = GetSignStream( $sign_stream_id ); >- if ( $stream->{'savedsql'} =~ m/<</ ) { >- 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 ); >+ my $stream = Koha::SignStreams->find( $sign_stream_id ); >+ my $sql = get_saved_report($stream->saved_sql_id); >+ if ( $sql->{'savedsql'} =~ m/WHERE/ ) { >+ 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 ); > } else { > print $cgi->redirect( $script_name . '?op=edit_streams&sign_id=' . $sign_id ); > } >@@ -236,11 +253,13 @@ if ( $op eq 'add_stream' ) { > > } else { > >- # TODO Check the setting of OPACDigitalSigns, give a warning if it is off >+ my @streams = Koha::SignStreams->search({}); >+ my @signs = Koha::Signs->search({}); > > $template->param( >- 'streams' => GetSignStreams(), >- 'signs' => GetSigns(), >+ 'streams' => \@streams, >+ 'signs' => \@signs, >+ 'reports' => get_saved_reports( { group => 'SIG' } ), > 'OPACBaseURL' => C4::Context->preference( 'OPACBaseURL' ) || '', > 'else' => 1 > ); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8628
:
42703
|
42704
|
45968
|
45969
|
58602
|
58603
|
58604
|
58605
|
62338
|
64249
|
66246
|
66247
|
66248
|
66249
|
66250
|
77025
|
77026
|
77027
|
77028
|
77141
|
77142
|
77143
|
77144
|
77145
|
78709
|
80248
|
80249
|
80250
|
80252
|
82896
|
82897
|
82898
|
82899
|
82900
|
82901
|
83312
|
88821
|
88822
|
88823
|
88824
|
88825
|
88826
|
93054
|
93055
|
93056
|
93057
|
93058
|
93059
|
93066
|
93067
|
93068
|
93069
|
93070
|
93071
|
99608
|
99609
|
99610
|
99611
|
99612
|
99613
|
99614
|
99615
|
99616
|
99617
|
99618
|
99619
|
99620
|
99621
|
99622
|
99623
|
99624
|
99717
|
99718
|
99801
|
118472
|
118473
|
118474
|
118475
|
118476
|
118477
|
118478
|
118479
|
118480
|
119455
|
131223
|
131224
|
145645
|
145646
|
145647
|
145648
|
145649
|
145650
|
145651
|
145652
|
145653
|
145654
|
147000
|
147001
|
147002
|
147003
|
147004
|
147005
|
147006
|
147007
|
147008
|
147009
|
147010