示例#1
0
文件: Edit.php 项目: GervaisdeM/blorg
 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')));
         }
     }
 }