In my quotation system I have come up with a way to remind users of 
UN-deleted quotations. This helps them from creating new quotations on top 
of old quotations.
How it works is that when a company has been quoted its name is added to a 
list called the control list and a selected company's name is checked 
against this control list, if it is in the control list it will mean that 
it has been quoted and a blue badge titled quoted will be displayed next to 
the company's name. The problem I am facing now is that if the company has 
several items quoted under it it means that its name will appear several  
times in the control list, this causes the green badge to appear as many 
times as the company name appears in the control list, I want avoid this, 
is there a way to get the badge to appear only once regardless of the 
number of times the company name appears in the control list?

*CONTROLLER*
def registeredClients():
    bookings=db(db.Client_Details).select(db.Client_Details.ALL, orderby=db.
Client_Details.company)
    quotes=db(db.quotation).select()
    return locals()

*CSS*
.disc
{
border: solid 2px transparent;
border-radius: 50%;
width: 40px;
padding: 5px;
}

.blue
{
background-color: blue;
color: white;
font-weight: bold;
font-size: x-small;
}

*VIEW*
{{for bookings in bookings:}}

{{for q in quotes:}}
{{quoted=[q.customer.company]}}
<span class="disc {{='blue' if bookings.company in quoted else 'hidden'}}">
Quoted</span>
{{pass}}

{{pass}}

Please help!!!

Regards;

Mostwanted

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/c86a6f10-ea1b-4829-af28-ccfc7ef7a41a%40googlegroups.com.

Reply via email to