Reduced overall font size a touch

This commit is contained in:
2020-03-22 12:15:55 +00:00
parent 50ca782569
commit 41b0387e49
8 changed files with 211 additions and 202 deletions

View File

@@ -19,7 +19,7 @@
<h1 class="text-center">Asset List</h1>
</div>
<form id="asset-search-form" method="get" class="form my-2">
<form id="asset-search-form" method="GET" class="form my-2">
<div class="row my-2">
<div class="input-group">
{% render_field form.query|add_class:'form-control' placeholder='Search by Asset ID/Desc/Serial' style="width: 250px"%}
@@ -30,33 +30,34 @@
<div class="row my-2 justify-content-end">
<div id="category-group" class="form-group px-2">
<label for="category" class="sr-only">Category</label>
{% render_field form.category|attr:'multiple'|add_class:'form-control custom-select selectpicker' data-none-selected-text="Categories" data-header="Categories" data-actions-box="true" %}
{% render_field form.category|attr:'multiple'|add_class:'form-control custom-select selectpicker col-xs' data-none-selected-text="Categories" data-header="Categories" data-actions-box="true" %}
</div>
<div id="status-group" class="form-group px-2">
<label for="status" class="sr-only">Status</label>
{% render_field form.status|attr:'multiple'|add_class:'form-control custom-select selectpicker' data-none-selected-text="Statuses" data-header="Statuses" data-actions-box="true" %}
{% render_field form.status|attr:'multiple'|add_class:'form-control custom-select selectpicker col-xs' data-none-selected-text="Statuses" data-header="Statuses" data-actions-box="true" %}
</div>
<!---TODO: Auto filter whenever an option is selected, instead of using a button -->
<button id="filter-submit" type="submit" class="btn btn-secondary">Filter</button>
</div>
</form>
<a href="{% url 'asset_create' %}" class="btn btn-success float-right my-3">New <i class="fas fa-plus"></i></a>
<table class="table">
<thead>
<tr>
<th scope="col">Asset ID</th>
<th scope="col">Description</th>
<th scope="col">Category</th>
<th scope="col">Status</th>
<th scope="col" class="hidden-xs">Quick Links</th>
</tr>
</thead>
<tbody id="asset_table_body">
{% include 'partials/asset_list_table_body.html' %}
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">Asset ID</th>
<th scope="col" class="w-25">Description</th>
<th scope="col">Category</th>
<th scope="col">Status</th>
<th scope="col" class="d-none d-sm-block">Quick Links</th>
</tr>
</thead>
<tbody id="asset_table_body">
{% include 'partials/asset_list_table_body.html' %}
</tbody>
</table>
</div>
{% if is_paginated %}
<div class="text-center">

View File

@@ -1,15 +1,15 @@
{% for item in object_list %}
<tr class="{{ item.status.display_class|default:'' }} assetRow">
<th scope="row" style="vertical-align: middle;"><a class="assetID" href="{% url 'asset_detail' item.asset_id %}">{{ item.asset_id }}</a></th>
<td class="assetDesc" style="vertical-align: middle; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; max-width: 25vw">{{ item.description }}</td>
<td class="assetCategory" style="vertical-align: middle;">{{ item.category }}</td>
<td class="assetStatus" style="vertical-align: middle;">{{ item.status }}</td>
<td class="hidden-xs">
<div class="btn-group" role="group">
<a type="button" class="btn btn-primary btn-sm" href="{% url 'asset_detail' item.asset_id %}"><i class="fas fa-eye"></i> View</a>
<th scope="row"><a class="assetID" href="{% url 'asset_detail' item.asset_id %}">{{ item.asset_id }}</a></th>
<td class="assetDesc w-25">{{ item.description }}</td>
<td class="assetCategory">{{ item.category }}</td>
<td class="assetStatus">{{ item.status }}</td>
<td class="d-none d-sm-block">
<div class="btn-group d-flex" role="group">
<a type="button" class="btn btn-primary btn-sm flex-nowrap" href="{% url 'asset_detail' item.asset_id %}"><span class="fas fa-eye fa-fw text-nowrap"></span><span class="d-none d-md-block text-nowrap"> View</span></a>
{% if perms.assets.change_asset %}
<a type="button" class="btn btn-warning btn-sm" href="{% url 'asset_update' item.asset_id %}"><i class="fas fa-edit"></i> Edit</a>
<a type="button" class="btn btn-secondary btn-sm" href="{% url 'asset_duplicate' item.asset_id %}"><i class="fas fa-clone"></i> Duplicate</a>
<a type="button" style="display: inline !important; white-space: no-wrap !important;" class="btn btn-warning btn-sm text-nowrap flex-nowrap" href="{% url 'asset_update' item.asset_id %}"><span class="fas fa-edit fa-fw" style="display: inline !important;"></span><span class="d-none d-md-block"> Edit</span></a>
<a type="button" class="btn btn-secondary btn-sm text-nowrap" href="{% url 'asset_duplicate' item.asset_id %}"><span class="fas fa-clone fa-fw"></span><span class="d-none d-md-block"> Duplicate</span></a>
{% endif %}
</div>
</td>