about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-15 14:01:33 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-15 14:01:33 +0100
commite9737c2235ec56502e650bd1adad3f32bf85f0ef (patch)
treeececd729f513fd14998f2be30169973956ef6f59 /app/views
parentab165547fdf556b10b80898c030d54e20bff50af (diff)
Fix tests, add applications to eager loading/cache for statuses, fix
application website validation, don't link to app website if website isn't set,
also comment out animated boost icon from #464 until it's consistent with non-animated version
Diffstat (limited to 'app/views')
-rw-r--r--app/views/api/v1/apps/show.rabl2
-rw-r--r--app/views/stream_entries/_detailed_status.html.haml10
2 files changed, 7 insertions, 5 deletions
diff --git a/app/views/api/v1/apps/show.rabl b/app/views/api/v1/apps/show.rabl
index 30cfd81ab..6d9e607db 100644
--- a/app/views/api/v1/apps/show.rabl
+++ b/app/views/api/v1/apps/show.rabl
@@ -1,3 +1,3 @@
 object @application
 
-attributes :id, :name, :website
\ No newline at end of file
+attributes :name, :website
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index 946adbd8e..bc09d3597 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -29,13 +29,15 @@
       %span= l(status.created_at)
     ·
     - if status.application
-      = link_to status.application.website, class: 'detailed-status__application', target: @external_links ? '_blank' : nil, rel: 'noopener' do
-        %span= status.application.name
+      - if status.application.website.blank?
+        %strong.detailed-status__application= status.application.name
+      - else
+        = link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener'
       ·
-    %span
+    %span<
       = fa_icon('retweet')
       %span= status.reblogs.count
     ·
-    %span
+    %span<
       = fa_icon('star')
       %span= status.favourites.count