diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb new file mode 100644 index 000000000..2534cad9d --- /dev/null +++ b/app/views/users/_course_homework.html.erb @@ -0,0 +1,39 @@ +
+
+
+ <%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %> + +
+
+
+ <% if activity.try(:user).try(:realname) == ' ' %> + <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> + <% else %> + <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> + <% end %> TO + <%= activity.course.name %>(课程名称) +
+ +
+ +
截止时间:<%= format_date(activity.end_time) %>
+
+
(作业描述)<%= activity.description.html_safe %>
+ +
+
+
+
\ No newline at end of file diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb new file mode 100644 index 000000000..24078696f --- /dev/null +++ b/app/views/users/_course_message.html.erb @@ -0,0 +1,82 @@ +<% if activity.parent_id.nil? %> +
+
+
+ 用户头像 +
+
+
+ <% if activity.try(:author).try(:realname) == ' ' %> + <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> + <% else %> + <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> + <% end %> + TO + <%= activity.course.name %>(课程讨论区) +
+ +
+
时间:<%= format_date(activity.created_on) %>
+
+ +
+
+
+
+
+
回复(<%=activity.replies_count %>)
+
2015-07-31
+ +
+
+ +
+
+ + + +
+
+
+
+ 用户头像 +
+
+
+ 黄井泉 学生 + 2015-08-01删除 +
+
很开心!
+
+
+
+
+
+ 用户头像 +
+
+
+ 陈正东 学生 + 2015-08-02删除 +
+
假期好热,没出去。
+
+
+
+
+
+<% end %> \ No newline at end of file diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index f57e05e34..414ff79e8 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -1,24 +1,24 @@
- <%= link_to image_tag(url_to_avatar(@activity.author), :width => "90", :height => "90"), user_path(@activity.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
- <% if @activity.try(:author).try(:realname) == ' ' %> - <%= link_to @activity.try(:author), user_path(@activity.author_id), :class => "newsBlue mr15" %> + <% if @ctivity.try(:author).try(:realname) == ' ' %> + <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> - <%= link_to @activity.try(:author).try(:realname), user_path(@activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <% end %> TO - <%= @activity.course.name %>(课程名称) + <%= activity.course.name %>(课程名称)
+ <%= activity.title %>(通知标题)
-
发布时间:<%= format_date(@activity.created_on) %>
+
发布时间:<%= format_date(activity.created_on) %>
-
(通知描述)<%= @activity.description.html_safe %>
+
(通知描述)<%= activity.description.html_safe %>