Skip to content

Commit

Permalink
#26 增加对django-import-export插件支持
Browse files Browse the repository at this point in the history
  • Loading branch information
newpanjing committed Apr 29, 2019
1 parent 1c64180 commit e511060
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion simpleui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def get_version():
return '2.0.5'
return '2.0.6'
2 changes: 1 addition & 1 deletion simpleui/static/admin/simpleui-x/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
margin-left: 0px;
}

#content {
.change-list #content {
padding: 0px;
}

Expand Down
9 changes: 4 additions & 5 deletions simpleui/templates/admin/actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
{% endif %}
{% endfor %}


{# <el-button icon="el-icon-tickets"#}
{# href="?{% if cl.is_popup %}_popup=1{% endif %}">{% trans "Show all" %}({{ cl.full_result_count }})#}
{# </el-button>#}

{% if cl.formset and cl.result_count %}
<input type="hidden" name="_save" value="{% trans 'Save' %}"/>
<el-button icon="el-icon-circle-check-outline" type="success" @click="formSubmit()">{% trans 'Save' %}</el-button>
{% endif %}

{# <el-button icon="el-icon-upload2"></el-button>#}
{# <el-button icon="el-icon-download"></el-button>#}

</div>
<script type="text/javascript">
new Vue({
Expand Down
2 changes: 1 addition & 1 deletion simpleui/templates/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="stylesheet" href="//unpkg.com/[email protected]/lib/theme-chalk/index.css">
<link rel="stylesheet" href="{% static '/admin/simpleui-x/fontawesome-free-5.8.1-web/css/all.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}">
<link rel="stylesheet" href="{% static '/admin/simpleui-x/css/base.css' %}?_=2.0.4">
<link rel="stylesheet" href="{% static '/admin/simpleui-x/css/base.css' %}?_=2.1.0">
<link rel="stylesheet" href="{% static '/admin/simpleui-x/theme/simpleui.css' %}">

<script type="text/javascript" src="{% static '/admin/simpleui-x/js/vue.min.js' %}"></script>
Expand Down
27 changes: 25 additions & 2 deletions simpleui/templates/admin/change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css" %}?_=20180905"/>
{# <link rel="stylesheet" type="text/css" href="{% static "admin/simpleui/layui/css/layui.css" %}"/>#}
{# <link rel="stylesheet" type="text/css" href="{% static "admin/simpleui/layui/css/layui.css" %}"/>#}
{% if cl.formset %}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}"/>
{% endif %}
Expand Down Expand Up @@ -44,6 +44,29 @@

{% endblock %}
{% block content %}
<style>
.object-tools {
position: fixed;
top: 10px;
right: 20px;
height: 50px;
z-index: 2;
}
.object-tools .import_link,.object-tools .export_link{
color: white!important;
}

</style>
{% block object-tools %}
<ul class="object-tools">
{% block object-tools-items %}
{% if has_add_permission %}
{{ block.super }}
{% endif %}
{% endblock %}
</ul>
{% endblock %}

<div id="content-main">

{% if cl.formset.errors %}
Expand All @@ -65,7 +88,7 @@

{% block result_list %}

{% if action_form %}
{% if action_form %}
{% admin_actions %}
{% endif %}

Expand Down

0 comments on commit e511060

Please sign in to comment.