smashingboxes / cardboard-admin-archive

Rails 4 CMS
http://smashingboxes.com
Other
65 stars 13 forks source link

Open non-cardboard links in a new tab #100

Open BrandonMathis opened 10 years ago

BrandonMathis commented 10 years ago

All links that exit cardboard should open in a new tab.

iandonovan commented 9 years ago

With Leonel's revert, this issue should be re-opened. I can't do it, though.

leonelgalan commented 9 years ago

Could you give examples of these links? Saying all, makes it impossible assess.

iandonovan commented 9 years ago

@leonelgalan Whoopsie, let me give you some examples now, but it's more about understanding the concept.

Any link that is on a page in cardboard (so anything in /cardboard/blahblahblah) that points to a website that is outside of cardboard (e.g. /users/) needs to open in a new tab. So, for example, if we have a link in a Cardboard page that points to http://www.google.com, that link needs to open in a new tab. If we link to http://www.examplesite.com/cardboard/users, that link does not open in a new tab. The idea is to keep people from "accidentally" exiting the admin portal when they want to look at something on the main site.

leonelgalan commented 9 years ago

And where are this links? We could add this to all links that we write on cardboard. If the only links left are the ones the user adds, we could target them.

iandonovan commented 9 years ago

These links are the ones we write at the client's request. I'll admit that a solution to this problem is just being diligent target: "_blank" to our links when we write them, but this was more about fixing up old projects in one action.