[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm

bisitz bisitz@source.lon-capa.org
Thu, 30 Jul 2009 09:42:25 -0000


bisitz		Thu Jul 30 09:42:25 2009 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  Optimized post publishing menu:
  - Assistent Co-Authors are not allowed to browse resource space, so don't offer link to published resource
  - Replaced deprecated font tag, etc. by functionlist and removed now unnecessary <hr> separator lines
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.261 loncom/publisher/lonpublisher.pm:1.262
--- loncom/publisher/lonpublisher.pm:1.261	Sat Jul 25 06:55:31 2009
+++ loncom/publisher/lonpublisher.pm	Thu Jul 30 09:42:25 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.261 2009/07/25 06:55:31 raeburn Exp $
+# $Id: lonpublisher.pm,v 1.262 2009/07/30 09:42:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1770,15 +1770,26 @@
         my $thissrcdir=$thissrc;
         $thissrcdir=~s/\/[^\/]+$/\//;
         
-        
+        $r->print(&Apache::lonhtmlcommon::start_funclist());
+        unless ($env{'request.role'}=~/^(aa)/) {
+            $r->print(
+                &Apache::lonhtmlcommon::add_item_funclist(
+                    '<a href="'.$thisdistarget.'">'
+                   .&mt('View Published Version')
+                   .'</a>')
+            );
+        }
         $r->print(
-           '<hr /><a href="'.$thisdistarget.'"><font size="+2">'.
-           &mt('View Published Version').'</font></a>'.
-           '<p><a href="'.$thissrc.'"><font size="+2">'.
-		  &mt('Back to Source').'</font></a></p>'.
-           '<p><a href="'.$thissrcdir.
-                   '"><font size="+2">'.
-		  &mt('Back to Source Directory').'</font></a></p>');
+            &Apache::lonhtmlcommon::add_item_funclist(
+                '<a href="'.$thissrc.'">'
+               .&mt('Back to Source')
+               .'</a>')
+           .&Apache::lonhtmlcommon::add_item_funclist(
+                '<a href="'.$thissrcdir.'">'
+               .&mt('Back to Source Directory')
+               .'</a>')
+           .&Apache::lonhtmlcommon::end_funclist()
+        );
     }
     return 1;
 }
@@ -2283,7 +2294,6 @@
 	    }
 	} else {
 	    &phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget); 
-	    $r->print('<hr />');
 	}
     }
     $r->print(&Apache::loncommon::end_page());