/** "Details" view for PrestaShop 1.6 **/ public function renderDetails() { if ($id = Tools::getValue('id_simpleblog_category')) { $this->lang = false; $this->list_id = 'details'; $this->initFormToolBar(); $category = $this->loadObject($id); $this->toolbar_title = $this->l('Subcategories of:') . ' ' . $category->name[$this->context->employee->id_lang]; unset($this->toolbar_btn['save-and-stay']); unset($this->toolbar_btn['new']); if ($this->display == 'details' || $this->display == 'add' || $this->display == 'edit') { $this->toolbar_btn['new'] = array('href' => Context::getContext()->link->getAdminLink('AdminSimpleBlogCategories') . '&addsimpleblog_category&id_parent=' . $category->id, 'desc' => $this->l('Add new')); $this->toolbar_btn['back'] = array('href' => Context::getContext()->link->getAdminLink('AdminSimpleBlogCategories'), 'desc' => $this->l('Back to list')); } $this->_select = 'b.*'; $this->_join = 'LEFT JOIN `' . _DB_PREFIX_ . 'simpleblog_category_lang` b ON (b.`id_simpleblog_category` = a.`id_simpleblog_category` AND b.`id_lang` = ' . $this->context->language->id . ')'; $this->_where = 'AND a.`id_parent` = ' . (int) $id; $this->_orderBy = 'position'; $this->fields_list = array('id_simpleblog_category' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'name' => array('title' => $this->l('Name'), 'width' => 'auto', 'filter_key' => 'b!name'), 'active' => array('title' => $this->l('Enabled'), 'class' => 'fixed-width-xs', 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false), 'position' => array('title' => $this->l('Position'), 'class' => 'fixed-width-md', 'filter_key' => 'a!position', 'position' => 'position')); self::$currentIndex = self::$currentIndex . '&details' . $this->table; $this->processFilter(); return parent::renderList(); } }
public function renderList() { // adds actions $this->addRowAction('edit'); $this->addRowAction('delete'); // re-defines toolbar & buttons $this->toolbar_title = $this->l('REVIEWS WAITING FOR APPROVAL'); $this->initToolbar(); $this->list_id = 'orders'; $this->_filterHaving = null; $this->_where = ' AND a.active = 0'; $first_list = parent::renderList(); // second list : templates $second_list = null; $this->is_template_list = true; //unset($this->fields_list['active'] ); unset($this->_where); $this->_where = ' AND a.active = 1'; // unsets actions $this->actions = array(); $this->addRowAction('edit'); $this->addRowAction('delete'); // re-defines toolbar & buttons $this->toolbar_title = $this->l('APPROVED REVIEWS'); $this->initToolbar(); $this->list_id = 'templates'; $this->_filterHaving = null; // inits list $second_list = parent::renderList(); return $first_list . $second_list; }
/** * Function used to render the list to display for this controller */ public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); $this->_defaultOrderBy = 'position'; $this->bulk_actions = array(); $this->fields_list = array('id_opartslideshow_slideshow_image' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 'auto'), 'active' => array('title' => $this->l('Displayed'), 'width' => 'auto', 'type' => 'bool', 'active' => 'status'), 'id_opartslideshow_slideshow' => array('title' => $this->l('Slideshow'), 'width' => 230, 'callback' => 'displaySlideshowName', 'callback_object' => $this, 'type' => 'choice')); if (isset($_GET['id_opartslideshow_slideshow']) && is_numeric($_GET['id_opartslideshow_slideshow'])) { $this->fields_list['position'] = array('title' => $this->l('Position'), 'width' => 40, 'filter_key' => 'a!position', 'align' => 'center', 'position' => 'position'); } $content = $header = $this->context->smarty->fetch(parent::getTemplatePath() . 'header.tpl'); $slides = $this->getSlideshows(); if (count($slides) > 0) { $content .= '<fieldset><legend>' . $this->l('Filter by slideshow') . '</legend>'; $content .= '<div class="help">' . $this->l('Choose a slideshow below to filter images') . '</div><br />'; foreach ($slides as $slide) { $selected = isset($_GET['id_opartslideshow_slideshow']) && $_GET['id_opartslideshow_slideshow'] == (int) $slide['key'] ? 'style="color:red; text-decoration:underline;"' : ''; $href = self::$currentIndex . '&id_opartslideshow_slideshow=' . (int) $slide['key'] . '&token=' . $this->token; $content .= '<a href="' . $href . '" ' . $selected . '>' . $slide['name'] . '</a> | '; } $content .= '<br /><br /><a href="index.php?controller=AdminSlideshowImage&token=' . $this->token . '">[ ' . $this->l('reset filter') . ' ]</a>'; $content .= '</fieldset><br />'; $content .= parent::renderList(); } else { $this->errors[] = Tools::displayError($this->l('You must add one or more slideshow before adding images')); } //parent::initToolbar(); $content .= $this->context->smarty->fetch(parent::getTemplatePath() . 'help.tpl'); return $content; }
public function renderList() { $this->initToolbar(); $this->addRowAction('edit'); $this->addRowAction('delete'); return parent::renderList(); }
/** * @see AdminController::renderList() */ public function renderList() { $this->fields_list = array('id_lexikotron' => array('title' => '#'), 'name' => array('title' => $this->l('Texte')), 'active' => array('title' => $this->l('Valider'), 'active' => 'status')); $this->actions = array('edit', 'delete'); $lists = parent::renderList(); parent::initToolbar(); return $lists; }
public function renderList() { // add action on list $this->addRowAction('edit'); $this->addRowAction('delete'); $this->addRowAction('details'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); return parent::renderList(); }
public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->fields_list = array('id_pos_logo' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'title' => array('title' => $this->l('Title'), 'width' => 90), 'description' => array('title' => $this->l('Desscription'), 'width' => '300'), 'porder' => array('title' => $this->l('Order'), 'width' => 10)); $this->fields_list['image'] = array('title' => $this->l('Image'), 'width' => 70, "image" => $this->fieldImageSettings["dir"]); // $lists = parent::renderList(); parent::initToolbar(); return $lists; }
/** * Function used to render the list to display for this controller */ public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->fields_list = array('id_opartslideshow_slideshow' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 'auto'), 'width' => array('title' => $this->l('Width'), 'width' => 'auto'), 'height' => array('title' => $this->l('Height'), 'width' => 'auto'), 'effect' => array('title' => $this->l('Effect'), 'width' => 'auto', 'callback' => 'displayEffectName', 'callback_object' => $this), 'active' => array('title' => $this->l('Displayed'), 'width' => 'auto', 'active' => 'status', 'type' => 'bool')); $lists = parent::renderList(); parent::initToolbar(); $html = $header = $this->context->smarty->fetch(parent::getTemplatePath() . 'header.tpl'); $html .= $lists; $html .= $this->context->smarty->fetch(parent::getTemplatePath() . 'help.tpl'); return $html; }
public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); $this->_select = 'l.name as lang, COUNT(pt.id_simpleblog_post) as posts'; $this->_join = ' LEFT JOIN `' . _DB_PREFIX_ . 'simpleblog_post_tag` pt ON (a.`id_simpleblog_tag` = pt.`id_simpleblog_tag`) LEFT JOIN `' . _DB_PREFIX_ . 'lang` l ON (l.`id_lang` = a.`id_lang`)'; $this->_group = 'GROUP BY a.name, a.id_lang'; return parent::renderList(); }
/** * Function used to render the list to display for this controller */ public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); $this->addRowAction('details'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->fields_list = array('id_example_data' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 'auto')); // Gère les positions $this->fields_list['position'] = array('title' => $this->l('Position'), 'width' => 70, 'align' => 'center', 'position' => 'position'); $lists = parent::renderList(); parent::initToolbar(); return $lists; }
public function renderList() { // if no cron execution within the last weekn we display the reminder as a warning if (!(int) Db::getInstance()->getValue('SELECT COUNT(' . $this->identifier . ') ' . 'FROM `' . _DB_PREFIX_ . $this->table . '` ' . 'WHERE DATE(last_zip_update) >= DATE_SUB(NOW(),INTERVAL 1 WEEK)')) { $this->warnings[] = $this->l('No cron execution detected within the last week') . $this->module->renderReminder(false); } // if some product dowloads links are out of date $missing_links = Db::getInstance()->executeS('SELECT a.' . $this->identifier . ', a.zip_basename ' . 'FROM `' . _DB_PREFIX_ . $this->table . '` a ' . $this->_join . ' WHERE ! pd.id_product_download IS NULL ' . ' AND ! atl.id_attachment IS NULL '); foreach ($missing_links as $ml) { $this->errors[] = $this->l('Attachment or Virtual product does not exit for Autozip') . ' ' . $ml[$this->identifier] . ' - ' . $ml['zip_basename']; } return parent::renderList(); }
public function renderList() { $this->addRowAction('delete'); //LEFT JOIN `'._DB_PREFIX_.'simpleblog_related_post` sbrp //ON (a.`id_simpleblog_tag` = pt.`id_simpleblog_tag`) $this->_select = 'sbpl.meta_title as title, pl.name as product_title'; $this->_join = ' LEFT JOIN `' . _DB_PREFIX_ . 'simpleblog_post_lang` sbpl ON (sbpl.`id_lang` = ' . $this->context->language->id . ' AND sbpl.`id_simpleblog_post` = a.`id_simpleblog_post`) LEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl ON (pl.`id_lang` = ' . $this->context->language->id . ' AND pl.`id_product` = a.`id_product`)'; $this->_group = 'GROUP BY a.`id_simpleblog_related_post`'; return parent::renderList(); }
public function renderList() { $_html = ""; if (isset($_POST["submitFileCounter"]) && $_POST["submitFileCounter"] == 1) { $result = $this->uploadXml(); if (isset($result['file']['error']) && !empty($result['file']['error'])) { $_html .= $this->module->displayError($result['file']['error']); } else { $_html .= $this->module->displayConfirmation($result['file']['filename']); } } $_html .= $this->counterForm(); $_html .= $this->listXML(); return $_html . parent::renderList(); }
public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->fields_list = array('id_pos_sequence' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'title1' => array('title' => $this->l('Title1'), 'width' => 90), 'title2' => array('title' => $this->l('Title2'), 'width' => 90), 'link' => array('title' => $this->l('Link'), 'width' => 90), 'active' => array('title' => $this->l('Displayed'), 'width' => 25, 'align' => 'center', 'active' => 'active', 'type' => 'bool', 'orderby' => FALSE), 'porder' => array('title' => $this->l('Order'), 'width' => 10)); /* $this->fields_list['image'] = array( 'title' => $this->l('Image'), 'width' => 70, "image" => $this->fieldImageSettings["dir"] );*/ // $lists = parent::renderList(); parent::initToolbar(); return $lists; }
public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->fields_list = array('id_posstaticblock' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25, 'lang' => false), 'title' => array('title' => $this->l('Title'), 'width' => 90, 'lang' => false), 'identify' => array('title' => $this->l('Identify'), 'width' => '100', 'lang' => false), 'hook_position' => array('title' => $this->l('Hook Position'), 'width' => '300', 'lang' => false), 'posorder' => array('title' => $this->l('Order'), 'width' => '30', 'lang' => false)); // $this->fields_list['image'] = array( // 'title' => $this->l('Image'), // 'width' => 70, // "image" => $this->fieldImageSettings["dir"] // ); // // $listSlideshows = Staticblock::getSlideshowLists($this->context->language->id); // echo "<pre>"; print_r($listSlideshows); die; $lists = parent::renderList(); parent::initToolbar(); return $lists; }
public function renderView() { if ($id = Tools::getValue('id_feature')) { $this->setTypeValue(); $this->list_id = 'feature_value'; $this->lang = true; if (!Validate::isLoadedObject($obj = new Feature((int) $id))) { $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.') . ' <b>' . $this->table . '</b> ' . Tools::displayError('(cannot load object)'); return; } $this->feature_name = $obj->name; $this->toolbar_title = $this->feature_name[$this->context->employee->id_lang]; $this->fields_list = array('id_feature_value' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'value' => array('title' => $this->l('Value')), 'position' => array('title' => $this->l('Position'), 'filter_key' => 'a!position', 'align' => 'center', 'class' => 'fixed-width-xs', 'position' => 'position')); $this->_where = sprintf('AND `id_feature` = %d', (int) $id); self::$currentIndex = self::$currentIndex . '&id_feature=' . (int) $id . '&viewfeature'; $this->processFilter(); return parent::renderList(); } }
public function renderList() { $this->_join = ' JOIN `' . _DB_PREFIX_ . 'shop` s ON (s.`id_shop` = a.`id_shop`)'; $this->_select = 's.`name` as shop'; if (in_array(Context::getContext()->employee->id_profile, array(Configuration::get('APH_PROFILE_STORE_OWNER'), Configuration::get('APH_PROFILE_STORE_MANAGER'), Configuration::get('APH_PROFILE_STORE_EMPLOYEE')))) { $this->_where = ' AND a.`id_shop` IN (' . implode(', ', Shop::getContextListShopID()) . ') '; } else { $this->_where = ' AND a.`id_shop` !=' . Configuration::get('PS_SHOP_DEFAULT') . ' '; } $this->addRowAction('edit'); $this->addRowAction('delete'); return parent::renderList(); }
public function renderList() { return parent::renderList(); }
public function renderList() { return $this->getP() . parent::renderList(); }
public function renderList() { $_html = ""; $_html .= $this->listXML(); return $_html . parent::renderList(); }
public function initListPosts() { $this->context->smarty->assign('title_list', $this->l('List of posts')); $this->content .= parent::renderList(); }
/** * Affichage de la liste */ public function renderList() { $this->tpl_list_vars['condition_type'] = $this->rules_types; return parent::renderList(); }
public function renderList() { $this->toolbar_btn = $this->module->initToolbar(); return parent::renderList(); }
/** * Renders a list of menu item objects. * Position column is only visible in the shop context * * @return false|string */ public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->fields_list = array('id_ct_top_menu_item' => array('title' => $this->l('Item ID')), 'type' => array('title' => $this->l('Item Type')), 'entity_id' => array('title' => $this->l('Entity ID')), 'icon' => array('title' => $this->l('Icon')), 'class' => array('title' => $this->l('CSS Class')), 'name' => array('title' => $this->l('Custom Name')), 'title' => array('title' => $this->l('Custom Title')), 'url' => array('title' => $this->l('Custom URL')), 'no_follow' => array('title' => $this->l('No Follow'), 'align' => 'center', 'active' => 'no_follow', 'type' => 'bool', 'class' => 'fixed-width-sm', 'orderby' => false), 'active' => array('title' => $this->l('Active'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'class' => 'fixed-width-sm', 'orderby' => false)); if (Shop::getContext() != Shop::CONTEXT_ALL && Shop::getContext() != Shop::CONTEXT_GROUP) { $id_shop = Shop::getContextShopID(); $this->_defaultOrderBy = 'position'; $this->_select = 'shop.position as position'; $this->_join = 'LEFT JOIN ' . _DB_PREFIX_ . 'ct_top_menu_item_shop shop ON a.id_ct_top_menu_item = shop.id_ct_top_menu_item AND shop.id_shop = ' . (int) $id_shop; $this->fields_list['position'] = array('title' => $this->l('Position'), 'filter_key' => 'shop!position', 'align' => 'center', 'class' => 'fixed-width-sm', 'position' => 'position'); $this->informations[] = $this->l('If you would like to order menu items, sort the list by position.'); } else { $this->informations[] = $this->l('If you would like to order menu items, select shop context.'); } return parent::renderList(); }
public function renderList() { $this->tpl_list_vars['postZones'] = array(array('id_post_zone' => 1, 'name' => $this->l('Zone 1')), array('id_post_zone' => 2, 'name' => $this->l('Zone 2')), array('id_post_zone' => 3, 'name' => $this->l('Zone 3')), array('id_post_zone' => 4, 'name' => $this->l('Zone 4')), array('id_post_zone' => 5, 'name' => $this->l('Zone 5'))); return parent::renderList(); }
/** * Get view * * @return string */ public function renderList() { $current_date = DateTime::createFromFormat('Y-m-d', Tools::getValue('date')) ? Tools::getValue('date') : date('Y-m-d'); //get businnes hours about Context::getContext()->shop->id; $store = Db::getInstance()->getRow(' SELECT st.hours FROM ' . _DB_PREFIX_ . 'store_shop ss LEFT JOIN `' . _DB_PREFIX_ . 'store` st ON (ss.`id_store` = st.`id_store`) WHERE ss.`id_shop` = ' . (int) Context::getContext()->shop->id); $hours = json_decode($store['hours'], true); $minTime = '12:00:00'; $maxTime = '12:00:00'; if (!empty($hours) && is_array($hours)) { foreach ($hours as $hour) { if ($hour[1]['o'] == 'X' || $hour[1]['c'] == 'X') { continue; } $hour[1]['o'] = $hour[1]['o'] . ':00'; $hour[1]['c'] = $hour[1]['c'] . ':00'; if ($hour[1]['o'] < $minTime) { $minTime = $hour[1]['o']; } if ($hour[1]['c'] > $maxTime) { $maxTime = $hour[1]['c']; } if ($hour[2]['o'] == 'X' || $hour[2]['c'] == 'X') { continue; } $hour[2]['o'] = $hour[2]['o'] . ':00'; $hour[2]['c'] = $hour[2]['c'] . ':00'; if ($hour[2]['o'] < $minTime) { $minTime = $hour[2]['o']; } if ($hour[2]['c'] > $maxTime) { $maxTime = $hour[2]['c']; } } } if ($minTime == '12:00:00') { $minTime = '08:00:00'; } if ($maxTime == '12:00:00') { $maxTime = '22:00:00'; } $this->id_current_product = (int) Tools::getValue('id_product'); if ((bool) $this->id_current_product) { $product = new Product($this->id_current_product, false, (int) Context::getContext()->language->id); $this->context->smarty->assign('id_current_product', $product->id); $this->context->smarty->assign('product_name', $product->name); } // Generate product selection tree $tree = new HelperTreeProducts('products-tree', $this->l('Seleziona servizio')); //$tree->setNodeFolderTemplate('tree_node_folder_radio.tpl'); $tree->setNodeItemTemplate('tree_node_item_radio_products.tpl'); if ((bool) $this->id_current_product) { $tree->setAttribute('selected_product', array($this->id_current_product)); $tree->setSelectedProducts(array($this->id_current_product)); } $tree->setInputName('id_product'); $tree->setUseRadioBox(true); $tree->setUseActiveProducts(true); $tree->setShowPrice(false); $tree->setUseShopRestriction(true); $this->context->smarty->assign('product_tree', $tree->render()); $jsVars = array('language' => $this->context->language->iso_code, 'defaultDate' => $current_date, 'minTime' => $minTime, 'maxTime' => $maxTime, 'slotDuration' => '00:' . Configuration::get('APH_CALENDAR_TIME_SLICE') . ':00', 'id_current_product' => (int) $this->id_current_product); $this->setJsVars($jsVars); $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . '/views/templates/admin/controllers/custom_prices/calendar.tpl'); return parent::renderList(); }
public function renderList() { $this->initToolbar(); return parent::renderList(); }
public function renderList() { $this->_select = "CONCAT(a.id_product, '-', a.id_shop) as id_ps, pl.name,a.id_service_duration,j.id_feature_value, s.`name` as shop"; $this->_join = ' JOIN `' . _DB_PREFIX_ . 'product_lang` pl ON pl.`id_product` = a.`id_product` AND pl.`id_shop`=' . $this->context->shop->id . ' AND pl.`id_lang`= ' . (int) Context::getContext()->language->id; $this->_join .= ' JOIN `' . _DB_PREFIX_ . 'feature_product` j ON j.`id_product` = a.`id_product`'; $this->_orderBy = 'pl.name'; $this->_orderWay = 'ASC'; $this->_where = ' AND j.`id_feature`=' . Configuration::get('APH_FEATURE_DURATION'); $this->_join .= ' JOIN `' . _DB_PREFIX_ . 'shop` s ON s.`id_shop` = a.`id_shop`'; if (in_array(Context::getContext()->employee->id_profile, array(Configuration::get('APH_PROFILE_STORE_OWNER'), Configuration::get('APH_PROFILE_STORE_MANAGER'), Configuration::get('APH_PROFILE_STORE_EMPLOYEE')))) { $this->_where .= ' AND a.id_shop IN (' . implode(', ', Shop::getContextListShopID()) . ') '; } else { $this->_where .= ' AND a.`id_shop` !=' . Configuration::get('PS_SHOP_DEFAULT') . ' '; } $this->addRowAction('edit'); return parent::renderList(); }
public function renderList() { $html = $this->context->smarty->createTemplate(_PS_MODULE_DIR_ . 'magicredirect/views/templates/admin/mass_csv_form.tpl')->fetch(); return $html . parent::renderList(); }
public function renderList() { $this->_select = "CONCAT(j.firstname,\" \",j.lastname) as employee_name"; $this->_join .= ' LEFT JOIN `' . _DB_PREFIX_ . 'employee` j ON j.`id_employee` = a.`id_employee`'; $this->_orderBy = 'employee_name'; $this->_orderWay = 'DESC'; $this->addRowAction('edit'); $this->addRowAction('delete'); return parent::renderList(); }