From 3cc47beb6e1f646baca64fdf56168e2f2e2bc726 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 9 Sep 2016 20:04:34 +0200 Subject: Refactored generation of unique tags, URIs and object URLs into own classes, as well as formatting of content --- app/views/stream_entries/_follow.html.haml | 2 +- app/views/stream_entries/_status.html.haml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views/stream_entries') diff --git a/app/views/stream_entries/_follow.html.haml b/app/views/stream_entries/_follow.html.haml index f19e8783d..f6ec8c4f5 100644 --- a/app/views/stream_entries/_follow.html.haml +++ b/app/views/stream_entries/_follow.html.haml @@ -2,4 +2,4 @@ .content %strong= link_to follow.account.acct, account_path(follow.account) is now following - %strong= link_to follow.target_account.acct, url_for_target(follow.target_account) + %strong= link_to follow.target_account.acct, TagManager.instance.url_for(follow.target_account) diff --git a/app/views/stream_entries/_status.html.haml b/app/views/stream_entries/_status.html.haml index ece31d0e2..a0afccd39 100644 --- a/app/views/stream_entries/_status.html.haml +++ b/app/views/stream_entries/_status.html.haml @@ -12,7 +12,7 @@ .pre-header %i.fa.fa-retweet Shared by - = link_to display_name(status.account), url_for_target(status.account), class: 'name' + = link_to display_name(status.account), TagManager.instance.url_for(status.account), class: 'name' .entry__container .avatar @@ -21,10 +21,10 @@ .entry__container__container .header .header__left - = link_to url_for_target(proper_status(status).account), class: 'name' do + = link_to TagManager.instance.url_for(proper_status(status).account), class: 'name' do %strong= display_name(proper_status(status).account) = "@#{proper_status(status).account.acct}" - = link_to url_for_target(proper_status(status)), class: 'time' do + = link_to TagManager.instance.url_for(proper_status(status)), class: 'time' do %span{ title: proper_status(status).created_at } = relative_time(proper_status(status).created_at) @@ -36,7 +36,7 @@ %i.fa.fa-star %span.counter-number= proper_status(status).favourites_count - .content= content_for_status(proper_status(status)) + .content= Formatter.instance.format(proper_status(status)) %ul.media-attachments - status.media_attachments.each do |media| -- cgit