version 1.94.2.1, 2009/08/14 02:16:31
|
version 1.101, 2010/08/24 09:11:40
|
Line 43 use HTML::Entities();
|
Line 43 use HTML::Entities();
|
# --------------------------------------------------------- Build up RAT screen |
# --------------------------------------------------------- Build up RAT screen |
sub ratedt { |
sub ratedt { |
my ($r,$url)=@_; |
my ($r,$url)=@_; |
my %layout = ('border' => "0"); |
my %layout = ('border' => "0", |
if ($env{'environment.remote'} eq 'off') { |
'rows' => "1,250,*"); |
$layout{'rows'} = "1,250,*"; |
|
} else { |
|
$layout{'rows'} = "1,70,*"; |
|
} |
|
my $js =' |
my $js =' |
<script type="text/javascript"> |
<script type="text/javascript"> |
var flag=0; |
var flag=0; |
Line 58 sub ratedt {
|
Line 54 sub ratedt {
|
&Apache::loncommon::start_page('Edit Sequence',$js, |
&Apache::loncommon::start_page('Edit Sequence',$js, |
{'frameset' => 1, |
{'frameset' => 1, |
'add_entries' => \%layout}); |
'add_entries' => \%layout}); |
|
|
my $end_page = |
my $end_page = |
&Apache::loncommon::end_page({'frameset' => 1}); |
&Apache::loncommon::end_page({'frameset' => 1}); |
|
|
Line 77 sub buttons {
|
Line 74 sub buttons {
|
my $adv=shift; |
my $adv=shift; |
my $output='<form method="post">'; |
my $output='<form method="post">'; |
if ($adv==1) { |
if ($adv==1) { |
$output.='<input type="submit" name="forceadv" value="'.&mt('Edit').'" />'. |
$output.= |
&Apache::loncommon::help_open_topic('Sequence_Advanced_Editor_Creation'); |
'<input type="submit" name="forceadv"' |
|
.' value="'.&mt('Edit').'" />' |
|
.&Apache::loncommon::help_open_topic( |
|
'Sequence_Advanced_Editor_Creation'); |
} else { |
} else { |
unless ($adv==2) { |
unless ($adv==2) { |
$output.='<input type="submit" name="forcesmp" value="'.&mt('Simple Edit').'" />'. |
$output.= |
&Apache::loncommon::help_open_topic('Sequence_Simple_Editor_Creation'); |
'<input type="submit" name="forcesmp"' |
|
.' value="'.&mt('Simple Edit').'" />' |
|
.&Apache::loncommon::help_open_topic( |
|
'Sequence_Simple_Editor_Creation') |
|
.' '; |
} |
} |
$output.='<input type="submit" name="forceadv" value="'.&mt('Advanced Edit').'" />'. |
$output.= |
&Apache::loncommon::help_open_topic('Sequence_Advanced_Editor_Creation'); |
'<input type="submit" name="forceadv"' |
|
.' value="'.&mt('Advanced Edit').'" />' |
|
.&Apache::loncommon::help_open_topic( |
|
'Sequence_Advanced_Editor_Creation'); |
} |
} |
return $output.'</form><hr />'; |
return $output.'</form>'; |
} |
} |
|
|
# ----------------------------------------------------------------- Edit script |
# ----------------------------------------------------------------- Edit script |
Line 144 function idxopen(mode) {
|
Line 151 function idxopen(mode) {
|
} |
} |
|
|
// ------------------------------------------------------ Open groupsort window |
// ------------------------------------------------------ Open groupsort window |
function groupopen(url,recover,bookmarks) { |
function groupopen(url,recover) { |
var options="scrollbars=1,resizable=1,menubar=0"; |
var options="scrollbars=1,resizable=1,menubar=0"; |
idxflag=1; |
idxflag=1; |
idx=open("/adm/groupsort?inhibitmenu=yes&mode=$mode&recover="+recover+"&readfile="+url+"&bookmarks="+bookmarks,"idxout",options); |
idx=open("/adm/groupsort?inhibitmenu=yes&mode=$mode&recover="+recover+"&readfile="+url,"idxout",options); |
idx.focus(); |
idx.focus(); |
} |
} |
|
|
Line 214 ENDSCRIPT
|
Line 221 ENDSCRIPT
|
|
|
sub smpedt { |
sub smpedt { |
my ($r,$url,$errtext)=@_; |
my ($r,$url,$errtext)=@_; |
my $buttons=&buttons(2); |
|
my $tmpfn=&Apache::lonnet::filelocation('',$url).'.tmp'; |
my $tmpfn=&Apache::lonnet::filelocation('',$url).'.tmp'; |
my $targetmsg=''; |
my $targetmsg=''; |
if ($env{'form.save'}) { |
if ($env{'form.save'}) { |
Line 485 sub smpedt {
|
Line 491 sub smpedt {
|
'nt' => 'New Title', |
'nt' => 'New Title', |
'se' => 'Search', |
'se' => 'Search', |
'im' => 'Import', |
'im' => 'Import', |
'bk' => 'Import Bookmarks', |
'wl' => 'Import from Wishlist', |
'vi' => 'View', |
'vi' => 'View', |
'lm' => 'Load Map', |
'lm' => 'Load Map', |
'ds' => 'Discard Selected', |
'ds' => 'Discard Selected', |
Line 540 sub smpedt {
|
Line 546 sub smpedt {
|
</script> |
</script> |
ENDJS |
ENDJS |
|
|
my $start_page = &Apache::loncommon::start_page(undef,$js). |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::loncommon::help_open_menu('Sequence_Simple_Editor_Creation', |
&Apache::lonhtmlcommon::add_breadcrumb({ |
'Sequence_Simple_Editor_Creation', |
text => 'Construction Space', |
6,'RAT'); |
href => &Apache::loncommon::authorspace(), |
|
faq => 6, |
|
bug => 'RAT', |
|
help => 'Sequence_Simple_Editor_Creation',}); |
|
&Apache::lonhtmlcommon::add_breadcrumb({ |
|
text => 'RAT', |
|
title => 'Resource Assembly Tool', |
|
href => '',}); |
|
&Apache::lonhtmlcommon::add_breadcrumb({ |
|
text => 'Editor', |
|
title => 'Simple Editor', |
|
href => '',}); |
|
|
|
# Breadcrumbs are included by &start_page |
|
my $start_page = &Apache::loncommon::start_page('Construction Space',$js) |
|
.&Apache::loncommon::head_subbox( |
|
&Apache::loncommon::CSTR_pageheader() |
|
.&buttons(2)); |
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
|
|
$r->print(<<ENDSMPHEAD); |
$r->print(<<ENDSMPHEAD); |
$start_page |
$start_page |
$buttons |
|
<span class="LC_error">$errtext</span> |
<span class="LC_error">$errtext</span> |
<form name="simpleedit" method="post"> |
<form name="simpleedit" method="post"> |
<input type="hidden" name="forcesmp" value="1" /> |
<input type="hidden" name="forcesmp" value="1" /> |
Line 579 value="Select Map" /><input type="submit
|
Line 601 value="Select Map" /><input type="submit
|
<input type="button" onClick= |
<input type="button" onClick= |
"javascript:impfortarget.value=1;groupimport();" value="$lt{'im'}" /> |
"javascript:impfortarget.value=1;groupimport();" value="$lt{'im'}" /> |
<input type="button" onClick= |
<input type="button" onClick= |
"javascript:impfortarget.value=1;groupopen(0,1,1);" value="$lt{'bk'}" /> |
"javascript:impfortarget.value=1;open_Wishlist_Import('simple');" value="$lt{'wl'}" /> |
<input type="button" onClick= |
<input type="button" onClick= |
"javascript:impfortarget.value=1;groupopen('$url',1,0);" value="$lt{'reco'}" /> |
"javascript:impfortarget.value=1;groupopen('$url',1);" value="$lt{'reco'}" /> |
$lt{'as'} |
$lt{'as'} |
<hr /> |
<hr /> |
<input type="submit" name="moveup" value="$lt{'mu'}" /> |
<input type="submit" name="moveup" value="$lt{'mu'}" /> |
Line 624 ENDSMPHEAD
|
Line 646 ENDSMPHEAD
|
sub nodir { |
sub nodir { |
my ($r,$dir)=@_; |
my ($r,$dir)=@_; |
$dir=~s{^/home/$LONCAPA::username_re/public_html}{}; |
$dir=~s{^/home/$LONCAPA::username_re/public_html}{}; |
$r->print(&Apache::loncommon::start_page(undef,undef, |
my $brcrum = [{'href' => &Apache::loncommon::authorspace(), |
{'only_body' => 1, |
'text' => 'Construction Space'}]; |
'bgcolor' => '#FFFFFF',}). |
# {'href' => '', |
'<p class="LC_error">'. |
# 'text' => 'No such directory'}]; |
&mt('No such directory: [_1]','<span class="LC_filename">'.$dir.'</span>'). |
$r->print(&Apache::loncommon::start_page('Construction Space', |
'</p>'. |
undef, |
&Apache::loncommon::end_page()); |
{'bread_crumbs' => $brcrum,}) |
|
.&Apache::loncommon::head_subbox( |
|
&Apache::loncommon::CSTR_pageheader()) |
|
.'<p class="LC_error">' |
|
.&mt('No such directory: [_1]','<span class="LC_filename">'.$dir.'</span>' |
|
.'</p>' |
|
.&Apache::loncommon::end_page()) |
|
); |
} |
} |
|
|
# ---------------------------------------------------------------- View Handler |
# ---------------------------------------------------------------- View Handler |
|
|
sub viewmap { |
sub viewmap { |
my ($r,$url,$adv,$errtext)=@_; |
my ($r,$url,$adv,$errtext)=@_; |
$r->print( |
|
&Apache::loncommon::start_page('Edit Content of a Map'). |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::loncommon::help_open_menu('','',6,'RAT'). |
&Apache::lonhtmlcommon::add_breadcrumb({ |
&buttons($adv)); |
text => 'Construction Space', |
|
href => &Apache::loncommon::authorspace(), |
|
faq => 6, |
|
bug => 'RAT', |
|
help => 'Sequence_Simple_Editor_Creation',}); |
|
&Apache::lonhtmlcommon::add_breadcrumb({ |
|
text => 'RAT', |
|
title => 'Resource Assembly Tool', |
|
href => '',}); |
|
|
|
# Breadcrumbs are included by &start_page |
|
$r->print(&Apache::loncommon::start_page('Edit Content of a Map') |
|
.&Apache::loncommon::head_subbox( |
|
&Apache::loncommon::CSTR_pageheader() |
|
.&buttons($adv)) |
|
); |
if ($errtext) { |
if ($errtext) { |
$r->print('<div class="LC_error">' |
$r->print('<div class="LC_error">' |
.$errtext |
.$errtext |