style(controls): increase categories min-width and align project icon with first word

This commit is contained in:
kdeterme 2026-10-10 15:13:35 +02:00
parent fc8cdb579f
commit 3037241762
2 changed files with 40 additions and 3 deletions

View file

@ -711,6 +711,42 @@
width: 180px; width: 180px;
} }
.controls-table th.col-category_names,
.controls-table td.col-category_names {
min-width: 240px;
}
.controls-table th.col-project_name,
.controls-table td.col-project_name {
min-width: 140px;
}
/* Alignement de l'icône avec le premier mot dans la colonne Projet */
.project-cell-link {
display: inline-flex;
align-items: flex-start;
gap: 0.35rem;
max-width: 100%;
line-height: 1.35;
vertical-align: middle;
}
.project-cell-icon {
flex-shrink: 0;
margin-top: 0.15rem;
font-size: 0.85rem;
}
.project-cell-name {
word-break: normal;
overflow-wrap: break-word;
}
a.project-cell-link:hover .project-cell-name {
color: #2563eb;
text-decoration: underline;
}
.controls-table td.col-thematics .thematic-content { .controls-table td.col-thematics .thematic-content {
display: inline-block; display: inline-block;
max-width: 100%; max-width: 100%;

View file

@ -572,10 +572,11 @@ function renderRowHtml(row) {
const themIcon = row.thematic_icon ? `<i class="bi ${escapeHtml(row.thematic_icon)} me-1"></i>` : ''; const themIcon = row.thematic_icon ? `<i class="bi ${escapeHtml(row.thematic_icon)} me-1"></i>` : '';
const typeIcon = typeMeta.icon ? `<i class="bi ${typeMeta.icon} me-1"></i>` : ''; const typeIcon = typeMeta.icon ? `<i class="bi ${typeMeta.icon} me-1"></i>` : '';
const projectHtml = row.project_name && row.project_name !== '-' const projectName = (row.project_name || '').trim();
const projectHtml = (projectName && projectName !== '-')
? (row.project_id && typeof projectsDetailBaseUrl !== 'undefined' ? (row.project_id && typeof projectsDetailBaseUrl !== 'undefined'
? `<a href="${projectsDetailBaseUrl}${row.project_id}/" class="text-decoration-none text-dark fw-medium"><i class="bi bi-folder me-1 text-primary"></i>${escapeHtml(row.project_name)}</a>` ? `<a href="${projectsDetailBaseUrl}${row.project_id}/" class="project-cell-link text-decoration-none text-dark fw-medium" title="${escapeHtml(projectName)}"><i class="bi bi-folder text-primary project-cell-icon"></i><span class="project-cell-name">${escapeHtml(projectName)}</span></a>`
: `<i class="bi bi-folder me-1 text-muted"></i>${escapeHtml(row.project_name)}`) : `<span class="project-cell-link text-dark fw-medium" title="${escapeHtml(projectName)}"><i class="bi bi-folder text-muted project-cell-icon"></i><span class="project-cell-name">${escapeHtml(projectName)}</span></span>`)
: '<span class="text-muted">-</span>'; : '<span class="text-muted">-</span>';
const remarksCount = parseInt(row.remarks_count, 10) || 0; const remarksCount = parseInt(row.remarks_count, 10) || 0;