diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-10-09 14:22:23 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-10-09 14:22:23 -0400 |
commit | f4ea92cc3931535bb749d5e68b7100431dde3652 (patch) | |
tree | 80309095bafffa7d2907a81b4f9c9a8d9c3919f3 /src/views/pages/users/index.html.php | |
parent | 7e91c2872778407172fa42208be1aa7e466b97e3 (diff) | |
parent | 38bb3a7c752199ee8f58e16bc784f48a6a600e08 (diff) |
Merge branch 'concurrent-editing' into anon-userlist
Conflicts:
src/controllers/Users.class.php
Diffstat (limited to 'src/views/pages/users/index.html.php')
-rw-r--r-- | src/views/pages/users/index.html.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/views/pages/users/index.html.php b/src/views/pages/users/index.html.php index caedf5c..daed9f7 100644 --- a/src/views/pages/users/index.html.php +++ b/src/views/pages/users/index.html.php @@ -18,7 +18,11 @@ $t->openTag('table', array('class'=>'sortable', 'id'=>'bar')); $t->openTag('thead'); $t->openTag('tr'); foreach ($attribs as $attrib) { - $t->tag('th', array(), $attrib['name']); + switch ($attrib['type']) { + case 'bool': $class = 'small'; break; + default: $class = ''; break; + } + $t->tag('th', array('class'=>$class), $attrib['name']); } $t->tag('th', array(), '-'); $t->closeTag('tr'); @@ -27,7 +31,11 @@ $t->closeTag('thead'); $t->openTag('tfoot'); $t->openTag('tr'); foreach ($attribs as $attrib) { - $t->tag('th', array(), $attrib['name']); + switch ($attrib['type']) { + case 'bool': $class = 'small'; break; + default: $class = ''; break; + } + $t->tag('th', array('class'=>$class), $attrib['name']); } $t->tag('th', array(), '-'); $t->closeTag('tr'); @@ -42,11 +50,15 @@ foreach ($users as $user) { $t->openTag('td'); $props = $user[$attrib['key']]; - - $value = $props['value']; + + $bool = $attrib['type']=='bool'; + if ($bool) { + $value = $props['value']=='true'; + } else { + $value = $props['value']; + } $editable = $props['editable']; $post_key = $props['post_key']; - $bool = is_bool($value); $arr = array('name'=>$post_key); if (!$editable) { |