From 592d704a6dc7b37c1fd06b0429012676cb123a87 Mon Sep 17 00:00:00 2001 From: yanxd Date: Wed, 12 Mar 2014 17:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/welcome_helper.rb | 22 +++++++++++++++ app/views/files/index.html.erb | 8 +++++- app/views/welcome/course.html.erb | 43 ++++++++++++------------------ public/stylesheets/application.css | 2 +- public/stylesheets/welcome.css | 9 ++++++- 5 files changed, 55 insertions(+), 29 deletions(-) diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 034bf7fe1..57e4825ea 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -22,6 +22,28 @@ module WelcomeHelper include CoursesHelper include ProjectsHelper + def get_course_term project + str = ( project.try(:course_extra).try(:time).to_s << '.' << project.try(:course_extra).try(:term).to_s ) + str[0..-4] + end + + def welcome_join_in_course(project, user) + if(user.logged? && + !(course_timeout? project) && + (project.course_extra.teacher.id != user.id) + ) + join_in_course(project, user) + end + end + + def get_course_avatar project + if get_avatar?(project) + url_to_avatar(project) + else + '../images/avatars/Project/course.jpg' + end + end + # 前略·天国の首页君/Earth has been unable stop to welcomePage's. # sum - 要搜索的项目数量 # max_rate - 新项目所占所有项目的比重,10分制 diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 31625fc33..a0ee754f9 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -106,8 +106,14 @@ div.pagination{ margin: 0px 25px; } .relation_file_div fieldset{ - margin: 0px 25px; + margin: 0px 0px; + padding: 10px; border-radius: 5px; + transition: all 2s linear 1s; +} +.relation_file_div input:focus{ + border: 1px solid #1B95C6; + box-shadow: 0px 0px 4px #1B95C6; } diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index 61c6ceb9e..f6774b499 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -111,34 +111,25 @@
+ +
+ [<%= get_course_term project %>] + <%#= join_in_course(project, User.current) %> + <%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%> + (<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>) +
+
+ ><%=project.description.truncate(25, omission: '...')%> +
+
+ <%= join_in_course(project, User.current)%> +
- <% end %> + <% end; reset_cycle %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 96cfaeab2..0661235d0 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2060,7 +2060,7 @@ button.tab-right { /***** Settings Tabs *****/ /*modified by huang*/ #content .tabs_new {height: 2.6em; margin-bottom:1.2em; margin-top: 0.8em; position:relative; overflow:hidden;} -#content .tabs_new ul {margin:0; position:absolute; bottom:0; padding-left: 0.5em; width: 2000px; border-bottom: 1px solid #15BCCF;font-size:14px;} +#content .tabs_new ul {margin:0; position:absolute; bottom:0; padding-left: 0.5em; width: 100%; border-bottom: 1px solid #15BCCF;font-size:14px;} #content .tabs_new ul li { width:80px; /*modified by linchun*/ float:left; diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css index 76e302530..7ff39fef6 100644 --- a/public/stylesheets/welcome.css +++ b/public/stylesheets/welcome.css @@ -176,7 +176,7 @@ li { } .d-p-index-newsource li,.d-p-index-hotproject ul.d-p-projectlist li{ color: rgb(102, 102, 102); - background: center -1px no-repeat; + /*background: center -1px no-repeat;*/ line-height: 20px; padding: 5px 5px 0px 9px; width: 440px; @@ -188,6 +188,12 @@ li { margin-top: 0px; border-bottom: 1px solid rgb(245,245,245); } +ul.odd{ + background-color: #F5F5F5; +} +ul.even{ + background-color: #F6F7F8; +} .d-g-blue{ color: rgb(17, 102, 173) !important; @@ -198,6 +204,7 @@ ul.d-p-projectlist{ margin-top: 0px; } + /* p.layout-1 { margin-top: -8px;