@@ -, +, @@ - The size of the pop-up window has been increased slightly for a less cramped display. - Page structure has been updated to match similar pop-up windows. - Page structure has been improved to further accommodate the option of viewing the call number browser as a full page rather than a pop-up window (although as far as I can tell it is not linked to in this mode anywhere). - Row highlighting has been updated so that page styles are not being passed explicitly by the script. Highlight colors have been changed to make things more readable. - DataTables-related markup has been removed because it was not being used. It doesn't make sense to re-order table rows when the purpose of the table is to display call number order. - Create or edit an item in cataloging. - Enter an existing call number into the call number field. - Click the '...' link next to the call number. - In the call number browser pop-up, verify that items matching your call number are highlighted in red. - Verify that the new 'Close' button at the bottom of the page works correctly. - Enter a call number which doesn't exist in the call number field - Click the '...' link to trigger the browser. - Verify that there is a row highlighted in green marking the sort order of the call number you chose. - Navigate directly to /cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl - The page should appear like a normal full page, with header search, breadcrumbs, etc. Performing a search for call numbers should work like it did in the pop-up context. Works as described. Pleasing to the eye --- cataloguing/value_builder/cn_browser.pl | 12 +-- .../cataloguing/value_builder/cn_browser.tt | 108 +++++++++++++-------- 2 files changed, 74 insertions(+), 46 deletions(-) --- a/cataloguing/value_builder/cn_browser.pl +++ a/cataloguing/value_builder/cn_browser.pl @@ -15,7 +15,7 @@ sub plugin_javascript { function Clic$function_name(i) { q = document.getElementById('$field_number'); - window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q=\"+q.value,\"cnbrowser\",\"width=500,height=400,toolbar=false,scrollbars=yes\"); + window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q=\"+q.value,\"cnbrowser\",\"width=750,height=400,toolbar=false,scrollbars=yes\"); } //]]> @@ -90,11 +90,11 @@ sub plugin { $sth->execute($cn_sort); while ( my $data = $sth->fetchrow_hashref ) { if ( $data->{itemcallnumber} eq $q ) { - $data->{background} = 'red'; + $data->{duplicate} = 1; $red = 1; } elsif ( ( GetClassSort( undef, undef, $data->{itemcallnumber} ) lt $cn_sort_q ) && !$green && !$red ) { if ( $#cn != -1 ) { - unshift @cn, { 'background' => 'green' }; + unshift @cn, { 'duplicate' => 0 }; $globalGreen = 1; } $green = 1; @@ -121,10 +121,10 @@ sub plugin { while ( my $data = $sth->fetchrow_hashref ) { if ( $data->{itemcallnumber} eq $q ) { - $data->{background} = 'red'; + $data->{duplicate} = 1; $red = 1; } elsif ( ( GetClassSort( undef, undef, $data->{itemcallnumber} ) gt $cn_sort_q ) && !$green && !$red && !$globalGreen ) { - push @cn, { 'background' => 'green' }; + push @cn, { 'duplicate' => 0 }; $green = 1; } push @cn, $data; @@ -132,7 +132,7 @@ sub plugin { $rows_gt = $sth->rows; if ( !$green && !$red && !$globalGreen ) { - push @cn, { 'background' => 'green' }; + push @cn, { 'duplicate' => 0 }; } $sth->finish; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt @@ -1,61 +1,89 @@ [% INCLUDE 'doc-head-open.inc' %] -
Call Number | +Call number | Title | -Branch | +Library | |
---|---|---|---|---|---|
[% cn_loo.itemcallnumber %] | -- - [% cn_loo.title %] [% cn_loo.subtitle %] [% cn_loo.subtitle2 %] - [% IF ( cn_loo.author ) %] - by [% cn_loo.author %] - [% END %] - - | -[% cn_loo.branchname %] | + [% IF ( cn_loo.duplicate == 0 ) %] +|||
[% q %] |
+ Call number is not in use | ++ [% ELSE %] + | [% cn_loo.itemcallnumber %] | ++ + [% cn_loo.title %] [% cn_loo.subtitle %] [% cn_loo.subtitle2 %] + [% IF ( cn_loo.author ) %] + by [% cn_loo.author %] + [% END %] + + | +[% cn_loo.branchname %] | + [% END %]