powerdns-admin/powerdnsadmin/templates/dashboard_domain.html
Tyler Todd ac786f45be Remove btn-flat to convert to round buttons (first pass)
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
2023-02-06 15:45:13 +00:00

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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;Changelog
</button>
{% endif %}
</div>
</div>
</td>
{% endif %}
{% endmacro %}