<table> <?php foreach ($row as $col => $value) { ?> <tr> <td><?php echo $col; ?> </td> <td><?php if ($col == "_id") { echo $value; continue; } $attrctx = new AttrRenderCtx(); echo $attrctx->Execute($types[$col], "view", $value); ?> </td> </tr> <?php } ?> </table> <hr /> <h3>Comments:</h3> <?php foreach ($children['Comments'] as $comment) { ?> <b>By <?php echo $comment['Author']; ?>
continue; } ?> <option value="<?php echo $type; ?> " <?php echo $type == $attr['type'] ? "selected" : ""; ?> ><?php echo $type; ?> </option> <?php } ?> </select> <input type='text' name='model[<?php echo $attr['id']; ?> ][label]' size='50' value='<?php echo $attr['label']; ?> '><br /> <?php $attrctx = new AttrRenderCtx(); echo $attrctx->Execute($attr, "editor"); ?> </li>
<tr> <th>Attr.</th> <th>Value</th> </tr> </thead> <?php foreach ($record as $attr => $details) { ?> <?php if ($attr == '_id') { continue; } ?> <tr> <td><?php echo $attr; ?> </td> <td> <?php $attrctx = new AttrRenderCtx(); echo $attrctx->Execute($details, "edit", $details['value']); ?> </td> </tr> <?php } ?> </table> <input type='submit' value='Save' /> </form>
<tr> <th>Attribute</th> <th>Value</th> </tr> <?php foreach ($record as $attr => $details) { ?> <tr> <?php if ($attr == '_id') { continue; } ?> <td><?php echo $attr; ?> </td> <td> <?php $attrctx = new AttrRenderCtx(); echo $attrctx->Execute($details, "edit"); ?> </td> </tr> <?php } ?> </table> <input type='submit' value='Save' /> </form>
</tr> </thead> <?php foreach ($rows as $row) { ?> <tr> <?php foreach ($structure as $col => $value) { ?> <td><?php if ($col == "_id") { echo $value; continue; } $attrctx = new AttrRenderCtx(); echo $attrctx->Execute($value, "view", isset($row[$col]) ? $row[$col] : ""); ?> </td> <?php } ?> <td style='white-space:nowrap;'> <?php echo link_to("edit record", "edit", isset($type) ? $type : NULL, array("_id" => $row['_id'])); ?> | <?php echo link_to("delete record", "delete", isset($type) ? $type : NULL, array("_id" => $row['_id'])); ?> </td> </tr>