Added head_styles Jinja block to base view template head section to allow for page specific style injections.

Continuing work on the re-design and clean-up of the dashboard view.
This commit is contained in:
Matt Scott 2023-02-19 09:11:44 -05:00
parent 58aabacd91
commit d70ded18c2
2 changed files with 20 additions and 20 deletions

View File

@ -17,6 +17,7 @@
{% if SETTING.get('custom_css') %} {% if SETTING.get('custom_css') %}
<link rel="stylesheet" href="/static/custom/{{ SETTING.get('custom_css') }}"> <link rel="stylesheet" href="/static/custom/{{ SETTING.get('custom_css') }}">
{% endif %} {% endif %}
{% block head_styles %}{% endblock %}
{% endblock %} {% endblock %}
</head> </head>

View File

@ -180,7 +180,8 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="card-body"> <!-- /.card-header -->
<div class="card-body p-0">
<div class="tab-content"> <div class="tab-content">
{% for boxId in custom_boxes.order %} {% for boxId in custom_boxes.order %}
<div class="tab-pane fade show" id='tab_{{ boxId }}'> <div class="tab-pane fade show" id='tab_{{ boxId }}'>
@ -195,6 +196,7 @@
</button> </button>
{% endif %} {% endif %}
</div> </div>
<!-- /.card-header -->
<div class="card-body table-responsive p-0 pt-2"> <div class="card-body table-responsive p-0 pt-2">
<table id='tbl_domain_list_{{ boxId }}' <table id='tbl_domain_list_{{ boxId }}'
class="table table-striped table-hover"> class="table table-striped table-hover">
@ -213,18 +215,33 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<!-- /.card-body -->
</div> </div>
<!-- /.tab-pane -->
{% endfor %} {% endfor %}
</div> </div>
<!-- /.tab-content -->
</div> </div>
<!-- /.card-body -->
</div> </div>
<!-- /.card -->
</div> </div>
<!-- /.col -->
</div> </div>
<!-- /.row -->
</div> </div>
<!-- /.container-fluid -->
</section> </section>
{% endblock %} {% endblock %}
{% block head_styles %}
<style type="text/css">
div.table-responsive > div.dataTables_wrapper > div.row:first-of-type { margin: 0 0.5em 0 0.5em; }
div.table-responsive > div.dataTables_wrapper > div.row:last-of-type { margin: 0.4em 0.5em 0.4em 0.5em; }
div.table-responsive > div.dataTables_wrapper table.dataTable { margin: 0!important; }
</style>
{% endblock %}
{% block extrascripts %} {% block extrascripts %}
<script> <script>
//SYBPATCH START// //SYBPATCH START//
@ -266,24 +283,6 @@
{% endfor %} {% endfor %}
//SYBPATCH END// //SYBPATCH END//
// set up history data table
$("#tbl_history").DataTable({
"paging": false,
"lengthChange": false,
"searching": false,
"ordering": false,
"info": false,
"autoWidth": true,
"columnDefs": [
{
"render": function (data, type, row) {
return moment.utc(data).local().format('YYYY-MM-DD HH:mm:ss');
},
"targets": 2
}
]
});
$(document.body).on('click', '.history-info-button', function () { $(document.body).on('click', '.history-info-button', function () {
var modal = $("#modal_history_info"); var modal = $("#modal_history_info");
var history_id = $(this).val(); var history_id = $(this).val();