interface updated
This commit is contained in:
@@ -677,3 +677,17 @@ body.dark-mode .export-description {
|
||||
text-align: left;
|
||||
border: 1px solid #ddd; /* Add borders to table cells */
|
||||
}
|
||||
|
||||
.go-to-main-etichete-btn {
|
||||
background-color: #28a745; /* Green background */
|
||||
color: #fff; /* White text */
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
text-decoration: none;
|
||||
margin-left: 10px;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.go-to-main-etichete-btn:hover {
|
||||
background-color: #218838; /* Darker green on hover */
|
||||
}
|
||||
@@ -26,6 +26,9 @@
|
||||
</div>
|
||||
<div class="right-header">
|
||||
<button id="theme-toggle" class="theme-toggle">Change to dark theme</button>
|
||||
{% if request.endpoint in ['main.upload_data', 'main.print_module', 'main.label_templates', 'main.create_template'] %}
|
||||
<a href="{{ url_for('main.etichete') }}" class="btn go-to-main-etichete-btn">Main Page Etichete</a>
|
||||
{% endif %}
|
||||
<a href="{{ url_for('main.dashboard') }}" class="btn go-to-dashboard-btn">Go to Dashboard</a>
|
||||
{% if 'user' in session %}
|
||||
<span class="user-info">You are logged in as {{ session['user'] }}</span>
|
||||
|
||||
@@ -3,40 +3,48 @@
|
||||
{% block title %}Create Template{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card-container" style="display: flex; gap: 20px;">
|
||||
<!-- Left Column -->
|
||||
<div class="left-column" style="flex: 1; display: flex; flex-direction: column; gap: 20px;">
|
||||
<!-- Card 1: Dimensions -->
|
||||
<div class="left-column" style="flex: 1; max-width: 33%;">
|
||||
<div class="dashboard-card">
|
||||
<h3>Dimensions</h3>
|
||||
<p>Set the dimensions of the label template:</p>
|
||||
<form id="dimensions-form">
|
||||
<label for="label-width">Width (mm):</label>
|
||||
<input type="number" id="label-width" name="label_width" required>
|
||||
<h3>Template Settings</h3>
|
||||
<p>Set the dimensions and retrieve database headers for the label template:</p>
|
||||
|
||||
<label for="label-height">Height (mm):</label>
|
||||
<input type="number" id="label-height" name="label_height" required>
|
||||
|
||||
<button type="button" id="set-dimensions-btn" class="btn">Set Dimensions</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Card 2: Get Database Headers -->
|
||||
<div class="dashboard-card">
|
||||
<h3>Get Database Headers</h3>
|
||||
<p>Retrieve column names from a selected database table:</p>
|
||||
<button type="button" id="get-tables-btn" class="btn">Get Database Tables</button>
|
||||
<div id="tables-container" style="margin-top: 10px;">
|
||||
<!-- Tables will be dynamically populated here -->
|
||||
<!-- Dimensions Section -->
|
||||
<div>
|
||||
<h4>Dimensions</h4>
|
||||
<form id="dimensions-form">
|
||||
<div style="margin-bottom: 10px;">
|
||||
<label for="label-width">Width (mm):</label>
|
||||
<input type="number" id="label-width" name="label_width" required>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<label for="label-height">Height (mm):</label>
|
||||
<input type="number" id="label-height" name="label_height" required>
|
||||
</div>
|
||||
<button type="button" id="set-dimensions-btn" class="btn">Set Dimensions</button>
|
||||
</form>
|
||||
</div>
|
||||
<div id="columns-container" style="margin-top: 10px;">
|
||||
<!-- Columns will be dynamically populated here -->
|
||||
|
||||
<hr style="margin: 20px 0;">
|
||||
|
||||
<!-- Get Database Headers Section -->
|
||||
<div>
|
||||
<h4>Get Database Headers</h4>
|
||||
<p>Retrieve column names from a selected database table:</p>
|
||||
<button type="button" id="get-tables-btn" class="btn">Get Database Tables</button>
|
||||
<div id="tables-container" style="margin-top: 10px;">
|
||||
<!-- Tables will be dynamically populated here -->
|
||||
</div>
|
||||
<div id="columns-container" style="margin-top: 10px;">
|
||||
<!-- Columns will be dynamically populated here -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right Column -->
|
||||
<div class="right-column" style="flex: 1;">
|
||||
<!-- Card 3: Interactive Label Preview -->
|
||||
<div class="right-column" style="flex: 2;">
|
||||
<div class="dashboard-card">
|
||||
<h3>Interactive Label Preview</h3>
|
||||
<p>Preview the label with selected headers:</p>
|
||||
|
||||
@@ -3,29 +3,19 @@
|
||||
{% block title %}Label Templates{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="">
|
||||
<div class="card-container">
|
||||
<h1>Manage Label Templates</h1>
|
||||
<p>This page will allow users to manage and configure label templates.</p>
|
||||
|
||||
<!-- Card: List of Label Templates -->
|
||||
<div class="dashboard-card">
|
||||
<div class="card">
|
||||
<h3>List of Label Templates</h3>
|
||||
<p>Below is the list of existing label templates:</p>
|
||||
<ul id="template-list">
|
||||
<!-- Example template items -->
|
||||
<li>
|
||||
<span>Template 1</span>
|
||||
<button class="btn edit-btn">Edit</button>
|
||||
<button class="btn delete-btn">Delete</button>
|
||||
</li>
|
||||
<li>
|
||||
<span>Template 2</span>
|
||||
<ul class="user-list">
|
||||
{% for template in templates %}
|
||||
<li data-template-id="{{ template.id }}">
|
||||
<span class="template-name">{{ template.name }}</span>
|
||||
<button class="btn edit-btn">Edit</button>
|
||||
<button class="btn delete-btn">Delete</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button id="create-template-btn" class="btn">Create New Template</button>
|
||||
<button id="create-template-btn" class="btn create-btn">Create New Template</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user