version 1.11, 2008/12/17 10:57:01
|
version 1.36, 2009/06/08 18:04:46
|
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="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_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}; |
&start_ContentBox($r,$allowed); |
|
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_content_template{
|
Line 70 sub print_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>'); |
} |
} |
&print_template($r,$syllabusfields{$field},$message,$allowed); |
|
|
if($field eq 'aaa_contactinfo') { |
|
$r->print('<div class="LC_Clear_AboutMe_Image" > </div>'); |
|
&print_template($r,$syllabusfields{$field},$message,$allowed,'LC_Box'); |
|
} else { |
|
&print_template($r,$syllabusfields{$field},$message,$allowed,'LC_Box'); |
|
} |
|
|
} 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>'); |
} |
} |
} |
} |
} |
} |
} |
} |
&end_ContentBox($r); |
|
} |
} |
|
|
sub start_ContentBox{ |
sub send_message { |
my ($r,$allowed) = @_; |
my ($r,$cnum,$cdom) = @_; |
if($allowed){ |
my $s; |
$r->print('<div class="ContentBoxTemplate">'); |
my $image = qq{<img name="Send message" src="/res/adm/pages/mail-message-new.png" border="none" align="middle" />}; |
}else{ |
$s=&Apache::loncommon::messagewrapper($image,$cnum,$cdom).' '.&Apache::loncommon::messagewrapper(&mt('Send me a message'),$cnum,$cdom); |
$r->print('<div class="ContentBox">'); |
return $s; |
} |
|
} |
} |
|
|
sub end_ContentBox{ |
sub print_template { |
my ($r) = @_; |
my ($r,$topic,$content, $allowed,$boxclass) = @_; |
|
$r->print('<div class="'.$boxclass.'">'); |
|
$r->print('<h4 class="LC_hcell">'.$topic.'</h4>'); |
|
$r->print($content); |
$r->print('</div>'); |
$r->print('</div>'); |
} |
} |
|
|
sub send_message{ |
sub print_start_template { |
my ($r,$cnum,$cdom) = @_; |
my ($r,$topic,$boxclass) = @_; |
$r->print('<div>'); |
$r->print('<div class="'.$boxclass.'">'); |
$r->print(&Apache::loncommon::messagewrapper(qq{<img name="sendMessage" src="/res/adm/pages/com.png"},$cnum,$cdom).' '.&mt('Send me a message')); |
$r->print('<h4 class="LC_hcell">'.$topic.'</h4>'); |
$r->print('</div>'); |
|
} |
} |
|
|
sub print_template |
sub print_end_template { |
{ |
my ($r) = @_; |
my ($r,$topic,$content, $allowed) = @_; |
|
if($allowed){ |
|
$r->print('<div class="ContentBoxSpecialTemplate">'); |
|
}else{ |
|
$r->print('<div class="ContentBoxSpecial">'); |
|
} |
|
$r->print('<h4 class="hcell">'.$topic.'</h4>'); |
|
$r->print('<blockquote>'.$content.'</blockquote>'); |
|
$r->print('</div>'); |
$r->print('</div>'); |
} |
} |
|
|
sub print_editbox_template |
sub print_editbox_template { |
{ |
|
my ($r,$content,$field) = @_; |
my ($r,$content,$field) = @_; |
$r->print('<textarea cols="81" rows="6" name="'.$field.'">'. |
$r->print('<textarea cols="81" rows="6" name="'.$field.'">'. |
&HTML::Entities::encode($content,'"&<>'). |
&HTML::Entities::encode($content,'"&<>'). |
'</textarea><input type="submit" name="storesyl" value="'. |
'</textarea><br /><input type="submit" name="storesyl" value="'. |
&mt('Save All').'" />'); |
&mt('Save All').'" />'); |
} |
} |
|
|
|
# Functionslist: List of functions |
|
# Typically used to display a list of available functions at top of page |
|
sub start_functionslist { |
|
my($legendtext)=@_; |
|
$legendtext=&mt('Functions') if !$legendtext; |
|
return '<fieldset><legend>'.$legendtext.'</legend>' |
|
.'<ul class="LC_functionslist">'; |
|
} |
|
|
|
sub item_functionslist { |
|
my($content) = @_; |
|
return '<li>'.$content.'</li>'; |
|
} |
|
|
|
sub end_functionslist { |
|
my($r)=@_; |
|
return '</ul></fieldset>'; |
|
} |
|
|
1; |
1; |