[Koha] Barcode scanner - keyboard wedge or not

paul POULAIN paul.poulain at free.fr
Mon May 26 22:32:38 NZST 2003


Waylon Robertson wrote:

>16/05/03 01:54:03, paul POULAIN <paul.poulain at free.fr> wrote:
>Well.. incidently.. I know nothing about the template system.... and I know only english. Just want it in pre-template perl?
>  
>
Fairly simple :
the templates are stored in a specific file & path, and looks like :
/<HTML>
<TMPL_VAR NAME=startmenuissue>
<p>
Each box needs to be filled in with fine,time to start charging,charging 
cycle<br>
eg 1,7,7 = $1 fine, after 7 days, every 7 days.<p>

<table>
  <tr bgcolor="white">
    <TMPL_LOOP NAME=firstrowloop>
      <td><TMPL_VAR NAME=description></td>
    </TMPL_LOOP>
  </tr>
  <form action=/cgi-bin/koha/updatecharges.pl method=post>
  <TMPL_LOOP NAME=tablebodyloop>
    <tr bgcolor="whitw">
      <td><TMPL_VAR NAME=description></td>
      <TMPL_LOOP NAME=rowloop>
        <td><input type=text name="<TMPL_VAR NAME=name>" 
value="<TMPL_VAR NAME=value>" size=6></td>
      </TMPL_LOOP>
    </tr>
  </TMPL_LOOP>
</table>

<input type=submit>
</form>

<TMPL_VAR NAME=endmenuissue>

</body>
</HTML>/

It's a mix of true HTML and H::T variables. The H::T are replaced during 
execution by "true" value. The templates are managed by specific 
koha-subs, that looks which one to use and check for auth :
/use strict;
use CGI;
use C4::Auth;
use C4::Output;
use C4::Interface::CGI::Output;
use C4::Database;
use HTML::Template;

my $query = new CGI;
my ($template, $loggedinuser, $cookie)
    = get_template_and_user({template_name => "parameters/admin-home.tmpl",
                 query => $query,
                 type => "intranet",
                 authnotrequired => 0,
                 flagsrequired => {parameters => 1},
                 debug => 1,
                 });

output_html_with_http_headers $query, $cookie, $template->output;
/
Look at : http://html-template.sourceforge.net/html_template.html#tutorial
for a tutorial and some explanations.

HTH

-- 
Paul POULAIN
Consultant indépendant en logiciels libres
responsable francophone de koha (SIGB libre http://www.koha-fr.org)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20030526/232bc9fd/attachment-0001.html


More information about the Koha mailing list