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

www www at source.lon-capa.org
Wed Dec 21 18:23:08 EST 2011


www		Wed Dec 21 23:23:08 2011 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Bug #3374: don't leave DOCS when previewing stuff
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.468 loncom/interface/londocs.pm:1.469
--- loncom/interface/londocs.pm:1.468	Wed Dec 21 20:21:49 2011
+++ loncom/interface/londocs.pm	Wed Dec 21 23:23:08 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.468 2011/12/21 20:21:49 raeburn Exp $
+# $Id: londocs.pm,v 1.469 2011/12/21 23:23:08 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2200,13 +2200,23 @@
     } else {
         $reinit = &mt('(re-initialize course to access)');
     }  
-    $line.='
-  <td>
-    '.($url?'<a href="'.$url.'">':'').'<img src="'.$icon.'" alt="" class="LC_icon" />'.($url?'</a>':'').'
-  </td>
-  <td>
-    '.($url?"<a href=\"$url\">":'').$title.($url?'</a>':' <span class="LC_docs_reinit_warn">'.$reinit.'</span>').$external."
-  </td>";
+    $line.='<td>';
+    if ($url=~m{/adm/coursedocs}) {
+       $line.='<a href="'.$url.'"><img src="'.$icon.'" alt="" class="LC_icon" /></a>';
+    } elsif ($url) {
+       $line.=&Apache::loncommon::modal_link($url.'&inhibitmenu=yes','<img src="'.$icon.'" alt="" class="LC_icon" />',600,500);
+    } else {
+       $line.='<img src="'.$icon.'" alt="" class="LC_icon" />';
+    }
+    $line.='</td><td>';
+    if ($url=~m{/adm/coursedocs}) {
+       $line.='<a href="'.$url.'">'.$title.'</a>';
+    } elsif ($url) {
+       $line.=&Apache::loncommon::modal_link($url.'&inhibitmenu=yes',$title,600,500);
+    } else {
+       $line.=$title.' <span class="LC_docs_reinit_warn">'.$reinit.'</span>';
+    }
+    $line.=$external."</td>";
     if (($allowed) && ($folder!~/^supplemental/)) {
  	my %lt=&Apache::lonlocal::texthash(
  			      'hd' => 'Hidden',




More information about the LON-CAPA-cvs mailing list