diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index db47319e..9076bb50 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -846,7 +846,8 @@ class ProjectsController < ApplicationController
def select_project_layout
project = Project.find_by_id(params[:id])
project ||= @project
- (project.project_type == Project::ProjectType_project) ? 'base_projects' : 'base_courses'
+ project ||= @course
+ (project.try(:project_type) == Project::ProjectType_project) ? 'base_projects' : 'base_courses'
end
# Validates parent_id param according to user's permissions
diff --git a/app/views/welcome/_search_project.html.erb b/app/views/welcome/_search_project.html.erb
index ca7d151e..c139be6f 100644
--- a/app/views/welcome/_search_project.html.erb
+++ b/app/views/welcome/_search_project.html.erb
@@ -6,10 +6,48 @@
#select_option << ['教师', 'users_teacher'],
#select_option << ['学生', 'users_student']
%>
+
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
+
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
<%= select_tag(:search_type, options_for_select(select_option) ) %>
+
<%#= hidden_field_tag 'project_type', project_type %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb
index a4bdd622..be6b09d0 100644
--- a/app/views/welcome/course.html.erb
+++ b/app/views/welcome/course.html.erb
@@ -111,23 +111,32 @@
<% find_miracle_course(10, 7).map do |project| %>
- -
-
+
- >
+
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
-
-
[<%= get_course_term project %>]
- <%#= join_in_course(project, User.current) %>
+
+ [<%= get_course_term project %>]
<%= 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: '...')%>
+
+
+ <%=l :label_main_teacher%>: <%=Course.find_by_extra(project.identifier).try(:teacher).try(:name)%>
+
+
+ <%= Course.find_by_extra(project.identifier).teacher.user_extensions.occupation %>
+
+
<% if !course_endTime_timeout?(project)%>
+
<%= join_in_course(project, User.current)%>
+
<% end %>
@@ -136,7 +145,7 @@
-
+
当前网站状态
@@ -156,13 +165,13 @@
-
+
<%= link_to "意见反馈" , suggestion_send_path, {:class => 'orangeButton', :style => "color: #EEEEEE" }%>
-
-
+
+
问题和反馈动态
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
@@ -170,8 +179,8 @@
<%= link_to "更多>>", forums_path %>
- <% find_new_forum_topics(11).each do |topic|%>
- -
+ <% find_new_forum_topics(10).each do |topic|%>
+
-
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index 1bba0e25..81da358b 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -119,7 +119,7 @@
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
-
+
><%=project.description.truncate(50, omission: '...')%>
@@ -157,15 +157,17 @@
-
+
-
贴吧动态
- <%= link_to "更多>>", forums_path %>
+
+ 贴吧动态
+ <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
+ <%= link_to "更多>>", forums_path %>
- <% find_new_forum_topics(8).each do |topic|%>
-
-
+ <% find_new_forum_topics(7).each do |topic|%>
+
-
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 8306155d..e6031684 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -606,7 +606,7 @@ ul.tool li{list-style-type:none;
}
.font_welcome_trustie{
- font-family:Impact, '微软雅黑';
+ font-family: Tahoma,"Microsoft YaHei";
font-weight: bold;
font-size: 18px;
color:#15bccf;
diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css
index 6e62c1fe..7fefa1a6 100644
--- a/public/stylesheets/nyan.css
+++ b/public/stylesheets/nyan.css
@@ -5,6 +5,21 @@
-moz-box-sizing: border-box;
-box-sizing: border-box;
}
+/*文字不换行*/
+.text_nowrap{
+ word-break:keep-all;
+ white-space:nowrap;
+ overflow:hidden;
+ text-overflow:ellipsis;
+}
+/*字体 斜体*/
+.font_italic{
+ font-style: italic;
+}
+/*字体加粗*/
+.font_bolder{
+ font-weight: bolder;
+}
.text_center{
text-align: center;
}
diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css
index b1fe6707..b616fd59 100644
--- a/public/stylesheets/welcome.css
+++ b/public/stylesheets/welcome.css
@@ -203,6 +203,14 @@ ul.even{
ul.d-p-projectlist{
margin-top: 0px;
}
+.d-p-projectlist li .desc_item{
+ float: left;
+ display: inline-block;
+ /*margin: 2px;*/
+ line-height: 2em;
+ margin-left: 10px;
+ width: 380px;
+}
/*