From 3d2dadbd62c119498671e393d7846d1f2ef9171c Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 13 Aug 2015 19:54:45 +0300 Subject: [PATCH] show variables for classes, small layout fix --- app/main/assets/css/menu.css | 3 ++- app/main/controllers/classes_controller.rb | 8 ++----- app/main/views/classes/index.html | 27 ++++++++-------------- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/app/main/assets/css/menu.css b/app/main/assets/css/menu.css index 4901d62..1021fcb 100644 --- a/app/main/assets/css/menu.css +++ b/app/main/assets/css/menu.css @@ -34,7 +34,8 @@ body { } #nav li a { - width : 9em; + margin-left: 0.5em; + width : 8.5em; display : block; color : black; font-weight : bold; diff --git a/app/main/controllers/classes_controller.rb b/app/main/controllers/classes_controller.rb index 7628bc8..84c5dcc 100644 --- a/app/main/controllers/classes_controller.rb +++ b/app/main/controllers/classes_controller.rb @@ -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 diff --git a/app/main/views/classes/index.html b/app/main/views/classes/index.html index f056842..0aa7474 100644 --- a/app/main/views/classes/index.html +++ b/app/main/views/classes/index.html @@ -9,24 +9,15 @@ {{page._classes.each do |clas| }}
  • {{ clas._name }} - + {{ unless variables(clas).empty? }} + + {{ end }}
  • {{end}}