Commit | Line | Data |
---|---|---|
e586807d H |
1 | <!-- |
2 | This program is free software. It comes without any warranty, to | |
3 | the extent permitted by applicable law. You can redistribute it | |
4 | and/or modify it under the terms of the Do What The Fuck You Want | |
5 | To Public License, Version 2, as published by Sam Hocevar. See | |
6 | http://sam.zoy.org/wtfpl/COPYING for more details. | |
7 | --> | |
8 | ||
9 | ||
10 | {get_movement user_id=1538 offset=$offset listing_amount=$listing_amount} | |
11 | ||
12 | ||
13 | Graph<br> | |
14 | {ldelim}<br> | |
15 | ### metadata ###<br> | |
16 | @name="movment graph";<br> | |
17 | @description=;<br> | |
18 | @numNodes=;<br> | |
19 | @numLinks={math equation="x+1" x=$listing_amount};<br> | |
20 | @numPaths=0;<br> | |
21 | @numPathLinks=0;<br> | |
22 | <br> | |
23 | ||
24 | ### structural data ###<br> | |
25 | @links=[<br> | |
26 | ||
27 | {foreach from=$get_movement name=grafnode item=movement} | |
28 | {if $smarty.foreach.grafnode.first} | |
29 | {ldelim} @source={counter start=0}; @destination={counter}; {rdelim} ,<br> | |
30 | {/if} | |
31 | {ldelim} @source={counter}; @destination={counter}; {rdelim} ,<br> | |
32 | {if $smarty.foreach.grafnode.last} | |
33 | {ldelim} @source={counter}; @destination={counter assign=abc}{$abc}; {rdelim}<br> | |
34 | {/if} | |
35 | {/foreach} | |
36 | ||
37 | ];<br> | |
38 | @paths=; | |
39 | <br><br> | |
40 | ### attribute data ###<br> | |
41 | @enumerations=;<br> | |
42 | @attributeDefinitions=<br> | |
43 | [<br> | |
44 | {ldelim}<br> | |
45 | @name=$root;<br> | |
46 | @type=bool;<br> | |
47 | @default=|| false ||;<br> | |
48 | @nodeValues=[ {ldelim} @id=0; @value=T; {rdelim} ];<br> | |
49 | @linkValues=;<br> | |
50 | @pathValues=;<br> | |
51 | {rdelim},<br> | |
52 | ||
53 | {ldelim}<br> | |
54 | @name=$tree_link;<br> | |
55 | @type=bool;<br> | |
56 | @default=|| false ||;<br> | |
57 | @nodeValues=;<br> | |
58 | @linkValues=[<br> | |
59 | {foreach from=$get_movement name=treelink item=movement} | |
60 | {if $smarty.foreach.treelink.first} {ldelim} @id={math equation="x-1" x=$smarty.foreach.treelink.iteration}; @value=T; {rdelim}<br>{/if} | |
61 | {ldelim} @id={$smarty.foreach.treelink.iteration}; @value=T; {rdelim},<br> | |
62 | {if $smarty.foreach.treelink.last} {ldelim} @id={math equation="x+1" x=$smarty.foreach.treelink.total}; @value=T; {rdelim}<br>{/if} | |
63 | {/foreach} | |
64 | ];<br> | |
65 | @pathValues=;<br> | |
66 | {rdelim},<br> | |
67 | ||
68 | {ldelim}<br> | |
69 | @name=$node_id;<br> | |
70 | @type=int;<br> | |
71 | @default=;<br> | |
72 | @nodeValues=[ <br> | |
73 | {math equation="x*2" x=$listing_amount assign=list} | |
74 | {get_movement user_id=1538 offset=$offset listing_amount=$list} | |
75 | {foreach from=$get_movement name=graf item=movement} | |
76 | {if $smarty.foreach.graf.first} {ldelim} @id={math equation="x-1" x=$smarty.foreach.graf.iteration}; @value={$movement.node_id}; {rdelim}<br>{/if} | |
77 | {ldelim} @id={$smarty.foreach.graf.iteration}; @value={$movement.node_id}; {rdelim},<br> | |
78 | {if $smarty.foreach.graf.last} {ldelim} @id={math equation="x+1" x=$smarty.foreach.graf.total}; @value={$movement.node_id}; {rdelim}<br>{/if} | |
79 | {/foreach} | |
80 | ];<br> | |
81 | @linkValues=;<br> | |
82 | @pathValues=;<br> | |
83 | {rdelim}<br> | |
84 | ];<br> | |
85 | @qualifiers=[<br> | |
86 | {ldelim}<br> | |
87 | @type=$spanning_tree;<br> | |
88 | @name=$sample_spanning_tree;<br> | |
89 | @description=;<br> | |
90 | @attributes=[<br> | |
91 | {ldelim}@attribute=0;@alias=$root;{rdelim},<br> | |
92 | {ldelim}@attribute=1;@alias=$tree_link;{rdelim}<br> | |
93 | ];<br> | |
94 | {rdelim}<br> | |
95 | ];<br> | |
96 | <br> | |
97 | ### visualization hints ###<br> | |
98 | @filters=;<br> | |
99 | @selectors=;<br> | |
100 | @displays=;<br> | |
101 | @presentations=;<br> | |
102 | <br> | |
103 | ### interface hints ###<br> | |
104 | @presentationMenus=;<br> | |
105 | @displayMenus=;<br> | |
106 | @selectorMenus=;<br> | |
107 | @filterMenus=;<br> | |
108 | @attributeMenus=;<br> | |
109 | {rdelim} | |
110 | <hr> | |
111 | @numNodes={math equation="x+1" x=$abc} | |
112 |