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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt (-2 / +13 lines)
Lines 6-12 Link Here
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Course reserves for [% course.course_name %]
7
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Course reserves for [% course.course_name %]
8
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
9
[% BLOCK cssinclude %][% END %]
9
[% BLOCK cssinclude %]
10
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
11
[% END %]
12
10
</head>
13
</head>
11
[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
14
[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
12
[% INCLUDE 'masthead.inc' %]
15
[% INCLUDE 'masthead.inc' %]
Lines 43-49 Link Here
43
                </div>
46
                </div>
44
47
45
                [% IF ( course_reserves ) %]
48
                [% IF ( course_reserves ) %]
46
                    <table class="table table-bordered table-striped table-condensed">
49
                    <table id="course-items-table" class="table table-bordered table-striped table-condensed">
47
                        <thead>
50
                        <thead>
48
                            <tr>
51
                            <tr>
49
                                <th>Title</th>
52
                                <th>Title</th>
Lines 86-89 Link Here
86
</div> <!-- / .main -->
89
</div> <!-- / .main -->
87
[% INCLUDE 'opac-bottom.inc' %]
90
[% INCLUDE 'opac-bottom.inc' %]
88
[% BLOCK jsinclude %]
91
[% BLOCK jsinclude %]
92
    [% INCLUDE 'datatables.inc' %]
93
    <script type="text/javascript">
94
    $(document).ready(function() {
95
        $("#course-items-table").dataTable($.extend(true, {}, dataTablesDefaults, {
96
            "sDom": '<"bottom"flp>rt<"clear">',
97
        }));
98
    });
99
    </script>
89
[% END %]
100
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt (-11 / +12 lines)
Lines 4-10 Link Here
4
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Courses
5
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Courses
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% BLOCK cssinclude %][% END %]
7
[% BLOCK cssinclude %]
8
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
9
[% END %]
10
8
</head>
11
</head>
9
[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
12
[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
10
[% INCLUDE 'masthead.inc' %]
13
[% INCLUDE 'masthead.inc' %]
Lines 20-35 Link Here
20
            <div class="span12">
23
            <div class="span12">
21
24
22
                    <h1>Courses</h1>
25
                    <h1>Courses</h1>
23
                    <div id="search-toolbar">
24
                        <form action="/cgi-bin/koha/opac-course-reserves.pl" method="get" id="search_courses_form" class="form-inline">
25
26
                               <fieldset><div class="input-append">
27
                                                                   <label for="search_on">Search courses:</label> <input type="text" name="search_on" id="search_on" />
28
                                                                  <input type="submit" class="btn" value="Search" />
29
                                                              </div></fieldset>
30
31
                        </form>
32
                    </div><!-- /search-toolbar -->
33
26
34
                    <table id="course_reserves_table" class="table table-bordered table-striped table-condensed">
27
                    <table id="course_reserves_table" class="table table-bordered table-striped table-condensed">
35
                        <thead>
28
                        <thead>
Lines 67-70 Link Here
67
</div> <!-- / .main -->
60
</div> <!-- / .main -->
68
[% INCLUDE 'opac-bottom.inc' %]
61
[% INCLUDE 'opac-bottom.inc' %]
69
[% BLOCK jsinclude %]
62
[% BLOCK jsinclude %]
63
    [% INCLUDE 'datatables.inc' %]
64
    <script type="text/javascript">
65
    $(document).ready(function() {
66
        $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
67
            "sDom": '<"bottom"flp>rt<"clear">',
68
        }));
69
    });
70
    </script>
70
[% END %]
71
[% END %]
(-)a/opac/opac-course-reserves.pl (-10 / +3 lines)
Lines 38-50 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
38
    }
38
    }
39
);
39
);
40
40
41
my $search_on = $cgi->param('search_on');
41
my $courses = SearchCourses( enabled => 'yes' );
42
42
43
my $courses = SearchCourses( term => $search_on, enabled => 'yes' );
43
$template->param( courses => $courses );
44
44
output_html_with_http_headers $cgi, $cookie, $template->output;
45
if ( @$courses == 1 ) {
46
    print $cgi->redirect( "/cgi-bin/koha/opac-course-details.pl?course_id=" . $courses->[0]->{'course_id'} );
47
} else {
48
    $template->param( courses => $courses );
49
    output_html_with_http_headers $cgi, $cookie, $template->output;
50
}
51
- 

Return to bug 10632