コード例 #1
0
ファイル: Frontend.php プロジェクト: ktrzos/plethora
 /**
  * Costructor.
  *
  * @access     public
  * @since      1.0.0-alpha
  * @version    1.0.0-alpha
  */
 public function __construct()
 {
     // initialize theme
     Theme::initFrontend();
     // parent consturctor
     parent::__construct();
 }
コード例 #2
0
ファイル: Frontend.php プロジェクト: ktrzos/plethora
 /**
  * Costructor.
  *
  * @access     public
  * @since      1.0.0-alpha
  * @version    1.0.0-alpha
  */
 public function __construct()
 {
     // initialize theme
     Theme::initFrontend();
     // parent consturctor
     parent::__construct();
     // add CSS & JS files for all subpages
     $this->addCssByTheme('/packages/bootstrap/css/bootstrap.css', '_common');
     $this->addJsByTheme('/js/jquery-2.1.3.min.js', '_common');
     $this->addJsByTheme('/js/jquery-ui.min.js', '_common');
     $this->addJsByTheme('/packages/bootstrap/js/bootstrap.min.js', '_common');
     // add first breadcrumb
     $frontPageURL = Route::factory('home')->url();
     $this->addBreadCrumb(__('Front page'), $frontPageURL);
 }
コード例 #3
0
ファイル: BackendAdminLte.php プロジェクト: ktrzos/plethora
 /**
  * Constructor.
  *
  * @access   public
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function __construct()
 {
     # initialize theme
     Theme::initBackend();
     # call parent
     parent::__construct();
     if ($this->sModel !== NULL) {
         $this->setModel(new $this->sModel());
     }
     if (!User::isLogged() || !\UserPermissions::hasPerm(static::PERM_ADMIN_ACCESS)) {
         Route::factory('home')->redirectTo();
     }
     // set body classes
     $this->addBodyClass('skin-red');
     // add main breadcrumbs and title
     $this->alterBreadcrumbsTitleMain();
     // reset JavaScripts and CSS
     $this->resetCss();
     $this->resetJs();
     // add CSS and JavaScript files
     $this->addCss('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&subset=latin,latin-ext');
     $this->addCss('https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css');
     $this->addCss('https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css');
     $this->addCssByTheme('/bootstrap/css/bootstrap.min.css');
     $this->addCssByTheme('/css/backend.css');
     $this->addJsByTheme('/plugins/jQuery/jQuery-2.1.4.min.js');
     $this->addJsByTheme('/plugins/jQueryUI/jquery-ui.min.js');
     $this->addJsByTheme('/bootstrap/js/bootstrap.min.js');
     $this->addJsByTheme('/js/backend.js');
     $this->addJsByTheme('/js/jquery.mjs.nestedSortable.js');
     $this->addJsByTheme('/js/app.min.js');
     $this->addJsByTheme('/js/backend_after_theme_load.js');
     # add viewport
     $this->addMetaTagRegular('viewport', 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no');
     // generate menu
     $menuView = $this->generateMenu();
     $this->oViewBody->bind('menu', $menuView);
 }
コード例 #4
0
ファイル: header.php プロジェクト: ktrzos/plethora
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand navbar-brand-logo"
               href="<?php 
echo Route::factory('home')->url();
?>
"
               title="<?php 
echo __('Main page');
?>
">
                <img
                    src="<?php 
echo Router::getBase() . '/' . Theme::getThemePath();
?>
/images/navbar_logo.png"
                    alt="<?php 
echo \Plethora\Core::getAppName();
?>
" />
            </a>
            <a class="navbar-brand"
               href="<?php 
echo Route::factory('home')->url();
?>
"
               title="<?php 
echo __('Main page');
?>
コード例 #5
0
ファイル: Backend.php プロジェクト: ktrzos/plethora
 /**
  * Constructor.
  *
  * @access   public
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function __construct()
 {
     // initialize theme
     Theme::initBackend();
     parent::__construct();
     if ($this->sModel !== NULL) {
         $this->setModel(new $this->sModel());
     }
     if (!User::isLogged() || !\UserPermissions::hasPerm(static::PERM_ADMIN_ACCESS)) {
         Route::factory('home')->redirectTo();
     }
     //
     //        // add main breadcrumbs and title
     //        $this->alterBreadcrumbsTitleMain();
     //
     //        // add CSS and JavaScript files
     //        $this->addCss('/themes/_common/packages/bootstrap/css/bootstrap.min.css');
     //        $this->addCss('/themes/_common/packages/bootstrap/css/bootstrap-sticky-footer-navbar.css');
     //        $this->addJs('/themes/_common/js/jquery-2.1.3.min.js');
     //        $this->addJs('/themes/_common/js/jquery-ui.min.js');
     //        $this->addJs('/themes/_common/packages/bootstrap/js/bootstrap.min.js');
     //        $this->addJs('/themes/_common/js/global/framework.js');
     //
     //        $this->addCssByTheme('/css/backend.css');
     //        $this->addJsByTheme('/js/jquery.mjs.nestedSortable.js');
     //        $this->addJsByTheme('/js/backend.js');
 }
コード例 #6
0
ファイル: Controller.php プロジェクト: ktrzos/plethora
 /**
  * Add new JavaScript file.
  *
  * @access   public
  * @param    string $value
  * @param    string $theme
  * @return   Controller
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function addJsByTheme($value, $theme = NULL)
 {
     if ($theme === NULL) {
         $theme = Theme::getTheme();
     }
     $toAdd = '/themes/' . $theme . $value;
     if (!in_array($toAdd, $this->js)) {
         $this->js[] = $toAdd;
     }
     return $this;
 }
コード例 #7
0
ファイル: Frontend.php プロジェクト: ktrzos/plethora
 /**
  * Constructor.
  *
  * @access     public
  * @since      1.0.0-alpha
  * @version    1.0.0-alpha
  */
 public function __construct()
 {
     parent::__construct();
     Theme::initFrontend();
 }