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

(-)a/important-question.pl (+44 lines)
Line 0 Link Here
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
use CGI        qw ( -utf8 );
20
use C4::Output qw( output_html_with_http_headers );
21
use C4::Auth   qw( get_template_and_user );
22
use C4::Koha;
23
24
my $query = CGI->new;
25
26
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
27
    {
28
        template_name => "important-question.tt",
29
        query         => $query,
30
        type          => "intranet",
31
        flagsrequired => { catalogue => 1, },
32
    }
33
);
34
35
my $logged_in_user    = Koha::Patrons->find($loggedinuser);
36
my $is_superlibrarian = $logged_in_user->is_superlibrarian;
37
my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime(time);
38
39
$template->param(
40
    is_superlibrarian => $is_superlibrarian,
41
    hour              => $hour,
42
);
43
44
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/important-question.tt (+48 lines)
Line 0 Link Here
1
[% USE Koha %]
2
[% PROCESS 'i18n.inc' %]
3
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title
6
    >[% FILTER collapse %]
7
        [% t("Koha staff interface") | html %]
8
    [% END %]</title
9
>
10
[% Asset.css("css/mainpage.css") | $raw %]
11
[% INCLUDE 'doc-head-close.inc' %]
12
</head>
13
14
<body id="main_intranet-main" class="intranet-main">
15
[% WRAPPER 'header.inc' %]
16
    [% INCLUDE 'home-search.inc' %]
17
[% END %]
18
19
[% WRAPPER 'sub-header.inc' %]
20
    [% WRAPPER breadcrumbs %]
21
    [% END #/ WRAPPER breadcrumbs %]
22
[% END %]
23
24
<div id="container-main" class="container-fluid">
25
    <div class="row">
26
        <div class="col-md-3"></div>
27
        <div class="col-md-9">
28
            <h1>According to our AI Assistant... You should</h1>
29
            [% IF is_superlibrarian %]
30
                <p
31
                    >Consider augmenting the amount of contracts you have with your technical support partner
32
                    <i id="info_added" data-bs-toggle="tooltip" title="This answer is AI" data-bs-placement="right" class="fa fa-info-circle"></i>
33
                </p>
34
            [% ELSIF hour < 17 %]
35
                <p
36
                    >Fake working as a librarian while thinking about how to end capitalism
37
                    <i id="info_added" data-bs-toggle="tooltip" title="This answer is AI" data-bs-placement="right" class="fa fa-info-circle"></i>
38
                </p>
39
            [% ELSE %]
40
                <p
41
                    >Have a drink somewhere in Marseille, ask @fsomers for more documentation on the process
42
                    <i id="info_added" data-bs-toggle="tooltip" title="This answer is AI" data-bs-placement="right" class="fa fa-info-circle"></i>
43
                </p>
44
            [% END %]
45
        </div>
46
    </div>
47
</div>
48
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-1 / +5 lines)
Lines 59-64 Link Here
59
        <!-- /.col-sm-2 -->
59
        <!-- /.col-sm-2 -->
60
        <div class="col-md-9 order-md-2">
60
        <div class="col-md-9 order-md-2">
61
            <div class="row">
61
            <div class="row">
62
                <ul class="biglinks-list">
63
                    <li>
64
                        <a class="icon_general icon_circulation" href="/cgi-bin/koha/important-question.pl"><i class="fa fa-fw fa-robot"></i>What should I do ? (Powered by AI) </a>
65
                    </li>
66
                </ul>
62
                <div class="col-sm-6">
67
                <div class="col-sm-6">
63
                    <ul class="biglinks-list">
68
                    <ul class="biglinks-list">
64
                        [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
69
                        [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
65
- 

Return to bug 39506