#insert appropriate toolbars depending on user type [% IF user_type == 'admin' %] [% INCLUDE admin_function_buttons %] [% ELSIF user_type == 'staff' %] [% INCLUDE staff_function_buttons %] [% ELSE %] [% INCLUDE client_function_buttons %] [% END %] #loop through data hash [% FOREACH item_id IN data.keys.sort %] ..... [% END %]
#insert links to functions on items attributes depending on user type [% IF user_type == 'admin' || user_type == 'staff' %] [% END %] data.$item_id.att_1 [% IF user_type == 'admin' || user_type == 'staff' %] [% END %] [% data.$item_id.att_2 %] [% data.$item_id.att_3 %] # display messages depending on condition and user type [% IF data.$item_id.att_3 >= 100 && user_type == 'staff'%]High stock - move these suckers!![% END %] [% data.$item_id.att_N %]