Initial commit
This commit is contained in:
32
templates/admin/actions.html
Normal file
32
templates/admin/actions.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% import 'admin/static.html' as admin_static with context %}
|
||||
|
||||
{% macro dropdown(actions, btn_class='dropdown-toggle') -%}
|
||||
<a class="{{ btn_class }}" data-toggle="dropdown" href="javascript:void(0)"><b>{{ _gettext('With selected') }}</b><b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
{% for p in actions %}
|
||||
<li>
|
||||
<a href="javascript:void(0)" onclick="return modelActions.execute('{{ p[0] }}');">{{ _gettext(p[1]) }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro form(actions, url) %}
|
||||
{% if actions %}
|
||||
<form id="action_form" action="{{ url }}" method="POST" style="display: none">
|
||||
{% if csrf_token %}
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
{% endif %}
|
||||
<input type="hidden" id="action" name="action" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro script(message, actions, actions_confirmation) %}
|
||||
{% if actions %}
|
||||
<script src="{{ admin_static.url(filename='admin/js/actions-1.0.0.js') }}"></script>
|
||||
<script language="javascript">
|
||||
var modelActions = new AdminModelActions({{ message|tojson|safe }}, {{ actions_confirmation|tojson|safe }});
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
27
templates/admin/base.html
Normal file
27
templates/admin/base.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends 'base.html' %}
|
||||
{% import 'admin/layout.html' as layout with context -%}
|
||||
{% import 'admin/static.html' as admin_static with context %}
|
||||
|
||||
{% block head_css %}{{ super() }}
|
||||
<link href="{{ admin_static.url(filename='admin/css/bootstrap3/admin.css') }}" rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-2">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{{ layout.menu() }}
|
||||
{{ layout.menu_links() }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10">
|
||||
{% set render_ctx = h.resolve_ctx() %}
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block tail_js %}{{ super() }}
|
||||
<script src="{{ admin_static.url(filename='vendor/moment-2.8.4.min.js') }}" type="text/javascript"></script>
|
||||
<script src="{{ admin_static.url(filename='vendor/select2/select2.min.js') }}" type="text/javascript"></script>
|
||||
{{ pagedown.include_pagedown() }}
|
||||
{% endblock %}
|
||||
18
templates/admin/user_list.html
Normal file
18
templates/admin/user_list.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends 'admin/model/list.html' %}
|
||||
|
||||
{% block list_row_actions %}{{ super() }}
|
||||
{% if admin_view.can_impersonate %}
|
||||
<form class="icon" method="POST" action="{{ get_url('.impersonate_view') }}">
|
||||
{{ delete_form.id(value=get_pk_value(row)) }}
|
||||
{{ delete_form.url(value=return_url) }}
|
||||
{% if delete_form.csrf_token %}
|
||||
{{ delete_form.csrf_token }}
|
||||
{% elif csrf_token %}
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
{% endif %}
|
||||
<button onclick="return confirm('{{ _gettext('Are you sure you want to impersonate as this user?') }}');" title="Impersonate user">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user