file('hardware.js'); Styles::instance()->add(" table.tinfo { font-size: 10px; color: #555; }"); $mask = array( 'table' => 'hw_compound', 'title' => 'Liste der Verbindungen', 'list' => array( 'id' => array( 'name' => 'ID', 'visible' => false, ), 'name' => array( 'name' => 'Name', 'width' => 120, ), 'hostname' => array( 'name' => 'Hostname', 'width' => 180, ), 'ip' => array( 'name' => 'IP-Addr', 'width' => 80, 'visible' => false, ), 'location' => array( 'name' => 'Location', 'filter' => 's', 'specs' => array('ClassName' => 'aligncenter'), 'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('hw_organisation','id','name').", 0, '')", 'distinct' => "SELECT DISTINCT location,hw_organisation.name FROM hw_compound JOIN hw_organisation ON location = hw_organisation.id ORDER BY name", 'width' => 100, ), 'status' => array( 'name' => 'Status', 'width' => 50, 'filter' => 's', 'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('hw_status','id','name').", 0, '')", 'distinct' => "SELECT DISTINCT status,hw_status.name FROM hw_compound JOIN hw_status ON status = hw_status.id ORDER BY name", ), ), 'second' => array( 'components' => array( 'title' => 'Komponenten', 'rows' => 8, 'table' => 'hw_screw', 'join' => array( 'hw_component ON component = hw_component.id', ), 'where' => 'compound = {id} AND hw_screw.endtime IS NULL ORDER BY name', 'onclick' => 'component_drilldown', 'list' => array( 'component' => array( 'name' => 'ID', 'visible' => false, ), 'name' => array( 'name' => 'Komponente', 'width' => 180, ), 'starttime' => array( 'name' => 'Seit', 'type' => 'date', 'specs' => array('dateFmt' => 'yyyy-mm-dd'), 'width' => 80, 'sql' => 'hw_screw.starttime' ), 'price' => array( 'name' => 'Preis', 'width' => 50, 'specs' => array('decPlaces' => 2, 'ClassName' => 'alignrightpad', 'canSort' => false), ), 'usage' => array( 'name' => 'Verwendung', 'width' => 270, ), ), ), ), 'edit' => array( 'name' => array( 'name' => 'Name', 'type' => 'text', 'size' => 25, ), 'hostname' => array( 'name' => 'Hostname', 'type' => 'text', 'size' => 25, ), 'ip' => array( 'name' => 'IP-Addresse', 'type' => 'text', 'size' => 16, ), 'ident' => array( 'name' => 'Ident', 'type' => 'text', 'size' => 25, ), 'location' => array( 'name' => 'Standort', 'type' => 'select', 'options' => 'SELECT id,name AS text FROM hw_organisation ORDER BY name', ), 'status' => array( 'name' => 'Status', 'type' => 'select', 'options' => 'SELECT id,name AS text FROM hw_status ORDER BY id', ), 'comment' => array( 'name' => 'Bemerkung', 'type' => 'textarea', ), ), );