summaryrefslogtreecommitdiff
path: root/modules/gallery/views
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2010-02-12 20:59:26 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-02-14 07:15:57 -0800
commit2dad1d7cd15bed3c89de11cadf4b3b5c43134f69 (patch)
tree6eb61a76f80a88cdb8f245c7296e2db7d0d4a245 /modules/gallery/views
parent8412aeb1337c4060a77af7c94441ca8cbc6bb4ad (diff)
Some HTML validation fixes (don't render empty <ul> lists, empty id attributes, use &amp; not &)
Diffstat (limited to 'modules/gallery/views')
-rw-r--r--modules/gallery/views/menu.html.php4
-rw-r--r--modules/gallery/views/menu_ajax_link.html.php2
-rw-r--r--modules/gallery/views/menu_dialog.html.php2
-rw-r--r--modules/gallery/views/menu_link.html.php2
4 files changed, 5 insertions, 5 deletions
diff --git a/modules/gallery/views/menu.html.php b/modules/gallery/views/menu.html.php
index cb49bcdf..17a249dd 100644
--- a/modules/gallery/views/menu.html.php
+++ b/modules/gallery/views/menu.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<? if ($menu->elements): // Don't show the menu if it has no choices ?>
+<? if (!$menu->is_empty()): // Don't show the menu if it has no choices ?>
<? if ($menu->is_root): ?>
-<ul <?= isset($menu->css_id) ? "id='$menu->css_id'" : "" ?> class="<?= $menu->css_class ?>">
+<ul <?= $menu->css_id ? "id='$menu->css_id'" : "" ?> class="<?= $menu->css_class ?>">
<? foreach ($menu->elements as $element): ?>
<?= $element->render() ?>
<? endforeach ?>
diff --git a/modules/gallery/views/menu_ajax_link.html.php b/modules/gallery/views/menu_ajax_link.html.php
index 00a394bc..06cd6f92 100644
--- a/modules/gallery/views/menu_ajax_link.html.php
+++ b/modules/gallery/views/menu_ajax_link.html.php
@@ -1,6 +1,6 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<li>
- <a id="<?= $menu->css_id ?>"
+ <a <?= $menu->css_id ? "id='{$menu->css_id}'" : "" ?>
class="g-ajax-link <?= $menu->css_class ?>"
href="<?= $menu->url ?>"
title="<?= $menu->label->for_html_attr() ?>"
diff --git a/modules/gallery/views/menu_dialog.html.php b/modules/gallery/views/menu_dialog.html.php
index 99b1b013..b44080c3 100644
--- a/modules/gallery/views/menu_dialog.html.php
+++ b/modules/gallery/views/menu_dialog.html.php
@@ -1,6 +1,6 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<li>
- <a id="<?= $menu->css_id ?>"
+ <a <?= $menu->css_id ? "id='{$menu->css_id}'" : "" ?>
class="g-dialog-link <?= $menu->css_class ?>"
href="<?= $menu->url ?>"
title="<?= $menu->label->for_html_attr() ?>">
diff --git a/modules/gallery/views/menu_link.html.php b/modules/gallery/views/menu_link.html.php
index 8e4cdb95..a36d2754 100644
--- a/modules/gallery/views/menu_link.html.php
+++ b/modules/gallery/views/menu_link.html.php
@@ -1,6 +1,6 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<li>
- <a id="<?= $menu->css_id ?>"
+ <a <?= $menu->css_id ? "id='{$menu->css_id}'" : "" ?>
class="g-menu-link <?= $menu->css_class ?>"
href="<?= $menu->url ?>"
title="<?= $menu->label->for_html_attr() ?>">