|
@@ -19,7 +19,7 @@ function template_show_list($list_id = null)
|
|
|
$cur_list = &$context[$list_id];
|
|
|
|
|
|
// These are the main tabs that is used all around the template.
|
|
|
- if (!empty($settings['use_tabs']) && isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top'))
|
|
|
+ if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top'))
|
|
|
template_create_list_menu($cur_list['list_menu'], 'top');
|
|
|
|
|
|
if (isset($cur_list['form']))
|
|
@@ -40,10 +40,6 @@ function template_show_list($list_id = null)
|
|
|
</h3>
|
|
|
</div>';
|
|
|
|
|
|
- // This is for the old style menu with the arrows "> Test | Test 1"
|
|
|
- if (empty($settings['use_tabs']) && isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top'))
|
|
|
- template_create_list_menu($cur_list['list_menu'], 'top');
|
|
|
-
|
|
|
if (isset($cur_list['additional_rows']['after_title']))
|
|
|
{
|
|
|
echo '
|
|
@@ -177,7 +173,7 @@ function template_show_list($list_id = null)
|
|
|
</div>';
|
|
|
|
|
|
// Tabs at the bottom. Usually bottom alligned.
|
|
|
- if (!empty($settings['use_tabs']) && isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom'))
|
|
|
+ if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom'))
|
|
|
template_create_list_menu($cur_list['list_menu'], 'bottom');
|
|
|
|
|
|
if (isset($cur_list['javascript']))
|
|
@@ -234,15 +230,9 @@ function template_create_list_menu($list_menu, $direction = 'top')
|
|
|
$first = $context['right_to_left'] ? 'last' : 'first';
|
|
|
$last = $context['right_to_left'] ? 'first' : 'last';
|
|
|
|
|
|
- // Tabs take preference over buttons in certain cases.
|
|
|
- if (empty($settings['use_tabs']) && $list_menu['style'] == 'button')
|
|
|
- $list_menu['style'] = 'tabs';
|
|
|
-
|
|
|
if (!isset($list_menu['style']) || isset($list_menu['style']) && $list_menu['style'] == 'tabs')
|
|
|
{
|
|
|
- if (!empty($settings['use_tabs']))
|
|
|
- {
|
|
|
- echo '
|
|
|
+ echo '
|
|
|
<table cellpadding="0" cellspacing="0" style="margin-', $list_menu['position'], ': 10px; width: 100%;">
|
|
|
<tr>', $list_menu['position'] == 'right' ? '
|
|
|
<td> </td>' : '', '
|
|
@@ -251,23 +241,23 @@ function template_create_list_menu($list_menu, $direction = 'top')
|
|
|
<tr>
|
|
|
<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_', $first, '"> </td>';
|
|
|
|
|
|
- foreach ($list_menu['links'] as $link)
|
|
|
- {
|
|
|
- if ($link['is_selected'])
|
|
|
- echo '
|
|
|
+ foreach ($list_menu['links'] as $link)
|
|
|
+ {
|
|
|
+ if ($link['is_selected'])
|
|
|
+ echo '
|
|
|
<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $first, '"> </td>
|
|
|
<td valign="top" class="', $direction == 'top' ? 'mirrortab' : 'maintab', '_active_back">
|
|
|
<a href="', $link['href'], '">', $link['label'], '</a>
|
|
|
</td>
|
|
|
<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $last, '"> </td>';
|
|
|
- else
|
|
|
- echo '
|
|
|
+ else
|
|
|
+ echo '
|
|
|
<td valign="top" class="', $direction == 'top' ? 'mirror' : 'main', 'tab_back">
|
|
|
<a href="', $link['href'], '">', $link['label'], '</a>
|
|
|
</td>';
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- echo '
|
|
|
+ echo '
|
|
|
<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_', $last, '"> </td>
|
|
|
</tr>
|
|
|
</table>
|
|
@@ -275,22 +265,6 @@ function template_create_list_menu($list_menu, $direction = 'top')
|
|
|
<td> </td>' : '', '
|
|
|
</tr>
|
|
|
</table>';
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- echo '
|
|
|
- <tr class="titlebg">
|
|
|
- <td colspan="', $context['colspan'], '">';
|
|
|
-
|
|
|
- $links = array();
|
|
|
- foreach ($list_menu['links'] as $link)
|
|
|
- $links[] = ($link['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=">" /> ' : '') . '<a href="' . $link['href'] . '">' . $link['label'] . '</a>';
|
|
|
-
|
|
|
- echo '
|
|
|
- ', implode(' | ', $links), '
|
|
|
- </td>
|
|
|
- </tr>';
|
|
|
- }
|
|
|
}
|
|
|
elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons')
|
|
|
{
|