Skip to content

Commit

Permalink
Merge pull request #14 from CMU-313/add-visual-indicators-for-status
Browse files Browse the repository at this point in the history
Add UI for displaying question status as 'Resolved' or 'Not Resolved'
  • Loading branch information
ariel0206qyx authored Sep 22, 2024
2 parents 36c17d4 + 13a6032 commit 64913cd
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
Binary file modified dump.rdb
Binary file not shown.
42 changes: 41 additions & 1 deletion public/scss/client.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,44 @@
@import "modules/bottom-sheet";
@import "modules/icon-picker";
@import "modules/alerts.scss";
@import "modules/scrollbar.scss";
@import "modules/scrollbar.scss";


.text-center {
text-align: center;
vertical-align: middle;
}


.badge-success {
background-color: #28a745;
color: white;
padding: 0.5em 1em;
border-radius: 0.25rem;
display: inline-flex;
align-items: center;
font-weight: bold;
font-size: 1em;
}

.badge-secondary {
background-color: #6c757d;
color: white;
padding: 0.5em 1em;
border-radius: 0.25rem;
display: inline-flex;
align-items: center;
font-weight: bold;
font-size: 1em;
}

.badge-success i,
.badge-secondary i {
margin-right: 0.5em;
font-size: 1.2em;
}

.badge-success:hover, .badge-secondary:hover {
opacity: 0.8;
cursor: default;
}
17 changes: 16 additions & 1 deletion src/views/partials/data/category.tpl
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
data-tid="{topics.tid}" data-index="{topics.index}" data-cid="{topics.cid}" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"
<tr data-tid="{tid}" data-index="{index}" data-cid="{cid}" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">

<td class="text-center">
<!-- Resolved/Not Resolved Display -->
{{{ if resolved }}}
<span class="badge badge-success">
<i class="fa fa-check-circle"></i> Resolved
</span>
{{{ else }}}
<span class="badge badge-secondary">
<i class="fa fa-times-circle"></i> Not Resolved
</span>
{{{ end }}}
</td>

</tr>

0 comments on commit 64913cd

Please sign in to comment.