Skip to content

Commit 2077e10

Browse files
moozzidutow
authored andcommitted
Display mailing list badges in a separate column
1 parent a4accf6 commit 2077e10

5 files changed

Lines changed: 8 additions & 3 deletions

File tree

app/assets/stylesheets/components/topics.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ body.sidebar-collapsed .topics-table th.topic-title .sidebar-burger-button {
125125
& .topic-replies {
126126
width: 100px;
127127
}
128+
& .topic-mailing-lists,
128129
& .topic-activity {
129130
width: 150px;
130131
}
@@ -274,6 +275,7 @@ a.topic-icon {
274275
}
275276

276277
& th.activity-header,
278+
& th.mailing-lists-header,
277279
& td.topic-activity {
278280
display: none;
279281
}

app/views/topics/_status_cell.html.slim

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ td.topic-title.status-border class=status_class id=dom_id(topic, "status_cell")
2828
.topic-title-icons
2929
== icons_html
3030
span
31-
- topic_lists = @topic_mailing_lists_map&.dig(topic.id) || []
32-
- if topic_lists.any?
33-
= mailing_list_badges_html(topic_lists)
3431
= link_to topic.title, topic_title_link(topic), class: "topic-link"
3532
.topic-title-mobile
3633
= link_to topic.title, topic_title_link(topic), class: "topic-link"

app/views/topics/_topics.html.slim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
tr id=dom_id(topic) class="topic-row" data-topic-id=topic.id data-last-message-id=topic.last_message_id
1616
= render partial: "topics/status_cell", locals: { topic: topic, state: {}, note_count: 0, team_readers: [], star_data: {} }
17+
td.topic-mailing-lists data-label="Mailing Lists"
18+
- topic_lists = @topic_mailing_lists_map&.dig(topic.id) || []
19+
- if topic_lists.any?
20+
= mailing_list_badges_html(topic_lists)
1721
td.topic-activity data-label="Activity"
1822
- replies_count = [topic.message_count - 1, 0].max
1923
.activity-info.compact

app/views/topics/index.html.slim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
button.sidebar-burger-button type="button" aria-label="Expand sidebar" data-action="click->sidebar#toggle"
1111
i.fa-solid.fa-bars aria-hidden="true"
1212
| Topic
13+
th.mailing-lists-header Mailing Lists
1314
th.activity-header Activity
1415
th.participants-header Participants
1516
tbody#topics

app/views/topics/search.html.slim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
thead
5959
tr
6060
th.topic-title Topic
61+
th.mailing-lists-header Mailing Lists
6162
th.activity-header Activity
6263
th.participants-header Participants
6364
tbody#topics

0 commit comments

Comments
 (0)