Bugzilla – Attachment 47919 Details for
Bug 14610
Add ability to place article requests in Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14610 [QA Followup] - Add article requests count to tab like it is for holds
Bug-14610-QA-Followup---Add-article-requests-count.patch (text/plain), 7.07 KB, created by
Kyle M Hall (khall)
on 2016-02-11 15:07:51 UTC
(
hide
)
Description:
Bug 14610 [QA Followup] - Add article requests count to tab like it is for holds
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-02-11 15:07:51 UTC
Size:
7.07 KB
patch
obsolete
>From e00a534e69fa061e2719e807d37da77760e84e37 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 13 Jan 2016 15:59:11 +0000 >Subject: [PATCH] Bug 14610 [QA Followup] - Add article requests count to tab > like it is for holds > >--- > Koha/Template/Plugin/Biblio.pm | 20 +++++ > .../prog/en/includes/biblio-view-menu.inc | 86 +++++++++++++--------- > 2 files changed, 70 insertions(+), 36 deletions(-) > >diff --git a/Koha/Template/Plugin/Biblio.pm b/Koha/Template/Plugin/Biblio.pm >index 79a6df0..34ca1e7 100644 >--- a/Koha/Template/Plugin/Biblio.pm >+++ b/Koha/Template/Plugin/Biblio.pm >@@ -25,6 +25,8 @@ use base qw( Template::Plugin ); > use Koha::Holds; > use Koha::Biblios; > use Koha::Borrowers; >+use Koha::ArticleRequests; >+use Koha::ArticleRequest::Status; > > sub HoldsCount { > my ( $self, $biblionumber ) = @_; >@@ -34,6 +36,24 @@ sub HoldsCount { > return $holds->count(); > } > >+sub ArticleRequestsActiveCount { >+ my ( $self, $biblionumber ) = @_; >+ >+ my $ar = Koha::ArticleRequests->search( >+ { >+ biblionumber => $biblionumber, >+ status => [ >+ -or => [ >+ status => Koha::ArticleRequest::Status::Pending, >+ status => Koha::ArticleRequest::Status::Processing >+ ] >+ ] >+ } >+ ); >+ >+ return $ar->count(); >+} >+ > sub CanArticleRequest { > my ( $self, $biblionumber, $borrowernumber ) = @_; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >index 645ccd6..474b596 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >@@ -1,42 +1,56 @@ > [% USE Koha %] > [% USE Biblio %] > [% SET biblio_object_id = object || biblionumber %] >+ > <div id="menu"> >-<ul> >- [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %] >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_object_id %]">Normal</a></li> >- >-[% IF ( can_view_MARC ) %] >-[% IF ( marcview ) %]<li class="active">[% ELSE %]<li>[% END %] >-<a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblio_object_id %]">MARC</a></li> >-[% END %] >- >-[% IF ( can_view_labeledMARC ) %] >- [% IF ( labeledmarcview ) %]<li class="active">[% ELSE %]<li>[% END %] >- <a href="/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=[% biblio_object_id %]">Labeled MARC</a></li> >-[% END %] >- >-[% IF ( can_view_ISBD ) %] >- [% IF ( isbdview ) %]<li class="active">[% ELSE %]<li>[% END %] >- <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% biblio_object_id %]">ISBD</a></li> >-[% END %] >- >- [% IF ( moredetailview ) %]<li class="active">[% ELSE %]<li>[% END %] >- <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio_object_id %]">Items</a></li> >- [% IF ( CAN_user_reserveforothers ) %] >- [% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio_object_id %]">Holds ([% Biblio.HoldsCount( biblio_object_id ) %])</a></li> >- [% END %] >- [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_object_id %]&analyze=1">Analytics</a></li>[% END %] >- [% IF Koha.Preference('ArticleRequests') %] >- [% IF ( article_requests_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% IF ( object ) %][% object %][% ELSE %][% biblionumber %][% END %]">Article requests</a></li> >- [% END %] >- >- [% IF ( subscriptionsnumber ) %]<li><a href="/cgi-bin/koha/serials/serials-search.pl?searched=1&biblionumber=[% biblio_object_id %]">Subscription(s)</a></li>[% END %] >-</ul> >-<ul> >-[% IF ( issuehistoryview ) %]<li class="active">[% ELSE %]<li>[% END %] >-<a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio_object_id %]" >Checkout history</a></li> >-[% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&modules=CATALOGUING&action=MODIFY&object=[% biblio_object_id %]">Modification log</a> </li>[% END %] >-</ul> >+ <ul> >+ [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_object_id %]">Normal</a></li> >+ >+ [% IF ( can_view_MARC ) %] >+ [% IF ( marcview ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblio_object_id %]">MARC</a></li> >+ [% END %] >+ >+ [% IF ( can_view_labeledMARC ) %] >+ [% IF ( labeledmarcview ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=[% biblio_object_id %]">Labeled MARC</a></li> >+ [% END %] >+ >+ [% IF ( can_view_ISBD ) %] >+ [% IF ( isbdview ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% biblio_object_id %]">ISBD</a></li> >+ [% END %] >+ >+ [% IF ( moredetailview ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio_object_id %]">Items</a></li> >+ >+ [% IF ( CAN_user_reserveforothers ) %] >+ [% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio_object_id %]">Holds ([% Biblio.HoldsCount( biblio_object_id ) %])</a></li> >+ [% END %] >+ >+ [% IF ( EasyAnalyticalRecords ) %] >+ [% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_object_id %]&analyze=1">Analytics</a></li> >+ [% END %] >+ >+ [% IF Koha.Preference('ArticleRequests') %] >+ [% IF ( article_requests_view ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% IF ( object ) %][% object %][% ELSE %][% biblionumber %][% END %]">Article requests ([% Biblio.ArticleRequestsActiveCount( biblio_object_id ) %])</a></li> >+ [% END %] >+ >+ [% IF ( subscriptionsnumber ) %]<li><a href="/cgi-bin/koha/serials/serials-search.pl?searched=1&biblionumber=[% biblio_object_id %]">Subscription(s)</a></li>[% END %] >+ </ul> >+ >+ <ul> >+ [% IF ( issuehistoryview ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio_object_id %]" >Checkout history</a></li> >+ >+ [% IF ( CAN_user_tools_view_system_logs ) %] >+ [% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %] >+ <a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&modules=CATALOGUING&action=MODIFY&object=[% biblio_object_id %]">Modification log</a> </li> >+ [% END %] >+ </ul> > </div> > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14610
:
42822
|
42823
|
42824
|
42825
|
42826
|
42827
|
42828
|
42829
|
43198
|
43199
|
43200
|
43201
|
43202
|
43264
|
43265
|
43266
|
43267
|
43268
|
43270
|
43271
|
43272
|
43273
|
43274
|
43278
|
43279
|
43280
|
43281
|
43282
|
43654
|
43655
|
43656
|
43657
|
43658
|
44219
|
44220
|
44221
|
44222
|
44223
|
44224
|
44225
|
44226
|
44227
|
44228
|
44229
|
44230
|
44231
|
44232
|
44233
|
44234
|
44235
|
44236
|
44237
|
44238
|
44239
|
44240
|
44241
|
44242
|
44916
|
44917
|
44918
|
44919
|
44920
|
44921
|
44922
|
44923
|
44924
|
44925
|
44926
|
45946
|
45947
|
45948
|
45949
|
45950
|
45951
|
45952
|
45953
|
45954
|
45955
|
45956
|
46518
|
46519
|
46520
|
46521
|
46522
|
46523
|
46524
|
46525
|
46526
|
46527
|
46528
|
46529
|
46530
|
46595
|
46596
|
46597
|
46598
|
46599
|
46600
|
46601
|
46602
|
46603
|
46604
|
46605
|
46606
|
46607
|
46608
|
46609
|
46610
|
46611
|
46612
|
47905
|
47906
|
47907
|
47908
|
47909
|
47910
|
47911
|
47912
|
47913
|
47914
|
47915
|
47916
|
47917
|
47918
|
47919
|
47920
|
47921
|
47922
|
48177
|
48178
|
48179
|
48180
|
48181
|
48182
|
48212
|
48213
|
48214
|
48215
|
48216
|
48217
|
48218
|
50348
|
50349
|
50350
|
50351
|
50352
|
50353
|
50354
|
51527
|
51528
|
51529
|
51530
|
51531
|
51532
|
51533
|
51534
|
51778
|
51779
|
51780
|
51781
|
51782
|
51783
|
52688
|
52689
|
52690
|
52691
|
52692
|
52693
|
55556
|
55557
|
55558
|
55559
|
55560
|
55561
|
55568
|
55569
|
56084
|
56085
|
56086
|
56087
|
56088
|
56089
|
56090
|
56318
|
56319
|
56320
|
56321
|
56322
|
56323
|
56324
|
56325
|
56326
|
56327
|
56328
|
56775
|
56776
|
56777
|
56778
|
56779
|
56780
|
56781
|
56782
|
56783
|
56784
|
56785
|
56816
|
56854
|
56855
|
56856
|
56857
|
56858
|
56859
|
56860
|
56861
|
56862
|
56863
|
56864
|
56865