reduce object to list and register to show that list

also remove duplication in registercontroller
ready for events
This commit is contained in:
Torsten Ruger
2015-08-19 00:22:08 +02:00
parent d7e0cd665f
commit 719f026d0f
4 changed files with 18 additions and 33 deletions

View File

@ -2,8 +2,6 @@
objects index
<:Body>
<li>
<a href="#">{{marker(attrs.id)}} {{attrs.id}}</a>
{{ if(is_object?(attrs.id) ) }}
<ul>
{{content(attrs.id).each do |con3| }}
@ -13,4 +11,3 @@
{{end}}
</ul>
{{ end }}
</li>

View File

@ -4,13 +4,16 @@
<:Body>
<div class="registers-view">
{{ model.each do |reg| }}
<div class="register-view">
<ul id="nav">
<a href="#">{{reg.name}} : {{reg.value}}</a>
{{ reg.fields.each do |attribute| }}
<:objects id={{attribute.object_id}} />
{{end}}
</ul>
<div class="register-view" id="nav">
{{ if(is_object?(reg.value) ) }}
<:objects id={{reg.value}} />
{{else}}
<ul>
<li>
<a href="#">{{reg.value}}</a>
</li>
</ul>
{{ end }}
</div>
{{end}}
</div>