From 8d77484ea075a99faf70d59a0fbbf9c6965bbbb0 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 23 Jun 2017 09:44:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=AA=E4=BA=BA=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E8=AF=BE=E7=A8=8B=E4=B8=BA=E7=A9=BA=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=82=B9=E5=87=BB=E6=89=8D=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_my_homepage_courses_list.html.erb | 38 ++++++++++--------- .../users/_my_homepage_shixuns_list.html.erb | 36 ++++++++++-------- app/views/users/show.html.erb | 22 +++-------- 3 files changed, 47 insertions(+), 49 deletions(-) diff --git a/app/views/users/_my_homepage_courses_list.html.erb b/app/views/users/_my_homepage_courses_list.html.erb index baa69db2a..6fc9451ff 100644 --- a/app/views/users/_my_homepage_courses_list.html.erb +++ b/app/views/users/_my_homepage_courses_list.html.erb @@ -1,20 +1,24 @@ -<% @courses.each do |course| %> -

- <%= course.name %> - <%= course.syllabus.title %> - <%= format_time course.updatetime %> - -

-<% end %> +<% if @course.blank? %> + <%= render :partial => "welcome/no_data" %> +<% else %> + <% @courses.each do |course| %> +

+ <%= course.name %> + <%= course.syllabus.title %> + <%= format_time course.updatetime %> + +

+ <% end %> <%# if @courses_count > 8 %> - + <%# end %> -
-
-
-
    - <%= pagination_links_full @courses_pages, @courses_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> -
-
-
\ No newline at end of file +
+
+
    + <%= pagination_links_full @courses_pages, @courses_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
+
+
+
+<% end %> diff --git a/app/views/users/_my_homepage_shixuns_list.html.erb b/app/views/users/_my_homepage_shixuns_list.html.erb index 63c7c244a..0884b7e92 100644 --- a/app/views/users/_my_homepage_shixuns_list.html.erb +++ b/app/views/users/_my_homepage_shixuns_list.html.erb @@ -1,18 +1,22 @@ -<% @shixuns.each do |shixun| %> -

- <%= shixun.name %> - 已解锁第<%= had_passed_changllenge_count(shixun) %>关/共<%= shixun.challenges.count %> - <%= format_time shixun.created_at %> - -

-<% end %> +<% if @shixuns.blank? %> + <%= render :partial => "welcome/no_data" %> +<% else %> + <% @shixuns.each do |shixun| %> +

+ <%= shixun.name %> + 已解锁第<%= had_passed_changllenge_count(shixun) %>关/共<%= shixun.challenges.count %> + <%= format_time shixun.created_at %> + +

+ <% end %> -
-
-
-
    - <%= pagination_links_full @shixuns_pages, @shixuns_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> -
-
-
\ No newline at end of file +
+
+
    + <%= pagination_links_full @shixuns_pages, @shixuns_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
+
+
+
+<% end %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 573106beb..60686e19f 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -193,22 +193,12 @@
<% str = current_user ? '' : 'TA的' %>