superset base_list 源码
superset base_list 代码
文件路径:/superset/templates/appbuilder/general/widgets/base_list.html
{#
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
#}
{% import 'appbuilder/general/lib.html' as lib %}
{% set can_add = "can_add" | is_item_visible(modelview_name) %}
{% set can_show = "can_show" | is_item_visible(modelview_name) %}
{% set can_edit = "can_edit" | is_item_visible(modelview_name) %}
{% set can_delete = "can_delete" | is_item_visible(modelview_name) %}
{% set actions = actions | get_actions_on_list(modelview_name) %}
{% if can_add %}
<span class="list-add-action">
{% set path = url_for(modelview_name + '.add') %}
{% set path = path | set_link_filters(filters) %}
{{ lib.lnk_add(path) }}
</span>
{% endif %}
{% if count > 0 %}
{% block begin_content scoped %}
{% endblock %}
{% block begin_loop_header scoped %}
{% endblock %}
{% block begin_loop_values %}
{% endblock %}
{% block end_content scoped %}
{% endblock %}
<div class="form-actions-container">
{{ lib.render_actions(actions, modelview_name) }}
</div>
{{ lib.action_form(actions,modelview_name) }}
<div class="pagination-container pull-right">
<strong>{{ _('Record Count') }}:</strong> {{ count }}
{{ lib.render_pagination(page, page_size, count, modelview_name) }}
{{ lib.render_set_page_size(page, page_size, count, modelview_name) }}
</div>
<script language="javascript">
var modelActions = new AdminActions();
</script>
{% else %}
<b>{{_("No records found")}}</b>
{% endif %}
相关信息
相关文章
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦