Merge pull request #239 from eReuse/change/#3202-change-tag-for-unique-identifier

change tags for unique identifiers
This commit is contained in:
cayop 2022-04-28 18:47:55 +02:00 committed by GitHub
commit 09c5126b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 46 additions and 38 deletions

View File

@ -191,15 +191,6 @@
</ul> </ul>
</li><!-- End Temporal Lots Nav --> </li><!-- End Temporal Lots Nav -->
<li class="nav-heading">Utils</li>
<li class="nav-item">
<a class="nav-link collapsed" href="{{ url_for('labels.label_list')}}">
<i class="bi bi-tags"></i>
<span>Tags</span>
</a>
</li><!-- End Tags Page Nav -->
</ul> </ul>
</aside><!-- End Sidebar--> </aside><!-- End Sidebar-->
@ -238,4 +229,4 @@
</div> </div>
</footer><!-- End Footer --> </footer><!-- End Footer -->
{% endblock body %} {% endblock body %}

View File

@ -3,14 +3,14 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Adding to a tag</h5> <h5 class="modal-title">Adding to a unique identifier</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<form action="{{ url_for('inventory.tag_devices_add') }}" method="post"> <form action="{{ url_for('inventory.tag_devices_add') }}" method="post">
{{ form_tag_device.csrf_token }} {{ form_tag_device.csrf_token }}
<div class="modal-body"> <div class="modal-body">
Please write a name of a tag Please write a name of a unique identifier
<select class="form-control selectpicker" id="selectTag" name="tag" data-live-search="true"> <select class="form-control selectpicker" id="selectTag" name="tag" data-live-search="true">
{% for tag in tags %} {% for tag in tags %}
<option value="{{ tag.id }}">{{ tag.id }}</option> <option value="{{ tag.id }}">{{ tag.id }}</option>
@ -18,7 +18,7 @@
</select> </select>
<input class="devicesList" type="hidden" name="device" /> <input class="devicesList" type="hidden" name="device" />
<p class="text-danger pol"> <p class="text-danger pol">
You need select first one device and only one for add this in a tag You need select first one device and only one for add this in a unique identifier
</p> </p>
</div> </div>

View File

@ -217,25 +217,42 @@
</div> </div>
<div class="btn-group dropdown m-1" uib-dropdown=""> <div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnTags" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <button id="btnUniqueID" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-tag"></i> <i class="bi bi-tag"></i>
Tags Unique Identifiers
</button> </button>
<span class="d-none" id="unlinkTagAlertModal" data-bs-toggle="modal" data-bs-target="#unlinkTagErrorModal"></span> <span class="d-none" id="unlinkTagAlertModal" data-bs-toggle="modal" data-bs-target="#unlinkTagErrorModal"></span>
<span class="d-none" id="addTagAlertModal" data-bs-toggle="modal" data-bs-target="#addingTagModal"></span> <span class="d-none" id="addTagAlertModal" data-bs-toggle="modal" data-bs-target="#addingTagModal"></span>
<ul class="dropdown-menu" aria-labelledby="btnTags"> <ul class="dropdown-menu" aria-labelledby="btnUniqueID">
<li> <li>
<a href="javascript:addTag()" class="dropdown-item"> <a href="javascript:addTag()" class="dropdown-item">
<i class="bi bi-plus"></i> <i class="bi bi-plus"></i>
Add Tag to selected Device Add Unique Identifier to selected Device
</a> </a>
</li> </li>
<li> <li>
<a href="javascript:removeTag()" class="dropdown-item"> <a href="javascript:removeTag()" class="dropdown-item">
<i class="bi bi-x"></i> <i class="bi bi-x"></i>
Remove Tag from selected Device Remove Unique Identifier from selected Device
</a> </a>
</li> </li>
<li>
<a class="dropdown-item" href="{{ url_for('labels.label_list')}}">
<i class="bi bi-tools"></i>
Unique Identifier Management
</a>
</li>
</ul>
</div>
<div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnTags" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-tag"></i>
Labels
</button>
<span class="d-none" id="unlinkTagAlertModal" data-bs-toggle="modal" data-bs-target="#unlinkTagErrorModal"></span>
<span class="d-none" id="addTagAlertModal" data-bs-toggle="modal" data-bs-target="#addingTagModal"></span>
<ul class="dropdown-menu" aria-labelledby="btnTags">
<li> <li>
<form id="print_labels" method="post" action="{{ url_for('labels.print_labels') }}"> <form id="print_labels" method="post" action="{{ url_for('labels.print_labels') }}">
{% for f in form_print_labels %} {% for f in form_print_labels %}
@ -318,7 +335,7 @@
<th scope="col">Select</th> <th scope="col">Select</th>
<th scope="col">Title</th> <th scope="col">Title</th>
<th scope="col">DHID</th> <th scope="col">DHID</th>
<th scope="col">Tags</th> <th scope="col">Unique Identifiers</th>
<th scope="col">Status</th> <th scope="col">Status</th>
<th scope="col" data-type="date" data-format="DD-MM-YYYY">Update</th> <th scope="col" data-type="date" data-format="DD-MM-YYYY">Update</th>
</tr> </tr>

View File

@ -18,8 +18,8 @@
<div class="card-body"> <div class="card-body">
<div class="pt-4 pb-2"> <div class="pt-4 pb-2">
<h1 class="card-title text-center pb-0 fs-4">Unlink Tag from Device</h1> <h1 class="card-title text-center pb-0 fs-4">Unlink Unique Identifier from Device</h1>
<p class="text-center small">Please enter a code for the tag.</p> <p class="text-center small">Please enter a code for the unique identifier.</p>
{% if form.form_errors %} {% if form.form_errors %}
<p class="text-danger"> <p class="text-danger">
{% for error in form.form_errors %} {% for error in form.form_errors %}
@ -33,10 +33,10 @@
{{ form.csrf_token }} {{ form.csrf_token }}
<div> <div>
<label for="tag" class="form-label">Tag</label> <label for="tag" class="form-label">Unique Identifier</label>
<div class="input-group has-validation"> <div class="input-group has-validation">
{{ form.tag(class_="form-control") }} {{ form.tag(class_="form-control") }}
<div class="invalid-feedback">Please select tag.</div> <div class="invalid-feedback">Please select unique identifier.</div>
</div> </div>
{% if form.tag.errors %} {% if form.tag.errors %}
<p class="text-danger"> <p class="text-danger">

View File

@ -5,8 +5,8 @@
<h1>Inventory</h1> <h1>Inventory</h1>
<nav> <nav>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Tag management</a></li> <li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Unique Identifier management</a></li>
<li class="breadcrumb-item active">Tag details {{ tag.id }}</li> <li class="breadcrumb-item active">Unique Identifier details {{ tag.id }}</li>
</ol> </ol>
</nav> </nav>
</div><!-- End Page Title --> </div><!-- End Page Title -->
@ -26,7 +26,7 @@
<div class="row"> <div class="row">
<div class="col-lg-3 col-md-4 label ">Type</div> <div class="col-lg-3 col-md-4 label ">Type</div>
<div class="col-lg-9 col-md-8">{% if tag.provider %}UnNamed Tag{% else %}Named{% endif %}</div> <div class="col-lg-9 col-md-8">{% if tag.provider %}UnNamed Unique Identifier{% else %}Named Unique Identifier{% endif %}</div>
</div> </div>
<div class="row"> <div class="row">

View File

@ -22,7 +22,7 @@
<div class="btn-group dropdown m-1"> <div class="btn-group dropdown m-1">
<a href="{{ url_for('labels.tag_add')}}" type="button" class="btn btn-primary"> <a href="{{ url_for('labels.tag_add')}}" type="button" class="btn btn-primary">
<i class="bi bi-plus"></i> <i class="bi bi-plus"></i>
Create Named Tag Create Named Unique Identifier
<span class="caret"></span> <span class="caret"></span>
</a> </a>
</div> </div>
@ -30,7 +30,7 @@
<div class="btn-group dropdown m-1" uib-dropdown=""> <div class="btn-group dropdown m-1" uib-dropdown="">
<a href="{{ url_for('labels.tag_unnamed_add')}}" type="button" class="btn btn-primary"> <a href="{{ url_for('labels.tag_unnamed_add')}}" type="button" class="btn btn-primary">
<i class="bi bi-plus"></i> <i class="bi bi-plus"></i>
Create UnNamed Tag Create UnNamed Unique Identifier
<span class="caret"></span> <span class="caret"></span>
</a> </a>
</div> </div>
@ -53,7 +53,7 @@
{% for tag in tags %} {% for tag in tags %}
<tr> <tr>
<td><a href="{{ url_for('labels.label_details', id=tag.id) }}">{{ tag.id }}</a></td> <td><a href="{{ url_for('labels.label_details', id=tag.id) }}">{{ tag.id }}</a></td>
<td>{% if tag.provider %}Unnamed tag {% else %}Named tag{% endif %}</td> <td>{% if tag.provider %}Unnamed unique Identifier {% else %}Named unique identifier{% endif %}</td>
<td>{{ tag.get_provider }}</td> <td>{{ tag.get_provider }}</td>
<td> <td>
{% if tag.device %} {% if tag.device %}

View File

@ -5,7 +5,7 @@
<h1>Print Labels</h1> <h1>Print Labels</h1>
<nav> <nav>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Tag management</a></li> <li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Unique Identifier management</a></li>
<li class="breadcrumb-item active">Print Labels</li> <li class="breadcrumb-item active">Print Labels</li>
</ol> </ol>
</nav> </nav>

View File

@ -5,7 +5,7 @@
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<nav> <nav>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Tag management</a></li> <li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Unique Identifier management</a></li>
<li class="breadcrumb-item">{{ page_title }}</li> <li class="breadcrumb-item">{{ page_title }}</li>
</ol> </ol>
</nav> </nav>
@ -19,8 +19,8 @@
<div class="card-body"> <div class="card-body">
<div class="pt-4 pb-2"> <div class="pt-4 pb-2">
<h5 class="card-title text-center pb-0 fs-4">Add a new Tag</h5> <h5 class="card-title text-center pb-0 fs-4">Add a new Unique Identifier</h5>
<p class="text-center small">Please enter a code for the tag.</p> <p class="text-center small">Please enter a code for the unique identifier.</p>
{% if form.form_errors %} {% if form.form_errors %}
<p class="text-danger"> <p class="text-danger">
{% for error in form.form_errors %} {% for error in form.form_errors %}
@ -37,7 +37,7 @@
<label for="code" class="form-label">code</label> <label for="code" class="form-label">code</label>
<div class="input-group has-validation"> <div class="input-group has-validation">
<input type="text" name="code" class="form-control" required value="{{ form.code.data|default('', true) }}"> <input type="text" name="code" class="form-control" required value="{{ form.code.data|default('', true) }}">
<div class="invalid-feedback">Please enter a code of the tag.</div> <div class="invalid-feedback">Please enter a code of the unique identifier.</div>
</div> </div>
{% if form.code.errors %} {% if form.code.errors %}
<p class="text-danger"> <p class="text-danger">

View File

@ -5,7 +5,7 @@
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<nav> <nav>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Tag management</a></li> <li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Unique Identifier management</a></li>
<li class="breadcrumb-item">{{ page_title }}</li> <li class="breadcrumb-item">{{ page_title }}</li>
</ol> </ol>
</nav> </nav>
@ -19,8 +19,8 @@
<div class="card-body"> <div class="card-body">
<div class="pt-4 pb-2"> <div class="pt-4 pb-2">
<h5 class="card-title text-center pb-0 fs-4">Add new Unnamed Tags</h5> <h5 class="card-title text-center pb-0 fs-4">Add new Unnamed Unique Identifiers</h5>
<p class="text-center small">Please enter a number of the tags to issue.</p> <p class="text-center small">Please enter a number of the unique identifiers to issue.</p>
{% if form.form_errors %} {% if form.form_errors %}
<p class="text-danger"> <p class="text-danger">
{% for error in form.form_errors %} {% for error in form.form_errors %}
@ -37,7 +37,7 @@
<label for="code" class="form-label">Amount</label> <label for="code" class="form-label">Amount</label>
<div class="input-group has-validation"> <div class="input-group has-validation">
{{ form.amount(class_="form-control") }} {{ form.amount(class_="form-control") }}
<div class="invalid-feedback">Please enter a number of the tags to issue.</div> <div class="invalid-feedback">Please enter a number of the unique identifiers to issue.</div>
</div> </div>
{% if form.amount.errors %} {% if form.amount.errors %}
<p class="text-danger"> <p class="text-danger">