当前位置: 首页>>代码示例>>PHP>>正文


PHP SortableTable::set_form_actions方法代码示例

本文整理汇总了PHP中SortableTable::set_form_actions方法的典型用法代码示例。如果您正苦于以下问题:PHP SortableTable::set_form_actions方法的具体用法?PHP SortableTable::set_form_actions怎么用?PHP SortableTable::set_form_actions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SortableTable的用法示例。


在下文中一共展示了SortableTable::set_form_actions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function display_data($return = false)
 {
     $count = array($this, 'count');
     $data = array($this, 'get_data');
     $parameters = array();
     $parameters['sec_token'] = Security::get_token();
     $parameters['ceiling'] = $this->get_ceiling();
     $parameters['active_only'] = $this->get_active_only() ? 'true' : 'false';
     $additional_parameters = $this->get_additional_parameters();
     $parameters = array_merge($additional_parameters, $parameters);
     $table = new SortableTable('users', $count, $data, 1, 50);
     $table->set_additional_parameters($parameters);
     $col = 0;
     $table->set_header($col++, '', false);
     $table->set_header($col++, get_lang('Code'));
     $table->set_header($col++, get_lang('FirstName'));
     $table->set_header($col++, get_lang('LastName'));
     $table->set_header($col++, get_lang('LoginName'));
     $table->set_header($col++, get_lang('Email'));
     $table->set_header($col++, get_lang('Profile'));
     $table->set_header($col++, get_lang('AuthenticationSource'));
     $table->set_header($col++, get_lang('RegisteredDate'));
     $table->set_header($col++, get_lang('LastAccess'), false);
     $table->set_header($col++, get_lang('Active'), false);
     $table->set_column_filter(5, array($this, 'format_email'));
     $table->set_column_filter(6, array($this, 'format_status'));
     $table->set_column_filter(10, array($this, 'format_active'));
     $table->set_form_actions(array('activate' => get_lang('Activate'), 'deactivate' => get_lang('Deactivate'), 'delete' => get_lang('Delete')));
     if ($return) {
         return $table->return_table();
     } else {
         echo $table->return_table();
     }
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:34,代码来源:zombie_report.class.php

示例2: FormValidator

        case 'show_message':
            $message = Display::return_message(Security::remove_XSS(stripslashes($_GET['message'])));
            break;
    }
}
// Create a search-box
$form = new FormValidator('search_simple', 'get', '', '', null, false);
$renderer =& $form->defaultRenderer();
$renderer->setElementTemplate('<span>{element}</span> ');
$form->addElement('text', 'keyword', get_lang('keyword'));
$form->addElement('button', 'submit', get_lang('Search'));
$content .= $form->return_form();
// Create the sortable table with class information
$table = new SortableTable('classes', 'get_number_of_classes', 'get_class_data', 1);
$table->set_additional_parameters(array('keyword' => $_GET['keyword']));
$table->set_header(0, '', false);
$table->set_header(1, get_lang('ClassName'));
$table->set_header(2, get_lang('NumberOfUsers'));
$table->set_header(3, '', false);
$table->set_column_filter(3, 'modify_filter');
$table->set_form_actions(array('delete_classes' => get_lang('DeleteSelectedClasses')), 'class');
$content .= $table->return_table();
$actions .= Display::url(Display::return_icon('add.png', get_lang('Add'), array(), ICON_SIZE_MEDIUM), 'class_add.php');
$actions .= Display::url(Display::return_icon('import_csv.png', get_lang('AddUsersToAClass'), array(), ICON_SIZE_MEDIUM), 'class_user_import.php');
$actions .= Display::url(Display::return_icon('import_csv.png', get_lang('ImportClassListCSV'), array(), ICON_SIZE_MEDIUM), 'class_import.php');
$app['title'] = $tool_name;
$tpl = $app['template'];
$tpl->assign('content', $content);
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
$tpl->display_one_col_template();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:class_list.php

示例3: array

    $parameters = array();
    if (isset($_GET['keyword'])) {
        $parameters = array('keyword' => Security::remove_XSS($_GET['keyword']));
    } elseif (isset($_GET['keyword_code'])) {
        $parameters['keyword_code'] = Security::remove_XSS($_GET['keyword_code']);
        $parameters['keyword_title'] = Security::remove_XSS($_GET['keyword_title']);
        $parameters['keyword_category'] = Security::remove_XSS($_GET['keyword_category']);
        $parameters['keyword_language'] = Security::remove_XSS($_GET['keyword_language']);
        $parameters['keyword_visibility'] = Security::remove_XSS($_GET['keyword_visibility']);
        $parameters['keyword_subscribe'] = Security::remove_XSS($_GET['keyword_subscribe']);
        $parameters['keyword_unsubscribe'] = Security::remove_XSS($_GET['keyword_unsubscribe']);
    }
    $table->set_additional_parameters($parameters);
    $table->set_header(0, '', false, 'width="8px"');
    $table->set_header(1, get_lang('Title'), true, 'width="360px"');
    $table->set_header(2, get_lang('Code'));
    $table->set_header(3, get_lang('Language'), true, 'width="70px"');
    $table->set_header(4, get_lang('Category'));
    $table->set_header(5, get_lang('SubscriptionAllowed'), true, 'width="60px"');
    $table->set_header(6, get_lang('UnsubscriptionAllowed'), false, 'width="50px"');
    //$table->set_header(7, get_lang('Teacher'));
    $table->set_header(7, get_lang('Action'), false, 'width="160px"', array('class' => 'td_actions'));
    $table->set_column_filter(7, 'modify_filter');
    $table->set_form_actions(array('delete_courses' => get_lang('DeleteCourse')), 'course');
    $content .= $table->return_table();
}
$tpl = new Template($tool_name);
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:course_list.php

示例4: switch

 /**
  * @return string
  */
 static function outbox_display()
 {
     $social_link = false;
     if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') {
         $social_link = 'f=social';
     }
     $success = get_lang('SelectedMessagesDeleted') . '&nbsp</b><br /><a href="outbox.php?' . $social_link . '">' . get_lang('BackToOutbox') . '</a>';
     $html = null;
     if (isset($_REQUEST['action'])) {
         switch ($_REQUEST['action']) {
             case 'delete':
                 $number_of_selected_messages = count($_POST['id']);
                 if ($number_of_selected_messages != 0) {
                     foreach ($_POST['id'] as $index => $message_id) {
                         MessageManager::delete_message_by_user_receiver(api_get_user_id(), $message_id);
                     }
                 }
                 $html .= Display::return_message(api_xml_http_response_encode($success), 'normal', false);
                 break;
             case 'deleteone':
                 MessageManager::delete_message_by_user_receiver(api_get_user_id(), $_GET['id']);
                 $html .= Display::return_message(api_xml_http_response_encode($success), 'normal', false);
                 $html .= '<br/>';
                 break;
         }
     }
     // display sortable table with messages of the current user
     $table = new SortableTable('message_outbox', array('MessageManager', 'get_number_of_messages_sent'), array('MessageManager', 'get_message_data_sent'), 3, 20, 'DESC');
     $parameters['f'] = isset($_GET['f']) && $_GET['f'] == 'social' ? 'social' : null;
     $table->set_additional_parameters($parameters);
     $table->set_header(0, '', false, array('style' => 'width:15px;'));
     $table->set_header(1, get_lang('Messages'), false);
     $table->set_header(2, get_lang('Date'), true, array('style' => 'width:160px;'));
     $table->set_header(3, get_lang('Modify'), false, array('style' => 'width:70px;'));
     $table->set_form_actions(array('delete' => get_lang('DeleteSelectedMessages')));
     $html .= $table->return_table();
     return $html;
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:41,代码来源:message.lib.php

示例5: array

}
$table->set_header(5, get_lang('LoginName'));
$table->set_header(6, get_lang('Email'));
$table->set_header(7, get_lang('Profile'));
$table->set_header(8, get_lang('Active'), true, 'width="15px"');
$table->set_header(9, get_lang('RegistrationDate'), true, 'width="90px"');
$table->set_header(10, get_lang('Action'), false, 'width="220px"');
$table->set_column_filter(3, 'user_filter');
$table->set_column_filter(4, 'user_filter');
$table->set_column_filter(6, 'email_filter');
$table->set_column_filter(7, 'status_filter');
$table->set_column_filter(8, 'active_filter');
$table->set_column_filter(10, 'modify_filter');
// Only show empty actions bar if delete users has been blocked
if (api_is_platform_admin() && !$deleteUserAvailable) {
    $table->set_form_actions(array('delete' => get_lang('DeleteFromPlatform')));
} else {
    $table->set_form_actions(array('none' => get_lang('NoActionAvailable')));
}
$table_result = $table->return_table();
$extra_search_options = '';
//Try to search the user everywhere
if ($table->get_total_number_of_items() == 0) {
    if (api_get_multiple_access_url() && isset($_REQUEST['keyword'])) {
        $keyword = Database::escape_string($_REQUEST['keyword']);
        $conditions = array('username' => $keyword);
        $user_list = UserManager::get_user_list($conditions, array(), false, ' OR ');
        if (!empty($user_list)) {
            $extra_search_options = Display::page_subheader(get_lang('UsersFoundInOtherPortals'));
            $table = new HTML_Table(array('class' => 'data_table'));
            $column = 0;
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user_list.php

示例6: array

 /**
  * This function displays the sortable table with all the surveys
  *
  * @return	void	(direct output)
  *
  * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
  * @version January 2007
  */
 static function display_survey_list()
 {
     $parameters = array();
     $parameters['cidReq'] = api_get_course_id();
     if (isset($_GET['do_search']) && $_GET['do_search']) {
         $message = get_lang('DisplaySearchResults') . '<br />';
         $message .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '">' . get_lang('DisplayAll') . '</a>';
         Display::display_normal_message($message, false);
     }
     // Create a sortable table with survey-data
     $table = new SortableTable('surveys', 'get_number_of_surveys', 'get_survey_data', 2);
     $table->set_additional_parameters($parameters);
     $table->set_header(0, '', false);
     $table->set_header(1, get_lang('SurveyName'));
     $table->set_header(2, get_lang('SurveyCode'));
     $table->set_header(3, get_lang('NumberOfQuestions'));
     $table->set_header(4, get_lang('Author'));
     //$table->set_header(5, get_lang('Language'));
     //$table->set_header(6, get_lang('Shared'));
     $table->set_header(5, get_lang('AvailableFrom'));
     $table->set_header(6, get_lang('AvailableUntil'));
     $table->set_header(7, get_lang('Invite'));
     $table->set_header(8, get_lang('Anonymous'));
     $table->set_header(9, get_lang('Modify'), false, 'width="150"');
     $table->set_column_filter(8, 'anonymous_filter');
     $table->set_column_filter(9, 'modify_filter');
     $table->set_form_actions(array('delete' => get_lang('DeleteSurvey')));
     $table->display();
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:37,代码来源:survey.lib.php

示例7: foreach

        Display::display_header($tool_name);
        api_display_tool_title($tool_name);
        echo $msg;
        if ($_GET['action'] == 'blackout') {
            $result = Rsys::black_out_changer($_GET['id']);
            Display::display_normal_message(get_lang('BlackoutPage' . $result), false);
        }
        echo '<form id="cat_form" action="m_item.php" method="get"><div style="float: left;"><a href="m_item.php?action=add">' . get_lang('AddNewItem') . '</a></div><div style="text-align: right;">' . get_lang('CategoryFilter') . ': <select name="cat" onchange="this.form.submit();"><option value="0">*** ' . get_lang('All') . ' ***</option>';
        $cats = Rsys::get_category_with_items_manager();
        foreach ($cats as $cat) {
            echo '<option value="' . $cat['id'] . '"' . ($cat['id'] == $_GET['cat'] ? ' selected="selected"' : '') . '>' . $cat['name'] . '</option>';
        }
        echo '</select></div></form>';
        echo "hier";
        $table = new SortableTable('item', array('Rsys', 'get_num_items'), array('Rsys', 'get_table_items'), 1);
        echo "hier2";
        $table->set_additional_parameters(array('cat' => $_GET['cat']));
        $table->set_header(0, '', false, array('style' => 'width:10px'));
        $table->set_header(1, get_lang('ItemName'), true);
        $table->set_header(2, get_lang('ItemDescription'), true);
        $table->set_header(3, get_lang('Category'), true);
        $table->set_header(4, get_lang('ItemCreator'), true);
        $table->set_header(5, '', false, array('style' => 'width:100px;'));
        $table->set_column_filter(5, 'modify_filter');
        $table->set_form_actions(array('delete_items' => get_lang('DeleteSelectedItems')), 'items');
        $table->display();
}
/**
   ---------------------------------------------------------------------
*/
Display::display_footer();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:m_item_origineel.php

示例8: switch

        if (isset($_POST['action'])) {
            switch ($_POST['action']) {
                case 'delete_reservations':
                    $ids = $_POST['reservations'];
                    if (count($ids) > 0) {
                        foreach ($ids as $index => $id) {
                            Rsys::delete_reservation($id);
                        }
                    }
                    break;
            }
        }
        $table = new SortableTable('reservation', array('Rsys', 'get_num_reservations'), array('Rsys', 'get_table_reservations'), 1);
        $table->set_additional_parameters(array('keyword' => $_GET['keyword']));
        $table->set_header(0, '', false, array('style' => 'width:10px'));
        $table->set_header(1, get_lang('ResourceName'), true);
        $table->set_header(2, get_lang('StartDate'), true);
        $table->set_header(3, get_lang('EndDate'), true);
        $table->set_header(4, get_lang('SubscribeFrom'), true);
        $table->set_header(5, get_lang('SubscribeUntil'), true);
        $table->set_header(6, get_lang('Subscribers'), true);
        $table->set_header(7, get_lang('Notes'), false);
        $table->set_header(8, '', false, array('style' => 'width:65px;'));
        $table->set_column_filter(8, 'modify_filter');
        $table->set_form_actions(array('delete_reservations' => get_lang('DeleteSelectedBookingPeriod')), 'reservations');
        $table->display();
}
/**
   ---------------------------------------------------------------------
*/
Display::display_footer();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:m_reservation.php

示例9: array

} else {
    $table->set_header(3, get_lang('LastName'));
    $table->set_header(4, get_lang('FirstName'));
}
$table->set_header(5, get_lang('LoginName'));
$table->set_header(6, get_lang('Email'));
$table->set_header(7, get_lang('Profile'));
$table->set_header(8, get_lang('Active'), true, 'width="15px"');
$table->set_header(9, get_lang('RegistrationDate'), true, 'width="90px"');
$table->set_header(10, get_lang('Action'), false, 'width="220px"');
$table->set_column_filter(6, 'email_filter');
$table->set_column_filter(7, 'status_filter');
$table->set_column_filter(8, 'active_filter');
$table->set_column_filter(10, 'modify_filter');
if (api_is_platform_admin()) {
    $table->set_form_actions(array('delete' => get_lang('DeleteFromPlatform')));
}
$table_result = $table->return_table();
$extra_search_options = '';
//Try to search the user everywhere
if ($table->get_total_number_of_items() == 0) {
    if (api_get_multiple_access_url() && isset($_REQUEST['keyword'])) {
        $keyword = Database::escape_string($_REQUEST['keyword']);
        //$conditions = array('firstname' => $keyword, 'lastname' => $keyword, 'username' => $keyword);
        $conditions = array('username' => $keyword);
        $user_list = UserManager::get_user_list($conditions, array(), false, ' OR ');
        if (!empty($user_list)) {
            $extra_search_options = Display::page_subheader(get_lang('UsersFoundInOtherPortals'));
            $table = new HTML_Table(array('class' => 'data_table'));
            $column = 0;
            $row = 0;
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:user_list.php

示例10: reg_filter

    return $classes;
}
/**
 * Build the reg-column of the table
 * @param int $class_id The class id
 * @return string Some HTML-code
 */
function reg_filter($class_id)
{
    $result = "<a href=\"" . api_get_self() . "?register=yes&amp;class_id=" . $class_id . "\">" . get_lang("reg") . "</a>";
    return $result;
}
// Build search-form
$form = new FormValidator('search_class', 'get', '', '', null, false);
$form->addText('keyword', '', false);
$form->addButtonSearch(get_lang('SearchButton'));
// Build table
$table = new SortableTable('users', 'get_number_of_classes', 'get_class_data', 1);
$parameters['keyword'] = Security::remove_XSS($_GET['keyword']);
$table->set_additional_parameters($parameters);
$col = 0;
$table->set_header($col++, '', false);
$table->set_header($col++, get_lang('ClassName'));
$table->set_header($col++, get_lang('NumberOfUsers'));
$table->set_header($col++, get_lang('reg'), false);
$table->set_column_filter($col - 1, 'reg_filter');
$table->set_form_actions(array('subscribe' => get_lang('reg')), 'class');
// Display form & table
$form->display();
$table->display();
Display::display_footer();
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:subscribe_class.php

示例11: SortableTable

$parameters['keyword_lastname'] = $_GET['keyword_lastname'];
$parameters['keyword_email'] = $_GET['keyword_email'];
if (isset($_GET['id_session'])) {
    $parameters['id_session'] = $_GET['id_session'];
}
// Create a sortable table with user-data
$parameters['sec_token'] = Security::get_token();
$table = new SortableTable('users', 'ldap_get_number_of_users', 'ldap_get_user_data', (api_is_western_name_order() xor api_sort_by_first_name()) ? 3 : 2);
$table->set_additional_parameters($parameters);
$table->set_header(0, '', false);
$table->set_header(1, get_lang('LoginName'));
if (api_is_western_name_order()) {
    $table->set_header(2, get_lang('FirstName'));
    $table->set_header(3, get_lang('LastName'));
} else {
    $table->set_header(2, get_lang('LastName'));
    $table->set_header(3, get_lang('FirstName'));
}
$table->set_header(4, get_lang('Email'));
$table->set_header(5, get_lang('Actions'));
//$table->set_column_filter(5, 'email_filter');
//$table->set_column_filter(5, 'active_filter');
$table->set_column_filter(5, 'modify_filter');
$table->set_form_actions(array('add_user' => get_lang('AddLDAPUsers')));
$table->display();
/*
==============================================================================
		FOOTER
==============================================================================
*/
Display::display_footer();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:ldap_users_list.php

示例12: switch

                //echo '&nbsp;&nbsp;<a href="m_category.php">'.Display::return_icon('settings.gif',get_lang('Configuration')).'&nbsp;'.get_lang('Configuration').'</a>';
            }
            echo '</div><br />';
        }
        if (isset($_POST['action'])) {
            switch ($_POST['action']) {
                case 'delete_subscriptions':
                    $ids = $_POST['subscriptions'];
                    if (count($ids) > 0) {
                        foreach ($ids as $id) {
                            Rsys::delete_subscription(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1));
                        }
                    }
                    break;
            }
        }
        $table = new SortableTable('subscription', array('Rsys', 'get_num_subscriptions'), array('Rsys', 'get_table_subscriptions'), 2);
        $table->set_header(0, '', false, array('style' => 'width:10px'));
        $table->set_header(1, get_lang('ResourceName'), true);
        $table->set_header(2, get_lang('StartDate'), true);
        $table->set_header(3, get_lang('EndDate'), true);
        $table->set_header(4, get_lang('Accept'), true);
        $table->set_header(5, get_lang('Modify'), false, array('style' => 'width:50px;'));
        $table->set_column_filter(5, 'modify_filter');
        $table->set_form_actions(array('delete_subscriptions' => get_lang('DeleteSelectedSubscriptions')), 'subscriptions');
        $table->display();
}
/**
   ---------------------------------------------------------------------
*/
Display::display_footer();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:mysubscriptions.php

示例13: FormValidator

    Display::display_footer();
    exit;
}
// Create a simple search-box.
$form = new FormValidator('search_simple', 'get', '', '', 'width=200px', false);
$renderer = $form->defaultRenderer();
$renderer->setCustomElementTemplate('<span>{element}</span> ');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addButtonSearch(get_lang('Search'));
// The action bar.
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
echo ' <a href="course_request_review.php">' . Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests')) . get_lang('ReviewCourseRequests') . '</a>';
echo ' <a href="course_request_rejected.php">' . Display::return_icon('course_request_rejected.gif', get_lang('RejectedCourseRequests')) . get_lang('RejectedCourseRequests') . '</a>';
echo '</div>';
echo '<div class="actions">';
$form->display();
echo '</div>';
// Create a sortable table with the course data.
$table = new SortableTable('course_requests_accepted', 'get_number_of_requests', 'get_request_data', 5, 20, 'DESC');
$table->set_header(0, '', false);
$table->set_header(1, get_lang('Code'));
$table->set_header(2, get_lang('Title'));
$table->set_header(3, get_lang('Category'));
$table->set_header(4, get_lang('Teacher'));
$table->set_header(5, get_lang('CourseRequestDate'));
$table->set_header(6, '', false);
$table->set_column_filter(6, 'modify_filter');
$table->set_form_actions(array('delete_course_requests' => get_lang('DeleteCourseRequests')), 'course_request');
$table->display();
/* FOOTER */
Display::display_footer();
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:course_request_accepted.php

示例14: foreach

if (api_is_allowed_to_edit(null, true)) {
    $table->set_header($header_nr++, get_lang('Status'), false);
    $table->set_header($header_nr++, get_lang('Active'), false);
    if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') {
        $table->set_column_filter(9, 'active_filter');
    } else {
        $table->set_column_filter(9, 'active_filter');
    }
    foreach ($extraFields as $extraField) {
        $table->set_header($header_nr++, $extraField['display_text'], false);
    }
    // Actions column
    $table->set_header($header_nr++, get_lang('Action'), false);
    $table->set_column_filter($header_nr - 1, 'modify_filter');
    if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') {
        $table->set_form_actions(array('unsubscribe' => get_lang('Unreg')), 'user');
    }
} else {
    if ($course_info['unsubscribe'] == 1) {
        $table->set_header($header_nr++, get_lang('Action'), false);
        $table->set_column_filter($header_nr - 1, 'modify_filter');
    }
}
/*	Header */
if (isset($origin) && $origin == 'learnpath') {
    Display::display_reduced_header();
} else {
    if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
        $interbreadcrumb[] = array("url" => "user.php?" . api_get_cidreq(), "name" => get_lang("Users"));
        $tool_name = get_lang('SearchResults');
    } else {
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user.php

示例15: Attendance

    }
    echo '<div class="actions">';
    echo '<a href="index.php?' . api_get_cidreq() . $param_gradebook . '&action=attendance_add">' . Display::return_icon('new_attendance_list.png', get_lang('CreateANewAttendance'), '', ICON_SIZE_MEDIUM) . '</a>';
    /*echo '<a href="index.php?'.api_get_cidreq().$param_gradebook.'&action=calendar_logins">'.
      Display::return_icon('attendance_list.png',get_lang('Logins'),'',ICON_SIZE_MEDIUM).'</a>';*/
    echo '</div>';
}
$attendance = new Attendance();
if ($attendance->get_number_of_attendances() == 0) {
    $attendance->set_name(get_lang('Attendances'));
    $attendance->set_description(get_lang('Attendances'));
    $attendance->attendance_add();
}
$table = new SortableTable('attendance_list', array('Attendance', 'get_number_of_attendances'), array('Attendance', 'get_attendance_data'), $default_column);
$table->set_additional_parameters($parameters);
$table->set_header(0, '', false, array('style' => 'width:20px;'));
$table->set_header(1, get_lang('Name'), true);
$table->set_header(2, get_lang('Description'), true);
$table->set_header(3, get_lang('CountDoneAttendance'), true, array('style' => 'width:90px;'));
if (api_is_allowed_to_edit(null, true)) {
    $table->set_header(4, get_lang('Actions'), false, array('style' => 'text-align:center'));
    $actions = array('attendance_set_invisible_select' => get_lang('SetInvisible'), 'attendance_set_visible_select' => get_lang('SetVisible'));
    $allow = api_get_configuration_value('allow_delete_attendance');
    if ($allow) {
        $actions['attendance_delete_select'] = get_lang('DeleteAllSelectedAttendances');
    }
    $table->set_form_actions($actions);
}
if ($table->get_total_number_of_items() > 0) {
    $table->display();
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:attendance_list.php


注:本文中的SortableTable::set_form_actions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。