|
|
@ -8,12 +8,14 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
</h2>
|
|
|
|
</h2>
|
|
|
|
<a href="javascript:void(0)" class="green_btn fr newtalk " nhname="showbtn"><%= l(:label_message_new) %></a>
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
|
|
|
<a href="javascript:void(0)" class="green_btn fr newtalk " id="new_topic_btn" nhname="showbtn"><%= l(:label_message_new) %></a>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class=" talklist_box" >
|
|
|
|
<div class=" talklist_box" >
|
|
|
|
<div class="talk_new ml15 mb10" nhname="about_talk" id="about_newtalk" style="display:<%= !@flag.nil? && @flag=='true' ? 'block' : 'none' %>;" >
|
|
|
|
<div class="talk_new ml15 mb10" nhname="about_talk" id="about_newtalk" style="display:none;" >
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
<%= render :partial => 'course_new' %>
|
|
|
|
<%= render :partial => 'course_new' %>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
@ -39,7 +41,7 @@
|
|
|
|
<% author = topic.author.to_s + ":" %>
|
|
|
|
<% author = topic.author.to_s + ":" %>
|
|
|
|
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %>
|
|
|
|
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="talkmain_tit fl fb break_word"> <%= h(topic.subject) %></p>
|
|
|
|
<p class="talkmain_tit fl fb break_word" style="width:auto;"> <%= h(topic.subject) %></p>
|
|
|
|
<% if topic.course_editable_by?(User.current) %>
|
|
|
|
<% if topic.course_editable_by?(User.current) %>
|
|
|
|
<a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right;
|
|
|
|
<a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right;
|
|
|
|
margin-right: 10px;"><%= l(:button_edit) %></a>
|
|
|
|
margin-right: 10px;"><%= l(:button_edit) %></a>
|
|
|
@ -111,21 +113,15 @@
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% replies_all = topic.children.
|
|
|
|
<% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).
|
|
|
|
includes(:author, :attachments, {:board => :project}).
|
|
|
|
reorder("#{Message.table_name}.created_on DESC").all %>
|
|
|
|
reorder("#{Message.table_name}.created_on DESC").offset(2).
|
|
|
|
<% unless replies_all.empty? %>
|
|
|
|
all %>
|
|
|
|
<% replies_all_i = 0 %>
|
|
|
|
<% replies_show = topic.children.
|
|
|
|
<div class="talkWrapMsg" nhname="nh_reply_div" id="nh_reply_div_<%= topic.id %>">
|
|
|
|
includes(:author, :attachments, {:board => :project}).
|
|
|
|
|
|
|
|
reorder("#{Message.table_name}.created_on DESC").limit(2).
|
|
|
|
|
|
|
|
all %>
|
|
|
|
|
|
|
|
<% unless replies_show.empty? %>
|
|
|
|
|
|
|
|
<% reply_count = 0 %>
|
|
|
|
|
|
|
|
<div class="talkWrapMsg">
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
<% replies_show.each do |message| %>
|
|
|
|
<% replies_all.each do |message| %>
|
|
|
|
|
|
|
|
<% replies_all_i=replies_all_i+1 %>
|
|
|
|
<li>
|
|
|
|
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>">
|
|
|
|
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
|
|
|
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
|
|
|
<div class="Msg_txt">
|
|
|
|
<div class="Msg_txt">
|
|
|
|
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
|
|
|
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
|
|
@ -157,37 +153,8 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="talkWrapMsg" id="talkWrapMsg<%= topic.id %>" style="display: none">
|
|
|
|
<%if topic.replies_count>2 %>
|
|
|
|
<ul>
|
|
|
|
<div class="talkWrapMsg"><a nhname="reply_ex_btn" data-count="<%= topic.replies_count %>" data-init="0" class=" ml258" href="javascript:void(0)" id="showgithelp<%= topic.id%>" value="show_help" class="c_dblue lh23" style="color: #0781b4;" >展开回复(<%= topic.replies_count.to_s%>)</a></div>
|
|
|
|
<% replies_all.each do |message| %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
|
|
|
|
|
|
|
<div class="Msg_txt">
|
|
|
|
|
|
|
|
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
<p class="fl"><%= textAreailizable message,:content,:attachments => message.attachments %></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>
|
|
|
|
|
|
|
|
<%= link_to(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
l(:button_delete),
|
|
|
|
|
|
|
|
{:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
|
|
|
|
|
|
|
|
:method => :post,
|
|
|
|
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
|
|
|
|
:title => l(:button_delete),
|
|
|
|
|
|
|
|
:class => ' c_dblue fr'
|
|
|
|
|
|
|
|
) if message.course_destroyable_by?(User.current) %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</li><!---留言内容-->
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%if replies_all.first %>
|
|
|
|
|
|
|
|
<div class="talkWrapMsg"><a class=" ml258" href="javascript:void(0)" id="showgithelp<%= topic.id%>" value="show_help" onclick ="showhelpAndScrollToMessage('talkWrapMsg<%= topic.id %>','#showgithelp<%= topic.id%>','<%=topic.replies_count%>'); " class="c_dblue lh23" style="color: #0781b4;" >展开回复(<%= topic.replies_count.to_s%>)</a></div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|