|
26 | 26 | .sidebar-section |
27 | 27 | h3.sidebar-heading Quick filters |
28 | 28 | .sidebar-content |
29 | | - ul.quick-filters |
30 | | - li = link_to "No contributor/committer replies", topics_path(filter: "no_contrib_replies") |
31 | | - li = link_to "Patch, no replies", topics_path(filter: "patch_no_replies") |
32 | | - - if user_signed_in? |
33 | | - li = link_to "Reading in progress", topics_path(filter: "reading_incomplete") |
34 | | - li = link_to "New for me", topics_path(filter: "new_for_me") |
35 | | - li = link_to "Started by me", topics_path(filter: "started_by_me") |
36 | | - li = link_to "I posted here", topics_path(filter: "messaged_by_me") |
37 | | - li = link_to "Starred by me", topics_path(filter: "starred_by_me") |
38 | | - - current_user.teams.each do |team| |
39 | | - li = link_to "#{team.name}: starred by team", topics_path(filter: "starred_by_team", team_id: team.id) |
40 | | - li = link_to "#{team.name}: not yet read by team", topics_path(filter: "team_unread", team_id: team.id) |
41 | | - li = link_to "#{team.name}: my teammates are reading", topics_path(filter: "team_reading_others", team_id: team.id) |
42 | | - li = link_to "#{team.name}: my team is reading", topics_path(filter: "team_reading_any", team_id: team.id) |
43 | | - li = link_to "#{team.name}: started by team", topics_path(filter: "team_started", team_id: team.id) |
44 | | - li = link_to "#{team.name}: messages by team", topics_path(filter: "team_messaged", team_id: team.id) |
45 | | - - if user_signed_in? && @available_note_tags.present? |
46 | | - .sidebar-section |
47 | | - h3.sidebar-heading My tags |
48 | | - ul.quick-filters.tags-list |
49 | | - - @available_note_tags.each do |tag, count| |
50 | | - li = link_to "##{tag} (#{count})", topics_path(note_tag: tag) |
| 29 | + - active_filter = params[:filter] |
| 30 | + - active_team_id = params[:team_id]&.to_i |
| 31 | + |
| 32 | + .filter-subsection |
| 33 | + span.filter-subsection-label Status |
| 34 | + ul.quick-filters |
| 35 | + li = link_to "No contributor/committer replies", topics_path(filter: "no_contrib_replies"), class: ("quick-filter-link is-active" if active_filter == "no_contrib_replies") |
| 36 | + li = link_to "Patch, no replies", topics_path(filter: "patch_no_replies"), class: ("quick-filter-link is-active" if active_filter == "patch_no_replies") |
| 37 | + |
| 38 | + - if user_signed_in? |
| 39 | + .filter-subsection |
| 40 | + span.filter-subsection-label My activity |
| 41 | + ul.quick-filters |
| 42 | + li = link_to "Reading in progress", topics_path(filter: "reading_incomplete"), class: ("quick-filter-link is-active" if active_filter == "reading_incomplete") |
| 43 | + li = link_to "New for me", topics_path(filter: "new_for_me"), class: ("quick-filter-link is-active" if active_filter == "new_for_me") |
| 44 | + li = link_to "Started by me", topics_path(filter: "started_by_me"), class: ("quick-filter-link is-active" if active_filter == "started_by_me") |
| 45 | + li = link_to "I posted here", topics_path(filter: "messaged_by_me"), class: ("quick-filter-link is-active" if active_filter == "messaged_by_me") |
| 46 | + li = link_to "Starred by me", topics_path(filter: "starred_by_me"), class: ("quick-filter-link is-active" if active_filter == "starred_by_me") |
| 47 | + |
| 48 | + - current_user.teams.each do |team| |
| 49 | + .filter-subsection |
| 50 | + span.filter-subsection-label = team.name |
| 51 | + ul.quick-filters |
| 52 | + li = link_to "Starred by team", topics_path(filter: "starred_by_team", team_id: team.id), class: ("quick-filter-link is-active" if active_filter == "starred_by_team" && active_team_id == team.id) |
| 53 | + li = link_to "Not yet read by team", topics_path(filter: "team_unread", team_id: team.id), class: ("quick-filter-link is-active" if active_filter == "team_unread" && active_team_id == team.id) |
| 54 | + li = link_to "Teammates reading", topics_path(filter: "team_reading_others", team_id: team.id), class: ("quick-filter-link is-active" if active_filter == "team_reading_others" && active_team_id == team.id) |
| 55 | + li = link_to "Team reading", topics_path(filter: "team_reading_any", team_id: team.id), class: ("quick-filter-link is-active" if active_filter == "team_reading_any" && active_team_id == team.id) |
| 56 | + li = link_to "Started by team", topics_path(filter: "team_started", team_id: team.id), class: ("quick-filter-link is-active" if active_filter == "team_started" && active_team_id == team.id) |
| 57 | + li = link_to "Team messages", topics_path(filter: "team_messaged", team_id: team.id), class: ("quick-filter-link is-active" if active_filter == "team_messaged" && active_team_id == team.id) |
| 58 | + |
| 59 | + - if user_signed_in? && @available_note_tags.present? |
| 60 | + .sidebar-section |
| 61 | + h3.sidebar-heading My tags |
| 62 | + ul.quick-filters.tags-list |
| 63 | + - @available_note_tags.each do |tag, count| |
| 64 | + li = link_to "##{tag} (#{count})", topics_path(note_tag: tag), class: ("quick-filter-link is-active" if params[:note_tag] == tag) |
0 commit comments