Add notes display and tooltip support in exam CIDs template
This commit is contained in:
@@ -39,6 +39,9 @@
|
||||
</div>
|
||||
<div class="small text-muted mt-1">{{ cid.name }}</div>
|
||||
<div class="small">Email: {{ cid.email }}</div>
|
||||
{% if cid.notes %}
|
||||
<div class="small text-muted mt-1 cid-notes" title="{{ cid.notes|escape }}" data-bs-toggle="tooltip" data-bs-placement="top">Notes: {{ cid.notes|truncatechars:120 }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -171,6 +174,11 @@
|
||||
});
|
||||
}
|
||||
|
||||
// enable Bootstrap tooltips for notes
|
||||
document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(function(el){
|
||||
try{ new bootstrap.Tooltip(el); }catch(e){/* ignore if bootstrap not available */}
|
||||
});
|
||||
|
||||
const userFilter = document.getElementById('user-filter');
|
||||
if(userFilter){
|
||||
userFilter.addEventListener('input', function(){
|
||||
@@ -188,5 +196,6 @@
|
||||
.cid-name { margin-top: 0.25rem; }
|
||||
.cid-link { font-size: 1.05rem; }
|
||||
.submitted { color: green; }
|
||||
.cid-notes { font-style: italic; color: #6c757d; }
|
||||
</style>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user