Пример #1
0
 protected function buildNavBar()
 {
     parent::buildNavBar();
     $this->navbar->popEntry();
     if ($this->isNew()) {
         $this->navbar->createEntry(Building::_('New Text Content'));
     } else {
         $this->navbar->createEntry(Building::_('Edit Text Content'));
     }
 }
Пример #2
0
 protected function processDBData()
 {
     parent::processDBData();
     $sql = 'delete from Block where id in (%s)';
     $item_list = $this->getItemList('integer');
     $sql = sprintf($sql, $item_list);
     $num = SwatDB::exec($this->app->db, $sql);
     if ($num > 0) {
         $this->app->messages->add(new SwatMessage(Building::_('Content has been deleted.')));
     }
 }
 protected function displaySummary(BuildingBlock $block)
 {
     if ($this->getMode('summary') > SiteView::MODE_NONE) {
         $type = BuildingBlockViewFactory::getViewType($block);
         switch ($type) {
             case 'building-block-audio':
                 $summary = Building::_('Audio Content');
                 break;
             case 'building-block-video':
                 $summary = Building::_('Video Content');
                 break;
             case 'building-block-image':
                 $summary = Building::_('Image Content');
                 break;
             case 'building-block-attachment':
                 $summary = Building::_('Attachment');
                 break;
             case 'building-block-xhtml':
             default:
                 $summary = Building::_('Text Content');
                 break;
         }
         $header = new SwatHtmlTag('h4');
         $header->setContent($summary);
         $header->class = 'building-block-admin-summary';
         $header->display();
     }
 }
Пример #4
0
 protected function getSavedMessagePrimaryContent()
 {
     return Building::_('Content has been saved.');
 }