From 2c3b5ff0c30662ca742e455b178fce15e920ee0f Mon Sep 17 00:00:00 2001 From: Mischosch Date: Thu, 29 Nov 2012 17:05:45 +0100 Subject: [PATCH] only include bootstrap css file from twitter, if user configures it in his setup - see issue #2 --- README.md | 9 +++++++-- library/Controller.php | 13 ++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 52aa25a..5fe2cb7 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ WORK IN PROGRESS [twitter bootstrap]: https://github.com/twitter/bootstrap/tags + Use your own bootstrap css files or enable $bootstrapIntegration = true within setup. + It will include http://twitter.github.com/bootstrap/assets/css/bootstrap.css then. + But we cannot guarantee, that this version will match with the version we use (2.2.1). + ### Installation Add `lagged/Zf_Crud` to your `composer.json`! @@ -28,7 +32,8 @@ Add `lagged/Zf_Crud` to your `composer.json`! protected $title = 'My Interface'; // Optional protected $dbAdapter = 'db'; - protected $count = 15; - protected $bulkDelete = false; + protected $count = 15; + protected $bulkDelete = true; + protected $bootstrapIntegration = true; } diff --git a/library/Controller.php b/library/Controller.php index e5f18e2..40f60e6 100644 --- a/library/Controller.php +++ b/library/Controller.php @@ -100,6 +100,11 @@ abstract class Controller extends \Zend_Controller_Action */ protected $bulkDelete = false; + /** + * @var bool $bootstrapIntegration Add Bootstrap css from twitter + */ + protected $bootstrapIntegration = false; + /** * Init @@ -119,9 +124,11 @@ public function init() $this->_initSession(); - $this->view->headLink()->appendStylesheet( - 'http://twitter.github.com/bootstrap/assets/css/bootstrap-1.2.0.min.css' - ); + if (true === $this->bootstrapIntegration) { + $this->view->headLink()->appendStylesheet( + 'http://twitter.github.com/bootstrap/assets/css/bootstrap.css' + ); + } $this->view->assign('ui_title', $this->title);