ManageUser: Admin edit's user details
[myslice.git] / sample / trashutils.py
1 # a set of utilities to help make the global layout consistent across views
2
3 # this 
4 standard_topmenu_items = [ 
5 #    { 'label':'Tab', 'href': '/tab/'},
6 #    { 'label':'Scroll', 'href': '/scroll/'},
7 #    { 'label':'One Plugin', 'href': '/plugin/'},
8 # Thierry : using this goes to some test slice that not every one is in
9 # besides, the topmenu needs to be shrunk down horizontally
10 # otherwise the topmenu takes more vertical space than avail. and the layout is broken
11 #    { 'label':'Slice', 'href': '/slice/'},
12     #{'label':'My Account', 'href': '/portal/account/'}
13     ]
14
15 #login_out_items = { False: { 'label':'Login', 'href':'/login/'},
16 #                    True:  { 'label':'Logout', 'href':'/logout/'}}
17
18 # temporary for sample views
19 lorem="""
20 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod <code>mazim placerat</code> facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
21 """
22
23 lorem_p = "<p>"+lorem+"</p>"
24
25 hard_wired_slice_names = []
26 for site in [ 'inria', 'upmc' , 'ibbt' ]:
27     for slice in [ 'foo', 'bar', 'tutu', 'test', 'omf', 'heartbeat' ]:
28         hard_wired_slice_names.append ("ple.%s.%s"%(site,slice))
29
30 # having html tags right here is not a real use case
31 hard_wired_list=[]
32 hard_wired_list.append("this hard-wired list")
33 hard_wired_list.append("is defined")
34 hard_wired_list.append("in plugins.simplelist.py")
35 hard_wired_list.append("which in turn relies on")
36 hard_wired_list.append("template widget-template.html")
37 hard_wired_list.append("while it should of course")
38 hard_wired_list.append("instead issue a query")
39 hard_wired_list.append("and fill the DOM in js from there")
40 hard_wired_list.append("it would however maybe make sense")
41 hard_wired_list.append("to offer the option to 'datatablify'")
42 hard_wired_list.append("the list from the python code")
43 hard_wired_list.append("just like a standard plugin can be set as visible or not")
44 hard_wired_list.append("")    
45 hard_wired_list.append("OTOH and IMHO, there should be two separate and explicit subclasses of SimpleList for slices or testbeds")
46
47 quickfilter_criterias = [
48     {'key': 'Slice', 'values': ['slice1','slice2']},
49     {'key': 'Type', 'values': ['type1','type2']},
50     {'key': 'Network', 'values': ['net1','net2']},
51     ]
52