default sorts work

This commit is contained in:
Sanj 2011-09-10 07:27:41 +05:30
parent 152d7ed9dc
commit 519b0c3e33
2 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@ def main(request, module_slug):
'title': m.title,
'default_tab': tabs[0],
'default_list': default_tab_list,
'default_sorts': default_tab.get_dict()['sorts'],
'tabs': tabs[1:]
})
return render_to_response("noel/insidepage.html", context)

View File

@ -52,10 +52,15 @@
<!--is this select okay, my forms are a bit weak, do we need action and method here?--><form class="selectMenu" action="" method="post">
<span>Order by</span><!--Can i avoid a p tag here to keep it inline-->
<select id="orderBySelect">Select
{% for s in default_sorts %}
<option value="{{s.operator}}{{s.field_name}}">{{s.friendly_name}}</option>
{% endfor %}
<!--
<option value="atoz">A-Z</option>
<option value="ztoa">Z-A</option>
<option value="title">Title</option>
<option value="mostpopular">Most popular</option>
-->
</select>
</form>
@ -66,7 +71,7 @@
<div id="listLeft">
<ul>
<li id="loadingList">Loading...</li>
{% for l in default_list %}
{% for l in default_list.items %}
<li class="tabListItem"><a href="{{ l.url }}" data-id="{{ l.id }}"><span>{{ l.title }}</span></a></li>
{% endfor %}
<!-- <li><a href=""><span>The Mystery of vanishing rights<span></a></li> -->