From 4202ec4bad486c956d7b03ec777892cb7e24f90c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 16 Apr 2015 15:27:49 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/application.css | 6 ------ 1 file changed, 6 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index b42efdabd..4b6b681c7 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -641,7 +641,6 @@ span.forums-avatar-right{ /*added by bai*/ .user_underlinescore{ margin: 1px; - padding: 1px; width:700px; height:1px; background-color:#15bccf; @@ -1106,7 +1105,6 @@ ul.user_course_sort li{list-style-type:none; } .user_underline{ margin:1px; - padding:1px; width:240px; height:1px; background-color:#15bccf; @@ -1126,7 +1124,6 @@ ul.user_course_sort li{list-style-type:none; .user_underline2{ margin:1px; - padding:1px; width:240px; height:1px; background-color:#c6e9fe; @@ -1134,7 +1131,6 @@ ul.user_course_sort li{list-style-type:none; } .user_underline3{ margin: 1px; - padding:1px; width:120px; height:1px; background-color:#c6e9fe; @@ -1143,7 +1139,6 @@ ul.user_course_sort li{list-style-type:none; } .homepage_underline{ margin:1px; - padding:1px; width:240px; height:1px; background-color:#c6e9fe; @@ -3063,7 +3058,6 @@ div.repos_explain{ /* new linchun compitition */ .contest_underline{ margin:1px; - padding:1px; width:900px; height:0.5px; background-color:#aaa; From 6983764c445600847c7a80560056e7b44d18c4d3 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 16 Apr 2015 15:41:50 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E8=BF=87=E9=95=BF=E6=97=B6=E7=9A=84=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_courses.html.erb | 4 ++-- public/stylesheets/public.css | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index dec4a5f4d..dc384834c 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -35,7 +35,7 @@ <%= l(:label_courses_community)%> -

+

<%= l(:label_user_location) %> : <%= link_to l(:field_homepage), home_path %> > @@ -80,7 +80,7 @@

- + <%= @course.name %> <% if @course.is_public == 0%> diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 45568c913..9d714b1de 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -279,6 +279,7 @@ a:hover.close_btn {background-position:-66px 0;} .show_btn {background-position:-119px 0;} .msgserver a {color:#15bccf; } .break_word{word-break: break-all;word-wrap: break-word;} +.hiddent{ overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .break_word_firefox{white-space: pre-wrap;word-break: break-all;} From 45d5f9e58b1c01023141379cf51cf0040c6a442c Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 16 Apr 2015 15:48:15 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=8C=89=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 6f207d76d..e91883bee 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -40,9 +40,9 @@ class CoursesService end @courses = courses_all.visible(current_user) if params[:name].present? - @courses_all = @courses.like(params[:name]) + @courses_all = @courses.like(params[:name]).order("created_at desc") else - @courses_all = @courses; + @courses_all = @courses.order("created_at desc"); end @courses_all course_list = [] From e4597f9ccc6d5ea3f878595076c1188ffde1af0b Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 16 Apr 2015 15:48:34 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9C=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/users_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/users_service.rb b/app/services/users_service.rb index 63dd725cd..c1f716fd1 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -77,7 +77,7 @@ class UsersService gender = @user.user_extensions.gender.nil? ? 0 : @user.user_extensions.gender work_unit = get_user_work_unit @user location = get_user_location @user - {:id => @user.id, :img_url => img_url, :nickname => @user.login, :gender => gender, :work_unit => work_unit, :mail => @user.mail, :location => location, :brief_introduction => @user.user_extensions.brief_introduction} + {:id => @user.id, :img_url => img_url,:realname => @user.realname, :nickname => @user.login, :gender => gender, :work_unit => work_unit, :mail => @user.mail, :location => location, :brief_introduction => @user.user_extensions.brief_introduction} end #忘记密码 From 61a938ef39a636bea141be413f15f95676dd218b Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 16 Apr 2015 15:48:53 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9C=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/user.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/api/mobile/entities/user.rb b/app/api/mobile/entities/user.rb index 9112e7ec5..6b0064036 100644 --- a/app/api/mobile/entities/user.rb +++ b/app/api/mobile/entities/user.rb @@ -34,6 +34,8 @@ module Mobile user_expose :img_url #昵称 expose :nickname + #真名 + expose :realname #性别 user_expose :gender #我的二维码 From ca1e902a8f66a9ef49ddadd8abb62dffd83b31c2 Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 16 Apr 2015 16:39:52 +0800 Subject: [PATCH 6/8] =?UTF-8?q?#2279=20=E6=90=9C=E7=B4=A2=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E8=BF=9B=E5=85=A5=E7=BB=93=E6=9E=9C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E5=9B=BE=EF=BC=8C=E5=BB=BA=E8=AE=AE=E5=B0=86?= =?UTF-8?q?=E2=80=9C=E6=8E=88=E8=AF=BE=E6=97=B6=E9=97=B4=E2=80=9D=E4=B8=8E?= =?UTF-8?q?=E2=80=9C=E8=AF=BE=E7=A8=8B=E7=AE=80=E4=BB=8B=E2=80=9D=E4=B8=8E?= =?UTF-8?q?=E4=B8=8A=E9=9D=A2=E7=9A=84=E2=80=9C=E8=AF=BE=E7=A8=8B=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E2=80=9D=E7=AD=89=E4=BF=A1=E6=81=AF=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_course.html.erb | 19 +++++--- app/views/courses/show.html.erb | 2 +- app/views/welcome/course.html.erb | 43 ++++++++++++------- .../stylesheets/application.css | 8 ++-- 4 files changed, 45 insertions(+), 27 deletions(-) diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb index abcbbfe5b..8974c3089 100644 --- a/app/views/courses/_course.html.erb +++ b/app/views/courses/_course.html.erb @@ -33,6 +33,15 @@ <% end %>

+

+ <%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%> + <%= get_course_term @course %> +

+

+ <%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %> + <%= content_tag "div", course.short_description, :class => "brief_introduction", :title => course.short_description %> +

+
@@ -71,15 +80,13 @@
-
- <%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%> - <%= get_course_term @course %> -
+ <%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%> + <%= get_course_term @course %>
- <%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %> - <%= content_tag "div", course.short_description, :class => "brief_introduction", :title => course.short_description %> + <%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %> + <%= content_tag "div", course.short_description, :class => "brief_introduction", :title => course.short_description %>
diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 1cc117dd6..1d2c42457 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -40,7 +40,7 @@


- <%= l :label_create_time %>: : <%= format_time(@course.created_at) %> + <%= l :label_create_time %> : <%= format_time(@course.created_at) %>

diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index a764c6eb8..5c57a5ba1 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -39,21 +39,12 @@
+ <% if User.current.login? %> - <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %> - , - - <%= l(:label_welcome_trustie_course_description) %> - - <% else %> - <% if @school_id == "0" %> - + <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %> <% else %> + <% if @school_id == "0" %> + <% else %> <% if @school_id.nil? %> <%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course', :school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school', :method => 'get'} %>
@@ -61,10 +52,20 @@ <%= link_to School.find(@school_id).name, options={:action => 'course', :school_id => @school_id}, html_options={:class => 'font_welcome_school', :method => 'get'} %>
<% end %> + <% end %> <% end %> - <% end %>
- <% unless @course_page.nil? %> + + + <%= l(:label_welcome_trustie_course) %> + + <% else %> + <% unless @course_page.nil? %> <%= l(:label_welcome_trustie_course) %> - + , + + <%= l(:label_welcome_trustie_course_description) %> + + <% end %> <% end %> +