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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (+3 lines)
Lines 52-57 Link Here
52
                    [% IF ( Koha.Preference('UseCourseReserves') ) %]
52
                    [% IF ( Koha.Preference('UseCourseReserves') ) %]
53
                        <li><a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a></li>
53
                        <li><a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a></li>
54
                    [% END %]
54
                    [% END %]
55
                    [% IF Koha.Preference('PreservationModule') && CAN_user_preservation %]
56
                        <li><a href="/cgi-bin/koha/preservation/home.pl">Preservation</a></li>
57
                    [% END %]
55
                    [% IF ( CAN_user_reports ) %]
58
                    [% IF ( CAN_user_reports ) %]
56
                        <li><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></li>
59
                        <li><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></li>
57
                    [% END %]
60
                    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+3 lines)
Lines 84-89 Link Here
84
    [%- CASE 'loggedinlibrary' -%]
84
    [%- CASE 'loggedinlibrary' -%]
85
        <span class="main_permission loggedinlibrary_permission">Allow staff to change logged in library</span>
85
        <span class="main_permission loggedinlibrary_permission">Allow staff to change logged in library</span>
86
        <span class="permissioncode">([% name | html %])</span>
86
        <span class="permissioncode">([% name | html %])</span>
87
    [%- CASE 'preservation' -%]
88
        <span class="main_permission preservation_permission">Manage the preservation module</span>
89
        <span class="permissioncode">([% name | html %])</span>
87
    [%- END -%]
90
    [%- END -%]
88
[%- END -%]
91
[%- END -%]
89
92
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc (+10 lines)
Lines 139-144 Link Here
139
        [% END %]
139
        [% END %]
140
        </li>
140
        </li>
141
141
142
        [% IF ( preservation ) %]
143
            <li class="active">
144
                <a title="Preservation" href="/cgi-bin/koha/admin/preferences.pl?tab=preservation">Preservation</a>
145
                [% PROCESS subtabs  %]
146
        [% ELSE %]
147
            <li>
148
                <a title="Preservation" href="/cgi-bin/koha/admin/preferences.pl?tab=preservation">Preservation</a>
149
        [% END %]
150
        </li>
151
142
        [% IF ( searching ) %]
152
        [% IF ( searching ) %]
143
            <li class="active">
153
            <li class="active">
144
                <a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a>
154
                <a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/preservation-menu.inc (+11 lines)
Line 0 Link Here
1
[% USE Koha %]
2
<div id="navmenu">
3
    <div id="navmenulist">
4
        <h5>Preservation</h5>
5
        <ul>
6
            <li><a href="/cgi-bin/koha/preservation/home.pl">Preservation home</a></li>
7
            <li><a href="/cgi-bin/koha/preservation/waiting-list.pl">Waiting list</a></li>
8
            <li><a href="/cgi-bin/koha/preservation/trains.pl">Trains</a></li>
9
        </ul>
10
    </div>
11
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/preservation-search.inc (+22 lines)
Line 0 Link Here
1
<!-- Begin Preservation Resident Search Box -->
2
3
<div id="header_search">
4
    <div id="preservation_search" class="residentsearch">
5
        <form name="find_stuff" action="/cgi-bin/koha/preservation/home.pl" method="post">
6
            <span class="form-title">
7
                <label class="control-label">Preservation search</label>
8
            </span>
9
10
            <span class="form-content">
11
                <input type="text" name="supplier" id="preservation_search_input" class="head-searchbox form-control" placeholder="Search preservation" />
12
            </span>
13
            <button type="submit"><i class="fa fa-arrow-right"></i></button>
14
        </form>
15
    </div>
16
17
    <ul>
18
        <li><a title="Preservation search" href="#preservation_search"><i class="fa fa-upload"></i> <span class="tab-title">Preservation search</span></a></li>
19
    </ul>
20
</div><!-- /header_search -->
21
22
<!-- End Main page Resident Search Box -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/preservation-toolbar.inc (+6 lines)
Line 0 Link Here
1
[% INCLUDE 'blocking_errors.inc' %]
2
<!-- preservation-toolbar.inc -->
3
<div id="toolbar" class="btn-toolbar">
4
    <div class="btn-group"><a class="btn btn-default" href="/cgi-bin/koha/preservation/trains.pl?op=add_form"><i class="fa fa-plus"></i> New train</a></div>
5
</div>
6
<!-- / preservation-toolbar.inc -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/preservation.pref (+16 lines)
Line 0 Link Here
1
Preservation:
2
    Interface:
3
        -
4
            - pref: PreservationModule
5
              choices:
6
                  1: Enable
7
                  0: Disable
8
            - the preservation module
9
        -
10
            - Use the <a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=NOT_LOAN">NOT_LOAN</a> authorized value
11
            - pref: PreservationNotForLoanWaitingListIn
12
            - to apply to items added to the waiting list
13
        -
14
            - Use the <a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=NOT_LOAN">NOT_LOAN</a> authorized value
15
            - pref: PreservationNotForLoanDefaultTrainIn
16
            - to apply to items added to a train
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (+6 lines)
Lines 150-155 Link Here
150
                            </li>
150
                            </li>
151
                            [% END %]
151
                            [% END %]
152
152
153
                            [% IF Koha.Preference('PreservationModule') && CAN_user_preservation%]
154
                            <li>
155
                                <a class="icon_general icon_preservation" href="/cgi-bin/koha/preservation/home.pl"><i class="fa fa-fw fa-book"></i>Preservation</a>
156
                            </li>
157
                            [% END %]
158
153
159
154
                            [% IF ( CAN_user_tools || CAN_user_clubs ) %]
160
                            [% IF ( CAN_user_tools || CAN_user_clubs ) %]
155
                            <li>
161
                            <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt (+42 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE To %]
3
[% USE Asset %]
4
[% USE KohaDates %]
5
[% USE TablesSettings %]
6
[% USE AuthorisedValues %]
7
[% SET footerjs = 1 %]
8
[% PROCESS 'i18n.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
<title>
11
    Preservation &rsaquo; Koha
12
</title>
13
[% INCLUDE 'doc-head-close.inc' %]
14
</head>
15
16
<body id="preservation_home" class="preservation">
17
[% WRAPPER 'header.inc' %]
18
    [% INCLUDE 'preservation-search.inc' %]
19
[% END %]
20
21
<div id="preservation"> <!-- this is closed in intranet-bottom.inc -->
22
23
[% MACRO jsinclude BLOCK %]
24
    [% INCLUDE 'calendar.inc' %]
25
    [% INCLUDE 'datatables.inc' %]
26
    [% INCLUDE 'columns_settings.inc' %]
27
    [% INCLUDE 'js-patron-format.inc' %]
28
    [% INCLUDE 'js-date-format.inc' %]
29
    [% INCLUDE 'js-biblio-format.inc' %]
30
31
    <script>
32
33
        const authorised_value_categories = [% To.json(AuthorisedValues.GetCategories()) | $raw %].map(c => c.category);
34
        const db_columns = [% To.json(db_columns) | $raw %];
35
        const api_mappings = [% To.json(api_mappings) | $raw %];
36
37
    </script>
38
39
    [% Asset.js("js/vue/dist/preservation.js") | $raw %]
40
41
[% END %]
42
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/preservation/home.pl (-1 / +52 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# Koha is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
18
use Modern::Perl;
19
20
use CGI qw ( -utf8 );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_html_with_http_headers );
23
24
use Koha::Database::Columns;
25
26
my $query = CGI->new;
27
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
28
    {
29
        template_name => 'preservation/home.tt',
30
        query         => $query,
31
        type          => 'intranet',
32
        flagsrequired => { preservation => '*' },
33
    }
34
);
35
36
my $columns = Koha::Database::Columns::columns;
37
$template->param(
38
    db_columns => {
39
        map {
40
            my $table = $_;
41
            map { ( $table . '.' . $_ => $columns->{$table}->{$_} ) }
42
              keys %{ $columns->{$table} }
43
        } qw( biblio biblioitems items )
44
    },
45
    api_mappings => {
46
        items => Koha::Item->to_api_mapping,
47
        biblioitems => Koha::Biblioitem->to_api_mapping,
48
        biblio => Koha::Biblio->to_api_mapping,
49
    },
50
);
51
52
output_html_with_http_headers $query, $cookie, $template->output;

Return to bug 30708