//removed commented code
This commit is contained in:
@@ -384,76 +384,6 @@ class BlockLink extends Module
|
|||||||
</fieldset>';
|
</fieldset>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
private function _list()
|
|
||||||
{
|
|
||||||
$links = $this->getLinks();
|
|
||||||
$languages = Language::getLanguages();
|
|
||||||
$token = Tools::safeOutput(Tools::getValue('token'));
|
|
||||||
if (!Validate::isCleanHtml($token))
|
|
||||||
$token = '';
|
|
||||||
if ($links)
|
|
||||||
{
|
|
||||||
$this->_html .= '
|
|
||||||
<script type="text/javascript">
|
|
||||||
var currentUrl = \''.Tools::safeOutput($_SERVER['REQUEST_URI']).'\';
|
|
||||||
var token=\''.$token.'\';
|
|
||||||
var links = new Array();';
|
|
||||||
foreach ($links as $link)
|
|
||||||
{
|
|
||||||
$this->_html .= 'links['.$link['id'].'] = new Array(\''.addslashes($link['url']).'\', '.$link['newWindow'];
|
|
||||||
foreach ($languages as $language)
|
|
||||||
if (isset($link['text_'.$language['id_lang']]))
|
|
||||||
$this->_html .= ', \''.addslashes($link['text_'.$language['id_lang']]).'\'';
|
|
||||||
else
|
|
||||||
$this->_html .= ', \'\'';
|
|
||||||
$this->_html .= ');';
|
|
||||||
}
|
|
||||||
$this->_html .= '</script>';
|
|
||||||
}
|
|
||||||
$this->_html .= '
|
|
||||||
<h3 class="blue space">'.$this->l('Link list').'</h3>
|
|
||||||
<table class="table">
|
|
||||||
<tr>
|
|
||||||
<th>'.$this->l('ID').'</th>
|
|
||||||
<th>'.$this->l('Text').'</th>
|
|
||||||
<th>'.$this->l('URL').'</th>
|
|
||||||
<th>'.$this->l('Actions').'</th>
|
|
||||||
</tr>';
|
|
||||||
|
|
||||||
if (!$links)
|
|
||||||
$this->_html .= '
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">'.$this->l('There are no links.').'</td>
|
|
||||||
</tr>';
|
|
||||||
else
|
|
||||||
foreach ($links as $link)
|
|
||||||
$this->_html .= '
|
|
||||||
<tr>
|
|
||||||
<td>'.(int)$link['id'].'</td>
|
|
||||||
<td>'.Tools::safeOutput($link['text_'.$this->context->language->id]).'</td>
|
|
||||||
<td>'.Tools::safeOutput($link['url']).'</td>
|
|
||||||
<td>
|
|
||||||
<a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&id_link='.(int)$link['id'].'"><img src="../img/admin/edit.gif" alt="" title="" style="cursor: pointer" /></a>
|
|
||||||
<a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&id='.(int)$link['id'].'&delete_link=1"><img src="../img/admin/delete.gif" alt="" title="" style="cursor: pointer" /></a>
|
|
||||||
</td>
|
|
||||||
</tr>';
|
|
||||||
$i = 0;
|
|
||||||
$nb = count($languages);
|
|
||||||
$idLng = 0;
|
|
||||||
while ($i < $nb)
|
|
||||||
{
|
|
||||||
if ($languages[$i]['id_lang'] == (int)Configuration::get('PS_LANG_DEFAULT'))
|
|
||||||
$idLng = $i;
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
$this->_html .= '
|
|
||||||
</table>
|
|
||||||
<input type="hidden" id="languageFirst" value="'.(int)$languages[0]['id_lang'].'" />
|
|
||||||
<input type="hidden" id="languageNb" value="'.count($languages).'" />';
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
public function renderList()
|
public function renderList()
|
||||||
{
|
{
|
||||||
$fields_list = array(
|
$fields_list = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user