Thank you so much Paco Bernal, I should be thinking the way you do. Your
solution solved my problem, I just defined the "show" and "hidden" classes
in my css for the refill class because initially the refill span was just
appearing regardless of the condition the I realized the hidden class we
pass in the codition was not defined in your solution. Nonetheless it works
like a charm. Thank you very much.
Regards;
Mostwanted
On Sunday, September 15, 2019 at 12:30:35 PM UTC+2, Paco Bernal wrote:
>
>
>
> Maybe this can help
>
> <style>
> .refill {
> color: red;
> font-weight: bold;
> padding: 2px;
> }
> .bold15 {
> font-weight: bold;
> font-size: 15px;
> }
> .red {
> color: red;
> }
> .green {
> color: green;
> }
> </style>
> {{for idx, p in enumerate(products, start=1):}}
> <tr id="soldItems">
> <td>
> <span class="bold15">{{=idx}}</span>
> </td>
> <td>
> <span class="bold15 {{='red' if p.Quantity<10 else
> 'green'}}">{{=p.Quantity}}</span>
> <span class="refill {{='' if p.Quantity<10 else 'hidden'}}">Please
> Refill</span>
> </td>
> </tr>
> {{pass}}
>
> Regards
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/d174e616-da2a-4c64-b8db-7ef969eb3a6a%40googlegroups.com.