[Koha-patches] [PATCH] Bug 13773 - add stock number to details and items display

2015-03-05 Thread Dobrica Pavlinusic
This patch adds stocknumber (named Inventory number in interface)
to details table and items display if it exists.

Test scenario:
1. find item(s) which have inventory number assigned
2. verify that you don't see inventory number in items display
3. apply this patch
4. verify that inventory number is now available
---
 catalogue/detail.pl|3 ++-
 .../prog/en/modules/catalogue/detail.tt|4 
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/catalogue/detail.pl b/catalogue/detail.pl
index adf6823..95513b7 100755
--- a/catalogue/detail.pl
+++ b/catalogue/detail.pl
@@ -224,7 +224,7 @@ foreach my $item (@items) {
 $item-{'ccode'} = $collections-{$ccode} if ( defined( $ccode )  
defined($collections)  exists( $collections-{$ccode} ) );
 my $copynumber = $item-{'copynumber'};
 $item-{'copynumber'} = $copynumbers-{$copynumber} if ( 
defined($copynumber)  defined($copynumbers)  exists( 
$copynumbers-{$copynumber} ) );
-foreach (qw(ccode enumchron copynumber itemnotes uri)) {
+foreach (qw(ccode enumchron copynumber stocknumber itemnotes uri)) {
 $itemfields{$_} = 1 if ( $item-{$_} );
 }
 
@@ -313,6 +313,7 @@ $template-param(
itemdata_enumchron  = $itemfields{enumchron},
itemdata_uri= $itemfields{uri},
itemdata_copynumber = $itemfields{copynumber},
+   itemdata_stocknumber = $itemfields{stocknumber},
volinfo = $itemfields{enumchron},
 itemdata_itemnotes  = $itemfields{itemnotes},
z3950_search_params = C4::Search::z3950_search_args($dat),
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt 
b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
index ee5915e..1aa765e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -561,6 +561,7 @@ function verify_images() {
 [% IF ( volinfo ) %]thPublication details/th[% END %]
 [% IF ( itemdata_uri ) %]thurl/th[% END %]
 [% IF ( itemdata_copynumber ) %]thCopy number/th[% END %]
+[% IF ( itemdata_stocknumber ) %]thInventory number/th[% 
END %]
 [% IF materials %]thMaterials specified/th[% END %]
 [% IF ( itemdata_itemnotes ) %]thPublic notes/th[% END %]
 [% IF ( SpineLabelShowPrintOnBibDetails ) %]thSpine 
label/th[% END %]
@@ -725,6 +726,9 @@ function verify_images() {
 [% IF ( itemdata_copynumber ) %]
 td class=copynumber[% item.copynumber %]/td
 [% END %]
+[% IF ( itemdata_stocknumber ) %]
+td class=stocknumber[% item.stocknumber %]/td
+[% END %]
 [% IF materials %]
 td class=materials [% item.materials %] /td
 [% END %]
-- 
1.7.2.5

___
Koha-patches mailing list
Koha-patches@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-patches] [PATCH] Bug 13773 - add stock number to details and items display

2015-03-02 Thread Dobrica Pavlinusic
This patch adds stocknumber to details table and items display if it exists.

Test scenario:
1. find item(s) which have stock number assigned
2. verify that you don't see stock number in items display
3. apply this patch
4. verify that stock number is now available
---
 catalogue/detail.pl|3 ++-
 .../prog/en/modules/catalogue/detail.tt|5 +
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/catalogue/detail.pl b/catalogue/detail.pl
index adf6823..95513b7 100755
--- a/catalogue/detail.pl
+++ b/catalogue/detail.pl
@@ -224,7 +224,7 @@ foreach my $item (@items) {
 $item-{'ccode'} = $collections-{$ccode} if ( defined( $ccode )  
defined($collections)  exists( $collections-{$ccode} ) );
 my $copynumber = $item-{'copynumber'};
 $item-{'copynumber'} = $copynumbers-{$copynumber} if ( 
defined($copynumber)  defined($copynumbers)  exists( 
$copynumbers-{$copynumber} ) );
-foreach (qw(ccode enumchron copynumber itemnotes uri)) {
+foreach (qw(ccode enumchron copynumber stocknumber itemnotes uri)) {
 $itemfields{$_} = 1 if ( $item-{$_} );
 }
 
@@ -313,6 +313,7 @@ $template-param(
itemdata_enumchron  = $itemfields{enumchron},
itemdata_uri= $itemfields{uri},
itemdata_copynumber = $itemfields{copynumber},
+   itemdata_stocknumber = $itemfields{stocknumber},
volinfo = $itemfields{enumchron},
 itemdata_itemnotes  = $itemfields{itemnotes},
z3950_search_params = C4::Search::z3950_search_args($dat),
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt 
b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
index ee5915e..02730b3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -561,6 +561,7 @@ function verify_images() {
 [% IF ( volinfo ) %]thPublication details/th[% END %]
 [% IF ( itemdata_uri ) %]thurl/th[% END %]
 [% IF ( itemdata_copynumber ) %]thCopy number/th[% END %]
+[% IF ( itemdata_stocknumber ) %]thStock number/th[% END %]
 [% IF materials %]thMaterials specified/th[% END %]
 [% IF ( itemdata_itemnotes ) %]thPublic notes/th[% END %]
 [% IF ( SpineLabelShowPrintOnBibDetails ) %]thSpine 
label/th[% END %]
@@ -725,6 +726,9 @@ function verify_images() {
 [% IF ( itemdata_copynumber ) %]
 td class=copynumber[% item.copynumber %]/td
 [% END %]
+[% IF ( itemdata_stocknumber ) %]
+td class=stocknumber[% item.stocknumber %]/td
+[% END %]
 [% IF materials %]
 td class=materials [% item.materials %] /td
 [% END %]
@@ -788,6 +792,7 @@ function verify_images() {
table
trtditemdata_enumchron/tdtd[% 
itemdata_enumchron %]/td/tr
trtditemdata_copynumber/tdtd[% 
itemdata_copynumber %]/td/tr
+   trtditemdata_stocknumber/tdtd[% 
itemdata_stocknumber %]/td/tr
trtdserial/tdtd[% serial %]/td/tr
/table
 [% END %]
-- 
1.7.2.5

___
Koha-patches mailing list
Koha-patches@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/