|
1 |
| --#- protip = protip.load #this is simply a hack, fix ES indexed json |
2 |
| -%article{:class => dom_class(protip), :id => protip.public_id} |
| 1 | +%article{class: dom_class(protip), id: protip.public_id} |
3 | 2 | %header
|
4 |
| - -if display_protip_stats?(protip) |
5 |
| - %span{:class => best_stat_name(protip)} |
| 3 | + - if display_protip_stats?(protip) |
| 4 | + %span{class: best_stat_name(protip)} |
6 | 5 | = formatted_best_stat_value(protip) unless best_stat_name(protip) =~ /hawt/
|
7 | 6 |
|
8 |
| - -# We should remove this to cache , deleting should be from dashboard |
9 |
| - -if protip_owner?(protip, current_user) |
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?") |
| 7 | + -# TODO: We should remove this to cache , deleting should be from dashboard |
| 8 | + - if protip_owner?(protip, current_user) |
| 9 | + = 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 | 10 |
|
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'}" |
| 11 | + = 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'}" |
13 | 12 | %footer.cf
|
14 |
| - -# We should remove this to cache |
15 |
| - -if is_admin? |
| 13 | + -# TODO: We should remove this to cache |
| 14 | + - if is_admin? |
16 | 15 | %ul
|
17 | 16 | %li.admin
|
18 | 17 | %p== #{distance_of_time_in_words_to_now(protip.created_at)} ago
|
19 | 18 | %ul.author
|
20 |
| - -if protip.user.present? |
| 19 | + - if protip.user.present? |
21 | 20 | %li.user
|
22 | 21 | by
|
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" |
24 |
| - -if protip.team.present? |
| 22 | + = 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" |
| 23 | + - if protip.team.present? |
25 | 24 | %li.team
|
26 | 25 | of
|
27 |
| - =link_to protip.team.name, teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'mini protip', :class => "track" |
| 26 | + = link_to protip.team.name, teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'mini protip', class: "track" |
28 | 27 | %ul.avatars
|
29 |
| - -if protip.user.present? |
| 28 | + - if protip.user.present? |
30 | 29 | %li.user
|
31 |
| - =link_to profile_path(protip.user.username) do |
32 |
| - =image_tag(protip.user.avatar_url) |
33 |
| - -if protip.team.present? && protip.team.avatar.present? |
| 30 | + = link_to profile_path(protip.user.username) do |
| 31 | + = image_tag(protip.user.avatar_url) |
| 32 | + - if protip.team.present? && protip.team.avatar.present? |
34 | 33 | %li.team
|
35 |
| - =link_to teamname_path(protip.team.slug) do |
36 |
| - =image_tag(protip.team.avatar) |
37 |
| - -if protip.team && protip.team.hiring |
38 |
| - %a.job{:href => teamname_path(protip.team.slug)} |
| 34 | + = link_to teamname_path(protip.team.slug) do |
| 35 | + = image_tag(protip.team.avatar) |
| 36 | + - if protip.team && protip.team.hiring |
| 37 | + %a.job{href: teamname_path(protip.team.slug)} |
0 commit comments