PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/django/contrib/admin/templates/mako/admin/filter.html

https://code.google.com/p/mango-py/
HTML | 47 lines | 26 code | 21 blank | 0 comment | 0 complexity | 7bf44e9484b224446e8c90ff557d02a0 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <%def name="filter(title='untitled', output='', multi=False, multitag=False, displaymulti=False, choices=[])" >
  2. <% filter_title = escape(title) %>
  3. % if not output:
  4. <h3> By ${filter_title}
  5. % if displaymulti:
  6. % if multi:
  7. <span class="modifier">(<a class="selected" href="?${multitag}">single</a>|<b>multi</b>)</span>
  8. % else:
  9. <span class="modifier">(<b>single</b>|<a class="selected" href="?${multitag}">multi</a>)</span>
  10. % endif
  11. % endif
  12. </h3>
  13. <ul>
  14. % for num,choice in enumerate(choices):
  15. <li
  16. % if choice['selected']:
  17. class="selected"
  18. % endif
  19. style="background: ${ '#efefef' if num%2 else '#e4e4e4' };">
  20. <a href="${choice['query_string']}">${choice['display']}</a></li>
  21. % endfor
  22. </ul>
  23. % else:
  24. ${output}
  25. % endif
  26. </%def>