*/
class ProfiledispHelper extends Helper {
var $helpers = array(
+ 'Html',
'Form',
);
echo $this->Form->input('profile_type', $option);
}
+ /* profile_tablesの設定からテーブルヘッダを出力 */
+ function disp_th4profile_tables($profile_tables, $is_thead = true, $tr_options = array(), $th_options = array())
+ {
+ if (empty($profile_tables)) {
+ return null;
+ }
+
+ $values = array();
+ foreach ($profile_tables as $k => $v) {
+ $values[] = $v['title'];
+ }
+
+ $table_header = $this->Html->tableHeaders(
+ $values,
+ $tr_options,
+ $th_options
+ );
+
+ if ($is_thead) {
+ $table_header = '<thead>'.$table_header.'</thead>';
+ }
+
+ echo $table_header;
+ }
+
/* Profile種類を判断 */
function set_profile_type4view($profile)
{
$profiledisp->disp_select4profile_selects($profile['ProfileSelect']);
echo '<span class="edit_link">'.$html->link(__('Edit Select Items', true), array('controller' => 'profile_selects', 'action' => 'admin_listview', $profile['id'])).'</span>';
} elseif ($profiledisp->profile_type['is_table']) {
-// $profiledisp->disp_th4profile_table($profile['ProfileTable']);
+ echo '<table cellpadding="0" cellspacing="0">';
+ $profiledisp->disp_th4profile_tables($profile['ProfileTable']);
+ echo '</table>';
echo '<div class="edit_link">'.$html->link(__('Edit Table', true), array('controller' => 'profile_tables', 'action' => 'admin_listview', $profile['id'])).'</div>';
}
?>