diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 53fb21b8c..434ea4470 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -101,8 +101,9 @@ class BoardsController < ApplicationController @topic_count = @board ? @board.topics.count : 0 if @project @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] + #现在发布帖子的时候置顶功能已经没有了。所以取消这个置顶排序 #{Message.table_name}.sticky DESC, @topics = @board.topics. - reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc"). + reorder("#{Message.table_name}.created_on desc"). includes(:last_reply). limit(@topic_pages.per_page). offset(@topic_pages.offset). diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index 769e62209..a38bd4096 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -73,7 +73,7 @@ class JournalsController < ApplicationController text = text.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]') @content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n" @content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n" - @content = "
" << @content << "
" + @content = "
" << @content << "
\n\n
" @id = user.id rescue ActiveRecord::RecordNotFound render_404 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e100a8fc9..cfb655baa 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2356,8 +2356,8 @@ module ApplicationHelper if work.nil? link_to "提交作品", new_student_work_path(:homework => homework.id),:class => 'c_blue' else - if homework.homework_type == 1 && homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前 - link_to "作品已交", "", :class => 'c_blue', :title => "开启匿评后不可修改作品" + if homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前 + link_to "作品已交", "javascript:void(0)", :class => 'c_blue', :title => "开启匿评后不可修改作品" elsif homework.homework_type == 2 #编程作业不能修改作品 link_to "修改作品", new_student_work_path(:homework => homework.id),:class => 'c_blue' else diff --git a/app/models/homework_detail_programing.rb b/app/models/homework_detail_programing.rb index 2877ed6c1..0c445d672 100644 --- a/app/models/homework_detail_programing.rb +++ b/app/models/homework_detail_programing.rb @@ -4,6 +4,6 @@ class HomeworkDetailPrograming < ActiveRecord::Base belongs_to :homework_common def language_name - %W(C C++ Python).at(self.language.to_i - 1) + %W(C C++ Python Java).at(self.language.to_i - 1) end end diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 3cfd4ae72..4f022261f 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -51,9 +51,9 @@ :data => {:confirm => l(:text_are_you_sure)}, :class => 'talk_edit fr', :style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %> - <% if topic.sticky? %> - <%= l(:label_board_sticky)%> - <% end %> + <%# if topic.sticky? %> + + <%# end %> diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index 2643c93e7..ae2a848e0 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -3,4 +3,4 @@ <%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'talk_edit fr' if User.current.allowed_to?(:add_issues, @project) %> <%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %> <%= link_to l(:button_edit), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("all_attributes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:edit_issues, @project) %> -<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %> +<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_journal_kind_reply"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %> diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index c6b805d0a..f6b41f36d 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -1,3 +1,4 @@ +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> <%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %> <%= error_messages_for 'issue', 'time_entry' %> <%= render :partial => 'conflict' if @conflict %> @@ -19,7 +20,7 @@
回复 - <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %> + <%= f.kindeditor :notes, :style => "width:99%;",:height=>'100px', :cssData =>"blockquote { padding:0px}", :rows => "5", :no_label => true, :editor_id=>'issue_journal_kind_reply' %>
diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index 68e991594..8befaf37e 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -12,9 +12,9 @@

<% if journal.details.any? %> <% details_to_strings(journal.details).each do |string| %> -

<%= string %>

+

<%= string.html_safe %>

<% end %> - <% end %> + <% end %>

diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 67867e2c6..0eb779a23 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -64,7 +64,7 @@

<%#--引用时不能修改,剥离出引用内容--%> - + <%= l(:button_submit) %> <% end %> diff --git a/app/views/journals/new.js.erb b/app/views/journals/new.js.erb index b24b5ffb6..9c5d87079 100644 --- a/app/views/journals/new.js.erb +++ b/app/views/journals/new.js.erb @@ -1,4 +1,4 @@ -$('#issue_notes').val("<%= raw escape_javascript(@content) %>"); +issue_journal_kind_reply.html("<%= raw escape_javascript(@content) %>"); <% # when quoting a private journal, check the private checkbox if @journal && @journal.private_notes? diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 0a377b1e5..7ddfc85ea 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -172,7 +172,7 @@ 编辑贴吧 - 删除贴吧 + 删除贴吧 <% end %> diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 81758ff97..4cafce30d 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -56,7 +56,7 @@ <%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
-
+
<%= @memo.content.html_safe%>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 971794699..22317dc91 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -34,7 +34,7 @@ :id => act.id}, :class => "problem_tit fl fb " %>
-

<%= textAreailizable act,:description %>
+

<%= act.description.html_safe %>
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

@@ -51,7 +51,7 @@ <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.project_issues_index}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"}, :class => "problem_tit fl fb" %>
-

<%= textilizable act,:notes %>
+

<%= act.notes.html_safe %>
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index ff2420a1a..da2723636 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -3,7 +3,7 @@