Пример #1
0
 protected function buildNavBar()
 {
     parent::buildNavBar();
     $post_id = $this->app->initVar('post');
     if ($post_id !== null) {
         $this->navbar->popEntry();
         $this->navbar->popEntry();
         $this->navbar->addEntry(new SwatNavBarEntry(Blorg::_('Posts'), 'Post'));
         $this->navbar->addEntry(new SwatNavBarEntry($this->comment->post->getTitle(), sprintf('Post/Details?id=%s', $this->comment->post->id)));
         if ($this->id === null) {
             $this->navbar->addEntry(new SwatNavBarEntry(Blorg::_('New Comment')));
         } else {
             $this->navbar->addEntry(new SwatNavBarEntry(Blorg::_('Edit Comment')));
         }
     }
 }
Пример #2
0
 protected function buildNavBar()
 {
     parent::buildNavBar();
     $photo_id = $this->app->initVar('photo');
     if ($photo_id !== null) {
         $this->navbar->popEntry();
         $this->navbar->popEntry();
         $this->navbar->addEntry(new SwatNavBarEntry(Pinhole::_('Photos'), 'Photo'));
         $this->navbar->addEntry(new SwatNavBarEntry($this->comment->photo->getTitle(true), sprintf('Photo/Details?id=%s', $this->comment->photo->id)));
         if ($this->id === null) {
             $this->navbar->addEntry(new SwatNavBarEntry(Pinhole::_('New Comment')));
         } else {
             $this->navbar->addEntry(new SwatNavBarEntry(Pinhole::_('Edit Comment')));
         }
     }
 }