[LON-CAPA-cvs] cvs: loncom /interface lonaboutme.pm lontemplate.pm
ehlerst
ehlerst@source.lon-capa.org
Wed, 10 Dec 2008 15:58:36 -0000
ehlerst Wed Dec 10 15:58:36 2008 EDT
Modified files:
/loncom/interface lontemplate.pm lonaboutme.pm
Log:
removed an unnecessary function in lontemplate.pm and added a function for sending a message. layout changes in lonaboutme.pm.
Index: loncom/interface/lontemplate.pm
diff -u loncom/interface/lontemplate.pm:1.7 loncom/interface/lontemplate.pm:1.8
--- loncom/interface/lontemplate.pm:1.7 Tue Dec 9 10:31:49 2008
+++ loncom/interface/lontemplate.pm Wed Dec 10 15:58:36 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# "Template" Functions to generate html output
#
-# $Id: lontemplate.pm,v 1.7 2008/12/09 10:31:49 ehlerst Exp $
+# $Id: lontemplate.pm,v 1.8 2008/12/10 15:58:36 ehlerst Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -58,9 +58,7 @@
my ($r,$allowed,$target,$syllabusfields_ref,$syllabus_ref) = @_;
my %syllabusfields = %{$syllabusfields_ref};
my %syllabus = %{$syllabus_ref};
-# if(!$allowed){
- $r->print('<div class="ContentBox">');
-# }
+ $r->print('<div class="ContentBox">');
foreach my $field (sort(keys(%syllabusfields))) {
if (($syllabus{$field}) || ($allowed)) {
my $message=$syllabus{$field};
@@ -86,17 +84,26 @@
}
}
}
-# if(!$allowed){
$r->print('</div>');
-# }
}
-sub print_image {
- my ($r,$image) = @_;
+sub start_ContentBox{
+ my ($r) = @_;
$r->print('<div class="ContentBox">');
- $r->print($image);
+}
+
+sub end_ContentBox{
+ my ($r) = @_;
$r->print('</div>');
-}
+}
+
+sub send_message{
+ my ($r,$cnum,$cdom) = @_;
+ $r->print('<div class="ContentBoxSpecial">');
+ $r->print('<h4 class="hcell">'.&mt('Contact').'</h4>');
+ $r->print('<blockquote>'.(&Apache::loncommon::messagewrapper(&mt('Send me a message'),$cnum,$cdom)).'</blockquote>');
+ $r->print('</div>');
+}
sub print_template
{
@@ -110,7 +117,7 @@
sub print_editbox_template
{
my ($r,$content,$field) = @_;
- $r->print('<br /><textarea cols="55" rows="6" name="'.$field.'">'.
+ $r->print('<br /><textarea cols="53" rows="6" name="'.$field.'">'.
&HTML::Entities::encode($content,'"&<>').
'</textarea><input type="submit" name="storesyl" value="'.
&mt('Save All').'" />');
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.80 loncom/interface/lonaboutme.pm:1.81
--- loncom/interface/lonaboutme.pm:1.80 Tue Dec 9 22:16:23 2008
+++ loncom/interface/lonaboutme.pm Wed Dec 10 15:58:36 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# "About Me" Personal Information
#
-# $Id: lonaboutme.pm,v 1.80 2008/12/09 22:16:23 raeburn Exp $
+# $Id: lonaboutme.pm,v 1.81 2008/12/10 15:58:36 ehlerst Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -304,16 +304,22 @@
&Apache::lontemplate::print_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus);
if($target ne 'tex')
{
- &Apache::lontemplate::print_image($r,$image);
- &print_portfiles_link($r,$is_course);
- $r->print('</div>');
- $r->print('<p>');
-
-
- $r->print('Kontakt');
- $r->print(&Apache::loncommon::messagewrapper(&mt('Send me a message'),$cnum,$cdom).'</p>'.&Apache::lonrss::advertisefeeds($cnum,$cdom));
-
-
+ &Apache::lontemplate::start_ContentBox($r);
+ $r->print($image);
+ &Apache::lontemplate::send_message($r,$cnum,$cdom);
+ &Apache::lontemplate::end_ContentBox($r);
+ &Apache::lontemplate::end_columnSection($r);
+ &Apache::lontemplate::start_columnSection($r);
+ &Apache::lontemplate::start_ContentBox($r);
+ &print_portfiles_link($r,$is_course);
+ if(&Apache::lonrss::advertisefeeds($cnum,$cdom) ne ''){
+ $r->print('<div class="ContentBoxSpecial">');
+ $r->print('<h4 class="hcell">'.'RSS Feeds and Blogs'.'</h4>');
+ $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom));
+ $r->print('</div>');
+ }
+ &Apache::lontemplate::end_ContentBox($r);
+ &Apache::lontemplate::end_columnSection($r);
}
if ($allowed) {
@@ -365,7 +371,6 @@
$r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a>');
}
$r->print('<br />'.&mt('Last updated').': '.$lastmod);
- &Apache::lontemplate::end_columnSection($r);
$r->print(&Apache::loncommon::end_page());
} else {
$r->print('\end{document}');
@@ -454,6 +459,7 @@
}
$output .= '</ul>';
$output .='</p>';
+ $output .='</div>';
}
$r->print($output);
return;