From fd4a2b19c8cd8dfdeae2383cbc894446ff098522 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 25 Sep 2015 16:11:59 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E8=80=81=E5=B8=88=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_courses.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) %> From 9a5b83c89857727e3901a809b7133b4c5e2450ba Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 16:34:01 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=A4=A7=E4=BA=8E=E4=B8=A4=E6=9D=A1=E5=9B=9E=E5=A4=8D=E3=80=82?= =?UTF-8?q?=E9=82=A3=E4=B9=88=E5=B1=95=E5=BC=80=E5=9B=9E=E5=A4=8D=E5=B0=B1?= =?UTF-8?q?=E8=A6=81=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index c15bd9bb8..133a90547 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -75,7 +75,9 @@
回复(<%=@reply_count %>)
+ <% if @reply_count > 2%> 点击展开更多回复 + <% end %>
From f54149a5b70fb5f86635e90e6ac1a30c5c7e9482 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 16:53:23 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=8F=91=E9=80=81=E5=8A=A8=E6=80=81=20?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=BC=9A=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/attachment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 9b5a362e24ace68ef2a98a4d5d795e63db9029c4 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 25 Sep 2015 16:57:36 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/file.html.erb | 58 +++++++++++++++++------------ 1 file changed, 35 insertions(+), 23 deletions(-) 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 -%> From 745a32b6845975d45e406373e30761f3f0540330 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 16:58:36 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93tag=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_tag_yun.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From aa07c3408fda8253b7f1aeeef9847d10b683cf9c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 25 Sep 2015 17:18:01 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0TAG=E5=90=8E=E7=82=B9=E5=87=BB=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/tag_save.js.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/tags/tag_save.js.erb b/app/views/tags/tag_save.js.erb index 5a29c113c..f6ada82eb 100644 --- a/app/views/tags/tag_save.js.erb +++ b/app/views/tags/tag_save.js.erb @@ -20,8 +20,9 @@ $('#tags_name2').val(""); $("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>"); <%else%> $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); - $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name', - :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); + $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").replaceWith('<%= escape_javascript(render :partial => 'tags/tag_new', :locals => {:obj => @obj, :object_flag => "6"}) %>'); +//render :partial => 'tags/course_attachment_tag_name', +//:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) <%end%> $("#tags_name_<%=@obj.id%>").val(""); From 591324854bc3fde0c98287b0e98bb8ef52641476 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 25 Sep 2015 17:22:31 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=95=99=E8=A8=80=EF=BC=8C=E4=B8=8B=E9=9D=A2?= =?UTF-8?q?=E7=95=99=E8=A8=80=E6=A1=86=E8=8E=B7=E5=BE=97=E7=84=A6=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/project.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 10561fe01..3553b4cef 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -362,9 +362,11 @@ $(document).ready(function () { }); function showAndScrollTo(id, focus) { + $('#' + id).show(); if (focus !== null) { - $('#' + focus).focus(); + $('#' + focus).focus(); + issue_journal_kind_reply.focus(); } $('html, body').animate({scrollTop: $('#' + id).offset().top}, 400); } From 4845435aa310da1251abf87ed9cc1e047e022840 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 17:38:19 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=B8=96=E5=AD=90=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/edit.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@
- +
- +