diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 72027a118..ca897fc3d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -302,26 +302,11 @@ class UsersController < ApplicationController end # end - # added by huang + #用户作业列表 def user_homeworks - # @membership = @user.memberships.all(:conditions => Project.visible_condition(User.current)) - # @memberships = [] - # @membership.each do |membership| - # if membership.project.project_type == 1 - # @memberships << membership - # end - # end - # @bid = [] - # @memberships.each do |membership| - # @bid += membership.project.homeworks - # end - # @bid = @bid.group_by {|bid| bid.courses.first.id} - # unless User.current.admin? - # if !@user.active? - # render_404 - # return - # end - # end + respond_to do |format| + format.html {render :layout => 'new_base_user'} + end end @@ -560,6 +545,13 @@ class UsersController < ApplicationController end def show + #if @user == User.current + + @user_activities = UserActivity.where("(container_type='Course' and container_id in (select course_id FROM members WHERE user_id=#{@user.id})) or (container_type='Project' and container_id in (SELECT project_id FROM members WHERE user_id=#{@user.id}))").order('created_at desc') + @user_activities = paginateHelper @user_activities,500 + #SELECT * FROM user_activities WHERE (container_type='Course' AND container_id IN (SELECT course_id FROM members WHERE user_id=4)) OR (container_type='Project' AND container_id IN (SELECT project_id FROM members WHERE user_id=4)) + #else + #end render :layout=>'new_base_user' end diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index ee3f2f0ab..b1483d70c 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -5,12 +5,12 @@
  • @@ -24,193 +24,35 @@
  • -
    -
    用户头像
    -
    - - -
    - -
    截止时间:2015-08-20
    -
    -
    (作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    -
    - -
    -
    -
    -
    -
    -
    -
    回复(5)
    -
    2015-07-28
    - -
    -
    - -
    -
    - - - -
    -
    -
    -
    用户头像
    -
    - -
    请大家说下软件工程是什么!
    -
    -
    -
    -
    -
    用户头像
    -
    - -
    软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
    -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    -
    用户头像
    -
    - -
    回答非常好!
    -
    -
    -
    -
    - -
    -
    -
    用户头像
    -
    - - -
    -
    时间:2015-07-31
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    回复(5)
    -
    2015-07-31
    - -
    -
    - -
    -
    - - - -
    -
    -
    -
    用户头像
    -
    - -
    很开心!
    -
    -
    -
    -
    -
    用户头像
    -
    - -
    假期好热,没出去。
    -
    -
    -
    -
    -
    -
    -
    用户头像
    -
    - - -
    -
    指派给  苏稳
    -
    时间:2015-08-20
    -
    -
    (缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    - -
    图片附件.png(123KB)
    -
    - -
    -
    -
    -
    -
    -
    -
    回复(5)
    -
    2015-07-26
    - -
    -
    - -
    -
    - - - -
    -
    -
    -
    用户头像
    -
    - -
    请大家说下软件工程是什么!
    -
    -
    -
    -
    -
    用户头像
    -
    - -
    软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
    -
    -
    -
    -
    -
    \ No newline at end of file +<% @user_activities.each do |user_activity| + unless @user_activities.nil? %> + <% case user_activity.act_type.to_s %> + <% when 'CourseActivity' %> + <% @course_act= CourseActivity.where("id=#{user_activity.act_id}").first %> + <% unless @course_act.nil? %> + <% case @course_act.course_act_type.to_s %> + <% when 'HomeworkCommon' %> + <% @activity=HomeworkCommon.where("id=#{@course_act.course_act_id}").first %> + <%= render :partial => 'course_homework', :locals => {:activity => @activity,:user_activity =>user_activity} %> + <% when 'News' %> + <% @activity=News.where("id=#{@course_act.course_act_id}").first %> + <%= render :partial => 'course_news', :locals => {:activity => @activity,:user_activity =>user_activity} %> + <% when 'Message'%> + <% @activity=Message.where("id=#{@course_act.course_act_id}").first %> + <%= render :partial => 'course_message', :locals => {:activity => @activity,:user_activity =>user_activity} %> + <% end %> + <% end %> + <% when 'ForgeActivity' %> + <% @project_act= ForgeActivity.where("id=#{user_activity.act_id}").first %> + <% case @project_act.forge_act_type.to_s %> + <% when 'Issue' %> + <% @activity=Issue.where("id=#{@project_act.forge_act_id}").first %> + <%= render :partial => 'project_issue', :locals => {:activity => @activity,:user_activity =>user_activity} %> + <% when 'Message' %> + <% @activity=Message.where("id=#{@project_act.forge_act_id}").first %> + <%= render :partial => 'project_message', :locals => {:activity => @activity,:user_activity =>user_activity} %> + <% end %> + <% end %> +<% end %> +<% end %> \ No newline at end of file diff --git a/app/views/users/show_chen.erb b/app/views/users/show_chen.erb new file mode 100644 index 000000000..74b303fad --- /dev/null +++ b/app/views/users/show_chen.erb @@ -0,0 +1,279 @@ +
    +
    +
    最新动态
    + +
    + +
    +
    + 用户头像
    +
    + + +
    + +
    截止时间:2015-08-20
    +
    +
    (作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    + +
    +
    +
    +
    +
    +
    +
    + 用户头像
    +
    + + +
    + +
    截止时间:2015-08-20
    +
    +
    (作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    + +
    +
    +
    +
    + + + +
    +
    +
    + 用户头像
    +
    + + +
    +
    时间:2015-07-31
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    回复(5)
    +
    2015-07-31
    + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + 用户头像 +
    +
    +
    黄井泉 学生 + 2015-08-01删除 +
    +
    很开心!
    +
    +
    +
    +
    +
    + 用户头像 +
    +
    +
    陈正东 学生 + 2015-08-02删除 +
    +
    假期好热,没出去。
    +
    +
    +
    +
    +
    +
    +
    +
    + 用户头像
    +
    + + +
    +
    指派给  苏稳 +
    +
    时间:2015-08-20
    +
    +
    (缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    +
    + 文件附件.zip(123KB) +
    +
    + 图片附件.png(123KB) +
    +
    + +
    +
    +
    +
    +
    +
    +
    回复(5)
    +
    2015-07-26
    + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + 用户头像 +
    +
    +
    尹教授 + 2015-08-01删除 +
    +
    请大家说下软件工程是什么!
    +
    +
    +
    +
    +
    + 用户头像 +
    +
    +
    Tang 学生 + 2015-08-01删除 +
    +
    软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb index 74560909d..6ed40a879 100644 --- a/app/views/users/user_homeworks.html.erb +++ b/app/views/users/user_homeworks.html.erb @@ -1,9 +1,108 @@ -u - - <% if @user.user_extensions.identity == 0 %> - <%= render :partial => 'my_create_homework' %> - <% else %> - <%= render :partial => 'my_homework' %> - <% end %> - - +
    +
    +
    发布作业
    +
    +
    +
    + + 课程名称 + 导入作业 +
    + + +
    +
    +
    +
    + +
    + +
    + 高级配置 +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + + + +
    +
    +
    + 确定 + 取消 +
    +
    +
    +
    +
    +
    +
    用户头像
    +
    + + +
    +
    指派给  苏稳
    +
    时间:2015-08-20
    +
    +
    (缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    + +
    图片附件.png(123KB)
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    用户头像
    +
    + + +
    +
    指派给  苏稳
    +
    时间:2015-08-20
    +
    +
    (缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    + +
    图片附件.png(123KB)
    +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 1c77ff04b..4639c07ec 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -474,13 +474,6 @@ ActiveRecord::Schema.define(:version => 20150820025358) do add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - create_table "discuss_demos", :force => true do |t| - t.string "title" - t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "documents", :force => true do |t| t.integer "project_id", :default => 0, :null => false t.integer "category_id", :default => 0, :null => false @@ -903,6 +896,7 @@ ActiveRecord::Schema.define(:version => 20150820025358) do t.datetime "created_on" t.integer "comments_count", :default => 0, :null => false t.integer "course_id" + t.datetime "updated_on" end add_index "news", ["author_id"], :name => "index_news_on_author_id" diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png index 5b61ff102..1e0d23357 100644 Binary files a/public/images/homepage_icon.png and b/public/images/homepage_icon.png differ diff --git a/public/stylesheets/images/icons.png b/public/stylesheets/images/icons.png index e0ba4f4e6..3519404ea 100644 Binary files a/public/stylesheets/images/icons.png and b/public/stylesheets/images/icons.png differ diff --git a/public/stylesheets/new_public.css b/public/stylesheets/new_public.css index 7878f5bb0..2e1906973 100644 --- a/public/stylesheets/new_public.css +++ b/public/stylesheets/new_public.css @@ -9,7 +9,7 @@ a:link,a:visited{color:#7f7f7f;text-decoration:none;} a:hover,a:active{color:#000;} /*常用*/ -#RSide{ background:#fff;} +/*#RSide{ background:#fff;}*/ .hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .none{display: none;} .rside_back{ width:670px; margin-left:10px; background:#fff; margin-bottom:10px;} @@ -451,7 +451,7 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat; .navHomepage {width:1000px; height:54px; background-color:#15bccf; margin:0 auto;} .navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:40px;} .navHomepageMenu {margin-right:40px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;} -.navHomepageMenu:hover {background-color:#0ea6b7;} +/*.navHomepageMenu:hover {background-color:#0ea6b7;}*/ .navHomepageSearchBoxcontainer {margin-top:11px; } .navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;} .navHomepageSearchInput {width:345px; height:32px; outline:none; border:none; float:left; padding-left:5px;; margin:0;} @@ -542,7 +542,7 @@ a.postTypeGrey:hover {color:#15bccf;} .homepagePostTo {font-size:14px; color:#484848; margin-bottom:15px;} .homepagePostTitle {font-size:14px; color:#484848; margin-bottom:15px; font-weight:bold;} .homepagePostSubmitContainer {height:30px; margin-bottom:15px;} -.homepagePostSubmit {font-size:14px; color:#888888; width:80px; height:30px; text-align:center; vertical-align:middle; line-height:30px; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px;} +.homepagePostSubmit {font-size:14px; color:#888888; width:90px; height:30px; text-align:center; vertical-align:middle; line-height:30px; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px;} .homepagePostSubmit:hover {background-color:#d8d8d8;} .homepagePostIntro {font-size:14px; color:#484848;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; height:30px; line-height:30px; vertical-align:middle;} @@ -618,7 +618,6 @@ a.loginChooseTab {color:#484848; height:30px; display:block;} - /*底部*/ #Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;} .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} @@ -782,4 +781,56 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} .uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;} .showpicBox{width:133px; height:250px; background:#f2f2f5; float:left; margin-left:20px; text-align:center; padding-top:15px; color:#666;} .mr15{ margin-right:15px;} -.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;} \ No newline at end of file +.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;} + +/*20150820课程作业 LB*/ +.HomeWork {width:708px; background-color:#ffffff; padding:20px; border:1px solid #dddddd;} +.RightBanner {width:708px; height:34px; border-bottom:1px solid #e9e9e9;} +.InputBox{ border:1px solid #d9d9d9; height:28px; line-height:28px; padding-left:5px; font-size:14px;} +a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#ffffff; line-height:28px; 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.BlueCirBtn{ background:#15bccf; color:#fff;} +.W350{ width:350px;} +.W120{ width:120px;} +.W700{ width:700px;} +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.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;} +.DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;} +/*20150820编程作业 LB*/ +.W315{ width:315px;} +.icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;} +a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;} +.icon_remove{background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;} +a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;} +/*20150820提交作业 LB*/ +.HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;} +.c_grey{ color:#888888;} +.HomeWorkP{ width:690px; font-size:14px;} +.H150{ height:150px;} +.ProResult{width:748px; background-color:#fff; border:1px solid #dddddd; border-bottom:none;} +.ProResultTop{ height:38px; line-height:38px; border-bottom:1px solid #dddddd; background:#f2f2f2; padding:0 10px;} +.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd;} +.W50{ width:50px;} +.W200{ width:210px;} +.ProResultTable tr td{ height:35px; border-bottom:1px solid #dddddd; } +.ProResultTable{ color:#888888;} +.T_C{ text-align:center;} + + + + + + + + + + + + + +