Commit 099dd342a7c6522f593fa45f2255549c6d8c8810
1 parent
3c55a34b
Exists in
master
Alterado nível de acesso para nível Escola
Showing
3 changed files
with
31 additions
and
14 deletions
Show diff stats
ieducar/intranet/educar_servidor_formacao_cad.php
@@ -107,7 +107,7 @@ class indice extends clsCadastro | @@ -107,7 +107,7 @@ class indice extends clsCadastro | ||
107 | ); | 107 | ); |
108 | 108 | ||
109 | $obj_permissoes = new clsPermissoes(); | 109 | $obj_permissoes = new clsPermissoes(); |
110 | - $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3, $backUrl); | 110 | + $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, $backUrl); |
111 | 111 | ||
112 | if (is_string($this->passo) && $this->passo == 1) { | 112 | if (is_string($this->passo) && $this->passo == 1) { |
113 | $retorno = 'Novo'; | 113 | $retorno = 'Novo'; |
@@ -141,7 +141,7 @@ class indice extends clsCadastro | @@ -141,7 +141,7 @@ class indice extends clsCadastro | ||
141 | } | 141 | } |
142 | 142 | ||
143 | $obj_permissoes = new clsPermissoes(); | 143 | $obj_permissoes = new clsPermissoes(); |
144 | - if ($obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 3)) { | 144 | + if ($obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 7)) { |
145 | $this->fexcluir = TRUE; | 145 | $this->fexcluir = TRUE; |
146 | } | 146 | } |
147 | 147 | ||
@@ -318,7 +318,7 @@ class indice extends clsCadastro | @@ -318,7 +318,7 @@ class indice extends clsCadastro | ||
318 | ); | 318 | ); |
319 | 319 | ||
320 | $obj_permissoes = new clsPermissoes(); | 320 | $obj_permissoes = new clsPermissoes(); |
321 | - $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3, $backUrl); | 321 | + $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, $backUrl); |
322 | 322 | ||
323 | $obj = new clsPmieducarServidorFormacao(NULL, NULL, $this->pessoa_logada, | 323 | $obj = new clsPmieducarServidorFormacao(NULL, NULL, $this->pessoa_logada, |
324 | $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, | 324 | $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, |
@@ -365,7 +365,7 @@ class indice extends clsCadastro | @@ -365,7 +365,7 @@ class indice extends clsCadastro | ||
365 | ); | 365 | ); |
366 | 366 | ||
367 | $obj_permissoes = new clsPermissoes(); | 367 | $obj_permissoes = new clsPermissoes(); |
368 | - $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3, $backUrl); | 368 | + $obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7, $backUrl); |
369 | 369 | ||
370 | $obj = new clsPmieducarServidorFormacao($this->cod_formacao, $this->pessoa_logada, | 370 | $obj = new clsPmieducarServidorFormacao($this->cod_formacao, $this->pessoa_logada, |
371 | NULL, $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, | 371 | NULL, $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, |
@@ -419,7 +419,7 @@ class indice extends clsCadastro | @@ -419,7 +419,7 @@ class indice extends clsCadastro | ||
419 | ); | 419 | ); |
420 | 420 | ||
421 | $obj_permissoes = new clsPermissoes(); | 421 | $obj_permissoes = new clsPermissoes(); |
422 | - $obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 3, $backUrl); | 422 | + $obj_permissoes->permissao_excluir(635, $this->pessoa_logada, 7, $backUrl); |
423 | 423 | ||
424 | $obj = new clsPmieducarServidorFormacao($this->cod_formacao, $this->pessoa_logada, | 424 | $obj = new clsPmieducarServidorFormacao($this->cod_formacao, $this->pessoa_logada, |
425 | NULL, $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, | 425 | NULL, $this->ref_cod_servidor, $this->nm_formacao, $this->tipo, $this->descricao, |
ieducar/intranet/educar_servidor_formacao_det.php
@@ -164,7 +164,7 @@ class indice extends clsDetalhe | @@ -164,7 +164,7 @@ class indice extends clsDetalhe | ||
164 | 164 | ||
165 | $obj_permissoes = new clsPermissoes(); | 165 | $obj_permissoes = new clsPermissoes(); |
166 | 166 | ||
167 | - if ($obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3)) { | 167 | + if ($obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7)) { |
168 | $this->url_novo = 'educar_servidor_formacao_cad.php'; | 168 | $this->url_novo = 'educar_servidor_formacao_cad.php'; |
169 | 169 | ||
170 | $this->url_editar = sprintf( | 170 | $this->url_editar = sprintf( |
ieducar/intranet/educar_servidor_formacao_lst.php
@@ -33,6 +33,8 @@ require_once 'include/clsListagem.inc.php'; | @@ -33,6 +33,8 @@ require_once 'include/clsListagem.inc.php'; | ||
33 | require_once 'include/clsBanco.inc.php'; | 33 | require_once 'include/clsBanco.inc.php'; |
34 | require_once 'include/pmieducar/geral.inc.php'; | 34 | require_once 'include/pmieducar/geral.inc.php'; |
35 | 35 | ||
36 | +require_once 'CoreExt/View/Helper/UrlHelper.php'; | ||
37 | + | ||
36 | /** | 38 | /** |
37 | * clsIndexBase class. | 39 | * clsIndexBase class. |
38 | * | 40 | * |
@@ -47,7 +49,7 @@ class clsIndexBase extends clsBase | @@ -47,7 +49,7 @@ class clsIndexBase extends clsBase | ||
47 | { | 49 | { |
48 | function Formular() | 50 | function Formular() |
49 | { | 51 | { |
50 | - $this->SetTitulo($this->_instituicao . ' i-Educar - Servidor Formacao' ); | 52 | + $this->SetTitulo($this->_instituicao . ' i-Educar - Servidor Formação'); |
51 | $this->processoAp = 635; | 53 | $this->processoAp = 635; |
52 | } | 54 | } |
53 | } | 55 | } |
@@ -148,6 +150,10 @@ class indice extends clsListagem | @@ -148,6 +150,10 @@ class indice extends clsListagem | ||
148 | 150 | ||
149 | $total = $obj_servidor_formacao->_total; | 151 | $total = $obj_servidor_formacao->_total; |
150 | 152 | ||
153 | + // UrlHelper | ||
154 | + $url = CoreExt_View_Helper_UrlHelper::getInstance(); | ||
155 | + $path = 'educar_servidor_formacao_det.php'; | ||
156 | + | ||
151 | // Monta a lista | 157 | // Monta a lista |
152 | if (is_array($lista) && count($lista)) { | 158 | if (is_array($lista) && count($lista)) { |
153 | foreach ($lista as $registro) { | 159 | foreach ($lista as $registro) { |
@@ -182,25 +188,36 @@ class indice extends clsListagem | @@ -182,25 +188,36 @@ class indice extends clsListagem | ||
182 | $registro['tipo'] = 'Concurso'; | 188 | $registro['tipo'] = 'Concurso'; |
183 | } | 189 | } |
184 | 190 | ||
191 | + $options = array( | ||
192 | + 'query' => array( | ||
193 | + 'cod_formacao' => $registro['cod_formacao'] | ||
194 | + )); | ||
195 | + | ||
185 | $this->addLinhas(array( | 196 | $this->addLinhas(array( |
186 | - "<a href=\"educar_servidor_formacao_det.php?cod_formacao={$registro["cod_formacao"]}\">{$registro["nm_formacao"]}</a>", | ||
187 | - "<a href=\"educar_servidor_formacao_det.php?cod_formacao={$registro["cod_formacao"]}\">{$registro["tipo"]}</a>" | 197 | + $url->l($registro['nm_formacao'], $path, $options), |
198 | + $url->l($registro['tipo'], $path, $options) | ||
188 | )); | 199 | )); |
189 | 200 | ||
190 | $this->tipo = ''; | 201 | $this->tipo = ''; |
191 | } | 202 | } |
192 | } | 203 | } |
193 | 204 | ||
194 | - $this->addPaginador2( "educar_servidor_formacao_lst.php", $total, $_GET, $this->nome, $this->limite ); | 205 | + $this->addPaginador2('educar_servidor_formacao_lst.php', $total, $_GET, $this->nome, $this->limite); |
195 | $obj_permissoes = new clsPermissoes(); | 206 | $obj_permissoes = new clsPermissoes(); |
196 | 207 | ||
197 | - if ($obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 3)) { | ||
198 | - $this->array_botao[] = "Novo"; | ||
199 | - $this->array_botao_url[] = "educar_servidor_formacao_cad.php?ref_cod_servidor={$this->ref_cod_servidor}&ref_cod_instituicao={$this->ref_cod_instituicao}"; | 208 | + if ($obj_permissoes->permissao_cadastra(635, $this->pessoa_logada, 7)) { |
209 | + $this->array_botao[] = 'Novo'; | ||
210 | + $this->array_botao_url[] = sprintf( | ||
211 | + 'educar_servidor_formacao_cad.php?ref_cod_servidor=%d&ref_cod_instituicao=%d', | ||
212 | + $this->ref_cod_servidor, $this->ref_cod_instituicao | ||
213 | + ); | ||
200 | } | 214 | } |
201 | 215 | ||
202 | $this->array_botao[] = 'Voltar'; | 216 | $this->array_botao[] = 'Voltar'; |
203 | - $this->array_botao_url[] = "educar_servidor_det.php?cod_servidor={$this->ref_cod_servidor}&ref_cod_instituicao={$this->ref_cod_instituicao}"; | 217 | + $this->array_botao_url[] = sprintf( |
218 | + 'educar_servidor_det.php?cod_servidor=%d&ref_cod_instituicao=%d', | ||
219 | + $this->ref_cod_servidor, $this->ref_cod_instituicao | ||
220 | + ); | ||
204 | 221 | ||
205 | $this->largura = '100%'; | 222 | $this->largura = '100%'; |
206 | } | 223 | } |