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

(-)a/Koha/Sign.pm (-10 / +10 lines)
Lines 4-21 package Koha::Sign; Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
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
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later 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
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
(-)a/Koha/SignStream.pm (-10 / +10 lines)
Lines 4-21 package Koha::SignStream; Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
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
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later 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
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
(-)a/Koha/SignStreams.pm (-10 / +10 lines)
Lines 4-21 package Koha::SignStreams; Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
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
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later 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
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
(-)a/Koha/Signs.pm (-10 / +10 lines)
Lines 4-21 package Koha::Signs; Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
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
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later 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
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
(-)a/Koha/SignsToStream.pm (-10 / +10 lines)
Lines 4-21 package Koha::SignsToStream; Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
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
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later 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
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
(-)a/Koha/SignsToStreams.pm (-10 / +10 lines)
Lines 4-21 package Koha::SignsToStreams; Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
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
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later 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
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
(-)a/installer/data/mysql/atomicupdate/bug_8628-digital-signs.perl (-1 / +1 lines)
Lines 18-24 if( CheckVersion( $DBversion ) ) { Link Here
18
        $dbh->do(q{ CREATE TABLE signs (
18
        $dbh->do(q{ CREATE TABLE signs (
19
                    sign_id int(11) NOT NULL auto_increment,     -- primary key, used to identify signs
19
                    sign_id int(11) NOT NULL auto_increment,     -- primary key, used to identify signs
20
                    name varchar(64),                            -- name/title of the deck
20
                    name varchar(64),                            -- name/title of the deck
21
                    webapp int(1) NOT NULL DEFAULT 0,            -- display as web app or normal page
21
                    webapp tinyint(1) NOT NULL DEFAULT 0,            -- display as web app or normal page
22
                    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)
22
                    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)
23
                    swatch char(1) NOT NULL DEFAULT '',          -- swatches determine the colors of page elements
23
                    swatch char(1) NOT NULL DEFAULT '',          -- swatches determine the colors of page elements
24
                    idleafter int(11) NOT NULL default 0,        -- seconds to wait before automatic page turning cicks in
24
                    idleafter int(11) NOT NULL default 0,        -- seconds to wait before automatic page turning cicks in
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 5384-5390 DROP TABLE IF EXISTS signs; Link Here
5384
CREATE TABLE signs (
5384
CREATE TABLE signs (
5385
  `sign_id` int(11) NOT NULL auto_increment, -- primary key, used to identify signs
5385
  `sign_id` int(11) NOT NULL auto_increment, -- primary key, used to identify signs
5386
  `name` varchar(64), -- name/title of the deck
5386
  `name` varchar(64), -- name/title of the deck
5387
  `webapp` int(1) NOT NULL DEFAULT 0, -- display as web app or normal page
5387
  `webapp` tinyint(1) NOT NULL DEFAULT 0, -- display as web app or normal page
5388
  `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)
5388
  `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)
5389
  `swatch` char(1) NOT NULL DEFAULT '', -- swatches determine the colors of page elements
5389
  `swatch` char(1) NOT NULL DEFAULT '', -- swatches determine the colors of page elements
5390
  `idleafter` int(11) NOT NULL default 0, -- seconds to wait before automatic page turning clicks in
5390
  `idleafter` int(11) NOT NULL default 0, -- seconds to wait before automatic page turning clicks in
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt (-70 / +71 lines)
Lines 1-8 Link Here
1
[% USE raw %]
1
[% USE Koha %]
2
[% USE Koha %]
2
[% USE Asset %]
3
[% USE Asset %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Tools &rsaquo; Digital signs</title>
6
<title>Digital signs &rsaquo; Tools &rsaquo; Koha</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
</head>
8
</head>
8
<body id="tools_signs" class="tools">
9
<body id="tools_signs" class="tools">
Lines 15-42 Link Here
15
    <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
16
    <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
16
    [% IF op == 'stream_form' %]
17
    [% IF op == 'stream_form' %]
17
        [% IF ( stream.sign_stream_id ) %]
18
        [% IF ( stream.sign_stream_id ) %]
18
            [% INCLUDE dslink %] Edit "[% stream.name %]"
19
            [% INCLUDE dslink %] Edit "[% stream.name | html %]"
19
        [% ELSE %]
20
        [% ELSE %]
20
            [% INCLUDE dslink %] Add a new stream
21
            [% INCLUDE dslink %] Add a new stream
21
        [% END %]
22
        [% END %]
22
    [% ELSIF op == 'sign_form' %]
23
    [% ELSIF op == 'sign_form' %]
23
        [% IF ( sign.sign_id ) %]
24
        [% IF ( sign.sign_id ) %]
24
            [% INCLUDE dslink %] Edit "[% sign.name %]"
25
            [% INCLUDE dslink %] Edit "[% sign.name | html %]"
25
        [% ELSE %]
26
        [% ELSE %]
26
            [% INCLUDE dslink %] Add a new sign
27
            [% INCLUDE dslink %] Add a new sign
27
        [% END %]
28
        [% END %]
28
    [% ELSIF op == 'edit_streams' %]
29
    [% ELSIF op == 'edit_streams' %]
29
        [% INCLUDE dslink %] Edit streams attached to "[% sign.name %]"
30
        [% INCLUDE dslink %] Edit streams attached to "[% sign.name | html %]"
30
    [% ELSIF op == 'get_params' %]
31
    [% ELSIF op == 'get_params' %]
31
        [% INCLUDE dslink %]
32
        [% INCLUDE dslink %]
32
        <a href="/cgi-bin/koha/tools/signs.pl?op=edit_streams&sign_id=[% sign.sign_id %]">Edit streams attached to "[% sign.name %]"</a> &rsaquo;
33
        <a href="/cgi-bin/koha/tools/signs.pl?op=edit_streams&sign_id=[% sign.sign_id | uri %]">Edit streams attached to "[% sign.name | html %]"</a> &rsaquo;
33
        Get parameters
34
        Get parameters
34
    [% ELSIF op == 'del_stream' %]
35
    [% ELSIF op == 'del_stream' %]
35
        [% INCLUDE dslink %] Delete stream "[% stream.name %]"
36
        [% INCLUDE dslink %] Delete stream "[% stream.name | html %]"
36
    [% ELSIF op == 'del_stream_ok' %]
37
    [% ELSIF op == 'del_stream_ok' %]
37
        [% INCLUDE dslink %] Stream deleted
38
        [% INCLUDE dslink %] Stream deleted
38
    [% ELSIF op == 'del_sign' %]
39
    [% ELSIF op == 'del_sign' %]
39
        [% INCLUDE dslink %] Delete sign "[% sign.name %]"
40
        [% INCLUDE dslink %] Delete sign "[% sign.name | html %]"
40
    [% ELSIF op == 'del_sign_ok' %]
41
    [% ELSIF op == 'del_sign_ok' %]
41
        [% INCLUDE dslink %] Sign deleted
42
        [% INCLUDE dslink %] Sign deleted
42
    [% ELSIF op == 'view_sign' %]
43
    [% ELSIF op == 'view_sign' %]
Lines 79-94 Link Here
79
    [% ELSE %]
80
    [% ELSE %]
80
        <h1>Add stream</h1>
81
        <h1>Add stream</h1>
81
    [% END %]
82
    [% END %]
82
    <form action="[% script_name %]" name="streamform" id="streamform" method="post">
83
    <form action="[% script_name | html %]" name="streamform" id="streamform" method="post">
83
        <input type="hidden" name="op" value="save_stream" />
84
        <input type="hidden" name="op" value="save_stream" />
84
        [% IF ( stream.sign_stream_id ) %]
85
        [% IF ( stream.sign_stream_id ) %]
85
            <input type="hidden" name="sign_stream_id" value="[% stream.sign_stream_id %]" />
86
            <input type="hidden" name="sign_stream_id" value="[% stream.sign_stream_id | html %]" />
86
        [% END %]
87
        [% END %]
87
        <fieldset class="rows">
88
        <fieldset class="rows">
88
            <ol>
89
            <ol>
89
                <li>
90
                <li>
90
                    <label for="name" class="required">Name</label>
91
                    <label for="name" class="required">Name</label>
91
                    <input type="text" name="name" value="[% stream.name %]" required="required">
92
                    <input type="text" name="name" value="[% stream.name | html %]" required="required">
92
                    <span class="required">Required</span>
93
                    <span class="required">Required</span>
93
                </li>
94
                </li>
94
                <li><label for="report" class="required">Report</label>
95
                <li><label for="report" class="required">Report</label>
Lines 98-106 Link Here
98
                        [% END %]
99
                        [% END %]
99
                        [% FOREACH report IN reports %]
100
                        [% FOREACH report IN reports %]
100
                            [% IF ( report.id == stream.saved_sql_id ) %]
101
                            [% IF ( report.id == stream.saved_sql_id ) %]
101
                                <option value="[% report.id %]" selected="selected">[% report.report_name %]</option>
102
                                <option value="[% report.id | html %]" selected="selected">[% report.report_name | html %]</option>
102
                            [% ELSE %]
103
                            [% ELSE %]
103
                                <option value="[% report.id %]">[% report.report_name %]</option>
104
                                <option value="[% report.id | html %]">[% report.report_name | html %]</option>
104
                            [% END %]
105
                            [% END %]
105
                        [% END %]
106
                        [% END %]
106
                    </select>
107
                    </select>
Lines 118-132 Link Here
118
    [% ELSE %]
119
    [% ELSE %]
119
        <h1>Add sign</h1>
120
        <h1>Add sign</h1>
120
    [% END %]
121
    [% END %]
121
    <form action="[% script_name %]" name="signform" id="signform" method="post">
122
    <form action="[% script_name | html %]" name="signform" id="signform" method="post">
122
        <input type="hidden" name="op" value="save_sign" />
123
        <input type="hidden" name="op" value="save_sign" />
123
        [% IF ( sign.sign_id ) %]
124
        [% IF ( sign.sign_id ) %]
124
            <input type="hidden" name="sign_id" value="[% sign.sign_id %]" />
125
            <input type="hidden" name="sign_id" value="[% sign.sign_id | html %]" />
125
        [% END %]
126
        [% END %]
126
        <fieldset id="sign_general_info" class="rows">
127
        <fieldset id="sign_general_info" class="rows">
127
            <legend id="general_info_lgd">General settings</legend>
128
            <legend id="general_info_lgd">General settings</legend>
128
            <ol>
129
            <ol>
129
                <li><label for="name">Name</label><input type="text" name="name" value="[% sign.name %]" /></li>
130
                <li><label for="name">Name</label><input type="text" name="name" value="[% sign.name | html %]" /></li>
130
            </ol>
131
            </ol>
131
        </fieldset>
132
        </fieldset>
132
        <fieldset id="sign_appearance" class="rows">
133
        <fieldset id="sign_appearance" class="rows">
Lines 147-155 Link Here
147
                        <option value="">Default</option>
148
                        <option value="">Default</option>
148
                        [% FOREACH swatch IN Koha.Preference('OPACDigitalSignsSwatches').split('') %]
149
                        [% FOREACH swatch IN Koha.Preference('OPACDigitalSignsSwatches').split('') %]
149
                            [% IF swatch == sign.swatch %]
150
                            [% IF swatch == sign.swatch %]
150
                                <option value="[% swatch %]" selected="selected">[% swatch %]</option>
151
                                <option value="[% swatch | html %]" selected="selected">[% swatch | html %]</option>
151
                            [% ELSE %]
152
                            [% ELSE %]
152
                                <option value="[% swatch %]">[% swatch %]</option>
153
                                <option value="[% swatch | html %]">[% swatch | html %]</option>
153
                            [% END %]
154
                            [% END %]
154
                        [% END %]
155
                        [% END %]
155
                    </select>
156
                    </select>
Lines 158-166 Link Here
158
                    <select name="transition" id="transition">
159
                    <select name="transition" id="transition">
159
                        [% FOREACH transition IN [ 'none' 'fade' 'pop' 'flip' 'turn' 'flow' 'slidefade' 'slide' 'slideup' 'slidedown' ] %]
160
                        [% FOREACH transition IN [ 'none' 'fade' 'pop' 'flip' 'turn' 'flow' 'slidefade' 'slide' 'slideup' 'slidedown' ] %]
160
                            [% IF transition == sign.transition %]
161
                            [% IF transition == sign.transition %]
161
                                <option value="[% transition %]" selected="selected">[% transition %]</option>
162
                                <option value="[% transition | html %]" selected="selected">[% transition | html %]</option>
162
                            [% ELSE %]
163
                            [% ELSE %]
163
                                <option value="[% transition %]">[% transition %]</option>
164
                                <option value="[% transition | html %]">[% transition | html %]</option>
164
                            [% END %]
165
                            [% END %]
165
                        [% END %]
166
                        [% END %]
166
                    </select>
167
                    </select>
Lines 171-183 Link Here
171
            <legend id="autopage_lgd">Automatic page turning</legend>
172
            <legend id="autopage_lgd">Automatic page turning</legend>
172
            <ol>
173
            <ol>
173
                <li><label for="idleafter">Idle after</label>
174
                <li><label for="idleafter">Idle after</label>
174
                    <input type="text" name="idleafter" id="idleafter" value="[% sign.idleafter %]" size="4" /> seconds. (Set to 0 to disable automatic page turning.)
175
                    <input type="text" name="idleafter" id="idleafter" value="[% sign.idleafter | html %]" size="4" /> seconds. (Set to 0 to disable automatic page turning.)
175
                </li>
176
                </li>
176
                <li><label for="pagedelay">Page delay</label>
177
                <li><label for="pagedelay">Page delay</label>
177
                    <input type="text" name="pagedelay" id="pagedelay" value="[% sign.pagedelay %]" size="4" /> seconds.
178
                    <input type="text" name="pagedelay" id="pagedelay" value="[% sign.pagedelay | html %]" size="4" /> seconds.
178
                </li>
179
                </li>
179
                <li><label for="reloadafter">Reload after</label>
180
                <li><label for="reloadafter">Reload after</label>
180
                    <input type="text" name="reloadafter" id="reloadafter" value="[% sign.reloadafter %]" size="4" /> seconds.
181
                    <input type="text" name="reloadafter" id="reloadafter" value="[% sign.reloadafter | html %]" size="4" /> seconds.
181
                </li>
182
                </li>
182
            </ol>
183
            </ol>
183
        </fieldset>
184
        </fieldset>
Lines 185-191 Link Here
185
    </form>
186
    </form>
186
187
187
[% ELSIF op == 'edit_streams' %]
188
[% ELSIF op == 'edit_streams' %]
188
    <h1>Edit streams attached to [% sign.name %]</h1>
189
    <h1>Edit streams attached to [% sign.name | html %]</h1>
189
    <h2>Streams already attached to this sign</h2>
190
    <h2>Streams already attached to this sign</h2>
190
    [% IF ( sts.count ) %]
191
    [% IF ( sts.count ) %]
191
        <table id="streams_attached">
192
        <table id="streams_attached">
Lines 199-214 Link Here
199
            <tbody>
200
            <tbody>
200
                [% FOREACH s IN sts %]
201
                [% FOREACH s IN sts %]
201
                <tr>
202
                <tr>
202
                    <td>[% s.sign_stream.name %]</td>
203
                    <td>[% s.sign_stream.name | html %]</td>
203
                    <td>[% IF s.params %][% s.params %][% ELSE %]None[% END %]</td>
204
                    <td>[% IF s.params %][% s.params | html %][% ELSE %]None[% END %]</td>
204
                    <td class="actions">
205
                    <td class="actions">
205
                        [% IF s.params %]
206
                        [% IF s.params %]
206
                            <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>
207
                            <a href="/cgi-bin/koha/tools/signs.pl?op=get_params&sign_to_stream_id=[% s.sign_to_stream_id | uri %]&sign_stream_id=[% s.sign_stream_id | uri %]&sign_id=[% s.sign_id | uri %]" class="btn btn-default btn-xs" title="Edit parameters"><i class="fa fa-pencil"></i></a>
207
                        [% ELSE %]
208
                        [% ELSE %]
208
                            <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>
209
                            <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% s.sign_stream.saved_sql_id | uri %]&phase=Edit SQL" class="btn btn-default btn-xs" title="Edit SQL"><i class="fa fa-pencil"></i></a>
209
                        [% END %]
210
                        [% END %]
210
                    </td>
211
                    </td>
211
                    <td class="actions"><a href="/cgi-bin/koha/tools/signs.pl?op=detach_stream_from_sign&sign_id=[% s.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>
212
                    <td class="actions"><a href="/cgi-bin/koha/tools/signs.pl?op=detach_stream_from_sign&sign_id=[% s.sign_id | uri %]&sign_to_stream_id=[% s.sign_to_stream_id | uri %]" class="btn btn-default btn-xs detach"><i class="fa fa-times"></i> Detach</a></td>
212
                </tr>
213
                </tr>
213
                [% END %]
214
                [% END %]
214
            </tbody>
215
            </tbody>
Lines 218-232 Link Here
218
    [% END %]
219
    [% END %]
219
220
220
    <h2>Attach a new stream to this sign</h2>
221
    <h2>Attach a new stream to this sign</h2>
221
    <form action="[% script_name %]" name="attach_stream_to_sign_form" id="attach_stream_to_sign_form" method="post">
222
    <form action="[% script_name | html %]" name="attach_stream_to_sign_form" id="attach_stream_to_sign_form" method="post">
222
        <input type="hidden" name="op" value="attach_stream_to_sign" />
223
        <input type="hidden" name="op" value="attach_stream_to_sign" />
223
        <input type="hidden" name="sign_id" value="[% sign_id %]" />
224
        <input type="hidden" name="sign_id" value="[% sign_id | html %]" />
224
        <fieldset class="rows">
225
        <fieldset class="rows">
225
            <ol>
226
            <ol>
226
                <li><label for="stream">Choose a stream to attach</label>
227
                <li><label for="stream">Choose a stream to attach</label>
227
                    <select name="sign_stream_id" id="stream">
228
                    <select name="sign_stream_id" id="stream">
228
                        [% FOREACH s IN streams %]
229
                        [% FOREACH s IN streams %]
229
                            <option value="[% s.sign_stream_id %]">[% s.name %]</option>
230
                            <option value="[% s.sign_stream_id | html %]">[% s.name | html %]</option>
230
                        [% END %]
231
                        [% END %]
231
                    </select>
232
                    </select>
232
                </li>
233
                </li>
Lines 236-249 Link Here
236
    </form>
237
    </form>
237
238
238
[% ELSIF op == 'get_params' %]
239
[% ELSIF op == 'get_params' %]
239
    <h1>Parameters for [% stream.name %]</h1>
240
    <h1>Parameters for [% stream.name | html %]</h1>
240
    Based on report: [% sql.report_name %] | <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% stream.saved_sql_id %]&phase=Edit SQL">Edit this report</a>
241
    Based on report: [% sql.report_name | html %] | <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% stream.saved_sql_id | uri %]&phase=Edit SQL">Edit this report</a>
241
242
242
    <form action="[% script_name %]" name="get_params_form" id="get_params_form" method="post">
243
    <form action="[% script_name | html %]" name="get_params_form" id="get_params_form" method="post">
243
        <input type="hidden" name="op" value="save_params" />
244
        <input type="hidden" name="op" value="save_params" />
244
        <input type="hidden" name="sign_to_stream_id" value="[% sign_to_stream_id %]" />
245
        <input type="hidden" name="sign_to_stream_id" value="[% sign_to_stream_id | html %]" />
245
        <input type="hidden" name="sign_stream_id" value="[% sign_stream_id %]" />
246
        <input type="hidden" name="sign_stream_id" value="[% sign_stream_id | html %]" />
246
        <input type="hidden" name="sign_id" value="[% sign_id %]" />
247
        <input type="hidden" name="sign_id" value="[% sign_id | html %]" />
247
        <fieldset class="rows">
248
        <fieldset class="rows">
248
            [% IF ( sts.params ) %]
249
            [% IF ( sts.params ) %]
249
                <legend id="save_params_lgd">Edit parameters</legend>
250
                <legend id="save_params_lgd">Edit parameters</legend>
Lines 252-258 Link Here
252
            [% END %]
253
            [% END %]
253
            <ol>
254
            <ol>
254
                <li><label for="stream">Parameters</label>
255
                <li><label for="stream">Parameters</label>
255
                    <input type="text" size="60" name="parameters" id="parameters" value="[% sts.params %]" />
256
                    <input type="text" size="60" name="parameters" id="parameters" value="[% sts.params | html %]" />
256
                </li>
257
                </li>
257
            </ol>
258
            </ol>
258
        </fieldset>
259
        </fieldset>
Lines 274-287 Link Here
274
275
275
[% ELSIF op == 'del_stream' %]
276
[% ELSIF op == 'del_stream' %]
276
    <div class="dialog alert">
277
    <div class="dialog alert">
277
        <h3>Confirm deletion of stream <span class="ex">'[% stream.name %]'</span>?</h3>
278
        <h3>Confirm deletion of stream <span class="ex">'[% stream.name | html %]'</span>?</h3>
278
        <form action="[% script_name %]" id ="confirm_stream_delete_form" method="post">
279
        <form action="[% script_name | html %]" id ="confirm_stream_delete_form" method="post">
279
            <input type="hidden" name="op" value="del_stream_ok" />
280
            <input type="hidden" name="op" value="del_stream_ok" />
280
            <input type="hidden" name="sign_stream_id" value="[% stream.sign_stream_id %]" />
281
            <input type="hidden" name="sign_stream_id" value="[% stream.sign_stream_id | html %]" />
281
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this stream</button>
282
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this stream</button>
282
        </form>
283
        </form>
283
284
284
        <form action="[% script_name %]" id="cancel_stream_delete_form" method="get">
285
        <form action="[% script_name | html %]" id="cancel_stream_delete_form" method="get">
285
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
286
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
286
        </form>
287
        </form>
287
    </div>
288
    </div>
Lines 289-309 Link Here
289
[% ELSIF op == 'del_stream_ok' %]
290
[% ELSIF op == 'del_stream_ok' %]
290
    <div class="dialog message">
291
    <div class="dialog message">
291
        <h3>Stream deleted</h3>
292
        <h3>Stream deleted</h3>
292
        <form action="[% script_name %]" method="get">
293
        <form action="[% script_name | html %]" method="get">
293
            <input type="submit" value="OK" class="approve" />
294
            <input type="submit" value="OK" class="approve" />
294
        </form>
295
        </form>
295
    </div>
296
    </div>
296
297
297
[% ELSIF op == 'del_sign' %]
298
[% ELSIF op == 'del_sign' %]
298
    <div class="dialog alert">
299
    <div class="dialog alert">
299
        <h3>Confirm deletion of sign <span class="ex">'[% sign.name %]'</span>?</h3>
300
        <h3>Confirm deletion of sign <span class="ex">'[% sign.name | html %]'</span>?</h3>
300
        <form action="[% script_name %]" id ="confirm_sign_delete_form" method="post">
301
        <form action="[% script_name | html %]" id ="confirm_sign_delete_form" method="post">
301
            <input type="hidden" name="op" value="del_sign_ok" />
302
            <input type="hidden" name="op" value="del_sign_ok" />
302
            <input type="hidden" name="sign_id" value="[% sign.sign_id %]" />
303
            <input type="hidden" name="sign_id" value="[% sign.sign_id | html %]" />
303
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this sign</button>
304
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this sign</button>
304
        </form>
305
        </form>
305
306
306
        <form action="[% script_name %]" id="cancel_sign_delete_form" method="get">
307
        <form action="[% script_name | html %]" id="cancel_sign_delete_form" method="get">
307
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
308
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
308
        </form>
309
        </form>
309
    </div>
310
    </div>
Lines 311-331 Link Here
311
[% ELSIF op == 'del_sign_ok' %]
312
[% ELSIF op == 'del_sign_ok' %]
312
    <div class="dialog message">
313
    <div class="dialog message">
313
        <h3>Sign deleted</h3>
314
        <h3>Sign deleted</h3>
314
        <form action="[% script_name %]" method="get">
315
        <form action="[% script_name | html %]" method="get">
315
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
316
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
316
        </form>
317
        </form>
317
    </div>
318
    </div>
318
319
319
[% ELSIF op == 'view_sign' %]
320
[% ELSIF op == 'view_sign' %]
320
    <h1>[% sign.name %]</h1>
321
    <h1>[% sign.name | html %]</h1>
321
    <h2>Streams</h2>
322
    <h2>Streams</h2>
322
323
323
    [% IF ( streams ) %]
324
    [% IF ( streams ) %]
324
        [% FOREACH stream IN streams %]
325
        [% FOREACH stream IN streams %]
325
            <h3>[% stream.sign_stream.name %]</h3>
326
            <h3>[% stream.sign_stream.name | html %]</h3>
326
            <ul>
327
            <ul>
327
                [% FOREACH record IN stream.records %]
328
                [% FOREACH record IN stream.records %]
328
                    <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% record.biblionumber %]">[% record.title %]</a></li>
329
                    <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% record.biblionumber | uri %]">[% record.title | html %]</a></li>
329
                [% END %]
330
                [% END %]
330
            </ul>
331
            </ul>
331
        [% END %]
332
        [% END %]
Lines 334-341 Link Here
334
    [% END %]
335
    [% END %]
335
336
336
[% ELSIF op == 'view_stream' %]
337
[% ELSIF op == 'view_stream' %]
337
    <h1>[% stream.name %]</h1>
338
    <h1>[% stream.name | html %]</h1>
338
    Based on report: [% stream.saved_sql_id.report_name %] | <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% stream.saved_sql_id %]&phase=Edit SQL">Edit this report</a>
339
    Based on report: [% stream.saved_sql_id.report_name | html %] | <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% stream.saved_sql_id | uri %]&phase=Edit SQL">Edit this report</a>
339
340
340
    <h2>SQL</h2>
341
    <h2>SQL</h2>
341
    <pre id="sql_output">[% stream.saved_sql_id.savedsql | html %]</pre>
342
    <pre id="sql_output">[% stream.saved_sql_id.savedsql | html %]</pre>
Lines 374-394 Link Here
374
            <tbody>
375
            <tbody>
375
                [% FOREACH s IN signs %]
376
                [% FOREACH s IN signs %]
376
                <tr>
377
                <tr>
377
                    <td><a href="/cgi-bin/koha/tools/signs.pl?op=view_sign&amp;sign_id=[% s.sign_id %]">[% s.name %]</a></td>
378
                    <td><a href="/cgi-bin/koha/tools/signs.pl?op=view_sign&amp;sign_id=[% s.sign_id | uri %]">[% s.name | html %]</a></td>
378
                    <td>[% IF ( s.webapp ) %]Yes[% ELSE %]No[% END %]</td>
379
                    <td>[% IF ( s.webapp ) %]Yes[% ELSE %]No[% END %]</td>
379
                    <td>[% s.swatch %]</td>
380
                    <td>[% s.swatch | html %]</td>
380
                    <td>[% s.transition %]</td>
381
                    <td>[% s.transition | html %]</td>
381
                    <td>[% s.idleafter %]</td>
382
                    <td>[% s.idleafter | html %]</td>
382
                    <td>[% s.pagedelay %]</td>
383
                    <td>[% s.pagedelay | html %]</td>
383
                    <td>[% s.reloadafter %]</td>
384
                    <td>[% s.reloadafter | html %]</td>
384
                    <td>
385
                    <td>
385
                        <div class="dropdown">
386
                        <div class="dropdown">
386
                            <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>
387
                            <a class="btn btn-default btn-xs dropdown-toggle" id="opensignsactions[% s.sign_id | html %]" role="button" data-toggle="dropdown" href="#"> Actions <b class="caret"></b></a>
387
                            <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opensignsactions[% s.sign_id %]">
388
                            <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opensignsactions[% s.sign_id | html %]">
388
                                <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>
389
                                <li><a href="/cgi-bin/koha/tools/signs.pl?op=edit_sign&amp;sign_id=[% s.sign_id | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
389
                                <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>
390
                                <li><a href="/cgi-bin/koha/tools/signs.pl?op=edit_streams&amp;sign_id=[% s.sign_id | uri %]"><i class="fa fa-pencil"></i> Edit streams</a></li>
390
                                <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>
391
                                <li><a href="/cgi-bin/koha/tools/signs.pl?op=del_sign&amp;sign_id=[% s.sign_id | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
391
                                [% 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 %]
392
                                [% IF ( OPACBaseURL ) %]<li><a href="[% OPACBaseURL | uri %]/cgi-bin/koha/opac-signs.pl?sign=[% s.sign_id | uri %]" title="View this sign in the OPAC"><i class="fa fa-eye"></i> View sign</a></li>[% END %]
392
                            </ul>
393
                            </ul>
393
                        </div>
394
                        </div>
394
                    </td>
395
                    </td>
Lines 414-424 Link Here
414
            <tbody>
415
            <tbody>
415
                [% FOREACH s IN streams %]
416
                [% FOREACH s IN streams %]
416
                <tr>
417
                <tr>
417
                    <td><a href="/cgi-bin/koha/tools/signs.pl?op=view_stream&amp;sign_stream_id=[% s.sign_stream_id %]">[% s.name %]</a></td>
418
                    <td><a href="/cgi-bin/koha/tools/signs.pl?op=view_stream&amp;sign_stream_id=[% s.sign_stream_id | uri %]">[% s.name | html %]</a></td>
418
                    <td title="ID: [% s.saved_sql_id %]">[% s.saved_sql.report_name %]</td>
419
                    <td title="ID: [% s.saved_sql_id | html %]">[% s.saved_sql.report_name | html %]</td>
419
                    <td class="actions">
420
                    <td class="actions">
420
                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/signs.pl?op=edit_stream&amp;sign_stream_id=[% s.sign_stream_id %]"><i class="fa fa-pencil"></i> Edit</a>
421
                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/signs.pl?op=edit_stream&amp;sign_stream_id=[% s.sign_stream_id | html %]"><i class="fa fa-pencil"></i> Edit</a>
421
                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/signs.pl?op=del_stream&amp;sign_stream_id=[% s.sign_stream_id %]"><i class="fa fa-trash"></i> Delete</a>
422
                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/signs.pl?op=del_stream&amp;sign_stream_id=[% s.sign_stream_id | html %]"><i class="fa fa-trash"></i> Delete</a>
422
                    </td>
423
                    </td>
423
                </tr>
424
                </tr>
424
                [% END %]
425
                [% END %]
Lines 480-486 Link Here
480
            </thead>
481
            </thead>
481
            <tbody>
482
            <tbody>
482
                [% FOREACH r IN records %]
483
                [% FOREACH r IN records %]
483
                    <tr><td>[% r.biblionumber %]</td><td>[% r.title %]</td></tr>
484
                    <tr><td>[% r.biblionumber | html %]</td><td>[% r.title | html %]</td></tr>
484
                [% END %]
485
                [% END %]
485
            </tbody>
486
            </tbody>
486
        </table>
487
        </table>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-signs.tt (-42 / +43 lines)
Lines 1-3 Link Here
1
[% USE raw %]
1
[% USE Koha %]
2
[% USE Koha %]
2
[% USE KohaDates %]
3
[% USE KohaDates %]
3
[% USE Branches %]
4
[% USE Branches %]
Lines 20-26 Link Here
20
    [%- END -%]
21
    [%- END -%]
21
    [%- IF ( item.transfertwhen ) %]
22
    [%- IF ( item.transfertwhen ) %]
22
        [%- SET itemavailable = 0 -%]
23
        [%- SET itemavailable = 0 -%]
23
        [%-%]In transit from [%- item.transfertfrom %] to [%- item.transfertto %] since [%- item.transfertwhen | $KohaDates %]
24
        [%-%]In transit from [%- item.transfertfrom | html %] to [%- item.transfertto | html %] since [%- item.transfertwhen | $KohaDates %]
24
    [%- END %]
25
    [%- END %]
25
    [%- IF ( item.waiting ) -%]
26
    [%- IF ( item.waiting ) -%]
26
        [%- SET itemavailable = 0 -%]
27
        [%- SET itemavailable = 0 -%]
Lines 33-45 Link Here
33
    [%- IF ( item.itemnotforloan ) -%]
34
    [%- IF ( item.itemnotforloan ) -%]
34
        [%- SET itemavailable = 0 -%]
35
        [%- SET itemavailable = 0 -%]
35
        [%- IF ( item.notforloanvalueopac ) -%]
36
        [%- IF ( item.notforloanvalueopac ) -%]
36
            [%- item.notforloanvalueopac -%] [%- IF ( item.restrictedopac ) -%] ([%- item.restrictedopac -%])[%- END -%]
37
            [%- item.notforloanvalueopac | html -%] [%- IF ( item.restrictedopac ) -%] ([%- item.restrictedopac | html -%])[%- END -%]
37
        [%- ELSE -%]
38
        [%- ELSE -%]
38
            [%-%]Not for loan [%- IF ( item.restrictedopac ) -%] ([%- item.restrictedopac -%])[%- END -%]
39
            [%-%]Not for loan [%- IF ( item.restrictedopac ) -%] ([%- item.restrictedopac | html -%])[%- END -%]
39
        [%- END -%]
40
        [%- END -%]
40
    [%- ELSIF ( item.notforloan_per_itemtype ) -%]
41
    [%- ELSIF ( item.notforloan_per_itemtype ) -%]
41
        [%- SET itemavailable = 0 -%]
42
        [%- SET itemavailable = 0 -%]
42
        [%-%]Not for loan [%- IF ( item.restrictedopac ) -%] ([%- item.restrictedopac -%])[%- END -%]
43
        [%-%]Not for loan [%- IF ( item.restrictedopac ) -%] ([%- item.restrictedopac | html -%])[%- END -%]
43
    [%- END -%]
44
    [%- END -%]
44
    [%- IF ( item.damaged ) -%]
45
    [%- IF ( item.damaged ) -%]
45
        [%- SET itemavailable = 0 -%]
46
        [%- SET itemavailable = 0 -%]
Lines 50-74 Link Here
50
        [%-%]On order
51
        [%-%]On order
51
    [%- END -%]
52
    [%- END -%]
52
    [%- IF ( itemavailable ) -%]
53
    [%- IF ( itemavailable ) -%]
53
        [%-%]Available [%- IF ( item.restrictedopac ) -%] ([%- item.restrictedopac -%])[%- END -%]
54
        [%-%]Available [%- IF ( item.restrictedopac ) -%] ([%- item.restrictedopac | html -%])[%- END -%]
54
    [%- END -%]
55
    [%- END -%]
55
[%- END -%]
56
[%- END -%]
56
57
57
[% INCLUDE 'doc-head-open.inc' %]
58
[% INCLUDE 'doc-head-open.inc' %]
58
<title>[% IF ( sign )  %][% sign.name %] - Koha[% ELSE %]Koha digital signs[% END %]</title>
59
<title>[% IF ( sign )  %][% sign.name | html %] - Koha[% ELSE %]Koha digital signs[% END %]</title>
59
[%- IF ( sign.webapp ) %]
60
[%- IF ( sign.webapp ) %]
60
    <meta name="apple-mobile-web-app-capable" content="yes" />
61
    <meta name="apple-mobile-web-app-capable" content="yes" />
61
    <meta name="viewport" content="width=device-width, initial-scale=1">
62
    <meta name="viewport" content="width=device-width, initial-scale=1">
62
[% END -%]
63
[% END -%]
63
[% BLOCK cssinclude %]
64
[% BLOCK cssinclude %]
64
    [%- IF Koha.Preference( 'OPACDigitalSignsCSS' ) != '' -%]
65
    [%- IF Koha.Preference( 'OPACDigitalSignsCSS' ) != '' -%]
65
      <style type="text/css">
66
      <style>
66
        [% Koha.Preference( 'OPACDigitalSignsCSS' ) %]
67
        [% Koha.Preference( 'OPACDigitalSignsCSS' ) | html %]
67
      </style>
68
      </style>
68
      [% Asset.css("lib/jquery/mobile/jquery.mobile.structure.min.css") %]
69
      [% Asset.css("lib/jquery/mobile/jquery.mobile.structure.min.css") | $raw %]
69
    [%- ELSE -%]
70
    [%- ELSE -%]
70
      [% Asset.css("css/signs.css") %]
71
      [% Asset.css("css/signs.css") | $raw %]
71
      [% Asset.css("lib/jquery/mobile/jquery.mobile.min.css") %]
72
      [% Asset.css("lib/jquery/mobile/jquery.mobile.min.css") | $raw %]
72
    [%- END -%]
73
    [%- END -%]
73
[% END # BLOCK cssinclude %]
74
[% END # BLOCK cssinclude %]
74
[% INCLUDE 'doc-head-close.inc' %]
75
[% INCLUDE 'doc-head-close.inc' %]
Lines 83-104 Link Here
83
    [%- IF ( streams.0 )  -%]
84
    [%- IF ( streams.0 )  -%]
84
      [%# Iterate through the streams, creating one front page for each %]
85
      [%# Iterate through the streams, creating one front page for each %]
85
      [%- FOREACH s IN streams -%]
86
      [%- FOREACH s IN streams -%]
86
          <div data-role="page" class="page-stream" data-stream-id="[% s.sign_stream_id %]" data-theme="[% sign.swatch %]" id="stream_[% s.sign_stream_id %]">
87
          <div data-role="page" class="page-stream" data-stream-id="[% s.sign_stream_id | html %]" data-theme="[% sign.swatch | html %]" id="stream_[% s.sign_stream_id | html %]">
87
              <div data-role="header" data-theme="[% sign.swatch %]" data-position="fixed">
88
              <div data-role="header" data-theme="[% sign.swatch | html %]" data-position="fixed">
88
                  <div style="text-align: center;">
89
                  <div style="text-align: center;">
89
                      [%# The header has a list of buttons for all the streams %]
90
                      [%# The header has a list of buttons for all the streams %]
90
                      [%- SET localstreams = streams -%]
91
                      [%- SET localstreams = streams -%]
91
                      [%- FOREACH stream IN localstreams -%]
92
                      [%- FOREACH stream IN localstreams -%]
92
                          [% IF s.sign_stream_id == stream.sign_stream_id %]
93
                          [% IF s.sign_stream_id == stream.sign_stream_id %]
93
                              <a href="#stream_[% stream.sign_stream_id %]" data-stream-id="[% stream.sign_stream_id %]" class="btn-stream stream-active" data-inline="true" data-icon="star" data-role="button">[% stream.name %]</a>
94
                              <a href="#stream_[% stream.sign_stream_id | uri %]" data-stream-id="[% stream.sign_stream_id | html %]" class="btn-stream stream-active" data-inline="true" data-icon="star" data-role="button">[% stream.name | html %]</a>
94
                          [% ELSE %]
95
                          [% ELSE %]
95
                              <a href="#stream_[% stream.sign_stream_id %]" data-stream-id="[% stream.sign_stream_id %]" class="btn-stream" data-inline="true" data-role="button">[% stream.name %]</a>
96
                              <a href="#stream_[% stream.sign_stream_id | uri %]" data-stream-id="[% stream.sign_stream_id | html %]" class="btn-stream" data-inline="true" data-role="button">[% stream.name | html %]</a>
96
                          [% END %]
97
                          [% END %]
97
                      [% END -%]
98
                      [% END -%]
98
                  </div>
99
                  </div>
99
              </div> <!-- /header -->
100
              </div> <!-- /header -->
100
              <div data-role="content" class="content">
101
              <div data-role="content" class="content">
101
                  <h1>[% s.name %]</h1>
102
                  <h1>[% s.name | html %]</h1>
102
              </div> <!-- /content -->
103
              </div> <!-- /content -->
103
          </div> <!-- /page -->
104
          </div> <!-- /page -->
104
105
Lines 118-124 Link Here
118
      <div data-role="content">
119
      <div data-role="content">
119
        <ul data-role="listview">
120
        <ul data-role="listview">
120
        [% FOREACH SIGN IN signs %]
121
        [% FOREACH SIGN IN signs %]
121
          <li><a href="?sign=[% SIGN.sign_id %]" data-ajax="false">[% SIGN.name %]</a></li>
122
          <li><a href="?sign=[% SIGN.sign_id | uri %]" data-ajax="false">[% SIGN.name | html %]</a></li>
122
        [% END %]
123
        [% END %]
123
        </ul>
124
        </ul>
124
      </div>
125
      </div>
Lines 129-135 Link Here
129
[% INCLUDE 'opac-bottom.inc' is_popup=1 %]
130
[% INCLUDE 'opac-bottom.inc' is_popup=1 %]
130
[% BLOCK jsinclude %]
131
[% BLOCK jsinclude %]
131
    [% IF sign && Koha.Preference( 'OPACDigitalSigns') %]
132
    [% IF sign && Koha.Preference( 'OPACDigitalSigns') %]
132
    <script type="text/javascript">
133
    <script>
133
    //<![CDATA[
134
    //<![CDATA[
134
        $(function (){
135
        $(function (){
135
            var active_stream = '#' + $('.page-stream').first().attr('id');
136
            var active_stream = '#' + $('.page-stream').first().attr('id');
Lines 154-173 Link Here
154
                idleTime++;
155
                idleTime++;
155
156
156
                [% IF ( sign.idleafter ) -%]
157
                [% IF ( sign.idleafter ) -%]
157
                if (idleTime >= [% sign.idleafter %]) {
158
                if (idleTime >= [% sign.idleafter | html %]) {
158
                    doIdle = true;
159
                    doIdle = true;
159
                }
160
                }
160
                [%- END -%]
161
                [%- END -%]
161
162
162
                [%- IF ( sign.pagedelay ) -%]
163
                [%- IF ( sign.pagedelay ) -%]
163
                if (doIdle && idleTimePage >= [% sign.pagedelay %]) {
164
                if (doIdle && idleTimePage >= [% sign.pagedelay | html %]) {
164
                    idleTimePage = 0;
165
                    idleTimePage = 0;
165
                    swipe('next', true, true);
166
                    swipe('next', true, true);
166
                }
167
                }
167
                [%- END -%]
168
                [%- END -%]
168
169
169
                [%- IF ( sign.reloadafter ) -%]
170
                [%- IF ( sign.reloadafter ) -%]
170
                if (doIdle && idleTime >= [% sign.reloadafter %]) {
171
                if (doIdle && idleTime >= [% sign.reloadafter | html %]) {
171
                    resetIdle();
172
                    resetIdle();
172
                    window.location.reload(true);
173
                    window.location.reload(true);
173
                }
174
                }
Lines 367-381 Link Here
367
                        self.$cover.css('background-size', '100%');
368
                        self.$cover.css('background-size', '100%');
368
                        self.$cover.css('background-position', 'center center');
369
                        self.$cover.css('background-position', 'center center');
369
                        self.$cover.css('background-repeat', 'no-repeat');
370
                        self.$cover.css('background-repeat', 'no-repeat');
370
                        self.$cover.addClass('ui-bar-[% sign.swatch %]');
371
                        self.$cover.addClass('ui-bar-[% sign.swatch | html %]');
371
372
372
                        if( !img_cache.have_cover(record) ) {
373
                        if( !img_cache.have_cover(record) ) {
373
                            self.$vcontainer = $('<div class="cover-inner"/>');
374
                            self.$vcontainer = $('<div class="cover-inner"/>');
374
                            self.$vcontainer.addClass('ui-bar-[% sign.swatch %]');
375
                            self.$vcontainer.addClass('ui-bar-[% sign.swatch | html %]');
375
                            self.$cover.append(self.$vcontainer);
376
                            self.$cover.append(self.$vcontainer);
376
377
377
                            self.$cover.addClass('cover-blank');
378
                            self.$cover.addClass('cover-blank');
378
                            self.$cover.css('border-color', $('.ui-bar-[% sign.swatch %]').first().css('background-color'));
379
                            self.$cover.css('border-color', $('.ui-bar-[% sign.swatch | html %]').first().css('background-color'));
379
380
380
                            var $covertext = $('<div class="cover-text"></div>');
381
                            var $covertext = $('<div class="cover-text"></div>');
381
                            $covertext.append($('<div class="title">'+record.title+'</div>'));
382
                            $covertext.append($('<div class="title">'+record.title+'</div>'));
Lines 394-401 Link Here
394
                var $cover = cover.$cover.clone();
395
                var $cover = cover.$cover.clone();
395
                var $stream = $('#stream_'+sid);
396
                var $stream = $('#stream_'+sid);
396
397
397
                var $page = $('<div data-role="page" data-close-btn="none" data-theme="[% sign.swatch %]" id="record_'+sid+'_'+cover.record.biblionumber+'"/>');
398
                var $page = $('<div data-role="page" data-close-btn="none" data-theme="[% sign.swatch | html %]" id="record_'+sid+'_'+cover.record.biblionumber+'"/>');
398
                var $head = $('<div data-role="header" data-theme="[% sign.swatch %]"/>');
399
                var $head = $('<div data-role="header" data-theme="[% sign.swatch | html %]"/>');
399
                var $content = $('<div data-role="content" class="content"/>')
400
                var $content = $('<div data-role="content" class="content"/>')
400
                var $foot = $('<div data-role="foot" data-position="fixed" class="foot"/>')
401
                var $foot = $('<div data-role="foot" data-position="fixed" class="foot"/>')
401
402
Lines 460-466 Link Here
460
                    var item = cover.record.items[i];
461
                    var item = cover.record.items[i];
461
462
462
                    if(item.type) {
463
                    if(item.type) {
463
                        $li.append($('<img src="/[% interface %]/lib/famfamfam/'+item.type+'.png" class="ui-li-icon"/>'));
464
                        $li.append($('<img src="/[% interface | html %]/lib/famfamfam/'+item.type+'.png" class="ui-li-icon"/>'));
464
                    }
465
                    }
465
                    var location = item.location_description ? item.location_description + _(" in ") + item.home_branch: item.home_branch;
466
                    var location = item.location_description ? item.location_description + _(" in ") + item.home_branch: item.home_branch;
466
                    var item_info = item.status + _(" at ") + location;
467
                    var item_info = item.status + _(" at ") + location;
Lines 476-482 Link Here
476
                /***************
477
                /***************
477
                * footer
478
                * footer
478
                *******/
479
                *******/
479
                $foot.append($('<a href="#stream_'+sid+'" data-role="button" data-theme="[% sign.swatch %]" data-transition="[% sign.transition %]">'+_("Back")+'</a>'));
480
                $foot.append($('<a href="#stream_'+sid+'" data-role="button" data-theme="[% sign.swatch | html %]" data-transition="[% sign.transition | html %]">'+_("Back")+'</a>'));
480
481
481
                /***************
482
                /***************
482
                * page
483
                * page
Lines 494-516 Link Here
494
            */
495
            */
495
            var streams = {
496
            var streams = {
496
                [%- FOREACH stream IN streams %]
497
                [%- FOREACH stream IN streams %]
497
                    '[% stream.sign_stream_id %]': {
498
                    '[% stream.sign_stream_id | html %]': {
498
                        'name': [% stream.name.json || '""' %],
499
                        'name': [% stream.name.json || '""' | html %],
499
                        'records': [
500
                        'records': [
500
                        [%- FOREACH record IN stream.records %]
501
                        [%- FOREACH record IN stream.records %]
501
                            {'author': [% record.author.json || '""' %],
502
                            {'author': [% record.author.json || '""' | html %],
502
                            'title': [% record.title.json || '""' %],
503
                            'title': [% record.title.json || '""' | html %],
503
                            'publisher': [% record.publishercode.json || '""' %],
504
                            'publisher': [% record.publishercode.json || '""' | html %],
504
                            'biblionumber': [% record.biblionumber.json || '""' %],
505
                            'biblionumber': [% record.biblionumber.json || '""' | html %],
505
                            'isbn': [% record.isbn.json || '""' %],
506
                            'isbn': [% record.isbn.json || '""' | html %],
506
                            'items': [
507
                            'items': [
507
                                [%- FOREACH item IN record.items %]
508
                                [%- FOREACH item IN record.items %]
508
                                    {
509
                                    {
509
                                        'type': [% item.itemtype.json || '""' %],
510
                                        'type': [% item.itemtype.json || '""' | html %],
510
                                        'datedue': "[% item.datedue | $KohaDates as_due_date => 1 %]",
511
                                        'datedue': "[% item.datedue | $KohaDates as_due_date => 1 %]",
511
                                        'location': [% item.location.json || '""' %],
512
                                        'location': [% item.location.json || '""' | html %],
512
                                        'location_description': [% item.location_description.json || '""' %],
513
                                        'location_description': [% item.location_description.json || '""' | html %],
513
                                        'home_branch': "[% Branches.GetName(item.homebranch) | json %]",
514
                                        'home_branch': "[% Branches.GetName(item.homebranch) | json | html %]",
514
                                        'status': "[% INCLUDE item_status item = item %]"
515
                                        'status': "[% INCLUDE item_status item = item %]"
515
516
516
                                    }
517
                                    }
Lines 534-542 Link Here
534
535
535
                for(var i in streams[sid].records) {
536
                for(var i in streams[sid].records) {
536
                    var cover = new Cover(streams[sid].records[i]);
537
                    var cover = new Cover(streams[sid].records[i]);
537
                    var $link = $('<a href="#record_'+sid+'_'+cover.record.biblionumber+'" class="btn-record" data-transition="[% sign.transition %]"/>')
538
                    var $link = $('<a href="#record_'+sid+'_'+cover.record.biblionumber+'" class="btn-record" data-transition="[% sign.transition | html %]"/>')
538
                    $link.click(function(){ active_record = $(this).attr('href'); });
539
                    $link.click(function(){ active_record = $(this).attr('href'); });
539
                    $content.append($link.append($('<div class="cover placeholder ui-bar-[% sign.swatch %] cover_'+cover.id+'" data-id="'+cover.id+'"/>')));
540
                    $content.append($link.append($('<div class="cover placeholder ui-bar-[% sign.swatch | html %] cover_'+cover.id+'" data-id="'+cover.id+'"/>')));
540
541
541
                    cover.render(function(cover_rendered) {
542
                    cover.render(function(cover_rendered) {
542
                        var $coverPage = create_CoverPage(cover_rendered, sid);
543
                        var $coverPage = create_CoverPage(cover_rendered, sid);
Lines 558-564 Link Here
558
    //]]>
559
    //]]>
559
    </script>
560
    </script>
560
    [% END # IF ( sign ) %]
561
    [% END # IF ( sign ) %]
561
    [% Asset.js("lib/jquery/mobile/jquery.mobile.min.js") %]
562
    [% Asset.js("lib/jquery/mobile/jquery.mobile.min.js") | $raw %]
562
[% END # BLOCK jsinclude %]
563
[% END # BLOCK jsinclude %]
563
564
564
</body>
565
</body>
(-)a/opac/opac-signs.pl (-16 / +16 lines)
Lines 4-30 Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
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
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later 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
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use CGI;
20
use CGI;
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Biblio;
23
use C4::Biblio qw( GetMarcBiblio GetBiblioData );
24
use C4::Reports::Guided;
24
use C4::Reports::Guided qw( execute_query );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Koha qw( GetNormalizedISBN );
27
use C4::Items;
27
use C4::Items qw( GetItemsInfo );
28
use Koha::AuthorisedValues;
28
use Koha::AuthorisedValues;
29
use Koha::Signs;
29
use Koha::Signs;
30
use Koha::SignStreams;
30
use Koha::SignStreams;
(-)a/tools/signs.pl (-16 / +14 lines)
Lines 4-21 Link Here
4
#
4
#
5
# This file is part of Koha.
5
# This file is part of Koha.
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
8
# terms of the GNU General Public License as published by the Free Software
8
# under the terms of the GNU General Public License as published by
9
# Foundation; either version 3 of the License, or (at your option) any later
9
# the Free Software Foundation; either version 3 of the License, or
10
# version.
10
# (at your option) any later 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
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
15
#
16
#
16
# You should have received a copy of the GNU General Public License along
17
# You should have received a copy of the GNU General Public License
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
=head1 NAME
20
=head1 NAME
21
21
Lines 38-51 use Koha::SignStreams; Link Here
38
use Koha::SignsToStreams;
38
use Koha::SignsToStreams;
39
use Koha::Reports;
39
use Koha::Reports;
40
use CGI;
40
use CGI;
41
use C4::Auth;
41
use C4::Auth qw( get_template_and_user );
42
use C4::Context;
42
use C4::Context;
43
use C4::Log;
43
use C4::Log;
44
use C4::Output;
44
use C4::Output qw( output_html_with_http_headers );
45
use C4::Reports::Guided;
45
use C4::Reports::Guided qw( get_saved_reports execute_query );
46
use Modern::Perl;
46
use Modern::Perl;
47
47
48
my $cgi = new CGI;
48
my $cgi = CGI->new;
49
my $dbh = C4::Context->dbh;
49
my $dbh = C4::Context->dbh;
50
my $script_name = 'signs.pl';
50
my $script_name = 'signs.pl';
51
51
Lines 53-59 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ Link Here
53
    template_name   => "tools/signs.tt",
53
    template_name   => "tools/signs.tt",
54
    query           => $cgi,
54
    query           => $cgi,
55
    type            => "intranet",
55
    type            => "intranet",
56
    authnotrequired => 0,
57
    flagsrequired   => { tools => 'edit_digital_signs' },
56
    flagsrequired   => { tools => 'edit_digital_signs' },
58
    debug           => 0,
57
    debug           => 0,
59
});
58
});
60
- 

Return to bug 8628