Commit 45ad3bfbefd91e7ebcb2dce8e64e7dcfcf236b45
1 parent
1b10194a
Exists in
master
and in
6 other branches
Inclusão de rotina para evitar que seja mostrado o ícone que abre o editor de ma…
…pas cadastrados (editor via i3Geo) quando o mapa não for baseado em um mapfile salvo anteriormente
Showing
4 changed files
with
11 additions
and
3 deletions
Show diff stats
admin/catalogo/mapas/funcoes.php
@@ -10,7 +10,7 @@ function listar($dbh, $id_mapa = ""){ | @@ -10,7 +10,7 @@ function listar($dbh, $id_mapa = ""){ | ||
10 | } | 10 | } |
11 | $dados = $dados[0]; | 11 | $dados = $dados[0]; |
12 | } else { | 12 | } else { |
13 | - $dados = \admin\php\funcoesAdmin\pegaDados ( "SELECT id_mapa, nome_mapa from " . $esquemaadmin . "i3geoadmin_mapas order by ordem_mapa, lower(nome_mapa)", $dbh, false ); | 13 | + $dados = \admin\php\funcoesAdmin\pegaDados ( "SELECT id_mapa, nome_mapa, CASE WHEN mapfile='' THEN 'nao' ELSE 'sim' END AS contemmapfile from " . $esquemaadmin . "i3geoadmin_mapas order by ordem_mapa, lower(nome_mapa)", $dbh, false ); |
14 | } | 14 | } |
15 | if ($dados === false) { | 15 | if ($dados === false) { |
16 | return false; | 16 | return false; |
admin/catalogo/mapas/index.js
@@ -62,7 +62,7 @@ Obtém a lista | @@ -62,7 +62,7 @@ Obtém a lista | ||
62 | "{{#data}}" + $("#templateOpcoesPerfil").html() + "{{/data}}", | 62 | "{{#data}}" + $("#templateOpcoesPerfil").html() + "{{/data}}", |
63 | {"data":json["perfis"]} | 63 | {"data":json["perfis"]} |
64 | ); | 64 | ); |
65 | - //lista todas as menus | 65 | + //lista |
66 | var html = Mustache.to_html( | 66 | var html = Mustache.to_html( |
67 | "{{#data}}" + templateLista + "{{/data}}", | 67 | "{{#data}}" + templateLista + "{{/data}}", |
68 | $.extend( | 68 | $.extend( |
admin/catalogo/mapas/index.php
@@ -58,6 +58,14 @@ include ("templates/templateFiltro.php"); | @@ -58,6 +58,14 @@ include ("templates/templateFiltro.php"); | ||
58 | include ("templates/templateOpcoesPerfil.php"); | 58 | include ("templates/templateOpcoesPerfil.php"); |
59 | include ("../../templates/templateOpcoesPublicado.php"); | 59 | include ("../../templates/templateOpcoesPublicado.php"); |
60 | ?> | 60 | ?> |
61 | +<style> | ||
62 | +.contemmapfilesim{ | ||
63 | + display:block; | ||
64 | +} | ||
65 | +.contemmapfilenao{ | ||
66 | + display:none; | ||
67 | +} | ||
68 | +</style> | ||
61 | <script type="text/javascript" src="index.js"></script> | 69 | <script type="text/javascript" src="index.js"></script> |
62 | <script type="text/javascript" src="../../dicionario/mapas.js"></script> | 70 | <script type="text/javascript" src="../../dicionario/mapas.js"></script> |
63 | <script> | 71 | <script> |
admin/catalogo/mapas/templates/templateLista.php
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="list-group-item" id="form-{{id_mapa}}"> | 2 | <div class="list-group-item" id="form-{{id_mapa}}"> |
3 | <div class="row-content"> | 3 | <div class="row-content"> |
4 | <h4 class="list-group-item-heading {{escondido}}"> | 4 | <h4 class="list-group-item-heading {{escondido}}"> |
5 | - <a title="i3Geo" href="javascript:void(0)" onclick="window.open('../../../admin/black_editorCriaMapa.php?id_mapa={{id_mapa}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | 5 | + <a title="i3Geo" href="javascript:void(0)" onclick="window.open('../../../admin/black_editorCriaMapa.php?id_mapa={{id_mapa}}')" class="contemmapfile{{contemmapfile}} btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
6 | <i class="material-icons md-18">send</i> | 6 | <i class="material-icons md-18">send</i> |
7 | </a> | 7 | </a> |
8 | <span class="pull-right"> </span> | 8 | <span class="pull-right"> </span> |