Lines 51-57
Link Here
|
51 |
[% END %] |
51 |
[% END %] |
52 |
|
52 |
|
53 |
<body id="catalog_detail" class="catalog"> |
53 |
<body id="catalog_detail" class="catalog"> |
54 |
|
|
|
55 |
[% WRAPPER 'header.inc' %] |
54 |
[% WRAPPER 'header.inc' %] |
56 |
[% INCLUDE 'cat-search.inc' %] |
55 |
[% INCLUDE 'cat-search.inc' %] |
57 |
[% END %] |
56 |
[% END %] |
Lines 384-389
Link Here
|
384 |
[% END %] |
383 |
[% END %] |
385 |
[% END %] |
384 |
[% END %] |
386 |
|
385 |
|
|
|
386 |
[% IF ( reviews ) %] |
387 |
[% WRAPPER tab_item tabname= "comments" %] |
388 |
<span>Comments [% ' ( ' _ ( reviews.size ) _ ' )' | html %]</span> |
389 |
[% END %] |
390 |
[% END %] |
391 |
|
387 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] |
392 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] |
388 |
[% WRAPPER tab_item tabname= "NovelistSelect" %] |
393 |
[% WRAPPER tab_item tabname= "NovelistSelect" %] |
389 |
<span>NoveList Select</span> |
394 |
<span>NoveList Select</span> |
Lines 840-845
Link Here
|
840 |
[% END # /tab_panel %] |
845 |
[% END # /tab_panel %] |
841 |
[% END # /IF HTML5MediaEnabled %] |
846 |
[% END # /IF HTML5MediaEnabled %] |
842 |
|
847 |
|
|
|
848 |
[% IF ( reviews ) %] |
849 |
[% WRAPPER tab_panel tabname="comments" %] |
850 |
[% SET ShowReviewerPhoto = Koha.Preference( "ShowReviewerPhoto" ) %] |
851 |
<table id="comments_table"> |
852 |
<thead> |
853 |
<tr> |
854 |
<th>Commenter</th> |
855 |
<th>Date</th> |
856 |
<th>Status</th> |
857 |
<th>Comment</th> |
858 |
<th class="NoSort">Actions</th> |
859 |
</tr> |
860 |
</thead> |
861 |
<tbody> |
862 |
[% FOREACH review IN reviews %] |
863 |
<tr id="comment[% review.reviewid | html %]"> |
864 |
<td> |
865 |
[% IF ( review.patron ) %] |
866 |
[% IF ( review.avatarurl ) %] |
867 |
<img class="avatar" src="[% review.avatarurl | html %]" height="80" width="80" alt="" /> |
868 |
[% END %] |
869 |
[% INCLUDE 'patron-title.inc' patron=review.patron hide_patron_infos_if_needed=1 %] |
870 |
[% ELSE %] |
871 |
<em>Patron deleted<em> |
872 |
[% END %] |
873 |
</td> |
874 |
<td data-order="[% review.datereviewed | html %]"> |
875 |
[% review.datereviewed | $KohaDates %] |
876 |
</td> |
877 |
<td> |
878 |
[% IF ( review.approved ) %] |
879 |
<em>Approved</em> |
880 |
[% ELSE %] |
881 |
<em>Unapproved</em> |
882 |
[% END %] |
883 |
</td> |
884 |
<td> |
885 |
[% FILTER html_break %] |
886 |
[% review.review | html %] |
887 |
[% END %] |
888 |
</td> |
889 |
[% IF ( CAN_user_tools_moderate_comments ) %] |
890 |
<td class="actions"> |
891 |
[% IF ( review.approved ) %] |
892 |
<form action="/cgi-bin/koha/reviews/reviewswaiting.pl" method="post"> |
893 |
[% INCLUDE 'csrf-token.inc' %] |
894 |
<input type="hidden" name="op" value="cud-unapprove" /> |
895 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
896 |
<input type="hidden" name="reviewid" value="[% review.reviewid | html %]" /> |
897 |
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-times" aria-hidden="true"></i> Unapprove</button> |
898 |
</form> |
899 |
[% ELSE %] |
900 |
<form action="/cgi-bin/koha/reviews/reviewswaiting.pl" method="post"> |
901 |
[% INCLUDE 'csrf-token.inc' %] |
902 |
<input type="hidden" name="op" value="cud-approve" /> |
903 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
904 |
<input type="hidden" name="reviewid" value="[% review.reviewid | html %]" /> |
905 |
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-check" aria-hidden="true"></i> Approve</button> |
906 |
</form> |
907 |
[% END %] |
908 |
<form action="/cgi-bin/koha/reviews/reviewswaiting.pl" method="post"> |
909 |
[% INCLUDE 'csrf-token.inc' %] |
910 |
<input type="hidden" name="op" value="cud-delete" /> |
911 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
912 |
<input type="hidden" name="reviewid" value="[% review.reviewid | html %]" /> |
913 |
<button type="submit" class="btn btn-default btn-xs delete-comment"><i class="fa fa-trash-can" aria-hidden="true"></i> Delete</button> |
914 |
</form> |
915 |
</td> |
916 |
[% END # /IF CAN_user_tools_moderate_comments %] |
917 |
</tr> |
918 |
[% END # / FOREACH reviews %] |
919 |
</tbody> |
920 |
</table> |
921 |
[% END %] |
922 |
[% END # /IF reviews %] |
923 |
|
843 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] |
924 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] |
844 |
[% WRAPPER tab_panel tabname="NovelistSelect" %] |
925 |
[% WRAPPER tab_panel tabname="NovelistSelect" %] |
845 |
<div data-novelist-novelistselect=[% normalized_isbn | html %]></div> |
926 |
<div data-novelist-novelistselect=[% normalized_isbn | html %]></div> |
Lines 850-856
Link Here
|
850 |
[% WRAPPER tab_panel tabname="${ plugins_intranet_catalog_biblio_tab.id }" %] |
931 |
[% WRAPPER tab_panel tabname="${ plugins_intranet_catalog_biblio_tab.id }" %] |
851 |
[% plugins_intranet_catalog_biblio_tab.content | $raw %] |
932 |
[% plugins_intranet_catalog_biblio_tab.content | $raw %] |
852 |
[% END # /tab_panel %] |
933 |
[% END # /tab_panel %] |
853 |
[% END %] |
934 |
[% END # /WRAPPER comments %] |
854 |
[% END # /WRAPPER tab_panels %] |
935 |
[% END # /WRAPPER tab_panels %] |
855 |
[% END # /WRAPPER tabs %] |
936 |
[% END # /WRAPPER tabs %] |
856 |
|
937 |
|
Lines 1439-1445
Link Here
|
1439 |
|
1520 |
|
1440 |
$(document).ready(function() { |
1521 |
$(document).ready(function() { |
1441 |
// Pick details tab to display by default |
1522 |
// Pick details tab to display by default |
1442 |
[% IF count == 0 %] |
1523 |
[% IF activetab == "comments" %] |
|
|
1524 |
$("#bibliodetails a[href='#comments_panel']").tab("show"); |
1525 |
[% ELSIF count == 0 %] |
1443 |
[% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %] |
1526 |
[% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %] |
1444 |
$("#bibliodetails a[href='#html5media_panel']").tab("show"); |
1527 |
$("#bibliodetails a[href='#html5media_panel']").tab("show"); |
1445 |
[% ELSIF ComponentParts && ComponentParts.size %] |
1528 |
[% ELSIF ComponentParts && ComponentParts.size %] |
Lines 1925-1930
Link Here
|
1925 |
})); |
2008 |
})); |
1926 |
[% END %] |
2009 |
[% END %] |
1927 |
|
2010 |
|
|
|
2011 |
[% IF ( reviews ) %] |
2012 |
var comment_table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'comments-table', 'json') | $raw %]; |
2013 |
var comments_table = KohaTable("comments_table", { |
2014 |
"paginate": false, |
2015 |
"autoWidth": false, |
2016 |
"order": [[ 2, "desc" ]], |
2017 |
}, comment_table_settings); |
2018 |
[% END %] |
1928 |
}); |
2019 |
}); |
1929 |
|
2020 |
|
1930 |
[% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %] |
2021 |
[% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %] |
Lines 2174-2181
Link Here
|
2174 |
|
2265 |
|
2175 |
$('#modal-item-group-unset').modal('hide'); |
2266 |
$('#modal-item-group-unset').modal('hide'); |
2176 |
}); |
2267 |
}); |
|
|
2268 |
|
2177 |
[% END # /IF EnableItemGroups %] |
2269 |
[% END # /IF EnableItemGroups %] |
2178 |
|
2270 |
|
|
|
2271 |
$(".delete-comment").on("click", function(){ |
2272 |
return confirm( _("Are you sure you want to delete this comment?") ); |
2273 |
}); |
2274 |
|
2179 |
</script> |
2275 |
</script> |
2180 |
|
2276 |
|
2181 |
[%# The following PROCESS needs: %] |
2277 |
[%# The following PROCESS needs: %] |