Commit 0e30f7e8f3e760dd5fb282c0e677726fb08b49cc
1 parent
caa56bf1
Exists in
master
lista de notificacoes
Showing
5 changed files
with
76 additions
and
125 deletions
Show diff stats
wscacicneo/__init__.py
... | ... | @@ -52,6 +52,7 @@ def main(global_config, **settings): |
52 | 52 | cfg.add_route('delete_user', 'usuario/delete/{matricula}') |
53 | 53 | cfg.add_route('notify', 'lista/notificacoes') |
54 | 54 | cfg.add_route('post_notify', 'post_notify') |
55 | + cfg.add_route('list_notify', 'notificacoes/lista') | |
55 | 56 | # |
56 | 57 | cfg.add_route('list', 'list') |
57 | 58 | cfg.add_route('gestao', 'gestao') | ... | ... |
... | ... | @@ -0,0 +1,62 @@ |
1 | +<metal:main use-macro="load: master.pt"> | |
2 | + <metal:content fill-slot="conteudo"> | |
3 | + <div class="matter"> | |
4 | + <div class="container"> | |
5 | + <div class="row"> | |
6 | + <div class="col-md-12"> | |
7 | + <div class="widget"> | |
8 | + <div class="widget-head"> | |
9 | + <div class="pull-left">Data Tables</div> | |
10 | + <div class="widget-icons pull-right"> | |
11 | + <a href="#" class="wminimize"><i class="fa fa-chevron-up"></i></a> | |
12 | + <a href="#" class="wclose"><i class="fa fa-times"></i></a> | |
13 | + </div> | |
14 | + <div class="clearfix"></div> | |
15 | + </div> | |
16 | + <div class="widget-content"> | |
17 | + <div class="padd"> | |
18 | + <div class="page-tables"> | |
19 | + <div class="table-responsive"> | |
20 | + <table cellpadding="0" cellspacing="0" border="0" id="data-table" width="100%"> | |
21 | + <thead> | |
22 | + <tr> | |
23 | + <th>Órgão</th> | |
24 | + <th>ID da Coleta</th> | |
25 | + <th>Vizualizada</th> | |
26 | + <th>Notificação</th> | |
27 | + <th>Opções</th> | |
28 | + </tr> | |
29 | + </thead> | |
30 | + <tbody> | |
31 | + <tr tal:repeat="coleta doc"> | |
32 | + <td>${coleta.orgao}</td> | |
33 | + <td>${coleta.id_coleta}</td> | |
34 | + <td>${coleta.status}</td> | |
35 | + <td>${coleta.notify}</td> | |
36 | + <td> | |
37 | + <a class="btn btn-xs btn-success"><i class="fa fa-check"></i></a> | |
38 | + <a href="${request.route_url('root')}" class="btn btn-xs btn-warning"><i class="fa fa-pencil"></i></a> | |
39 | + <a href="${request.route_url('root')}" class="btn btn-xs btn-danger"><i class="fa fa-times"></i></a> | |
40 | + </td> | |
41 | + </tr> | |
42 | + </tbody> | |
43 | + | |
44 | + </table> | |
45 | + <div class="clearfix"></div> | |
46 | + </div> | |
47 | + </div> | |
48 | + </div> | |
49 | + </div> | |
50 | + <div class="widget-foot"> | |
51 | + </div> | |
52 | + </div> | |
53 | + </div> | |
54 | + </div> | |
55 | + </div> | |
56 | + </div> | |
57 | + </metal:content> | |
58 | + <metal:content fill-slot="javascript"> | |
59 | + <script type="text/javascript"> | |
60 | + </script> | |
61 | + </metal:content> | |
62 | +</metal:main> | ... | ... |
wscacicneo/templates/master.pt
... | ... | @@ -13,20 +13,16 @@ |
13 | 13 | <div class="navbar navbar-fixed-top bs-docs-nav" role="banner"> |
14 | 14 | |
15 | 15 | <div class="conjtainer"> |
16 | - | |
17 | 16 | <!-- Menu button for smallar screens --> |
18 | 17 | <div class="navbar-header"> |
19 | 18 | <button class="navbar-toggle btn-navbar" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse"> |
20 | 19 | <span>Menu</span> |
21 | 20 | </button> |
22 | - | |
23 | 21 | <!-- Site name for smallar screens --> |
24 | 22 | <a href="index.html" class="navbar-brand hidden-lg">Super-Gerente</a> |
25 | 23 | </div> |
26 | - | |
27 | 24 | <!-- Navigation starts --> |
28 | 25 | <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation"> |
29 | - | |
30 | 26 | <!-- Links --> |
31 | 27 | <ul class="nav navbar-nav pull-right"> |
32 | 28 | <li class="dropdown pull-right"> |
... | ... | @@ -40,7 +36,6 @@ |
40 | 36 | </ul> |
41 | 37 | </li> |
42 | 38 | </ul> |
43 | - | |
44 | 39 | <!-- Search form --> |
45 | 40 | <form class="navbar-form navbar-right" role="search"> |
46 | 41 | <div class="form-group"> |
... | ... | @@ -51,12 +46,10 @@ |
51 | 46 | |
52 | 47 | </div> |
53 | 48 | </div> |
54 | - | |
55 | 49 | <!-- Header starts --> |
56 | 50 | <header> |
57 | 51 | <div class="container"> |
58 | 52 | <div class="row"> |
59 | - | |
60 | 53 | <!-- Logo section --> |
61 | 54 | <div class="col-md-4"> |
62 | 55 | <!-- Logo. --> |
... | ... | @@ -64,125 +57,10 @@ |
64 | 57 | <h1><a href="${request.route_url('root')}home"><img src="${request.route_url('root')}static/caciclogo_transparent.png"> </a> |
65 | 58 | <a href="${request.route_url('root')}home">Super<span class="bold">Gerente</span></a></h1> |
66 | 59 | </div> |
67 | - | |
68 | 60 | <!-- Logo ends --> |
69 | 61 | </div> |
70 | - | |
71 | 62 | <!-- Button section --> |
72 | - <div class="col-md-4"> | |
73 | - | |
74 | - <!-- Buttons --> | |
75 | - <ul class="nav nav-pills"> | |
76 | - | |
77 | - <!-- Comment button with number of latest comments count --> | |
78 | - <li class="dropdown dropdown-big"> | |
79 | - <a class="dropdown-toggle" href="#" data-toggle="dropdown"> | |
80 | - <i class="fa fa-comments"></i> Chats <span class="label label-info">6</span> | |
81 | - </a> | |
82 | - | |
83 | - <ul class="dropdown-menu"> | |
84 | - <li> | |
85 | - <!-- Heading - h5 --> | |
86 | - <h5><i class="fa fa-comments"></i> Chats</h5> | |
87 | - <!-- Use hr tag to add border --> | |
88 | - <hr /> | |
89 | - </li> | |
90 | - <li> | |
91 | - <!-- List item heading h6 --> | |
92 | - <h6><a href="#">Hi :)</a> <span class="label label-warning pull-right">10:42</span></h6> | |
93 | - <div class="clearfix"></div> | |
94 | - <hr /> | |
95 | - </li> | |
96 | - <li> | |
97 | - <h6><a href="#">How are you?</a> <span class="label label-warning pull-right">20:42</span></h6> | |
98 | - <div class="clearfix"></div> | |
99 | - <hr /> | |
100 | - </li> | |
101 | - <li> | |
102 | - <h6><a href="#">What are you doing?</a> <span class="label label-warning pull-right">14:42</span></h6> | |
103 | - <div class="clearfix"></div> | |
104 | - <hr /> | |
105 | - </li> | |
106 | - <li> | |
107 | - <div class="drop-foot"> | |
108 | - <a href="#">View All</a> | |
109 | - </div> | |
110 | - </li> | |
111 | - </ul> | |
112 | - </li> | |
113 | - | |
114 | - <!-- Message button with number of latest messages count--> | |
115 | - <li class="dropdown dropdown-big"> | |
116 | - <a class="dropdown-toggle" href="#" data-toggle="dropdown"> | |
117 | - <i class="fa fa-envelope"></i> Inbox <span class="label label-primary">6</span> | |
118 | - </a> | |
119 | - | |
120 | - <ul class="dropdown-menu"> | |
121 | - <li> | |
122 | - <!-- Heading - h5 --> | |
123 | - <h5><i class="fa fa-envelope"></i> Messages</h5> | |
124 | - <!-- Use hr tag to add border --> | |
125 | - <hr /> | |
126 | - </li> | |
127 | - <li> | |
128 | - <!-- List item heading h6 --> | |
129 | - <h6><a href="#">Hello how are you?</a></h6> | |
130 | - <!-- List item para --> | |
131 | - <p>Quisque eu consectetur erat eget semper...</p> | |
132 | - <hr /> | |
133 | - </li> | |
134 | - <li> | |
135 | - <h6><a href="#">Today is wonderful?</a></h6> | |
136 | - <p>Quisque eu consectetur erat eget semper...</p> | |
137 | - <hr /> | |
138 | - </li> | |
139 | - <li> | |
140 | - <div class="drop-foot"> | |
141 | - <a href="#">View All</a> | |
142 | - </div> | |
143 | - </li> | |
144 | - </ul> | |
145 | - </li> | |
146 | - | |
147 | - <!-- Members button with number of latest members count --> | |
148 | - <li class="dropdown dropdown-big"> | |
149 | - <a class="dropdown-toggle" href="#" data-toggle="dropdown"> | |
150 | - <i class="fa fa-user"></i> Users <span class="label label-success">6</span> | |
151 | - </a> | |
152 | - | |
153 | - <ul class="dropdown-menu"> | |
154 | - <li> | |
155 | - <!-- Heading - h5 --> | |
156 | - <h5><i class="fa fa-user"></i> Users</h5> | |
157 | - <!-- Use hr tag to add border --> | |
158 | - <hr /> | |
159 | - </li> | |
160 | - <li> | |
161 | - <!-- List item heading h6--> | |
162 | - <h6><a href="#">Ravi Kumar</a> <span class="label label-warning pull-right">Free</span></h6> | |
163 | - <div class="clearfix"></div> | |
164 | - <hr /> | |
165 | - </li> | |
166 | - <li> | |
167 | - <h6><a href="#">Balaji</a> <span class="label label-important pull-right">Premium</span></h6> | |
168 | - <div class="clearfix"></div> | |
169 | - <hr /> | |
170 | - </li> | |
171 | - <li> | |
172 | - <h6><a href="#">Kumarasamy</a> <span class="label label-warning pull-right">Free</span></h6> | |
173 | - <div class="clearfix"></div> | |
174 | - <hr /> | |
175 | - </li> | |
176 | - <li> | |
177 | - <div class="drop-foot"> | |
178 | - <a href="#">View All</a> | |
179 | 63 | </div> |
180 | - </li> | |
181 | - </ul> | |
182 | - </li> | |
183 | - </ul> | |
184 | - </div> | |
185 | - </div> | |
186 | 64 | </div> |
187 | 65 | </header> |
188 | 66 | ... | ... |
wscacicneo/templates/menu.pt
... | ... | @@ -11,6 +11,7 @@ |
11 | 11 | <ul |
12 | 12 | > <li><a href="${request.route_url('root')}orgao/cadastro">Cadastrar Orgão</a></li> |
13 | 13 | <li><a href="${request.route_url('root')}orgao/lista">Listar Orgãos</a></li> |
14 | + <li><a href="${request.route_url('root')}notificacoes/lista">Notificalções</a></li> | |
14 | 15 | </ul> |
15 | 16 | <li class="has_sub"> |
16 | 17 | <a href="#"><i class="fa fa-file-o"></i> Usuário <span class="pull-right"><i class="fa fa-chevron-right"></i></span></a> | ... | ... |
wscacicneo/views.py
... | ... | @@ -39,7 +39,7 @@ def blankmaster(request): |
39 | 39 | |
40 | 40 | @view_config(route_name='master', renderer='templates/master.pt') |
41 | 41 | def master(request): |
42 | - return {'project': 'WSCacicNeo'} | |
42 | + return { } | |
43 | 43 | |
44 | 44 | @view_config(route_name='root') |
45 | 45 | def root(request): |
... | ... | @@ -49,9 +49,18 @@ def root(request): |
49 | 49 | def home(request): |
50 | 50 | return {'project': 'WSCacicNeo'} |
51 | 51 | |
52 | -@view_config(route_name='reports', renderer='templates/reports.pt') | |
52 | +@view_config(route_name='list_notify', renderer='templates/list_notify.pt') | |
53 | 53 | def reports(request): |
54 | - return {'project': 'WSCacicNeo'} | |
54 | + notify_obj = Notify( | |
55 | + orgao = 'deasdsd', | |
56 | + id_coleta = 'saudhasd', | |
57 | + notify = 'sadsad', | |
58 | + status = 'sadasd' | |
59 | + ) | |
60 | + reg = notify_obj.search_list_notify() | |
61 | + doc = reg.results | |
62 | + print(doc,'aaaaaaaaaaaaaaa') | |
63 | + return {'doc': doc} | |
55 | 64 | |
56 | 65 | @view_config(route_name='gestao', renderer='templates/gestao.pt') |
57 | 66 | def gestao(request): | ... | ... |