diff --git a/app/templates/board.html b/app/templates/board.html index e316545..d5b5e16 100644 --- a/app/templates/board.html +++ b/app/templates/board.html @@ -253,25 +253,43 @@ function renderCardDetail(owner, repo, data) { const issue = data.issue || {}, comments = data.comments || [], checklists = data.checklists || [], card = data.card || {}; window._issueData = {owner, repo, issue, comments, checklists, card}; - let h = ''; - h += '
'+issue.state+' '+escHtml(issue.title||'')+'
'; - h += '
'; - (issue.labels||[]).forEach(l => h += ''+escHtml(l.name)+''); - if (issue.milestone) h += '📅 '+escHtml(issue.milestone.title)+''; - if (issue.assignee) h += '👤 '+escHtml(issue.assignee.login)+''; - h += '
'; - h += '
'; - h += '

Description

'+escHtml(issue.body||'')+'
'; - h += renderChecklists(owner, repo, issue.number, checklists); - h += '

Commentaires ('+comments.length+')

'; - comments.forEach(c => h += '
'+escHtml(c.user?.login||'')+''+(c.created_at||'').substr(0,10)+'
'+escHtml(c.body||'')+'
'); - h += '
'; - h += '
🔗 Ouvrir dans Gitea'; - h += ''; - h += '
'; - return h; + + const labelsHtml = (issue.labels || []).map(l => + `${escHtml(l.name)}` + ).join(''); + + const prio = card.priority || 'Medium'; + const prioOpts = ['Low','Medium','High','Urgent'].map(p => + `` + ).join(''); + + return ` +
${issue.state} ${escHtml(issue.title||'')}
+
+ ${labelsHtml} + ${issue.milestone ? '📅 '+escHtml(issue.milestone.title)+'' : ''} + ${issue.assignee ? '👤 '+escHtml(issue.assignee.login)+'' : ''} +
+
+ + +
+

Description

${escHtml(issue.body||'')}
+ ${renderChecklists(owner, repo, issue.number, checklists)} +

Commentaires (${comments.length})

+ ${comments.map(c => ` +
+ + ${escHtml(c.user?.login||'')} + ${(c.created_at||'').substr(0,10)} +
${escHtml(c.body||'')}
+
`).join('')} +
+
+ 🔗 Ouvrir dans Gitea + + +
`; } function renderChecklists(owner, repo, issueId, checklists) {