mastery badge + fix Integrations helper access (restores Reset button) (v0.5.0) t1
This commit is contained in:
18
Asset/css/qualkard.css
Normal file
18
Asset/css/qualkard.css
Normal file
@@ -0,0 +1,18 @@
|
||||
/* QualKard mastery badge (under the card title on the board). */
|
||||
.qk-line {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.qk-badge {
|
||||
display: inline-block;
|
||||
padding: 0 6px;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
font-size: 0.85em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.qk-new { background: #e6b800; } /* unread */
|
||||
.qk-low { background: #c0392b; } /* < 50% */
|
||||
.qk-mid { background: #27ae60; } /* 50-89% */
|
||||
.qk-high { background: #2980b9; } /* >= 90% */
|
||||
12
Template/board/badge.php
Normal file
12
Template/board/badge.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// Mastery badge under the card title on a QualKard board. Server-rendered (survives board refresh).
|
||||
// Yellow "new" for an unread card; otherwise a percent of 5, red (<50) / green (<90) / blue (>=90).
|
||||
if (empty($task['project_id']) || ! $this->QualKardHelper->isEnabled($task['project_id'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$b = $this->QualKardHelper->cardBadge($task['id']);
|
||||
?>
|
||||
<div class="qk-line">
|
||||
<span class="qk-badge <?= $b['class'] ?>"><?= $this->text->e($b['label']) ?></span>
|
||||
</div>
|
||||
Reference in New Issue
Block a user