Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

recent_topics: Show action buttons next to topic.

Aman Agrawale7a65fa68898
diff --git a/static/styles/recent_topics.scss b/static/styles/recent_topics.scss
index 83df444e104..8ac72202227 100644
--- a/static/styles/recent_topics.scss
+++ b/static/styles/recent_topics.scss
@@ -146,7 +146,6 @@
.recent_topic_unread_count {
background-color: hsl(105, 2%, 50%) !important;
color: hsl(0, 0%, 100%);
- float: right;
height: 16px;
line-height: 16px;
font-size: 12px;
@@ -156,6 +155,26 @@
background-color: hsl(0, 0%, 89%);
padding: 0 4px;
margin-right: 10px;
+ align-self: center;
+ }
+
+ .flex_container {
+ display: flex;
+ align-items: center;
+ }
+
+ .flex_container .left_part {
+ flex-wrap: wrap;
+ }
+
+ .flex_container .right_part {
+ margin-left: auto;
+ display: inline-flex;
+ }
+
+ .recent_topic_actions {
+ display: flex;
+ flex-flow: row nowrap;
}
.recent_avatars {
diff --git a/static/templates/recent_topic_row.hbs b/static/templates/recent_topic_row.hbs
index ec30a38fd43..f969ea5c113 100644
--- a/static/templates/recent_topic_row.hbs
+++ b/static/templates/recent_topic_row.hbs
@@ -8,21 +8,27 @@
</div>
</td>
<td class="recent_topic_name">
- <div class="recent_topics_focusable">
- <a href="{{topic_url}}">{{topic}}</a>
- </div>
- {{#if unread_count}}<span class="recent_topic_unread_count">{{unread_count}}</span>{{/if}}
- </td>
- <td class="recent_topic_actions">
- <div class="recent_topics_focusable">
- {{#if topic_muted}}
- <i class="fa fa-bell-slash on_hover_topic_unmute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Unmute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>
- {{else}}
- <i class="fa fa-bell-slash on_hover_topic_mute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Mute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>
- {{/if}}
- </div>
- <div class="recent_topics_focusable">
- <i class="fa fa-check-circle on_hover_topic_read recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Mark as read' }}" role="button" tabindex="0" aria-label="{{t 'Mark as read' }}"></i>
+ <div class="flex_container">
+ <div class="left_part">
+ <div class="recent_topics_focusable">
+ <a href="{{topic_url}}">{{topic}}</a>
+ </div>
+ </div>
+ <div class="right_part">
+ {{#if unread_count}}<span class="recent_topic_unread_count">{{unread_count}}</span>{{/if}}
+ <div class="recent_topic_actions">
+ <div class="recent_topics_focusable">
+ {{#if topic_muted}}
+ <i class="fa fa-bell-slash on_hover_topic_unmute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Unmute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>
+ {{else}}
+ <i class="fa fa-bell-slash on_hover_topic_mute recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Mute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>
+ {{/if}}
+ </div>
+ <div class="recent_topics_focusable">
+ <i class="fa fa-check-circle on_hover_topic_read recipient_bar_icon" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" title="{{t 'Mark as read' }}" role="button" tabindex="0" aria-label="{{t 'Mark as read' }}"></i>
+ </div>
+ </div>
+ </div>
</div>
</td>
<td class='recent_topic_users'>
@@ -39,7 +45,9 @@
{{/each}}
</ul>
</td>
- <td class="recent_topic_timestamp" title="{{this.full_last_msg_date_time}}">
- {{ last_msg_time }}
+ <td class="recent_topic_timestamp">
+ <div class="last_msg_time" title="{{this.full_last_msg_date_time}}">
+ {{ last_msg_time }}
+ </div>
</td>
</tr>
diff --git a/static/templates/recent_topics_table.hbs b/static/templates/recent_topics_table.hbs
index 03519c70a11..055f7f5f800 100644
--- a/static/templates/recent_topics_table.hbs
+++ b/static/templates/recent_topics_table.hbs
@@ -13,9 +13,8 @@
<tr>
<th data-sort="stream_sort">{{t 'Stream' }}</th>
<th data-sort="topic_sort">{{t 'Topic' }}</th>
- <th>{{t 'Actions' }}</th>
- <th>{{t 'Participants' }}</th>
- <th data-sort="numeric" data-sort-prop="last_msg_id" class="active descend">{{t 'Last message' }}</th>
+ <th class='participants_header'>{{t 'Participants' }}</th>
+ <th data-sort="numeric" data-sort-prop="last_msg_id" class="last_msg_time_header active descend">{{t 'Last message' }}</th>
</tr>
</thead>
<tbody class="required-text" data-empty="{{t 'No topics match your current filter.' }}"></tbody>