mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-10 07:30:26 +00:00
ac786f45be
Convert col-xs-* to just col-* as part of bootstrap v3 -> v4 Convert box-* -> card-* as part of bootstrap v3 -> v4 Moved domain actions on main dashboard to a dropdown menu to avoid clutter Added "Log Out" to top header left Hid OTP on admin edit user to only show the disable card & options if the user account has OTP enabled
76 lines
3.3 KiB
HTML
76 lines
3.3 KiB
HTML
{% macro name(domain) %}
|
|
<a href="{{ url_for('domain.domain', domain_name=domain.name) }}"><strong>{{ domain.name | pretty_domain_name }}</strong></a>
|
|
{% endmacro %}
|
|
|
|
{% macro dnssec(domain) %}
|
|
{% if domain.dnssec %}
|
|
<td><span style="cursor:pointer" class="btn btn-lg btn-success button_dnssec" id="{{ domain.name }}"><i class="fa fa-lock"></i> Enabled</span></td>
|
|
{% else %}
|
|
<td><span style="cursor:pointer" class="btn btn-sm btn-danger button_dnssec" id="{{ domain.name }}"><i class="fa fa-unlock-alt"></i> Disabled</span></td>
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro type(domain) %}
|
|
{{ domain.type }}
|
|
{% endmacro %}
|
|
|
|
{% macro serial(domain) %}
|
|
{% if domain.serial == '0' %}{{ domain.notified_serial }}{% else %}{{ domain.serial }}{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro master(domain) %}
|
|
{% if domain.master == '[]'%}-{% else %}{{ domain.master | display_master_name }}{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro account(domain) %}
|
|
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
|
{{ domain.account.name if domain.account else '-' }}
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro actions(domain) %}
|
|
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
|
<td width="6%">
|
|
|
|
<div class="dropdown">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Options
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
|
|
<button class="dropdown-item btn-success button_template" id="{{ domain.name }}" type="button">
|
|
<i class="fa fa-clone"></i> Template
|
|
</button>
|
|
<button class="dropdown-item btn-success" type="button" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
|
|
<i class="fa fa-cog"></i> Manage
|
|
</button>
|
|
<button class="dropdown-item btn-danger" type="button" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'">
|
|
<i class="fa fa-cog"></i> Admin
|
|
</button>
|
|
<button class="dropdown-item btn-primary" type="button" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
|
|
<i class="fa fa-history" aria-hidden="true"></i> Changelog
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
</td>
|
|
{% else %}
|
|
<td width="6%">
|
|
<div class="dropdown">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Options
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
|
|
<button class="dropdown-item btn-success" type="button" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
|
|
<i class="fa fa-cog"></i> Manage
|
|
</button>
|
|
{% if allow_user_view_history %}
|
|
<button class="dropdown-item btn-primary" type="button" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
|
|
<i class="fa fa-history" aria-hidden="true"></i> Changelog
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</td>
|
|
{% endif %}
|
|
{% endmacro %}
|