|
Revision 1256, 0.8 kB
(checked in by eighty4, 10 days ago)
|
|
removing jquery and adding the option to not always display the switcher
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | $active_theme= Options::get( 'theme_dir' ); |
|---|
| 3 | $all_themes= Themes::get_all_data(); |
|---|
| 4 | $selected_themes= Options::get( 'themeswitcher__selected_themes' ); |
|---|
| 5 | ?> |
|---|
| 6 | <div class="sb-switcher"> |
|---|
| 7 | <h2>Theme Switcher</h2> |
|---|
| 8 | <form action="" method="post" name="themeswitcher"> |
|---|
| 9 | <select name="theme_dir" onChange="this.form.submit()"> |
|---|
| 10 | <?php |
|---|
| 11 | foreach( $selected_themes as $selected_theme ) { |
|---|
| 12 | $theme= $all_themes[$selected_theme]; |
|---|
| 13 | ?> |
|---|
| 14 | <option value="<?php echo $theme['dir']; ?>"<?php echo ($theme['dir'] == $active_theme) ? 'selected' : ''; ?>><?php echo $theme['info']->name; ?> <?php echo $theme['info']->version; ?></option> |
|---|
| 15 | <?php } ?> |
|---|
| 16 | </select> |
|---|
| 17 | <input type="submit" style="display: none;" name="themeswitcher_submit" value="Switch"> |
|---|
| 18 | </form> |
|---|
| 19 | </div> |
|---|