parent
9bf8abd03b
commit
90a35fa24a
|
@ -18,7 +18,7 @@
|
||||||
class MessagesController < ApplicationController
|
class MessagesController < ApplicationController
|
||||||
menu_item :boards
|
menu_item :boards
|
||||||
default_search_scope :messages
|
default_search_scope :messages
|
||||||
before_filter :find_board, :only => [:new, :preview]
|
before_filter :find_board, :only => [:new, :preview,:edit]
|
||||||
before_filter :find_attachments, :only => [:preview]
|
before_filter :find_attachments, :only => [:preview]
|
||||||
before_filter :find_message, :except => [:new, :preview]
|
before_filter :find_message, :except => [:new, :preview]
|
||||||
before_filter :authorize, :except => [:preview, :edit, :destroy, :new]
|
before_filter :authorize, :except => [:preview, :edit, :destroy, :new]
|
||||||
|
@ -107,7 +107,15 @@ class MessagesController < ApplicationController
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
@message.reload
|
@message.reload
|
||||||
redirect_to board_message_path(@message.board, @message.root, :r => (@message.parent_id && @message.id))
|
redirect_to board_message_path(@message.board, @message.root, :r => (@message.parent_id && @message.id))
|
||||||
|
elsif request.get?
|
||||||
|
respond_to do |format|
|
||||||
|
format.html {
|
||||||
|
layout_file = @project ? 'base_projects' : 'base_courses'
|
||||||
|
render :layout => layout_file
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Delete a messages
|
# Delete a messages
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
<% @nav_dispaly_home_path_label = 1
|
||||||
|
@nav_dispaly_main_course_label = 1
|
||||||
|
@nav_dispaly_main_project_label = 1
|
||||||
|
@nav_dispaly_main_contest_label = 1 %>
|
||||||
|
<% @nav_dispaly_forum_label = 1%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -275,10 +275,10 @@
|
||||||
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
||||||
</span>
|
</span>
|
||||||
<span class="memo_author">
|
<span class="memo_author">
|
||||||
<%=l(:label_question_sponsor)%>: <%= link_to_user(topic.author) %>
|
<%=l(:label_question_sponsor)%>: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
||||||
</span>
|
</span>
|
||||||
<span class="memo_last_person">
|
<span class="memo_last_person">
|
||||||
<%=l(:label_final_reply)%>: <%=link_to_user topic.last_reply.try(:author) %>
|
<%=l(:label_final_reply)%>: <% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %><%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%><% end %>
|
||||||
</span>
|
</span>
|
||||||
<span class="memo_reply">
|
<span class="memo_reply">
|
||||||
<%=l(:label_reply)%>(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
<%=l(:label_reply)%>(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
||||||
|
|
|
@ -243,10 +243,10 @@
|
||||||
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
||||||
</span>
|
</span>
|
||||||
<span class="memo_author">
|
<span class="memo_author">
|
||||||
楼主: <%= link_to_user(topic.author) %>
|
楼主: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
||||||
</span>
|
</span>
|
||||||
<span class="memo_last_person">
|
<span class="memo_last_person">
|
||||||
最后回复:<%= link_to_user topic.last_reply.try(:author) %>
|
最后回复:<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %><%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%><% end %>
|
||||||
</span>
|
</span>
|
||||||
<span class="memo_reply">
|
<span class="memo_reply">
|
||||||
回复(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
回复(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
||||||
|
|
Loading…
Reference in New Issue