diff options
author | Alex Legler <alex@a3li.li> | 2015-01-05 22:00:37 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2015-01-05 22:00:37 +0100 |
commit | a4afb70317dff4e80b02733bbd73f4f0098f2b89 (patch) | |
tree | 7484e43b68a34be64befb8a1e653c73719eef5d8 | |
parent | Tyrian sync (diff) | |
download | skin-tyrian-a4afb70317dff4e80b02733bbd73f4f0098f2b89.tar.gz skin-tyrian-a4afb70317dff4e80b02733bbd73f4f0098f2b89.tar.bz2 skin-tyrian-a4afb70317dff4e80b02733bbd73f4f0098f2b89.zip |
Add functionality for --- and header: to add dropdown dividers and headers
-rw-r--r-- | TyrianTemplate.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/TyrianTemplate.php b/TyrianTemplate.php index 9bd72c8..fd29e3b 100644 --- a/TyrianTemplate.php +++ b/TyrianTemplate.php @@ -382,7 +382,13 @@ class TyrianTemplate extends BaseTemplate { if ( is_array ( $cont ) ) { foreach ( $cont as $key => $val ) { - echo $this->makeListItem( $key, $val ); + if ( $val['text'] === '---' ) { + echo '<li role="presentation" class="divider"></li>'; + } elseif ( substr( $val['text'], 0, 7 ) === 'header:' ) { + echo '<li role="presentation" class="dropdown-header">' . htmlspecialchars( substr( $val['text'], 7 ) ) . '</li>'; + } else { + echo $this->makeListItem( $key, $val ); + } } } else { echo "<!-- This would have been a box, but it contains custom html which is not supported. -->"; |