Skip to content

Commit 478260d

Browse files
committed
optimize the table view for group classifier and banned user
1 parent cd6f401 commit 478260d

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

app/views/banned_users/index.html.erb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
<% end %>
3030
</th>
3131

32-
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
33-
Telegram Group Id
34-
</th>
3532
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
3633
<%= link_to banned_users_path(params.permit!.merge(sort: 'group_name', direction: params[:sort] == 'group_name' && params[:direction] == 'asc' ? 'desc' : 'asc')), class: "hover:text-gray-700 flex items-center space-x-1" do %>
3734
<span>Group</span>
@@ -72,9 +69,6 @@
7269
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
7370
<%= banned_user.id %>
7471
</td>
75-
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
76-
<%= banned_user.group_id %>
77-
</td>
7872
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
7973
<%= banned_user.group_name || 'Private' %>
8074
</td>
@@ -85,7 +79,7 @@
8579
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
8680
<%= banned_user.sender_user_name %>
8781
</td>
88-
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
82+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" title="<%= banned_user.spam_message %>">
8983
<%= truncate(banned_user.spam_message, length: 50) %>
9084
</td>
9185

app/views/group_classifier_states/index.html.erb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
<% end %>
3030
</th>
3131

32-
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
33-
Telegram Group Id
34-
</th>
3532
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
3633
<%= link_to group_classifier_states_path(params.permit!.merge(sort: 'group_name', direction: params[:sort] == 'group_name' && params[:direction] == 'asc' ? 'desc' : 'asc')), class: "hover:text-gray-700 flex items-center space-x-1" do %>
3734
<span>Group</span>
@@ -86,9 +83,6 @@
8683
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
8784
<%= group_classifier_state.id %>
8885
</td>
89-
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
90-
<%= group_classifier_state.group_id %>
91-
</td>
9286
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
9387
<%= group_classifier_state.group_name || 'Private' %>
9488
</td>

app/views/trained_messages/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@
180180
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 <%= message_type_classes(trained_message.message_type) %>">
181181
<%= trained_message.message_type&.humanize || 'Unknown' %>
182182
</td>
183-
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
184-
<%= trained_message.sender_user_name || 'Admin Imported' %>
183+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500" title="<%= trained_message.sender_user_name %>">
184+
<%= truncate(trained_message.sender_user_name, length: 20) || 'Admin Imported' %>
185185
</td>
186186
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
187187
<%= trained_message.group_name || 'Imported' %>

0 commit comments

Comments
 (0)