https://src.bluestatic.org
/
isso.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
10f84ee
)
Minor adjustments to the BSPrinterNavigation system to support not having tabs or...
author
Robert Sesek <rsesek@bluestatic.org>
Mon, 14 Jan 2008 21:06:25 +0000
(16:06 -0500)
committer
Robert Sesek <rsesek@bluestatic.org>
Mon, 14 Jan 2008 21:06:25 +0000
(16:06 -0500)
* PrinterNavigation.php
PrinterNavigation.php
patch
|
blob
|
history
diff --git
a/PrinterNavigation.php
b/PrinterNavigation.php
index 74d571326c9717379bf54f941026a384d1939fa2..ba702311147c4c3337301c748c4ed3fe142f6274 100644
(file)
--- a/
PrinterNavigation.php
+++ b/
PrinterNavigation.php
@@
-101,16
+101,22
@@
class BSPrinterNavigation
// -------------------------------------------------------------------
// -------------------------------------------------------------------
- $output2 = array();
- foreach ($this->structure->links->link as $link)
+ if (isset($this->structure->links))
{
{
- $attrs = $link->attributes();
- $output2[] = '<a href="' . $attrs->target . '">' . $link . '</a>';
+ $links = array();
+ foreach ($this->structure->links->link as $link)
+ {
+ $attrs = $link->attributes();
+ $links[] = '<a href="' . $attrs->target . '">' . $link . '</a>';
+ }
}
$output .= "\n" . '<div id="toplinks">';
$output .= "\n\t" . '<div>' . BSPrinter::get_realm() . '</div>';
}
$output .= "\n" . '<div id="toplinks">';
$output .= "\n\t" . '<div>' . BSPrinter::get_realm() . '</div>';
- $output .= "\n\t" . '<div id="toplinks-links">' . implode(' • ', $output2) . '</div>';
+ if (isset($links))
+ {
+ $output .= "\n\t" . '<div id="toplinks-links">' . implode(' • ', $links) . '</div>';
+ }
$output .= "\n" . '</div>';
// -------------------------------------------------------------------
$output .= "\n" . '</div>';
// -------------------------------------------------------------------
@@
-119,20
+125,23
@@
class BSPrinterNavigation
// -------------------------------------------------------------------
// -------------------------------------------------------------------
- $output .= "\n" . '<div id="tabbar">';
- foreach ($this->structure->tabs->tab as $tab)
+ if (isset($this->structure->tabs))
{
{
- $
link = "\n\t" . '<a href="' . $tab['target'] . '"
';
-
if (in_array($tab['key'], $this->focusKeys)
)
+ $
output .= "\n" . '<div id="tabbar">
';
+
foreach ($this->structure->tabs->tab as $tab
)
{
{
- $link .= ' id="focustab"';
+ $link = "\n\t" . '<a href="' . $tab['target'] . '"';
+ if (in_array($tab['key'], $this->focusKeys))
+ {
+ $link .= ' id="focustab"';
+ }
+
+ $link .= '><span>' . $tab . '</span></a>';
+
+ $output .= $link;
}
}
-
- $link .= '><span>' . $tab . '</span></a>';
-
- $output .= $link;
+ $output .= "\n" . '</div>';
}
}
- $output .= "\n" . '</div>';
// -------------------------------------------------------------------
// -------------------------------------------------------------------