AgileVentures / MetPlus_tracker

Git Repository for the Waffle issue in MetPlus project
2 stars 4 forks source link

CP home page - prevent unneeded page reload #618

Closed patmbolger closed 7 years ago

patmbolger commented 7 years ago

There are links on the company person home page that lead to other views that have a "Cancel" button.

The cancel button leads back to the CP home page (typically via link_to "Cancel", :back, ....

This causes the CP home page to reload. We don't want this, and the CP home page should just be refreshed from cache.

Turbolinks takes care of this automatically if the user clicks the browser back button (https://github.com/turbolinks/turbolinks#restoration-visits).

For this story, we need to remove the "Cancel" button from views accessible from the CP home page (and thus have the user use the browser's back button).

This includes the views accessed via these buttons on the CP home page:

1) Post job 2) Invite Colleague 3) Edit Company info

(BTW - also, we might as well standardize the capitalization on these button titles - that is, capitalize the first letter of each word (e.g. "Post Job" rather than "Post job"))

patmbolger commented 7 years ago

Here is an example: this is the initial load of the CP home page:

screen shot 2017-07-16 at 9 00 01 am

Here, the user (the company admin in this case) has navigated to the company info table:

screen shot 2017-07-16 at 9 04 06 am

Now, the user has clicked "Edit Company info" and then clicked the "Cancel" button in that view .... and the CP home page is reloaded and prior context is lost:

screen shot 2017-07-16 at 9 05 45 am

NOTE: We also want to do this kind of story for the agency person home page - will create a separate story when this one is submitted and merged.