WebGUI 2.1.0 release
This commit is contained in:
parent
08a5f757da
commit
1cf655659f
66 changed files with 3136 additions and 1001 deletions
47
lib/WebGUI/Macro/r_printable.pm
Normal file
47
lib/WebGUI/Macro/r_printable.pm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
package WebGUI::Macro::r_printable;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---remove style for printing link---
|
||||
if ($output =~ /\^r(.*)\^\/r/) {
|
||||
$temp = $session{env}{REQUEST_URI};
|
||||
if ($temp =~ /\?/) {
|
||||
$temp .= '&makePrintable=1';
|
||||
} else {
|
||||
$temp .= '?makePrintable=1';
|
||||
}
|
||||
$temp = '<a href="'.$temp.'">'.$1.'</a>';
|
||||
$output =~ s/\^r(.*)\^\/r/$temp/g;
|
||||
} elsif ($output =~ /\^r/) {
|
||||
$temp = $session{env}{REQUEST_URI};
|
||||
if ($temp =~ /\?/) {
|
||||
$temp .= '&makePrintable=1';
|
||||
} else {
|
||||
$temp .= '?makePrintable=1';
|
||||
}
|
||||
$temp = '<a href="'.$temp.'">';
|
||||
$temp .= WebGUI::International::get(53);
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^r/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue