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 4578-4583 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4578
    SetVersion($DBversion);
4578
    SetVersion($DBversion);
4579
}
4579
}
4580
4580
4581
$DBversion = "3.06.02.XXX";
4582
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
4583
    $dbh->do(" UPDATE  `koha`.`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");
4584
    $dbh->do(" UPDATE  `koha`.`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");
4585
    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";
4586
    SetVersion($DBversion);
4587
}
4588
4581
=head1 FUNCTIONS
4589
=head1 FUNCTIONS
4582
4590
4583
=head2 DropAllForeignKeys($table)
4591
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-3 / +8 lines)
Lines 270-280 OPAC: Link Here
270
                  no: "Don't allow"
270
                  no: "Don't allow"
271
            - patrons to make comments on items on the OPAC.
271
            - patrons to make comments on items on the OPAC.
272
        -
272
        -
273
            - Show
273
            - pref: ShowReviewer
274
            - pref: ShowReviewer
274
              choices:
275
              choices:
275
                  yes: Show
276
                  none: no name
276
                  no: Hide
277
                  full: full name
277
            - reviewer's name above comments in OPAC.
278
                  first: first name
279
                  surname: last name
280
                  firstandinitial: first name and last name initial
281
                  username: username
282
            - of commenter with comments in OPAC.
278
        -
283
        -
279
            - pref: ShowReviewerPhoto
284
            - pref: ShowReviewerPhoto
280
              choices:
285
              choices:
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-11 / +19 lines)
Lines 865-882 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
865
        </p></div>
865
        </p></div>
866
            [% ELSE %]
866
            [% ELSE %]
867
            <div class="commentline">
867
            <div class="commentline">
868
            [% IF ( ShowReviewer ) %]
868
            [% IF ( ShowReviewer != "none" ) %]
869
                [% IF ( review.avatarurl ) %]
869
                    [% IF ( review.avatarurl ) %]
870
            <img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>
870
                <img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>
871
                [% END %]
871
                    [% END %]
872
            <h5>
872
                    [% SWITCH ShowReviewer %]
873
                Comment by
873
                    [% CASE 'full' %]
874
                [% review.title %]
874
                        <h5>Comment by [% review.title %] [% review.firstname %] [% review.surname %]</h5>
875
                [% review.firstname %]
875
                    [% CASE 'first' %]
876
                [% review.surname %]
876
                        <h5>Comment by [% review.firstname %]</h5>
877
            </h5>
877
                    [% CASE 'surname' %]
878
                        <h5>Comment by [% review.surname %]</h5>
879
                    [% CASE 'firstandinitial' %]
880
                        <h5>Comment by [% review.firstname %] [% review.surname|truncate(2,'.') %]</h5>
881
                    [% CASE 'username' %]
882
                        <h5>Comment by [% review.userid %]</h5>
883
                    [% END %]
884
                <small>[% review.datereviewed %]</small>
885
            [% ELSIF ( ShowReviewer == "none") %]
886
                <h5>Patron comment on [% review.datereviewed %]</h5>
878
            [% END %]
887
            [% END %]
879
            <small>[% review.datereviewed %]</small>
880
        <p>
888
        <p>
881
          [% review.review %]
889
          [% review.review %]
882
        </p></div>
890
        </p></div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt (-2 / +14 lines)
Lines 52-59 $(document).ready(function(){ Link Here
52
            [% END %]
52
            [% END %]
53
            [% review.review |html %]
53
            [% review.review |html %]
54
            <span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
54
            <span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
55
            [% IF ( ShowReviewer ) %] by
55
            [% IF ( ShowReviewer != "none" ) %] by
56
            [% review.firstname %] [% review.surname %][% END %][% END %]</span></p>
56
                [% SWITCH ShowReviewer %]
57
                [% CASE 'full' %]
58
                    [% review.borrtitle %] [% review.firstname %] [% review.surname %]
59
                [% CASE 'first' %]
60
                    [% review.firstname %]
61
                [% CASE 'surname' %]
62
                    [% review.surname %]
63
                [% CASE 'firstandinitial' %]
64
                    [% review.firstname %] [% review.surname|truncate(2,'.') %]
65
                [% CASE 'username' %]
66
                    [% review.userid %]
67
                [% END %]
68
            [% END %][% END %]</span></p>
57
        </td>
69
        </td>
58
        <td>
70
        <td>
59
            <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber %]">
71
            <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber %]">
(-)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