Add comment submit box
- Each postPage will now contain a comment submit box
- Comment submit box will only appear if there is a currentUser logged in
- If there is no logged in user, then a the program will notify the visitor to log in to leave a comment
Create submit comment template
- Template name is commentSubmit
- Contains a form which has a text area for the user to enter the comment
- Also contains a submit button with the text Add Comment on it
Call comment Method to submit comments
- Create Method in commentSubmit template to handle comment submission
- On submit form, the event manager grabs the user's entered comment in the text area and passes it to the Method
- If there is an error, the error will be shown to the user
- If all is successful, the comment will be added
Set up comment Meteor Method to create comments
- Server-side Method will check to see that everything is ok with the user submitted comment
- Checks to see if the user is logged in, and if not, it will tell the user that they need to log in
- Checks to see if the comment body exists, and if not, it will tell the user that they need to write some content
- Checks to see if the post exists, and if not, it will tell the user that they need to comment on a post
- If there are no errors, then the comment is inserted into the comments collection
Merge pull request #26 from alexanderdavidpan/Create_Form_To_Submit_Comments

Create form to submit comments