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

raeburn raeburn at source.lon-capa.org
Mon Dec 3 19:39:48 EST 2012


raeburn		Tue Dec  4 00:39:48 2012 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Tools icon/link to editor when top level of supplemental content is empty,
    and user has rights to edit content.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.519 loncom/interface/londocs.pm:1.520
--- loncom/interface/londocs.pm:1.519	Mon Dec  3 14:47:30 2012
+++ loncom/interface/londocs.pm	Tue Dec  4 00:39:48 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.519 2012/12/03 14:47:30 raeburn Exp $
+# $Id: londocs.pm,v 1.520 2012/12/04 00:39:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1862,6 +1862,16 @@
     &Apache::loncommon::end_data_table_count();
 
     if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) {
+        my $toolslink = '<table><tr><td>'
+                       .&Apache::loncommon::help_open_menu('Navigation Screen',
+                                                           'Navigation_Screen',undef,'RAT')
+                       .'</td><td class="LC_middle">'.&mt('Tools:').'</td>'
+                       .'<td align="left"><ul id="LC_toolbar">'
+                       .'<li><a href="/adm/coursedocs?forcesupplement=1" '
+                       .'id="LC_content_toolbar_edittoplevel" '
+                       .'class="LC_toolbarItem" '
+                       .'title="'.&mt('Supplemental Content Editor').'">'
+                       .'</a></li></ul></td></tr></table><br />';
         if ($shown) {
             if ($allowed) {
                 $to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll')
@@ -1879,19 +1889,15 @@
                            .'<br style="line-height:2px;" />'
                            .&Apache::loncommon::end_scrollbox();
             } else {
-                $to_show = '<table><tr><td>'.&Apache::loncommon::help_open_menu('Navigation Screen','Navigation_Screen',undef,'RAT')
-                           .'</td><td class="LC_middle">'.&mt('Tools:').'</td>'
-                           .'<td align="left"><ul id="LC_toolbar">'
-                           .'<li><a href="/adm/coursedocs?forcesupplement=1" '
-                           .'id="LC_content_toolbar_edittoplevel" '
-                           .'class="LC_toolbarItem" '
-                           .'title="'.&mt('Supplemental Content Editor').'">'
-                           .'</a></li></ul></td></tr></table><br />'
+                $to_show .= $toolslink
                            .&Apache::loncommon::start_data_table('LC_tableOfContent')
                            .$output.' '
                            .&Apache::loncommon::end_data_table();
             }
         } else {
+            if (!$allowed) {
+                $to_show .= $toolslink;
+            }
             $to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll')
                        .'<div class="LC_info" id="contentlist">'
                        .&mt('Currently no documents.')




More information about the LON-CAPA-cvs mailing list