show variables for classes, small layout fix

This commit is contained in:
Torsten Ruger 2015-08-13 19:54:45 +03:00
parent c6d5824dff
commit 3d2dadbd62
3 changed files with 13 additions and 25 deletions

View File

@ -34,7 +34,8 @@ body {
}
#nav li a {
width : 9em;
margin-left: 0.5em;
width : 8.5em;
display : block;
color : black;
font-weight : bold;

View File

@ -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

View File

@ -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>