Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

emphasize torrents with content

  • Loading branch information...
commit 0aa969c089e908bfb15992f04d3b7a91bbb05e66 1 parent a1e442b
@niklas authored
View
2  app/models/torrent/content.rb
@@ -54,6 +54,8 @@ def exists?
base_path.present? && info.name.present? && File.exists?(path)
end
+ alias exist? exists?
+
def files
if single?
[ path ]
View
5 app/views/torrents/_item.html.haml
@@ -2,7 +2,10 @@
= decorate torrent do |td|
%tr.torrent{class: torrent.status, id: td.item_id}
%td.title
- %strong= link_to torrent.title, torrent
+ - if torrent.content.exist?
+ %strong= link_to torrent.title, torrent
+ - else
+ = link_to torrent.title, torrent
%td.status
- if torrent.running?
.progress-pie= td.progress
Please sign in to comment.
Something went wrong with that request. Please try again.