修改样式以及添加回复取消功能

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2015-05-13 14:31:54 +08:00
parent fe92b05026
commit fe2f6a0d9d
4 changed files with 25 additions and 14 deletions

View File

@ -194,11 +194,19 @@ class MessagesController < ApplicationController
redirect_to board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id))
end
elsif request.get?
respond_to do |format|
format.html {
layout_file = @project ? 'base_projects' : 'base_courses'
render :layout => layout_file
}
if params[:is_board]
if @project
redirect_to project_boards_path(@project)
elsif @course
redirect_to course_boards_path(@course)
end
else
respond_to do |format|
format.html {
layout_file = @project ? 'base_projects' : 'base_courses'
render :layout => layout_file
}
end
end
end
end

View File

@ -56,7 +56,7 @@
:file_count => l(:label_file_count),
:delete_all_files => l(:text_are_you_sure_all)
} %>
<span id="upload_file_count" :class="c_grey"><%= l(:label_no_file_uploaded)%></span>
<span id="upload_file_count<%= container.id %>" :class="c_grey"><%= l(:label_no_file_uploaded)%></span>
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</span>

View File

@ -56,7 +56,7 @@
:file_count => l(:label_file_count),
:delete_all_files => l(:text_are_you_sure_all)
} %>
<span id="upload_file_count" :class="c_grey"><%= l(:label_no_file_uploaded)%></span>
<span id="upload_file_count<%=container.id %>" :class="c_grey"><%= l(:label_no_file_uploaded)%></span>
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</span>

View File

@ -40,12 +40,10 @@
<p class="talkmain_tit fl fb break_word">&nbsp;&nbsp;<%= h(topic.subject) %></p>
<% if topic.editable_by?(User.current) %>
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: left;
margin-left: 20px;"><%= 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>
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
margin-right: 10px;"><%= l(:button_edit) %></a>
<% end %>
<%= link_to(
l(:button_delete),
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
@ -55,7 +53,9 @@
:style => ' margin-right: 10px;'
) 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>
<p id="contentmessage<%=topic.id %>" class="project_board_content break_word">
@ -96,7 +96,10 @@
<%= 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} %>
<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 %>
<div class="cl"></div>
</div>