From c2fbd144cf5aa5cafd486190c0fb31ffd73ccac1 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 30 Jan 2017 23:01:37 +0100 Subject: [PATCH] Add "open in web" link to detailed public status pages --- app/assets/stylesheets/stream_entries.scss | 8 ++++++++ app/views/stream_entries/_detailed_status.html.haml | 4 ++++ config/locales/en.yml | 1 + 3 files changed, 13 insertions(+) diff --git a/app/assets/stylesheets/stream_entries.scss b/app/assets/stylesheets/stream_entries.scss index 2d3cb1436..595275527 100644 --- a/app/assets/stylesheets/stream_entries.scss +++ b/app/assets/stylesheets/stream_entries.scss @@ -302,6 +302,14 @@ color: $color3; } } + + .open-in-web-link { + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } } .embed { diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index 6ee8c9e5b..235dc6086 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -44,3 +44,7 @@ %span< = fa_icon('star') %span= status.favourites.count + + - if user_signed_in? + ยท + = link_to t('statuses.open_in_web'), web_url("statuses/#{status.id}"), class: 'open-in-web-link' diff --git a/config/locales/en.yml b/config/locales/en.yml index 44396039c..16b406745 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -98,6 +98,7 @@ en: two_factor_auth: Two-factor Authentication statuses: over_character_limit: character limit of %{max} exceeded + open_in_web: Open in web stream_entries: click_to_show: Click to show favourited: favourited a post by