change css on cron job in cakephp -


i have table displaying data table in ctp file. want know whether possible change css property of particular row on cron job trigger.

say table display title, description, starttime.
when starttime equals current time, want change background of particular row only.

it doesn't sound you'd need cron job such feature.

you can check whether data date current date , add special class row. exact technique you'd use depends on how display table, using html helper:

foreach( $data $row ) {     echo $this->html->tablecells(         array(             array( 'column 1', 'column 2', '...' )          ),         ( $row[ 'date' ] == date( 'y-m-d' ) ) ? 'highlight' : '',         ( $row[ 'date' ] == date( 'y-m-d' ) ) ? 'highlight' : ''     ); } 

in css:

.highlight {     background-color:yellow; } 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -