Пример #1
0
 function showTab()
 {
     $translate = DevblocksPlatform::getTranslationService();
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = dirname(dirname(__FILE__)) . '/templates/';
     $tpl->assign('path', $tpl_path);
     $defaults = new C4_AbstractViewModel();
     $defaults->class_name = 'C4_FeedbackEntryView';
     $defaults->id = self::VIEW_ACTIVITY_FEEDBACK;
     $defaults->name = $translate->_('feedback.activity.tab');
     $defaults->view_columns = array(SearchFields_FeedbackEntry::LOG_DATE, SearchFields_FeedbackEntry::ADDRESS_EMAIL, SearchFields_FeedbackEntry::SOURCE_URL);
     $defaults->renderSortBy = SearchFields_FeedbackEntry::LOG_DATE;
     $defaults->renderSortAsc = 0;
     $view = C4_AbstractViewLoader::getView(self::VIEW_ACTIVITY_FEEDBACK, $defaults);
     $tpl->assign('response_uri', 'activity/feedback');
     $tpl->assign('view', $view);
     $tpl->assign('view_fields', C4_FeedbackEntryView::getFields());
     $tpl->assign('view_searchable_fields', C4_FeedbackEntryView::getSearchFields());
     $tpl->display($tpl_path . 'activity_tab/index.tpl');
 }
Пример #2
0
 function showTab()
 {
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl->cache_lifetime = "0";
     $tpl_path = dirname(dirname(__FILE__)) . '/templates/';
     $tpl->assign('path', $tpl_path);
     if (null == ($view = C4_AbstractViewLoader::getView('', self::VIEW_ACTIVITY_FEEDBACK))) {
         $view = new C4_FeedbackEntryView();
         $view->id = self::VIEW_ACTIVITY_FEEDBACK;
         $view->renderSortBy = SearchFields_FeedbackEntry::LOG_DATE;
         $view->renderSortAsc = 0;
         $view->name = "Feedback";
         C4_AbstractViewLoader::setView($view->id, $view);
     }
     $tpl->assign('response_uri', 'activity/feedback');
     $tpl->assign('view', $view);
     $tpl->assign('view_fields', C4_FeedbackEntryView::getFields());
     $tpl->assign('view_searchable_fields', C4_FeedbackEntryView::getSearchFields());
     $tpl->display($tpl_path . 'activity_tab/index.tpl');
 }