From 4ea12a6dc581dd3facddcc9211973aa38f712cb2 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 6 Jun 2016 14:55:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8C=BF=E5=90=8D?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20160606064856_delete_anonymous_org.rb | 8 ++++++++ db/schema.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20160606064856_delete_anonymous_org.rb diff --git a/db/migrate/20160606064856_delete_anonymous_org.rb b/db/migrate/20160606064856_delete_anonymous_org.rb new file mode 100644 index 000000000..c1bc895cb --- /dev/null +++ b/db/migrate/20160606064856_delete_anonymous_org.rb @@ -0,0 +1,8 @@ +class DeleteAnonymousOrg < ActiveRecord::Migration + def up + OrgDocumentComment.where(:organization_id => 23, :creator_id => 2).delete_all + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 05a6f4e22..504849d39 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160601073753) do +ActiveRecord::Schema.define(:version => 20160606064856) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false From df8df117a8538968df8f269448abd5aa837ecfb3 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 6 Jun 2016 15:02:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8C=BF=E5=90=8D?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95=E9=97=AE=E9=A2=98=EF=BC=88?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=99=A8=E5=92=8Cview=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_show_unlogged.html.erb | 4 +++- public/stylesheets/users.css | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/users/_show_unlogged.html.erb b/app/views/users/_show_unlogged.html.erb index 48cf73f15..258ebe7af 100644 --- a/app/views/users/_show_unlogged.html.erb +++ b/app/views/users/_show_unlogged.html.erb @@ -1 +1,3 @@ -
登录 后可添加回复
\ No newline at end of file +
+ <%= link_to "登录", signin_path, :class => "linkBlue", :target => "_blank" %>后可添加回复 +
\ No newline at end of file diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css index 6fa7ec6a0..eaefb8d1b 100644 --- a/public/stylesheets/users.css +++ b/public/stylesheets/users.css @@ -1,4 +1,7 @@ #RSide{ min-height:1px;} + + + /* 左侧信息*/ .users_info{background:#fff; padding:10px; width:230px; padding-right:0px; margin-bottom:10px; } .pic_head{ width:214px; height:214px; border:1px solid #cbcbcb; padding:2px; position:relative;} From bfa447c19589f558cab90eb3c6b5d576d75cd011 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 6 Jun 2016 15:11:07 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8Banonymos=E6=94=B9=E4=B8=BA=E6=9C=AA=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3aa7d8a4a..46fdb02f3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1080,7 +1080,7 @@ module ApplicationHelper elsif @user title << @user.try(:realname) else - title << User.current.try(:realname) + title << (User.current.id == 2 ? "未登录" : User.current.try(:realname)) end if first_page.nil? || first_page.web_title.nil? title << Setting.app_title unless Setting.app_title == title.last From 793978f1962e8ba57b51efb39b3e4c5701b51281 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 6 Jun 2016 16:15:35 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=BB=84=E7=BB=87--=E5=90=8D=E5=B8=88?= =?UTF-8?q?=E3=80=81=E5=AD=A6=E9=9C=B8=EF=BC=9A=E5=A6=82=E5=9B=BE=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=BB=93=E6=9E=9C=E6=9C=89=E5=A4=9A=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E7=BF=BB=E9=A1=B5=E5=90=8E=E5=BB=BA=E8=AE=AE=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E7=9A=84=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E4=BB=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=9C=A8=E6=90=9C=E7=B4=A2=E6=A1=86=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/courses.js.erb | 4 ++-- app/views/organizations/projects.js.erb | 3 +-- app/views/organizations/students.js.erb | 3 +-- app/views/organizations/teachers.js.erb | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/views/organizations/courses.js.erb b/app/views/organizations/courses.js.erb index dc42c115c..48868be39 100644 --- a/app/views/organizations/courses.js.erb +++ b/app/views/organizations/courses.js.erb @@ -1,3 +1,3 @@ $("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>'); -$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); -$("#org_student_search").attr('href','<%= courses_organization_path(@organization, :type => @type) %>'); \ No newline at end of file +$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => true, :flag => true %>'); +//$("#org_student_search").attr('href','<%#= courses_organization_path(@organization, :type => @type) %>'); \ No newline at end of file diff --git a/app/views/organizations/projects.js.erb b/app/views/organizations/projects.js.erb index e8d4f244a..cf3216fdf 100644 --- a/app/views/organizations/projects.js.erb +++ b/app/views/organizations/projects.js.erb @@ -1,3 +1,2 @@ $("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>'); -$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); -$("#org_student_search").attr('href','<%= projects_organization_path(@organization, :type => @type) %>'); \ No newline at end of file +$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => true, :flag => true %>'); diff --git a/app/views/organizations/students.js.erb b/app/views/organizations/students.js.erb index c65f8f861..7a427c1ac 100644 --- a/app/views/organizations/students.js.erb +++ b/app/views/organizations/students.js.erb @@ -1,3 +1,2 @@ $("#org_students_list").html('<%= escape_javascript( render :partial => 'organizations/org_students_list', :locals => {:org_students => @org_students})%>'); -$("#pages").html('<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); -$("#org_student_search").attr('href','<%= students_organization_path(@organization, :type => @type) %>'); \ No newline at end of file +$("#pages").html('<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :remote => true, :flag => true %>'); diff --git a/app/views/organizations/teachers.js.erb b/app/views/organizations/teachers.js.erb index cd7323a4a..04eecb810 100644 --- a/app/views/organizations/teachers.js.erb +++ b/app/views/organizations/teachers.js.erb @@ -1,3 +1,2 @@ $("#org_teachers_list").html('<%= escape_javascript( render :partial => 'organizations/org_teachers_list', :locals => {:org_teachers => @org_teachers})%>'); -$("#pages").html('<%= pagination_links_full @atta_pages, @teachers_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); -$("#org_teacher_search").attr('href','<%= teachers_organization_path(@organization, :type => @type) %>'); \ No newline at end of file +$("#pages").html('<%= pagination_links_full @atta_pages, @teachers_count, :per_page_links => false, :remote => true, :flag => true %>'); \ No newline at end of file