inputHeader: jQuery('#linkmenu_headermenu'),
inputOuter: jQuery('#linkmenu_outermenu'),
trHtmlCode: jQuery('#htmlcode'),
- trUrlCode: jQuery('#urlcode')
- });
+ trUrlCode: jQuery('#urlcode'),
+ tableTbodyLink: jQuery('#sortable tbody')
+ });
});
//]]></script>
<?php
-$linksArray = $headermenu->getAllAvailableLinks();
+$linksArray = $headermenu->getAvailableLinks('headermenu');
if (sizeof($linksArray)) {
- echo $HTML->boxTop(_('Manage available links'));
+ echo $HTML->boxTop(_('Manage available links in headermenu'));
$tabletop = array(_('Menu Location'), _('Menu Type'), _('Displayed Name'), _('Description'), _('Status'), _('Actions'));
$classth = array('', '','','','','unsortable');
echo $HTML->listTableTop($tabletop, false, 'sortable_headermenu_listlinks', 'sortable', $classth);
echo '</br>';
}
+$linksArray = $headermenu->getAvailableLinks('outermenu');
+if (sizeof($linksArray)) {
+ echo $HTML->boxTop(_('Manage available links in outermenu'));
+ $tabletop = array(_('Menu Location'), _('Menu Type'), _('Displayed Name'), _('Description'), _('Status'), _('Actions'));
+ $classth = array('', '','','','','unsortable');
+ echo $HTML->listTableTop($tabletop, false, 'sortable_outermenu_listlinks', 'sortable', $classth);
+ foreach ($linksArray as $link) {
+ echo '<tr>';
+ echo '<td>'.htmlspecialchars($link['linkmenu']).'</td>';
+ if (strlen($link['url']) > 0) {
+ echo '<td>'._('URL').' ('.htmlspecialchars($link['url']).')</td>';
+ } else {
+ echo '<td>'._('static html code').'</td>';
+ }
+ echo '<td>'.htmlspecialchars($link['name']).'</td>';
+ echo '<td>'.htmlspecialchars($link['description']).'</td>';
+ if ($link['is_enable']) {
+ echo '<td>'.html_image('docman/validate.png', 22, 22, array('alt'=>_('link is on'), 'class'=>'tabtitle', 'title'=>_('link is on'))).'</td>';
+ echo '<td><a class="tabtitle-ne" title="'._('Desactivate this link').'" href="index.php?type=globaladmin&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=0">'.html_image('docman/release-document.png', 22, 22, array('alt'=>_('Desactivate this link'))). '</a>';
+ } else {
+ echo '<td>'.html_image('docman/delete-directory.png', 22, 22, array('alt'=>_('link is off'), 'class'=>'tabtitle', 'title'=>_('link is off'))).'</td>';
+ echo '<td><a class="tabtitle-ne" title="'._('Activate this link').'" href="index.php?type=globaladmin&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=1">'.html_image('docman/reserve-document.png', 22, 22, array('alt'=>_('Activate this link'))). '</a>';
+ }
+ echo '<a class="tabtitle-ne" title="'._('Edit this link').'" href="index.php?type=globaladmin&view=updateLinkValue&linkid='.$link['id_headermenu'].'">'.html_image('docman/edit-file.png',22,22, array('alt'=>_('Edit this link'))). '</a>';
+ echo '<a class="tabtitle-ne" title="'._('Delete this link').'" href="index.php?type=globaladmin&action=deleteLink&linkid='.$link['id_headermenu'].'">'.html_image('docman/trash-empty.png',22,22, array('alt'=>_('Delete this link'))). '</a>';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo $HTML->listTableBottom();
+ echo $HTML->boxBottom();
+ echo '</br>';
+}
+
echo '<form method="POST" name="addLink" action="index.php?type=globaladmin&action=addLink">';
echo '<table><tr>';
echo $HTML->boxTop(_('Add a new link'));
<?php
$linksArray = $headermenu->getAvailableLinks('groupmenu');
if (sizeof($linksArray)) {
+ echo '<p class="information">'. _('You can reorder links, just drag & drop rows in the table and save order.').'</p>';
echo $HTML->boxTop(_('Manage available links'));
- $tabletop = array(_('Menu Type'), _('Displayed Name'), _('Description'), _('Status'), _('Actions'));
- $classth = array('','','','','unsortable');
+ $tabletop = array(_('Order'), _('Menu Type'), _('Displayed Name'), _('Description'), _('Status'), _('Actions'));
+ $classth = array('', '','','','','unsortable');
echo $HTML->listTableTop($tabletop, false, 'sortable_headermenu_listlinks', 'sortable', $classth);
foreach ($linksArray as $link) {
- echo '<tr>';
+ echo '<tr><td>'.$link['ordering'].'</td>';
if (strlen($link['url']) > 0) {
echo '<td>'._('URL');
if ($link['linktype'] == 'iframe') {