コード例 #1
0
ファイル: edit.php プロジェクト: RVRKC/Hackathon_2015
    if ($trade_menu) {
        $tabs['trades'] = $trade_menu;
    }
}
/* HISTORY */
if ($this->hc_modules->exists('logaudit')) {
    $tabs['history'] = '<i class="fa fa-list-ul"></i> ' . lang('common_history');
    $tab_content['history'] = Modules::run('logaudit/admin/index', $object);
}
/* DELETE SERIES */
if ($group_count > 1 && $this->hc_modules->exists('shift_groups')) {
    $tabs['delete'] = '<i class="fa fa-times text-danger"></i> ' . lang('common_delete');
    $tab_content['delete'] = Modules::run('shift_groups/admin/delete_form', $object);
}
?>

<?php 
$tabs_id = hc_random();
echo Hc_bootstrap::nav_tabs($tabs, '', '', $tabs_id);
echo hc_bootstrap::tab_content($tab_content);
?>

<script language="JavaScript">
if ( window.location.hash )
{
	jQuery('#<?php 
echo $tabs_id;
?>
 a[href="' + window.location.hash + '"]').tab("show");
}
</script>
コード例 #2
0
ファイル: add.php プロジェクト: RVRKC/Hackathon_2015
<?php 
if ($default_user_id && !is_array($default_user_id)) {
    ?>
	<?php 
    $default_user = new User_Model();
    $default_user->get_by_id($default_user_id);
    $fields['user']['type'] = 'hidden';
    ?>
	<?php 
    echo $this->hc_form->input($fields['user']);
    echo Hc_html::wrap_input(lang('user_level_staff'), $default_user->title(TRUE));
} else {
    ?>
	<?php 
    $default_assign = $this->hc_form->get_default('assign');
    echo Hc_html::wrap_input($fields['user']['label'], array('', Hc_bootstrap::nav_tabs(array('later' => lang('common_select_later'), 'now' => lang('common_select_now')), $default_assign, 'assign', '', 'style="margin: 0 0;"')));
    ?>

	<?php 
    unset($fields['user']['options'][0]);
    $fields['user']['extra']['multiple'] = 'multiple';
    $fields['user']['extra']['class'] = 'hc-multiselect';
    echo hc_bootstrap::tab_content(array('later' => Hc_html::wrap_input(lang('shift_staff_count'), $this->hc_form->build_input(array('name' => 'count', 'type' => 'text', 'size' => 4, 'default' => 1))), 'now' => Hc_html::wrap_input('', $this->hc_form->build_input($fields['user']))), $default_assign);
}
?>

<?php 
echo Hc_html::wrap_input('', form_submit(array('name' => 'submit', 'class' => 'btn btn-default'), lang($this->conf['entity'] . '_add')));
?>

<?php 
コード例 #3
0
ファイル: edit.php プロジェクト: RVRKC/Hackathon_2015
$tab_content['edit'][] = Hc_html::wrap_input($fields['user']['label'], $this->hc_form->build_input($fields['user']));
$tab_content['edit'][] = Hc_html::wrap_input('', form_submit(array('name' => 'submit', 'class' => 'btn btn-default'), lang('common_save')) . '&nbsp;' . ci_anchor(array($this->conf['path'], 'delete', $object->id), lang('common_delete'), 'class="btn btn-danger btn-sm hc-confirm"'));
$tab_content['edit'][] = form_close();
$tab_content['edit'] = join("\n", $tab_content['edit']);
/* CONFLICTS */
if ($conflicts) {
    $tabs['conflicts'] = '<i class="fa fa-exclamation-circle text-danger"></i> ' . lang('shift_conflicts');
    $targets = array('timeoff' => 'admin/timeoffs/edit', 'shift' => 'admin/shifts/edit');
    $tab_content['conflicts'] = array();
    $tab_content['conflicts'][] = '<ul class="list-unstyled">';
    foreach ($conflicts as $c) {
        $tab_content['conflicts'][] = '<li class="alert alert-danger">';
        $tab_content['conflicts'][] = ci_anchor(array($targets[$c->my_class()], $c->id), $c->title(TRUE));
        $tab_content['conflicts'][] = '</li>';
    }
    $tab_content['conflicts'][] = '</ul>';
    $tab_content['conflicts'] = join("\n", $tab_content['conflicts']);
} else {
    $tabs['_conflicts'] = '<i class="fa fa-check text-success"></i> ' . lang('shift_no_conflicts');
}
/* NOTES */
if ($this->hc_modules->exists('notes')) {
    $notes_count = $object->note->count();
    $tabs['notes'] = '<i class="fa fa-comment-o"></i> ' . lang('common_notes') . ' [' . $notes_count . ']';
    $tab_content['notes'] = array('content' => Modules::run('notes/admin/index', 'timeoff', $object->id), 'attr' => array('class' => 'hc-target', 'data-src' => ci_site_url(array('notes/admin/index', 'timeoff', $object->id))));
}
?>

<?php 
echo Hc_bootstrap::nav_tabs($tabs);
echo hc_bootstrap::tab_content($tab_content);