Due: Wednesday October 28, 11 pm.
Submission instructions: Upload to CrowdGrader. The assignment will be created over the weekend.
You have to create a bulletin board system. The system has a list of boards; for each board, there is a list of posts. So you will need two database tables: one for boards, one for posts.
The home page should look like a better version of this:
If the user is not logged in, give the option of logging in or signing up.
If the user is logged in, give the option of creating a new discussion board.
Each board should be depicted likes something that looks like a board: a rectangle of some beautiful kind. In it there needs to be at least the name of the board, and how many messages there are in the last day.
Boards should be sorted on the home page according to the time of their most recent message, putting at the top the board with the most recent update.
You can fit as many boards on a line as they fit. Just don't do only one per line; give me some more attractive formatting.
In particular, no SQLFORM.grid allowed here.
Each board page should look like a nicer version of the page below:
Again, non-logged in users should be able to read, but not edit, and logged in users should be able to create posts, and delete them by clicking on an X in their top-right corner.
For the buttons, you can use bootstrap buttons as I did in my lecture.
Posts must be sorted according to most-recent-first.
When you click on the button to create a new board or new post, you can do the editing either in place, or on separate pages.
If you prefer to implement this via separate pages, when you click on the buttons you are taken to pages where they can enter the information for the new board or post. A board simply has a title (and a description, if you like). A post has a title, and a body. You can use normal forms here. Once you fill in a form, the element is created, and you are sent back to the list of posts or boards.
You can also do it using in-place editing if you wish. There are two levels of sophistication here. One is to use a form on the same page that shows up, as we did in lecture8. The full-blown way would be to edit in-place in a post, but I would like to slightly discourage you from sinking a lot of time trying to do that, as we will be learning in a couple of weeks ways to do that in an easy way.
Editing and deleting boards and posts
Users should be able to edit and delete the posts they created (and only those!) via icons in the top right corner. You can use font awesome for this.
For simplicity, deletion or editing of boards is not required. Again, the editing can be done via a form in a separate page.
The simple solution consists in showing only the 20 or so most recent boards and posts.
We will have bonus points for people who implement pagination according to this recipe or similar.
You can put a button at the bottom of the page that says "show more"; when you click it, you load more posts.
I recommend starting from the start app (master branch).
Note all I am not asking you to do but that would be needed in a real system:
Even though I am not asking for these things, you might want to think at how you would implement them.