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

(-)a/catalogue/detail.pl (+12 lines)
Lines 239-244 if ( C4::Context->preference('AcquisitionDetails') ) { Link Here
239
    );
239
    );
240
}
240
}
241
241
242
if ( C4::Context->preference('suggestion') ) {
243
    my $suggestions = Koha::Suggestions->search(
244
        {
245
            biblionumber => $biblionumber,
246
        },
247
        {
248
            order_by => { -desc => 'suggesteddate' }
249
        }
250
    );
251
    $template->param( suggestions => $suggestions );
252
}
253
242
if ( defined $dat->{'itemtype'} ) {
254
if ( defined $dat->{'itemtype'} ) {
243
    $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} );
255
    $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} );
244
}
256
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +79 lines)
Lines 185-190 Link Here
185
[% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions</a></li>[% END %]
185
[% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions</a></li>[% END %]
186
[% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
186
[% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
187
[% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %]
187
[% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %]
188
[% IF suggestions.count %]<li><a href="#suggestion_details">Suggestion details</a></li>[% END %]
188
[% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %]
189
[% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %]
189
[% IF ( LocalCoverImages ) %]
190
[% IF ( LocalCoverImages ) %]
190
    [% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]
191
    [% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]
Lines 666-671 Link Here
666
</div>
667
</div>
667
[% END %]
668
[% END %]
668
669
670
[% IF suggestions.count %]
671
    <div id="suggestion_details">
672
        <table id="suggestions" class="sorted">
673
            <thead>
674
                <tr>
675
                    <th class="NoSort">&nbsp;</th>
676
                    <th class="anti-the">Suggestion</th>
677
                    <th>Suggested by - on</th>
678
                    <th>Managed by - on</th>
679
                    <th>Last modification by - on</th>
680
                    <th>Library</th>
681
                    <th>Fund</th>
682
                    <th>Status</th>
683
                </tr>
684
            </thead>
685
            <tbody>
686
            [% FOREACH suggestion IN suggestions %]
687
                <tr>
688
                    <td>[% suggestion.suggestionid | html %]</td>
689
                    <td>
690
                        <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&amp;op=show" title="suggestion" >
691
                            [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a>
692
                        <br />
693
                        [% IF ( suggestion.copyrightdate ) %]&copy; [% suggestion.copyrightdate | html %] [% END %]
694
                        [% IF ( suggestion.volumedesc ) %]; Volume:<i>[% suggestion.volumedesc | html %]</i> [% END %]
695
                        [% IF ( suggestion.isbn ) %]; ISBN:<i>[% suggestion.isbn | html %]</i> [% END %][% IF ( suggestion.publishercode ) %]; Published by [% suggestion.publishercode | html %] [% END %][% IF ( suggestion.publicationyear ) %] in <i>[% suggestion.publicationyear | html %]</i> [% END %][% IF ( suggestion.place ) %] in <i>[% suggestion.place | html %]</i> [% END %][% IF ( suggestion.collectiontitle ) %]; [% suggestion.collectiontitle | html %] [% END %][% IF ( suggestion.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestion.itemtype, 0 ) | html %] [% END %]<br />[% IF ( suggestion.note ) %]<div class="note"><i class="fa fa-comment"></i> [% suggestion.note | html %]</div>[% END %]
696
                        [% IF suggestion.archived %]<br /><i class="fa fa-archive"> Archived[% END %]
697
                    </td>
698
                    <td>
699
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a>
700
                        [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %]
701
                    </td>
702
                    <td>
703
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a>
704
                        [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %]
705
                    </td>
706
                    <td>
707
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a>
708
                        [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %]
709
                    </td>
710
                    <td>
711
                        [% Branches.GetName( suggestion.branchcode ) | html %]
712
                    </td>
713
                    <td>
714
                        [% suggestion.fund.budget_name | html %]
715
                    </td>
716
                    <td>
717
                        [% IF    suggestion.STATUS == 'ASKED'     %]Pending
718
                        [% ELSIF suggestion.STATUS == 'ACCEPTED'  %]Accepted
719
                        [% ELSIF suggestion.STATUS == 'ORDERED'   %]Ordered
720
                        [% ELSIF suggestion.STATUS == 'REJECTED'  %]Rejected
721
                        [% ELSIF suggestion.STATUS == 'CHECKED'   %]Checked
722
                        [% ELSIF suggestion.STATUS == 'AVAILABLE' %]Available
723
                        [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %]
724
                            [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %]
725
                        [% ELSE %]Status unknown
726
                        [% END %]
727
                        [% IF suggestion.reason %]
728
                            <br />([% suggestion.reason | html %])
729
                        [% END %]
730
                    </td>
731
                </tr>
732
                [% END %]
733
            </tbody>
734
        </table>
735
    </div>
736
[% END %]
737
669
[% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
738
[% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
670
<div id="editions"><h4>Editions</h4>
739
<div id="editions"><h4>Editions</h4>
671
<table>
740
<table>
Lines 1035-1040 Link Here
1035
                    ]
1104
                    ]
1036
                }, columns_settings);
1105
                }, columns_settings);
1037
            [% END %]
1106
            [% END %]
1107
1108
            [% IF suggestions.count %]
1109
                $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
1110
                    "aoColumnDefs": [
1111
                        { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
1112
                        { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
1113
                    ],
1114
                    "sPaginationType": "full"
1115
                }));
1116
            [% END %]
1038
        });
1117
        });
1039
    </script>
1118
    </script>
1040
[% END %]
1119
[% END %]
1041
- 

Return to bug 23591