Open patrickdundas opened 9 years ago
Browsers have back buttons anyway. It would make sense to re-label the button as 'punishments', or just remove it.
True. I will add that as a possible solution
Same on /matches but I really don't see this as an issue. Then again, this is also on /reports pages where its "All Reports".
Even though this issue is across multiple pages, I think that the biggest issue lies with the back button on the punishments page. This is because the punishments pages are linked to by multiple pages (profiles, appeals, /punishments), and the system shouldn't just assume that everybody is coming from /punishments.
I recently viewed a player's infraction via their profile page, and clicked the back button after reading over the details of their infraction. Instead of bringing me back to that player's profile page, I was brought to the oc.tc/punishments page.
To reproduce this problem
What actually happens
Instead of being brought back to the player's profile page, the back button brings you to the oc.tc/punishments page
What I expected to happen
I expected to be brought back to the previous page that I visited. In this case, the player's profile page.
How to fix this problem
This problem can be easily fixed by altering just one line of code. Currently, the code attached to the button is
<a class="btn pull-right" href="/punishments">Back</a>
. This tells the button to be a direct link to oc.tc/punishments.This can be fixed by changing that line of code to
<a class="btn pull-right" href="javascript:history.go(-1)">Back</a>
. In this case, the button will go back to whatever page the viewer was last on, just like every back button should.This also could be fixed by re-labeling the button as "punishments" rather than "back"