Annotation of loncom/interface/lontemplate.pm, revision 1.3

1.2       neumanie    1: # The LearningOnline Network
                      2: # "Template" Functions to generate html output
                      3: #
1.3     ! www         4: # $Id: lontemplate.pm $
1.2       neumanie    5: #
                      6: # Copyright Michigan State University Board of Trustees
                      7: #
                      8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
                      9: #
                     10: # LON-CAPA is free software; you can redistribute it and/or modify
                     11: # it under the terms of the GNU General Public License as published by
                     12: # the Free Software Foundation; either version 2 of the License, or
                     13: # (at your option) any later version.
                     14: #
                     15: # LON-CAPA is distributed in the hope that it will be useful,
                     16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
                     17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     18: # GNU General Public License for more details.
                     19: #
                     20: # You should have received a copy of the GNU General Public License
                     21: # along with LON-CAPA; if not, write to the Free Software
                     22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     23: #
                     24: # /home/httpd/html/adm/gpl.txt
                     25: #
                     26: # http://www.lon-capa.org/
                     27: #
                     28: 
                     29: 
1.1       amueller   30: package Apache::lontemplate;
                     31: 
                     32: 
                     33: use strict;
                     34: use Apache::Constants qw(:common);
                     35: use Apache::loncommon;
                     36: use Apache::lonnet;
                     37: use Apache::lontexconvert;
                     38: use Apache::lonfeedback;
                     39: use Apache::lonrss();
                     40: use Apache::lonlocal;
                     41: use Apache::lonmsgdisplay();
                     42: use HTML::Entities();
                     43: 
                     44: 
                     45: sub print_template
                     46: {	
                     47: 	my ($r,$topic,$content) = @_;
                     48: 	$r->print('<div class="DivContentBoxSpecial">');
                     49: 	$r->print('<h4 class="hcell">'.$topic.'</h4>');
                     50: 	$r->print('<d1 class="ListStyleClean"><blockquote>'.$content.'</blockquote></d1>');
                     51: 	$r->print('</div>');
                     52: }
                     53: 
                     54: sub print_editbox_template
                     55: {
                     56: 	my ($r,$content,$field) = @_;
                     57: 	$r->print('<br /><textarea cols="80" rows="6" name="'.$field.'">'.
                     58:                            &HTML::Entities::encode($content,'"&<>').
                     59:            '</textarea><input type="submit" name="storesyl" value="'.
                     60:                            &mt('Save').'" />');
                     61: 
                     62: }
                     63: 
                     64: 1;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>