/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
public function listAction() { $DbConnection = DbConnection::getInstance(); $sql = "SELECT * FROM categoria"; $categories = $DbConnection->getAll($sql); $View = new ListView(); $View->setRows($categories); $View->display(); }
/** * 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; }
/** * */ 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; }
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; }
/** * 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; }
function __construct() { parent::__construct(); global $theme, $app_strings, $currentModule; $this->local_theme = $theme; $this->local_app_strings = $app_strings; }
function DetailView() { parent::ListView(); global $theme, $app_strings, $currentModule; $this->local_theme = $theme; $this->local_app_strings = $app_strings; }
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(); }
public function init() { if ($this->dataProvider === null) { $this->dataProvider = MediaFile::getDataProvider($this->model, $this->tag); } $this->assets = Yii::app()->getModule('media')->assetsUrl(); parent::init(); }
public function __construct($controllerId, $moduleId, $actionId, $modelClassName, $modalListLinkProvider, $dataProvider, $gridIdSuffix = null) { assert('$modalListLinkProvider instanceof ModalListLinkProvider'); assert('is_string($actionId)'); parent::__construct($controllerId, $moduleId, $modelClassName, $dataProvider, array(), $gridIdSuffix); $this->modalListLinkProvider = $modalListLinkProvider; $this->rowsAreSelectable = false; $this->actionId = $actionId; }
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"); }
public function fill() { parent::fill(); if ($this->Model->isMyAccount()) { $this->set_template('profile/profile.tpl'); $this->assign('purposes_dating', PurposeDating::get_all_purposes()); } else { $this->set_template('userProfile/user_profile.tpl'); $this->assign('id', $this->Model->getProfileId()); } $this->assign('IMAGES_APP', IMAGES_APP); $this->assign('balance_value', $this->Model->get_balance()); }
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 = " <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"); }
function process_page() { global $theme; global $mod_strings; global $app_strings; global $currentModule; global $current_language; global $current_module_strings; if (!is_file(sugar_cached('jsLanguage/WorkFlow/') . $GLOBALS['current_language'] . '.js')) { require_once 'include/language/jsLanguage.php'; jsLanguage::createModuleStringsCache('WorkFlow', $GLOBALS['current_language']); } $javascript_language_files = getVersionedScript("cache/jsLanguage/WorkFlow/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']); $current_module_strings = return_module_language($current_language, 'WorkFlowAlertShells'); $ListView = new ListView(); $header_text = ''; if (isset($_REQUEST['workflow_id'])) { $workflow = BeanFactory::getBean('WorkFlow', $_REQUEST['workflow_id']); //TODO GET ALL ALERTS HERE //$focus_alerts_list = $workflow->get_linked_beans('wf_alerts','WorkFlowAlertShell'); $alerts = BeanFactory::getBean('WorkFlowAlertShells'); $current_module_strings = return_module_language($current_language, $alerts->module_dir); insert_popup_header($theme); $ListView->initNewXTemplate('modules/WorkFlowAlertShells/Popup_picker.html', $current_module_strings); $ListView->xTemplateAssign("WORKFLOW_ID", $workflow->id); $ListView->xTemplateAssign("JAVASCRIPT_LANGUAGE_FILES", $javascript_language_files); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$workflow->id}"); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); $ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME_COMBO'] . $header_text); //$ListView->setHeaderText($button); //$ListView->setQuery("workflow_alertshells.alert_type = 'Email'","","", "ALERT"); $list = $alerts->get_list("", "workflow_alertshells.alert_type = 'Email'"); $display_list = $this->cullFromList($list['list'], $workflow->base_module, $workflow->type); $ListView->processListViewTwo($display_list, "main", "ALERT"); insert_popup_footer(); } }
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 {
* 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 = " <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");
$button = "<form action='index.php' method='post' name='form' id='form'>\n"; $button .= "<input type='hidden' name='module' value='WorkFlowAlertShells'>\n"; $button .= "<input type='hidden' name='module_tab' value='WorkFlow'>\n"; $button .= "<input type='hidden' name='workflow_id' value='{$focus->id}'>\n<input type='hidden' name='alert_name' value='{$focus->name}'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action' value='EditView';>\n"; require_once 'include/SugarSmarty/plugins/function.sugar_action_menu.php'; $button .= smarty_function_sugar_action_menu(array('id' => 'ACLRoles_EditView_action_menu', 'buttons' => $buttons), $xtpl); //$button .= "<input title='".$current_module_strings['LBL_NEW_BUTTON_TITLE_ACTION']."' class='button' type='button' name='New' value=' ".$current_module_strings['LBL_NEW_BUTTON_LABEL_ACTION']."'"; //$button .= "LANGUAGE=javascript onclick='window.open(\"index.php?module=WorkFlowActionShells&action=CreateStep1&html=CreateStep1&form=ComponentView&form_submit=false&query=true&sugar_body_only=true&workflow_id=$focus->id\",\"new\",\"width=400,height=500,resizable=1,scrollbars=1\");'"; //$button .= ">\n"; $button .= "</form>"; $admin = Administration::getSettings(); $mail_server = trim($admin->settings['mail_smtpserver']); if (empty($mail_server) && !empty($focus_alerts_list)) { echo "<BR><font color='red'><b>" . $mod_strings['LBL_LACK_OF_NOTIFICATIONS_ON'] . "</b></font><BR>"; } //ALERT SUBPANEL //$focus_alerts_list2 = array_merge($focus_alerts_list, $focus_actions_list); $ListView = new ListView(); $header_text = ''; $ListView->initNewXTemplate('modules/WorkFlowAlertShells/SubPanelView.html', $current_module_strings); $ListView->xTemplateAssign("WORKFLOW_ID", $focus->id); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}"); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); $ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME_COMBO'] . $header_text); $ListView->setHeaderText($button); $ListView->processListView($focus_alerts_list, "main", "ALERT");
global $action; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; // focus_list is the means of passing data to a SubPanelView. global $focus_list; $button = "<form action='index.php' method='post' name='form' id='form'>\n"; $button .= "<input type='hidden' name='module' value='Project'>\n"; $button .= "<input type='hidden' name='relation_id' value='{$focus->id}'>\n"; $button .= "<input type='hidden' name='relation_type' value='{$currentModule}'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action'>\n"; if (!empty($focus->object_name) && $focus->object_name == 'Opportunity') { $button .= "<input type='hidden' name='account_id' value='{$focus->account_id}'>\n"; $button .= "<input type='hidden' name='opportunity_name' value='{$focus->name}'>\n"; } $button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' " . $app_strings['LBL_NEW_BUTTON_LABEL'] . " '>\n"; $button .= "</form>\n"; $ListView = new ListView(); $ListView->initNewXTemplate('modules/ProductLogs/SubPanelView.html', $current_module_strings); $ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"')); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id); $ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE']); $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE'] . $header_text); $ListView->processListView($focus_list, "main", "PROJECT");
$form->assign('DOCUMENT_REVISION_ID', $document_revision_id); //$form->assign('request_data', $request_data); $form->assign("CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_category_dom'], $category_id)); $form->assign("SUB_CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_subcategory_dom'], $subcategory_id)); $form->assign("IS_TEMPLATE_OPTIONS", get_select_options_with_id($app_list_strings['checkbox_dom'], $is_template)); $form->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['document_template_type_dom'], $template_type)); ob_start(); insert_popup_header($theme); $output_html .= ob_get_contents(); ob_end_clean(); $output_html .= get_form_header($current_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('Documents'); $ListView = new ListView(); $ListView->show_export_button = false; $ListView->process_for_popups = true; $ListView->setXTemplate($form); $ListView->setHeaderTitle($current_mod_strings['LBL_LIST_FORM_TITLE']); $ListView->setHeaderText($button); $ListView->setQuery($where, '', 'document_name', 'DOCUMENT'); $ListView->setModStrings($current_mod_strings); ob_start(); $ListView->processListView($seed_bean, 'main', 'DOCUMENT'); $output_html .= ob_get_contents(); ob_end_clean(); $output_html .= insert_popup_footer(); echo $output_html;
/** * */ function process_page() { global $theme; global $mod_strings; global $app_strings; global $app_list_strings; global $currentModule; global $sugar_version, $sugar_config; $output_html = ''; $where = ''; $where = $this->_get_where_clause(); $name = empty($_REQUEST['name']) ? '' : $_REQUEST['name']; $status = empty($_REQUEST['status']) ? '' : $_REQUEST['status']; $campaign_type = empty($_REQUEST['campaign_type']) ? '' : $_REQUEST['campaign_type']; $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"; //START:FOR MULTI-SELECT $multi_select = false; if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') { $multi_select = true; $button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Prospects',document.MassUpdate,'mass[]','" . $app_strings['ERR_NOTHING_SELECTED'] . "');\" title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' value=' " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . " ' />\n"; } //END:FOR MULTI-SELECT if (!$hide_clear_button) { $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_CLEAR_BUTTON_KEY'] . "' 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/Campaigns/Popup_picker.html'); $form->assign('MOD', $mod_strings); $form->assign('APP', $app_strings); $form->assign('THEME', $theme); $form->assign('MODULE_NAME', $currentModule); $form->assign('request_data', $request_data); $form->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['campaign_type_dom'], "")); 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 = new Campaign(); $ListView = new ListView(); $ListView->show_export_button = false; $ListView->process_for_popups = true; $ListView->setXTemplate($form); $ListView->multi_select_popup = $multi_select; //FOR MULTI-SELECT $ListView->xTemplate->assign("TAG_TYPE", "A"); //FOR MULTI-SELECT $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']); //FOR MULTI-SELECT $ListView->setHeaderText($button); //FOR MULTI-SELECT $ListView->setQuery($where, '', 'name', 'CAMPAIGN'); $ListView->setModStrings($mod_strings); ob_start(); //$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false); //FOR MULTI-SELECT $ListView->processListView($seed_bean, 'main', 'CAMPAIGN'); $output_html .= ob_get_contents(); ob_end_clean(); $output_html .= insert_popup_footer(); return $output_html; }
global $focus; global $action; /////////////////////////////////////// /// /// SETUP PARENT POPUP $popup_request_data = array('call_back_function' => 'set_return_and_save', 'form_name' => 'DetailView', 'field_to_name_array' => array('id' => 'opportunity_id')); $json = getJSONobj(); $encoded_popup_request_data = $json->encode($popup_request_data); // /////////////////////////////////////// // focus_list is the means of passing data to a SubPanelView. global $focus_list; $button = "<form action='index.php' method='post' name='form' id='form'>\n"; $button .= "<input type='hidden' name='module' value='Opportunities'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action'>\n"; $button .= "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' type='button' class='button' value=' " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . " ' name='button' onclick='open_popup(\"Opportunities\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n"; $button .= "</form>\n"; $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Opportunities&record=" . $_REQUEST['record'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView = new ListView(); $ListView->initNewXTemplate('modules/Opportunities/SubPanelViewProjects.html', $current_module_strings); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}"); $ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"')); $ListView->setHeaderTitle($project_module_strings['LBL_OPPORTUNITY_SUBPANEL_TITLE'] . $header_text); $ListView->setHeaderText($button); $ListView->processListView($focus_list, "main", "OPPORTUNITY");
/** * @return array */ protected function getCGridViewParams() { return array_merge(parent::getCGridViewParams(), array('columnLabelsByName' => $this->resolveColumnLabelsByName(), 'enableSorting' => false, 'expandableRows' => $this->rowsAreExpandable())); }
function printState() { parent::printState(); echo '<input type="hidden"' . ' id="' . $this->_getIdDeleteItemId() . '"' . ' name="' . $this->_getIdDeleteItemId() . '"' . ' value="' . $this->getIdDeleteItem() . '" />' . "\n"; echo '<input type="hidden"' . ' id="' . $this->_getIdMoveItemId() . '"' . ' name="' . $this->_getIdMoveItemId() . '"' . ' value="' . $this->getIdMoveItem() . '" />' . "\n"; }
protected function getCGridViewParams() { $gridViewParams = parent::getCGridViewParams(); $gridViewParams['rowHtmlOptionsExpression'] = 'MashableInboxListView::resolveRowHtmlOptionsExpression($this, $row, $data)'; return $gridViewParams; }
* "Powered by SugarCRM". ********************************************************************************/ /********************************************************************************* * Description: TODO: To be written. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ global $theme; global $sugar_config; global $current_language; $currentMax = $sugar_config['list_max_entries_per_page']; $sugar_config['list_max_entries_per_page'] = 10; $current_mod_strings = return_module_language($current_language, 'Emails'); $focus = new Email(); $ListView = new ListView(); $display_title = $current_mod_strings['LBL_LIST_TITLE_MY_INBOX'] . ': ' . $current_mod_strings['LBL_UNREAD_HOME']; $where = 'emails.deleted = 0 AND emails.assigned_user_id = \'' . $current_user->id . '\' AND emails.type = \'inbound\' AND emails.status = \'unread\''; $limit = 10; /////////////////////////////////////////////////////////////////////////////// //// OUTPUT /////////////////////////////////////////////////////////////////////////////// echo $focus->rolloverStyle; $ListView->initNewXTemplate('modules/Emails/ListViewHome.html', $current_mod_strings); $ListView->xTemplateAssign('ATTACHMENT_HEADER', SugarThemeRegistry::current()->getImage('attachment', "", "", "", '.gif', $mod_strings['LBL_ATTACHMENT'])); $ListView->setHeaderTitle($display_title); $ListView->setQuery($where, '', 'date_sent, date_entered DESC', "EMAIL"); $ListView->setAdditionalDetails(); $ListView->processListView($focus, 'main', 'EMAIL'); //echo $focus->quickCreateJS(); $sugar_config['list_max_entries_per_page'] = $currentMax;
$GLOBALS['log']->error("Non-admin user ({$current_user->user_name}) attempted to enter the Releases edit screen"); session_destroy(); include 'modules/Users/Logout.php'; } } $GLOBALS['log']->info("Release list view"); global $theme; $button = "<form border='0' action='index.php' method='post' name='form'>\n"; $button .= "<input type='hidden' name='module' value='Releases'>\n"; $button .= "<input type='hidden' name='action' value='EditView'>\n"; $button .= "<input type='hidden' name='edit' value='true'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' type='submit' name='New' value=' " . $app_strings['LBL_NEW_BUTTON_LABEL'] . " '>\n"; $button .= "</form>\n"; $ListView = new ListView(); if ((is_admin($current_user) || is_admin_for_module($GLOBALS['current_user'], 'Bugs')) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView->initNewXTemplate('modules/Releases/ListView.html', $mod_strings); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE'] . $header_text); $ListView->setHeaderText($button); $ListView->show_export_button = false; $ListView->show_mass_update = false; $ListView->show_delete_button = false; $ListView->show_select_menu = false; $ListView->setQuery("", "", "list_order", "RELEASE"); $ListView->processListView($focus, "main", "RELEASE"); if ($is_edit) { $edit_button = "<form name='EditView' method='POST' action='index.php'>\n";