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

(-)a/installer/data/mysql/atomicupdate/bug-34563-move-IntranetCirculationHome-to-additional-contents.pl (+40 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "34563",
5
    description => "Move IntranetCirculationHomeHTML to HTML customizations",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Get any existing value from the IntranetCirculationHomeHTML system preference
11
        my ($intranetcirculationhomehtml) = $dbh->selectrow_array(
12
            q|
13
            SELECT value FROM systempreferences WHERE variable='IntranetCirculationHomeHTML';
14
        |
15
        );
16
        if ($intranetcirculationhomehtml) {
17
18
            $dbh->do(
19
                "INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'IntranetCirculationHomeHTML', 'IntranetCirculationHomeHTML', NULL, CAST(NOW() AS date) )"
20
            );
21
22
            my ($insert_id) = $dbh->selectrow_array(
23
                "SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'IntranetCirculationHomeHTML' AND location = 'IntranetCirculationHomeHTML' LIMIT 1",
24
                {}
25
            );
26
27
            $dbh->do(
28
                "INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'IntranetCirculationHomeHTML default', ?, 'default' )",
29
                undef, $insert_id, $intranetcirculationhomehtml
30
            );
31
32
            say $out "Added 'IntranetCirculationHomeHTML' HTML customization";
33
        }
34
35
        # Remove old system preference
36
        $dbh->do("DELETE FROM systempreferences WHERE variable='IntranetCirculationHomeHTML'");
37
        say $out "Removed system preference 'IntranetCirculationHomeHTML'";
38
39
    },
40
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 350-356 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
350
('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'),
350
('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'),
351
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
351
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
352
('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
352
('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
353
('IntranetCirculationHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the reports home page', 'Free'),
354
('IntranetCoce','0', NULL, 'If on, enables cover retrieval from the configured Coce server in the staff interface', 'YesNo'),
353
('IntranetCoce','0', NULL, 'If on, enables cover retrieval from the configured Coce server in the staff interface', 'YesNo'),
355
('intranetcolorstylesheet','','50','Define the color stylesheet to use in the staff interface','free'),
354
('intranetcolorstylesheet','','50','Define the color stylesheet to use in the staff interface','free'),
356
('IntranetFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the staff interface','free'),
355
('IntranetFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the staff interface','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc (+2 lines)
Lines 14-19 Link Here
14
    Adding content to this region will enable the copyright clearance stage in request creation. The content will appear on the OPAC during the process of placing an ILL request.
14
    Adding content to this region will enable the copyright clearance stage in request creation. The content will appear on the OPAC during the process of placing an ILL request.
15
</div>
15
</div>
16
16
17
<div id="IntranetCirculationHomeHTML_notes" class="hint customization_note"> Include this content in its own section on the circulation home page</div>
18
17
<div id="IntranetmainUserblock_notes" class="hint customization_note"> Include this content in its own section on the main page of the staff interface </div>
19
<div id="IntranetmainUserblock_notes" class="hint customization_note"> Include this content in its own section on the main page of the staff interface </div>
18
20
19
<div id="StaffReportsHome_notes" class="hint customization_note"> Include this content in its own section on the reports home page</div>
21
<div id="StaffReportsHome_notes" class="hint customization_note"> Include this content in its own section on the reports home page</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref (+6 lines)
Lines 113-118 Staff interface: Link Here
113
              type: textarea
113
              type: textarea
114
              syntax: text/html
114
              syntax: text/html
115
              class: code
115
              class: code
116
117
            - "Show the following HTML in its own div on the bottom of the home page of the reports module:"
118
            - pref: IntranetReportsHomeHTML
119
              type: textarea
120
              syntax: text/html
121
              class: code
116
        -
122
        -
117
            - pref: StaffHighlightedWords
123
            - pref: StaffHighlightedWords
118
              type: boolean
124
              type: boolean
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt (-3 / +21 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE Branches %]
3
[% USE Branches %]
4
[% USE AdditionalContents %]
4
[% PROCESS 'i18n.inc' %]
5
[% PROCESS 'i18n.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
<title
7
<title
Lines 179-187 Link Here
179
            [% END %]
180
            [% END %]
180
        </div>
181
        </div>
181
    </div>
182
    </div>
182
    <div class="row" id="intranet-circulation-home-html">
183
183
        <div class="col-md-12"> [% Koha.Preference('IntranetCirculationHomeHTML') | $raw %] </div>
184
    [% SET IntranetCirculationHomeHTML = AdditionalContents.get( location => "IntranetCirculationHomeHTML", lang => lang, library => Branches.GetLoggedInBranchcode || default_branch ) %]
184
    </div>
185
186
    [% IF ( IntranetCirculationHomeHTML.content && IntranetCirculationHomeHTML.content.count > 0 ) %]
187
        <div class="row">
188
            <div class="col-sm-12">
189
                <div id="[% IntranetCirculationHomeHTML.location | html %]" class="page-section">
190
                    [% FOREACH n IN IntranetCirculationHomeHTML.content %]
191
                        <div class="[% n.lang | html %]_item">
192
                            <div class="[% n.lang | html %]_body">[% n.content | $raw %]</div>
193
                        </div>
194
                    [% END %]
195
                </div>
196
                <!-- /#IntranetCirculationHomeHTML -->
197
            </div>
198
            <!-- /.col-sm-12 -->
199
        </div>
200
        <!-- /.row -->
201
    [% END # /IF IntranetCirculationHomeHTML %]
202
185
    <div class="row" id="offline-circulation">
203
    <div class="row" id="offline-circulation">
186
        <div class="col-md-12">
204
        <div class="col-md-12">
187
            <h4>Offline circulation</h4>
205
            <h4>Offline circulation</h4>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-2 / +1 lines)
Lines 542-548 Link Here
542
                [% END %]
542
                [% END %]
543
            [% END %]
543
            [% END %]
544
        </optgroup>
544
        </optgroup>
545
        [% SET staff_available_options = [ 'IntranetmainUserblock', 'StaffReportsHome', 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffLoginInstructions', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %]
545
        [% SET staff_available_options = [ 'IntranetCirculationHomeHTML', 'IntranetmainUserblock', 'StaffReportsHome', 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffLoginInstructions', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %]
546
        <optgroup label="Staff interface">
546
        <optgroup label="Staff interface">
547
            [% FOREACH l IN staff_available_options.sort %]
547
            [% FOREACH l IN staff_available_options.sort %]
548
                [% IF l == location %]
548
                [% IF l == location %]
549
- 

Return to bug 34563