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

(-)a/C4/Auth.pm (+2 lines)
Lines 336-341 sub get_template_and_user { Link Here
336
            noItemTypeImages             => C4::Context->preference("noItemTypeImages"),
336
            noItemTypeImages             => C4::Context->preference("noItemTypeImages"),
337
            marcflavour                  => C4::Context->preference("marcflavour"),
337
            marcflavour                  => C4::Context->preference("marcflavour"),
338
            persona                      => C4::Context->preference("persona"),
338
            persona                      => C4::Context->preference("persona"),
339
            GoodReadsReviews             => C4::Context->preference("GoodReadsReviews"),
340
            GoodReadsKey                 => C4::Context->preference("GoodReadsKey"),
339
    );
341
    );
340
    if ( $in->{'type'} eq "intranet" ) {
342
    if ( $in->{'type'} eq "intranet" ) {
341
        $template->param(
343
        $template->param(
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 421-423 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES( Link Here
421
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronSelfRegistrationAdditionalInstructions','','A free text field to display additional instructions to newly self registered patrons.','','free');
421
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronSelfRegistrationAdditionalInstructions','','A free text field to display additional instructions to newly self registered patrons.','','free');
422
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseQueryParser', '0', 'If enabled, try to use QueryParser for queries.', NULL, 'YesNo');
422
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseQueryParser', '0', 'If enabled, try to use QueryParser for queries.', NULL, 'YesNo');
423
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');
423
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');
424
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)  VALUES('GoodReadsReviews','0','Show Goodreads Reviews','','YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+11 lines)
Lines 6502-6507 if ( CheckVersion($DBversion) ) { Link Here
6502
        AND user_permissions.code = 'circulate_remaining_permissions'
6502
        AND user_permissions.code = 'circulate_remaining_permissions'
6503
    });
6503
    });
6504
    print "Upgrade to $DBversion done ( Add circ permission overdues_report )\n";
6504
    print "Upgrade to $DBversion done ( Add circ permission overdues_report )\n";
6505
}
6506
6507
$DBversion = "3.11.00.XXX";
6508
if ( CheckVersion($DBversion) ) {
6509
    $dbh->do(
6510
        qq{
6511
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)  VALUES('GoodReadsReviews','0','Show Goodreads Reviews','','YesNo');
6512
        }
6513
    );
6514
    print
6515
"Upgrade to $DBversion done (Bug 9817: Add GoodReads Reviews to OPAC)\n";
6505
    SetVersion($DBversion);
6516
    SetVersion($DBversion);
6506
}
6517
}
6507
6518
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref (+12 lines)
Lines 319-321 Enhanced Content: Link Here
319
            - pref: HTML5MediaExtensions
319
            - pref: HTML5MediaExtensions
320
              class: multi
320
              class: multi
321
            - (separated with |).
321
            - (separated with |).
322
    Good Reads:
323
        -
324
            - Good reads API key
325
            - pref: GoodReadsKey
326
              class: password
327
            - you can get a key from http://www.goodreads.com/api/keys
328
        -
329
            - pref: GoodReadsReviews
330
              choices:
331
                  yes: "Show"
332
                  no: "Don't show"
333
            - a tab in the holdings section in the OPAC for Goodreads reviews
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/goodreadsreviews.inc (+43 lines)
Line 0 Link Here
1
<style>
2
  #goodreads-widget {
3
    font-family: georgia, serif;
4
    padding: 18px 0;
5
    width:565px;
6
  }
7
  #goodreads-widget h1 {
8
    font-weight:normal;
9
    font-size: 16px;
10
    border-bottom: 1px solid #BBB596;
11
    margin-bottom: 0;
12
  }
13
  #goodreads-widget a {
14
    text-decoration: none;
15
    color:#660;
16
  }
17
  iframe{
18
    background-color: #fff;
19
  }
20
  #goodreads-widget a:hover { text-decoration: underline; }
21
  #goodreads-widget a:active {
22
    color:#660;
23
  }
24
  #gr_footer {
25
    width: 100%;
26
    border-top: 1px solid #BBB596;
27
    text-align: right;
28
  }
29
  #goodreads-widget .gr_branding{
30
    color: #382110;
31
    font-size: 11px;
32
    text-decoration: none;
33
    font-family: verdana, arial, helvetica, sans-serif;
34
  }
35
</style>
36
<div id="goodreadreviews">
37
<div id="goodreads-widget">
38
  <div id="gr_header"><h1>Goodreads reviews for [% title |html %]</h1></div>
39
  <iframe id="the_iframe" src="http://www.goodreads.com/api/reviews_widget_iframe?did=4504&format=html&header_text=Goodreads+reviews+for+[% title |uri %]&isbn=[% normalized_isbn %]&links=660&review_back=fff&stars=000&text=000" width="800" height="400" frameborder="0"></iframe>
40
  <div id="gr_footer">
41
  </div>
42
</div>
43
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-1 / +9 lines)
Lines 976-981 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
976
[% IF ( IDreamBooksReviews ) %]
976
[% IF ( IDreamBooksReviews ) %]
977
    <li id='tab_idb_critic_reviews' style="display:none;"><a href='#idb_critic_reviews'>Book reviews by critics ( XXX )</a></li>
977
    <li id='tab_idb_critic_reviews' style="display:none;"><a href='#idb_critic_reviews'>Book reviews by critics ( XXX )</a></li>
978
[% END %]
978
[% END %]
979
980
[% IF GoodReadsReviews %]
981
   <li id="tab_goodreadreviews"><a href="#goodreadreviews">Goodreads Reviews</a></li>
982
[% END %]
983
979
</ul>
984
</ul>
980
985
981
[% IF ( serialcollection ) %]
986
[% IF ( serialcollection ) %]
Lines 1324-1329 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1324
</div>
1329
</div>
1325
[% END %]
1330
[% END %]
1326
1331
1332
[% IF GoodReadsReviews %]
1333
    [% INCLUDE 'goodreadsreviews.inc' %]
1334
[% END %]
1335
1327
[% IF ( OPACLocalCoverImages && localimages.size ) %]
1336
[% IF ( OPACLocalCoverImages && localimages.size ) %]
1328
<div id="images">
1337
<div id="images">
1329
<p>Click on an image to view it in the image viewer</p>
1338
<p>Click on an image to view it in the image viewer</p>
1330
- 

Return to bug 9817