From 43c630122368ce0f89abf4243dbc33aff33efea1 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 25 Jul 2016 09:47:14 +0800 Subject: [PATCH 01/20] =?UTF-8?q?id=E8=BD=AC=E6=8D=A2=E6=88=90=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 6 ++++++ app/models/user.rb | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7aae73e94..58622a089 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -33,6 +33,12 @@ module ApplicationHelper extend Forwardable def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter + def user_path(resource, parameters = {}) + if Fixnum === resource + resource = User.find(resource) + end + super + end # def user_blogs_path(resource,parameters={}) # super diff --git a/app/models/user.rb b/app/models/user.rb index 996aa9be7..7e592248e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -311,6 +311,11 @@ class User < Principal ) end + # id 转换成 登录名 + def to_param + Fixnum === self.login ? id : login + end + # ====================================================================== def my_workplace self.user_extensions.try(:occupation).to_s From df8036289966e8e982b0a9fe0fc73e712bf9a56d Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 25 Jul 2016 09:58:17 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index ee520cb77..92a85e32d 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -595,19 +595,19 @@ module CoursesHelper def get_acts_list_type type case type when "homework" - ">" + l(:label_homework_acts) + "> " + l(:label_homework_acts) when "news" - ">" + l(:label_news_acts) + "> " + l(:label_news_acts) when "attachment" - ">" + l(:label_attachment_acts) + "> " + l(:label_attachment_acts) when "message" - ">" + l(:label_message_acts) + "> " + l(:label_message_acts) when "journalsForMessage" - ">" + l(:label_journalsForMessage_acts) + "> " + l(:label_journalsForMessage_acts) when "poll" - ">" + l(:label_poll_acts) + "> " + l(:label_poll_acts) else - ">" + l(:label_all_cats) + "> " + l(:label_all_cats) end end From 4646d13234a62e517315041908142929b6e8a89b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 25 Jul 2016 18:54:44 +0800 Subject: [PATCH 03/20] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=EF=BC=8C=E7=AB=9F=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E6=98=BE=E7=A4=BA=E5=85=A8=E3=80=82=202.=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E5=8A=A8=E6=80=81=E4=B8=8B=EF=BC=8C=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E2=80=9C=E7=8F=AD=E7=BA=A7=E5=8A=A8=E6=80=81>=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 14 +++++++------- app/views/courses/show.html.erb | 2 +- app/views/files/_resource_detail.html.erb | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 96e0d7683..e5066d0fe 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -595,19 +595,19 @@ module CoursesHelper def get_acts_list_type type case type when "homework" - ">" + l(:label_homework_acts) + l(:label_homework_acts) when "news" - ">" + l(:label_news_acts) + l(:label_news_acts) when "attachment" - ">" + l(:label_attachment_acts) + l(:label_attachment_acts) when "message" - ">" + l(:label_message_acts) + l(:label_message_acts) when "journalsForMessage" - ">" + l(:label_journalsForMessage_acts) + l(:label_journalsForMessage_acts) when "poll" - ">" + l(:label_poll_acts) + l(:label_poll_acts) else - ">" + l(:label_all_cats) + l(:label_all_cats) end end diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index e7800531b..3e509faa5 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -9,7 +9,7 @@
-
班级动态 +
<%= get_acts_list_type @type %>
  • diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index 4e9f38c50..07d1f248b 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -8,11 +8,11 @@
    <%# 如果有历史版本则提供历史版本下载 %> <% if file.attachment_histories.count == 0 %> - <%= link_to truncate(file.filename,length: 40, omission: '...'), + <%= link_to truncate(file.filename,length: 70, omission: '...'), download_named_attachment_path(file.id, file.filename), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %> <% else %> - <%= link_to truncate(file.filename,length: 40, omission: '...'), attachment_history_download_path(file.id), + <%= link_to truncate(file.filename,length: 70, omission: '...'), attachment_history_download_path(file.id), :title => file.filename+"\n"+file.description.to_s, :class => "linkGrey3 f_14", :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :remote=>true %> From 2c8f94c89950c9b0f922874d4cb9522407b3530a Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 26 Jul 2016 09:02:47 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E5=8E=BB=E6=8E=89ID=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E6=88=90=E7=94=A8=E6=88=B7login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 7 ------- app/models/user.rb | 5 ----- 2 files changed, 12 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 58622a089..d64d95223 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -33,13 +33,6 @@ module ApplicationHelper extend Forwardable def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter - def user_path(resource, parameters = {}) - if Fixnum === resource - resource = User.find(resource) - end - super - end - # def user_blogs_path(resource,parameters={}) # super # end diff --git a/app/models/user.rb b/app/models/user.rb index 7e592248e..996aa9be7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -311,11 +311,6 @@ class User < Principal ) end - # id 转换成 登录名 - def to_param - Fixnum === self.login ? id : login - end - # ====================================================================== def my_workplace self.user_extensions.try(:occupation).to_s From b01e228d5100fa84b1034dafda6de5a042ef7b22 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 26 Jul 2016 09:19:55 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dissue=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=82=B9=E5=87=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 921d7d12b..450be2af1 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -440,7 +440,7 @@ class IssuesController < ApplicationController jour.save update_user_activity(@issue.class,@issue.id) update_forge_activity(@issue.class,@issue.id) - + @allowed_statuses = @issue.new_statuses_allowed_to(User.current) @user_activity_id = params[:user_activity_id] if params[:issue_id] @issue_id = params[:issue_id] From 6ab2c15504e707e2f021cb2085d90c8a13ffb71d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 26 Jul 2016 10:38:04 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=88=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E8=AF=BE=E7=A8=8B=E4=B8=8B=E7=9A=84=E6=9F=90=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=EF=BC=8C=E5=86=8D=E5=88=A0=E9=99=A4=E8=AF=A5=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 1 + app/controllers/syllabuses_controller.rb | 2 +- app/views/syllabuses/_delete_syllabus.html.erb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 966f23a3c..e2dd23552 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -381,6 +381,7 @@ class StudentWorkController < ApplicationController @is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评 @show_all = false + # 0表示没有分组的学生,-1表示所有分组的学生 if @group if @group == "0" none_group_students = @course.members.select{ |member| member.course_group_id == 0 } diff --git a/app/controllers/syllabuses_controller.rb b/app/controllers/syllabuses_controller.rb index 9c69f5259..e77b19511 100644 --- a/app/controllers/syllabuses_controller.rb +++ b/app/controllers/syllabuses_controller.rb @@ -88,7 +88,7 @@ class SyllabusesController < ApplicationController end def destroy - if @syllabus && @syllabus.courses.empty? + if @syllabus && @syllabus.courses.not_deleted.empty? @syllabus.destroy redirect_to user_courselist_user_path(User.current.id) end diff --git a/app/views/syllabuses/_delete_syllabus.html.erb b/app/views/syllabuses/_delete_syllabus.html.erb index b043186aa..a72a87c03 100644 --- a/app/views/syllabuses/_delete_syllabus.html.erb +++ b/app/views/syllabuses/_delete_syllabus.html.erb @@ -1,6 +1,6 @@
    - <% if @syllabus.courses.empty? || @syllabus.courses.not_deleted.empty? %> + <% if @syllabus.courses.not_deleted.empty? %> 确认删除该课程吗? <% else %> 该课程下已经存在班级,不能删除。 @@ -8,7 +8,7 @@

    - <% if @syllabus.courses.empty?|| @syllabus.courses.not_deleted.empty? %> + <% if @syllabus.courses.not_deleted.empty? %> <%=link_to '确认', syllabus_path(@syllabus), :class => 'Blue-btn fl', :method => 'delete'%> 关闭 <% else %> From e7f862458f25852927c92266f1d65a6edc7b9b4e Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 26 Jul 2016 12:06:54 +0800 Subject: [PATCH 07/20] =?UTF-8?q?issue=E5=9B=9E=E5=A4=8D=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B=20=E4=BA=8C=E7=BA=A7=E5=9B=9E=E5=A4=8D=E7=BC=96?= =?UTF-8?q?=E8=BE=91issue=E5=BC=B9=E7=A9=BA=E7=99=BD=E6=A1=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/at_controller.rb | 2 +- app/controllers/issues_controller.rb | 18 ++++++++++++++---- app/views/issues/_issue_replies.html.erb | 1 - app/views/issues/_jounal_refresh.js.erb | 21 +++++++++++++++++++++ app/views/issues/add_journal.js.erb | 22 +--------------------- app/views/issues/add_reply.js.erb | 6 +++--- app/views/issues/delete_journal.js.erb | 4 +--- 7 files changed, 41 insertions(+), 33 deletions(-) create mode 100644 app/views/issues/_jounal_refresh.js.erb diff --git a/app/controllers/at_controller.rb b/app/controllers/at_controller.rb index 69c33f90e..0e48cd962 100644 --- a/app/controllers/at_controller.rb +++ b/app/controllers/at_controller.rb @@ -10,7 +10,7 @@ class AtController < ApplicationController @users = users.uniq { |u| u.id }.delete_if { |u| u.id == User.current.id }.sort{|x,y| to_pinyin(x.show_name) <=> to_pinyin(y.show_name)} if users #加上all - if @users.size > 0 + if @user && @users.size > 0 allUser = Struct.new(:id, :name).new allUser.id = @users.map{|u| u.id}.join(",") allUser.name = "all" diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 450be2af1..ca91106e9 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -483,12 +483,21 @@ class IssuesController < ApplicationController if User.current.logged? jour = Journal.find(params[:journal_id]) @issue = Issue.find params[:id] - new_jour = @issue.journals.build(:user_id => User.current.id, :reply_id => params[:journal_id], :notes => params[:content], :parent_id => jour.id) + @project = @issue.project + @allowed_statuses = @issue.new_statuses_allowed_to(User.current) + @priorities = IssuePriority.active + new_jour = Journal.new + new_jour.user_id = User.current.id + new_jour.reply_id = params[:journal_id] + new_jour.parent_id = jour.id + new_jour.notes = params[:content] + new_jour.journalized = @issue + new_jour.save_attachments(params[:attachments]) + # new_jour = @issue.journals.build(:user_id => User.current.id, :reply_id => params[:journal_id], :notes => params[:content], :parent_id => jour.id) @user_activity_id = params[:user_activity_id] if new_jour.save update_user_activity(@issue.class,@issue.id) update_forge_activity(@issue.class,@issue.id) - respond_to do |format| format.js end @@ -496,13 +505,14 @@ class IssuesController < ApplicationController end end - # + # 需要刷新详情页面,代码同步一致 + # 获取project和issue状态是为了刷新页面 def delete_journal @issue = Issue.find(params[:id]) Journal.destroy(params[:journal_id]) @user_activity_id = params[:user_activity_id] respond_to do |format| - format.js + format.html{ redirect_to issue_url(@issue)} end end diff --git a/app/views/issues/_issue_replies.html.erb b/app/views/issues/_issue_replies.html.erb index 344987913..2a5007bc3 100644 --- a/app/views/issues/_issue_replies.html.erb +++ b/app/views/issues/_issue_replies.html.erb @@ -40,7 +40,6 @@ l(:button_delete), {:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>comment.id}, :method => :get, - :remote=>true, :class => 'fr mr20', :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete) diff --git a/app/views/issues/_jounal_refresh.js.erb b/app/views/issues/_jounal_refresh.js.erb new file mode 100644 index 000000000..0945ba04d --- /dev/null +++ b/app/views/issues/_jounal_refresh.js.erb @@ -0,0 +1,21 @@ +$("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue}) %>"); +$("#issue_detail_show").html('<%= escape_javascript(render :partial => 'issues/detail') %>') +$("#issue_edit_show").html('<%= escape_javascript(render :partial => 'issues/edit') %>') +$("#div_issue_attachment_<%=@issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_attachments', :locals => {:issue => @issue}) %>"); +sd_create_editor_from_data(<%= @issue.id %>, null, "100%", "<%= @issue.class.name %>"); +issue_desc_editor = KindEditor.create('#issue_description', + {"width":"85%", + "resizeType":0, + "no_label":true, + "at_id":<%= @issue.project_id%>, + "at_type":"Project", + "autoHeightMode":true, + "afterCreate":"eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);};if(typeof enableAt ==='function'){enableAt(self, \"<%=@issue.project_id %>\", 'Project');}; this.loadPlugin('autoheight')})", + "emotionsBasePath":'<%= Setting.host_name%>', + "height":300, + "allowFileManager":true, + "uploadJson":"/kindeditor/upload", + "fileManagerJson":"/kindeditor/filemanager"}); +// $("#issue_test_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/edit', :locals => {:issue => Issue.find( @issue_id)}) %>"); +$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)'); +sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%= @issue.class.name %>"); \ No newline at end of file diff --git a/app/views/issues/add_journal.js.erb b/app/views/issues/add_journal.js.erb index 838e2d83d..eeaa52faa 100644 --- a/app/views/issues/add_journal.js.erb +++ b/app/views/issues/add_journal.js.erb @@ -1,25 +1,5 @@ <% if @issue_id %> //issue详情中回复 - $("#reply_div_<%= @issue_id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => Issue.find( @issue_id),:replies_all_i=>0}) %>"); - $("#div_issue_attachment_<%=@issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_attachments', :locals => {:issue => Issue.find( @issue_id)}) %>"); - $("#issue_detail_show").html('<%= escape_javascript(render :partial => 'issues/detail') %>') - $("#issue_edit_show").html('<%= escape_javascript(render :partial => 'issues/edit') %>') - sd_create_editor_from_data(<%= @issue.id %>, null, "100%", "<%= @issue.class.name %>"); - issue_desc_editor = KindEditor.create('#issue_description', - {"width":"85%", - "resizeType":0, - "no_label":true, - "at_id":<%= @issue.project_id%>, - "at_type":"Project", - "autoHeightMode":true, - "afterCreate":"eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);};if(typeof enableAt ==='function'){enableAt(self, \"<%=@issue.project_id %>\", 'Project');}; this.loadPlugin('autoheight')})", - "emotionsBasePath":'<%= Setting.host_name%>', - "height":300, - "allowFileManager":true, - "uploadJson":"/kindeditor/upload", - "fileManagerJson":"/kindeditor/filemanager"}); -// $("#issue_test_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/edit', :locals => {:issue => Issue.find( @issue_id)}) %>"); - $(".homepagePostReplyBannerCount").html('回复(<%= Issue.find( @issue_id).journals.count %>)') - sd_create_editor_from_data(<%= @issue.id %>, null, "100%","<%=@issue.class.name%>"); + <%= render "jounal_refresh" %> <%else%> $("#div_user_issue_reply_<%=@user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply', :locals => {:activity => @issue, :user_activity_id => @user_activity_id}) %>"); sd_create_editor_from_data(<%= @user_activity_id %>, null, "100%", "UserActivity"); diff --git a/app/views/issues/add_reply.js.erb b/app/views/issues/add_reply.js.erb index a818830cd..22581e37a 100644 --- a/app/views/issues/add_reply.js.erb +++ b/app/views/issues/add_reply.js.erb @@ -1,8 +1,8 @@ <% if @user_activity_id %> +<%# 动态中 %> $("#div_user_issue_reply_<%=@user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply', :locals => {:activity => @issue, :user_activity_id => @user_activity_id}) %>"); sd_create_editor_from_data(<%= @user_activity_id%>, null, "100%","<%=@issue.class.name%>"); <% else %> - $("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue}) %>"); - $(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)'); - sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%=@issue.class.name%>"); +<%# issue详情 %> + <%= render "jounal_refresh" %> <% end %> \ No newline at end of file diff --git a/app/views/issues/delete_journal.js.erb b/app/views/issues/delete_journal.js.erb index 120c4bf7e..d105fe90f 100644 --- a/app/views/issues/delete_journal.js.erb +++ b/app/views/issues/delete_journal.js.erb @@ -2,7 +2,5 @@ $("#div_user_issue_reply_<%=@user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply', :locals => {:activity => @issue, :user_activity_id => @user_activity_id}) %>"); sd_create_editor_from_data(<%= @user_activity_id%>, null, "100%","<%=@issue.class.name%>"); <% else %> -$("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue,:replies_all_i=>0}) %>"); -$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)') -sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%=@issue.class.name%>"); + <%= render "jounal_refresh" %> <% end %> \ No newline at end of file From 1dcf4918b9db2fa57962955d9323ce00de88606d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 26 Jul 2016 14:30:12 +0800 Subject: [PATCH 08/20] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=9C=A8=E6=96=B0=E5=BB=BA=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=BD=AE=E9=A1=B6=E5=8F=8A=E9=94=81=E5=AE=9A?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=9C=A8=E9=A1=B5=E9=9D=A2=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_new.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb index 32cec24d5..90f0d9c7e 100644 --- a/app/views/boards/_course_new.html.erb +++ b/app/views/boards/_course_new.html.erb @@ -132,12 +132,12 @@
  • <%= link_to "班级配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %>
  • <%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %>
  • <%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %>
  • -
  • <%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %>
  • + <% if @course.syllabus %> +
  • <%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %>
  • + <% end %>
From 1f8fa1c70a439e45cefecad089099fb0d7828c4b Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 26 Jul 2016 17:16:42 +0800 Subject: [PATCH 14/20] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E2=80=9C>=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 14 +++++++------- config/locales/courses/zh.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index eab03935b..e1dda3554 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -595,19 +595,19 @@ module CoursesHelper def get_acts_list_type type case type when "homework" - "> " + l(:label_homework_acts) + l(:label_homework_acts) when "news" - "> " + l(:label_news_acts) + l(:label_news_acts) when "attachment" - "> " + l(:label_attachment_acts) + l(:label_attachment_acts) when "message" - "> " + l(:label_message_acts) + l(:label_message_acts) when "journalsForMessage" - "> " + l(:label_journalsForMessage_acts) + l(:label_journalsForMessage_acts) when "poll" - "> " + l(:label_poll_acts) + l(:label_poll_acts) else - "> " + l(:label_all_cats) + l(:label_all_cats) end end diff --git a/config/locales/courses/zh.yml b/config/locales/courses/zh.yml index 9a07e0fa8..ac7e1b4a3 100644 --- a/config/locales/courses/zh.yml +++ b/config/locales/courses/zh.yml @@ -37,7 +37,7 @@ zh: label_message_acts: 论坛动态 label_journalsForMessage_acts: 留言动态 label_poll_acts: 问卷动态 - label_all_cats: 全部动态 + label_all_cats: 班级动态 # # 课程托管平台主页 From e3057566c82e8e5de107c46a5c1738fc72ceda5e Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 26 Jul 2016 17:30:02 +0800 Subject: [PATCH 15/20] =?UTF-8?q?=E5=90=84=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=86=85=E5=AE=B9=E5=92=8C=E4=BA=8C=E7=BA=A7=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=EF=BC=9B=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E8=AF=A6=E6=83=85=E5=86=85=E5=AE=B9=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/blog_detail.html | 39 ++-- public/assets/wechat/course_discussion.html | 47 +++-- public/assets/wechat/course_notice.html | 38 ++-- public/assets/wechat/homework_detail.html | 173 +++++++++--------- public/assets/wechat/issue_detail.html | 46 ++--- public/assets/wechat/jour_message_detail.html | 49 +++-- public/assets/wechat/project_discussion.html | 51 +++--- .../wechat/templates/comment_reply.html | 38 ++-- public/stylesheets/weui/weixin.css | 12 +- 9 files changed, 240 insertions(+), 253 deletions(-) diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 721c3d38e..ee9e968d2 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -13,11 +13,13 @@
-
{{blog.title}}
-
博客{{blog.created_at}}
+
+
{{blog.title}}
+
博客{{blog.created_at}}
-
-
+
+
+
{{blog.praise_count}}
@@ -33,35 +35,30 @@
-
+
-