diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index dd2b5341a..27f487d92 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -544,7 +544,8 @@ class UsersController < ApplicationController end def watch_projects - @watch_type = Watcher.visible.where("watchable_type = ? and user_id = ?", 'Project', @user.id) + @watch_type = Watcher.where("watchable_type = ? and user_id = ?", 'Project', @user.id) + #@project = Project.visible.where("project_type < ?", 1) @watch_projects = [] unless @watch_type.nil? @watch_type.each do |obj| diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 83a4dfd19..53eeab105 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1426,4 +1426,7 @@ 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/activities/index.html.erb b/app/views/activities/index.html.erb index 0154bb682..907d21ee2 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -3,59 +3,7 @@ <%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>

- - - -
<% @events_by_day.keys.sort.reverse.each do |day| %>

diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 89990307f..d0eef4f3a 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -55,8 +55,8 @@ <% @project = Project.find_by_id(@project.id) %> <% @course = Course.find_by_extra(@project.identifier) %> - -
<% if(@project.project_type==1) %> +
+ <% if(@project.project_type==1) %> <% if get_avatar?(@project) %> <%= image_tag(url_to_avatar(@project), :class => "avatar2") %> <% else %> @@ -67,7 +67,7 @@ <% end %>
- <%= @project.name %> + <%= @project.name %>
<%if User.current.logged? %> <% if @course.teacher.id == User.current.id %> diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index ba6483585..ae3401151 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -31,7 +31,7 @@
<%= link_to "forge.trustie.net/courses", :controller => 'projects', :action => 'course'%> <%=link_to "主页", home_path %> > <%=link_to "实践课程", :controller => 'projects', :action => 'course' %> > - <%= link_to(@bid.courses.first.name.slice(0..6), project_path(@bid.courses.first)) %> > + <%= link_to(@bid.courses.first.name,project_path(@bid.courses.first)) %> > <%=link_to(@bid.name, respond_path(@bid))%>
@@ -46,7 +46,7 @@ 课程名: - <%= link_to @bid.courses.first.name.slice(0..6), project_path(@bid.courses.first) %> + <%= link_to @bid.courses.first.name,project_path(@bid.courses.first) %> diff --git a/app/views/layouts/base_tags.html.erb b/app/views/layouts/base_tags.html.erb index 6cf7625c1..d7f53a641 100644 --- a/app/views/layouts/base_tags.html.erb +++ b/app/views/layouts/base_tags.html.erb @@ -27,7 +27,7 @@ <%= view_layouts_base_sidebar_hook_response %>
-
+
<%= render_flash_messages %> <%= yield :content%> <%= call_hook :view_layouts_base_content %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 0610551e3..baf4c58aa 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -28,7 +28,7 @@

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

diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index a713ef325..88b55a459 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -27,9 +27,11 @@ <% end %> <% else %> <% if e.user == User.current%> - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{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_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <% else %> - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{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_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <% end %> <% end %> diff --git a/plugins/README b/plugins/README deleted file mode 100644 index edef25679..000000000 --- a/plugins/README +++ /dev/null @@ -1 +0,0 @@ -Put your Redmine plugins here. diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index a863cab03..37465b603 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -295,7 +295,11 @@ ul.tool li{list-style-type:none; color:#acaeb1; font-size:13px; } - +.font_lighter_e{ + width: 700px; + color:#acaeb1; + font-size:13px; +} .font_lighter2{ font-family:'微软雅黑'; color:#9a9a9a; diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index a3a363ceb..92338525f 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -439,6 +439,13 @@ ul.projects li.root background-color: #FFFFFF; } +#content_tag +{ + width:640px; + float:right; + background-color: #FFFFFF; +} + #content .wiki img { max-width:98%