diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 53eeab105..83a4dfd19 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1426,7 +1426,4 @@ module ApplicationHelper def stringCut240(str) (str.length > 240) ? (str[0,240]<<"......") : str end - def truncate_at_line_break(str, length = 240) - str.gsub(%r{^(.{#{length}}[^\n]*)\n.+$}m, '\\1...') - end end diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index d0eef4f3a..679910e14 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -55,7 +55,7 @@ <% @project = Project.find_by_id(@project.id) %> <% @course = Course.find_by_extra(@project.identifier) %> - -
+
<% if(@project.project_type==1) %> <% if get_avatar?(@project) %> <%= image_tag(url_to_avatar(@project), :class => "avatar2") %> @@ -65,13 +65,14 @@ <% else %> <%= image_tag(url_to_avatar(@project), :class => "avatar2") %> <% end %> -
- <%= @project.name %> -
- <%if User.current.logged? %> +
+ + + + + <% end %> <% end %> +
<%= @project.name %>
+ <%if User.current.logged? %> <% if @course.teacher.id == User.current.id %> -
<%= link_to l(:label_course_modify_settings), {:controller => 'projects', :action => 'settings', :id => @project} %> + <%= link_to l(:label_course_modify_settings), {:controller => 'projects', :action => 'settings', :id => @project} %> <% else %> <%= join_in_course(@project, User.current) %> @@ -81,9 +82,11 @@
<%= watcher_link(@project, User.current) %>
- <% end %>
+
diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index ae3401151..cf381548a 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -43,7 +43,7 @@
- +
课程名: <%= link_to @bid.courses.first.name,project_path(@bid.courses.first) %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 0677c9b30..7916806b4 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -59,8 +59,8 @@ - diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 931c6d7b4..9e61c8180 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -15,15 +15,17 @@
<%= image_tag(url_to_avatar(@project), :class => 'avatar2') %> -
+
+
<%= @project.name %>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index ef42f2eda..b2ba11134 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -27,8 +27,8 @@
-

- <%= textilizable(truncate(e.event_description, :length => 68)) %> +

+ <%= h (truncate(e.event_description, :length => 240)) %>

<%= image_tag(url_to_avatar(e.user), :class => "avatar") %> - +
<% case e.act_type %> <% when 'Bid' %> <% if act.reward_type ==3 %> <% if e.user == User.current%> - + <% else %> - + <% end %> <% else %> <% if e.user == User.current%> @@ -38,7 +40,7 @@ @@ -57,7 +59,7 @@ @@ -74,7 +76,7 @@ @@ -91,7 +93,7 @@ @@ -125,7 +127,7 @@ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 37465b603..30703d294 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -281,6 +281,22 @@ ul.tool li{list-style-type:none; color:#09b2c8; padding-top: 50px; } + +.info-course{ + padding-left: 8px; + font-family:微软雅黑; + font-weight:bold; + font-size:16px; + color:#4d4d4d; + word-wrap: break-word; + word-break: break-all; +} + +.info-break{ + word-wrap: break-word; + word-break: break-all; +} + .info_font{ padding-left: 8px; font-family:微软雅黑;
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> + <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %><%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %><%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  + <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>

- <%= textilizable act.description %> + <%= h act.description %>

- <%= textilizable act.notes %> + <%= h act.notes %>

- <%= textilizable act.long_comments %> + <%= h act.long_comments %>

- <%= textilizable act.content %> + <%= h stringCut240(act.content) %>

- <%= textilizable act.description %> + <%= h act.description %>