diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 055955e04..555c67d13 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -46,7 +46,7 @@ class UsersController < ApplicationController :activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index, :activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource, :user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction, - :user_import_homeworks,:user_search_homeworks] + :user_import_homeworks,:user_search_homeworks,:user_import_resource] before_filter :auth_user_extension, only: :show #before_filter :rest_user_score, only: :show #before_filter :select_entry, only: :user_projects @@ -116,7 +116,7 @@ class UsersController < ApplicationController user_querys.update_all(:viewed => true) forum_querys.update_all(:viewed => true) end - @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count + # @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count case params[:type] when nil @message_alls = [] @@ -379,6 +379,16 @@ class UsersController < ApplicationController end end + #用户从资源库导入资源到作业 + def user_import_resource + user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源 + @attachments = Attachment.where("(author_id = #{params[:id]} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ + "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))").order("created_on desc") + respond_to do |format| + format.js + end + end + include CoursesHelper def user_courses diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 709426d41..7f93345b4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2493,4 +2493,14 @@ int main(int argc, char** argv){ return 0; }".html_safe end + + #判断用户是否已经提交了问卷 + def has_commit_poll?(poll_id,user_id) + pu = PollUser.find_by_poll_id_and_user_id(poll_id,user_id) + if pu.nil? + false + else + true + end + end end diff --git a/app/helpers/poll_helper.rb b/app/helpers/poll_helper.rb index 22ee21936..170e1b92c 100644 --- a/app/helpers/poll_helper.rb +++ b/app/helpers/poll_helper.rb @@ -37,16 +37,6 @@ module PollHelper pv.vote_text end end - - #判断用户是否已经提交了问卷 - def has_commit_poll?(poll_id,user_id) - pu = PollUser.find_by_poll_id_and_user_id(poll_id,user_id) - if pu.nil? - false - else - true - end - end #统计答题百分比,统计结果保留两位小数 def statistics_result_percentage(e, t) diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 434e8847f..9ab29ba8b 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -57,7 +57,7 @@
-
+

<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>

@@ -137,7 +137,7 @@
-
+
<%= yield %>
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index c25363323..688d7e2ac 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -1,5 +1,5 @@
-
+
  • 基本资料
  • diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 0cb3aa25e..88a00e8ab 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -4,16 +4,16 @@ <%= 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 - <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %> + <% end %> TO + <%= link_to activity.course.name.to_s+" | 课程作业", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
-
- <%= link_to activity.name.to_s+"(作业名称)", student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %> +
+ <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
@@ -21,7 +21,16 @@
截止时间:<%= format_date(activity.end_time) %>
-
(作业描述)<%= activity.description.html_safe %>
+
+ 作业描述:<%= activity.description.html_safe %> +
+
- <% if activity.parent_id.nil? %> - <%= link_to activity.subject.to_s.html_safe+"(帖子标题)", course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %> + <% if activity.parent_id.nil? %> + <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %> <% else %> - <%= link_to activity.parent.subject.to_s.html_safe+"(帖子标题)", course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%> + <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%> <% end %>
-
时间:<%= format_date(activity.created_on) %>
+
发帖时间:<%= format_date(activity.created_on) %>
-
(描述) + + +
帖子描述: <% if activity.parent_id.nil? %> <%= activity.content.to_s.html_safe%> <% else %> @@ -44,20 +47,26 @@
-
-
+ + <% activity= activity.parent_id.nil? ? activity:activity.parent%> + <% replies_all_i = 0 %> + <% unless activity.children.empty? %> +
+
    + <% activity.children.reorder("created_on desc").each do |reply|%> + <% replies_all_i=replies_all_i+1 %> +
  • +
    + <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %> +
    +
    +
    + <% if reply.try(:author).try(:realname) == ' ' %> + <%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> + <% else %> + <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> + <% end %> + <%= format_date(reply.created_on) %> + <%= link_to( + l(:button_delete), + {:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete), + :class => 'replyGrey fr ml10' + ) if reply.course_destroyable_by?(User.current) %> + +
    +
    <%= reply.content.html_safe %>
    +
    +
    +
  • + <% end %> +
-
<%#= reply.content.html_safe %>
-
-
-
- <%# end %> - <%# end %> -
--> + <% end %> +
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index ce85e0cad..5e538c65e 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -1,5 +1,5 @@
-
+
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
@@ -9,17 +9,18 @@ <%= 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 - <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course), :class => "newsBlue ml15", :style=>"word-break:break-all" %> + <% end %> TO + <%= link_to activity.course.name.to_s+" | 课程通知", course_path(activity.course), :class => "newsBlue ml15", :style => "word-break:break-all" %>
-
- <%=link_to activity.title.to_s+"(通知标题)", news_path(activity), :class=> "postGrey", :style=>"word-break:break-all" %> +
+ <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey", :style => "word-break:break-all" %>
发布时间:<%= format_date(activity.created_on) %>
-
(通知描述)<%= activity.description.html_safe %>
- -
<%#= render :partial => 'course_news_reply',:locals => { :contest => @contest, :journals => @jour, :state => false}%> -
- <%#= form_tag({:controller => 'comments', :action => 'create', :id => activity}, :id => "add_reply_form") do %> - -
- 取消 -
-
- 发送 + + <% replies_all_i = 0 %> + <% unless activity.comments.empty? %> +
+
    + <% activity.comments.reorder("created_on desc").each do |comment| %> + <% replies_all_i=replies_all_i+1 %> +
  • +
    + <%= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %> +
    +
    +
    + <% if comment.try(:author).try(:realname) == ' ' %> + <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> + <% else %> + <%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> + <% end %> + <%= format_date(comment.created_on) %> + <%= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment}, + :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %> + +
    +
    <%= comment.comments.html_safe %>
    +
    +
    +
  • + <% end %> +
-
- <%# end %> + <% end %>
- <%# activity.comments.reorder("created_on desc").each do |comment| unless activity.comments.nil?%> -
-
- <%#= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %> -
-
-
- <%# if comment.try(:author).try(:realname) == ' ' %> - <%#= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> - <%# else %> - <%#= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> - <%# end %> - <%#=format_date(comment.created_on)%> - <%#= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment}, - :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %> - <!–删除–> -
-
<%#= comment.comments.html_safe %>
-
-
-
- <%# end %> - <%# end %> -
-->
\ No newline at end of file diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb index 0c93e7627..f0a2a8aba 100644 --- a/app/views/users/_course_poll.html.erb +++ b/app/views/users/_course_poll.html.erb @@ -1,4 +1,4 @@ -<%# has_commit = has_commit_poll?(activity.id ,User.current)%> +<% has_commit = has_commit_poll?(activity.id ,User.current)%> <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
@@ -14,21 +14,21 @@ <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> <% end %> TO - <%= link_to Course.find(activity.polls_group_id).name.to_s+"(课程名称)", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %> + <%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
- <%#= link_to activity.polls_name.to_s+"(问卷名称)", %> - <%# if has_commit %> - <%#= link_to poll_name, poll_result_poll_path(activity.id), :class => "polls_title polls_title_w fl c_dblue"%> - <%# else %> - <%= link_to poll_name+"(问卷名称)", poll_path(activity.id), :class => "postGrey"%> - <%# end %> + <%#= link_to activity.polls_name.to_s/*+"(问卷名称)"*/, %> + <% if has_commit %> + <%= link_to poll_name, poll_result_poll_path(activity.id), :class => "postGrey"%> + <% else %> + <%= link_to poll_name, poll_path(activity.id), :class => "postGrey"%> + <% end %>
-
时间:<%= format_date(activity.created_at) %>
+
发布时间:<%= format_date(activity.published_at) %>
-
(问卷描述)<%=activity.polls_description.to_s%>
+
问卷描述:<%=activity.polls_description.html_safe.to_s%>
- <%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %> - <%=activity.status.name %> + <%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %> + <%= get_issue_priority(activity.priority_id)[1] %>
指派给   @@ -28,7 +28,7 @@
时间:<%=format_date(activity.created_on) %>
-
(缺陷描述)<%=activity.description.html_safe %>
+
缺陷描述:<%= activity.description.html_safe %>
<% if activity.attachments.any? %> <% activity.attachments.each do |attachment| %> @@ -70,15 +70,21 @@
-
-
+ + <% replies_all_i = 0 %> + <% unless activity.journals.empty? %> +
+
    + <% activity.journals.reorder("created_on desc").each do |reply| %> + <% replies_all_i=replies_all_i+1 %> +
  • +
    + <%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %> +
    +
    +
    + <% if reply.try(:user).try(:realname) == ' ' %> + <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> + <%# else %> + <%#= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> + <% end %> + <%= format_date(reply.created_on) %> - #<!–删除–> -
    - <%# if reply.details.any? %> - <%# details_to_strings(reply.details).each do |string| %> -
    <%#=string %>
    - <%# end %> - <%# else %> -
    <%#=reply.notes.html_safe %>
    - <%# end %> -
    -
    -
- <%# end %> - <%# end %> -
--> + +
+ <% if reply.details.any? %> + <% details_to_strings(reply.details).each do |string| %> +
<%= string %>
+ <% end %> + <% else %> +
<%= reply.notes.html_safe %>
+ <% end %> + +
+ + <% end %> + + + <% end %> + \ No newline at end of file diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 57b021467..3bdbda412 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -11,20 +11,26 @@ <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <% end %> TO - <%= link_to activity.project.name.to_s+"(项目讨论区)", project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%> + <%= link_to activity.project.name.to_s+" | 项目讨论区",project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
<% if activity.parent_id.nil? %> - <%= link_to activity.subject.to_s.html_safe+"(帖子标题)", project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %> + <%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %> <% else %> - <%= link_to activity.parent.subject.to_s.html_safe+"(帖子标题)", project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%> + <%= link_to activity.parent.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%> <% end %>
时间:<%= format_date(activity.created_on) %>
-
(描述)<%= activity.content.html_safe %>
+
帖子描述: + <% if activity.parent_id.nil? %> + <%= activity.content.to_s.html_safe%> + <% else %> + <%= activity.parent.content.to_s.html_safe%> + <% end %> +
- -
+ + <% activity= activity.parent_id.nil? ? activity : activity.parent %> + <% replies_all_i = 0 %> + <% unless activity.children.empty? %> +
+
-
-
- <%# if reply.try(:author).try(:realname) == ' ' %> - <%#= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> - <%# else %> - <%#= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> - <%# end %> - <%#= format_date(reply.created_on) %> - <%#= link_to( - l(:button_delete), - {:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'}, - :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete), - :class => 'replyGrey fr ml10' - ) if reply.course_destroyable_by?(User.current) %> - # <!–删除–> -
-
<%#= reply.content.html_safe %>
-
-
-
- <%# end %> - <%# end %> - --> - + <% end %> + + \ No newline at end of file diff --git a/app/views/users/_show_user_resource.html.erb b/app/views/users/_show_user_resource.html.erb new file mode 100644 index 000000000..a27a51d65 --- /dev/null +++ b/app/views/users/_show_user_resource.html.erb @@ -0,0 +1,26 @@ +
+
+
资源库
+
+ +
+
+ + +
+
+ <%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %> +
+ <%= render :partial => 'users/show_user_homework_form', :locals => {:user_homeworks => @user_homeworks}%> +
+
+
+ 确定 +
+
+ 取消 +
+
+ <% end%> +
+
\ No newline at end of file diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 97f7b4c6f..1cfeb7ed8 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -1,5 +1,64 @@ <% user_activities.each do |user_activity| unless user_activities.nil? %> + <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %> <% case user_activity.container_type.to_s %> <% when 'Course' %> diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb index e184d4132..1613b144e 100644 --- a/app/views/users/_user_homework_attachment.html.erb +++ b/app/views/users/_user_homework_attachment.html.erb @@ -47,7 +47,7 @@
上传附件 - + <%#= link_to "资源库", user_import_resource_user_path(User.current.id),:class => "FilesBtn fl mr15 mt3",:remote => true%>
<% content_for :header_tags do %> diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index 2d4c7eb49..8340306e0 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -1,6 +1,6 @@ <%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
-
+

@@ -27,7 +27,7 @@
- <%= select_tag :course_id,options_for_select(get_as_teacher_courses(User.current),homework.course_id), {:class => "InputBox w708 SearchIcon"} %> + <%= select_tag :course_id,options_for_select(get_as_teacher_courses(User.current),homework.course_id), {:class => "InputBox w708"} %>
@@ -38,7 +38,7 @@
发送 - 取消 + 取消
\ No newline at end of file diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index 350875f8b..63b03e5dd 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -7,7 +7,7 @@ } -
+
<% if @action == 'fans' %>

粉丝

diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb index 2813f2006..e232579f9 100644 --- a/app/views/users/user_homeworks.html.erb +++ b/app/views/users/user_homeworks.html.erb @@ -11,6 +11,14 @@ } }; $(window).scroll(scrollHandler); + + function reset_homework(){ + $("#homework_name").val(""); + $("#homework_end_time").val(""); + $("#course_id").val(""); + $("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new })%>"); + homework_description_editor.html(""); + } <% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%> @@ -22,7 +30,7 @@
-
+
<% homework = HomeworkCommon.new %> <%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
diff --git a/app/views/users/user_import_homeworks.js.erb b/app/views/users/user_import_homeworks.js.erb index 7f9bfa0df..d00886b1c 100644 --- a/app/views/users/user_import_homeworks.js.erb +++ b/app/views/users/user_import_homeworks.js.erb @@ -4,4 +4,4 @@ $('#ajax-modal').css('height','300px').css("width","580px"); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); -$('#ajax-modal').parent().css("top","20%").css("left","25%"); +$('#ajax-modal').parent().css("top","20%").css("left","25%").css("position","fixed"); diff --git a/app/views/users/user_import_resource.js.erb b/app/views/users/user_import_resource.js.erb new file mode 100644 index 000000000..ce70d68ad --- /dev/null +++ b/app/views/users/user_import_resource.js.erb @@ -0,0 +1,7 @@ +$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_homeworks') %>'); +showModal('ajax-modal', '580px'); +$('#ajax-modal').css('height','300px').css("width","580px"); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before("" + +""); +$('#ajax-modal').parent().css("top","20%").css("left","25%").css("position","fixed"); \ No newline at end of file diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 73c1d2a72..a0d568710 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -1,251 +1,240 @@ -
-
-
消息
- +
+
+
+
+<% if @message_alls.count >0 %> + <%# 课程消息 %> + <% unless @message_alls.nil? %> + <% @message_alls.each do |ma| %> + <% if ma.class == CourseMessage %> + <% if ma.course_message_type == "News" %> + <% end %> - - <% if ma.class == ForgeMessage %> - <% if ma.forge_message_type == "Issue" %> - - <% end %> - <% if ma.forge_message_type == "Journal" %> - - <% end %> - <% if ma.forge_message_type == "Message" %> - <% end %> - - <% if ma.class == MemoMessage %> - <% if ma.memo_type == "Memo" %> -
-
+ + +<% else %> +
您目前还没有相关消息!
+<% end %> +
+
+
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb index b8c5b106d..556069a1f 100644 --- a/app/views/users/user_newfeedback.html.erb +++ b/app/views/users/user_newfeedback.html.erb @@ -24,11 +24,15 @@ -
-
-
留言
-
-
+
+
+
+
留言
+
+
+
+ +
<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%> @@ -40,7 +44,7 @@
-
+
<%if @jour%> <% @jour.each do |jour|%> <%= render :partial => 'user_jours_new', :locals => {:jour => jour} %> diff --git a/config/routes.rb b/config/routes.rb index 634fb6d27..7237787bd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -329,6 +329,7 @@ RedmineApp::Application.routes.draw do match 'user_homeworks', :to => 'users#user_homeworks', :via => :get get 'user_import_homeworks' get 'user_search_homeworks' + get 'user_import_resource' match 'watch_projects', :to => 'users#watch_projects', :via => :get # # added by bai diff --git a/public/images/homepage_icon2.png b/public/images/homepage_icon2.png new file mode 100644 index 000000000..6cbde8f62 Binary files /dev/null and b/public/images/homepage_icon2.png differ diff --git a/public/images/resource_icon_list.png b/public/images/resource_icon_list.png new file mode 100644 index 000000000..d1fdc2610 Binary files /dev/null and b/public/images/resource_icon_list.png differ diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 42c8a9ddf..100dcb46a 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -1,7 +1,7 @@ $(function(){ //右侧最小高度 = 左侧高度 - 15px 保证两边高度基本一样,页面美观 - $("#RSide").css("min-height",$("#LSide").height()-15); - $("#users_setting").css("min-height",$("#LSide").height()-35); + $("#RSide").css("min-height",$("#LSide").height()-35); + $("#users_setting").css("min-height",$("#LSide").height()-100); //头像相关 $("#homepage_portrait_image").live("mouseover",function(){ diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 8e8790fb5..69f5489b0 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -12,6 +12,7 @@ a:hover,a:active{color:#000;} /*常用*/ /*#RSide{ background:#fff;}*/ #users_setting{clear:both;width:728px;background: #fff;padding: 10px;/*滑动门的宽度*/} +#RSide{clear:both;width:728px;background: #fff;padding: 10px;/*滑动门的宽度*/} /*上传图片处理*/ .upload_img img{max-width: 100%;} blockquote img{max-width: 100%;} @@ -528,10 +529,10 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} .newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;} .homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} .homepageNewsPortrait {width:40px; display:block; margin-top:7px;} -.homepageNewsPublisher {width:80px; max-width:80px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } -.homepageNewsType {width:90px; padding-left: 5px; font-size:12px; color:#888888; display:block;} -.homepageNewsPubType {width:175px; font-size:12px; color:#888888; display: block;} -.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.homepageNewsPublisher { max-width:100px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; } +.homepageNewsType {width:100px; padding-left: 5px; font-size:12px; color:#888888; display:block;} +.homepageNewsPubType {width:215px; font-size:12px; color:#888888; display: block;} +.homepageNewsContent {width:355px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} a.homepageWhite {color:#ffffff;} a.homepageWhite:hover {color:#a1ebff} @@ -692,7 +693,7 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;} /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} -.footerAbout{ width:455px; margin:0 auto;height:35px; line-height:35px;} +.footerAbout{ width:455px; margin:0 auto;height:35px; line-height:35px; } .languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} .departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;} .copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} @@ -867,14 +868,14 @@ a:hover.BlueCirBtn{ background:#15bccf; color:#fff;} .W120{ width:110px;} .W700{ width:700px;max-width: 700px;min-width: 700px;} .w708{width: 708px;} -a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} -a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#15bccf;} -a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} -a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#15bccf;} +a.AnnexBtn{ background: url(../images/homepage_icon2.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} +a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-repeat; color:#15bccf;} +a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} +a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#15bccf;} a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #15bccf; color:#15bccf; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} a:hover.BlueCirBtnMini{ background:#15bccf; color:#fff;} -a.DropBtn{background: url(../images/homepage_icon.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;} -a:hover.DropBtn{background: url(../images/homepage_icon.png) -125px -370px no-repeat;} +a.DropBtn{background: url(../images/homepage_icon2.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;} +a:hover.DropBtn{background: url(../images/homepage_icon2.png) -125px -370px no-repeat;} .DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;} /*20150820编程作业 LB*/ .W320{ width:320px;} @@ -895,8 +896,8 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;} .W200{ width:200px;} .ProResultTable{ color:#888888;} .T_C{ text-align:center;} -.SearchIcon{background:url(../images/homepage_icon.png) 676px -393px no-repeat; } -.SearchIcon:hover{background:url(../images/homepage_icon.png) 676px -419px no-repeat; } +.SearchIcon{background:url(../images/homepage_icon2.png) 676px -393px no-repeat; } +.SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; } a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; } a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;} @@ -918,7 +919,6 @@ img.ui-datepicker-trigger { margin: 7px; } /*消息*/ -.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} .homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;} .calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;} .calendar_div{border: 1px solid #d9d9d9;} diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css index eb9309eab..48d73f86a 100644 --- a/public/stylesheets/users.css +++ b/public/stylesheets/users.css @@ -24,7 +24,7 @@ a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; dis a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; } .inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;} .inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; } -.message_list_box{ background:#f5f5f5; padding:10px;margin-top: 10px;} +.message_list_box{ background:#f5f5f5; margin-top: 10px;} .users_pic{ width:46px; height:46px; border:1px solid #e3e3e3;} .users_pic:hover{ border:1px solid #a5a5a5;} .users_pic_sub{width:32px; height:32px; border:1px solid #e3e3e3;}