Story #147 Add Announcements section - cseseniordesign/reservations GitHub Wiki

End User Documentation

Dev Testing Instructions

  1. Ensure you are on the most recent version of the dev-announcements branch.
  2. Start your dev environment and log in with development2 so you have all permissions.
  3. Navigate to the Admin -> Announcements page
  4. Ensure that if there is an active announcement that the announcements textbox is prepopulated with the announcement. If not, write an announcement and save it. The announcement should now show on the home page.
  5. Go back to the Admin -> Announcements page and delete the announcement. The announcement should no longer show on the home page.
  6. Ensure there are no errors in the console throughout your testing and that the page is responsive on all screen sizes.

Production Testing Instructions

  1. Go to https://innovationstudio-manager.unl.edu/login/ and log in with an account that has elevated permissions to view the Admin -> Announcements page.
  2. Follow steps 3 and up from the dev testing instructions above.

Technical Documentation

models/announcements.rb

  • Created the Announcements model

new_schema.sql

  • Added script for new announcements table

routes/admin/announcements.rb

  • Created Admin > Announcements page.
  • Added the ability to post and delete an announcement. Only one announcement can exist at a time.
    • Added an error message when attempting to post an announcement with no text.
    • Added an error message when attempting to delete an announcement when there is not one to delete.

views/admin/announcements.erb

  • Created a text box that shows the current announcement's text (if there is an announcement posted). Otherwise, the box is empty.
  • Added buttons for posting and deleting an announcement.

views/admin/home.erb

  • Fixed a bug involving the Admin home page's Email's Manage button linking to a nonexistent page.
  • Added an Announcements button on the Admin page that can only be accessed by Super Users.

views/navigation.erb

  • Added an Announcements button under the Admin tab that can only be accessed by Super Users.