Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend integration code for flagging priority questions for faculty issue #12 #14

Merged
merged 3 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added dump.rdb
Binary file not shown.
5 changes: 0 additions & 5 deletions nodebb-theme-harmony/templates/partials/category/sort.tpl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a stray tag after the first that could possibly be removed. Everything else structure wise looks good. Gook work!

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
<span class="d-none d-md-inline fw-semibold">{sortOptionLabel}</span>
</button>

<button class="btn-ghost-sm ff-secondary d-flex gap-2 align-items-center dropdown-toggle" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false" aria-label="[[aria:topic-sort-option, {sortOptionLabel}]]">
<i class="fa fa-fw fa-arrow-down-wide-short text-primary"></i>
<span class="d-none d-md-inline fw-semibold">{sortOptionLabel}</span>
</button>

<ul class="dropdown-menu p-1 text-sm" role="menu">
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="recently_replied" role="menuitem">
Expand Down
7 changes: 7 additions & 0 deletions nodebb-theme-harmony/templates/partials/topic/post.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@
<div class="d-flex align-items-center gap-1 flex-grow-1 justify-content-end">
<span class="bookmarked opacity-0 text-primary"><i class="fa fa-bookmark-o"></i></span>
<a href="{config.relative_path}/post/{./pid}" class="post-index text-muted d-none d-md-inline">#{increment(./index, "1")}</a>
{{{ if (posts.priorityLevel == "3") }}}
<i class="fas fa-flag" style="color:red;" title="High Priority"></i>
{{{ else if (posts.priorityLevel == "2") }}}
<i class="fas fa-flag" style="color:yellow;" title="Medium Priority"></i>
{{{ else if (posts.priorityLevel == "1") }}}
<i class="fas fa-flag" style="color:green;" title="Low Priority"></i>
{{{ end }}}
</div>
</div>

Expand Down
9 changes: 0 additions & 9 deletions public/src/client/topic/postTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,6 @@ define('forum/topic/postTools', [
onReplyClicked($(this), tid);
});

$('.topic').on('click', '[component="topic/reply-as-topic"]', function () {
translator.translate(`[[topic:link-back, ${ajaxify.data.titleRaw}, ${config.relative_path}/topic/${ajaxify.data.slug}]]`, function (body) {
hooks.fire('action:composer.topic.new', {
cid: ajaxify.data.cid,
body: body,
});
});
});

postContainer.on('click', '[component="post/bookmark"]', function () {
return bookmarkPost($(this), getData($(this), 'data-pid'));
});
Expand Down
1 change: 1 addition & 0 deletions src/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ Notifications.markAllRead = async function (uid) {
await Notifications.markReadMultiple(nids, uid);
};


Notifications.prune = async function () {
const cutoffTime = Date.now() - notificationPruneCutoff;
const nids = await db.getSortedSetRangeByScore('notifications', 0, 500, '-inf', cutoffTime);
Expand Down
Loading