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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt (-17 / +2 lines)
Lines 32-55 Link Here
32
                        You have never borrowed anything from this library.
32
                        You have never borrowed anything from this library.
33
                    [% ELSE %]
33
                    [% ELSE %]
34
                        <div id="opac-user-readingrec">
34
                        <div id="opac-user-readingrec">
35
                            <div class="resultscontrol resort">
36
                                <form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get">
37
                                    [% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %]
38
                                    <select name="order" id="order">
39
                                        [% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %]
40
                                        [% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %]
41
                                    </select>
42
                                    <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" />
43
                                </form>
44
                            </div>
45
35
46
                            [% IF limit %]
36
                            [% IF limit %]
47
                                <p>
37
                                <p>
48
                                    Showing last 50 items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&amp;order=title[% END %]">Show all items</a>
38
                                    Showing last 50 items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full">Show all items</a>
49
                                </p>
39
                                </p>
50
                            [% ELSE %]
40
                            [% ELSE %]
51
                                <p>
41
                                <p>
52
                                    Showing all items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50[% IF ( orderbytitle ) %]&amp;order=title[% END %]">Show last 50 items</a>
42
                                    Showing all items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50">Show last 50 items</a>
53
                                </p>
43
                                </p>
54
                            [% END %]
44
                            [% END %]
55
45
Lines 175-185 Link Here
175
//<![CDATA[
165
//<![CDATA[
176
    $(document).ready(function(){
166
    $(document).ready(function(){
177
        [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
167
        [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
178
            $('#sortsubmit').hide();
179
        $('#order').change(function() {
180
            $('#sortform').submit();
181
        });
182
183
        var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
168
        var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
184
            "sPaginationType": "four_button",
169
            "sPaginationType": "four_button",
185
            "aoColumnDefs": [
170
            "aoColumnDefs": [
(-)a/opac/opac-readingrecord.pl (-14 / +1 lines)
Lines 51-69 $template->param(%{$borr}); Link Here
51
51
52
my $itemtypes = GetItemTypes();
52
my $itemtypes = GetItemTypes();
53
53
54
# get the record
54
my $order = "date_due desc";
55
my $order = $query->param('order') || '';
56
if ( $order eq 'title' ) {
57
    $template->param( orderbytitle => 1 );
58
}
59
elsif ( $order eq 'author' ) {
60
    $template->param( orderbyauthor => 1 );
61
}
62
else {
63
    $order = "date_due desc";
64
    $template->param( orderbydate => 1 );
65
}
66
67
55
68
my $limit = $query->param('limit');
56
my $limit = $query->param('limit');
69
$limit = ( $limit eq 'full' ) ? 0 : 50;
57
$limit = ( $limit eq 'full' ) ? 0 : 50;
70
- 

Return to bug 13234