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

(-)a/authorities/authorities.pl (-1 / +4 lines)
Lines 557-569 if(!$authtypecode) { Link Here
557
    $authtypecode = $authid ? Koha::Authorities->find($authid)->authtypecode : '';
557
    $authtypecode = $authid ? Koha::Authorities->find($authid)->authtypecode : '';
558
}
558
}
559
559
560
my $authobj = Koha::Authorities->find($authid);
561
my $count = $authobj ? $authobj->get_usage_count : 0;
562
560
my ($template, $loggedinuser, $cookie)
563
my ($template, $loggedinuser, $cookie)
561
    = get_template_and_user({template_name => "authorities/authorities.tt",
564
    = get_template_and_user({template_name => "authorities/authorities.tt",
562
                            query => $input,
565
                            query => $input,
563
                            type => "intranet",
566
                            type => "intranet",
564
                            flagsrequired => {editauthorities => 1},
567
                            flagsrequired => {editauthorities => 1},
565
                            });
568
                            });
566
$template->param(nonav   => $nonav,index=>$myindex,authtypecode=>$authtypecode,breedingid=>$breedingid);
569
$template->param(nonav   => $nonav,index=>$myindex,authtypecode=>$authtypecode,breedingid=>$breedingid, count=>$count);
567
570
568
$tagslib = GetTagsLabels(1,$authtypecode);
571
$tagslib = GetTagsLabels(1,$authtypecode);
569
$mandatory_z3950 = GetMandatoryFieldZ3950($authtypecode);
572
$mandatory_z3950 = GetMandatoryFieldZ3950($authtypecode);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-2 / +7 lines)
Lines 352-358 Link Here
352
                            </ul>
352
                            </ul>
353
                        </div>
353
                        </div>
354
                    </div> <!-- /#toolbar -->
354
                    </div> <!-- /#toolbar -->
355
355
                    <div id="action">
356
                        [% IF count %]
357
                                Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&amp;op=do_search&amp;q=an=[% authid | uri %]">[% count | html %] record(s)</a>
358
                        [% ELSE %]
359
                                This authority is not used in any records.
360
                        [% END %]
361
                    </div>
356
                    <div id="authoritytabs" class="toptabs numbered">
362
                    <div id="authoritytabs" class="toptabs numbered">
357
                        <ul>
363
                        <ul>
358
                            [% FOREACH BIG_LOO IN BIG_LOOP %]
364
                            [% FOREACH BIG_LOO IN BIG_LOOP %]
359
- 

Return to bug 20615