Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/views/topics/_avatar_list.slim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
- css_classes << "is-major-contributor" if !participant.core_team? && !participant.committer? && participant.major_contributor?
- css_classes << "is-significant-contributor" if !participant.core_team? && !participant.committer? && !participant.major_contributor? && participant.significant_contributor?
- css_classes << "is-past-contributor" if participant.past_contributor?
- badge_text = participant.contributor_badge ? "#{participant.name} (#{participant.contributor_badge})" : participant.name
- role_label = participant.contributor_badge || "User"
- badge_text = "#{participant.name} (#{role_label})"
= link_to person_path(participant.email), class: "participant-avatar-link" do
= image_tag participant.display_gravatar_url(size: 32), class: css_classes.join(" "), alt: participant.name, title: badge_text
- if total_participants > participants.count
Expand Down
3 changes: 2 additions & 1 deletion app/views/topics/_commitfest_icon.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
- reviewers = summary[:reviewers] || []
- tags = summary[:tags] || []

div class="topic-icon commitfest-icon#{committed ? ' commitfest-committed' : ''}" data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
- tooltip_label = summary[:status].presence ? "Commitfest status: #{summary[:status]}" : "Commitfest patch"
div class="topic-icon commitfest-icon#{committed ? ' commitfest-committed' : ''}" title=tooltip_label data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
i.fa-solid class=icon_class
.topic-icon-hover data-hover-popover-target="popover" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
.commitfest-hover
Expand Down
3 changes: 2 additions & 1 deletion app/views/topics/_note_icon.html.slim
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
- count = count.to_i
- classes = ["topic-icon", "activity-note"]
- classes << "is-hidden" unless count.positive?
div class=classes.join(" ") id=dom_id(topic, "notes") data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
- tooltip_label = count.positive? ? "Notes: #{count}" : "Notes"
div class=classes.join(" ") id=dom_id(topic, "notes") title=tooltip_label data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
i.fa-solid.fa-note-sticky
- if count.positive?
span.topic-icon-badge = count
4 changes: 3 additions & 1 deletion app/views/topics/_participant_row.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
- tooltip_parts = []
- tooltip_parts << "#{message_count} messages" if message_count
- tooltip_parts << "last #{smart_time_display(last_at)}" if last_at
- tooltip = local_assigns[:tooltip] || (tooltip_parts.any? ? tooltip_parts.join(", ") : alias_record.name)
- role_label = alias_record.contributor_badge || "User"
- tooltip_parts << role_label
- tooltip = local_assigns[:tooltip] || (tooltip_parts.any? ? tooltip_parts.join(", ") : "#{alias_record.name} (#{role_label})")
- avatar_classes = ["participant-avatar"]
- membership_icons = []
- membership_types = alias_record.contributor_membership_types
Expand Down
7 changes: 5 additions & 2 deletions app/views/topics/_participation_icon.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
- classes << "is-hidden" unless participation[:mine] || participation[:team]
- aliases = participation[:aliases] || []
- count = aliases.size
div class=classes.join(" ") id=dom_id(topic, "participation") data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
- tooltip_label = participation[:mine] ? "You participated" : "Team participated"
- tooltip_label = count.positive? ? "#{tooltip_label}: #{count}" : tooltip_label
div class=classes.join(" ") id=dom_id(topic, "participation") title=tooltip_label data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
i.fa-solid.fa-user-group
- if count > 1
span.topic-icon-badge = count
- if aliases.any?
.topic-icon-hover data-hover-popover-target="popover" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
- aliases.each do |alias_record|
- participant_stub = { alias: alias_record }
= render partial: "participant_row", locals: { participant: participant_stub, avatar_size: 32, tooltip: alias_record.name }
- role_label = alias_record.contributor_badge || "User"
= render partial: "participant_row", locals: { participant: participant_stub, avatar_size: 32, tooltip: "#{alias_record.name} (#{role_label})" }
4 changes: 2 additions & 2 deletions app/views/topics/_status_cell.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ td.topic-title.status-border class=status_class id=dom_id(topic, "status_cell")
- read_count = state[:read_count].to_i
- total_count = topic.messages.count
- unread_count = [total_count - read_count, 0].max
.topic-icon.topic-icon-reading
.topic-icon.topic-icon-reading title="Unread messages: #{unread_count}"
i.fa-solid.fa-envelope
- if unread_count.positive?
span.topic-icon-badge.topic-icon-badge-sup = unread_count
Expand All @@ -15,6 +15,6 @@ td.topic-title.status-border class=status_class id=dom_id(topic, "status_cell")
- if commitfest_summary
= render partial: "topics/commitfest_icon", locals: { summary: commitfest_summary }
- elsif topic.attachments.exists?
.topic-icon
.topic-icon title="Attachments"
i.fa-solid.fa-paperclip
= link_to topic.title, topic_path(topic), class: "topic-link"
6 changes: 4 additions & 2 deletions app/views/topics/_team_readers_icon.html.slim
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
- count = readers&.size.to_i
- classes = ["topic-icon", "activity-team-read"]
- classes << "is-hidden" if count.zero?
div class=classes.join(" ") id=dom_id(topic, "team_readers") data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
- tooltip_label = count.positive? ? "Team readers: #{count}" : "Team readers"
div class=classes.join(" ") id=dom_id(topic, "team_readers") title=tooltip_label data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
i.fa-solid.fa-users
- if count.positive?
span.topic-icon-badge = count
Expand All @@ -10,4 +11,5 @@ div class=classes.join(" ") id=dom_id(topic, "team_readers") data-controller="ho
- alias_record = reader[:user]&.person&.default_alias || reader[:user]&.aliases&.first
- next unless alias_record
- participant_stub = { alias: alias_record }
= render partial: "participant_row", locals: { participant: participant_stub, avatar_size: 32, tooltip: "#{alias_record.name} (#{reader[:status]})" }
- role_label = alias_record.contributor_badge || "User"
= render partial: "participant_row", locals: { participant: participant_stub, avatar_size: 32, tooltip: "#{alias_record.name} (#{reader[:status]}, #{role_label})" }
3 changes: 2 additions & 1 deletion app/views/topics/_topic_row_user.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ tr id=dom_id(topic) class="topic-row topic-#{state[:status] || 'new'}" data-topi
- if topic.has_contributor_activity?
- contributor_participants = topic.contributor_participants
- contributor_count = contributor_participants.size
div class ="topic-icon activity-#{ topic.highest_contributor_activity }" data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
- activity_label = case topic.highest_contributor_activity; when "core_team" then "Core Team activity"; when "committer" then "Committer activity"; else "Contributor activity"; end
div class ="topic-icon activity-#{ topic.highest_contributor_activity }" title="#{activity_label}: #{contributor_count}" data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
i.fa-solid.fa-users-rays
- if contributor_count.positive?
span.topic-icon-badge = contributor_count
Expand Down
3 changes: 2 additions & 1 deletion app/views/topics/_topics.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
- if topic.has_contributor_activity?
- contributor_participants = topic.contributor_participants
- contributor_count = contributor_participants.size
div class ="topic-icon activity-#{ topic.highest_contributor_activity }" data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
- activity_label = case topic.highest_contributor_activity; when "core_team" then "Core Team activity"; when "committer" then "Committer activity"; else "Contributor activity"; end
div class ="topic-icon activity-#{ topic.highest_contributor_activity }" title="#{activity_label}: #{contributor_count}" data-controller="hover-popover" data-hover-popover-delay-value="200" data-action="mouseenter->hover-popover#show mouseleave->hover-popover#scheduleHide"
i.fa-solid.fa-users-rays
- if contributor_count.positive?
span.topic-icon-badge = contributor_count
Expand Down
3 changes: 2 additions & 1 deletion app/views/topics/_topics_page.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
- css_classes << "is-major-contributor" if !participant.core_team? && !participant.committer? && participant.major_contributor?
- css_classes << "is-significant-contributor" if !participant.core_team? && !participant.committer? && !participant.major_contributor? && participant.significant_contributor?
- css_classes << "is-past-contributor" if participant.past_contributor?
- badge_text = participant.contributor_badge ? "#{participant.name} (#{participant.contributor_badge})" : participant.name
- role_label = participant.contributor_badge || "User"
- badge_text = "#{participant.name} (#{role_label})"
= link_to person_path(participant.email), class: "participant-avatar-link" do
= image_tag participant.display_gravatar_url(size: 32), class: css_classes.join(" "), alt: participant.name, title: badge_text
- total_participants = topic.messages.select(:sender_id).distinct.count
Expand Down