Event::handle('EndShowUAStyles', array($this));
}
- if (Event::handle('StartShowDesign', array($this))) {
-
- $user = common_current_user();
-
- if (empty($user) || $user->viewdesigns) {
- $design = $this->getDesign();
-
- if (!empty($design)) {
- $design->showCSS($this);
- }
- }
-
- Event::handle('EndShowDesign', array($this));
- }
Event::handle('EndShowStyles', array($this));
if (common_config('custom_css', 'enabled')) {
$this->cssLink('css/display.css', $baseTheme, $media);
}
$this->cssLink('css/display.css', $mainTheme, $media);
+
+ // Additional styles for RTL languages
+ if (is_rtl(common_language())) {
+ if (file_exists(Theme::file('css/rtl.css'))) {
+ $this->cssLink('css/rtl.css', $mainTheme, $media);
+ }
+ }
}
/**
$this->elementStart('div', array('id' => 'site_nav_global_primary'));
$pn = new PrimaryNav($this);
$pn->show();
+
+ $user = common_current_user();
+
+ if (!empty($user) || !common_config('site', 'private')) {
+ $form = new SearchForm($this);
+ $form->show();
+ }
+
$this->elementEnd('div');
}
{
// Added @id to li for some control.
// XXX: We might want to move this to htmloutputter.php
- $lattrs = array();
+ $lattrs = array();
+ $classes = array();
if ($class !== null) {
- $lattrs['class'] = $class;
- if ($is_selected) {
- $lattrs['class'] = trim('current ' . $lattrs['class']);
- }
+ $classes[] = trim($class);
+ }
+ if ($is_selected) {
+ $classes[] = 'current';
}
- (is_null($id)) ? $lattrs : $lattrs['id'] = $id;
+ if (!empty($classes)) {
+ $lattrs['class'] = implode(' ', $classes);
+ }
+
+ if (!is_null($id)) {
+ $lattrs['id'] = $id;
+ }
$this->elementStart('li', $lattrs);
$attrs['href'] = $url;
return null;
}
- /**
- * A design for this action
- *
- * @return Design a design object to use
- */
- function getDesign()
- {
- return Design::siteDesign();
- }
-
/**
* Check the session token.
*