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


PHP ListView类代码示例

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


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

示例1: menu_list

/**
 * List items
 */
function menu_list($row_id = NULL, $search = NULL, $sort = NULL, $page = 1)
{
    $view = new ListView();
    // Row Id for update only row
    if (!empty($row_id)) {
        $row_id = 'id = ' . $row_id;
    } else {
        $row_id = 'id != 0';
    }
    // Sort
    if (empty($sort)) {
        $sort = 'id ASC';
    }
    $limit = PAGER_LIMIT;
    $offset = $page * $limit - $limit;
    $db = DataConnection::readOnly();
    $total_records = 0;
    // Search
    if (!empty($search)) {
        $search_fields = array('id', 'label', 'func', 'module');
        $exceptions = array();
        $search_query = build_search_query($search, $search_fields, $exceptions);
        $menus = $db->menu()->where($row_id)->and($search_query)->order($sort)->limit($limit, $offset);
    } else {
        $menus = $db->menu()->where($row_id)->order($sort)->limit($limit, $offset);
    }
    $total_records = $db->menu()->count("*");
    $i = 0;
    if (count($menus)) {
        // Building the header with sorter
        $headers[] = array('display' => 'Id', 'field' => 'id');
        $headers[] = array('display' => 'Label', 'field' => 'label');
        $headers[] = array('display' => 'Function', 'field' => 'func');
        $headers[] = array('display' => 'Module', 'field' => 'module');
        $headers[] = array('display' => 'Edit', 'field' => NULL);
        $headers[] = array('display' => 'Delete', 'field' => NULL);
        $headers = build_sort_header('menu_list', 'menu', $headers, $sort);
        foreach ($menus as $menu) {
            $j = $i + 1;
            //This is important for the row update/delete
            $rows[$j]['row_id'] = $menu['id'];
            /////////////////////////////////////////////
            $rows[$j]['id'] = $menu['id'];
            $rows[$j]['label'] = $menu['label'];
            $rows[$j]['func'] = $menu['func'];
            $rows[$j]['module'] = $menu['module'];
            if ($menu['system'] == 1) {
                $disabled = 'disabled';
            } else {
                $disabled = '';
            }
            $rows[$j]['edit'] = theme_link_process_information('', 'menu_edit_form', 'menu_edit_form', 'menu', array('extra_value' => 'id|' . $menu['id'], 'response_type' => 'modal', 'icon' => NATURAL_EDIT_ICON, 'class' => $disabled));
            $rows[$j]['delete'] = theme_link_process_information('', 'menu_delete_form', 'menu_delete_form', 'menu', array('extra_value' => 'id|' . $menu['id'], 'response_type' => 'modal', 'icon' => NATURAL_REMOVE_ICON, 'class' => $disabled));
            $i++;
        }
    }
    $options = array('show_headers' => TRUE, 'page_title' => translate('Users List'), 'page_subtitle' => translate('Manage Menus'), 'empty_message' => translate('No menu found!'), 'table_prefix' => theme_link_process_information(translate('Create New Menu'), 'menu_create_form', 'menu_create_form', 'menu', array('response_type' => 'modal')), 'pager_items' => build_pager('menu_list', 'menu', $total_records, $limit, $page), 'page' => $page, 'sort' => $sort, 'search' => $search, 'show_search' => TRUE, 'function' => 'menu_list', 'module' => 'menu', 'update_row_id' => '', 'table_form_id' => '', 'table_form_process' => '');
    $listview = $view->build($rows, $headers, $options);
    return $listview;
}
开发者ID:enettolima,项目名称:mvno-platform,代码行数:63,代码来源:menu.controller.php

示例2: bank_list

/**
 * List items
 */
function bank_list($row_id = NULL, $search = NULL, $sort = NULL, $page = 1)
{
    $view = new ListView();
    // Row Id for update only row
    if (!empty($row_id)) {
        $row_id = 'id = ' . $row_id;
    } else {
        $row_id = 'id != 0';
    }
    // Sort
    if (empty($sort)) {
        $sort = 'bank_name asc';
    }
    $limit = PAGER_LIMIT;
    $offset = $page * $limit - $limit;
    $total_records = 0;
    $pdo = new PDO(NATURAL_PDO_DSN_READ, NATURAL_PDO_USER_READ, NATURAL_PDO_PASS_READ);
    // Search
    if (!empty($search)) {
        $search_fields = array('id', 'bank_name', 'account_number', 'comment');
        $exceptions = array();
        $search_query = build_search_query($search, $search_fields, $exceptions);
        $sql = 'select SQL_CALC_FOUND_ROWS  * from bank where church_id = ' . $_SESSION['log_church_id'] . ' and ' . $search_query . ' order by ' . $sort . ' limit ' . $limit . ' offset ' . $offset;
        $records = $pdo->prepare($sql);
        $records->execute();
    } else {
        $sql = 'select SQL_CALC_FOUND_ROWS  * from bank where church_id = ' . $_SESSION['log_church_id'] . ' order by ' . $sort . ' limit ' . $limit . ' offset ' . $offset;
        $records = $pdo->prepare($sql);
        $records->execute();
    }
    $total_records = $pdo->query('SELECT FOUND_ROWS();')->fetch(PDO::FETCH_COLUMN);
    $i = 0;
    if (count($records)) {
        // Building the header with sorter
        $headers[] = array('display' => 'Id', 'field' => 'id');
        $headers[] = array('display' => 'Bank Name', 'field' => 'bank_name');
        $headers[] = array('display' => 'Account Number', 'field' => 'bank_account_number');
        $headers[] = array('display' => 'Comment', 'field' => 'comment');
        $headers[] = array('display' => 'Edit', 'field' => NULL);
        $headers[] = array('display' => 'Delete', 'field' => NULL);
        $headers = build_sort_header('bank_list', 'bank', $headers, $sort);
        foreach ($records as $bank) {
            $j = $i + 1;
            //This is important for the row update/delete
            $rows[$j]['row_id'] = $bank['id'];
            /////////////////////////////////////////////
            $rows[$j]['id'] = $bank['id'];
            $rows[$j]['bank_name'] = $bank['bank_name'];
            $rows[$j]['account_number'] = $bank['bank_account_number'];
            $rows[$j]['comment'] = $bank['comment'];
            $rows[$j]['edit'] = theme_link_process_information('', 'bank_edit_form', 'bank_edit_form', 'bank', array('extra_value' => 'id|' . $bank['id'], 'response_type' => 'modal', 'icon' => NATURAL_EDIT_ICON));
            $rows[$j]['delete'] = theme_link_process_information('', 'bank_delete_form', 'bank_delete_form', 'bank', array('extra_value' => 'id|' . $bank['id'], 'response_type' => 'modal', 'icon' => NATURAL_REMOVE_ICON));
            $i++;
        }
    }
    $options = array('show_headers' => TRUE, 'page_title' => translate('Banks List'), 'page_subtitle' => translate('Manage Banks'), 'empty_message' => translate('No bank found!'), 'table_prefix' => theme_link_process_information(translate('Create New Bank'), 'bank_create_form', 'bank_create_form', 'bank', array('response_type' => 'modal')), 'pager_items' => build_pager('bank_list', 'bank', $total_records, $limit, $page), 'page' => $page, 'sort' => $sort, 'search' => $search, 'show_search' => TRUE, 'function' => 'bank_list', 'module' => 'bank', 'update_row_id' => '', 'table_form_id' => '', 'table_form_process' => '');
    $listview = $view->build($rows, $headers, $options);
    return $listview;
}
开发者ID:enettolima,项目名称:ceva-finance,代码行数:62,代码来源:bank.controller.php

示例3: user_list

/**
 * User List.
 */
function user_list($row_id = NULL, $search = NULL, $sort = NULL, $page = 1)
{
    $view = new ListView();
    // Row Id for update only row
    if (!empty($row_id)) {
        $row_id = 'id = ' . $row_id;
    } else {
        $row_id = 'id != 0';
    }
    // Sort
    if (empty($sort)) {
        $sort = 'first_name ASC';
    }
    $limit = PAGER_LIMIT;
    // PAGER_LIMIT
    $offset = $page * $limit - $limit;
    $db = DataConnection::readOnly();
    $total_records = 0;
    // Search
    if (!empty($search)) {
        $search_fields = array('id', 'first_name', 'last_name', 'username');
        $exceptions = array();
        $search_query = build_search_query($search, $search_fields, $exceptions);
        $users = $db->user()->where($row_id)->and($search_query)->order($sort)->limit($limit, $offset);
    } else {
        $users = $db->user()->where($row_id)->order($sort)->limit($limit, $offset);
    }
    $total_records = $db->user()->count("*");
    if (count($users) > 0) {
        // Building the header with sorter
        $headers[] = array('display' => 'Id', 'field' => 'id');
        $headers[] = array('display' => 'First Name', 'field' => 'first_name');
        $headers[] = array('display' => 'Last Name', 'field' => 'last_name');
        $headers[] = array('display' => 'Username', 'field' => 'username');
        $headers[] = array('display' => 'Edit', 'field' => NULL);
        $headers[] = array('display' => 'Delete', 'field' => NULL);
        $headers = build_sort_header('user_list', 'user', $headers, $sort);
        $i = 0;
        foreach ($users as $user) {
            $class = "";
            if ($user['username'] == "admin") {
                $class = "disabled";
            }
            //This is important for the row update
            $rows[$i]['row_id'] = $user['id'];
            $rows[$i]['id'] = $user['id'];
            $rows[$i]['first_name'] = $user['first_name'];
            $rows[$i]['last_name'] = $user['last_name'];
            $rows[$i]['username'] = $user['username'];
            $rows[$i]['edit'] = theme_link_process_information('', 'user_edit_form', 'user_edit_form', 'user', array('extra_value' => 'user_id|' . $user['id'], 'response_type' => 'modal', 'icon' => constant("NATURAL_EDIT_ICON")));
            $rows[$i]['delete'] = theme_link_process_information('', 'user_delete_form', 'user_delete_form', 'user', array('extra_value' => 'user_id|' . $user['id'], 'response_type' => 'modal', 'icon' => constant("NATURAL_REMOVE_ICON"), 'class' => $class));
            $i++;
        }
    }
    //count($users)
    $options = array('show_headers' => TRUE, 'page_title' => translate('Users List'), 'page_subtitle' => translate('Manage Users'), 'empty_message' => translate('No user found!'), 'table_prefix' => theme_link_process_information(translate('Create New User'), 'user_create_form', 'user_create_form', 'user', array('response_type' => 'modal')), 'pager_items' => build_pager('user_list', 'user', $total_records, $limit, $page), 'page' => $page, 'sort' => $sort, 'search' => $search, 'show_search' => TRUE, 'function' => 'user_list', 'module' => 'user', 'update_row_id' => '', 'table_form_id' => '', 'table_form_process' => '');
    $listview = $view->build($rows, $headers, $options);
    return $listview;
}
开发者ID:enettolima,项目名称:mvno-platform,代码行数:62,代码来源:user.controller.php

示例4: categories_list

/**
 * List items
 */
function categories_list($row_id = NULL, $search = NULL, $sort = NULL, $page = 1)
{
    $view = new ListView();
    // Row Id for update only row
    if (!empty($row_id)) {
        $row_id = 'tt.id = ' . $row_id;
    } else {
        $row_id = 'tt.id != 0';
    }
    // Sort
    if (empty($sort)) {
        $sort = 'tt.type_id, tt.name asc';
    }
    $limit = PAGER_LIMIT;
    $offset = $page * $limit - $limit;
    $total_records = 0;
    $pdo = new PDO(NATURAL_PDO_DSN_READ, NATURAL_PDO_USER_READ, NATURAL_PDO_PASS_READ);
    // Search
    if (!empty($search)) {
        $search_fields = array('id', 'bank_name', 'account_number', 'comment');
        $exceptions = array();
        $search_query = build_search_query($search, $search_fields, $exceptions);
        $sql = "select SQL_CALC_FOUND_ROWS tt.id, tt.name, tt.budget, (case tt.type_id when 0 then 'Income' else 'Withdraw' end) type from categories tt\n              where tt.church_id = " . $_SESSION['log_church_id'] . " and " . $search_query . " order by " . $sort . " limit " . $limit . " offset " . $offset;
        $records = $pdo->prepare($sql);
        $records->execute();
    } else {
        $sql = "select SQL_CALC_FOUND_ROWS tt.id, tt.name, tt.budget, (case tt.type_id when 0 then 'Income' else 'Withdraw' end) type  from categories tt\n              where tt.church_id = " . $_SESSION['log_church_id'] . "  order by " . $sort . " limit " . $limit . " offset " . $offset;
        $records = $pdo->prepare($sql);
        $records->execute();
    }
    $total_records = $pdo->query('SELECT FOUND_ROWS();')->fetch(PDO::FETCH_COLUMN);
    $i = 0;
    if (count($records)) {
        // Building the header with sorter
        $headers[] = array('display' => 'Type', 'field' => 'type');
        $headers[] = array('display' => 'Name', 'field' => 'name');
        $headers[] = array('display' => 'Budget', 'field' => 'budget');
        $headers[] = array('display' => 'Edit', 'field' => NULL);
        $headers[] = array('display' => 'Delete', 'field' => NULL);
        $headers = build_sort_header('categories_list', 'categories', $headers, $sort);
        foreach ($records as $record) {
            $j = $i + 1;
            //This is important for the row update/delete
            $rows[$j]['row_id'] = $record['id'];
            /////////////////////////////////////////////
            $rows[$j]['type'] = $record['type'];
            $rows[$j]['name'] = $record['name'];
            $rows[$j]['budget'] = $record['budget'];
            $rows[$j]['edit'] = theme_link_process_information('', 'categories_edit_form', 'categories_edit_form', 'categories', array('extra_value' => 'id|' . $record['id'], 'response_type' => 'modal', 'icon' => NATURAL_EDIT_ICON));
            $rows[$j]['delete'] = theme_link_process_information('', 'categories_delete_form', 'categories_delete_form', 'categories', array('extra_value' => 'id|' . $record['id'], 'response_type' => 'modal', 'icon' => NATURAL_REMOVE_ICON));
            $i++;
        }
    }
    $options = array('show_headers' => TRUE, 'page_title' => translate('Categories List'), 'page_subtitle' => translate('Manage Categories'), 'empty_message' => translate('No category found!'), 'table_prefix' => theme_link_process_information(translate('Create New Category'), 'categories_create_form', 'categories_create_form', 'categories', array('response_type' => 'modal')), 'pager_items' => build_pager('categories_list', 'categories', $total_records, $limit, $page), 'page' => $page, 'sort' => $sort, 'search' => $search, 'show_search' => TRUE, 'function' => 'categories_list', 'module' => 'categories', 'update_row_id' => '', 'table_form_id' => '', 'table_form_process' => '');
    $listview = $view->build($rows, $headers, $options);
    return $listview;
}
开发者ID:enettolima,项目名称:ceva-finance,代码行数:60,代码来源:categories.controller.php

示例5: listAction

 public function listAction()
 {
     $DbConnection = DbConnection::getInstance();
     $sql = "SELECT * FROM categoria";
     $categories = $DbConnection->getAll($sql);
     $View = new ListView();
     $View->setRows($categories);
     $View->display();
 }
开发者ID:jesusnazarethgh,项目名称:TianguisCabal,代码行数:9,代码来源:CategoryController.php

示例6: dashboard_widgets_list

/**
 * List items
 */
function dashboard_widgets_list($row_id = NULL, $search = NULL, $sort = NULL, $page = 1)
{
    $view = new ListView();
    // Row Id for update only row
    if (!empty($row_id)) {
        $row_id = 'id = ' . $row_id;
    } else {
        $row_id = 'id != 0';
    }
    // Sort
    if (empty($sort)) {
        $sort = 'id ASC';
    }
    $limit = PAGER_LIMIT;
    $offset = $page * $limit - $limit;
    $db = DataConnection::readOnly();
    $total_records = 0;
    // Search
    if (!empty($search)) {
        $search_fields = array('id', 'title', 'description');
        $exceptions = array();
        $search_query = build_search_query($search, $search_fields, $exceptions);
        $dashboard_widgets = $db->dashboard_widgets()->where($row_id)->and($search_query)->order($sort)->limit($limit, $offset);
    } else {
        $dashboard_widgets = $db->dashboard_widgets()->where($row_id)->order($sort)->limit($limit, $offset);
    }
    $total_records = $db->dashboard_widgets()->count("*");
    if (count($dashboard_widgets) > 0) {
        // Building the header with sorter
        $headers[] = array('display' => 'Id', 'field' => 'id');
        $headers[] = array('display' => 'Title', 'field' => 'title');
        $headers[] = array('display' => 'Description', 'field' => 'description');
        $headers[] = array('display' => 'Edit', 'field' => NULL);
        $headers[] = array('display' => 'Delete', 'field' => NULL);
        $headers = build_sort_header('dashboard_widgets_list', 'dashboard_widgets', $headers, $sort);
        $i = 0;
        foreach ($dashboard_widgets as $widget) {
            $rows[$i]['row_id'] = $widget['id'];
            $rows[$i]['id'] = $widget['id'];
            $rows[$i]['title'] = $widget['title'];
            if (strlen($widget['description']) > 50) {
                $rows[$i]['description'] = substr($widget['description'], 0, 50) . '...';
            } else {
                $rows[$i]['description'] = $widget['description'];
            }
            $rows[$i]['edit'] = theme_link_process_information('', 'dashboard_widgets_edit_form', 'dashboard_widgets_edit_form', 'dashboard_widgets', array('extra_value' => 'id|' . $widget['id'], 'response_type' => 'modal', 'icon' => NATURAL_EDIT_ICON, 'class' => $disabled));
            $rows[$i]['delete'] = theme_link_process_information('', 'dashboard_widgets_delete_form', 'dashboard_widgets_delete_form', 'dashboard_widgets', array('extra_value' => 'id|' . $widget['id'], 'response_type' => 'modal', 'icon' => NATURAL_REMOVE_ICON, 'class' => $disabled));
            $i++;
        }
    }
    $options = array('show_headers' => TRUE, 'page_title' => translate('Users List'), 'page_subtitle' => translate('Manage Dashboard Widgetss'), 'empty_message' => translate('No dashboard widgets found!'), 'table_prefix' => theme_link_process_information(translate('Create New Dashboard Widget'), 'dashboard_widgets_graph_line_template', 'dashboard_widgets_graph_line_template', 'dashboard_widgets', array('response_type' => 'in_modal')), 'pager_items' => build_pager('dashboard_widgets_list', 'dashboard_widgets', $total_records, $limit, $page), 'page' => $page, 'sort' => $sort, 'search' => $search, 'show_search' => TRUE, 'function' => 'dashboard_widgets_list', 'module' => 'dashboard_widgets', 'update_row_id' => '', 'table_form_id' => '', 'table_form_process' => '');
    $listview = $view->build($rows, $headers, $options);
    return $listview;
}
开发者ID:enettolima,项目名称:ceva-finance,代码行数:57,代码来源:dashboard_widgets.controller.php

示例7: process_page

 /**
  *
  */
 function process_page()
 {
     global $theme;
     global $mod_strings;
     global $app_strings;
     global $currentModule;
     global $sugar_version, $sugar_config;
     $output_html = '';
     $where = '';
     $where = $this->_get_where_clause();
     $name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
     $account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
     $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
     $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
     $button = "<form action='index.php' method='post' name='form' id='form'>\n";
     if (!$hide_clear_button) {
         $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "' value='  " . $app_strings['LBL_CLEAR_BUTTON_LABEL'] . "  ' />\n";
     }
     $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_CANCEL_BUTTON_KEY'] . "' value='  " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . "  ' />\n";
     $button .= "</form>\n";
     $form = new XTemplate('modules/Products/Popup_picker.html');
     $form->assign('MOD', $mod_strings);
     $form->assign('APP', $app_strings);
     $form->assign('THEME', $theme);
     $form->assign('MODULE_NAME', $currentModule);
     $form->assign('NAME', $name);
     $form->assign('ACCOUNT_NAME', $account_name);
     $form->assign('request_data', $request_data);
     ob_start();
     insert_popup_header($theme);
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
     $form->parse('main.SearchHeader');
     $output_html .= $form->text('main.SearchHeader');
     // Reset the sections that are already in the page so that they do not print again later.
     $form->reset('main.SearchHeader');
     // create the listview
     $seed_bean = BeanFactory::getBean('Products');
     $ListView = new ListView();
     $ListView->show_export_button = false;
     $ListView->process_for_popups = true;
     $ListView->setXTemplate($form);
     $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
     $ListView->setHeaderText($button);
     $ListView->setQuery($where, '', 'name', 'PRODUCT');
     $ListView->setModStrings($mod_strings);
     ob_start();
     $ListView->processListView($seed_bean, 'main', 'PRODUCT');
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= insert_popup_footer();
     return $output_html;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:57,代码来源:Popup_picker.php

示例8: display

 function display()
 {
     global $current_language;
     if (empty($this->container_id)) {
         $child_reports = ReportContainer::get_root_reports();
     } else {
         $container = new ReportContainer();
         $container->retrieve($this->container_id);
         $child_reports = $container->get_linked_beans("reports", "ZuckerReport");
     }
     $mod_strings = return_module_language($current_language, "ZuckerReports");
     require_once 'include/ListView/ListView.php';
     $lv = new ListView();
     $lv->initNewXTemplate('modules/ZuckerReportContainer/DetailView.html', $mod_strings);
     $lv->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline.png', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"'));
     $lv->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline.png', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'));
     $lv->xTemplateAssign("RETURN_URL", "&return_module=ZuckerReportContainer&return_action=DetailView&return_id=" . $container->id);
     $lv->setHeaderTitle("");
     $lv->setHeaderText("");
     ob_start();
     $lv->processListViewTwo($child_reports, "reports", "REPORT");
     $str = ob_get_clean();
     ob_end_flush();
     return parent::display() . $str;
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:25,代码来源:ZuckerReportContainerDashlet.php

示例9: report_list

/**
 * List items
 */
function report_list($row_id = NULL, $search = NULL, $sort = NULL, $page = 1)
{
    $view = new ListView();
    // Row Id for update only row
    if (!empty($row_id)) {
        $row_id = 'id = ' . $row_id;
    } else {
        $row_id = 'id != 0';
    }
    // Sort
    if (empty($sort)) {
        $sort = 'id ASC';
    }
    $limit = PAGER_LIMIT;
    $offset = $page * $limit - $limit;
    $db = DataConnection::readOnly();
    $total_records = 0;
    // Search
    if (!empty($search)) {
        $search_fields = array('id', 'report_name', 'report_content');
        $exceptions = array();
        $search_query = build_search_query($search, $search_fields, $exceptions);
        $reports = $db->report()->where($row_id)->and($search_query)->order($sort)->limit($limit, $offset);
    } else {
        $reports = $db->report()->where($row_id)->order($sort)->limit($limit, $offset);
    }
    $total_records = $db->report()->count("*");
    $i = 0;
    if (count($reports)) {
        // Building the header with sorter
        $headers[] = array('display' => 'Id', 'field' => 'id');
        $headers[] = array('display' => 'Report Name', 'field' => 'report_name');
        $headers[] = array('display' => 'Pdf', 'field' => NULL);
        $headers = build_sort_header('report_list', 'report', $headers, $sort);
        foreach ($reports as $report) {
            $j = $i + 1;
            //This is important for the row update/delete
            $rows[$j]['row_id'] = $report['id'];
            /////////////////////////////////////////////
            $rows[$j]['id'] = $report['id'];
            $rows[$j]['report_name'] = $report['report_name'];
            $rows[$j]['Pdf'] = theme_link_process_information('Pdf', 'report_pdf', 'report_pdf', 'report', array('extra_value' => 'id|' . $report['id'], 'response_type' => 'modal'));
            $i++;
        }
    }
    $options = array('show_headers' => TRUE, 'page_title' => translate('Reports List'), 'page_subtitle' => translate('Generate Reports'), 'empty_message' => translate('No report found!'), 'pager_items' => build_pager('report_list', 'report', $total_records, $limit, $page), 'page' => $page, 'sort' => $sort, 'search' => $search, 'show_search' => TRUE, 'function' => 'report_list', 'module' => 'report', 'update_row_id' => '', 'table_form_id' => '', 'table_form_process' => '');
    $listview = $view->build($rows, $headers, $options);
    return $listview;
}
开发者ID:enettolima,项目名称:ceva-finance,代码行数:52,代码来源:report.controller.php

示例10: DetailView

 function DetailView()
 {
     parent::ListView();
     global $theme, $app_strings, $currentModule;
     $this->local_theme = $theme;
     $this->local_app_strings = $app_strings;
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:7,代码来源:DetailView.php

示例11: getGridViewWidgetPath

 protected function getGridViewWidgetPath()
 {
     $resolvedMetadata = $this->getResolvedMetadata();
     if (isset($resolvedMetadata['global']['gridViewType']) && $resolvedMetadata['global']['gridViewType'] == RelatedListView::GRID_VIEW_TYPE_STACKED) {
         return 'ext.zurmoinc.framework.widgets.StackedExtendedGridView';
     }
     return parent::getGridViewWidgetPath();
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:8,代码来源:RelatedListView.php

示例12: ProcessSubPanelListView

 function ProcessSubPanelListView($xTemplatePath, &$mod_strings, $action, $curModule = "")
 {
     global $currentModule, $app_strings;
     if (empty($curModule)) {
         $curModule = $currentModule;
     }
     $ListView = new ListView();
     $ListView->initNewXTemplate($xTemplatePath, $mod_strings);
     $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $curModule . "&return_action=DetailView&return_id=" . $this->focus->id);
     $ListView->xTemplateAssign("RECORD_ID", $this->focus->id);
     $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline.png', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
     $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline.png', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
     $ListView->setHeaderTitle($mod_strings['LBL_TEAM_MEMBERS']);
     $ListView->setHeaderText($this->getHeaderText($action, $curModule));
     $ListView->processListView($this->users_list, "users", "USER");
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:16,代码来源:SubPanelViewTeams.php

示例13: ProcessSubPanelListView

 function ProcessSubPanelListView($xTemplatePath, &$mod_strings, $action, $curModule = '')
 {
     global $currentModule, $app_strings;
     if (empty($curModule)) {
         $curModule = $currentModule;
     }
     $ListView = new ListView();
     global $current_user;
     $header_text = '';
     if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
         $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Notes&record=" . $this->focus->id . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']) . "</a>";
     }
     $ListView->initNewXTemplate($xTemplatePath, $mod_strings);
     $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $curModule . "&return_action=DetailView&return_id=" . $this->focus->id);
     $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_DELETE']));
     $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle"  border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
     $ListView->xTemplateAssign("RECORD_ID", $this->focus->id);
     $ListView->setHeaderTitle($mod_strings['LBL_MODULE_NAME'] . $header_text);
     $ListView->setHeaderText($this->getHeaderText($action, $curModule));
     $ListView->processListView($this->notes_list, "notes", "NOTE");
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:21,代码来源:SubPanelView.php

示例14: array

 require_once DEDEDATA . "/cache/inc_catalog_base.inc";
 require_once DEDEINC . '/arc.listview.class.php';
 $notallowArr = array('dopost', 'f', 'del', 'curpage', 'morejob');
 $jumpurl = GetNextUrl($notallowArr);
 if (empty($typeid)) {
     ShowMsg("<b>完成栏目更新任务!完成所有更新任务!</b>", "close::tgtable");
     exit;
 }
 $topids = explode(',', GetTopids($typeid));
 if (empty($curpage)) {
     $curpage = 0;
 }
 $tid = $topids[$curpage];
 if (isset($cfg_Cs[$tid]) && $cfg_Cs[$tid][1] > 0) {
     require_once DEDEINC . "/arc.listview.class.php";
     $lv = new ListView($tid);
     $lv->MakeHtml();
     $lv->Close();
 } else {
     require_once DEDEINC . "/arc.sglistview.class.php";
     $lv = new SgListView($tid);
     $lv->MakeHtml();
     $lv->Close();
 }
 if ($curpage >= count($topids) - 1) {
     if (!empty($doposttmp)) {
         $jumpurl = preg_replace("#doposttmp|nextdotmp#", 'del', $jumpurl);
         $jumpurl .= "&dopost={$doposttmp}&nextdo={$nextdotmp}";
         ShowMsg("完成栏目:{$tid}  更新!<br /><b>完成栏目更新任务,继续执行后续任务...</b>", $jumpurl, 0, 500);
         exit;
     } else {
开发者ID:iabing,项目名称:mzzyc,代码行数:31,代码来源:task_do.php

示例15: return_module_language

 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/
/*********************************************************************************
 * Description:  TODO: To be written.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
global $app_strings;
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
global $current_language;
$current_module_strings = return_module_language($current_language, 'Leads');
global $currentModule;
global $theme;
global $focus;
global $action;
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
global $current_user;
$header_text = '';
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Leads&record=" . $_REQUEST['record'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']) . "</a>";
}
$ListView = new ListView();
$ListView->initNewXTemplate('modules/Leads/SubPanelView.html', $current_module_strings);
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] . $header_text);
//$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "LEAD");
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:31,代码来源:SubPanelView.php


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