Exemple #1
0
 public function __construct()
 {
     parent::__construct();
     Config::set('auth.driver', 'adminauth');
     Asset::add('bootstrap', 'bundles/adminify/css/bootstrap.min.css');
     Asset::add('style', 'bundles/adminify/css/style.css');
 }
Exemple #2
0
 public function __construct()
 {
     // Asset::add('jquery.dropdown.css', 'css/jquery.dropdown.css');
     Asset::add('bootstrap', 'css/bootstrap.min.css');
     Asset::add('bootstrap-responsive', 'css/bootstrap-responsive.css');
     Asset::add('common', 'css/common.css');
     // Asset::add('style', 'css/style.css');
     Asset::add('fontawsome', 'css/fontawesome.css');
     Asset::add('flickcss', 'css/flick/jquery-ui-1.10.2.custom.css');
     Asset::add('jquery', 'js/jquery-1.9.1.js');
     Asset::add('jquery-migrate-1.1.1.js', 'js/jquery-migrate-1.1.1.js');
     Asset::add('bootstrap-js', 'js/bootstrap.js');
     Asset::add('jqueryui', 'js/jquery-ui-1.10.2.custom.min.js');
     Asset::add('jquery.tablesorter.js', 'js/jquery.tablesorter.js');
     Asset::add('jquery.tablesorter.pager.js', 'js/jquery.tablesorter.pager.js');
     // $files = glob("public/css/pikachoose/*.css", GLOB_BRACE);
     // foreach($files as $file)
     // {
     // 	Asset::add($file, substr($file, 7));
     // }
     if (Session::has('id') && Auth::check()) {
         $account = Account::find(Session::get('id'));
         if ($account->admin == 1) {
             Session::put('admin', '1');
         } else {
             Session::put('admin', '0');
         }
         if ($account->blocked == 1) {
             Session::put('alert', "Your account has been banned. Please contact the admin for more details");
             Session::forget('id');
             Auth::logout();
         } else {
         }
     }
 }
Exemple #3
0
 public function __construct()
 {
     /* Set the Language Based on Agent Browser */
     $languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
     $lang = substr($languages[0], 0, 2);
     App::setLocale($lang);
     /* Load Assets */
     Asset::add('bootstraptheme', 'assets/css/bootstrap-spacelab.css');
     Asset::add('bootstrapresponsive', 'assets/css/bootstrap-responsive.css');
     Asset::add('charisma', 'assets/css/charisma-app.css');
     Asset::add('uniform', 'assets/css/uniform.default.css');
     Asset::add('elfinder', 'assets/css/elfinder.min.css');
     Asset::add('opaicons', 'assets/css/opa-icons.css');
     Asset::add('famfam', 'assets/css/famfam.css');
     Asset::add('jqueryloadermin', 'assets/css/jquery.loader-min.css');
     Asset::add('reportula', 'assets/css/reportula.css');
     Asset::add('jquery', 'assets/js/jquery-2.0.3.min.js');
     Asset::add('datatables', 'assets/js/jquery.dataTables.min.js', 'jquery');
     Asset::add('jqueryloader', 'assets/js/jquery.loader-min.js', 'jquery');
     Asset::add('main', 'assets/js/main.js', 'TableTools');
     Asset::add('modal', 'assets/js/bootstrap-modal.js', 'jquery');
     /* Get Monolog instance from Laravel */
     $monolog = Log::getMonolog();
     /* Add the FirePHP handler */
     $monolog->pushHandler(new \Monolog\Handler\FirePHPHandler());
     /* Resolve Database Names Myslq and Postgres */
     if (Config::get('database.default') == 'mysql') {
         $this->tables = array('job' => 'Job', 'client' => 'Client', 'files' => 'Files', 'media' => 'Media', 'pool' => 'Pool', 'path' => 'Path', 'filename' => 'Filename', 'file' => 'File', 'jobfiles' => 'JobFiles', 'jobmedia' => 'JobMedia');
     } else {
         $this->tables = array('job' => 'job', 'client' => 'client', 'files' => 'files', 'media' => 'media', 'pool' => 'pool', 'path' => 'path', 'filename' => 'filename', 'file' => 'file', 'jobfiles' => 'jobfiles', 'jobmedia' => 'jobmedia');
     }
 }
Exemple #4
0
 /**
  * Edit an issue
  *
  * @return View
  */
 public function get_edit($tag_id)
 {
     Asset::add('spectrum-js', '/app/assets/js/spectrum.js', array('jquery'));
     Asset::add('spectrum-css', '/app/assets/css/spectrum.css');
     $tag = Tag::find($tag_id);
     return $this->layout->with('active', 'dashboard')->nest('content', 'tags.edit', array('tag' => $tag));
 }
Exemple #5
0
 public function __construct()
 {
     // add styles
     Asset::add('vendor-style', 'css/vendor.min.css', array(), '1.0', 'screen');
     Asset::add('eenvoud-style', 'css/style.min.css', array(), '1.0', 'screen');
     // // add scripts in footer
     Asset::add('vendor-scripts', 'js/vendor.min.js', ['jquery'], '1.0', false);
     Asset::add('eenvoud-scripts', 'js/scripts.min.js', ['jquery'], '1.0', false);
 }
Exemple #6
0
 public function __construct()
 {
     //Assets
     Asset::add('jquery', 'js/jquery-1.7.2.min.js');
     Asset::add('bootstrap-js', 'js/bootstrap.min.js');
     Asset::add('bootstrap-css', 'css/bootstrap.min.css');
     Asset::add('bootstrap-css-responsive', 'css/bootstrap-responsive.min.css', 'bootstrap-css');
     Asset::add('style', 'css/style.css');
     parent::__construct();
 }
Exemple #7
0
 public function __construct()
 {
     // POST and PUT methods should always have CSRF tokens
     $this->filter('before', 'csrf')->on(array('post', 'put'));
     // assets
     Asset::container('footer')->add('dojo', 'https://ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/dojo.js', array(), array('data-dojo-config' => 'async: true'));
     Asset::container('footer')->add('application-js', 'js/application.js');
     Asset::add('bootstrap-css', 'css/bootstrap.min.css');
     Asset::add('style', 'css/style.css');
     parent::__construct();
 }
Exemple #8
0
 public function __construct()
 {
     parent::__construct();
     $this->writeable_files[] = 'application' . DS . 'config' . DS . 'application.php';
     $this->writeable_files[] = 'application' . DS . 'config' . DS . 'database.php';
     $this->writeable_directories[] = basename(path('public')) . DS . 'bundles';
     $this->writeable_directories[] = basename(path('public')) . DS . 'themes';
     Asset::add('jquery', 'js/jquery.js')->bundle('install');
     Asset::add('installer', 'js/installer.js')->bundle('install');
     $this->layout->title = 'Sagui - Myopengrid Web Interface Installer';
 }
Exemple #9
0
 public function __construct()
 {
     Asset::add('style', 'css/style.css');
     Asset::add('glyphicons', 'css/glyphicons.css');
     Asset::add('jqueryui', 'css/jquery-ui.min.css');
     Asset::add('jqueryui_structure', 'css/jquery-ui.structure.min.css');
     Asset::add('jqueryui_theme', 'css/jquery-ui.theme.min.css');
     Asset::add('jquery', 'js/jquery.min.js');
     Asset::add('jquery_ui', 'js/jquery-ui.min.js');
     Asset::add('jshelper', 'js/jshelper.js');
     parent::__construct();
 }
 public function getRules()
 {
     // layouts variables
     $this->layout->title = 'Правила | Нещо Шантаво';
     $this->layout->canonical = 'https://neshto.shantavo.com/rules';
     $this->layout->robots = 'index,follow,noodp,noydir';
     $this->layout->description = 'Това са правилата на сайта';
     $this->layout->keywords = 'начало, нещо шантаво, team navy pier, правила';
     Asset::add('css/Login.css');
     // nesting the view into the layout
     $this->layout->nest('content', 'home.rules');
 }
Exemple #11
0
 public function __construct()
 {
     parent::__construct();
     Config::set('auth.driver', 'adminauth');
     Asset::add('bootstrap', 'bundles/adminify/css/bootstrap.min.css');
     Asset::add('style', 'bundles/adminify/css/style.css');
     Asset::add('jquery', 'http://code.jquery.com/jquery-latest.min.js');
     Asset::add('bootstrapjs', 'bundles/adminify/js/bootstrap.min.js');
     $this->layout->name = Config::get('adminify::settings.name');
     $this->layout->models = Adminify\Libraries\Helpers::getModels();
     $this->filter('before', 'auth');
 }
Exemple #12
0
 /**
  * Edit a issue
  *
  * @return View
  */
 public function get_edit()
 {
     Asset::add('tag-it-js', '/app/assets/js/tag-it.min.js', array('jquery', 'jquery-ui'));
     Asset::add('tag-it-css-base', '/app/assets/css/jquery.tagit.css');
     Asset::add('tag-it-css-zendesk', '/app/assets/css/tagit.ui-zendesk.css');
     /* Get tags as string */
     $issue_tags = '';
     foreach (Project\Issue::current()->tags as $tag) {
         $issue_tags .= (!empty($issue_tags) ? ',' : '') . $tag->tag;
     }
     return $this->layout->nest('content', 'project.issue.edit', array('issue' => Project\Issue::current(), 'issue_tags' => $issue_tags, 'project' => Project::current()));
 }
 public function getLogin()
 {
     if (!Auth::guest()) {
         return Redirect::secure('/');
     }
     // layouts variables
     $this->layout->title = 'Вход | Нещо Шантаво';
     $this->layout->canonical = 'https://neshto.shantavo.com/login';
     $this->layout->robots = 'noindex,nofollow,noodp,noydir';
     $this->layout->description = 'Това е логин форма';
     Asset::add('css/Login.css');
     // nesting the view into the layout
     $this->layout->nest('content', 'user.login');
 }
 public function getView($id)
 {
     $picture = Picture::where('id', '=', $id)->first();
     // layouts variables
     $this->layout->title = $picture->title . ' | Нещо Шантаво';
     $this->layout->canonical = 'https://neshto.shantavo.com/picture/' . $id;
     $this->layout->robots = 'index,follow,noodp,noydir';
     $this->layout->description = 'Шантава картинка, която ще разведри твоето настроение.';
     $this->layout->keywords = 'начало, нещо шантаво, team navy pier';
     // scripts for this view
     Asset::add('https://ws.sharethis.com/button/buttons.js');
     Asset::addScript('var disqus_config=function(){this.language="bg";};', 'footer');
     Asset::add('js/disqus.js');
     // nesting the view into the layout
     $this->layout->nest('content', 'picture.view', array('picture' => $picture));
 }
Exemple #15
0
 public function __construct()
 {
     parent::__construct();
     define('SOLDER_STREAM', 'DEV');
     define('SOLDER_VERSION', '0.6');
     Asset::add('jquery', 'js/jquery-1.10.2.js');
     Asset::add('bootstrap-js', 'js/bootstrap.min.js');
     Asset::add('bootstrap-css', 'css/bootstrap.min.css');
     Asset::add('font-awesome-css', 'font-awesome/css/font-awesome.css');
     Asset::add('sb-admin', 'css/sb-admin.css');
     Asset::add('metis-menu', 'js/plugins/metisMenu/jquery.metisMenu.js');
     Asset::add('sb-admin-js', 'js/sb-admin.js');
     Asset::add('datatables', 'js/plugins/dataTables/jquery.dataTables.js');
     Asset::add('datatables-bs', 'js/plugins/dataTables/dataTables.bootstrap.js');
     Asset::add('datatables-css', 'css/dataTables.bootstrap.css');
     Asset::add('slugify', 'js/jquery.slugify.js');
 }
Exemple #16
0
 public function __construct()
 {
     //js
     Asset::add('jquery', 'js/jquery-1.7.2.min.js');
     Asset::add('bootstrap-js', 'js/bootstrap.min.js', 'jquery');
     Asset::add('bootstrap-js-datepicker', 'js/bootstrap-datepicker.js', 'bootstrap-js');
     Asset::add('moment-js', 'js/moment.min.js');
     Asset::add('sapoc-js', 'js/sapoc.js', 'jquery');
     //css
     Asset::add('bootstrap-css', 'css/bootstrap.min.css');
     Asset::add('bootstrap-css-responsive', 'css/bootstrap-responsive.min.css', 'bootstrap-css');
     Asset::add('datepicker-css', 'css/datepicker.css', 'bootstrap-css');
     Asset::add('sapoc-css', 'css/sapoc.css', 'bootstrap-css');
     //Form macros
     Form::macro('date', function ($name) {
         return sprintf('<input type="text" name="%s" id="%s" class="%s">', $name, Config::get('application.date_class_js'));
     });
     parent::__construct();
 }
 public function __construct()
 {
     //JS
     Asset::add('//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.2/modernizr.min.js', 'header');
     Asset::add('/js/libs/cssua.min.js', 'header');
     Asset::add('//cdnjs.cloudflare.com/ajax/libs/pace/0.6.0/pace.min.js', 'header');
     Asset::add('//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js', 'footer');
     Asset::add('//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/jquery.magnific-popup.min.js', 'footer');
     Asset::add('//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.4.0/jquery.timeago.min.js', 'footer');
     Asset::add('/js/libs/jquery.timeago-pl.js', 'footer');
     Asset::add('/js/libs/placeholder.js', 'footer');
     Asset::add('/js/scripts.js', 'footer');
     //CSS
     Asset::add('//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css', 'header');
     Asset::add('//cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css', 'header');
     Asset::add('css/style.css', 'header');
     if (App::environment() == 'production') {
         Asset::$secure = true;
     }
 }
 public function __construct()
 {
     //Assets
     Asset::add('jquery', 'js/jquery-1.7.2.min.js');
     Asset::add('bootstrap-js', 'js/bootstrap.min.js');
     Asset::add('bootstrap-css', 'css/bootstrap.min.css');
     Asset::add('bootstrap-css-responsive', 'css/bootstrap-responsive.min.css', 'bootstrap-css');
     Asset::add('style', 'css/style.css');
     parent::__construct();
     //Filters
     $class = get_called_class();
     switch ($class) {
         case 'Home_Controller':
             $this->filter('before', 'nonauth');
             break;
         case 'User_Controller':
             $this->filter('before', 'nonauth')->only(array('authenticate'));
             $this->filter('before', 'auth')->only(array('logout'));
             break;
         default:
             $this->filter('before', 'auth');
             break;
     }
 }
Exemple #19
0
<?php

/**
 * Created by PhpStorm.
 * User: root
 * Date: 1/19/16
 * Time: 9:51 PM
 */
/*
 * Frontend asset
 * */
Asset::add('main-style', 'css/style.css', false, '0.1.1.45', 'all', 'style');
Asset::add('main-script', 'js/script.js', false, '1.0', false, 'script');
/*
 * Backend asset
 * */
Asset::add('admin-script', 'js/admin.js', false, '1.0', false, 'script')->to("admin");
Asset::add('ace-script', 'src/vendor/ace-builds/src-min-noconflict/ace.js', false, '1.0', false, 'script')->to('admin');
Exemple #20
0
 public function action_create()
 {
     Asset::add('jquery', 'js/jquery.slugify.js');
     return View::make('mod.create');
 }
Exemple #21
0
<?php

return array('home.index' => array('name' => 'home', function ($view) {
    Asset::add('style', 'css/style.css');
    Asset::add('jquery', 'js/jquery.min.js');
    Asset::add('main', 'js/main.js', 'jquery');
}));
 public function add_asset($filename, $path = null)
 {
     $base_path = path('public');
     // absolute path to public
     $theme_path_relative = $this->_theme_path;
     $theme = $this->_theme_name;
     //directory path set
     if ($path == NULL) {
         $directory = $theme_path_relative . '/' . $theme . '/assets/';
     } else {
         $directory = $path;
     }
     if (ends_with($filename, ".js")) {
         $asset_file_path = $directory . "js/" . $filename;
     }
     if (ends_with($filename, ".css")) {
         $asset_file_path = $directory . "css/" . $filename;
     }
     if (isset($asset_file_path)) {
         //register the asset file into the template
         Asset::add($filename, $asset_file_path);
     }
 }
 public function __construct()
 {
     parent::__construct();
     Asset::add('/js/libs/jquery.dropdown.js', 'footer');
 }
 public function loop()
 {
     Asset::add('masonry', 'js/masonry.pkgd.min.js', false, '1.0', false, 'script');
     Asset::add('imagesloaded', 'js/imagesloaded.pkgd.min.js', false, '1.0', false, 'script');
     return View::make('partials.product.loop', ['products' => ProductModel::all()])->render();
 }
<?php

Asset::add('styles', 'css/main.css');
Asset::add('googlemap', 'http://maps.google.com/maps/api/js?sensor=false');
Exemple #26
0
<?php

/**
 *  Asset Plugin
 *
 *  @package Morfy
 *  @subpackage Plugins
 *  @author Pavel Belousov / pafnuty
 *  @version 1.0.0
 *  @license https://github.com/pafnuty/morfy-plugin-asset/blob/master/LICENSE MIT
 */
require_once PLUGINS_PATH . '/asset/asset.class.php';
Action::add('asset_folder', function (array $folders = array(), array $excludes = array()) {
    $assetConfig = Config::get('plugins.asset');
    $folders = array_unique(array_filter(array_merge($folders, (array) $assetConfig['folders'])));
    $excludes = array_unique(array_filter(array_merge($excludes, (array) $assetConfig['excludes'])));
    foreach ($folders as $k => $folder) {
        $folders[$k] = '/themes/' . Config::get('system.theme') . $folder;
    }
    Asset::add($folders, $excludes);
});
Action::add('asset_file', function ($fileName = '', $attributes = '') {
    if ($fileName != '') {
        $fileName = '/themes/' . Config::get('system.theme') . $fileName;
        Asset::addFile($fileName, $attributes);
    }
});
Exemple #27
0
<?php

return array('before' => function () {
    // Do stuff before every request to your application.
    Asset::add('bootsrap', 'css/bootstrap.min.css');
    Asset::add('mycss', 'css/my.css');
    Asset::add('jquery', 'js/jquery.js');
}, 'after' => function ($response) {
    // Do stuff after every request to your application.
}, 'auth' => function () {
    if (Auth::guest()) {
        return Redirect::to_login();
    }
}, 'csrf' => function () {
    if (Request::forged()) {
        return Response::error('500');
    }
});
Exemple #28
0
 /**
  * Catch-all method for requests that can't be matched.
  *
  * @param  string    $method
  * @param  array     $parameters
  * @return Response
  */
 public function __construct()
 {
     //Assets
     Asset::add('style', 'css/style.css');
     parent::__construct();
 }
 /**
  * Modpack Edit Interface
  * @param  Integer $modpack_id Modpack ID
  * @return View
  */
 public function action_edit($modpack_id)
 {
     if (empty($modpack_id)) {
         return Redirect::to('dashboard');
     }
     $modpack = Modpack::find($modpack_id);
     if (empty($modpack_id)) {
         return Redirect::to('dashboard');
     }
     Asset::add('jquery', 'js/jquery.slugify.js');
     return View::make('modpack.edit')->with(array('modpack' => $modpack));
 }
 public function __construct()
 {
     parent::__construct();
     Asset::add('document-js', URL::to('media/backend/js/document.js'));
 }