掲示板実装
This commit is contained in:
@@ -414,6 +414,45 @@
|
||||
|
||||
<!-- 右カラム: 情報パネル (1/3) -->
|
||||
<div class="space-y-6">
|
||||
<!-- 掲示板リンク -->
|
||||
<div class="bg-white shadow rounded-lg border border-gray-200 overflow-hidden">
|
||||
<div class="p-4 flex items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 bg-indigo-100 rounded-md p-3">
|
||||
<i class="fa-solid fa-comments text-indigo-600 text-xl"></i>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<h3 class="text-lg font-medium text-gray-900">外交・交渉掲示板</h3>
|
||||
<p class="text-sm text-gray-500">
|
||||
秘密交渉や全体アナウンスはこちら
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<%= link_to game_boards_path(@game), class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" do %>
|
||||
掲示板へ
|
||||
<%
|
||||
# 未読件数取得(参加中の全掲示板の合計)
|
||||
current_participant = @game.participants.find_by(user: current_user)
|
||||
if current_participant
|
||||
total_unread = 0
|
||||
current_participant.boards.each do |board|
|
||||
total_unread += board.unread_count_for(current_participant)
|
||||
end
|
||||
if total_unread > 0
|
||||
%>
|
||||
<span class="ml-2 inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-100 bg-red-600 rounded-full">
|
||||
<%= total_unread %>
|
||||
</span>
|
||||
<%
|
||||
end
|
||||
end
|
||||
%>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 国ステータス表 -->
|
||||
<div class="bg-white shadow rounded-lg border border-gray-200 overflow-hidden">
|
||||
<div class="px-4 py-3 bg-gray-50 border-b border-gray-200">
|
||||
|
||||
Reference in New Issue
Block a user