|
|
@ -32,7 +32,7 @@
|
|
|
|
<p class="c_dark mb5">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p>
|
|
|
|
<p class="c_dark mb5">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p>
|
|
|
|
<% if @topics.any? %>
|
|
|
|
<% if @topics.any? %>
|
|
|
|
<% @topics.each do |topic| %>
|
|
|
|
<% @topics.each do |topic| %>
|
|
|
|
<div class="talkmain_box" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;">
|
|
|
|
<div class="talkmain_box" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;" id="topic<%= topic.id %>">
|
|
|
|
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
|
|
|
|
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
|
|
|
|
<div class="talkmain_txt fl mt5">
|
|
|
|
<div class="talkmain_txt fl mt5">
|
|
|
|
<% author = topic.author.to_s + ":" %>
|
|
|
|
<% author = topic.author.to_s + ":" %>
|
|
|
@ -40,12 +40,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
<p class="talkmain_tit fl fb break_word"> <%= h(topic.subject) %></p>
|
|
|
|
<p class="talkmain_tit fl fb break_word"> <%= h(topic.subject) %></p>
|
|
|
|
<% if topic.course_editable_by?(User.current) %>
|
|
|
|
<% if topic.course_editable_by?(User.current) %>
|
|
|
|
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: left;
|
|
|
|
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
|
|
|
|
margin-left: 20px;"><%= l(:button_edit) %></a>
|
|
|
|
margin-right: 10px;"><%= l(:button_edit) %></a>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if topic.sticky? %>
|
|
|
|
|
|
|
|
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<%= link_to(
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_delete),
|
|
|
|
l(:button_delete),
|
|
|
|
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
|
|
|
|
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
|
|
|
@ -55,7 +53,9 @@
|
|
|
|
:style => ' margin-right: 10px;'
|
|
|
|
:style => ' margin-right: 10px;'
|
|
|
|
) if topic.destroyable_by?(User.current) %>
|
|
|
|
) if topic.destroyable_by?(User.current) %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% if topic.sticky? %>
|
|
|
|
|
|
|
|
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
@ -63,7 +63,7 @@
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
|
|
|
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
|
|
|
<div id="contentmessage<%=topic.id %>" class="upload_img">
|
|
|
|
<div id="contentmessage<%=topic.id %>" class="upload_img">
|
|
|
|
<%= topic.content %>
|
|
|
|
<%= topic.content.html_safe %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -100,7 +100,8 @@
|
|
|
|
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s} do |f| %>
|
|
|
|
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s} do |f| %>
|
|
|
|
|
|
|
|
|
|
|
|
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
|
|
|
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
|
|
|
<a href="#" onclick="$('#message_form<%= topic.id%>').submit();" class="talk_btn fr c_white" style=""><%= l(:label_memo_create)%></a>
|
|
|
|
<%= toggle_link l(:button_cancel), "reply" + topic.id.to_s, :focus => 'message_content',:class => 'grey_btn fr ml10' %>
|
|
|
|
|
|
|
|
<a href="#" onclick="$('#message_form<%= topic.id%>').submit();" class="blue_btn fr " style=""><%= l(:label_memo_create)%></a>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|