From 25a24f72e57ca802797c8a1166ff89de621516f8 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 11 Jan 2016 16:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E8=8F=9C=E5=8D=95=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=96=B0=E7=9A=84=E6=A0=B7=E5=BC=8F=E5=8F=8A=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_user_courses.html.erb | 57 +++++++++++++------ app/views/layouts/_user_projects.html.erb | 48 +++++++++++----- app/views/layouts/new_base_user.html.erb | 34 +++++++---- .../organizations/_subfield_list.html.erb | 2 + app/views/organizations/setting.html.erb | 14 +++-- .../20151231012634_add_last_term_to_course.rb | 17 ------ db/schema.rb | 4 +- public/stylesheets/new_user.css | 2 +- public/stylesheets/org.css | 7 ++- public/stylesheets/public.css | 2 +- public/stylesheets/share.css | 13 +++++ 11 files changed, 130 insertions(+), 70 deletions(-) delete mode 100644 db/migrate/20151231012634_add_last_term_to_course.rb diff --git a/app/views/layouts/_user_courses.html.erb b/app/views/layouts/_user_courses.html.erb index 1becb1a33..a8a56b3c5 100644 --- a/app/views/layouts/_user_courses.html.erb +++ b/app/views/layouts/_user_courses.html.erb @@ -1,25 +1,50 @@ <% courses.each do |course|%>
  • - <%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :class => "coursesLineGrey hidden #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}", :title => course.name+"("+course.time.to_s+course.term+")"%> -
    -
      -
  • <% end %> diff --git a/app/views/layouts/_user_projects.html.erb b/app/views/layouts/_user_projects.html.erb index 88be91d70..f822021e0 100644 --- a/app/views/layouts/_user_projects.html.erb +++ b/app/views/layouts/_user_projects.html.erb @@ -1,24 +1,44 @@ <% projects.each do |project|%>
  • + <% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count %> <%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => project.name%> -
    -
      -
  • <% end %> <% if projects.size == 5%> diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 52af845ed..b2c19d763 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -52,15 +52,25 @@ }) $(".coursesLineGrey").mouseout(function(){ $(this).css("color","#808080"); - }) - $(".homepagePostSetting,.coursesLineGrey").mouseover(function(){ - $(this).prev().css("color","#ffffff"); - $(this).css("z-index", "9999"); - }) - $(".homepagePostSetting").mouseout(function(){ - $(this).prev().css("color","#808080"); - $(this).css("z-index", "1"); - }) + }); + + //侧导航栏配置设置 + $(".homepageLeftMenuCoursesLine").mouseover(function(){ + $(this).children(".shild").css("background","url(/images/hwork_icon.png) -82px -399px no-repeat"); + $(this).children().css("color","#ffffff"); + }); + $(".homepageLeftMenuCoursesLine").mouseout(function(){ + $(this).children(".shild").css("background","url(/images/hwork_icon.png) -6px -354px no-repeat"); + $(this).children().css("color","#808080"); + }); + $(".subNavRow").mouseover(function(){ + $(this).css("background-color","#269ac9"); + $(this).children().css("color","#ffffff"); + }); + $(".subNavRow").mouseout(function(){ + $(this).css("background-color","#ffffff"); + $(this).children().css("color","#888888"); + }); }) @@ -165,7 +175,7 @@ <% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
    <% else%> - <%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:remote => true, :title => "加入课程"%> + <%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入课程"%> <% end%> <% end%> @@ -193,7 +203,7 @@ 项目 <% if is_current_user%> - <%=link_to "", new_project_path(:host=> Setting.host_name), :class => "homepageMenuSetting fr", :title => "新建项目"%> + <%=link_to "", new_project_path(:host=> Setting.host_name), :class => "homepageMenuSetting fr", :style => "margin-right:10px;", :title => "新建项目"%> <% end%> <% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%> diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index de837c66f..b8af1e85e 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -2,6 +2,7 @@
  • 已有栏目
  • 状态
  • 类型
  • +
  • 域名目录
  • @@ -26,6 +27,7 @@
  • 新增
  • <%= field.field_type == "Post" ? "帖子" : "资源" %>
  • + <%#= link_to "隐藏", hide_org_subfield_organizations_path(field), :method => 'post', :remote => true, :id => "hide_#{field.id}", :class => "linkBlue fr mr5" %> <%= field.hide==0?"设为隐藏":"设为可见" %> <%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkBlue fr mr10" %> diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index 2e9058c40..40cc295d9 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -111,20 +111,26 @@ :subfields => @organization.org_subfields.where("field_type != 'default'") } %>
    -
    +

    新增栏目

    <%= form_tag url_for(:controller => 'org_subfields', :action => 'create', :organization_id => @organization.id), :id=> 'add_subfield_form',:remote => true do %> - + +
    +

    域名目录(用户自定义url,可选)

    + micros.trustie.net/ +
    +
    • 栏目类型
    • -
    • +
    • -
    • +
    • +
    确定 diff --git a/db/migrate/20151231012634_add_last_term_to_course.rb b/db/migrate/20151231012634_add_last_term_to_course.rb deleted file mode 100644 index 1b342eaaf..000000000 --- a/db/migrate/20151231012634_add_last_term_to_course.rb +++ /dev/null @@ -1,17 +0,0 @@ -class AddLastTermToCourse < ActiveRecord::Migration - def change - add_column :courses, :end_time, :integer - add_column :courses, :end_term, :string - - count = Course.all.count / 30 + 2 - transaction do - for i in 1 ... count do - Course.page(i).per(30).each do |course| - course.end_time = course.time - course.end_term = course.term - course.save - end - end - end - end -end diff --git a/db/schema.rb b/db/schema.rb index e816d1d6e..b21b5057d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -982,8 +982,8 @@ ActiveRecord::Schema.define(:version => 20160108093752) do t.text "notes" t.integer "status" t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false t.string "m_parent_id" t.boolean "is_readed" t.integer "m_reply_count" diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 7456c904b..830ed797e 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -581,7 +581,7 @@ a.homepageImageNumber:hover {color:#269ac9;} .homepageLeftMenuCourses {font-size:13px; border-bottom:1px solid #dddddd;} .homepageLeftMenuCoursesLine {height:38px; line-height:38px; vertical-align:middle;} .homepageLeftMenuCoursesLine:hover {background-color:#269ac9;} -a.coursesLineGrey {padding-left:25px; color:#808080; display:block;} +a.coursesLineGrey {padding-left:25px; padding-right:25px; color:#808080; display:block;} a.coursesLineGrey:hover {color:#ffffff;} .homepageLeftMenuMore {height:18px;} .homepageLeftMenuMore:hover {background-color:#269ac9;} diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css index 2279f0fe5..02e6ce340 100644 --- a/public/stylesheets/org.css +++ b/public/stylesheets/org.css @@ -18,11 +18,11 @@ .orgUrlInput {width:200px; outline:none; border:1px solid #eaeaea; height:22px;} a.saveBtn {padding:3px 5px; background-color:#269ac9; color:#ffffff;} a.saveBtn:hover {background-color:#297fb8;} -.orgMemberList {width:410px; float:left;} +.orgMemberList {width:460px; float:left;} .orgListRow {border-bottom:1px solid #e4e4e4; padding-bottom:5px;} -.orgListUser {width:119px; float:left;} +.orgListUser {width:85px; float:left;} .orgListRole {width:180px; float:left;} -.orgMemContainer {width:278px;} +.orgMemContainer {width:228px;} .orgMemberAdd {float:right; width:240px;} .orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;} .undis {display:none;} @@ -73,6 +73,7 @@ a.linkGrey8:hover {color:#585858;} .org_login_list a {color:#269ac9;} .orgListStatus {width:55px; float:left;} +.personalUrl {border:1px solid #dddddd; width:75px; outline:none; white-space:nowrap; padding-left:2px;} .reCon{ margin:5px; width:710px;} .retop{width:710px; height:40px; background:#eaeaea; padding:5px;} .resources {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;float: right} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index dcb1a34f2..8047504e1 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -511,7 +511,7 @@ a.homepageImageNumber:hover {color:#15bccf;} .homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;} .homepageLeftMenuCoursesLine {height:38px; line-height:38px; vertical-align:middle;} .homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;} -a.coursesLineGrey {padding-left:25px; color:#15bccf; display:block;} +a.coursesLineGrey {padding-left:25px; padding-right:25px; color:#808080; display:block;} a.coursesLineGrey:hover {color:#ffffff;} .homepageLeftMenuMore {height:18px;} .homepageLeftMenuMore:hover {background-color:#b3e0ee;} diff --git a/public/stylesheets/share.css b/public/stylesheets/share.css index 59b3b63f9..b36d80082 100644 --- a/public/stylesheets/share.css +++ b/public/stylesheets/share.css @@ -18,6 +18,19 @@ a:hover.userCancel{border:1px solid #888888; } .userCard {width:208px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px; padding:15px; top:-176px; left:-95px; position:absolute; z-index:999; display:none;} .userCard font {display:block; border-width:8px; position:absolute; bottom:-16px; left:110px; border-style:solid dashed dashed dashed; border-color:#FFF transparent transparent transparent; font-size:0; line-height:0;} .userCard em {display:block; border-width:8px; position:absolute; bottom:-17px; left:110px; border-style:solid dashed dashed dashed; border-color:#eaeaea transparent transparent transparent; font-size:0; line-height:0;} +.userCardM {width:201px; height:20px; border:1px solid #dddddd; resize:none;} +.praviteC {background:url(../images/hwork_icon.png) -79px -255px no-repeat;} +.praviteCP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; left:25px;} +.publicC {background:url(../images/hwork_icon.png) -79px -125px no-repeat;} +.publicCP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; left:25px;} +.shild {background:url(../images/hwork_icon.png) -6px -354px no-repeat;} +.shildP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; right:0px;} +ul.shild:hover li ul {display:block;} +.subNavArrow {background:url(../images/hwork_icon.png) -82px -399px no-repeat; display:inline-block; width:20px; height:20px; position:absolute; top:10px; right:0px;} +ul.subNavArrow:hover li ul {display:block;} +.subNavMenu {line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:20px; top:-10px; padding:5px 0px; display:none; z-index:999;} +.subNavRow {padding:0px 15px; width:70px;} + a.mesIcon {background:url(../images/mes_icon.png) -5px -73px no-repeat; padding-left:23px;} a.personalIcon {background:url(../images/mes_icon.png) -6px -16px no-repeat; padding-left:23px;} .mesType {background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 15px; left:-50px; font-size:12px; color:#888888; display:none; line-height:2; z-index:999; white-space:nowrap;}