[Vtigercrm-developers] row colors depending on lead status

Mutuku Ndeti jnmutuku at gmail.com
Mon Aug 16 05:25:56 PDT 2010


Hello list,

I had customized listviewentries.tpl on vtiger 5.0.4  to  display different
row colors depending on the lead status.

When I do the same on vtiger 5.1.0,  the code/concpt does not work.

Please see the code below.  $entity[5] is the lead status.

When I print out $entity[5] ({$entity[5] }),after "  {if $MODULE eq
'Leads'}", it prints out the value, but after " {if $entity[5] eq 'Not
Sent'}", it does not display.  this happens only in vtiger 5.1.0.

I can't seem to figure out what has changed.

_________________________________code__________________________________

<!-- Table Contents -->
            {foreach item=entity key=entity_id from=$LISTENTITY}
            <tr bgcolor=white onMouseOver="this.className='lvtColDataHover'"
onMouseOut="this.className='lvtColData'" id="row_{$entity_id}">
            <td width="2%"><input type="checkbox" NAME="selected_id"
id="{$entity_id}" value= '{$entity_id}' onClick="check_object(this)"></td>
              {* display data rows with Not sent and republished jobs with a
different color*}

            {if $MODULE eq 'Leads'}
               {foreach item=data from=$entity}
                 {if $entity[5] eq 'Not Sent'}
               <td style="background-color:#FF99FF">{$data}</td>
                 {elseif $entity[5] eq 'Republished'}
                    <td style="background-color:#CCCCFF">{$data}</td>
               {elseif $entity[5] eq 'Repeated'}
                    <td style="background-color:#CCCCCC">{$data}</td>
                 {else}

                    <td>{$data}</td>
                 {/if}
               {/foreach}

            {else}
                {foreach item=data from=$entity}
                <td>{$data}</td>
                {/foreach}
            {/if}
            {*// end display data rows*}


            </tr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20100816/2f5d771d/attachment-0002.html 


More information about the vtigercrm-developers mailing list