Пример #1
0
	/**
	 * @Acl allow blog-writer
	 * @Acl allow blog-admin
	*/
	public function index($page = 1)
	{
		$this->_adminTab = 'BlogManageAdminTab';
		$blogPager = Blog::blogs(CoOrg::getLanguage());
		$this->blogs = $blogPager->execute($page, 15);
		$this->blogpager = $blogPager;
		$this->render('admin/index');
	}
Пример #2
0
	public function run($controller)
	{
		$class = new stdClass;
		$class->language = CoOrg::getLanguage();
		$class->tags = array();
		$class->category = 'text';
		$class->title = CoOrg::config()->get('site/title');
		$class->description = CoOrg::config()->get('site/subtitle');
		return $class;
	}
Пример #3
0
	/**
	 * @before find $name
	*/
	public function edit($name, $language = null)
	{
		$this->menu = $this->_menu;
		
		if ($language)
		{
			$adminLanguage = $language;
		}
		else
		{
			$adminLanguage = CoOrg::getLanguage();
		}
		$this->adminlanguage = $adminLanguage;
		$this->providerActionCombos = Menu::providerActionCombos($adminLanguage);
		$newEntry = new MenuEntry;
		$newEntry->menuID = $name;
		$newEntry->language = $adminLanguage;
		$this->newEntry = $newEntry;
		$this->render('edit');
	}
Пример #4
0
	public function show($id, $language = null)
	{
		if ($language == null)
		{
			$language = CoOrg::getLanguage();
		}
		else
		{
			$this->viewingTranslation = true;
		}
		$page = Page::get($id, $language);
		if ($page != null)
		{
			$this->page = $page;
			$this->render('show');
		}
		else
		{
			$this->error(t('Page not found'));
			$this->notFound();
		}
	}
Пример #5
0
	public function tag($tag)
	{
		$this->searchResults = Taggable::selectNodes($tag, CoOrg::getLanguage());
		$this->render('tagresults');
	}
Пример #6
0
	protected function fetchLatest($page = 1)
	{
		$pager = Blog::blogs(CoOrg::getLanguage());
		$this->blogs = $pager->execute($page, 10);
		$this->blogpager = $pager;
		return true;
	}
Пример #7
0
	protected function find($ID, $language = null)
	{
		if ($ID == null) {return true;}
		$this->_page = Page::get($ID, $language ? $language : CoOrg::getLanguage());
		if (!$this->_page)
		{
			$this->error(t('Page not found'));
			$this->notfound();
			return false;
		}
		else
		{
			return true;
		}
	}
Пример #8
0
	public function run($widgetParams, $orient, $request)
	{
		$this->blogArchive = Blog::getArchives(CoOrg::getLanguage());
		return $this->render('aside/archive');
	}