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