Skip to content
Merged
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/_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
3 changes: 2 additions & 1 deletion app/views/topics/_participation_icon.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ div class=classes.join(" ") id=dom_id(topic, "participation") data-controller="h
.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"
3 changes: 2 additions & 1 deletion app/views/topics/_team_readers_icon.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,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/_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
Loading