public static function add_packages($pkgs) { if (self::$pkgs === null) { self::$pkgs = array(); } foreach ($pkgs as $pkg_tag => $pkg_data) { if (!isset($pkg_data['scripts'])) { continue; } self::$pkgs[$pkg_tag] = $pkg_data; } }
public static function init() { if (isset(Kohana::$environment)) { self::$env = Kohana::$environment; } Cache::$default = 'default'; Sourcemap_JS::add_packages(isset(Kohana::config('js')->packages) ? Kohana::config('js')->packages : array()); //Sourcemap_JS::$bundle = self::$env == self::DEV ? false : true; Sourcemap_JS::$bundle = false; Sourcemap_JS::$minified = self::$env == self::DEV ? false : true; Sourcemap_JS::$bundle_path = 'assets/scripts/bundles/' . self::site() . '/'; Sourcemap_CSS::$convert_less = self::$env == self::DEV ? false : true; // Use db for session storage Session::$default = 'database'; }
</div> </div> <div id="admin-head" class="container"> <p><?php echo Breadcrumbs::instance()->get() ? Breadcrumbs::instance()->render() : false; ?> </p> </div> </div> <div id="wrapper"> <?php echo isset($content) ? $content : '<h2>There\'s nothing here.</h2>'; ?> <div class="push"></div> </div><!-- #wrapper --> <div id="footer"> <?php echo View::factory('partial/footer', array('page_title' => isset($page_title) ? $page_title : APPLONGNM)); ?> </div> <?php echo isset($scripts) ? Sourcemap_JS::script_tags($scripts) : Sourcemap_JS::script_tags('less', 'sourcemap-core'); ?> <!--[if lt IE 7 ]> <script src="js/libs/dd_belatedpng.js"></script> <script> DD_belatedPNG.fix('img, .png_bg'); <![endif]--> </html>
<link rel="image_src" href="assets/images/favicon-large.png"> <?php echo isset($styles) ? Sourcemap_CSS::link_tags($styles) : ''; ?> </head> <body id="embedded-supplychain"> <?php echo $content; ?> <?php echo isset($scripts) ? Sourcemap_JS::script_tags($scripts) : ''; ?> <!--[if lt IE 7 ]> <script src="js/libs/dd_belatedpng.js"></script> <script> DD_belatedPNG.fix('img, .png_bg'); <![endif]--> <script> Sourcemap.embed_supplychain_id = <?php echo isset($supplychain_id) ? $supplychain_id : '"null"'; ?> ; Sourcemap.embed_params = <?php echo isset($embed_params) ? json_encode($embed_params) : '{}'; ?>