CreateSlice: url and purpose no longer required
[unfold.git] / plugins / univbrisvtamform / __init__.py
1 from unfold.plugin import Plugin
2
3 class UnivbrisVtamForm (Plugin):
4
5     def __init__ (self, query=None, query_all=None, 
6                   checkboxes=False, columns=None, 
7                   init_key=None,
8                   datatables_options={}, **settings):
9         Plugin.__init__(self, **settings)
10         self.query          = query
11         self.query.uuid     = query.query_uuid if query else None
12         self.query_all      = query_all
13         self.query_all_uuid = query_all.query_uuid if query_all else None
14
15
16     def template_file (self):
17         return "univbrisvtamform.html"
18
19     def template_env (self, request):
20         env={}
21         env.update(self.__dict__)
22         return env
23
24     def requirements (self):
25         reqs = {
26             'js_files' : [ "js/spin-presets.js", "js/spin.min.js", "js/jquery.spin.js", 
27                            "js/dataTables.js", "js/dataTables.bootstrap.js", "js/with-datatables.js",
28                            "js/manifold.js", "js/manifold-query.js", 
29                            "js/unfold-helper.js",
30                            "js/univbrisvtamform.js",
31                            ] ,
32             'css_files': [ "css/dataTables.bootstrap.css",
33                            "css/dataTables.full_numbers.css",
34                            "css/univbrisvtamform.css",
35                            ],
36             }
37         return reqs
38
39     def json_settings_list (self):
40         return ['plugin_uuid', 'domid', 
41                 'query_uuid', 'query_all_uuid', 
42                 'checkboxes', 'datatables_options', 
43                 'hidden_columns', 'init_key',]