You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2015/09/30 00:05:26 UTC
airavata-php-gateway git commit: Implementation of multiple pages for
a theme
Repository: airavata-php-gateway
Updated Branches:
refs/heads/master 014bbe926 -> 72d9c66eb
Implementation of multiple pages for a theme
Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/72d9c66e
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/72d9c66e
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/72d9c66e
Branch: refs/heads/master
Commit: 72d9c66eb5bffa3831263a4653bef276970cac8c
Parents: 014bbe9
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Sep 29 18:05:06 2015 -0400
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Sep 29 18:05:06 2015 -0400
----------------------------------------------------------------------
app/config/pga_config.php.template | 14 +++++++++++++-
app/controllers/BaseController.php | 7 ++++---
app/routes.php | 6 ++++++
app/views/pages.blade.php | 8 ++++++++
4 files changed, 31 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/72d9c66e/app/config/pga_config.php.template
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
index ee84f13..b5b1d43 100644
--- a/app/config/pga_config.php.template
+++ b/app/config/pga_config.php.template
@@ -172,6 +172,18 @@ return array(
* Life time of app catalog data cache in minutes
*/
'app-catalog-cache-duration' => 5
- ]
+ ],
+ /**
+ * *****************************************************************
+ * Theme Related Configurations
+ * *****************************************************************
+ */
+ 'theme' => [
+ /**
+ * Set the name of theme in use here
+ */
+ 'name' => 'base'
+
+ ]
);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/72d9c66e/app/controllers/BaseController.php
----------------------------------------------------------------------
diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php
index f8b3724..e4c3ea7 100755
--- a/app/controllers/BaseController.php
+++ b/app/controllers/BaseController.php
@@ -9,9 +9,10 @@ class BaseController extends Controller {
*/
protected function setupLayout()
{
- //set your chosen theme here. default is basic.
- $theme = Theme::uses("base");
- Session::put( "theme", "base");
+ //Theme gets set baesd on the one chosen in pga_config. default is basic.
+ $themeName = Config::get('pga_config.theme')['name'];
+ //$theme = Theme::uses( $themeName);
+ Session::put( "theme", $themeName);
if ( ! is_null($this->layout))
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/72d9c66e/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index 361291a..7e1a83c 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -11,6 +11,12 @@
|
*/
+/*
+* Theme Pages Routes
+*/
+Route::get( "pages/{theme_view}", function( $theme_view){
+ return View::make("pages", array("page" => $theme_view) );
+});
/*
* User Routes
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/72d9c66e/app/views/pages.blade.php
----------------------------------------------------------------------
diff --git a/app/views/pages.blade.php b/app/views/pages.blade.php
new file mode 100644
index 0000000..0ab51ff
--- /dev/null
+++ b/app/views/pages.blade.php
@@ -0,0 +1,8 @@
+@extends('layout.basic')
+
+@section('content')
+<?php
+ $theme = Theme::uses( Session::get("theme"));
+ echo $theme->partial( $page);
+?>
+@stop