--- search/Search.cgi 2002/06/25 13:48:12 1.11 +++ search/Search.cgi 2002/06/25 19:31:07 1.20 @@ -232,25 +232,6 @@ $main::QueryReportMimeType = "application/x-wais-report"; - -# Hash of icon/images names that we use -%main::ImageNames = ( - 'banner', 'banner.gif', - 'collapse', 'collapse.gif', - 'expand', 'expand.gif', - 'inactive-search', 'inactive-search.gif', - 'active-search', 'active-search.gif', - 'inactive-search-history', 'inactive-search-history.gif', - 'active-search-history', 'active-search-history.gif', - 'inactive-saved-searches', 'inactive-saved-searches.gif', - 'active-saved-searches', 'active-saved-searches.gif', - 'inactive-document-folders','inactive-document-folders.gif', - 'active-document-folders', 'active-document-folders.gif', - 'inactive-settings', 'inactive-settings.gif', - 'active-settings', 'active-settings.gif', -); - - # Array of mime type names, we use this to map # mime types to mime type names (which are more readable) %main::MimeTypeNames = ( @@ -411,6 +392,7 @@ print("$JavaScript\n"); } print ''; + print ''; print("\n
\n"); @@ -521,47 +503,23 @@ } } - if ( %MenuBar && defined($MenuBar{'GetSearch'}) ) { - print(""); - - - } - else { - - print(""); + my $DISABLED; - - - } + $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : ""; + print(""); if ( defined($main::RemoteUser) ) { - if ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) { - print(""); - } - else { - print(""); - } + $DISABLED = ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) ? "DISABLED" : ""; + print""; - if ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) { - print(""); - } - else { - print(""); - } + $DISABLED = ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) ? "DISABLED" : ""; + print""; - if ( %MenuBar && defined($MenuBar{'ListFolder'}) ) { - print(""); - } - else { - print(""); - } - - if ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) { - print(""); - } - else { - print(""); - } + $DISABLED = ( %MenuBar && defined($MenuBar{'ListFolder'}) ) ? "DISABLED" : ""; + print""; + + $DISABLED = ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) ? "DISABLED" : ""; + print""; } @@ -1561,22 +1519,26 @@ my ($FieldName) = "FieldName" . $Value; my ($FieldContent) = "FieldContent" . $Value; + - - if ( defined($Content{$FieldName}) ) { - $SearchString .= defined($Content{$FieldContent}) ? - (($SearchString ne "") ? " AND " : "") . "$Content{$FieldName}=(" . $Content{$FieldContent} . ")" : ""; + if ( defined($Content{$FieldName}) && defined($Content{$FieldContent}) ) { + # nuke accented chars + $Content{$FieldContent} =~ tr/ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁčáíóúĄąŽžĘęźČşÁÂĚŞŻżĂăđĐĎËďŇÍÎěŢŮÓÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘¸¨˙Řř/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/; + # convert search string to lower case -> make search case insensitive + $Content{$FieldContent} =~ tr/A-Z/a-z/; + + if ($Content{$FieldName} eq "ISBN") { + # fix stupid problem with dashes in data + $Content{$FieldContent} .= "*"; + } + + $SearchString .= ($SearchString ne "") ? " AND " : ""; + $SearchString .= "$Content{$FieldName}=(" . $Content{$FieldContent} . ")"; } } - # nuke accented chars - $SearchString =~ tr/ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁčáíóúĄąŽžĘęźČşÁÂĚŞŻżĂăđĐĎËďŇÍÎěŢŮÓÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘¸¨˙Řř/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/; - # convert search string to lower case -> make search case insensitive - $SearchString =~ tr/A-Z/a-z/; - # Add the internal search terms - # Add the date restriction on the load time if ( defined($Content{'LastRunTime'}) && ($Content{'LastRunTime'} > 0) ) { $SearchString .= (($SearchString ne "") ? " AND " : "") . "time_t>=$Content{'LastRunTime'}"; @@ -1996,10 +1958,12 @@ # Print the title if ( $HTML ) { printf("Odabranima se smatraju svi rezultati ukoliko niste učinili nikakav dodatan odabir. | \n"); + print(" | ||
Odabrani su svi rezultati ukoliko niste učinili nikakav dodatan odabir. | \n"); if ( $ResultCount > 0 ) { @@ -2245,7 +2209,7 @@ if ( $main::ConfigurationData{'allow-relevance-feedback-searches'} eq "yes" ) { print(" | \n"); @@ -3062,11 +3011,13 @@ for (my $field=1; $field<= $nr_fields; $field++) { - print("||
"); + print " | |||
"; + print "Pretraži u odabranom polju:"; + print " | "; } - print (""); + print (" | "); print (" | \n"); } @@ -3106,13 +3057,8 @@ # Database selection if ( %main::DatabaseDescriptions ) { - print(" |
Odaberite bazu koju želite pretraživati: - | - Označi - sve, - niti jednu. - - | + print(" | |
Odaberite knjižnicu čiji fond želite pretraživati: | |||
");
# Parse out the database names and put them into a
@@ -3336,11 +3282,11 @@
# Check that at least one database was selected
if ( !defined($main::FormData{'Database'}) ) {
- print("Database Search:\n"); - print("\n");
+ print(" |
\n"); - print("You need to select at least one saved search in order to be able to perform an action on it.\n"); + print("Potrebno je odabrati barem jedan sačuvani upit nad kojim će se izvršiti akcija.\n"); print("
\n"); goto bailFromProcessSavedSearch; } @@ -5365,10 +5311,10 @@ if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) { if ( unlink($SavedSearchFilePath) ) { - printf("
Successfully deleted: %s\n", $Value{'SearchName'}); + printf("
Uspješno pobrisano: %s\n", $Value{'SearchName'}); } else { - printf("
Failed to delete: %s\n", $Value{'SearchName'}); + printf("
Nije pobrisano: %s\n", $Value{'SearchName'}); } } elsif ( ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") || ($ENV{'PATH_INFO'} eq "/SuspendSavedSearch") ) { @@ -5382,12 +5328,12 @@ $Value{'SearchStatus'} = ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "Active" : "Inactive" ; if ( &iSaveXMLFileFromHash($SavedSearchFilePath, "SavedSearch", %Value) ) { - printf("
Successfully %s: %s\n", - ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'}); + printf("
Uspješno %s: %s\n", + ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "uključeno" : "isključeno", $Value{'SearchName'}); } else { - printf("
Failed to %s: %s\n", - ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'}); + printf("
Nije %s: %s\n", + ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "uključeno" : "isključeno", $Value{'SearchName'}); } } } @@ -5489,7 +5435,7 @@ # Print up the title - print("