Commit a8feb0b7f72c22c0d5f4b83c38c8aa2020a0ed8e

Authored by Helder
2 parents b96754a9 5fea4931
Exists in master

Merge branch 'master' of https://github.com/lightbase/WSCacicNeo

wscacicneo/__init__.py
... ... @@ -14,6 +14,7 @@ def main(global_config, **settings):
14 14 config.add_route('notifications', 'notifications')
15 15 config.add_route('admin', 'admin')
16 16 config.add_route('busca', 'busca')
  17 + config.add_route('gestor', 'gestor')
17 18 config.add_route('diagnostic', 'diagnostic')
18 19 config.add_route('reports', 'reports')
19 20 config.add_route('sobre', 'sobre')
... ...
wscacicneo/static/admin.js
... ... @@ -21,7 +21,7 @@ var painelContent=
21 21 ]
22 22 },
23 23 {
24   - text: 'Administrção de Usuário',
  24 + text: 'Administração de Usuário',
25 25 expanded: true,
26 26 children: [
27 27 {
... ...
wscacicneo/static/gestor.js 0 → 100644
... ... @@ -0,0 +1,47 @@
  1 +var painelContent=
  2 + Ext.create('Ext.tree.Panel', {
  3 + renderTo: Ext.getBody(),
  4 + title: '',
  5 + root: {
  6 + text: 'Gestor',
  7 + expanded: true,
  8 + children: [
  9 + {
  10 + text: 'Coleta automática',
  11 + leaf: true
  12 + },
  13 + {
  14 + text: 'Nova coleta',
  15 + leaf: true
  16 + },
  17 + {
  18 + text: 'Questionar coleta',
  19 + leaf: true
  20 + },
  21 + ]
  22 + }
  23 + });
  24 +
  25 +admin = Ext.create('Ext.panel.Panel', {
  26 + title: 'Gestor de Orgãos',
  27 + width: '75%',
  28 + frame: true,
  29 + layout: 'fit',
  30 + collapsible: true,
  31 + draggable: true,
  32 + border : true,
  33 + style: {
  34 + margin: '0px auto 15px auto'
  35 + },
  36 + items: painelContent
  37 + });
  38 +
  39 +Ext.onReady(function(){
  40 +
  41 + Ext.create('Ext.Container', {
  42 + padding: '15px',
  43 + items: [admin],
  44 + renderTo: 'widgets'
  45 + });
  46 +
  47 +});
... ...
wscacicneo/static/main.js
... ... @@ -13,14 +13,13 @@ Ext.onReady(function() {
13 13 {text: 'Gestor de Orgãos' },
14 14 {text: 'Notificações' },
15 15 {text: 'Relatórios' },
16   - {text: 'Acesso Rápido' },
17 16 {text: 'Sobre' },
18 17 ]
19 18 });
20 19  
21 20 fav_html = '<div id="favoriteItems">'+
22 21 '<div class="fav"><a href="reports"><img src="static/icons/relatorios.png">Relat&oacuterios</a></div>'+
23   - '<div class="fav"><a><img src="static/icons/usuario.png">Usu&aacuterio</a></div>'+
  22 + '<div class="fav"><a><img src="static/icons/usuario.png">Meu Perfil</a></div>'+
24 23 '<div class="fav"><a><img src="static/icons/ferramentas.png">Ferramentas de sistema</a></div>'+
25 24 '</div>';
26 25  
... ...
wscacicneo/templates/gestor.pt 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +<metal:main use-macro="load: master.pt">
  2 + <!-- Insere JavaScript -->
  3 + <script metal:fill-slot="javascript" type="text/javascript" src="static/gestor.js"></script>
  4 +
  5 + <div metal:fill-slot="conteudo" id="widgets"></div>
  6 +</metal:main>
... ...
wscacicneo/views.py
... ... @@ -23,6 +23,10 @@ def home(request):
23 23 def graficop(request):
24 24 return {'project': 'WSCacicNeo'}
25 25  
  26 +@view_config(route_name='gestor', renderer='templates/gestor.pt')
  27 +def graficop(request):
  28 + return {'project': 'WSCacicNeo'}
  29 +
26 30 @view_config(route_name='notifications', renderer='templates/dashboard.pt')
27 31 def dashboard(request):
28 32 return {'project': 'WSCacicNeo'}
... ...