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

(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 103-109 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
103
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo');
103
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo');
104
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo');
104
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo');
105
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo');
105
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo');
106
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo');
106
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer','full','Choose how a commenter''s identity is presented alongside comments in the OPAC','none|full|first|surname|firstandinitial|username','Choice');
107
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewerPhoto',1,'If ON, photo of reviewer will be shown beside comments in OPAC','','YesNo');
107
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewerPhoto',1,'If ON, photo of reviewer will be shown beside comments in OPAC','','YesNo');
108
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo');
108
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo');
109
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory','simplified','Define the display preference for serials issue history in OPAC','simplified|full','Choice');
109
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory','simplified','Define the display preference for serials issue history in OPAC','simplified|full','Choice');
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 4719-4724 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4719
    SetVersion ($DBversion);
4719
    SetVersion ($DBversion);
4720
}
4720
}
4721
4721
4722
$DBversion = "3.07.00.XXX";
4723
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
4724
    $dbh->do(" UPDATE `systempreferences` SET  `value` =  'none', `options` =  'none|full|first|surname|firstandinitial|username', `explanation` =  'Choose how a commenter''s identity is presented alongside comments in the OPAC', `type` =  'Choice' WHERE  `systempreferences`.`variable` =  'ShowReviewer' AND `systempreferences`.`variable` = 0");
4725
    $dbh->do(" UPDATE `systempreferences` SET  `value` =  'full', `options` =  'none|full|first|surname|firstandinitial|username', `explanation` =  'Choose how a commenter''s identity is presented alongside comments in the OPAC', `type` =  'Choice' WHERE  `systempreferences`.`variable` =  'ShowReviewer' AND `systempreferences`.`variable` = 1");
4726
    print "Adding additional options for the display of commenter's identity in the OPAC: Full name, first name, last name, first name and last name first initial, username, or no information\n";
4727
    SetVersion($DBversion);
4728
}
4729
4722
=head1 FUNCTIONS
4730
=head1 FUNCTIONS
4723
4731
4724
=head2 DropAllForeignKeys($table)
4732
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-3 / +8 lines)
Lines 277-287 OPAC: Link Here
277
                  no: "Don't allow"
277
                  no: "Don't allow"
278
            - patrons to make comments on items on the OPAC.
278
            - patrons to make comments on items on the OPAC.
279
        -
279
        -
280
            - Show
280
            - pref: ShowReviewer
281
            - pref: ShowReviewer
281
              choices:
282
              choices:
282
                  yes: Show
283
                  none: no name
283
                  no: Hide
284
                  full: full name
284
            - reviewer's name above comments in OPAC.
285
                  first: first name
286
                  surname: last name
287
                  firstandinitial: first name and last name initial
288
                  username: username
289
            - of commenter with comments in OPAC.
285
        -
290
        -
286
            - pref: ShowReviewerPhoto
291
            - pref: ShowReviewerPhoto
287
              choices:
292
              choices:
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-11 / +19 lines)
Lines 873-890 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
873
        </p></div>
873
        </p></div>
874
            [% ELSE %]
874
            [% ELSE %]
875
            <div class="commentline">
875
            <div class="commentline">
876
            [% IF ( ShowReviewer ) %]
876
            [% IF ( ShowReviewer != "none" ) %]
877
                [% IF ( review.avatarurl ) %]
877
                    [% IF ( review.avatarurl ) %]
878
            <img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
878
                <img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
879
                [% END %]
879
                    [% END %]
880
            <h5>
880
                    [% SWITCH ShowReviewer %]
881
                Comment by
881
                    [% CASE 'full' %]
882
                [% review.title %]
882
                        <h5>Comment by [% review.title %] [% review.firstname %] [% review.surname %]</h5>
883
                [% review.firstname %]
883
                    [% CASE 'first' %]
884
                [% review.surname %]
884
                        <h5>Comment by [% review.firstname %]</h5>
885
            </h5>
885
                    [% CASE 'surname' %]
886
                        <h5>Comment by [% review.surname %]</h5>
887
                    [% CASE 'firstandinitial' %]
888
                        <h5>Comment by [% review.firstname %] [% review.surname|truncate(2,'.') %]</h5>
889
                    [% CASE 'username' %]
890
                        <h5>Comment by [% review.userid %]</h5>
891
                    [% END %]
892
                <small>[% review.datereviewed %]</small>
893
            [% ELSIF ( ShowReviewer == "none") %]
894
                <h5>Patron comment on [% review.datereviewed %]</h5>
886
            [% END %]
895
            [% END %]
887
            <small>[% review.datereviewed %]</small>
888
        <p>
896
        <p>
889
          [% FILTER html_break %]
897
          [% FILTER html_break %]
890
          [% review.review |html %]
898
          [% review.review |html %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt (-2 / +14 lines)
Lines 54-61 $(document).ready(function(){ Link Here
54
            [% review.review |html %]
54
            [% review.review |html %]
55
            [% END %]
55
            [% END %]
56
            <span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
56
            <span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
57
            [% IF ( ShowReviewer ) %] by
57
            [% IF ( ShowReviewer != "none" ) %] by
58
            [% review.firstname %] [% review.surname %][% END %][% END %]</span></p>
58
                [% SWITCH ShowReviewer %]
59
                [% CASE 'full' %]
60
                    [% review.borrtitle %] [% review.firstname %] [% review.surname %]
61
                [% CASE 'first' %]
62
                    [% review.firstname %]
63
                [% CASE 'surname' %]
64
                    [% review.surname %]
65
                [% CASE 'firstandinitial' %]
66
                    [% review.firstname %] [% review.surname|truncate(2,'.') %]
67
                [% CASE 'username' %]
68
                    [% review.userid %]
69
                [% END %]
70
            [% END %][% END %]</span></p>
59
        </td>
71
        </td>
60
        <td>
72
        <td>
61
[% IF ( review.BiblioDefaultViewmarc ) %]<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
73
[% IF ( review.BiblioDefaultViewmarc ) %]<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
(-)a/opac/opac-showreviews.pl (-1 / +2 lines)
Lines 101-108 for my $result (@$reviews){ Link Here
101
	$result->{size} = $bib->{'size'};
101
	$result->{size} = $bib->{'size'};
102
	$result->{notes} = $bib->{'notes'};
102
	$result->{notes} = $bib->{'notes'};
103
	$result->{timestamp} = $bib->{'timestamp'};
103
	$result->{timestamp} = $bib->{'timestamp'};
104
    $result->{borrtitle} = $borr->{'title'};
104
	$result->{firstname} = $borr->{'firstname'};
105
	$result->{firstname} = $borr->{'firstname'};
105
	$result->{surname} = $borr->{'surname'};
106
	$result->{surname} = $borr->{'surname'};
107
    $result->{userid} = $borr->{'userid'};
106
        if ($libravatar_enabled and $borr->{'email'}) {
108
        if ($libravatar_enabled and $borr->{'email'}) {
107
            $result->{avatarurl} = libravatar_url(email => $borr->{'email'}, size => 40, https => $ENV{HTTPS});
109
            $result->{avatarurl} = libravatar_url(email => $borr->{'email'}, size => 40, https => $ENV{HTTPS});
108
        }
110
        }
109
- 

Return to bug 5503