[LON-CAPA-cvs] cvs: loncom /interface lontemplate.pm

neumanie neumanie@source.lon-capa.org
Fri, 13 Feb 2009 17:29:39 -0000


neumanie		Fri Feb 13 17:29:39 2009 EDT

  Modified files:              
    /loncom/interface	lontemplate.pm 
  Log:
  Small Changes in lontemplate for the "new desgin" in aboutme,simplepage,sylabus
  
  
Index: loncom/interface/lontemplate.pm
diff -u loncom/interface/lontemplate.pm:1.14 loncom/interface/lontemplate.pm:1.15
--- loncom/interface/lontemplate.pm:1.14	Mon Dec 22 14:24:50 2008
+++ loncom/interface/lontemplate.pm	Fri Feb 13 17:29:39 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "Template" Functions to generate html output
 #
-# $Id: lontemplate.pm,v 1.14 2008/12/22 14:24:50 ehlerst Exp $
+# $Id: lontemplate.pm,v 1.15 2009/02/13 17:29:39 neumanie Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -54,11 +54,11 @@
 	 $r->print('</div>');
 }
 
-sub print_content_template{
+sub print_aboutme_content_template{
 	my ($r,$allowed,$target,$syllabusfields_ref,$syllabus_ref) = @_;
 	my %syllabusfields = %{$syllabusfields_ref};
 	my %syllabus = %{$syllabus_ref};
-	&start_ContentBox($r,$allowed);
+	#&start_ContentBox($r,$allowed);
        foreach my $field (sort(keys(%syllabusfields))) {
           if (($syllabus{$field}) || ($allowed)) {
               my $message=$syllabus{$field};
@@ -72,8 +72,19 @@
               if ($target ne 'tex') {
 		     if($allowed){
 			$r->print('<p>');
-		     }
-		     &print_template($r,$syllabusfields{$field},$message,$allowed);
+		     }	   
+			
+		    if($field eq 'aaa_contactinfo') {
+			if($allowed){
+				$r->print('<div style="clear:left;" >&nbsp;</div>');
+			}
+			&print_template($r,$syllabusfields{$field},$message,$allowed,'LC_ContentBoxSpecialContactInfo');
+			$r->print('<div style="clear:left;" >&nbsp;</div>');
+		    }
+ 		    else{
+			  &print_template($r,$syllabusfields{$field},$message,$allowed,'LC_ContentBoxSpecial');
+		    }
+		  
               } else {
                      $r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'.
                                &Apache::lonxml::xmlparse($r,'tex',$message).'\\\\');
@@ -86,16 +97,13 @@
               }
           }
        }
-	&end_ContentBox($r);
+	#&end_ContentBox($r);
 }
 
 sub start_ContentBox{
-	my ($r,$allowed) = @_;
-	if($allowed){
-		$r->print('<div class="ContentBoxTemplate">');
-	}else{
-		$r->print('<div class="LC_ContentBox">');
-	}
+	my ($r,$allowed) = @_;	
+	$r->print('<div class="LC_ContentBox">');
+	
 }
 
 sub end_ContentBox{
@@ -113,12 +121,8 @@
 
 sub print_template
 {	
-	my ($r,$topic,$content, $allowed) = @_;
-	if($allowed){
-		$r->print('<div class="ContentBoxSpecialTemplate">');
-	}else{
-		$r->print('<div class="LC_ContentBoxSpecial">');
-	}
+	my ($r,$topic,$content, $allowed,$boxclass) = @_;	
+	$r->print('<div class="'.$boxclass.'">');	
 	$r->print('<h4 class="LC_hcell">'.$topic.'</h4>');
 	$r->print('<blockquote>'.$content.'</blockquote>');
 	$r->print('</div>');
@@ -129,7 +133,7 @@
 	my ($r,$content,$field) = @_;
 	$r->print('<textarea cols="81" rows="6" name="'.$field.'">'.
                            &HTML::Entities::encode($content,'"&<>').
-           '</textarea><input type="submit" name="storesyl" value="'.
+           '</textarea><br /><input type="submit" name="storesyl" value="'.
                            &mt('Save All').'" />');
 }