show variables for classes, small layout fix
This commit is contained in:
parent
c6d5824dff
commit
3d2dadbd62
@ -34,7 +34,8 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#nav li a {
|
#nav li a {
|
||||||
width : 9em;
|
margin-left: 0.5em;
|
||||||
|
width : 8.5em;
|
||||||
display : block;
|
display : block;
|
||||||
color : black;
|
color : black;
|
||||||
font-weight : bold;
|
font-weight : bold;
|
||||||
|
@ -17,14 +17,10 @@ module Main
|
|||||||
end
|
end
|
||||||
|
|
||||||
def variables(clas_model)
|
def variables(clas_model)
|
||||||
self.variables(clas_model.name)
|
layout = Virtual.machine.space.get_class_by_name(clas_model._name).object_layout
|
||||||
end
|
|
||||||
|
|
||||||
def self.variables(clas_name)
|
|
||||||
layout = Virtual.machine.space.get_class_by_name(clas_name).object_layout
|
|
||||||
vars = []
|
vars = []
|
||||||
layout.object_instance_names.each do |name|
|
layout.object_instance_names.each do |name|
|
||||||
vars << name
|
vars.push name
|
||||||
end
|
end
|
||||||
vars
|
vars
|
||||||
end
|
end
|
||||||
|
@ -9,24 +9,15 @@
|
|||||||
{{page._classes.each do |clas| }}
|
{{page._classes.each do |clas| }}
|
||||||
<li>
|
<li>
|
||||||
<a href="#">{{ clas._name }}</a>
|
<a href="#">{{ clas._name }}</a>
|
||||||
|
{{ unless variables(clas).empty? }}
|
||||||
<ul>
|
<ul>
|
||||||
|
{{variables(clas).each do |var| }}
|
||||||
<li>
|
<li>
|
||||||
<a href="#">Echeneis</a>
|
<a href="#">{{var}}</a>
|
||||||
<ul>
|
|
||||||
<li><a href="#">Echeneis</a></li>
|
|
||||||
<li><a href="#">Phtheirichthys</a></li>
|
|
||||||
<li><a href="#">Remora</a></li>
|
|
||||||
<li><a href="#">Remorina</a></li>
|
|
||||||
|
|
||||||
<li><a href="#">Rhombochirus</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#">Phtheirichthys</a></li>
|
{{ end }}
|
||||||
<li><a href="#">Remora</a></li>
|
|
||||||
<li><a href="#">Remorina</a></li>
|
|
||||||
|
|
||||||
<li><a href="#">Rhombochirus</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
{{ end }}
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user