Version: current

     1 <?php
     2 class RealtyImportAdmin extends ModelAdmin {
     3
     4     public static $managed_models = array(
     5         'RealtyImportLog'
     6     );
     7
     8     static $url_segment = 'realty-import';
     9     static $menu_title = 'Импорт недвижимости';
    10     static $menu_priority = -10;
    11
    12     public static $collection_controller_class = "RealtyImportAdmin_CollectionController";
    13
    14     function getLastLog(){
    15         return RealtyImportLog::get_last_log();
    16     }
    17
    18 }
    19
    20
    21 class RealtyImportAdmin_CollectionController extends ModelAdmin_CollectionController {
    22
    23     function getResultsTable($searchCriteria) {
    24         $tf = parent::getResultsTable($searchCriteria);
    25         $tf->setHighlightConditions(array(
    26             array('rule'=>'$Status == "process"', 'class' => 'process', 'exclusive' => false),
    27             array('rule'=>'$Status == "error"', 'class' => 'error', 'exclusive' => false),
    28         ));
    29         return $tf;
    30     }
    31 }

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -