public function index()
{
if (Request::ajax()) {
$this->layout = View::make($this->link_type . '.' . $this->current_theme . '._layouts._modal');
$ajax = true;
} else {
$ajax = false;
}
$this->layout->title = trans('cms.media_manager');
$this->layout->content = View::make($this->link_type . '.' . $this->current_theme . '.media_manager.create_edit')->with('base_dir', 'uploads')->with('ajax', $ajax);
}