diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 47ab30cb1..f7fb9b1aa 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -73,7 +73,7 @@ class Attachment < ActiveRecord::Base cattr_accessor :thumbnails_storage_path @@thumbnails_storage_path = File.join(Rails.root, "tmp", "thumbnails") - before_save :files_to_final_location,:act_as_course_activity,:act_as_forge_activity + before_save :files_to_final_location,:act_as_course_activity after_create :office_conver, :be_user_score,:act_as_forge_activity after_update :office_conver, :be_user_score after_destroy :delete_from_disk,:down_user_score diff --git a/app/models/journal_reply.rb b/app/models/journal_reply.rb index a1ea761af..16055608a 100644 --- a/app/models/journal_reply.rb +++ b/app/models/journal_reply.rb @@ -16,7 +16,7 @@ class JournalReply < ActiveRecord::Base replier = User.find(self.reply_id) receivers = [] # 被回复的人发送消息 - if journal.user_id != self.reply_id && self.reply_id != journal.issue.author_id + if journal.user_id != self.reply_id && self.reply_id != journal.issue.author_id && self.reply_id != journal.issue.assigned_to_id receivers << replier end if journal.user_id != journal.issue.author_id && self.reply_id != journal.issue.author_id diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb index 75fa1858c..0ce174545 100644 --- a/app/views/attachments/file.html.erb +++ b/app/views/attachments/file.html.erb @@ -1,26 +1,38 @@ -

<%=h @attachment.filename %>

+
+
+
+
+
+

<%=h @attachment.filename %>

-
-

<%= h("#{@attachment.description} - ") unless @attachment.description.blank? %> - <%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %>

-

<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> - (<%= number_to_human_size @attachment.filesize %>)    - - <% if @attachment!=nil &&(@attachment.container_type == 'Document' || @attachment.container_type == 'WikiPage') && - User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %> - <%= l(:review_assignments)+":" %><%= link = link_to(l(:button_add), {:controller => 'code_review', - :action => 'assign', :action_type => 'attachment', - :id=>@attachment.project, - :change_id => '', :attachment_id => @attachment.id, - }, :class => 'icon icon-add') %> - <% end %> -

-
-  -<%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %> +
+

<%= h("#{@attachment.description} - ") unless @attachment.description.blank? %> + <%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %>

+

<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> + (<%= number_to_human_size @attachment.filesize %>)    + + <% if @attachment!=nil &&(@attachment.container_type == 'Document' || @attachment.container_type == 'WikiPage') && + User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %> + <%= l(:review_assignments)+":" %><%= link = link_to(l(:button_add), {:controller => 'code_review', + :action => 'assign', :action_type => 'attachment', + :id=>@attachment.project, + :change_id => '', :attachment_id => @attachment.id, + }, :class => 'icon icon-add') %> + <% end %> +

+
+   + <%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %> + + <% html_title @attachment.filename %> -<% html_title @attachment.filename %> + <% content_for :header_tags do -%> + <%= stylesheet_link_tag "scm" -%> + <% end -%> +
+
+
+
+
+
-<% content_for :header_tags do -%> - <%= stylesheet_link_tag "scm" -%> -<% end -%> diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb index 03c5c0ac4..f5e22002a 100644 --- a/app/views/files/_tag_yun.html.erb +++ b/app/views/files/_tag_yun.html.erb @@ -3,7 +3,7 @@ <% if tag_name && tag_name == k%> <%= k%>×<%= v%> <% else%> - <%= k%>×<%= v%> + <%= k%>×<%= v%> <% end%> <% end%> <% end%> \ No newline at end of file diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 800f2ff9d..fe0b5ef84 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -1,5 +1,5 @@ <%# course_model %> -<% teacher_num = teacherCount(@course) %> +<% teacher_num = searchTeacherAndAssistant(@course).count %> <% student_num = studentCount(@course) %> <% course_file_num = visable_attachemnts_incourse(@course).count%> <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index 4a515ee1f..310cdb6ad 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -28,14 +28,14 @@
- +
- +