[rt-users] Help with html/rt page
Juan Carlos Montes
itachi.dsd at gmail.com
Thu Aug 23 19:27:38 EDT 2007
Hi Torsten,
I think that the problem is that you dont put a space between % and if
You have
%if ($HasMemberBA) {
When must be
% if ($HasMemberBA) {
Regards,
INTECO-CERT
Juan Carlos Montes
Analista de Seguridad
Ham MI-ID, Torsten Brumm escribió:
>
> Hi RT Users,
>
>
>
> i think i’m a little lost in RT Coding Space.
>
>
>
> I have create a html page inside rt/local/html directory. This is
> working fine so far. Now I try to embed some perl code and for this I
> grabbed something like this from another page to have an idea how the
> RT guys doing this:
>
>
>
> %#
>
> %# END BPS TAGGED BLOCK }}}
>
> <& /Admin/Elements/Header, Title => loc('RT Administration') &>
>
> <& /Admin/Elements/Tabs, Title => loc('RT Administration') &>
>
>
>
> <ul>
>
> % foreach my $key (sort keys %$tabs) {
>
> <li><span><a href="<%$RT::WebPath%>/<%$tabs->{$key}->{'path'}|n
> %>"><%$tabs->{$key} ->{'title'}%></a></span><br />
>
> <%$tabs->{$key}->{description}%>
>
> </li>
>
> %}
>
> </ul>
>
> <%init>
>
>
>
> Now I have tried to implement this in my page:
>
>
>
> <& /Elements/Header,
>
> Title => loc("Request for Change"),
>
> Refresh => $session{'home_refresh_interval'} &>
>
> <& /RFC/Elements/Tabs,
>
> current_tab => 'index.html',
>
> Title => loc("Request For Change") &>
>
>
>
> .
>
> .
>
> .
>
> Some html code
>
> .
>
> .
>
> <td style="vertical-align: middle;">
>
> <span style="font-weight: bold;">
>
> %if ($HasMemberBA) {
>
> <a href="ba/index.html">Business Application Change</a>
>
> %} else {
>
> <a
> href="mailto:mail at company.com?cc=admin at company.com&subject=Access%20to%20RfC%20Type%20Business%20Application%20needed">Business
> Application</a>
>
> %}
>
> </span>
>
> </td>
>
> .
>
> .
>
> .
>
> Some more html code
>
> .
>
> .
>
> <%INIT>
>
> my $GroupObjAO = RT::Group->new( $session{ 'CurrentUser' } );
>
> my $GroupObjBA = RT::Group->new( $session{ 'CurrentUser' } );
>
> my $GroupObjGE = RT::Group->new( $session{ 'CurrentUser' } );
>
> my $GroupObjOQ = RT::Group->new( $session{ 'CurrentUser' } );
>
> my $GroupObjRJ = RT::Group->new( $session{ 'CurrentUser' } );
>
> my $GroupObjUA = RT::Group->new( $session{ 'CurrentUser' } );
>
>
>
> my $PrincipalObj = RT::Principal->new( $session{ 'CurrentUser' } );
>
> $PrincipalObj->Load( $session{ 'CurrentUser' }->id );
>
>
>
> $GroupObjAO->LoadUserDefinedGroup( 'RFC-AUTH-AO' );
>
> my $HasMemberAO = $GroupObjAO->HasMemberRecursively( $PrincipalObj );
>
>
>
> $GroupObjBA->LoadUserDefinedGroup( 'RFC-AUTH-BA' );
>
> my $HasMemberBA = $GroupObjBA->HasMemberRecursively( $PrincipalObj );
>
>
>
> $GroupObjGE->LoadUserDefinedGroup( 'RFC-AUTH-GE' );
>
> my $HasMemberGE = $GroupObjGE->HasMemberRecursively( $PrincipalObj );
>
>
>
> $GroupObjOQ->LoadUserDefinedGroup( 'RFC-AUTH-OQ' );
>
> my $HasMemberOQ = $GroupObjOQ->HasMemberRecursively( $PrincipalObj );
>
>
>
> $GroupObjRJ->LoadUserDefinedGroup( 'RFC-AUTH-RJ' );
>
> my $HasMemberRJ = $GroupObjRJ->HasMemberRecursively( $PrincipalObj );
>
>
>
> $GroupObjUA->LoadUserDefinedGroup( 'RFC-AUTH-UA' );
>
> my $HasMemberUA = $GroupObjUA->HasMemberRecursively( $PrincipalObj );
>
> </%INIT>
>
>
>
> The result of this page looks like this:
>
>
>
> *Business Application Change* - install, change or delete business
> applications *%if ($HasMemberBA) { **Business Application Change
> <http://rt36-messenger.int.kn/RFC/ba/index.html>** %} else { Business
> Application
> <mailto:rt.global at kuehne-nagel.com?cc=andreas.gallei at kuehne-nagel.com&subject=Access%20to%20RfC%20Type%20Business%20Application%20needed>**
> %}*
>
> * *
>
> *So, it looks like the perl part was not parsed from RT. Its
> displaying pure html all perl code parts are text in this case.*
>
> * *
>
> *Any ideas or hints?*
>
> *
> Thanks*
>
> *
> Torsten*
>
>
>
> --
> Thanks in advance
> ....
> : Torsten Brumm
> :
> : Kuehne + Nagel
> : HAM - MI-ID
>
> :
> : Bauerbergweg 23-25
> : 22111 Hamburg
> :
> : +49 (40) 30333 3199
> : +49 (40) 30333 44 3199
> :
> : torsten.brumm at kuehne-nagel.com
> <mailto:torsten.brumm at kuehne-nagel.com>
> : www.kn-portal.com <http://www.kn-portal.com>
> : icq: 78258840
> ....
>
>
>
>
> Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann
> (Vors.), Uwe Bielang (Stellv.), Dr. Björn
> Johansson (Stellv.), Bruno Mang, Alfred Manke, Thorsten Meincke, Mark
> Reinhardt (Stellv.), Tim Scharwath, Jens
> Wollesen Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.:
> DE 812773878, Persönlich haftende
> Gesellschaft: Kühne & Nagel A.G., Sitz:
> Contern/LuxemburgGeschäftsführender Verwaltungsrat: Klaus-Michael
> Kühne
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
More information about the rt-users
mailing list