示例#1
0
文件: email.php 项目: juaniiie/mwi
 public function get_new()
 {
     $this->data['section_bar_active'] = __('email::lang.Send Email')->get(ADM_LANG);
     $this->data['groups_dropdown'] = null;
     if (Bundle::exists('groups')) {
         $this->data['groups_dropdown'] = Groups\Model\Group::all();
     }
     $this->data['email_templates'] = Email\Model\Template::all();
     return $this->theme->render('email::email.new', $this->data);
 }
示例#2
0
文件: pages.php 项目: juaniiie/mwi
 public function get_new($page_id = null)
 {
     if ($page_id == null) {
         $this->data['section_bar'] = array(Lang::line('pages::lang.Pages')->get(ADM_LANG) => URL::base() . '/' . ADM_URI . '/pages', Lang::line('pages::lang.New Page')->get(ADM_LANG) => URL::base() . '/' . ADM_URI . '/pages/new');
         $this->data['groups'] = Groups\Model\Group::all();
         $this->data['navigation_groups'] = Navigation\Model\Group::all();
         $this->data['section_bar_active'] = Lang::line('pages::lang.New Page')->get(ADM_LANG);
         return $this->theme->render('pages::create', $this->data);
     } else {
         $this->data['section_bar_active'] = Lang::line('pages::lang.New Page')->get(ADM_LANG);
         $this->data['page'] = Pages\Model\Page::find($page_id);
         if ($this->data['page']->parent_id != 0) {
             $parent_slug = Pages\Model\Page::where('id', '=', $this->data['page']->parent_id)->first('slug');
         }
         $this->data['parent_slug'] = isset($parent_slug->slug) ? $parent_slug->slug : '';
         $this->data['groups'] = Groups\Model\Group::all();
         $this->data['navigation_groups'] = Navigation\Model\Group::all();
         return $this->theme->render('pages::duplicate', $this->data);
     }
 }
示例#3
0
文件: links.php 项目: juaniiie/mwi
 public function get_new($group_id)
 {
     if (Bundle::exists('pages')) {
         $pages = Pages\Model\Page::where('status', '=', 'live')->get(array('id', 'title'));
     } else {
         $pages = null;
     }
     $modules = Modules\Model\Module::where('enabled', '=', 1)->where('is_frontend', '=', 1)->get(array('id', 'slug', 'name'));
     $groups = Groups\Model\Group::all();
     return View::make('navigation::backend.links.create', $this->data)->with('nav_group_id', $group_id)->with('modules', $modules)->with('pages', $pages)->with('groups', $groups);
 }
示例#4
0
 public function get_index()
 {
     $this->data['section_bar_active'] = __('permissions::lang.Permissions')->get(ADM_LANG);
     $this->data['groups'] = Groups\Model\Group::all();
     return $this->theme->render('permissions::backend.index', $this->data);
 }
示例#5
0
文件: users.php 项目: juaniiie/mwi
 public function get_edit($user_id)
 {
     if (!ctype_digit($user_id)) {
         $this->data['message'] = __('users::lang.Invalid id to edit user')->get(ADM_LANG);
         $this->data['message_type'] = 'error';
         return Redirect::to(ADM_URI . '/users')->with($this->data);
     }
     $this->data['section_bar_active'] = __('users::lang.Edit')->get(ADM_LANG);
     $this->data['section_bar'] = array(__('users::lang.Users')->get(ADM_LANG) => URL::base() . '/' . ADM_URI . '/users', __('users::lang.New User')->get(ADM_LANG) => URL::base() . '/' . ADM_URI . '/users/new', __('users::lang.Edit')->get(ADM_LANG) => URL::base() . '/' . ADM_URI . '/users/' . $user_id . '/edit');
     if (\Bundle::exists('groups')) {
         $this->data['groups_dropdown'] = Groups\Model\Group::all();
     }
     $this->data['edit_user'] = Users\Model\User::find($user_id);
     if (!isset($this->data['edit_user']) or empty($this->data['edit_user'])) {
         $this->data['message'] = __('users::lang.Sorry can\'t find user to edit')->get(ADM_LANG);
         $this->data['message_type'] = 'error';
         return Redirect::to(ADM_URI . '/users')->with($this->data);
     }
     return $this->theme->render('users::backend.edit', $this->data);
 }