public function get_edit($id)
 {
     //SORTING
     Asset::container('footer')->add('sortable', 'bundles/cms/js/jquery.sortable.js', 'jquery');
     Asset::container('footer')->add('serialize', 'bundles/cms/js/jquery.serializetree.js', 'sortable');
     //LOAD FANCYBOX LIBS
     Asset::container('header')->add('fancyboxcss', 'bundles/cms/css/fancybox.css', 'main');
     Asset::container('footer')->add('fancybox', 'bundles/cms/js/jquery.fancybox.js', 'jquery');
     //DATETIME PICKER
     Asset::container('header')->add('jqueryuicss', 'bundles/cms/css/jquery.ui.css', 'main');
     if (LANG !== 'en') {
         Asset::container('footer')->add('local', 'bundles/cms/js/i18n/jquery.ui.datepicker-' . LANG . '.js', 'jquery');
     }
     Asset::container('footer')->add('datepicker', 'bundles/cms/js/jquery.datepicker.js', 'local');
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('banner', 'bundles/cms/js/sections/banner_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.banner_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     //GET BANNER DATA
     $banner = CmsBanner::with(array('files'))->find($id);
     //GET FILE DATA
     $files = CmsFile::where_is_image(1)->where_is_valid(1)->order_by('name', 'asc')->order_by('id', 'asc')->paginate(Config::get('cms::settings.pag'));
     $this->layout->content = View::make('cms::interface.pages.banner_new_edit')->with('title', LL('cms::title.banner_edit', CMSLANG))->with('banner_id', $id)->with('banner_lang', $banner->lang)->with('banner_name', $banner->name)->with('files', $files)->with('files_select', $banner->files);
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     Config::set('auth.driver', 'adminauth');
     Asset::container('header')->bundle('admin');
     Asset::container('header')->add('bootstrap', 'css/bootstrap.min.css');
 }
 public function get_edit($id)
 {
     //SORTING
     Asset::container('footer')->add('sortable', 'bundles/cms/js/jquery.sortable.js', 'jquery');
     Asset::container('footer')->add('serialize', 'bundles/cms/js/jquery.serializetree.js', 'sortable');
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('files', 'bundles/cms/js/sections/menus_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.menu_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     //GET MENU DATA
     $menu = CmsMenu::find($id);
     //GET PAGE DATA
     $data = CmsPage::with(array('menus'))->where_lang($menu->lang)->where_parent_id(0)->order_by('lang', 'asc')->order_by('is_home', 'desc')->order_by('order_id', 'asc')->get();
     $new_data = array();
     foreach ($data as $obj) {
         $new_data[$obj->id] = $obj;
         $recursive = call_user_func_array('CmsPage::recursive_menuspages', array($obj->id));
         $new_data = $new_data + $recursive;
     }
     if (empty($new_data)) {
         $new_data = array();
     }
     //GET PAGES IN MENU
     $pages = CmsMenu::find($id)->pages;
     $this->layout->content = View::make('cms::interface.pages.menu_new_edit')->with('title', LL('cms::title.menu_edit', CMSLANG))->with('menu_id', $id)->with('menu_name', $menu->name)->with('menu_lang', $menu->lang)->with('menu_is_nested', (bool) $menu->is_nested)->with('menu_parent_start', CmsPage::select_top_slug($menu->lang, 0, true))->with('menu_parent_start_selected', $menu->parent_start)->with('pages', $pages)->with('menu_pages', $new_data);
 }
Beispiel #4
0
 public function __construct()
 {
     parent::__construct();
     Config::set('auth.driver', 'dojoauth');
     Asset::container('header')->bundle('dojo');
     Asset::container('header')->add('bootstrap', 'css/bootstrap.min.css');
     //Asset::container('header')->add('bootstrap','css/bootstrap-responsive.min.css');
     Asset::container('header')->add('login', 'css/login.css');
 }
Beispiel #5
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();
 }
 public function get_edit($id)
 {
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('users', 'bundles/cms/js/sections/users_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.users_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     //GET PAGE DATA
     $user = CmsUser::find($id);
     $this->layout->content = View::make('cms::interface.pages.user_new_edit')->with('title', LL('cms::title.users_edit', CMSLANG))->with('user_id', $id)->with('user_username', $user->username)->with('user_email', $user->email)->with('user_role', CmsRole::select_user_roles())->with('user_role_selected', $user->role_id)->with('user_lang', Config::get('cms::settings.interface'))->with('user_lang_selected', $user->lang)->with('user_is_valid', (bool) $user->is_valid);
 }
 public function get_edit($id)
 {
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('users', 'bundles/cms/js/sections/users_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.users_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     //GET PAGE DATA
     $user = CmsUser::find($id);
     $has_details = !is_null($user->details);
     $this->layout->content = View::make('cms::interface.pages.user_new_edit')->with('title', LL('cms::title.users_edit', CMSLANG))->with('user_id', $id)->with('user_username', $user->username)->with('user_email', $user->email)->with('user_role', CmsRole::select_user_roles())->with('user_role_selected', $user->role_id)->with('user_lang', Config::get('cms::settings.interface'))->with('user_lang_selected', $user->lang)->with('user_editor', Config::get('cms::settings.editor'))->with('user_editor_selected', $user->editor)->with('user_is_valid', (bool) $user->is_valid)->with('detail_id', $has_details ? $user->details->id : '')->with('user_name', $has_details ? $user->details->name : '')->with('user_surname', $has_details ? $user->details->surname : '')->with('user_address', $has_details ? $user->details->address : '')->with('user_info', $has_details ? $user->details->info : '')->with('user_number', $has_details ? $user->details->number : '')->with('user_city', $has_details ? $user->details->city : '')->with('user_zip', $has_details ? $user->details->zip : '')->with('user_state', $has_details ? $user->details->state : '')->with('user_country', $has_details ? $user->details->country : '')->with('user_tel', $has_details ? $user->details->tel : '')->with('user_cel', $has_details ? $user->details->cel : '');
 }
Beispiel #8
0
 public function __construct()
 {
     parent::__construct();
     // Bootstrap CSS Framework
     Asset::container('header')->bundle('flyswatter');
     Asset::container('header')->add('bootstrap', 'css/bootstrap.min.css');
     Asset::container('header')->add('bootstrap-responsive', 'css/bootstrap-responsive.min.css');
     Asset::container('header')->add('flyswatter', 'css/flyswatter.css');
     // jQuery & Bootstrap JS Frameworks
     Asset::container('footer')->bundle('flyswatter');
     Asset::container('footer')->add('jquery', 'http://code.jquery.com/jquery-latest.min.js');
     Asset::container('footer')->add('bootstrapjs', 'js/bootstrap.min.js');
 }
 public function get_edit($id)
 {
     //SORTING
     Asset::container('footer')->add('sortable', 'bundles/cms/js/jquery.sortable.js', 'jquery');
     Asset::container('footer')->add('serialize', 'bundles/cms/js/jquery.serializetree.js', 'sortable');
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('files', 'bundles/cms/js/sections/download_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.download_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     //GET DOWNLOAD DATA
     $download = CmsDownload::with(array('files'))->find($id);
     $this->layout->content = View::make('cms::interface.pages.download_new_edit')->with('title', LL('cms::title.download_edit', CMSLANG))->with('download_id', $id)->with('download_name', $download->name)->with('files', $download->files);
 }
Beispiel #10
0
 public function __construct()
 {
     parent::__construct();
     Config::set('auth.driver', 'adminauth');
     Asset::container('header')->bundle('adminify');
     Asset::container('header')->add('bootstrap', 'css/bootstrap.min.css');
     Asset::container('header')->add('style', 'css/style.css');
     Asset::container('footer')->bundle('adminify');
     Asset::container('footer')->add('jquery', 'http://code.jquery.com/jquery-latest.min.js');
     Asset::container('footer')->add('bootstrapjs', 'js/bootstrap.min.js');
     $this->layout->name = Config::get('adminify::settings.name');
     $this->layout->models = Adminify\Libraries\Helpers::getModels();
     $this->filter('before', 'auth');
 }
 public function get_index($lang_to = 'en')
 {
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('translations', 'bundles/cms/js/sections/translations_list.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.translations', CMSLANG));
     $this->layout->top_data = array('search' => false);
     $langs = CmsPage::select_lang_translation();
     $my_lang = LANG;
     array_shift($langs);
     //GET DATA
     $data = CmsTranslation::where('lang_from', '=', $my_lang)->where('lang_to', '=', $lang_to)->order_by('word', 'asc')->get();
     $this->layout->content = View::make('cms::interface.pages.translation_list')->with('langs', $langs)->with('lang_from', $my_lang)->with('lang_to', $lang_to)->with('data', $data);
 }
Beispiel #12
0
 public function post_results()
 {
     $rules = array('sample' => 'required|image');
     //Validate input
     $validation = Validator::make(Input::all(), $rules);
     if ($validation->fails()) {
         return Redirect::back()->with_errors($validation)->with_input();
     }
     $url = array();
     //save files if exists
     foreach (array('sample', 'control') as $image) {
         if (File::exists(Input::file($image . '.tmp_name'))) {
             $name = Input::file($image . '.name');
             $ext = strtolower(File::extension($name));
             $url[$image] = $this->upload_path . '/' . $image . "." . $ext;
             $url[$image] = $this->image_url . '/' . $image . "." . $ext;
             Input::upload($image, $this->upload_path, $image . "." . $ext);
         }
     }
     //end foreach
     //analyze images submitted
     $litmus = new Litmus($this->LITMUS_ACCOUNT, $this->LITMUS_TOKEN);
     if (isset($url['sample'])) {
         $litmus->set_sample_url($url['sample']);
     }
     if (isset($url['control'])) {
         $litmus->set_control_url($url['control']);
     }
     if (Input::has('scale_id')) {
         $litmus->set_scale_id(Input::get('scale_id'));
     }
     $response = $litmus->analyze();
     if ($response->status == 'error') {
         echo $response->message;
         exit;
     }
     //recursive function for outputting a heirarchial data tree
     $string = "<ul>" . Mockup\Util::recursiveTree($response) . "</ul>";
     $data = array();
     $data['title'] = "Image Analysis";
     $data['lead'] = "Response from Litmus API";
     $tabs = array(array('Swatch', '#swatch', 'active'), array('Code', '#code'));
     $data['tabs'] = View::make('mockup::partials.tabs')->with('tabs', $tabs)->render();
     $data['code'] = $string;
     $data['response'] = $response;
     Asset::container('scripts')->add('colorbox', 'bundles/mockup/assets/js/colorbox.js');
     return View::make('mockup::pages.result', $data);
 }
 public function get_edit($id)
 {
     //SORTING
     Asset::container('footer')->add('sortable', 'bundles/cms/js/jquery.sortable.js', 'jquery');
     Asset::container('footer')->add('serialize', 'bundles/cms/js/jquery.serializetree.js', 'sortable');
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('files', 'bundles/cms/js/sections/download_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.download_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     //GET DOWNLOAD DATA
     $download = CmsDownload::with(array('files'))->find($id);
     //GET FILE DATA
     $files = CmsFile::where_is_image(0)->where_is_valid(1)->order_by('name', 'asc')->order_by('id', 'asc')->paginate(Config::get('cms::settings.pag'));
     $this->layout->content = View::make('cms::interface.pages.download_new_edit')->with('title', LL('cms::title.download_edit', CMSLANG))->with('download_id', $id)->with('download_name', $download->name)->with('files', $files)->with('files_select', $download->files);
 }
 public function get_index()
 {
     $analytics = Config::get('cms::settings.analytics.profile_id');
     if (!empty($analytics)) {
         //LOAD JS LIBS
         Asset::container('footer')->add('flot', 'bundles/cms/js/jquery.flot.js', 'jquery');
         Asset::container('footer')->add('blog', 'bundles/cms/js/sections/dashboard_list.js', 'cms');
     }
     $this->layout->header_data = array('title' => 'Dashboard');
     $this->layout->top_data = array('search' => false);
     $files = CmsUtility::mediasize(0);
     $images = CmsUtility::mediasize(1);
     $thumbs = CmsUtility::pathsize(path('public'), Config::get('cms::settings.data') . 'img/thumb/');
     $cache = CmsUtility::pathsize(path('storage'), 'cache/');
     $total = $files + $images + $thumbs + $cache;
     $this->layout->content = View::make('cms::interface.pages.dashboard')->with('files', $files)->with('images', $images)->with('thumbs', $thumbs)->with('cache', $cache)->with('total', $total);
 }
 public function get_edit($id)
 {
     //SORTING
     Asset::container('footer')->add('sortable', 'bundles/cms/js/jquery.sortable.js', 'jquery');
     Asset::container('footer')->add('serialize', 'bundles/cms/js/jquery.serializetree.js', 'sortable');
     //LOAD FANCYBOX LIBS
     Asset::container('header')->add('fancyboxcss', 'bundles/cms/css/fancybox.css', 'main');
     Asset::container('footer')->add('fancybox', 'bundles/cms/js/jquery.fancybox.js', 'jquery');
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('files', 'bundles/cms/js/sections/gallery_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.gallery_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     //GET GALLERY DATA
     $gallery = CmsGallery::with(array('files'))->find($id);
     $this->layout->content = View::make('cms::interface.pages.gallery_new_edit')->with('title', LL('cms::title.gallery_edit', CMSLANG))->with('gallery_id', $id)->with('gallery_name', $gallery->name)->with('gallery_thumb', $gallery->thumb)->with('gallery_thumbs', CmsGallery::select_thumb())->with('files', $gallery->files);
 }
 public function get_edit($id)
 {
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('pages', 'bundles/cms/js/sections/roles_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.role_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     if (!empty($id)) {
         //GET ROLE DATA
         $role = CmsRole::find($id);
         if (!empty($role)) {
             $this->layout->content = View::make('cms::interface.pages.role_new_edit')->with('title', LL('cms::title.role_edit', CMSLANG))->with('role_id', $id)->with('role_name', $role->name)->with('role_level', CmsRole::select_levels())->with('role_level_selected', $role->level);
         } else {
             $this->layout->content = View::make('cms::interface.pages.not_found')->with('message', LL('cms::alert.not_found', CMSLANG));
         }
     } else {
         $this->layout->content = View::make('cms::interface.pages.not_found')->with('message', LL('cms::alert.not_found', CMSLANG));
     }
 }
 public function get_edit($id)
 {
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('tags', 'bundles/cms/js/sections/tag_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.tag_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     if (!empty($id)) {
         //GET TAG DATA
         $tag = CmsTag::find($id);
         if (!empty($tag)) {
             $this->layout->content = View::make('cms::interface.pages.tag_new_edit')->with('title', LL('cms::title.tag_edit', CMSLANG))->with('tag_id', $id)->with('tag_lang', $tag->lang)->with('tag_name', $tag->name);
         } else {
             $this->layout->content = View::make('cms::interface.pages.not_found')->with('message', LL('cms::alert.not_found', CMSLANG));
         }
     } else {
         $this->layout->content = View::make('cms::interface.pages.not_found')->with('message', LL('cms::alert.not_found', CMSLANG));
     }
 }
Beispiel #18
0
 public function __construct()
 {
     parent::__construct();
     Config::set('auth.driver', 'dojoauth');
     Asset::container('header')->bundle('dojo');
     Asset::container('header')->add('bootstrap', 'css/bootstrap.css');
     Asset::container('header')->add('boostrapresponsive', 'css/bootstrap-responsive.css');
     Asset::container('header')->add('changelists', 'css/changelists.css');
     Asset::container('header')->add('commons', 'css/commons.css');
     Asset::container('header')->add('redactor', 'css/redactor.css');
     Asset::container('footer')->bundle('dojo');
     Asset::container('footer')->add('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js');
     Asset::container('footer')->add('jqueryui', 'http://code.jquery.com/ui/1.10.0/jquery-ui.js');
     Asset::container('footer')->add('bootstrap', 'js/bootstrap.min.js');
     Asset::container('footer')->add('redactorjs', 'js/redactor.min.js');
     $this->filter('before', 'auth');
     $this->filter('before', 'csrf')->on('post,put');
 }
 public function get_edit($id)
 {
     //LOAD FANCYBOX LIBS
     Asset::container('header')->add('fancyboxcss', 'bundles/cms/css/fancybox.css', 'main');
     Asset::container('footer')->add('fancybox', 'bundles/cms/js/jquery.fancybox.js', 'jquery');
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('files', 'bundles/cms/js/sections/files_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.file_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     //GET FILE DATA
     $file = CmsFile::with(array('pages', 'filetexts' => function ($query) {
         $query->where('lang', '=', LANG);
     }))->where_id($id)->first();
     if (!empty($file->filetexts)) {
         foreach ($file->filetexts as $text) {
             $filetext_alt = !empty($text) ? $text->alt : '';
             $filetext_title = !empty($text) ? $text->title : '';
             $filetext_caption = !empty($text) ? $text->caption : '';
             $filetext_label = !empty($text) ? $text->label : '';
         }
     } else {
         $filetext_alt = '';
         $filetext_title = '';
         $filetext_caption = '';
         $filetext_label = '';
     }
     //GET PAGE DATA
     $data = CmsPage::with(array('files'))->where_parent_id(0)->order_by('lang', 'asc')->order_by('is_home', 'desc')->order_by('order_id', 'asc')->get();
     //GET SITEMAP ORDER
     $new_data = array();
     foreach ($data as $obj) {
         $new_data[$obj->id] = $obj;
         $recursive = call_user_func_array('CmsPage::recursive_filespages', array($obj->id));
         $new_data = $new_data + $recursive;
     }
     if (empty($new_data)) {
         $new_data = array();
     }
     $this->layout->content = View::make('cms::interface.pages.file_edit')->with('title', LL('cms::title.file_edit', CMSLANG))->with('file_id', $id)->with('is_image', (bool) $file->is_image)->with('file_path', $file->path)->with('file_name', $file->name)->with('file_thumb', $file->thumb)->with('file_ext', $file->ext)->with('file_pages', $new_data)->with('langs', Config::get('cms::settings.langs'))->with('filetext_title', $filetext_title)->with('filetext_alt', $filetext_alt)->with('filetext_caption', $filetext_caption)->with('filetext_label', $filetext_label);
 }
 public function action_search_tag()
 {
     $auth = Auth::check();
     if ($auth and is_numeric(AUTHORID)) {
         //LOAD JS LIBS
         Asset::container('footer')->add('ias', 'bundles/cms/js/jquery.ias.js', 'jquery');
         Asset::container('footer')->add('tags', 'bundles/cms/js/sections/tag_list.js', 'cms');
         if (Input::has('q')) {
             $q = Input::get('q');
             $this->layout->header_data = array('title' => $q);
             $this->layout->top_data = array('search' => '/cms/tag/search', 'q' => $q);
             //GET PAGE DATA
             $data = CmsTag::where('name', 'LIKE', '%' . $q . '%')->order_by('name', 'asc')->paginate(Config::get('cms::settings.pag'));
             $this->layout->content = View::make('cms::interface.pages.tag_list')->with('lang', '')->with('data', $data);
         } else {
             $this->layout->header_data = array('title' => LL('cms::title.users', CMSLANG));
             $this->layout->top_data = array('search' => '/cms/tag/search', 'q' => '');
             //GET ALL TAG DATA
             $data = CmsTag::where_lang(LANG)->order_by('name', 'asc')->paginate(Config::get('cms::settings.pag'));
             $this->layout->content = View::make('cms::interface.pages.tag_list')->with('data', $data)->with('lang', LANG);
         }
     }
 }
 public function get_edit($id)
 {
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('count', 'bundles/cms/js/jquery.charcount.js', 'jquery');
     Asset::container('footer')->add('elastic', 'bundles/cms/js/jquery.elastic.js', 'jquery');
     Asset::container('footer')->add('slug', 'bundles/cms/js/jquery.stringtoslug.js', 'jquery');
     Asset::container('footer')->add('ckcms', 'bundles/cms/js/ck.cms.js', 'jqadapter');
     //CKEDITOR
     if (IS('cms::settings.wysiwyg', 'ckeditor')) {
         Asset::container('footer')->add('ckeditor', 'bundles/cms/ckeditor/ckeditor.js', 'form');
         Asset::container('footer')->add('jqadapter', 'bundles/cms/ckeditor/adapters/jquery.js', 'form');
         Asset::container('footer')->add('ckcms', 'bundles/cms/js/ck.cms.js', 'jqadapter');
     }
     //MARKITUP
     if (IS('cms::settings.wysiwyg', 'markitup')) {
         Asset::container('footer')->add('markitup', 'bundles/cms/markitup/jquery.markitup.js', 'form');
         Asset::container('footer')->add('sethtml', 'bundles/cms/markitup/sets/html/set.js', 'markitup');
         Asset::container('footer')->add('ckcms', 'bundles/cms/js/ck.cms.js', 'jqadapter');
         Asset::container('header')->add('csshtml', 'bundles/cms/markitup/sets/html/style.css');
         Asset::container('header')->add('cssmarkitup', 'bundles/cms/markitup/skins/markitup/style.css');
     }
     //PLUPLOAD
     Asset::container('footer')->add('plupload', 'bundles/cms/js/plupload.js', 'jquery');
     Asset::container('footer')->add('plupload_html4', 'bundles/cms/js/plupload.html4.js', 'plupload');
     Asset::container('footer')->add('plupload_html5', 'bundles/cms/js/plupload.html5.js', 'plupload');
     //LOAD FANCYBOX LIBS
     Asset::container('header')->add('fancyboxcss', 'bundles/cms/css/fancybox.css', 'main');
     Asset::container('footer')->add('fancybox', 'bundles/cms/js/jquery.fancybox.js', 'jquery');
     //LOAD AUTOSUGGEST LIBS
     Asset::container('header')->add('autosuggestcss', 'bundles/cms/css/autosuggest.css', 'main');
     Asset::container('footer')->add('autosuggest', 'bundles/cms/js/jquery.autosuggest.js', 'jquery');
     //DATETIME PICKER
     Asset::container('header')->add('jqueryuicss', 'bundles/cms/css/jquery.ui.css', 'main');
     if (LANG !== 'en') {
         Asset::container('footer')->add('local', 'bundles/cms/js/i18n/jquery.ui.datepicker-' . LANG . '.js', 'jquery');
     }
     Asset::container('footer')->add('datepicker', 'bundles/cms/js/jquery.datepicker.js', 'local');
     Asset::container('footer')->add('timepicker', 'bundles/cms/js/jquery.timepicker.js', 'datepicker');
     //SORTING
     Asset::container('footer')->add('sortable', 'bundles/cms/js/jquery.sortable.js', 'jquery');
     Asset::container('footer')->add('serialize', 'bundles/cms/js/jquery.serializetree.js', 'sortable');
     Asset::container('footer')->add('pages', 'bundles/cms/js/sections/blogs_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.blog_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     if (!empty($id)) {
         //GET BLOG DATA
         $blog = CmsBlog::with(array('pages', 'blogrels'))->find($id);
         $pivot = DB::table('blogs_pages')->where_cmsblog_id($id)->where_is_default(1)->first();
         //FILES OF PAGE
         $files = CmsPage::find($pivot->cmspage_id)->files;
         if (!empty($blog)) {
             //GET EXTRA ID
             $extra_ids = Config::get('cms::settings.extra_id');
             //GET PAGE DATA
             $pagedata = CmsPage::where_lang($blog->lang)->where_parent_id(0)->where_extra_id(array_search('blogs', $extra_ids))->order_by('lang', 'asc')->order_by('is_home', 'desc')->order_by('order_id', 'asc')->get();
             $new_data = array();
             foreach ($pagedata as $obj) {
                 $new_data[$obj->id] = $obj;
                 $recursive = call_user_func_array('CmsPage::recursive_pages', array($obj->id));
                 $new_data = $new_data + $recursive;
             }
             //GET BLOG DATA
             $blogdata = CmsBlog::where_lang($blog->lang)->where('id', '<>', $id)->where_is_valid(1)->order_by('datetime_on', 'desc')->order_by('name', 'desc')->paginate(Config::get('cms::settings.pag'));
             if (empty($new_data)) {
                 $new_data = array();
             }
             $this->layout->content = View::make('cms::interface.pages.blog_new_edit')->with('role_fail', CmsRole::role_fail($pivot->cmspage_id))->with('title', LL('cms::title.blog_edit', CMSLANG))->with('blog_id', $id)->with('page_id', $pivot->cmspage_id)->with('blog_lang', $blog->lang)->with('blog_name', $blog->name)->with('blog_parent', CmsPage::select_page_slug($blog->lang, array_search('blogs', $extra_ids)))->with('blog_parent_selected', $pivot->cmspage_id)->with('blog_slug', substr($blog->slug, 1))->with('blog_parent_slug', CmsPage::get_page_slug($pivot->cmspage_id) . '/')->with('blog_zones', CmsElement::select_zone($pivot->cmspage_id))->with('blog_zone_selected', $blog->zone)->with('blog_is_valid', (bool) $blog->is_valid)->with('blog_date_on', $blog->get_datetime_on())->with('blog_date_off', $blog->get_datetime_off())->with('blog_title', $blog->title)->with('blog_preview', $blog->preview)->with('blog_text', $blog->text)->with('blog_keyw', $blog->keyw)->with('blog_descr', $blog->descr)->with('blog_tags', '')->with('files', $files)->with('pagedata', $new_data)->with('pagerels', $blog->pages)->with('blogdata', $blogdata)->with('blogrels', $blog->blogrels);
         }
     }
 }
    Session::load();
}
//SET LOCALE
setlocale(LC_ALL, Config::get('cms::settings.locale'), Config::get('cms::settings.locale') . '.utf8');
//CMS COMPOSER
View::composer('cms::interface.layouts.default', function ($view) {
    Asset::container('header')->add('app_js', Config::get('application.url') . '/site/js');
    Asset::container('header')->add('jquery', 'bundles/cms/js/jquery.min.js', 'app_js');
    Asset::container('footer')->add('cms', 'bundles/cms/js/cms.js', 'jquery');
    Asset::container('footer')->add('bootstrap', 'bundles/cms/js/bootstrap.min.js', 'cms');
    Asset::container('header')->add('bootstrapcss', 'bundles/cms/css/bootstrap.css');
    Asset::container('header')->add('main', 'bundles/cms/css/cms.css', 'bootstrapcss');
    //NOTY
    Asset::container('header')->add('notyjs', 'bundles/cms/js/jquery.noty.js', 'jquery');
    Asset::container('header')->add('notycss', 'bundles/cms/css/jquery.noty.css', 'bootstrapcss');
    Asset::container('header')->add('notytwitcss', 'bundles/cms/css/noty_theme_twitter.css', 'notycss');
    //HEADER_DATA IS SET IN RESTFUL CONTROLLERS
    if (!isset($view->header_data)) {
        $view->header_data = array('title' => Config::get('cms::settings.name'));
    }
    $topbar = (Auth::check() and ROLE >= Config::get('cms::settings.roles.editor')) ? 'cms::interface.partials.navigation.logged' : 'cms::interface.partials.navigation.login';
    $view->menu = View::make('cms::interface.partials.menu')->nest('topbar', $topbar, array('sections' => Config::get('cms::settings.sections'), 'interface' => Config::get('cms::settings.interface')));
    //TOP_DATA IS SET IN RESTFUL CONTROLLERS
    if (!isset($view->top_data)) {
        $view->top_data = array('search' => false);
    }
    //CONTENT IS SET IN RESTFUL CONTROLLERS
    if (!isset($view->content)) {
        $view->content = '';
    }
    $view->footer = View::make('cms::interface.partials.footer');
Beispiel #23
0
<?php

/**
 * Bootstrapper for creating Twitter Bootstrap markup.
 *
 * @package     Bundles
 * @subpackage  Twitter
 * @author      Patrick Talmadge - Follow @patricktalmadge
 *
 * @see http://twitter.github.com/bootstrap/
 */
Autoloader::map(array('Bootstrapper\\Alert' => __DIR__ . '/alert.php', 'Bootstrapper\\Badges' => __DIR__ . '/badges.php', 'Bootstrapper\\Breadcrumbs' => __DIR__ . '/breadcrumbs.php', 'Bootstrapper\\ButtonGroup' => __DIR__ . '/buttongroup.php', 'Bootstrapper\\Buttons' => __DIR__ . '/buttons.php', 'Bootstrapper\\ButtonToolbar' => __DIR__ . '/buttontoolbar.php', 'Bootstrapper\\Carousel' => __DIR__ . '/carousel.php', 'Bootstrapper\\DropdownButton' => __DIR__ . '/dropdownbutton.php', 'Bootstrapper\\Form' => __DIR__ . '/form.php', 'Bootstrapper\\Helpers' => __DIR__ . '/helpers.php', 'Bootstrapper\\Icons' => __DIR__ . '/icons.php', 'Bootstrapper\\Labels' => __DIR__ . '/labels.php', 'Bootstrapper\\Navbar' => __DIR__ . '/navbar.php', 'Bootstrapper\\Navigation' => __DIR__ . '/navigation.php', 'Bootstrapper\\Paginator' => __DIR__ . '/paginator.php', 'Bootstrapper\\Progress' => __DIR__ . '/progress.php', 'Bootstrapper\\SplitDropdownButton' => __DIR__ . '/splitdropdownbutton.php', 'Bootstrapper\\Tabbable' => __DIR__ . '/tabbable.php', 'Bootstrapper\\Tables' => __DIR__ . '/tables.php', 'Bootstrapper\\Typeahead' => __DIR__ . '/typeahead.php'));
Asset::container('bootstrapper')->bundle('bootstrapper');
//Asset::container('bootstrapper')->add('jquery',  'js/jquery-1.8.1.js');
Asset::container('bootstrapper')->add('jquery', 'js/jquery-1.8.1.min.js');
//Asset::container('bootstrapper')->add('bootstrap',  'css/bootstrap.css');
Asset::container('bootstrapper')->add('bootstrap', 'css/bootstrap.min.css');
//Not Needed if you don't have the top nav bar
Asset::container('bootstrapper')->add('nav-fix', 'css/nav-fix.css');
//Asset::container('bootstrapper')->add('bootstrap-responsive',  'css/bootstrap-responsive.css');
Asset::container('bootstrapper')->add('bootstrap-responsive', 'css/bootstrap-responsive.min.css');
//Asset::container('bootstrapper')->add('bootstrap-js',  'js/bootstrap.js');
Asset::container('bootstrapper')->add('bootstrap-js', 'js/bootstrap.min.js');
Beispiel #24
0
Route::get('admin/product/edit/(:num?)/(:all?)', 'admin@product_edit');
Route::post('admin/product/product_add_get_attribute', 'admin@productAttribute');
Route::controller(Controller::detect());
/*Route::filter('pattern: ^(?!user/login)*', 'auth');*/
Event::listen('404', function () {
    return Response::error('404');
});
Event::listen('500', function () {
    return Response::error('500');
});
Route::filter('before', function () {
    Check_User_Cart();
    //Adding -> Assets
    Asset::container('styleSheet')->add('mainStyle', 'css/style.css');
    Asset::container('bootstrap')->add('BootstrapJS', 'js/bootstrap.js');
    Asset::container('megaMenu')->add('menu', 'js/script.js');
    //Composer!
    $category = Category::with('getDescriptions')->where('top', '=', '1')->get();
    View::share('cat', $category);
    if (!Cache::has('settings')) {
        $settings = Setting::obtain();
        Cache::put('settings', $settings, 60);
    }
    $settings = Cache::get('settings');
    View::share('settings', $settings);
});
Route::filter('after', function ($response) {
    // Do stuff after every request to your application...
});
Route::filter('csrf', function () {
    if (Request::forged()) {
 public function get_edit_element($page_id, $element_id)
 {
     //LOAD JS LIBS
     Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery');
     Asset::container('footer')->add('count', 'bundles/cms/js/jquery.charcount.js', 'jquery');
     Asset::container('footer')->add('slug', 'bundles/cms/js/jquery.stringtoslug.js', 'jquery');
     //CKEDITOR
     if (IS('cms::settings.wysiwyg', 'ckeditor')) {
         Asset::container('footer')->add('ckeditor', 'bundles/cms/ckeditor/ckeditor.js', 'form');
         Asset::container('footer')->add('jqadapter', 'bundles/cms/ckeditor/adapters/jquery.js', 'form');
         Asset::container('footer')->add('ckcms', 'bundles/cms/js/ck.cms.js', 'jqadapter');
     }
     //MARKITUP
     if (IS('cms::settings.wysiwyg', 'markitup')) {
         Asset::container('footer')->add('markitup', 'bundles/cms/markitup/jquery.markitup.js', 'form');
         Asset::container('footer')->add('sethtml', 'bundles/cms/markitup/sets/html/set.js', 'markitup');
         Asset::container('footer')->add('ckcms', 'bundles/cms/js/ck.cms.js', 'jqadapter');
         Asset::container('header')->add('csshtml', 'bundles/cms/markitup/sets/html/style.css');
         Asset::container('header')->add('cssmarkitup', 'bundles/cms/markitup/skins/markitup/style.css');
     }
     //PLUPLOAD
     Asset::container('footer')->add('plupload', 'bundles/cms/js/plupload.js', 'jquery');
     Asset::container('footer')->add('plupload_html4', 'bundles/cms/js/plupload.html4.js', 'plupload');
     Asset::container('footer')->add('plupload_html5', 'bundles/cms/js/plupload.html5.js', 'plupload');
     //LOAD FANCYBOX LIBS
     Asset::container('header')->add('fancyboxcss', 'bundles/cms/css/fancybox.css', 'main');
     Asset::container('footer')->add('fancybox', 'bundles/cms/js/jquery.fancybox.js', 'jquery');
     //SORTING
     Asset::container('footer')->add('sortable', 'bundles/cms/js/jquery.sortable.js', 'jquery');
     Asset::container('footer')->add('serialize', 'bundles/cms/js/jquery.serializetree.js', 'sortable');
     Asset::container('footer')->add('elements', 'bundles/cms/js/sections/elements_edit.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.element_edit', CMSLANG));
     $this->layout->top_data = array('search' => false);
     if (!empty($element_id)) {
         //GET ELEMENT DATA
         $element = CmsElement::find($element_id);
         if (!empty($element)) {
             //GET PAGE DATA
             $page = CmsPage::find($page_id);
             //GET ELEMENTS DATA
             $elements = $page->elements;
             //GET FILE DATA
             $files = $page->files;
             // LOAD LAYOUT PREVIEW
             $preview_layout = CmsPage::preview_layout_create($page->layout);
             $this->layout->content = View::make('cms::interface.pages.element_new_edit')->with('role_fail', CmsRole::role_fail($page_id))->with('title', LL('cms::title.element_edit', CMSLANG))->with('page_id', $page_id)->with('element_id', $element_id)->with('element_name', $element->name)->with('element_label', $element->label)->with('element_text', $element->text)->with('element_zones', CmsElement::select_zone($page_id))->with('element_zone_selected', $element->zone)->with('element_is_valid', (bool) $element->is_valid)->with('elements', $elements)->with('media', $files)->with('page_header_selected', $page->header)->with('page_footer_selected', $page->footer)->with('page_layout_preview', $preview_layout);
         } else {
             $this->layout->content = View::make('cms::interface.pages.not_found')->with('message', LL('cms::alert.not_found', CMSLANG));
         }
     } else {
         $this->layout->content = View::make('cms::interface.pages.not_found')->with('message', LL('cms::alert.not_found', CMSLANG));
     }
 }
Beispiel #26
0
<?php

Asset::container('harlemshake')->bundle('harlemshake');
Asset::container('harlemshake')->add('shakejs', 'js/shake.js');
@extends('layouts.default')
@section('content')
	@include('_partials.errors')
	{{ Form::open(array('route' => 'users.resetpassword', 'id' => 'resetpassword_form'))}}
		<input type="hidden" name="csrf_token" value="" />
		<div class="form-group">
			<p class="content">{{ trans('user_auth.explain_reset_password'); }}</p>
		</div>	
		<div class="form-group">
			{{ Form::label('email' , trans('user_auth.create_user_email_label'))}}
			{{ Form::text('email', null, array('class' => 'form-control')) }}
		</div>

		<div class="form-group">
			{{ Form::label('password' , trans('user_auth.new_password_label'))}}
			{{ Form::password('password' , array('class' => 'form-control')) }}
		</div>

		<div class="form-group">
			{{ Form::label('repeat_password' , trans('user_auth.create_user_password_confirm_label'))}}
			{{ Form::password('repeat_password' , array('class' => 'form-control')) }}
		</div>

	{{ Form::submit('Submit', array('class' => 'btn btn-primary')) }}
	{{ Form::close() }}
@stop

<?php 
Asset::container('assets')->add('manageuser', 'js/manageuser.js');
Beispiel #28
0
 /**
  * Test the Asset::__callStatic method.
  *
  * @group laravel
  */
 public function testContainerMethodsCanBeDynamicallyCalled()
 {
     Asset::style('common', 'common.css');
     $this->assertEquals('common.css', Asset::container()->assets['style']['common']['source']);
 }
Beispiel #29
0
 /**
  * Tail
  *
  * Retrieve and return inline JavaScript to be rendered before the
  * closing HTML body tag.
  * 
  * @access	public
  * @return 	string		Inline JavaScript elements
  */
 public static function tail()
 {
     $html = '';
     // Get JS scripts
     $html .= Asset::container(Config::get('xtatic::xtatic.footer_asset_container'))->scripts();
     // Get inline JS
     $html .= static::javascript(static::$js_in_tail);
     if (!empty(static::$jquery_ready)) {
         $preamble = array('(function($) {', '$(document).ready(function() {');
         $postamble = array('});', '})(jQuery);');
         static::$jquery_ready = array_merge($preamble, static::$jquery_ready, $postamble);
         $html .= static::javascript(static::$jquery_ready);
     }
     return $html;
 }
Beispiel #30
0
// --------------------------------------------------------------
// Register controllers
// --------------------------------------------------------------
Route::pages(Config::get('routes'), 'admin', Config::get('layla.admin.url_prefix'));
// --------------------------------------------------------------
// Start bundles
// --------------------------------------------------------------
Bundle::start('thirdparty_bootsparks');
Bundle::start('thirdparty_menu');
// --------------------------------------------------------------
// Default Composer
// --------------------------------------------------------------
View::composer('admin::layouts.default', function ($view) {
    $view->shares('url', prefix('admin') . '/');
    Asset::container('header')->add('jquery', 'js/jquery.min.js')->add('bootstrap', 'bootstrap/css/bootstrap.css')->add('main', 'html/layla.css');
    Asset::container('footer')->add('bootstrap', 'js/bootstrap.js');
});
// --------------------------------------------------------------
// Adding menu items
// --------------------------------------------------------------
Menu::handler('main')->add('home', 'Home', null, array('class' => 'icon-home'))->add('pages', 'Pages', null, array('class' => 'icon-pages'))->add('media', 'Media', null, array('class' => 'icon-media'))->add('accounts', 'Accounts', null, array('class' => 'icon-accounts'))->add('settings', 'Settings', null, array('class' => 'icon-settings'))->add('#', '', null, array('class' => 'logo'))->add('profile', 'Profile', null, array('class' => 'icon-profile'));
// --------------------------------------------------------------
// Registering forms and pages
// --------------------------------------------------------------
Module::register('page', 'account.read_multiple', 'admin::account@read_multiple');
Module::register('page', 'account.create', 'admin::account@create');
Module::register('form', 'account.create', 'admin::account@create');
Module::register('page', 'account.update', 'admin::account@update');
Module::register('form', 'account.update', 'admin::account@update');
Module::register('page', 'account.delete', 'admin::account@delete');
Module::register('form', 'account.delete', 'admin::account@delete');