Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/dyn_dt/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
def dynamic_dt():
context = {
'routes': config.Config.DYNAMIC_DATATB.keys(),
'segment': 'dynamic_dt'
'segment': 'dynamic_dt',
'parent': 'dashboard',
}
return render_template('dyn_dt/index.html', **context)

Expand Down Expand Up @@ -167,6 +168,7 @@ def model_dt(aPath):
'fk_fields_keys': fk_fields.keys(),
'fk_fields': fk_fields,
'segment': 'dynamic_dt',
'parent': 'dashboard',
'choices_dict': choices_dict,
'exclude_auto_gen_fields': exclude_auto_gen_fields(aModelClass)
}
Expand Down
2 changes: 1 addition & 1 deletion apps/home/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@blueprint.route('/')
@blueprint.route('/index')
def index():
return render_template('pages/index.html', segment='dashboard')
return render_template('pages/index.html', segment='dashboard', parent="dashboard")

@blueprint.route('/billing')
def billing():
Expand Down
Binary file added apps/static/assets/img/csv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/static/assets/img/export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 16 additions & 38 deletions apps/templates/dyn_dt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,23 @@

{% block content %}

<div class="pc-container">
<div class="pc-content">
<!-- [ breadcrumb ] start -->
<div class="page-header">
<div class="page-block">
<div class="row align-items-center">
<div class="col-md-12">
<div class="page-header-title">
<h5 class="mb-0">Profile</h5>
</div>
</div>
<div class="col-md-12">
<ul class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="{{ url_for('home_blueprint.index') }}">Home</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0)">Basic UI</a></li>
<li class="breadcrumb-item" aria-current="page">Profile</li>
</ul>
</div>
</div>
</div>
</div>
<!-- [ breadcrumb ] end -->

<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-header">
<h5>Available Routes (defined in config.DYNAMIC_DATATB)</h5>
</div>
<div class="card-block px-4">
<ul class="pc-submenu mt-3">
{% for link in routes %}
<li class="pc-item">
<a class="pc-link" href="{{ url_for('table_blueprint.model_dt', aPath=link) }}">{{ link }}</a>
</li>
{% endfor %}
</ul>
</div>
<div class="container-fluid py-4">
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-header p-2 ps-3">
<h4 class="mb-0">Available Routes (defined in config.DYNAMIC_DATATB)</h4>
</div>
<div class="card-body">
<ul class="">
{% for link in routes %}
<li class="">
<a class="" href="{{ url_for('table_blueprint.model_dt', aPath=link) }}">{{ link }}</a>
</li>
{% endfor %}
</ul>

</div>
</div>
</div>
Expand Down
737 changes: 358 additions & 379 deletions apps/templates/dyn_dt/model.html

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions apps/templates/includes/items-table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

<div class="dt-responsive table-responsive">
<table class="table">
<thead>
<tr>
{% for field in db_field_names %}
<th id="th_{{ field }}_export" class="px-0" scope="col">{{ field }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
{% for field_name in db_field_names %}
{% if field_name in choices_dict %}
<td class="td_{{ field_name }} px-0">{{ item|getenumattribute(field_name) }}</td>
{% else %}
<td class="td_{{ field_name }} px-0">{{ item|getattribute(field_name) }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
21 changes: 19 additions & 2 deletions apps/templates/includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ul class="navbar-nav">

<li class="nav-item">
<a class="nav-link {% if segment == 'dashboard' %}active{% endif %}" href="{{ url_for('home_blueprint.index') }}">
<div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
<a data-bs-toggle="collapse" href="#dashboard-dropdown" class="nav-link {% if 'dashboard' in parent %}active{% endif %}" aria-controls="dashboard-dropdown" role="button" aria-expanded="false">
<div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center d-flex align-items-center justify-content-center me-2">
<svg width="12px" height="12px" viewBox="0 0 45 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>shop </title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
Expand All @@ -29,7 +29,24 @@
</div>
<span class="nav-link-text ms-1">Dashboard</span>
</a>
<div class="collapse {% if 'dashboard' in parent %}show{% endif %} " id="dashboard-dropdown">
<ul class="nav ms-4 ps-3">
<li class="nav-item {% if 'dashboard' in segment %}active{% endif %}">
<a class="nav-link {% if 'dashboard' in segment %}active{% endif %}" href="{{ url_for('home_blueprint.index') }}">
<span class="sidenav-mini-icon"> D </span>
<span class="sidenav-normal"> Default </span>
</a>
</li>
<li class="nav-item {% if 'dynamic_dt' in segment %}active{% endif %}">
<a class="nav-link {% if 'dynamic_dt' in segment %}active{% endif %}" href="{{ url_for('table_blueprint.dynamic_dt') }}">
<span class="sidenav-mini-icon"> D </span>
<span class="sidenav-normal"> Dynamic DT </span>
</a>
</li>
</ul>
</div>
</li>

<li class="nav-item">
<a class="nav-link {% if segment == 'tables' %}active{% endif %}" href="{{ url_for('home_blueprint.tables') }}">
<div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
Expand Down