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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-3 / +3 lines)
Lines 390-395 Link Here
390
                    <li class="nav-item">
390
                    <li class="nav-item">
391
                        <a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a>
391
                        <a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a>
392
                    </li>
392
                    </li>
393
                    <li class="nav-item">
394
                        <a href="/cgi-bin/koha/opac-thesis-tables.pl">Research tables</a>
395
                    </li>
393
                [% END %]
396
                [% END %]
394
                [% IF Koha.Preference( 'OpacBrowser' ) == 1 %]
397
                [% IF Koha.Preference( 'OpacBrowser' ) == 1 %]
395
                    <li class="nav-item">
398
                    <li class="nav-item">
Lines 431-439 Link Here
431
                        <li class="nav-item">
434
                        <li class="nav-item">
432
                            <a href="/cgi-bin/koha/opac-suggestions.pl?suggested_by_anyone=1">Purchase suggestions</a>
435
                            <a href="/cgi-bin/koha/opac-suggestions.pl?suggested_by_anyone=1">Purchase suggestions</a>
433
                        </li>
436
                        </li>
434
                        <li class="nav-item">
435
                            <a href="/cgi-bin/koha/opac-thesis-tables.pl">Research tables</a>
436
                        </li>
437
                    [% END %]
437
                    [% END %]
438
                [% END %]
438
                [% END %]
439
                [% IF ( Koha.Preference('OPACShowLibraries') && AllPublicBranches.size > 0 ) %]
439
                [% IF ( Koha.Preference('OPACShowLibraries') && AllPublicBranches.size > 0 ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-thesis-table-details.tt (-16 / +24 lines)
Lines 7-13 Link Here
7
[% USE Branches %]
7
[% USE Branches %]
8
[% USE TablesSettings %]
8
[% USE TablesSettings %]
9
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Reserves for [% course.course_name | html %][%- IF course.section -%] - [% course.section | html %][%- END -%]</title>
10
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Reserves for [% course.course_name | html %][%- IF course.section -%]- [% course.section | html %][%- END -%]</title>
11
[% INCLUDE 'doc-head-close.inc' %]
11
[% INCLUDE 'doc-head-close.inc' %]
12
[% BLOCK cssinclude %]
12
[% BLOCK cssinclude %]
13
    [% Asset.css("css/datatables.css") | $raw %]
13
    [% Asset.css("css/datatables.css") | $raw %]
Lines 24-34 Link Here
24
                <a href="/cgi-bin/koha/opac-main.pl">Home</a>
24
                <a href="/cgi-bin/koha/opac-main.pl">Home</a>
25
            </li>
25
            </li>
26
            <li class="breadcrumb-item">
26
            <li class="breadcrumb-item">
27
                <a href="/cgi-bin/koha/opac-thesis-tables.pl">Research tables</a>
27
                <a href="/cgi-bin/koha/opac-thesis-tables.pl">[% course_type_display | html %]</a>
28
            </li>
29
            <li class="breadcrumb-item" aria-current="page">
30
                Reserves for &nbsp;<em>[% course.course_name | html %][%- IF course.section -%] - [% course.section | html %][%- END -%]</em>
31
            </li>
28
            </li>
29
            <li class="breadcrumb-item" aria-current="page"> Reserves for &nbsp;<em>[% course.course_name | html %][%- IF course.section -%]- [% course.section | html %][%- END -%]</em> </li>
32
        </ul>
30
        </ul>
33
    </nav>
31
    </nav>
34
32
Lines 36-47 Link Here
36
        <div class="row">
34
        <div class="row">
37
            <div class="col">
35
            <div class="col">
38
                <div id="thesis_tables" class="maincontent">
36
                <div id="thesis_tables" class="maincontent">
39
37
                    <h2>Reserves for <em>[% course.course_name | html %][%- IF course.section -%]- [% course.section | html %][%- END -%]</em></h2>
40
                    <h2>Reserves for <em>[% course.course_name | html %][%- IF course.section -%] - [% course.section | html %][%- END -%]</em></h2>
41
                    <div class="rows">
38
                    <div class="rows">
42
                        <ol>
39
                        <ol>
43
                            [% IF ( course.instructors ) %]
40
                            [% IF ( course.instructors ) %]
44
                                <li><span class="label">Researcher:</span>
41
                                <li
42
                                    ><span class="label">Researcher:</span>
45
                                    <ul>
43
                                    <ul>
46
                                        [% FOREACH i IN course.instructors %]
44
                                        [% FOREACH i IN course.instructors %]
47
                                            <li><div class="instructor">[% i.firstname | html %] [% i.surname | html %]</div></li>
45
                                            <li><div class="instructor">[% i.firstname | html %] [% i.surname | html %]</div></li>
Lines 77-95 Link Here
77
                                        <td><a href="opac-detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title-head.inc' biblio=cr.biblio %]</a></td>
75
                                        <td><a href="opac-detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title-head.inc' biblio=cr.biblio %]</a></td>
78
                                        <td>[% cr.biblio.author | html %]</td>
76
                                        <td>[% cr.biblio.author | html %]</td>
79
                                        <td>[% ItemTypes.GetDescription( cr.item.itype ) | html %]</td>
77
                                        <td>[% ItemTypes.GetDescription( cr.item.itype ) | html %]</td>
80
                                        <td>[% Branches.GetName( cr.item.holdingbranch ) | html %] <br/> <em>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => cr.item.location, opac => 1 ) | html %]</em></td>
78
                                        <td
79
                                            >[% Branches.GetName( cr.item.holdingbranch ) | html %] <br />
80
                                            <em>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => cr.item.location, opac => 1 ) | html %]</em></td
81
                                        >
81
                                        <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode, opac => 1 ) | html %]</td>
82
                                        <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode, opac => 1 ) | html %]</td>
82
                                        <td>[% cr.item.itemcallnumber | html %]</td>
83
                                        <td>[% cr.item.itemcallnumber | html %]</td>
83
                                        <td>[% cr.item.copynumber | html %]</td>
84
                                        <td>[% cr.item.copynumber | html %]</td>
84
                                        <td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
85
                                        <td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
85
                                        <td><span title="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates  as_due_date => 1 %]</span></td>
86
                                        <td><span title="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates  as_due_date => 1 %]</span></td>
86
                                        <td>[% IF ( cr.public_note ) %]
87
                                        <td
88
                                            >[% IF ( cr.public_note ) %]
87
                                                [% cr.public_note | $raw %]
89
                                                [% cr.public_note | $raw %]
88
                                            [% ELSIF ( cr.item.itemnotes ) %]
90
                                            [% ELSIF ( cr.item.itemnotes ) %]
89
                                                [% cr.item.itemnotes | $raw %]
91
                                                [% cr.item.itemnotes | $raw %]
90
                                            [% END %]
92
                                            [% END %]
91
                                        </td>
93
                                        </td>
92
                                        <td>[% IF (cr.item.uri) %]
94
                                        <td
95
                                            >[% IF (cr.item.uri) %]
93
                                                <a href="[% cr.item.uri | url %]">Item URI</a>
96
                                                <a href="[% cr.item.uri | url %]">Item URI</a>
94
                                            [% ELSIF (cr.biblioitem.url) %]
97
                                            [% ELSIF (cr.biblioitem.url) %]
95
                                                <a href="[% cr.biblioitem.url | url %]">Record URL</a>
98
                                                <a href="[% cr.biblioitem.url | url %]">Record URL</a>
Lines 105-115 Link Here
105
                            <p>No reserves have been selected for this research table.</p>
108
                            <p>No reserves have been selected for this research table.</p>
106
                        </div>
109
                        </div>
107
                    [% END %]
110
                    [% END %]
108
                </div> <!-- / #course_reserves -->
111
                </div>
109
            </div> <!-- / .col -->
112
                <!-- / #course_reserves -->
110
        </div> <!-- / .row -->
113
            </div>
111
    </div> <!-- / .container-fluid -->
114
            <!-- / .col -->
112
</div> <!-- / .main -->
115
        </div>
116
        <!-- / .row -->
117
    </div>
118
    <!-- / .container-fluid -->
119
</div>
120
<!-- / .main -->
113
[% INCLUDE 'opac-bottom.inc' %]
121
[% INCLUDE 'opac-bottom.inc' %]
114
[% BLOCK jsinclude %]
122
[% BLOCK jsinclude %]
115
    [% INCLUDE 'datatables.inc' %]
123
    [% INCLUDE 'datatables.inc' %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-thesis-tables.tt (-12 / +20 lines)
Lines 5-11 Link Here
5
[% USE TablesSettings %]
5
[% USE TablesSettings %]
6
6
7
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Research tables</title>
8
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; [% course_type_display | html %]</title>
9
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'doc-head-close.inc' %]
10
[% BLOCK cssinclude %]
10
[% BLOCK cssinclude %]
11
    [% Asset.css("css/datatables.css") | $raw %]
11
    [% Asset.css("css/datatables.css") | $raw %]
Lines 22-28 Link Here
22
                <a href="/cgi-bin/koha/opac-main.pl">Home</a>
22
                <a href="/cgi-bin/koha/opac-main.pl">Home</a>
23
            </li>
23
            </li>
24
            <li class="breadcrumb-item" aria-current="page">
24
            <li class="breadcrumb-item" aria-current="page">
25
                <a href="#">Research tables</a>
25
                <a href="#">[% course_type_display | html %]</a>
26
            </li>
26
            </li>
27
        </ul>
27
        </ul>
28
    </nav>
28
    </nav>
Lines 31-37 Link Here
31
        <div class="row">
31
        <div class="row">
32
            <div class="col order-first order-md-first order-lg-2">
32
            <div class="col order-first order-md-first order-lg-2">
33
                <div id="courses" class="maincontent">
33
                <div id="courses" class="maincontent">
34
                    <h1>Research tables</h1>
34
                    <h1>[% course_type_display | html %]</h1>
35
35
36
                    <table id="thesis_tables_table" class="table table-bordered table-striped table-condensed">
36
                    <table id="thesis_tables_table" class="table table-bordered table-striped table-condensed">
37
                        <thead>
37
                        <thead>
Lines 46-67 Link Here
46
                        <tbody>
46
                        <tbody>
47
                            [% FOREACH c IN courses %]
47
                            [% FOREACH c IN courses %]
48
                                <tr>
48
                                <tr>
49
                                    <td><a href="opac-thesis-table-details.pl?table_id=[% c.course_id | uri %]">[% c.course_name | html %][%- IF c.section -%] - [% c.section | html %][%- END -%]</a></td>
49
                                    <td><a href="opac-thesis-table-details.pl?table_id=[% c.course_id | uri %]">[% c.course_name | html %][%- IF c.section -%]- [% c.section | html %][%- END -%]</a></td>
50
                                    <td>[% c.course_number | html %]</td>
50
                                    <td>[% c.course_number | html %]</td>
51
                                    <td>
51
                                    <td>
52
                                      [% FOREACH i IN c.instructors %]
52
                                        [% FOREACH i IN c.instructors %]
53
                                          <div class="instructor"><span class="inst_surname">[% i.surname | html %]</span>[% IF i.firstname %]<span class="instr_separator">, </span><span class="instr_firstname">[% i.firstname | html %]</span>[% END %]</div>
53
                                            <div class="instructor"
54
                                      [% END %]
54
                                                ><span class="inst_surname">[% i.surname | html %]</span>[% IF i.firstname %]<span class="instr_separator">, </span><span class="instr_firstname">[% i.firstname | html %]</span>[% END %]</div
55
                                            >
56
                                        [% END %]
55
                                    </td>
57
                                    </td>
56
                                    <td>[% c.public_note | $raw %]</td>
58
                                    <td>[% c.public_note | $raw %]</td>
59
                                </tr>
57
                            [% END %]
60
                            [% END %]
58
                        </tbody>
61
                        </tbody>
59
                    </table>
62
                    </table>
60
                </div> <!-- / #courses -->
63
                </div>
61
            </div> <!-- / .col -->
64
                <!-- / #courses -->
62
        </div> <!-- / .row -->
65
            </div>
63
    </div> <!-- / .container-fluid -->
66
            <!-- / .col -->
64
</div> <!-- / .main -->
67
        </div>
68
        <!-- / .row -->
69
    </div>
70
    <!-- / .container-fluid -->
71
</div>
72
<!-- / .main -->
65
[% INCLUDE 'opac-bottom.inc' %]
73
[% INCLUDE 'opac-bottom.inc' %]
66
[% BLOCK jsinclude %]
74
[% BLOCK jsinclude %]
67
    [% INCLUDE 'datatables.inc' %]
75
    [% INCLUDE 'datatables.inc' %]
(-)a/opac/opac-thesis-table-details.pl (-2 / +11 lines)
Lines 24-29 use CGI qw ( -utf8 ); Link Here
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
27
use C4::Koha;
28
use C4::Koha;
28
29
29
use C4::CourseReserves qw(GetCourse GetCourseReserves);
30
use C4::CourseReserves qw(GetCourse GetCourseReserves);
Lines 47-55 die("No table_id given") unless ($table_id); Link Here
47
my $course          = GetCourse($table_id);
48
my $course          = GetCourse($table_id);
48
my $course_reserves = GetCourseReserves( course_id => $table_id, include_items => 1, include_count => 1 );
49
my $course_reserves = GetCourseReserves( course_id => $table_id, include_items => 1, include_count => 1 );
49
50
51
# Get the display text for this course type from authorized values
52
my $dbh         = C4::Context->dbh;
53
my $course_type = $course->{course_type} || 'RESEARCH_TABLE';
54
my $sth = $dbh->prepare("SELECT lib_opac FROM authorised_values WHERE category='CR_TYPE' AND authorised_value=?");
55
$sth->execute($course_type);
56
my $display_name = $sth->fetchrow_array() || 'Research table';
57
50
$template->param(
58
$template->param(
51
    course          => $course,
59
    course              => $course,
52
    course_reserves => $course_reserves,
60
    course_reserves     => $course_reserves,
61
    course_type_display => $display_name,
53
);
62
);
54
63
55
output_html_with_http_headers $cgi, $cookie, $template->output;
64
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/opac/opac-thesis-tables.pl (-4 / +13 lines)
Lines 39-45 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
39
    }
39
    }
40
);
40
);
41
41
42
my $courses = SearchCourses( enabled => 'yes', thesis_table => 'yes' );
42
my $courses = SearchCourses( enabled => 'yes', course_type => 'RESEARCH_TABLE' );
43
43
44
$template->param( courses => $courses );
44
# Get the display text for this course type from authorized values
45
my $dbh = C4::Context->dbh;
46
my $sth = $dbh->prepare(
47
    "SELECT lib_opac FROM authorised_values WHERE category='CR_TYPE' AND authorised_value='RESEARCH_TABLE'");
48
$sth->execute();
49
my $display_name = $sth->fetchrow_array() || 'Research tables';
50
51
$template->param(
52
    courses             => $courses,
53
    course_type_display => $display_name,
54
);
45
output_html_with_http_headers $cgi, $cookie, $template->output;
55
output_html_with_http_headers $cgi, $cookie, $template->output;
46
- 

Return to bug 35972