Commit ff896734d475825d28fce9fb1bbd4575d267712f
Exists in
master
Merge branch 'master' of https://github.com/lightbase/WSCacicNeo
Showing
3 changed files
with
75 additions
and
2 deletions
Show diff stats
wscacicneo/__init__.py
... | ... | @@ -46,14 +46,13 @@ def main(global_config, **settings): |
46 | 46 | config.add_route('listorgao', 'orgao/list') |
47 | 47 | config.add_route('delete_orgao', 'delete/{sigla}') |
48 | 48 | # |
49 | - | |
50 | 49 | #Usuários |
51 | 50 | config.add_route('user', 'user/cadastro') |
52 | 51 | config.add_route('post_user', 'post_user') |
53 | 52 | config.add_route('put_user', 'put_user') |
54 | 53 | config.add_route('edituser', 'editar/user/{matricula}') |
54 | + config.add_route('favoritos', 'editar/favoritos') | |
55 | 55 | # |
56 | - | |
57 | 56 | config.add_route('list', 'list') |
58 | 57 | config.add_route('gestao', 'gestao') |
59 | 58 | config.add_route('memoria', 'memoria') | ... | ... |
... | ... | @@ -0,0 +1,70 @@ |
1 | +<metal:main use-macro="load: master.pt"> | |
2 | + <metal:content fill-slot="conteudo"> | |
3 | + <div class="col-md-4" style="margin-left: 200px;"> | |
4 | + <div class="widget"> | |
5 | + <div class="widget-head"> | |
6 | + <div class="pull-left">Editar</div> | |
7 | + <div class="widget-icons pull-right"> | |
8 | + <a href="#" class="wminimize"><i class="fa fa-chevron-up"></i></a> | |
9 | + </div> | |
10 | + <div class="clearfix"></div> | |
11 | + </div> | |
12 | + <div class="widget-content"> | |
13 | + <div class="padd"> | |
14 | + <!-- Visitors, pageview, bounce rate, etc., Sparklines plugin used --> | |
15 | + <ul id='favoritos-off' class="current-status"> | |
16 | + <li class='cadastro-o'> | |
17 | + <span>Cadastro Órgãos</span> | |
18 | + </li> | |
19 | + <span id="Lista Órgãos">Lista Órgãos</span> | |
20 | + <li> | |
21 | + <span id='Cadastro Usuario'>Cadastro Usuarios</span> | |
22 | + </li> | |
23 | + <span class='lista-u'>Lista de Usuarios</span> | |
24 | + <li> | |
25 | + <span class='relatorios'>Relatorios</span> | |
26 | + </li> | |
27 | + <span class='graficos'>Graficos</span> | |
28 | + <li> | |
29 | + <span class='coleta'>Questionar Coleta</span> | |
30 | + </li> | |
31 | + <span class='notify'>Notificações da Coleta</span> | |
32 | + </ul> | |
33 | + </div> | |
34 | + </div> | |
35 | + </div> | |
36 | + </div> | |
37 | + <div class="col-md-4"> | |
38 | + <div class="widget"> | |
39 | + <div class="widget-head"> | |
40 | + <div class="pull-left">Favoritos</div> | |
41 | + <div class="widget-icons pull-right"> | |
42 | + <a href="#" class="wminimize"><i class="fa fa-chevron-up"></i></a> | |
43 | + </div> | |
44 | + <div class="clearfix"></div> | |
45 | + </div> | |
46 | + <div class="widget-content"> | |
47 | + <div class="padd"> | |
48 | + <!-- Visitors, pageview, bounce rate, etc., Sparklines plugin used --> | |
49 | + <ul id="favoritos-on" class="current-status"> | |
50 | + </ul> | |
51 | + </div> | |
52 | + </div> | |
53 | + </div> | |
54 | + </div> | |
55 | + </metal:content> | |
56 | + <metal:content fill-slot="javascript"> | |
57 | + <script type="text/javascript"> | |
58 | + $('span').click(function(){ | |
59 | + li = $(this).parent() | |
60 | + ul = $(li).parent() | |
61 | + id_ul = $(ul).attr('id') | |
62 | + console.log(id_ul) | |
63 | + id = $(this).html() | |
64 | + li = "<li><span>"+id+"</span></li>" | |
65 | + $('#favoritos-on').append(li) | |
66 | + | |
67 | + }); | |
68 | + </script> | |
69 | + </metal:content> | |
70 | +</metal:main> | ... | ... |
wscacicneo/views.py
... | ... | @@ -102,6 +102,10 @@ def listorgao(request): |
102 | 102 | search = orgao_obj.search_list_orgaos() |
103 | 103 | return {'orgao_doc': search.results} |
104 | 104 | |
105 | +@view_config(route_name='favoritos', renderer='templates/favoritos.pt') | |
106 | +def favoritos(request): | |
107 | + return {'project': 'WSCacicNeo'} | |
108 | + | |
105 | 109 | @view_config(route_name='config', renderer='templates/config.pt') |
106 | 110 | def config(request): |
107 | 111 | return {'project': 'WSCacicNeo'} | ... | ... |