version 1.361, 2025/03/18 18:57:28
|
version 1.362, 2025/03/19 15:18:59
|
Line 717 function additional_metadata() {
|
Line 717 function additional_metadata() {
|
&titlefield(&mt('Copyright/Distribution')).'</label>') |
&titlefield(&mt('Copyright/Distribution')).'</label>') |
.&Apache::lonmeta::selectbox('copyright', |
.&Apache::lonmeta::selectbox('copyright', |
$env{'form.copyright'},'', |
$env{'form.copyright'},'', |
'copyright', |
'copyright', |
\&Apache::loncommon::copyrightdescription, |
\&Apache::loncommon::copyrightdescription, |
( undef, |
( undef, |
&Apache::loncommon::copyrightids) |
&Apache::loncommon::copyrightids) |
Line 726 function additional_metadata() {
|
Line 726 function additional_metadata() {
|
} |
} |
|
|
$scrout .= &Apache::lonhtmlcommon::row_title('<label for="language">'. |
$scrout .= &Apache::lonhtmlcommon::row_title('<label for="language">'. |
&titlefield(&mt('Language'))'</label>') |
&titlefield(&mt('Language')).'</label>') |
.&Apache::lonmeta::selectbox('language', |
.&Apache::lonmeta::selectbox('language', |
$env{'form.language'},'','language', |
$env{'form.language'},'','language', |
\&Apache::loncommon::languagedescription, |
\&Apache::loncommon::languagedescription, |
Line 764 function additional_metadata() {
|
Line 764 function additional_metadata() {
|
.' value="'.$env{'form.addedvalues_'.$j}.'" aria-label="'.$valuelabel.'" />' |
.' value="'.$env{'form.addedvalues_'.$j}.'" aria-label="'.$valuelabel.'" />' |
.&Apache::lonhtmlcommon::row_closure(); |
.&Apache::lonhtmlcommon::row_closure(); |
} |
} |
my $addcustomlabel = &mt('Add metadata field option'); |
my $addcustomlabel = &mt('Add metadata field option'); |
$scrout .= &Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.$addcustomlabel.'</span>', |
$scrout .= &Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.$addcustomlabel.'</span>', |
'','','',1) |
'','','',1) |
.'<label>' |
.'<label>' |
Line 1302 sub parse_advanced_search {
|
Line 1302 sub parse_advanced_search {
|
if (! $fillflag) { |
if (! $fillflag) { |
&output_blank_field_error($r,$closebutton, |
&output_blank_field_error($r,$closebutton, |
'phase=disp_adv',$hidden_fields); |
'phase=disp_adv',$hidden_fields); |
return ; |
return; |
} |
} |
# Turn the form input into a SQL-based query |
# Turn the form input into a SQL-based query |
my $query=''; |
my $query=''; |
Line 2144 sub print_sort_form {
|
Line 2144 sub print_sort_form {
|
&Apache::lonhtmlcommon::breadcrumbs('Searching','Searching', |
&Apache::lonhtmlcommon::breadcrumbs('Searching','Searching', |
$env{'form.catalogmode'} ne 'import', |
$env{'form.catalogmode'} ne 'import', |
'','','','','','',$target); |
'','','','','','',$target); |
|
|
my $result = <<END; |
my $result = <<END; |
$start_page |
$start_page |
$breadcrumbs |
$breadcrumbs |
|
<div class="LC_landmark" role="main"> |
<form name="statusform" action="" method="post" target="$target"> |
<form name="statusform" action="" method="post" target="$target"> |
<input type="hidden" name="catalogmode" value="import" /> |
<input type="hidden" name="catalogmode" value="import" /> |
<input type="hidden" name="acts" value="" /> |
<input type="hidden" name="acts" value="" /> |
Line 2170 END
|
Line 2170 END
|
.' '.$revise.'</p>' |
.' '.$revise.'</p>' |
.'<p>'.&mt('Search: ').$pretty_query_string |
.'<p>'.&mt('Search: ').$pretty_query_string |
.'</p></form>'; |
.'</p></form>'; |
$r->print($result.&Apache::loncommon::end_page()); |
$r->print($result.'</div>'.&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
|
|
Line 2420 sub run_search {
|
Line 2420 sub run_search {
|
$r->print(<<END); |
$r->print(<<END); |
$start_page |
$start_page |
$breadcrumbs |
$breadcrumbs |
|
<div class="LC_landmark" role="main"> |
END |
END |
# Remove leading and trailing <br /> |
# Remove leading and trailing <br /> |
$pretty_string =~ s:^\s*<br />::i; |
$pretty_string =~ s:^\s*<br />::i; |
Line 2647 END
|
Line 2648 END
|
# We have run out of time or run out of servers to talk to and |
# We have run out of time or run out of servers to talk to and |
# results to get, so let the client know the top frame needs to be |
# results to get, so let the client know the top frame needs to be |
# loaded from /adm/searchcat |
# loaded from /adm/searchcat |
$r->print(&Apache::loncommon::end_page()); |
$r->print('</div>'.&Apache::loncommon::end_page()); |
# if ($env{'form.catalogmode'} ne 'import') { |
# if ($env{'form.catalogmode'} ne 'import') { |
$r->print(<<SCRIPT); |
$r->print(<<SCRIPT); |
<script> |
<script> |
Line 2711 sub display_results {
|
Line 2712 sub display_results {
|
if (!defined($viewfunction)) { |
if (!defined($viewfunction)) { |
$r->print('<p class="LC_error">' |
$r->print('<p class="LC_error">' |
.&mt('Internal Error - Bad view selected.') |
.&mt('Internal Error - Bad view selected.') |
.'</p>'."\n"); |
.'</p>'."\n" |
|
.'</form></div>'.&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |
return; |
return; |
} |
} |
Line 2733 sub display_results {
|
Line 2735 sub display_results {
|
$r->print('<p class="LC_error">'. |
$r->print('<p class="LC_error">'. |
&mt('Unable to save import results.'). |
&mt('Unable to save import results.'). |
'</p>'. |
'</p>'. |
'</form>'. |
'</form></div>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |
return; |
return; |
Line 2754 sub display_results {
|
Line 2756 sub display_results {
|
$r->print('<p class="LC_error">'. |
$r->print('<p class="LC_error">'. |
&mt('A MySQL error has occurred.'). |
&mt('A MySQL error has occurred.'). |
'</p>'. |
'</p>'. |
'</form>'. |
'</form></div>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
&Apache::lonnet::logthis("lonmysql was unable to determine the number". |
&Apache::lonnet::logthis("lonmysql was unable to determine the number". |
" of rows in table ".$table); |
" of rows in table ".$table); |
Line 2859 sub display_results {
|
Line 2861 sub display_results {
|
$env{'form.sortorder'}='asc'; |
$env{'form.sortorder'}='asc'; |
} |
} |
} |
} |
my $sortform = '<span class="LC_nobreak">' |
my $sortform = '<span class="LC_nobreak"><span id="LC_sortby">' |
.&mt('Sort by:').' ' |
.&mt('Sort by:').'</span> ' |
.&Apache::loncommon::select_form($env{'form.sortfield'}, |
.&Apache::loncommon::select_form($env{'form.sortfield'}, |
'sortfield', |
'sortfield', |
\%sort_fields) |
\%sort_fields,'','','', |
|
'LC_sortby') |
.' ' |
.' ' |
.&Apache::loncommon::select_form($env{'form.sortorder'}, |
.&Apache::loncommon::select_form($env{'form.sortorder'}, |
'sortorder', |
'sortorder', |
{asc =>&mt('Ascending'), |
{asc =>&mt('Ascending'), |
desc=>&mt('Descending') |
desc=>&mt('Descending') |
}) |
},'','','','LC_sortby') |
.'</span>'; |
.'</span>'; |
## |
## |
## Display links for 'prev' and 'next' pages (if necessary) and Display Options |
## Display links for 'prev' and 'next' pages (if necessary) and Display Options |
Line 2883 sub display_results {
|
Line 2886 sub display_results {
|
); |
); |
|
|
if ($total_results == 0) { |
if ($total_results == 0) { |
$r->print('<p class="LC_info">'.&mt('There are currently no results.').'</p>'. |
$r->print('<h1 class="LC_search_results">'.&mt('There are currently no results.').'</h1>'. |
"</form>". |
'</form></div>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
return; |
return; |
} else { |
} else { |
$r->print('<div>'. |
$r->print('<h1 class="LC_search_results">'. |
mt('Results [_1] to [_2] out of [_3]', |
mt('Results [_1] to [_2] out of [_3]', |
$min,$max,$total_results). |
$min,$max,$total_results). |
"</div>\n"); |
"</h1>\n"); |
} |
} |
## |
## |
## Get results from MySQL table |
## Get results from MySQL table |
Line 2921 sub display_results {
|
Line 2924 sub display_results {
|
if ($area eq 'portfolio') { |
if ($area eq 'portfolio') { |
$tabletype = 'portfolio_search'; |
$tabletype = 'portfolio_search'; |
} |
} |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table(). |
|
&Apache::loncommon::start_data_table_header_row(). |
|
'<th>'.&mt('Data').'</th>'); |
|
if (($env{'form.viewselect'} eq 'detailedpreview') || |
|
($env{'form.viewselect'} eq 'summarypreview')) { |
|
$r->print('<th>'.&mt('Preview').'</th>'); |
|
} |
|
$r->print(&Apache::loncommon::end_data_table_header_row()); |
foreach my $row (@Results) { |
foreach my $row (@Results) { |
if ($connection->aborted()) { |
if ($connection->aborted()) { |
&cleanup(); |
&cleanup(); |
Line 2959 sub display_results {
|
Line 2969 sub display_results {
|
$env{'form.persistent_db_id'}) |
$env{'form.persistent_db_id'}) |
); |
); |
} |
} |
$r->print("</form>".&Apache::loncommon::end_page()); |
$r->print('</form></div>'.&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |
untie %groupsearch_db if (tied(%groupsearch_db)); |
untie %groupsearch_db if (tied(%groupsearch_db)); |
return; |
return; |
Line 3270 SCRIPT
|
Line 3280 SCRIPT
|
'add_modal' =>1}); |
'add_modal' =>1}); |
my $result=<<END; |
my $result=<<END; |
$start_page |
$start_page |
|
<div class="LC_landmark" role="main"> |
<form name="results" method="post" action="/adm/searchcat"> |
<form name="results" method="post" action="/adm/searchcat"> |
$importbutton |
$importbutton |
END |
END |
Line 3294 sub print_frames_interface {
|
Line 3305 sub print_frames_interface {
|
my $results_link = &results_link(); |
my $results_link = &results_link(); |
my $js = <<JS; |
my $js = <<JS; |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
var targetwin = opener; |
var targetwin = opener; |
var queue = ''; |
var queue = ''; |
|
|
Line 3316 function done_loading_results() {
|
Line 3328 function done_loading_results() {
|
update_results(new_location); |
update_results(new_location); |
} |
} |
} |
} |
|
// ]]> |
</script> |
</script> |
JS |
JS |
|
|