|
4 | 4 | -unless protip.best_stat.nil? || best_stat_value(protip) == 0
|
5 | 5 | %span{:class => protip_stat_class(protip)}
|
6 | 6 | = formatted_best_stat_value(protip) unless best_stat_name(protip) =~ /hawt/
|
| 7 | + |
| 8 | + -# We should remove this to cache , deleting should be from dashboard |
7 | 9 | -if protip_owner?(protip, current_user)
|
8 | 10 | =link_to(' ', protip_path(protip.public_id), :method => :delete, :class => 'delete-tip', :title => 'remove protip', :confirm => "Are you sure you permanently want to remove this pro tip?")
|
| 11 | + |
9 | 12 | = link_to protip.title, protip_or_link_path(protip), 'data-action' => 'view protip', 'data-from' => 'mini protip', :class => "title hyphenate track x-mode-#{mode || 'fullpage'}"
|
10 | 13 | %footer.cf
|
| 14 | + -# We should remove this to cache |
11 | 15 | -if is_admin?
|
12 | 16 | %ul
|
13 | 17 | %li.admin
|
14 | 18 | %p== #{distance_of_time_in_words_to_now(protip.created_at)} ago
|
15 | 19 | %ul.author
|
16 |
| - -unless protip.user.nil? |
| 20 | + -if protip.user.present? |
17 | 21 | %li.user
|
18 | 22 | by
|
19 | 23 | =link_to protip.user.username, profile_path(protip.user.username), 'data-action' => 'view protip author', 'data-from' => 'mini protip', :title => "Authored by: #{protip.user.username}", :class => "track"
|
20 |
| - -unless protip.team.nil? |
| 24 | + -if protip.team.present? |
21 | 25 | %li.team
|
22 | 26 | of
|
23 | 27 | =link_to protip.team.name, teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'mini protip', :class => "track"
|
24 | 28 | %ul.avatars
|
25 |
| - -unless protip.user.nil? |
| 29 | + -if protip.user.present? |
26 | 30 | %li.user
|
27 | 31 | =link_to profile_path(protip.user.username) do
|
28 | 32 | =image_tag(protip.user.avatar_url)
|
29 |
| - -unless protip.team.nil? |
| 33 | + -if protip.team.present? |
30 | 34 | %li.team
|
31 | 35 | =link_to teamname_path(protip.team.slug) do
|
32 |
| - =image_tag(protip.team.avatar) unless protip.team.avatar.blank? |
| 36 | + =image_tag(protip.team.avatar.url) |
33 | 37 | -if protip.team && protip.team.hiring
|
34 | 38 | %a.job{:href => teamname_path(protip.team.slug)}
|
0 commit comments