<div id="tab-1" class="tab-content current">
{{letters=['Finance', 'Accountant']
for jobs in details:
if jobs.category in letters:
}}
<div class="jobPosts">
<img width="80px" src="{{=URL('download', args=jobs.logo)}}" /><br />
Company: {{=jobs.company}}<br />
Post: {{=jobs.post}}<br />
Post Description: {{=jobs.post_description}}<br />
<span style="color: red; font-weight: bold;">Closing Date: {{=jobs.expiry_date}}</span><br />
</div><br />
{{pass}}
{{pass}}
{{if jobs.category not in letters:}}
<span style="font-weight: bold; color: red;">NO LISTINGS!</span>
{{pass}}
</div>
<span style="font-weight: bold; color: red;">NO LISTINGS!</span>
--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/34db1df5-9f8d-4413-a10d-52c4958f410c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to web...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/34db1df5-9f8d-4413-a10d-52c4958f410c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Massimiliano
Still doesn't give desired results, it only duplicates the NO LISTINGS statement!
{{
letters=['Finance', 'Accountant']
found = False
for jobs in details:
if jobs.category in letters:
found = True
}}
<span>{{=jobs.info}}</span>
{{pass}}
{{if not found: }}
<span style="font-weight: bold; color: red;">NO LISTINGS!</span>
{{ pass }}
<div id="tab-1" class="tab-content current">
{{letters=['Finance', 'Accountant']
found=False
for jobs in details:
if jobs.category in letters:
found=True
}}
<div class="jobPosts">
<img width="80px" src="{{=URL('download', args=jobs.logo)}}" /><br />
Company: {{=jobs.company}}<br />
Post: {{=jobs.post}}<br />
Post Description: {{=jobs.post_description}}<br />
<span style="color: red; font-weight: bold;">Closing Date: {{=jobs.expiry_date}}</span><br />
</div><br />
{{pass}}
{{pass}}
{{if not found:}}
<span style="font-weight: bold; color: red;">NO LISTINGS!</span>
{{pass}}
</div>
Now i am in business!!!