PageRenderTime 54ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://code.google.com/p/mango-py/
HTML | 131 lines | 103 code | 28 blank | 0 comment | 0 complexity | 37c05cea1880782bdfca9a3f8af7b7a4 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <%inherit file="admin/base_site.html"/>
  2. <%namespace name="admin" module="django.contrib.admin.templatetags.adminmedia" />
  3. ${self.block_stylesheet()}<%def name="block_stylesheet()">${ admin_media_prefix() }css/changelists.css</%def>
  4. <%def name="block_extrastyle()">
  5. % if cl.formset:
  6. <link rel="stylesheet" type="text/css" href="${ admin_media_prefix() }css/forms.css" />
  7. % endif
  8. % if cl.formset or action_form:
  9. <script type="text/javascript" src="../../jsi18n/"></script>
  10. % endif
  11. ${ "".join([S for S in media.render_css()]) }
  12. % if not actions_on_top and not actions_on_bottom:
  13. <style>
  14. #changelist table thead th:first-child {width: inherit}
  15. </style>
  16. % endif
  17. </%def>
  18. ${self.block_extrastyle()}
  19. <%def name="block_extrahead()">
  20. ${ "".join([S for S in media.render_js()]) }
  21. % if action_form:
  22. % if actions_on_top or actions_on_bottom:
  23. <script type="text/javascript">
  24. (function($) {
  25. $(document).ready(function($) {
  26. $("tr input.action-select").actions();
  27. });
  28. })(django.jQuery);
  29. </script>
  30. % endif
  31. % endif
  32. </%def>
  33. ${self.block_bodyclass()}<%def name="block_bodyclass()">change-list</%def>
  34. % if not is_popup:
  35. ${self.block_breadcrumbs()}<%def name="block_breadcrumbs()"><div class="breadcrumbs"><a href="../../">${trans("Home")}</a> &rsaquo; <a href="../">${ escape(capfirst(app_label)) }</a> &rsaquo; ${ capfirst(cl.opts.verbose_name_plural)|escape }</div></%def>
  36. % endif
  37. ${self.block_coltype()}<%def name="block_coltype()">flex</%def>
  38. ${self.block_content()}<%def name="block_content()">
  39. <div id="content-main">
  40. <%def name="block_object_tools()">
  41. % if has_add_permission:
  42. <ul class="object-tools"><li><a href="add/${'?_popup=1' if is_popup else ''}" class="addlink"><%def name="blocktrans()">Add ${cl.opts.verbose_name|escape}</%def>${blocktrans()}</a></li></ul>
  43. % endif
  44. </%def>${block_object_tools()}
  45. <div class="module ${'filtered' if cl.has_filters else ''}" id="changelist">
  46. <%def name="block_search()"><% show_result_count = (cl.result_count != cl.full_result_count) %><%include file="admin/search_form.html"/></%def>${block_search()}
  47. <%def name="block_date_hierarchy()">${ date_hierarchy(cl) }</%def>
  48. <%def name="block_filters()">
  49. % if cl.has_filters:
  50. <div id="changelist-filter">
  51. <h2>${trans('Filter')}</h2>
  52. <%namespace file="filter.html" name="filter"/>
  53. <%
  54. def admin_list_filter(cl, spec):
  55. if spec.HAS_OWN_OUTPUT:
  56. filter.filter(title=spec.title(), output=spec.output(cl), multi=spec.multiselect, multitag=spec.multitag, displaymulti=spec.displaymulti)
  57. else:
  58. filter.filter(title=spec.title(), choices=list(spec.choices(cl)), multi=spec.multiselect, multitag=spec.multitag, displaymulti=spec.displaymulti)
  59. return ""
  60. %>
  61. % for spec in cl.filter_specs:
  62. ${ admin_list_filter(cl,spec) }
  63. % endfor
  64. </div>
  65. % endif
  66. </%def>${block_filters()}
  67. <form action="" method="post"
  68. % if cl.formset and cl.formset.is_multipart:
  69. enctype="multipart/form-data"
  70. % endif
  71. >${ csrf_tag(csrf_token) }
  72. % if cl.formset:
  73. ${ cl.formset.non_form_errors() }
  74. ${ cl.formset.management_form }
  75. % endif
  76. <%def name="block_result_list()">
  77. <%
  78. from django.contrib.admin.templatetags.admin_list import result_list
  79. %>
  80. % if action_form and actions_on_top and cl.full_result_count:
  81. <%namespace file="actions.html" name="admin_actions"/>
  82. ${ admin_actions.admin_actions(action_form) }
  83. % endif
  84. <%namespace file="change_list_results.html" name="clr"/>
  85. <% results = result_list(cl) %>
  86. ${ clr.change_list_results(results['cl'], results['result_headers'], results['results'] ) }
  87. % if action_form and actions_on_bottom and cl.full_result_count:
  88. <%namespace file="actions.html" name="admin_actions"/>
  89. ${ admin_actions.admin_actions(action_form) }
  90. % endif
  91. </%def>${ block_result_list() }
  92. <%def name="block_pagination()">
  93. <%
  94. from django.contrib.admin.templatetags.admin_list import pagination
  95. %>
  96. <%namespace file="pagination.html" name="pag"/>
  97. <% result = pagination(cl) %>
  98. ${ pag.pagination( result['cl'], result['pagination_required'], result['show_all_url'], result['page_range'], result['ALL_VAR']) }
  99. </%def>${ block_pagination() }
  100. </form>
  101. </div>
  102. </div>
  103. </%def>