Ejemplo n.º 1
0
 public function boot()
 {
     Event::listen('backend.menu.extendItems', function ($manager) {
         $manager->addSideMenuItems('Genius.Base', 'pages', ['contacts' => ['label' => 'genius.contacts::lang.settings.menu_label', 'icon' => 'icon-envelope-o', 'url' => Backend::url('genius/contacts/settings/update/1'), 'order' => 20]]);
         $manager->addSideMenuItems('Genius.Base', 'admin', ['contacts' => ['label' => 'genius.contacts::lang.contacts.menu_label', 'icon' => 'icon-envelope-o', 'url' => Backend::url('genius/contacts/contacts'), 'order' => 20]]);
     });
 }
Ejemplo n.º 2
0
 public function store()
 {
     $note = new Models\Note();
     $note->title = Input::get('title');
     $note->description = Input::get('description', null);
     $note->user_id = BackendAuth::getUser()->id;
     if ($note->save()) {
         \Flash::success('Note added successfully.');
     } else {
         \Flash::error('Validation error');
     }
     return \Redirect::to(Backend::url());
 }
Ejemplo n.º 3
0
 public function create_onSave()
 {
     $fields = post('fields', []);
     $name = post('name');
     $messages = post('messages', []);
     $form = new Form();
     $form->name = $name;
     $form->fields = $fields;
     $form->messages = $messages;
     $form->user_id = $this->user->id;
     $form->save();
     \Flash::success('Form successfully saved');
     return \Redirect::to(Backend::url() . '/rafie/contactform/forms/update/' . $form->id);
 }
Ejemplo n.º 4
0
 public function store()
 {
     $note = new Models\Note();
     $note->title = Input::get('title');
     $note->description = Input::get('description', null);
     $note->user_id = BackendAuth::getUser()->id;
     if ($note->save()) {
         \Flash::success('Note added successfully.');
     } else {
         $messages = array_flatten($note->errors()->getMessages());
         $errors = implode(' - ', $messages);
         \Flash::error('Validation error: ' . $errors);
     }
     return \Redirect::to(Backend::url());
 }
Ejemplo n.º 5
0
 public function boot()
 {
     Session::extend(function ($component) {
         /* @var $component Session */
     });
     User::extend(function ($model) {
         /* @var $model User */
         $model->belongsToMany['groups'] = ['BnB\\UserGroup\\Models\\UserGroup', 'table' => 'users_groups'];
     });
     Event::listen('backend.menu.extendItems', function ($manager) {
         $manager->addSideMenuItems('RainLab.User', 'user', ['groups' => ['label' => 'bnb.usergroup::lang.groups.all_groups', 'icon' => 'icon-users', 'url' => Backend::url('bnb/usergroup/usergroups'), 'permissions' => ['rainlab.groups.access_groups']]]);
     });
     Event::listen('backend.form.extendFields', function ($widget) {
         //Extend groups controller
         if (!$widget->getController() instanceof \RainLab\User\Controllers\Users) {
             return;
         }
         if (!$widget->model instanceof \RainLab\User\Models\User) {
             return;
         }
         $widget->addTabFields(['groups' => ['label' => trans('bnb.usergroup::lang.user.groups'), 'comment' => trans('bnb.usergroup::lang.user.groups_comment'), 'type' => 'relation', 'tab' => 'bnb.usergroup::lang.user.groups', 'span' => 'auto']]);
     });
 }
Ejemplo n.º 6
0
 public function registerNavigation()
 {
     return ['fantasticfaq' => ['label' => 'Faq Groups', 'url' => Backend::url('laminsanneh/fantasticfaq/faqgroups'), 'icon' => 'icon-bullhorn', 'permissions' => ['laminsanneh.fantasticfaq.*'], 'order' => 500, 'sideMenu' => ['faqgroups' => ['label' => 'All Form Groups', 'url' => Backend::url('laminsanneh/fantasticfaq/faqgroups'), 'icon' => 'icon-pencil', 'permissions' => ['laminsanneh.fantasticfaq.access_faqgroups']]]]];
 }
 public function registerNavigation()
 {
     return ['flexiexcelexporter' => ['label' => 'Flexi Excel Exporter', 'url' => Backend::url('laminsanneh/flexiexcelexporter/exporters'), 'icon' => 'icon-bullhorn', 'permissions' => ['laminsanneh.flexiexcelexporter.*'], 'order' => 500, 'sideMenu' => ['faqgroups' => ['label' => 'Flexi Excel Exporter', 'url' => Backend::url('laminsanneh/flexiexcelexporter/exporters'), 'icon' => 'icon-pencil', 'permissions' => ['laminsanneh.flexiexcelexporter.*']]]]];
 }
Ejemplo n.º 8
0
 public function registerNavigation()
 {
     return ['site' => ['label' => 'Сторінки', 'url' => Backend::url('fotius/site/articles'), 'icon' => 'icon-list', 'permissions' => [], 'order' => 5, 'sideMenu' => ['index' => ['label' => 'Головна', 'icon' => 'icon-link', 'url' => Backend::url('fotius/site/links'), 'permissions' => ['intertech.subscriber.access_articles']], 'about' => ['label' => 'Про центр', 'icon' => 'icon-tasks', 'url' => Backend::url('fotius/site/structures'), 'permissions' => ['intertech.subscriber.access_articles']], 'news' => ['label' => 'Новини', 'icon' => 'icon-file-text-o', 'url' => Backend::url('fotius/site/news'), 'permissions' => ['intertech.subscriber.access_articles']], 'projects' => ['label' => 'Проекты', 'icon' => 'icon-sticky-note', 'url' => Backend::url('fotius/site/projects'), 'permissions' => ['intertech.subscriber.access_articles']], 'articles' => ['label' => 'Публікації', 'icon' => 'icon-file-text', 'url' => Backend::url('fotius/site/articles'), 'permissions' => ['intertech.subscriber.access_articles']], 'galery' => ['label' => 'Галерея', 'icon' => 'icon-picture-o', 'url' => Backend::url('fotius/site/albums'), 'permissions' => ['intertech.subscriber.access_articles']], 'partners' => ['label' => 'Партнери', 'icon' => 'icon-user', 'url' => Backend::url('fotius/site/partners'), 'permissions' => ['intertech.subscriber.access_articles']], 'contacts' => ['label' => 'Контакти', 'icon' => 'icon-sticky-note', 'url' => Backend::url('system/settings/update/fotius/site/contacts'), 'permissions' => ['intertech.subscriber.access_articles']], 'annotations' => ['label' => 'Анотації', 'icon' => '', 'url' => Backend::url('fotius/site/annotations'), 'permissions' => ['intertech.subscriber.access_articles']]]]];
 }
Ejemplo n.º 9
0
 /**
  * Register backend navigation
  *
  * @return array
  */
 public function registerNavigation()
 {
     return ['octoportfolio' => ['label' => 'zaweb.octoportfolio::lang.navigation.main', 'url' => Backend::url('zaweb/octoportfolio/jobs'), 'icon' => 'icon-clipboard', 'permissions' => ['octoportfolio.*'], 'order' => '500', 'sideMenu' => ['jobs' => ['label' => 'zaweb.octoportfolio::lang.navigation.side.jobs', 'url' => Backend::url('zaweb/octoportfolio/jobs'), 'icon' => 'icon-clipboard'], 'categories' => ['label' => 'zaweb.octoportfolio::lang.navigation.side.categories', 'url' => Backend::url('zaweb/octoportfolio/categories'), 'icon' => 'icon-list']]]];
 }
Ejemplo n.º 10
0
 public function boot()
 {
     Event::listen('backend.menu.extendItems', function ($manager) {
         $manager->addSideMenuItems('Genius.Base', 'models', ['customers' => ['label' => 'genius.customers::lang.customers.menu_label', 'icon' => 'icon-coffee', 'url' => Backend::url('genius/customers/customers'), 'order' => 20]]);
     });
 }
Ejemplo n.º 11
0
 public function registerNavigation()
 {
     return ['googlecalendar' => ['label' => 'kilfedder.googlecalendar::lang.calendars.menu_label', 'url' => Backend::url('kilfedder/googlecalendar/calendars'), 'icon' => 'icon-calendar', 'order' => 300, 'sideMenu' => ['calendars' => ['label' => 'kilfedder.googlecalendar::lang.calendars.menu_label', 'icon' => 'icon-calendar', 'url' => Backend::url('kilfedder/googlecalendar/calendars')], 'images' => ['label' => 'kilfedder.googlecalendar::lang.images.menu_label', 'icon' => 'icon-picture-o', 'url' => Backend::url('kilfedder/googlecalendar/calendarimages')]]]];
 }
Ejemplo n.º 12
0
 public function registerNavigation()
 {
     return ['models' => ['label' => 'genius.base::lang.menu.models', 'url' => Backend::url('genius/base/index/models'), 'icon' => 'icon-sitemap', 'order' => 17], 'pages' => ['label' => 'genius.base::lang.menu.pages', 'url' => Backend::url('genius/base/index/pages'), 'icon' => 'icon-pencil-square-o', 'order' => 18], 'admin' => ['label' => 'genius.base::lang.menu.admin', 'url' => Backend::url('genius/base/index/admin'), 'icon' => 'icon-sliders', 'order' => 19]];
 }
Ejemplo n.º 13
0
 public function registerNavigation()
 {
     return ['offices' => ['label' => 'greenimp.offices::lang.app.name', 'url' => Backend::url('greenimp/offices/offices'), 'icon' => 'icon-building', 'permissions' => ['greenimp.offices.*'], 'order' => 500, 'sideMenu' => ['offices' => ['label' => 'greenimp.offices::lang.general.offices', 'url' => Backend::url('greenimp/offices/offices'), 'icon' => 'icon-building', 'permissions' => ['greenimp.offices.manage_offices']], 'groups' => ['label' => 'greenimp.offices::lang.general.groups', 'url' => Backend::url('greenimp/offices/groups'), 'icon' => 'icon-globe', 'permissions' => ['greenimp.offices.manage_groups'], 'order' => 500]]]];
 }