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

(-)a/C4/Branch.pm (-5 / +5 lines)
Lines 204-211 sub ModBranch { Link Here
204
            (branchcode,branchname,branchaddress1,
204
            (branchcode,branchname,branchaddress1,
205
            branchaddress2,branchaddress3,branchzip,branchcity,branchstate,
205
            branchaddress2,branchaddress3,branchzip,branchcity,branchstate,
206
            branchcountry,branchphone,branchfax,branchemail,
206
            branchcountry,branchphone,branchfax,branchemail,
207
            branchurl,branchip,branchprinter,branchnotes)
207
            branchurl,branchip,branchprinter,branchnotes,opac_info)
208
            VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
208
            VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
209
        ";
209
        ";
210
        my $sth    = $dbh->prepare($query);
210
        my $sth    = $dbh->prepare($query);
211
        $sth->execute(
211
        $sth->execute(
Lines 217-223 sub ModBranch { Link Here
217
            $data->{'branchphone'},      $data->{'branchfax'},
217
            $data->{'branchphone'},      $data->{'branchfax'},
218
            $data->{'branchemail'},      $data->{'branchurl'},
218
            $data->{'branchemail'},      $data->{'branchurl'},
219
            $data->{'branchip'},         $data->{'branchprinter'},
219
            $data->{'branchip'},         $data->{'branchprinter'},
220
            $data->{'branchnotes'},
220
            $data->{'branchnotes'},      $data->{opac_info},
221
        );
221
        );
222
        return 1 if $dbh->err;
222
        return 1 if $dbh->err;
223
    } else {
223
    } else {
Lines 227-233 sub ModBranch { Link Here
227
                branchaddress2=?,branchaddress3=?,branchzip=?,
227
                branchaddress2=?,branchaddress3=?,branchzip=?,
228
                branchcity=?,branchstate=?,branchcountry=?,branchphone=?,
228
                branchcity=?,branchstate=?,branchcountry=?,branchphone=?,
229
                branchfax=?,branchemail=?,branchurl=?,branchip=?,
229
                branchfax=?,branchemail=?,branchurl=?,branchip=?,
230
                branchprinter=?,branchnotes=?
230
                branchprinter=?,branchnotes=?,opac_info=?
231
            WHERE branchcode=?
231
            WHERE branchcode=?
232
        ";
232
        ";
233
        my $sth    = $dbh->prepare($query);
233
        my $sth    = $dbh->prepare($query);
Lines 240-246 sub ModBranch { Link Here
240
            $data->{'branchphone'},      $data->{'branchfax'},
240
            $data->{'branchphone'},      $data->{'branchfax'},
241
            $data->{'branchemail'},      $data->{'branchurl'},
241
            $data->{'branchemail'},      $data->{'branchurl'},
242
            $data->{'branchip'},         $data->{'branchprinter'},
242
            $data->{'branchip'},         $data->{'branchprinter'},
243
            $data->{'branchnotes'},
243
            $data->{'branchnotes'},      $data->{opac_info},
244
            $data->{'branchcode'},
244
            $data->{'branchcode'},
245
        );
245
        );
246
    }
246
    }
(-)a/C4/Items.pm (-1 / +3 lines)
Lines 1185-1191 sub GetItemsInfo { Link Here
1185
           items.notforloan as itemnotforloan,
1185
           items.notforloan as itemnotforloan,
1186
           itemtypes.description,
1186
           itemtypes.description,
1187
           itemtypes.notforloan as notforloan_per_itemtype,
1187
           itemtypes.notforloan as notforloan_per_itemtype,
1188
           holding.branchurl
1188
           holding.branchurl,
1189
           holding.branchname,
1190
           holding.opac_info as branch_opac_info
1189
     FROM items
1191
     FROM items
1190
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1192
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1191
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
1193
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
(-)a/admin/branches.pl (-1 / +3 lines)
Lines 328-333 sub branchinfotable { Link Here
328
        # - branchfax       |
328
        # - branchfax       |
329
        # - branchemail    /
329
        # - branchemail    /
330
        # - branchurl      /
330
        # - branchurl      /
331
        # - opac_info (can contain HTML)
331
        # - address-empty-p (1 if no address information, 0 otherwise)
332
        # - address-empty-p (1 if no address information, 0 otherwise)
332
        # - categories      (containing a static error message)
333
        # - categories      (containing a static error message)
333
        # - category_list   (loop containing "categoryname")
334
        # - category_list   (loop containing "categoryname")
Lines 343-349 sub branchinfotable { Link Here
343
            'branchaddress3', 'branchzip',
344
            'branchaddress3', 'branchzip',
344
            'branchcity', 'branchstate', 'branchcountry',
345
            'branchcity', 'branchstate', 'branchcountry',
345
            'branchphone', 'branchfax',
346
            'branchphone', 'branchfax',
346
            'branchemail', 'branchurl',
347
            'branchemail', 'branchurl', 'opac_info',
347
            'branchip',       'branchprinter', 'branchnotes'
348
            'branchip',       'branchprinter', 'branchnotes'
348
          )
349
          )
349
        {
350
        {
Lines 406-411 sub _branch_to_template { Link Here
406
         branchfax      => $data->{'branchfax'},
407
         branchfax      => $data->{'branchfax'},
407
         branchemail    => $data->{'branchemail'},
408
         branchemail    => $data->{'branchemail'},
408
         branchurl      => $data->{'branchurl'},
409
         branchurl      => $data->{'branchurl'},
410
         opac_info      => $data->{'opac_info'},
409
         branchip       => $data->{'branchip'},
411
         branchip       => $data->{'branchip'},
410
         branchnotes    => $data->{'branchnotes'}, 
412
         branchnotes    => $data->{'branchnotes'}, 
411
    );
413
    );
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 361-366 CREATE TABLE `branches` ( -- information about your libraries or branches are st Link Here
361
  `branchip` varchar(15) default NULL, -- the IP address for your library or branch
361
  `branchip` varchar(15) default NULL, -- the IP address for your library or branch
362
  `branchprinter` varchar(100) default NULL, -- unused in Koha
362
  `branchprinter` varchar(100) default NULL, -- unused in Koha
363
  `branchnotes` mediumtext, -- notes related to your library or branch
363
  `branchnotes` mediumtext, -- notes related to your library or branch
364
  opac_info text, -- HTML that displays in OPAC
364
  UNIQUE KEY `branchcode` (`branchcode`)
365
  UNIQUE KEY `branchcode` (`branchcode`)
365
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
366
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
366
367
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 4775-4780 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4775
    SetVersion($DBversion);
4775
    SetVersion($DBversion);
4776
}
4776
}
4777
4777
4778
$DBversion = "3.07.00.XXX";
4779
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4780
    $dbh->do("ALTER TABLE branches ADD opac_info text;");
4781
    print "Upgrade to $DBversion done add opac_info to branches \n";
4782
    SetVersion($DBversion);
4783
}
4784
4778
=head1 FUNCTIONS
4785
=head1 FUNCTIONS
4779
4786
4780
=head2 DropAllForeignKeys($table)
4787
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (+22 lines)
Lines 13-18 Link Here
13
[% INCLUDE 'doc-head-close.inc' %]
13
[% INCLUDE 'doc-head-close.inc' %]
14
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
14
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
15
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
15
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
16
<script type="text/javascript" src="[% themelang %]/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
17
<script language="javascript" type="text/javascript">
18
tinyMCE.init({
19
    mode : "textareas",
20
    theme : "advanced",
21
    content_css : "[% themelang %]/css/tinymce.css",
22
    plugins : "table,save,advhr,advlink,iespell,contextmenu",
23
    theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,",
24
    theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
25
    theme_advanced_buttons3 : "",
26
    theme_advanced_toolbar_location : "top",
27
    theme_advanced_toolbar_align : "left",
28
    theme_advanced_path_location : "bottom",
29
    theme_advanced_resizing : true,
30
    apply_source_formatting : true,
31
    height : "300",
32
    width : "700"
33
});
34
</script>
16
</head>
35
</head>
17
<body>
36
<body>
18
[% INCLUDE 'header.inc' %]
37
[% INCLUDE 'header.inc' %]
Lines 122-127 Link Here
122
        <li><label for="branchfax">Fax</label><input type="text" name="branchfax" id="branchfax" value="[% branchfax |html %]" /></li>
141
        <li><label for="branchfax">Fax</label><input type="text" name="branchfax" id="branchfax" value="[% branchfax |html %]" /></li>
123
        <li><label for="branchemail">Email</label><input type="text" name="branchemail" id="branchemail" value="[% branchemail |html %]" /></li>
142
        <li><label for="branchemail">Email</label><input type="text" name="branchemail" id="branchemail" value="[% branchemail |html %]" /></li>
124
        <li><label for="branchurl">url</label><input type="text" name="branchurl" id="branchurl" value="[% branchurl |html %]" /></li>
143
        <li><label for="branchurl">url</label><input type="text" name="branchurl" id="branchurl" value="[% branchurl |html %]" /></li>
144
        <li><label for="opac_info">OPAC Info</label><textarea name="opac_info" id="opac_info">[% opac_info |html %]</textarea></li>
125
        <li><label for="branchip">IP</label><input type="text" name="branchip" id="branchip" value="[% branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
145
        <li><label for="branchip">IP</label><input type="text" name="branchip" id="branchip" value="[% branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
126
		<!--
146
		<!--
127
        <li><label for="branchprinter">Library Printer</label>
147
        <li><label for="branchprinter">Library Printer</label>
Lines 214-219 Link Here
214
                            <br /><a href="mailto:[% branche.branchemail %]">[% branche.branchemail |html %]</a>[% END %]
234
                            <br /><a href="mailto:[% branche.branchemail %]">[% branche.branchemail |html %]</a>[% END %]
215
                        [% IF ( branche.branchurl ) %]
235
                        [% IF ( branche.branchurl ) %]
216
                            <br /><a href="[% branche.branchurl %]">[% branche.branchurl |html %]</a>[% END %]
236
                            <br /><a href="[% branche.branchurl %]">[% branche.branchurl |html %]</a>[% END %]
237
                        [% IF ( branche.opac_info ) %]
238
                            <br />OPAC Info: <div>[% branche.opac_info %]</div>[% END %]
217
                        [% IF ( branche.branchnotes ) %]
239
                        [% IF ( branche.branchnotes ) %]
218
                            <br />Notes: [% branche.branchnotes |html %][% END %]
240
                            <br />Notes: [% branche.branchnotes |html %][% END %]
219
                    [% END %]
241
                    [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.tools.min.js (+11 lines)
Line 0 Link Here
1
/*!
2
 * jQuery Tools v1.2.6 - The missing UI library for the Web
3
 * 
4
 * tooltip/tooltip.js
5
 * 
6
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
7
 * 
8
 * http://flowplayer.org/tools/
9
 * 
10
 */
11
(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery);
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-2 / +23 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]
1
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]
2
[% INCLUDE 'doc-head-close.inc' %]
2
[% INCLUDE 'doc-head-close.inc' %]
3
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
3
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
4
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tools.min.js"></script>
4
<script type="text/JavaScript" language="JavaScript">
5
<script type="text/JavaScript" language="JavaScript">
5
//<![CDATA[
6
//<![CDATA[
6
    [% IF ( busc ) %]
7
    [% IF ( busc ) %]
Lines 74-79 Link Here
74
        });
75
        });
75
        [% END %]
76
        [% END %]
76
77
78
        $(".branch-info-tooltip-trigger").tooltip({delay: 100, position: "top right"});
77
});
79
});
78
80
79
81
Lines 212-217 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
212
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<style type="text/css">
214
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<style type="text/css">
213
    #addtagl { display: none; }
215
    #addtagl { display: none; }
214
</style>[% END %][% END %][% END %]
216
</style>[% END %][% END %][% END %]
217
<style type="text/css">
218
.branch-info-tooltip {
219
  display: none;
220
  padding: 20px;
221
  background: #fff;
222
  border: 1px solid black;
223
}
224
</style>
215
225
216
</head>
226
</head>
217
<body id="opac-detail">
227
<body id="opac-detail">
Lines 592-598 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
592
	    </tr></thead>
602
	    </tr></thead>
593
	    <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
603
	    <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
594
	    <tr>[% IF ( item_level_itypes ) %]<td>[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %]
604
	    <tr>[% IF ( item_level_itypes ) %]<td>[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %]
595
		<td>[% UNLESS ( singleBranchMode ) %][% IF ( ITEM_RESULT.branchurl ) %]<a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>[% ELSE %][% ITEM_RESULT.branchname %][% END %][% END %] <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span> </td>
605
		<td>
606
    [% UNLESS ( singleBranchMode ) %]
607
        <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
608
        [% IF ( ITEM_RESULT.branchurl ) %]
609
        <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
610
        [% ELSE %]
611
        [% ITEM_RESULT.branchname %]
612
        [% END %]
613
        </span>
614
        <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
615
    [% END %]
616
    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
617
    </td>
596
		[% IF ( itemdata_ccode ) %]<td>[% ITEM_RESULT.ccode %]</td>[% END %]
618
		[% IF ( itemdata_ccode ) %]<td>[% ITEM_RESULT.ccode %]</td>[% END %]
597
		<td>[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#shelfbrowser">Browse Shelf</a>)[% END %][% END %]</td>
619
		<td>[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#shelfbrowser">Browse Shelf</a>)[% END %][% END %]</td>
598
		[% IF ( itemdata_enumchron ) %]<td>[% ITEM_RESULT.enumchron %]</td>[% END %]
620
		[% IF ( itemdata_enumchron ) %]<td>[% ITEM_RESULT.enumchron %]</td>[% END %]
599
- 

Return to bug 7264