version 1.25, 2009/03/24 10:22:03
|
version 1.34, 2009/05/30 20:41:34
|
Line 44 use Apache::lonmsgdisplay();
|
Line 44 use Apache::lonmsgdisplay();
|
use HTML::Entities(); |
use HTML::Entities(); |
|
|
|
|
sub start_columnSection{ |
sub start_columnSection { |
my ($r) = @_; |
my ($r) = @_; |
$r->print('<div class="LC_columnSection">'); |
$r->print('<div class="LC_columnSection">'); |
} |
} |
|
|
sub end_columnSection{ |
sub end_columnSection { |
my ($r) = @_; |
my ($r) = @_; |
$r->print('</div>'); |
$r->print('</div>'); |
} |
} |
|
|
sub print_aboutme_content_template{ |
sub print_aboutme_content_template { |
my ($r,$allowed,$target,$syllabusfields_ref,$syllabus_ref) = @_; |
my ($r,$allowed,$target,$syllabusfields_ref,$syllabus_ref) = @_; |
my %syllabusfields = %{$syllabusfields_ref}; |
my %syllabusfields = %{$syllabusfields_ref}; |
my %syllabus = %{$syllabus_ref}; |
my %syllabus = %{$syllabus_ref}; |
|
|
foreach my $field (sort(keys(%syllabusfields))) { |
foreach my $field (sort(keys(%syllabusfields))) { |
if (($syllabus{$field}) || ($allowed)) { |
if (($syllabus{$field}) || ($allowed)) { |
my $message=$syllabus{$field}; |
my $message=$syllabus{$field}; |
Line 70 sub print_aboutme_content_template{
|
Line 70 sub print_aboutme_content_template{
|
} |
} |
$message=&Apache::lontexconvert::msgtexconverted($message); |
$message=&Apache::lontexconvert::msgtexconverted($message); |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
if($allowed){ |
if ($allowed) { |
$r->print('<p>'); |
$r->print('<p>'); |
} |
} |
|
|
if($field eq 'aaa_contactinfo') { |
if($field eq 'aaa_contactinfo') { |
$r->print('<div class="LC_Clear_AboutMe_Image" > </div>'); |
$r->print('<div class="LC_Clear_AboutMe_Image" > </div>'); |
&print_template($r,$syllabusfields{$field},$message,$allowed,'LC_ContentBoxSpecial'); |
&print_template($r,$syllabusfields{$field},$message,$allowed,'LC_ContentBoxSpecial'); |
} |
} else { |
else{ |
|
&print_template($r,$syllabusfields{$field},$message,$allowed,'LC_ContentBoxSpecial'); |
&print_template($r,$syllabusfields{$field},$message,$allowed,'LC_ContentBoxSpecial'); |
} |
} |
|
|
} else { |
} else { |
$r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'. |
$r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'. |
&Apache::lonxml::xmlparse($r,'tex',$message).'\\\\'); |
&Apache::lonxml::xmlparse($r,'tex',$message).'\\\\'); |
} |
} |
if ($allowed) { |
if ($allowed) { |
&print_editbox_template($r,$syllabus{$field},$field); |
&print_editbox_template($r,$syllabus{$field},$field); |
if($target ne 'tex'){ |
if ($target ne 'tex') { |
$r->print('</p>'); |
$r->print('</p>'); |
} |
} |
} |
} |
} |
} |
} |
} |
|
|
} |
|
|
|
sub start_ContentBox{ |
|
my ($r,$allowed) = @_; |
|
$r->print('<div class="LC_ContentBox">'); |
|
|
|
} |
} |
|
|
sub end_ContentBox{ |
sub send_message { |
my ($r) = @_; |
|
$r->print('</div>'); |
|
} |
|
|
|
sub send_message{ |
|
my ($r,$cnum,$cdom) = @_; |
my ($r,$cnum,$cdom) = @_; |
my $s; |
my $s; |
my $image = qq{<img name="Send message" src="/res/adm/pages/com.png" border="none" />}; |
my $image = qq{<img name="Send message" src="/res/adm/pages/mail-message-new.png" border="none" align="middle" />}; |
$s=&Apache::loncommon::messagewrapper($image,$cnum,$cdom).' '.&Apache::loncommon::messagewrapper(&mt('Send me a message'),$cnum,$cdom); |
$s=&Apache::loncommon::messagewrapper($image,$cnum,$cdom).' '.&Apache::loncommon::messagewrapper(&mt('Send me a message'),$cnum,$cdom); |
return $s; |
return $s; |
} |
} |
|
|
sub print_template |
sub print_template |
{ |
{ |
my ($r,$topic,$content, $allowed,$boxclass) = @_; |
my ($r,$topic,$content, $allowed,$boxclass) = @_; |
$r->print('<div class="'.$boxclass.'">'); |
$r->print('<div class="'.$boxclass.'">'); |
$r->print('<h4 class="LC_hcell">'.$topic.'</h4>'); |
$r->print('<h4 class="LC_hcell">'.$topic.'</h4>'); |
$r->print('<p>' .$content . '</p>'); |
$r->print('<div class="LC_BoxPadding">' .$content . '</div>'); |
$r->print('</div>'); |
$r->print('</div>'); |
} |
} |
|
|
sub print_start_template |
sub print_start_template |
{ |
{ |
my ($r,$topic,$boxclass) = @_; |
my ($r,$topic,$boxclass) = @_; |
$r->print('<div class="'.$boxclass.'">'); |
$r->print('<div class="'.$boxclass.'">'); |
$r->print('<h4 class="LC_hcell">'.$topic.'</h4>'); |
$r->print('<h4 class="LC_hcell">'.$topic.'</h4>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
} |
} |
|
|
sub print_end_template |
sub print_end_template |
{ |
{ |
my ($r) = @_; |
my ($r) = @_; |
$r->print('</div>'); |
$r->print('</div>'); |
|
$r->print('</div>'); |
} |
} |
|
|
sub print_editbox_template |
sub print_editbox_template |
{ |
{ |
my ($r,$content,$field) = @_; |
my ($r,$content,$field) = @_; |
Line 143 sub print_editbox_template
|
Line 136 sub print_editbox_template
|
'</textarea><br /><input type="submit" name="storesyl" value="'. |
'</textarea><br /><input type="submit" name="storesyl" value="'. |
&mt('Save All').'" />'); |
&mt('Save All').'" />'); |
} |
} |
sub print_start_page_functions |
|
{ |
# Functionslist: List of functions |
my($r)=@_; |
# Typically used to display a list of available functions at top of page |
$r->print('<fieldset><legend>'. &mt('Functions') . '</legend>'); |
sub start_functionslist { |
} |
my($legendtext)=@_; |
sub print_functions_content |
$legendtext=&mt('Functions') if !$legendtext; |
{ |
return '<fieldset><legend>'.$legendtext.'</legend>' |
my($r,$content) = @_; |
.'<ul class="LC_functionslist">'; |
$r->print('<span class="LC_nobreak">• '.$content.'</span> '); |
} |
} |
|
sub print_end_page_functions |
sub item_functionslist { |
{ |
my($content) = @_; |
my($r)=@_; |
return '<li>'.$content.'</li>'; |
$r->print('</fieldset>'); |
} |
|
|
|
sub end_functionslist { |
|
my($r)=@_; |
|
return '</ul></fieldset>'; |
} |
} |
|
|
1; |
1; |