From a262f86100a78a1f62526589837933dabdb068ed Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 15 May 2015 14:02:41 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=88=90=E7=BB=A9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=88=91=E6=80=BB=E6=98=AF=E5=9C=A8=E6=9C=80=E4=B8=8A=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/courses.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index 0900f0446..18fa0dc86 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -274,6 +274,13 @@ module Mobile get ":course_id/members" do cs = CoursesService.new count = cs.course_members params + # 我如果在学生当中,那么我将放在第一位 + count.each do |m| + if m.user.id == current_user.id + count.delete m + count.unshift m + end + end present :data, count, with: Mobile::Entities::Member present :status, 0 end From 3b137dadb89f1f8b7ac4bc2842feebf1c9cda868 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 15 May 2015 14:04:05 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9C=AA=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E9=9C=80=E8=A6=81=E7=94=A8=E6=88=B7id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/users.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 62c9c3926..147cbfda5 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -85,6 +85,7 @@ module Mobile requires :search_by, type: String,desc: '搜索依据:0 昵称,1 用户名,2 邮箱,3 昵称和姓名' optional :is_search_assitant,type:Integer,desc:'是否搜索注册用户来作为助教' optional :course_id,type:Integer,desc: '课程id,搜索注册用户不为该课程教师的其他用户' + optional :user_id,type:Integer,desc:'用户id' end get 'search/search_user' do us = UsersService.new From 404421c745d4b20306838a70d4df1e344459b0bc Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 15 May 2015 15:09:33 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E7=9A=84alt=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_show_topics.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index e61995ecc..9af8538ed 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -1,5 +1,4 @@ - - +
共有 <%=link_to @forum.memos.count %> 个贴子
<% if memos.any? %> From 99e3d09e83f924254ec83079c9e4136a8d92ec01 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 15 May 2015 15:17:47 +0800 Subject: [PATCH 4/8] =?UTF-8?q?IE=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=ADli?= =?UTF-8?q?=E5=89=8D=E9=9D=A2=E6=9C=89=E4=B8=AA=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/school/index.html.erb | 8 -------- public/stylesheets/application.css | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index aeb7d0943..00f419aab 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -18,9 +18,6 @@ } }) }); - - - - - -