version 1.244, 2005/04/07 06:59:55
|
version 1.247, 2005/11/26 02:42:45
|
Line 860 ENDHEADER
|
Line 860 ENDHEADER
|
'abstract' => 1, |
'abstract' => 1, |
'standards'=> 1, |
'standards'=> 1, |
'mime' => 1, |
'mime' => 1, |
|
'subject' => 1, |
); |
); |
# |
# |
foreach my $field ('title','author','owner','authorspace','modifyinguser', |
foreach my $field ('title','author','subject','owner','authorspace', |
'keywords','notes','abstract','standards','mime') { |
'modifyinguser','keywords','notes','abstract', |
|
'standards','mime') { |
$scrout.='<tr><td align="right">'.&titlefield($fields{$field}).'</td><td>'. |
$scrout.='<tr><td align="right">'.&titlefield($fields{$field}).'</td><td>'. |
&Apache::lonmeta::prettyinput($field, |
&Apache::lonmeta::prettyinput($field, |
$env{'form.'.$field}, |
$env{'form.'.$field}, |
Line 1557 sub parse_domain_restrictions {
|
Line 1559 sub parse_domain_restrictions {
|
if (! exists($env{'form.domains'}) || $env{'form.domains'} eq '') { |
if (! exists($env{'form.domains'}) || $env{'form.domains'} eq '') { |
return (undef,'',undef); |
return (undef,'',undef); |
} |
} |
my @allowed_domains; |
my @allowed_domains = &Apache::loncommon::get_env_multiple('form.domains'); |
if (ref($env{'form.domains'})) { |
|
@allowed_domains = @{$env{'form.domains'}}; |
|
} else { |
|
@allowed_domains = ($env{'form.domains'}); |
|
} |
|
# |
# |
my %domain_hash = (); |
my %domain_hash = (); |
my $pretty_domains_string; |
my $pretty_domains_string; |
Line 3225 extra custom metadata to show.
|
Line 3222 extra custom metadata to show.
|
sub detailed_citation_view { |
sub detailed_citation_view { |
my ($prefix,%values) = @_; |
my ($prefix,%values) = @_; |
my $result; |
my $result; |
|
my $jumpurl=$values{'url'}; |
|
$jumpurl=~s/^\/ext\//http\:\/\//; |
$result .= '<b>'.$prefix. |
$result .= '<b>'.$prefix. |
'<img src="'.&Apache::loncommon::icon($values{'url'}).' " />'.' '. |
'<img src="'.&Apache::loncommon::icon($values{'url'}).' " />'.' '. |
'<a href="http://'.$ENV{'HTTP_HOST'}.$values{'url'}.'" '. |
'<a href="'.$jumpurl.'" '. |
'target="search_preview">'.$values{'title'}."</a></b>\n"; |
'target="search_preview">'.$values{'title'}."</a></b>\n"; |
$result .= "<p>\n"; |
$result .= "<p>\n"; |
$result .= '<b>'.$values{'author'}.'</b>,'. |
$result .= '<b>'.$values{'author'}.'</b>,'. |
Line 3296 sub detailed_citation_view {
|
Line 3295 sub detailed_citation_view {
|
foreach my $item (split(',',$values{$field->{'name'}})){ |
foreach my $item (split(',',$values{$field->{'name'}})){ |
$result .= '<li>'. |
$result .= '<li>'. |
'<a target="search_preview" '. |
'<a target="search_preview" '. |
'href="/res/'.$item.'">'.$item.'</a></li>'; |
'href="'.$jumpurl.'">'.$item.'</a></li>'; |
} |
} |
$result .= '</ul>'; |
$result .= '</ul>'; |
} elsif (exists($field->{'format'}) && $field->{'format'} ne ''){ |
} elsif (exists($field->{'format'}) && $field->{'format'} ne ''){ |
Line 3307 sub detailed_citation_view {
|
Line 3306 sub detailed_citation_view {
|
if ($field->{'special'} eq 'url link') { |
if ($field->{'special'} eq 'url link') { |
$result.= |
$result.= |
&mt($field->{'translate'}, |
&mt($field->{'translate'}, |
'<a href="'.$values{'url'}.'" '. |
'<a href="'.$jumpurl.'" '. |
'target="search_preview">'. |
'target="search_preview">'. |
$values{$field->{'name'}}. |
$values{$field->{'name'}}. |
'</a>'); |
'</a>'); |
Line 3355 sub summary_view {
|
Line 3354 sub summary_view {
|
if (! defined($tmp)) { $tmp = 'undefined'; } |
if (! defined($tmp)) { $tmp = 'undefined'; } |
$result .= ' '.$tmp.' '; |
$result .= ' '.$tmp.' '; |
} |
} |
|
my $jumpurl=$values{'url'}; |
|
$jumpurl=~s/^\/ext\//http\:\/\//; |
|
|
$result.=<<END; |
$result.=<<END; |
<a href="http://$ENV{'HTTP_HOST'}$values{'url'}" |
<a href="$jumpurl" |
target='search_preview'>$values{'title'}</a><br /> |
target='search_preview'>$values{'title'}</a><br /> |
$values{'author'}, $values{'owner'} -- $values{'lastrevisiondate'}<br /> |
$values{'author'}, $values{'owner'} -- $values{'lastrevisiondate'}<br /> |
$values{'copyrighttag'}<br /> |
$values{'copyrighttag'}<br /> |
Line 3380 END
|
Line 3382 END
|
###################################################################### |
###################################################################### |
sub compact_view { |
sub compact_view { |
my ($prefix,%values) = @_; |
my ($prefix,%values) = @_; |
|
my $jumpurl=$values{'url'}; |
|
$jumpurl=~s/^\/ext\//http\:\/\//; |
|
|
my $result = |
my $result = |
$prefix.'<img src="'.&Apache::loncommon::icon($values{'url'}).'">'; |
$prefix.'<img src="'.&Apache::loncommon::icon($values{'url'}).'">'; |
if (exists($env{'form.sortfield'}) && |
if (exists($env{'form.sortfield'}) && |
Line 3388 sub compact_view {
|
Line 3393 sub compact_view {
|
if (! defined($tmp)) { $tmp = 'undefined'; } |
if (! defined($tmp)) { $tmp = 'undefined'; } |
$result .= ' '.$tmp.' '; |
$result .= ' '.$tmp.' '; |
} |
} |
$result.=' <a href="'.$values{'url'}.'" target="search_preview">'. |
$result.=' <a href="'.$jumpurl.'" target="search_preview">'. |
$values{'title'}.'</a>'.(' 'x2). |
$values{'title'}.'</a>'.(' 'x2). |
'<b>'.$values{'author'}.'</b><br />'; |
'<b>'.$values{'author'}.'</b> ('.$values{'domain'}.')<br />'; |
return $result; |
return $result; |
} |
} |
|
|
Line 3410 sub fielded_format_view {
|
Line 3415 sub fielded_format_view {
|
my ($prefix,%values) = @_; |
my ($prefix,%values) = @_; |
my $icon=&Apache::loncommon::icon($values{'url'}); |
my $icon=&Apache::loncommon::icon($values{'url'}); |
my %Translated = &Apache::lonmeta::fieldnames(); |
my %Translated = &Apache::lonmeta::fieldnames(); |
|
my $jumpurl=$values{'url'}; |
|
$jumpurl=~s/^\/ext\//http\:\/\//; |
|
|
my $result=<<END; |
my $result=<<END; |
$prefix <img src="$icon" /> |
$prefix <img src="$icon" /> |
<dl> |
<dl> |
<dt>URL:</dt> |
<dt>URL:</dt> |
<dd><a href="http://$ENV{'HTTP_HOST'}$values{'url'}" |
<dd><a href="$jumpurl" |
target='search_preview'>$values{'url'}</a></dd> |
target='search_preview'>$values{'url'}</a></dd> |
END |
END |
foreach my $field ('title','author','domain','subject','keywords','notes', |
foreach my $field ('title','author','domain','subject','keywords','notes', |