|
1 |
| --#-content_for :javascript do |
2 |
| --# -if @topic_user |
3 |
| --# %script="logUsage('viewed', 'users protips');" |
4 |
| --# -else |
5 |
| --# %script="logUsage('viewed', 'topics protips');" |
6 |
| -
|
7 |
| -= render :partial => "head", :locals => {:topic => @topic} |
| 1 | += render(partial: 'head', locals: { topic: @topic }) |
8 | 2 |
|
9 | 3 | .secondary-notice
|
10 | 4 | %p
|
11 |
| - -if @topic_user |
12 |
| - -if @topic_user && signed_in? && @topic_user == current_user |
| 5 | + - if @topic_user |
| 6 | + - if @topic_user && signed_in? && @topic_user == current_user |
13 | 7 | These are your links, code snippets, posts and other pro tips you have created or upvoted. Have a quick pro tip to
|
14 |
| - =link_to('share?', new_protip_path, 'data-action' => 'create protip', 'data-from' => 'own protips page') |
| 8 | + = link_to('share?', new_protip_path, 'data-action' => 'create protip', 'data-from' => 'own protips page') |
15 | 9 | or
|
16 |
| - =link_to('learn more', faq_path, :class => 'track', 'data-action' => 'view faq', 'data-from' => 'own protips page') |
| 10 | + = link_to('learn more', faq_path, class: 'track', 'data-action' => 'view faq', 'data-from' => 'own protips page') |
17 | 11 | - if @topic_user.protips.reject(&:created_automagically?).count == 0
|
18 | 12 | %br Pro tips you currently see here are created automagically from repos you follow/consider useful or slideshares you've created
|
19 |
| - -else |
20 |
| - ==These are the links, code snippets, posts, and other pro tips #{@topic_user.display_name} has created. Have your own to |
21 |
| - =link_to('share?', new_protip_path, 'data-action' => 'create protip', 'data-from' => 'user protips page') |
| 13 | + - else |
| 14 | + == These are the links, code snippets, posts, and other pro tips #{@topic_user.display_name} has created. Have your own to |
| 15 | + = link_to('share?', new_protip_path, 'data-action' => 'create protip', 'data-from' => 'user protips page') |
22 | 16 | or
|
23 |
| - =link_to('learn more', faq_path, :class => 'track', 'data-action' => 'view faq', 'data-from' => 'user protips page') |
24 |
| - -elsif signed_in? |
25 |
| - %p |
26 |
| - =link_to('Share', new_protip_path(:topics => @topic), 'data-action' => 'create protip', 'data-from' => 'user protips page') + " a link, code snippet, post or other pro tip about #{@topic}" |
27 |
| - -else |
28 |
| - =link_to('Sign in', root_path) |
29 |
| - ==to start sharing your #{@topic} pro tips or |
30 |
| - =link_to('learn more', faq_path, :class => 'track', 'data-action' => 'view faq', 'data-from' => 'user protips page') |
| 17 | + = link_to('learn more', faq_path, class: 'track', 'data-action' => 'view faq', 'data-from' => 'user protips page') |
| 18 | + - elsif signed_in? |
| 19 | + %p= link_to('Share', new_protip_path(topics: @topic), 'data-action' => 'create protip', 'data-from' => 'user protips page') + " a link, code snippet, post or other pro tip about #{@topic}" |
| 20 | + - else |
| 21 | + = link_to('Sign in', root_path) |
| 22 | + == to start sharing your #{@topic} pro tips or |
| 23 | + = link_to('learn more', faq_path, class: 'track', 'data-action' => 'view faq', 'data-from' => 'user protips page') |
31 | 24 |
|
32 |
| -#browse-results |
33 |
| - = render :partial => "grid", :locals => {:protips => (@protips.results if @protips.respond_to?(:results)) || @protips.try(:all), :collection => @protips, :url => :tagged_protips_path, :hide_more => false, :mode => 'popup'} |
| 25 | +#browse-results= render(partial: 'grid', locals: { protips: protip_search_results_to_render(@protips), collection: @protips, url: :tagged_protips_path, hide_more: false, mode: 'popup' }) |
0 commit comments