blob: 4cc4afe3bd2a0bd80227bb0710af1bb6c8ca7589 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
{% load i18n %}
<div class="table_actions">
{% block table_filter %}
{% if filter.filter_type == 'fixed' %}
<div class="table_filter btn-group" data-toggle="buttons-radio">
{% for button in filter.fixed_buttons %}
<button name="{{ filter.get_param_name }}" type="submit" value="{{ button.value }}" class="btn btn-default btn-sm{% ifequal button.value filter.filter_string %} active{% endifequal %}">{% if button.icon %}<i class="{{ button.icon }}"></i> {% endif %}{{ button.text }}{% if button.count >= 0 %} ({{ button.count }}){% endif %}</button>
{% endfor %}
</div>
{% elif filter.filter_type == 'query' %}
<div class="table_search client">
<div class="form-group input-group">
<input class="form-control" value="{{ filter.filter_string|default:'' }}" type="text" name="{{ filter.get_param_name }}" />
<span class="input-group-btn">
<button class="btn btn-default" type="submit" {{ filter.attr_string|safe }}>
<span class="fa fa-lg fa-filter"></span>
</button>
</span>
</div>
</div>
{% elif filter.filter_type == 'server' %}
<div class="table_search">
<div class="filter_select">
<select name="{{ filter.get_param_name }}_field" class="form-control">
{% for choice in filter.filter_choices %}
<option value="{{ choice.0 }}" {% if choice.0 == filter.filter_field %} selected{% endif %}>{{ choice.1 }}</option>
{% endfor %}
</select>
<span class="caret"></span>
</div>
<div class="form-group input-group">
<input class="form-control filter_select_input" value="{{ filter.filter_string|default:'' }}" type="text" name="{{ filter.get_param_name }}" />
<span class="input-group-btn">
<button class="btn btn-default" type="submit" {{ filter.attr_string|safe }}>
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
</div>
{% endif %}
{% endblock table_filter %}
{% block table_actions %}
<div class="table_actions pull-right">
{% for action in table_actions_buttons %}
{% include "horizon/common/_data_table_table_action.html" %}
{% endfor %}
{% if table_actions_menu|length > 0 %}
<div class="btn-group table_actions_menu">
<a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#">
{% if table_actions_buttons|length > 0 %}
{% trans "More Actions" %}
{% else %}
{% trans "Actions" %}
{% endif %}
<span class="caret"></span>
</a>
<ul class="dropdown-menu clearfix">
{% for action in table_actions_menu %}
<li class="clearfix">
{% include "horizon/common/_data_table_table_action.html" %}
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endblock table_actions %}
</div>
|