PageRenderTime 223ms CodeModel.GetById 120ms app.highlight 3ms RepoModel.GetById 98ms 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
  1<%inherit file="admin/base_site.html"/>
  2<%namespace name="admin" module="django.contrib.admin.templatetags.adminmedia" />
  3
  4${self.block_stylesheet()}<%def name="block_stylesheet()">${ admin_media_prefix() }css/changelists.css</%def>
  5
  6<%def name="block_extrastyle()">
  7% if cl.formset:
  8    <link rel="stylesheet" type="text/css" href="${ admin_media_prefix() }css/forms.css" />
  9% endif
 10% if cl.formset or action_form:
 11    <script type="text/javascript" src="../../jsi18n/"></script>
 12% endif
 13${ "".join([S for S in media.render_css()]) }
 14% if not actions_on_top and not actions_on_bottom:
 15    <style>
 16      #changelist table thead th:first-child {width: inherit}
 17    </style>
 18% endif
 19</%def>
 20${self.block_extrastyle()}
 21
 22<%def name="block_extrahead()">
 23${ "".join([S for S in media.render_js()]) }
 24% if action_form:
 25    % if actions_on_top or actions_on_bottom:
 26<script type="text/javascript">
 27(function($) {
 28    $(document).ready(function($) {
 29        $("tr input.action-select").actions();
 30    });
 31})(django.jQuery);
 32</script>
 33    % endif
 34% endif
 35</%def>
 36
 37${self.block_bodyclass()}<%def name="block_bodyclass()">change-list</%def>
 38
 39
 40% if not is_popup:
 41${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>
 42% endif
 43
 44
 45${self.block_coltype()}<%def name="block_coltype()">flex</%def>
 46
 47${self.block_content()}<%def name="block_content()">
 48<div id="content-main">
 49<%def name="block_object_tools()">
 50
 51% if has_add_permission:
 52<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>
 53% endif
 54
 55</%def>${block_object_tools()}
 56<div class="module ${'filtered' if cl.has_filters else ''}" id="changelist">
 57<%def name="block_search()"><% show_result_count = (cl.result_count != cl.full_result_count) %><%include file="admin/search_form.html"/></%def>${block_search()}
 58<%def name="block_date_hierarchy()">${ date_hierarchy(cl) }</%def>
 59
 60<%def name="block_filters()">
 61
 62% if cl.has_filters:
 63
 64<div id="changelist-filter">
 65<h2>${trans('Filter')}</h2>
 66
 67<%namespace file="filter.html" name="filter"/>
 68<%
 69    def admin_list_filter(cl, spec):
 70        if spec.HAS_OWN_OUTPUT:
 71                filter.filter(title=spec.title(), output=spec.output(cl), multi=spec.multiselect, multitag=spec.multitag, displaymulti=spec.displaymulti)
 72        else:
 73                filter.filter(title=spec.title(), choices=list(spec.choices(cl)), multi=spec.multiselect, multitag=spec.multitag, displaymulti=spec.displaymulti)
 74                
 75        return ""
 76%>
 77% for spec in cl.filter_specs:
 78
 79   ${ admin_list_filter(cl,spec) }
 80
 81% endfor
 82
 83</div>
 84
 85% endif
 86
 87</%def>${block_filters()}
 88
 89<form action="" method="post"
 90% if cl.formset and cl.formset.is_multipart:
 91enctype="multipart/form-data"
 92% endif
 93>${ csrf_tag(csrf_token) }
 94      % if cl.formset:
 95        ${ cl.formset.non_form_errors() }
 96        ${ cl.formset.management_form }
 97      % endif
 98
 99<%def name="block_result_list()">
100<%
101    from django.contrib.admin.templatetags.admin_list import result_list
102%>
103% if action_form and actions_on_top and cl.full_result_count:
104    <%namespace file="actions.html" name="admin_actions"/>
105    ${ admin_actions.admin_actions(action_form) }
106% endif
107<%namespace file="change_list_results.html" name="clr"/>
108<% results = result_list(cl) %>
109${ clr.change_list_results(results['cl'], results['result_headers'], results['results'] ) }
110% if action_form and actions_on_bottom and cl.full_result_count:
111    <%namespace file="actions.html" name="admin_actions"/>
112    ${ admin_actions.admin_actions(action_form) }
113% endif
114</%def>${ block_result_list() }
115
116
117
118<%def name="block_pagination()">
119<%
120    from django.contrib.admin.templatetags.admin_list import pagination
121%>
122<%namespace file="pagination.html" name="pag"/>
123<% result = pagination(cl) %>
124${ pag.pagination( result['cl'], result['pagination_required'], result['show_all_url'], result['page_range'], result['ALL_VAR']) }
125
126</%def>${ block_pagination() }
127</form>
128
129</div>
130</div>
131</%def>