Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edc3219
commit 122a9d7
Showing
2 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,34 @@ | ||
[% c.place_bread(c.req.uri, 'Lista de categorias TR') %] | ||
[% INCLUDE 'header.tt' %] | ||
|
||
[% | ||
IF (!defined(c.req.param('pagina'))); | ||
CALL c.req.param('pagina',1); | ||
END; | ||
IF (defined(c.req.param('txtfiltro'))); | ||
SET v = c.req.param('txtfiltro'); | ||
ELSE; | ||
SET v = '%'; | ||
END; | ||
SET linhas_por_pagina = 1; | ||
SET categoria_rs = c.model('TermoReferencia').listar_tr_categorias( | ||
v, c.req.param('pagina'), linhas_por_pagina ); | ||
SET registros = categoria_rs.count(); | ||
SET num_paginas = int(registros / linhas_por_pagina) + 1; | ||
%] | ||
|
||
<FORM ACTION='[% c.uri_for_action('/auth/trcategorias/index') %]' METHOD='GET'> | ||
<INPUT TYPE='text' name='txtfiltro' VALUE="[% c.req.param('txtfiltro') | html %]" /> | ||
<INPUT TYPE='submit' name='btnenviar' value='enviar' /> | ||
</FORM> | ||
|
||
<UL> | ||
[% FOREACH categoria IN c.model('TermoReferencia').listar_tr_categorias() %] | ||
[% FOREACH categoria IN categoria_rs.all %] | ||
<LI>[% categoria.nome %]</LI> | ||
[% END %] | ||
</UL> | ||
|
||
<P>Página [% c.req.param('pagina') %] de [% num_paginas %] ([% registros %] registros)</P> | ||
|
||
|
||
[% INCLUDE 'footer.tt' %] |