--- loncom/interface/lonsyllabus.pm 2010/02/15 20:28:51 1.106.2.3 +++ loncom/interface/lonsyllabus.pm 2010/02/17 18:42:38 1.106.2.5 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.106.2.3 2010/02/15 20:28:51 faziophi Exp $ +# $Id: lonsyllabus.pm,v 1.106.2.5 2010/02/17 18:42:38 faziophi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -151,13 +151,23 @@ ENDSCRIPT ENDSCRIPT @@ -610,9 +653,11 @@ ENDSCRIPT my $day = &Apache::lonannounce::showday(time,2, &Apache::lonannounce::readcalendar($cdom.'_'.$cnum)); if ($target ne 'tex') { - if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { - $r->print("
"); + if ($allowed) { + &print_activity_bar($r, \%data, $target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML); &print_field_sortable($r, \%data, $target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML); + &print_title_bar($r, \%data, $target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML); + &print_context_bar($r, \%data, $target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML); } $r->print("
\n"); @@ -671,8 +716,8 @@ ENDSCRIPT @htmlids = &print_template_new_fields($r, \%data, $target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML, \%custom_hash); if ($allowed) { - $r->print(''. - &Apache::lonhtmlcommon::htmlareaselectactive(@htmlids)); + $r->print(''); + $r->print(&Apache::lonhtmlcommon::htmlareaselectactive(@htmlids)); } if ($target ne 'tex') {$r->print('

 

');} if ($allowed) { @@ -704,22 +749,67 @@ ENDSCRIPT return OK; } +sub print_activity_bar { + my ($r, $data_ref, $target, $allowed, $default_rich_text, $group) = @_; + $r->print("
+ + +
"); +} + +sub print_title_bar { + my ($r, $data_ref, $target, $allowed, $default_rich_text, $group) = @_; + $r->print("

+ +Title Goes Here +

+
"); +} + +sub print_context_bar { + my ($r, $data_ref, $target, $allowed, $default_rich_text, $group) = @_; + $r->print("
+ + + + +
"); +} + sub print_field_sortable { my ($r, $data_ref, $target, $allowed, $default_rich_text, $group) = @_; my %data = %{$data_ref}; my @fields = @{thaw($data{'data.fields'})}; $r->print("
-
\n"); foreach my $key (@fields) { my %field = %{thaw($data{'data.field.'.$key})}; - $r->print("
  • $field{title}
  • \n"); + $r->print("
  • $field{title}
  • \n"); } $r->print("
    - +
    + + +
    \n"); } @@ -753,16 +843,16 @@ sub print_template_new_fields { if ($target ne 'tex') { #output of syllabusfields will be generated here. &Apache::lontemplate::print_start_template($r,$title,'LC_Box', 'box-'.$key); - $r->print($message); + #$r->print($message); if ($allowed) { - $r->print("
    "); + $r->print("
    "); &Apache::lontemplate::print_textarea_template($r, $raw_message, $key, $default_rich_text); - &Apache::lontemplate::print_saveall_template($r); - if (!exists($data{'properties.v2_converted'})) { - $r->print("Delete "); - $r->print("Rename to \"Hello, World!\""); - } +# &Apache::lontemplate::print_saveall_template($r); +# if (!exists($data{'properties.v2_converted'})) { +# $r->print("Delete "); +# $r->print("Rename to \"Hello, World!\""); +# } $r->print("
    "); } &Apache::lontemplate::print_end_template($r); @@ -773,7 +863,7 @@ sub print_template_new_fields { } push(@html_ids,"hello"); } - } + } } return @html_ids;