View | Details | Raw Unified | Return to bug 6649
Collapse All | Expand All

(-)a/edithelp.pl (-15 / +16 lines)
Lines 41-47 my $error; Link Here
41
41
42
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
42
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
43
    {
43
    {
44
        template_name   => "help/edithelp.tmpl",
44
        template_name   => "help/edithelp.tt",
45
        query           => $input,
45
        query           => $input,
46
        type            => "intranet",
46
        type            => "intranet",
47
        authnotrequired => 0,
47
        authnotrequired => 0,
Lines 63-91 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
63
63
64
sub _get_filepath ($;$) {
64
sub _get_filepath ($;$) {
65
    my $referer = shift;
65
    my $referer = shift;
66
    $referer =~ /.*koha\/(.+)\.pl.*/;
66
    $referer =~ /koha\/(.*)\.pl/;
67
    my $from   = "help/$1.tmpl";
67
    my $from = "help/$1.tt";
68
    my $htdocs = C4::Context->config('intrahtdocs');
68
    my $htdocs = C4::Context->config('intrahtdocs');
69
    my ($theme, $lang) = themelanguage( $htdocs, $from, "intranet", $input );
69
    my ($theme, $lang) = themelanguage( $htdocs, $from, "intranet", $input );
70
	$debug and print STDERR "help filepath: $htdocs/$theme/$lang/modules/$from";
70
	$debug and print STDERR "help filepath: $htdocs/$theme/$lang/modules/$from";
71
	return "$htdocs/$theme/$lang/modules/$from";
71
	return "$htdocs/$theme/$lang/modules/$from";
72
}
72
}
73
73
74
if ( $type eq 'addnew' ) {
74
$type = 'create' if $type eq 'addnew';
75
    $type = 'create';
75
if ( $type eq 'create' || $type eq 'save' ) {
76
}
77
elsif ( $type eq 'create' || $type eq 'save' ) {
78
	my $file = _get_filepath($referer);
76
	my $file = _get_filepath($referer);
79
	unless (open (OUTFILE, ">$file")) {$error = "Cannot write file: '$file'";} else {
77
    open my $fh, ">", $file;
80
        #open (OUTFILE, ">$file") or die "Cannot write file: '$file'";	# unlikely death, since we just checked
78
    if ( $fh ) {
81
        # file is open write to it
79
        # file is open write to it
82
        print OUTFILE "<!-- TMPL_INCLUDE NAME=\"help-top.inc\" -->\n";
80
        print $fh
83
		print OUTFILE ($type eq 'create') ? "<div class=\"main\">\n$help\n</div>" : $help;
81
            " [% INCLUDE 'help-top.inc' %]\n",
84
        print OUTFILE "\n<!-- TMPL_INCLUDE NAME=\"help-bottom.inc\" -->\n";
82
		    $type eq 'create' ? "<div class=\"main\">\n$help\n</div>" : $help,
85
        close OUTFILE;
83
            "\n[% INCLUDE 'help-bottom.inc' %]\n";
84
        close $fh;
86
		print $input->redirect("/cgi-bin/koha/help.pl?url=$oldreferer");
85
		print $input->redirect("/cgi-bin/koha/help.pl?url=$oldreferer");
87
    }
86
    }
88
    
87
    else {
88
        $error = "Cannot write file: '$file'";
89
    }
89
}
90
}
90
elsif ( $type eq 'modify' ) {
91
elsif ( $type eq 'modify' ) {
91
    # open file load data, kill include calls, pass data to the template
92
    # open file load data, kill include calls, pass data to the template
Lines 98-104 elsif ( $type eq 'modify' ) { Link Here
98
    	open (INFILE, $file) or die "Cannot read file '$file'";		# unlikely death, since we just checked
99
    	open (INFILE, $file) or die "Cannot read file '$file'";		# unlikely death, since we just checked
99
		my $help = '';
100
		my $help = '';
100
		while ( my $inp = <INFILE> ) {
101
		while ( my $inp = <INFILE> ) {
101
			unless ( $inp =~ /TMPL\_INCLUDE/ ) {
102
			unless ( $inp =~ /INCLUDE/ ) {
102
				$help .= $inp;
103
				$help .= $inp;
103
			}
104
			}
104
		}
105
		}
(-)a/help.pl (-1 / +3 lines)
Lines 28-34 use CGI; Link Here
28
my $query = new CGI;
28
my $query = new CGI;
29
29
30
# find the script that called the online help using the CGI referer()
30
# find the script that called the online help using the CGI referer()
31
our $refer = $query->referer();
31
our $refer = $query->param('url');
32
$refer = $query->referer()  if !$refer || $refer eq 'undefined';
32
33
33
$refer =~ /koha\/(.*)\.pl/;
34
$refer =~ /koha\/(.*)\.pl/;
34
my $from = "modules/help/$1.tt";
35
my $from = "modules/help/$1.tt";
Lines 40-45 unless ( -e "$htdocs/$theme/$lang/$from" ) { Link Here
40
    ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query );
41
    ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query );
41
}
42
}
42
my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from");
43
my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from");
44
$template->param( referer => $refer );
43
45
44
output_html_with_http_headers $query, "", $template->output;
46
output_html_with_http_headers $query, "", $template->output;
45
47
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation-home.tt (-17 / +18 lines)
Lines 1-23 Link Here
1
[% INCLUDE 'help-top.inc' %]
1
 [% INCLUDE 'help-top.inc' %]
2
3
<h1>Circulation</h1>
2
<h1>Circulation</h1>
4
3
<p>
5
<p>Circulation functions can be accessed in several different ways. On the main page of the staff client there are some quick links in the center of the page to check items out, in or transfer them. For a complete listing of Circulation functions you can visit the Circulation page which is linked from the top left of every page or from the center of the main page.</p>
4
Circulation functions can be accessed in several different ways. On the main page of the staff client there are some quick links in the center of the page to check items out, in or transfer them. For a complete listing of Circulation functions you can visit the Circulation page which is linked from the top left of every page or from the center of the main page.
6
5
</p>
7
<p>Before circulating your collection you will want to set your Global System Preferences, Basic Parameters and Patrons & Circulation Rules.</p>
6
<p>
8
7
Before circulating your collection you will want to set your Global System Preferences, Basic Parameters and Patrons &amp; Circulation Rules.
9
<p>While in Circulation you can jump between the tabs on the quick search box at the top of the screen by using the following hot keys:</p>
8
</p>
10
9
<p>
10
While in Circulation you can jump between the tabs on the quick search box at the top of the screen by using the following hot keys:
11
</p>
11
<ul>
12
<ul>
12
	<li>jump to the catalog search with Alt+Q</li>
13
	<li>jump to the catalog search with Alt+Q</li>
13
	<li>jump to the checkout with Alt+U
14
	<li>jump to the checkout with Alt+U
14
<ul>
15
	<ul>
15
	<li>this will not work for Mac user</li>
16
		<li>this will not work for Mac user</li>
16
</ul>
17
	</ul>
17
</li>
18
	</li>
18
	<li>jump to the checkin with Alt+R</li>
19
	<li>jump to the checkin with Alt+R</li>
19
</ul>
20
</ul>
21
<p style="background-color: #ffe599">
22
Tip: Mac users use the OPTION button in place of ALT
23
</p>
20
24
21
<p style="background-color: #ffe599">Tip: Mac users use the OPTION button in place of ALT</p>
25
[% INCLUDE 'help-bottom.inc' %]
22
23
[% INCLUDE 'help-bottom.inc' %]
24
- 

Return to bug 6649