[LON-CAPA-cvs] cvs: modules /gerd/harvesting lonrecommender.pm
www
www at source.lon-capa.org
Tue Jul 17 10:34:13 EDT 2012
www Tue Jul 17 14:34:13 2012 EDT
Modified files:
/modules/gerd/harvesting lonrecommender.pm
Log:
Icons
Index: modules/gerd/harvesting/lonrecommender.pm
diff -u modules/gerd/harvesting/lonrecommender.pm:1.17 modules/gerd/harvesting/lonrecommender.pm:1.18
--- modules/gerd/harvesting/lonrecommender.pm:1.17 Tue Jul 17 14:13:31 2012
+++ modules/gerd/harvesting/lonrecommender.pm Tue Jul 17 14:34:13 2012
@@ -5,7 +5,7 @@
#
# MODIFY $datapath VARIABLE FOR LOCATION OF DATA FILES
#
-# $Id: lonrecommender.pm,v 1.17 2012/07/17 14:13:31 www Exp $
+# $Id: lonrecommender.pm,v 1.18 2012/07/17 14:34:13 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -562,10 +562,12 @@
if ($fn=~/^\.+$/) { next; }
my $type=$components[-1];
my $title='';
+ my $icon='';
if ($type eq 'domain') {
$fn=~s/^\/home\/httpd\/html//;
$fn=~/^\/res\/($match_domain)\//;
$title=&Apache::lonnet::domain($1,'description');
+ $icon=$r->dir_config('lonIconsURL').'/server.gif';
} elsif ($uri!~/\.(page|sequence)$/) {
$fn=$uri.'/'.$fn;
$fn=~s/\/+/\//gs;
@@ -577,8 +579,10 @@
if ($type eq 'user') {
$fn=~/^\/res\/($match_domain)\/($match_username)$/;
$title=&Apache::loncommon::plainname($2,$1);
+ $icon=$r->dir_config('lonIconsURL').'/user.gif';
} else {
$title=&Apache::lonnet::gettitle($fn);
+ $icon=&Apache::loncommon::icon($fn);
}
}
my $dirflag=0;
@@ -603,6 +607,8 @@
$r->print(' ');
}
$r->print('</td><td>');
+ $r->print('<img src="'.$icon.'" />');
+ $r->print('</td><td>');
if ($title) {
$r->print($title);
} else {
More information about the LON-CAPA-cvs
mailing list