Commit 56ca887e5bdd679dc110f0b0b9dd2afd27cd864d

Authored by Éber Freitas Dias
1 parent b92cfaae
Exists in 2.9 and in 8 other branches 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8

Atualiza forma de gerar breadcrumbs 15/x

ieducar/intranet/educar_matricula_historico_lst.php
@@ -195,13 +195,9 @@ class indice extends clsListagem @@ -195,13 +195,9 @@ class indice extends clsListagem
195 195
196 $this->largura = "100%"; 196 $this->largura = "100%";
197 197
198 - $localizacao = new LocalizacaoSistema();  
199 - $localizacao->entradaCaminhos( array(  
200 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
201 - "educar_index.php" => "Escola",  
202 - "" => "Histórico de enturmações da matrí­cula"  
203 - ));  
204 - $this->enviaLocalizacao($localizacao->montar()); 198 + $this->breadcrumb('Histórico de enturmações da matrí­cula', [
  199 + url('intranet/educar_index.php') => 'Escola',
  200 + ]);
205 } 201 }
206 } 202 }
207 203
ieducar/intranet/educar_matricula_ocorrencia_disciplinar_cad.php
@@ -129,15 +129,12 @@ class indice extends clsCadastro @@ -129,15 +129,12 @@ class indice extends clsCadastro
129 if (is_numeric($this->ref_cod_matricula)) 129 if (is_numeric($this->ref_cod_matricula))
130 $this->url_cancelar = ($retorno == "Editar") ? "educar_matricula_ocorrencia_disciplinar_det.php?ref_cod_matricula={$registro["ref_cod_matricula"]}&ref_cod_tipo_ocorrencia_disciplinar={$registro["ref_cod_tipo_ocorrencia_disciplinar"]}&sequencial={$registro["sequencial"]}" : "educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$this->ref_cod_matricula}"; 130 $this->url_cancelar = ($retorno == "Editar") ? "educar_matricula_ocorrencia_disciplinar_det.php?ref_cod_matricula={$registro["ref_cod_matricula"]}&ref_cod_tipo_ocorrencia_disciplinar={$registro["ref_cod_tipo_ocorrencia_disciplinar"]}&sequencial={$registro["sequencial"]}" : "educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$this->ref_cod_matricula}";
131 131
132 - $localizacao = new LocalizacaoSistema();  
133 - $localizacao->entradaCaminhos( array(  
134 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
135 - "educar_index.php" => "Escola",  
136 - "" => "Ocorrências disciplinares da matrícula"  
137 - ));  
138 - $this->enviaLocalizacao($localizacao->montar()); 132 + $this->breadcrumb('Ocorrências disciplinares da matrícula', [
  133 + url('intranet/educar_index.php') => 'Escola',
  134 + ]);
139 135
140 $this->nome_url_cancelar = "Cancelar"; 136 $this->nome_url_cancelar = "Cancelar";
  137 +
141 return $retorno; 138 return $retorno;
142 } 139 }
143 140
ieducar/intranet/educar_matricula_ocorrencia_disciplinar_det.php
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 * 02111-1307, USA. 25 * 02111-1307, USA.
26 * 26 *
27 */ 27 */
28 - 28 +
29 require_once('include/clsBase.inc.php'); 29 require_once('include/clsBase.inc.php');
30 require_once('include/clsDetalhe.inc.php'); 30 require_once('include/clsDetalhe.inc.php');
31 require_once('include/clsBanco.inc.php'); 31 require_once('include/clsBanco.inc.php');
@@ -63,7 +63,7 @@ class indice extends clsDetalhe @@ -63,7 +63,7 @@ class indice extends clsDetalhe
63 function Gerar() 63 function Gerar()
64 { 64 {
65 $this->titulo = "Matricula Ocorrencia Disciplinar - Detalhe"; 65 $this->titulo = "Matricula Ocorrencia Disciplinar - Detalhe";
66 - 66 +
67 67
68 $this->sequencial=$_GET["sequencial"]; 68 $this->sequencial=$_GET["sequencial"];
69 $this->ref_cod_matricula=$_GET["ref_cod_matricula"]; 69 $this->ref_cod_matricula=$_GET["ref_cod_matricula"];
@@ -197,13 +197,9 @@ class indice extends clsDetalhe @@ -197,13 +197,9 @@ class indice extends clsDetalhe
197 $this->url_cancelar = "educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$registro["ref_cod_matricula"]}"; 197 $this->url_cancelar = "educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$registro["ref_cod_matricula"]}";
198 $this->largura = "100%"; 198 $this->largura = "100%";
199 199
200 - $localizacao = new LocalizacaoSistema();  
201 - $localizacao->entradaCaminhos( array(  
202 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
203 - "educar_index.php" => "Escola",  
204 - "" => "Ocorrências disciplinares da matrícula"  
205 - ));  
206 - $this->enviaLocalizacao($localizacao->montar()); 200 + $this->breadcrumb('Ocorrências disciplinares da matrícula', [
  201 + url('intranet/educar_index.php') => 'Escola',
  202 + ]);
207 } 203 }
208 } 204 }
209 205
ieducar/intranet/educar_matricula_ocorrencia_disciplinar_lst.php
@@ -92,7 +92,7 @@ class indice extends clsListagem @@ -92,7 +92,7 @@ class indice extends clsListagem
92 foreach( $_GET AS $var => $val ) // passa todos os valores obtidos no GET para atributos do objeto 92 foreach( $_GET AS $var => $val ) // passa todos os valores obtidos no GET para atributos do objeto
93 $this->$var = ( $val === "" ) ? null: $val; 93 $this->$var = ( $val === "" ) ? null: $val;
94 94
95 - 95 +
96 96
97 if(!$this->ref_cod_matricula) 97 if(!$this->ref_cod_matricula)
98 $this->simpleRedirect('educar_matricula_lst.php'); 98 $this->simpleRedirect('educar_matricula_lst.php');
@@ -252,13 +252,9 @@ class indice extends clsListagem @@ -252,13 +252,9 @@ class indice extends clsListagem
252 252
253 $this->largura = "100%"; 253 $this->largura = "100%";
254 254
255 - $localizacao = new LocalizacaoSistema();  
256 - $localizacao->entradaCaminhos( array(  
257 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
258 - "educar_index.php" => "Escola",  
259 - "" => "Ocorrências disciplinares da matrícula"  
260 - ));  
261 - $this->enviaLocalizacao($localizacao->montar()); 255 + $this->breadcrumb('Ocorrências disciplinares da matrícula', [
  256 + url('intranet/educar_index.php') => 'Escola',
  257 + ]);
262 } 258 }
263 } 259 }
264 // cria uma extensao da classe base 260 // cria uma extensao da classe base
ieducar/intranet/educar_matricula_reclassificar_cad.php
@@ -79,7 +79,7 @@ class indice extends clsCadastro @@ -79,7 +79,7 @@ class indice extends clsCadastro
79 function Inicializar() 79 function Inicializar()
80 { 80 {
81 $retorno = "Novo"; 81 $retorno = "Novo";
82 - 82 +
83 83
84 $this->cod_matricula=$_GET["ref_cod_matricula"]; 84 $this->cod_matricula=$_GET["ref_cod_matricula"];
85 $this->ref_cod_aluno=$_GET["ref_cod_aluno"]; 85 $this->ref_cod_aluno=$_GET["ref_cod_aluno"];
@@ -101,16 +101,12 @@ class indice extends clsCadastro @@ -101,16 +101,12 @@ class indice extends clsCadastro
101 //$this->url_cancelar = "educar_matricula_lst.php?ref_cod_aluno={$this->ref_cod_aluno}"; 101 //$this->url_cancelar = "educar_matricula_lst.php?ref_cod_aluno={$this->ref_cod_aluno}";
102 $this->url_cancelar = "educar_matricula_det.php?cod_matricula={$this->cod_matricula}"; 102 $this->url_cancelar = "educar_matricula_det.php?cod_matricula={$this->cod_matricula}";
103 103
104 - $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar";  
105 - $localizacao = new LocalizacaoSistema();  
106 - $localizacao->entradaCaminhos( array(  
107 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
108 - "educar_index.php" => "Escola",  
109 - "" => "Registro da reclassificação da matrícula"  
110 - ));  
111 - $this->enviaLocalizacao($localizacao->montar()); 104 + $this->breadcrumb('Registro da reclassificação da matrícula', [
  105 + url('intranet/educar_index.php') => 'Escola',
  106 + ]);
112 107
113 $this->nome_url_cancelar = "Cancelar"; 108 $this->nome_url_cancelar = "Cancelar";
  109 +
114 return $retorno; 110 return $retorno;
115 } 111 }
116 112
@@ -165,7 +161,7 @@ class indice extends clsCadastro @@ -165,7 +161,7 @@ class indice extends clsCadastro
165 161
166 function Novo() 162 function Novo()
167 { 163 {
168 - 164 +
169 $obj_permissoes = new clsPermissoes(); 165 $obj_permissoes = new clsPermissoes();
170 $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada, 7, "educar_matricula_lst.php?ref_cod_aluno={$this->ref_cod_aluno}" ); 166 $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada, 7, "educar_matricula_lst.php?ref_cod_aluno={$this->ref_cod_aluno}" );
171 167
ieducar/intranet/educar_matricula_turma_cad.php
@@ -57,13 +57,9 @@ class indice extends clsCadastro @@ -57,13 +57,9 @@ class indice extends clsCadastro
57 $obj_permissoes = new clsPermissoes(); 57 $obj_permissoes = new clsPermissoes();
58 $obj_permissoes->permissao_cadastra(578, $this->pessoa_logada, 7, 'educar_matricula_lst.php'); 58 $obj_permissoes->permissao_cadastra(578, $this->pessoa_logada, 7, 'educar_matricula_lst.php');
59 59
60 - $localizacao = new LocalizacaoSistema();  
61 - $localizacao->entradaCaminhos( array(  
62 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
63 - "educar_index.php" => "Escola",  
64 - "" => "Enturmação da matrícula"  
65 - ));  
66 - $this->enviaLocalizacao($localizacao->montar()); 60 + $this->breadcrumb('Enturmação da matrícula', [
  61 + url('intranet/educar_index.php') => 'Escola',
  62 + ]);
67 63
68 //nova lógica 64 //nova lógica
69 $retorno = false; 65 $retorno = false;
ieducar/intranet/educar_matricula_turma_det.php
@@ -324,7 +324,7 @@ class indice extends clsDetalhe @@ -324,7 +324,7 @@ class indice extends clsDetalhe
324 } 324 }
325 325
326 %s 326 %s
327 - 327 +
328 document.formcadastro.ref_cod_matricula.value = ref_cod_matricula; 328 document.formcadastro.ref_cod_matricula.value = ref_cod_matricula;
329 document.formcadastro.ref_cod_turma_destino.value = ref_cod_turma_destino; 329 document.formcadastro.ref_cod_turma_destino.value = ref_cod_turma_destino;
330 document.formcadastro.data_enturmacao.value = document.getElementById("data_enturmacao").value; 330 document.formcadastro.data_enturmacao.value = document.getElementById("data_enturmacao").value;
@@ -392,13 +392,9 @@ class indice extends clsDetalhe @@ -392,13 +392,9 @@ class indice extends clsDetalhe
392 392
393 $this->largura = '100%'; 393 $this->largura = '100%';
394 394
395 - $localizacao = new LocalizacaoSistema();  
396 - $localizacao->entradaCaminhos( array(  
397 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
398 - "educar_index.php" => "Escola",  
399 - "" => "Enturmações da matrícula"  
400 - ));  
401 - $this->enviaLocalizacao($localizacao->montar()); 395 + $this->breadcrumb('Enturmações da matrícula', [
  396 + url('intranet/educar_index.php') => 'Escola',
  397 + ]);
402 } 398 }
403 399
404 protected function getEscolaSerie($escolaId, $serieId) { 400 protected function getEscolaSerie($escolaId, $serieId) {
ieducar/intranet/educar_matricula_turma_lst.php
@@ -106,7 +106,7 @@ class indice extends clsListagem @@ -106,7 +106,7 @@ class indice extends clsListagem
106 $this->ref_cod_turma = $_GET['ref_cod_turma']; 106 $this->ref_cod_turma = $_GET['ref_cod_turma'];
107 $this->ano_letivo = $_GET['ano_letivo']; 107 $this->ano_letivo = $_GET['ano_letivo'];
108 108
109 - 109 +
110 110
111 $this->addCabecalhos(array( 111 $this->addCabecalhos(array(
112 'Turma', 112 'Turma',
@@ -227,7 +227,7 @@ WHERE @@ -227,7 +227,7 @@ WHERE
227 $turmaHasEnturmacao = true; 227 $turmaHasEnturmacao = true;
228 } 228 }
229 229
230 - if($turmaHasEnturmacao) 230 + if($turmaHasEnturmacao)
231 $enturmado = "Sim"; 231 $enturmado = "Sim";
232 else 232 else
233 $enturmado = "Não"; 233 $enturmado = "Não";
@@ -249,13 +249,9 @@ WHERE @@ -249,13 +249,9 @@ WHERE
249 249
250 $this->largura = '100%'; 250 $this->largura = '100%';
251 251
252 - $localizacao = new LocalizacaoSistema();  
253 - $localizacao->entradaCaminhos( array(  
254 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
255 - "educar_index.php" => "Escola",  
256 - "" => "Enturmações da matrícula"  
257 - ));  
258 - $this->enviaLocalizacao($localizacao->montar()); 252 + $this->breadcrumb('Enturmações da matrícula', [
  253 + url('intranet/educar_index.php') => 'Escola',
  254 + ]);
259 } 255 }
260 } 256 }
261 257
ieducar/intranet/educar_matricula_turma_unificada_cad.php
@@ -98,13 +98,9 @@ class indice extends clsCadastro @@ -98,13 +98,9 @@ class indice extends clsCadastro
98 98
99 private function montaLocalizacao() 99 private function montaLocalizacao()
100 { 100 {
101 - $localizacao = new LocalizacaoSistema();  
102 - $localizacao->entradaCaminhos(array(  
103 - $_SERVER['SERVER_NAME'] . "/intranet" => "Início",  
104 - "educar_index.php" => "Escola",  
105 - "" => "Etapa da turma unificada",  
106 - ));  
107 - $this->enviaLocalizacao($localizacao->montar()); 101 + $this->breadcrumb('Etapa da turma unificada', [
  102 + url('intranet/educar_index.php') => 'Escola',
  103 + ]);
108 } 104 }
109 105
110 private function validaPermissao() 106 private function validaPermissao()
ieducar/intranet/educar_modulo_cad.php
@@ -75,17 +75,13 @@ class indice extends clsCadastro @@ -75,17 +75,13 @@ class indice extends clsCadastro
75 $this->url_cancelar = ($retorno == "Editar") ? "educar_modulo_det.php?cod_modulo={$registro["cod_modulo"]}" : "educar_modulo_lst.php"; 75 $this->url_cancelar = ($retorno == "Editar") ? "educar_modulo_det.php?cod_modulo={$registro["cod_modulo"]}" : "educar_modulo_lst.php";
76 76
77 $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar"; 77 $nomeMenu = $retorno == "Editar" ? $retorno : "Cadastrar";
78 - $localizacao = new LocalizacaoSistema();  
79 - $localizacao->entradaCaminhos(  
80 - array(  
81 - $_SERVER['SERVER_NAME']."/intranet" => "Início",  
82 - "educar_index.php" => "Escola",  
83 - "" => "{$nomeMenu} etapa"  
84 - )  
85 - );  
86 - $this->enviaLocalizacao($localizacao->montar()); 78 +
  79 + $this->breadcrumb($nomeMenu . ' etapa', [
  80 + url('intranet/educar_index.php') => 'Escola',
  81 + ]);
87 82
88 $this->nome_url_cancelar = "Cancelar"; 83 $this->nome_url_cancelar = "Cancelar";
  84 +
89 return $retorno; 85 return $retorno;
90 } 86 }
91 87