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

Working on the Instructor Approved Label and Button Frontend in the post.tpl file #44

Merged
merged 3 commits into from
Oct 20, 2024

Conversation

dmohanadi
Copy link

Working in node_modules/nodebb-theme-harmony/templates/partials/topic/post.tpl

Changes made:

  • Added a button with a toggle feature along with text beside it "Approve Post" for admins to be able to click it so the Instructor Approved label can show up. The button is in the footer section next to the upvoting system and reply buttons and has a similar structure and format to match the other buttons.
  • Created the Instructor Approved label in the header section of the post next to the post number. Added a blue checkmark for easy visibility and detention by students to see the label. I enclosed the label within an if condition "if isApproved" so it can check if the isApporved variable that was attached to the postData object is true so it can display the label.

Resolves Task #21

…in the post template that runs within an if conditional using the isApproved variable that was created in the DB schema
@dmohanadi dmohanadi marked this pull request as ready for review October 7, 2024 22:03
@Tasnim1147
Copy link

Tasnim1147 commented Oct 9, 2024

Great work. However, did you check if the variable isApproved is available within the scope? If not, try to check the other attributes of post object like pid, content, annonymousType, etc within the same scope.
Additionally, don't forget to resolve the conflicts.

@Tasnim1147 Tasnim1147 marked this pull request as draft October 9, 2024 01:38
@jdufitum jdufitum added this to the Sprint 2 milestone Oct 10, 2024
@jdufitum jdufitum added the Task label Oct 10, 2024
@jdufitum jdufitum requested a review from Tasnim1147 October 10, 2024 06:11
@dmohanadi dmohanadi requested a review from jdufitum October 15, 2024 13:42
@dmohanadi dmohanadi linked an issue Oct 15, 2024 that may be closed by this pull request
@dmohanadi dmohanadi self-assigned this Oct 15, 2024
Copy link

@jdufitum jdufitum left a comment

Choose a reason for hiding this comment

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

LGTM

@jdufitum jdufitum removed the request for review from Tasnim1147 October 20, 2024 19:19
@jdufitum jdufitum marked this pull request as ready for review October 20, 2024 19:20
@jdufitum jdufitum merged commit e3c0ea1 into CMU-17313Q:f24 Oct 20, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display Logic for Approved Answers
3 participants