[Pkg-owncloud-commits] [owncloud] 142/172: Now settings CSS class with appid in content DIV

David Prévot taffit at moszumanska.debian.org
Sun May 18 20:09:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 04f73275ba222f0aae80cf80890477b141cd4902
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Mon Dec 9 13:18:13 2013 +0100

    Now settings CSS class with appid in content DIV
---
 core/templates/layout.user.php | 2 +-
 lib/private/template.php       | 4 +++-
 lib/private/templatelayout.php | 4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index a217446..b0ae863 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -123,7 +123,7 @@
 		</div></nav>
 
 		<div id="content-wrapper">
-			<div id="content">
+			<div id="content" class="app-<?php p($_['appid']) ?>">
 				<?php print_unescaped($_['content']); ?>
 			</div>
 		</div>
diff --git a/lib/private/template.php b/lib/private/template.php
index 3d18b52..dfeb5d1 100644
--- a/lib/private/template.php
+++ b/lib/private/template.php
@@ -30,6 +30,7 @@ class OC_Template extends \OC\Template\Base {
 	private $renderas; // Create a full page?
 	private $path; // The path to the template
 	private $headers=array(); //custom headers
+	protected $app; // app id
 
 	/**
 	 * @brief Constructor
@@ -62,6 +63,7 @@ class OC_Template extends \OC\Template\Base {
 		// Set the private data
 		$this->renderas = $renderas;
 		$this->path = $path;
+		$this->app = $app;
 
 		parent::__construct($template, $requesttoken, $l10n, $themeDefaults);
 	}
@@ -172,7 +174,7 @@ class OC_Template extends \OC\Template\Base {
 		$data = parent::fetchPage();
 
 		if( $this->renderas ) {
-			$page = new OC_TemplateLayout($this->renderas);
+			$page = new OC_TemplateLayout($this->renderas, $this->app);
 
 			// Add custom headers
 			$page->assign('headers', $this->headers, false);
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index 0672ffc..a5dd9a0 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -15,8 +15,9 @@ class OC_TemplateLayout extends OC_Template {
 
 	/**
 	 * @param string $renderas
+	 * @param string $appid application id
 	 */
-	public function __construct( $renderas ) {
+	public function __construct( $renderas, $appid = '' ) {
 		// Decide which page we show
 
 		if( $renderas == 'user' ) {
@@ -43,6 +44,7 @@ class OC_TemplateLayout extends OC_Template {
 
 			// Add navigation entry
 			$this->assign( 'application', '', false );
+			$this->assign( 'appid', $appid );
 			$navigation = OC_App::getNavigation();
 			$this->assign( 'navigation', $navigation);
 			$this->assign( 'settingsnavigation', OC_App::getSettingsNavigation());

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list