app/control/communication/SystemNotificationList.class.php
/**
     * Iterate all objects before rendering
     * Create the check/uncheck buttons
     */
Iterate all objects before rendering
Create the check/uncheck buttons
Iterate all objects before rendering Create the check / uncheck buttons
public function onBeforeLoad($objects, $param)
    {
        foreach ($objects as $object)
        {
            $button = new TElement('a');
            $button->generator = 'adianti';
            $button->class = 'btn btn-default';
            if ($object->checked == 'Y')
            {
                $button->href = 'index.php?class=SystemNotificationList&method=onUnCheck&id='.$object->id;
                $button->add( new TImage('fa:archive gray') );
                $button->add( TElement::tag('span', _t('Check as unread'), array('style' =>'color:gray' ) ) );
            }
            else
            {
                $button->href = 'index.php?class=SystemNotificationFormView&method=onExecuteAction&id='.$object->id;
                $icon = $object->icon;
                $icon    = str_replace( 'fa fa-', 'fa:', $icon);
                $icon    = str_replace( 'far fa-', 'far:', $icon);
                $icon    = str_replace( 'fas fa-', 'fas:', $icon);
                $button->add( new TImage( $icon ) );
                $button->add( TElement::tag('span', $object->action_label ) );
            }
            $object->action = $button;
        }
    }
public function onBeforeLoad ( $ objects , $ param ) { foreach ( $ objects as $ object ) { $ button = new TElement ( 'a' ) ; $ button -> generator = 'adianti' ; $ button -> class = 'btn btn-default' ; if ( $ object -> checked == 'Y' ) { $ button -> href = 'index.php?class=SystemNotificationList&method=onUnCheck&id=' . $ object -> id ; $ button -> add ( new TImage ( 'fa:archive gray' ) ) ; $ button -> add ( TElement :: tag ( 'span' , _t ( 'Check as unread' ) , array ( 'style' => 'color:gray' ) ) ) ; } else { $ button -> href = 'index.php?class=SystemNotificationFormView&method=onExecuteAction&id=' . $ object -> id ; $ icon = $ object -> icon ; $ icon = str_replace ( 'fa fa-' , 'fa:' , $ icon ) ; $ icon = str_replace ( 'far fa-' , 'far:' , $ icon ) ; $ icon = str_replace ( 'fas fa-' , 'fas:' , $ icon ) ; $ button -> add ( new TImage ( $ icon ) ) ; $ button -> add ( TElement :: tag ( 'span' , $ object -> action_label ) ) ; } $ object -> action = $ button ; } }
Iterate all objects before rendering
 Create the check/uncheck buttons
Iterate all objects before rendering Create the check / uncheck buttons
//$button->style="width:160px";