Now settings CSS class with appid in content DIV

remotes/origin/ldap_group_count
Vincent Petry 11 years ago
parent b2e8aa70cd
commit 04f73275ba
  1. 2
      core/templates/layout.user.php
  2. 4
      lib/private/template.php
  3. 4
      lib/private/templatelayout.php

@ -123,7 +123,7 @@
</div></nav> </div></nav>
<div id="content-wrapper"> <div id="content-wrapper">
<div id="content"> <div id="content" class="app-<?php p($_['appid']) ?>">
<?php print_unescaped($_['content']); ?> <?php print_unescaped($_['content']); ?>
</div> </div>
</div> </div>

@ -30,6 +30,7 @@ class OC_Template extends \OC\Template\Base {
private $renderas; // Create a full page? private $renderas; // Create a full page?
private $path; // The path to the template private $path; // The path to the template
private $headers=array(); //custom headers private $headers=array(); //custom headers
protected $app; // app id
/** /**
* @brief Constructor * @brief Constructor
@ -62,6 +63,7 @@ class OC_Template extends \OC\Template\Base {
// Set the private data // Set the private data
$this->renderas = $renderas; $this->renderas = $renderas;
$this->path = $path; $this->path = $path;
$this->app = $app;
parent::__construct($template, $requesttoken, $l10n, $themeDefaults); parent::__construct($template, $requesttoken, $l10n, $themeDefaults);
} }
@ -172,7 +174,7 @@ class OC_Template extends \OC\Template\Base {
$data = parent::fetchPage(); $data = parent::fetchPage();
if( $this->renderas ) { if( $this->renderas ) {
$page = new OC_TemplateLayout($this->renderas); $page = new OC_TemplateLayout($this->renderas, $this->app);
// Add custom headers // Add custom headers
$page->assign('headers', $this->headers, false); $page->assign('headers', $this->headers, false);

@ -15,8 +15,9 @@ class OC_TemplateLayout extends OC_Template {
/** /**
* @param string $renderas * @param string $renderas
* @param string $appid application id
*/ */
public function __construct( $renderas ) { public function __construct( $renderas, $appid = '' ) {
// Decide which page we show // Decide which page we show
if( $renderas == 'user' ) { if( $renderas == 'user' ) {
@ -43,6 +44,7 @@ class OC_TemplateLayout extends OC_Template {
// Add navigation entry // Add navigation entry
$this->assign( 'application', '', false ); $this->assign( 'application', '', false );
$this->assign( 'appid', $appid );
$navigation = OC_App::getNavigation(); $navigation = OC_App::getNavigation();
$this->assign( 'navigation', $navigation); $this->assign( 'navigation', $navigation);
$this->assign( 'settingsnavigation', OC_App::getSettingsNavigation()); $this->assign( 'settingsnavigation', OC_App::getSettingsNavigation());

Loading…
Cancel
Save