...
This commit is contained in:
parent
dba674dfec
commit
35d1c33a29
|
@ -846,7 +846,8 @@ class ProjectsController < ApplicationController
|
||||||
def select_project_layout
|
def select_project_layout
|
||||||
project = Project.find_by_id(params[:id])
|
project = Project.find_by_id(params[:id])
|
||||||
project ||= @project
|
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
|
end
|
||||||
|
|
||||||
# Validates parent_id param according to user's permissions
|
# Validates parent_id param according to user's permissions
|
||||||
|
|
|
@ -6,10 +6,48 @@
|
||||||
#select_option << ['教师', 'users_teacher'],
|
#select_option << ['教师', 'users_teacher'],
|
||||||
#select_option << ['学生', 'users_student']
|
#select_option << ['学生', 'users_student']
|
||||||
%>
|
%>
|
||||||
|
<style type="text/css">
|
||||||
|
form #q, form #search_type{
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 5px;
|
||||||
|
height: 33px;
|
||||||
|
}
|
||||||
|
form #q{
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-bottom-left-radius: 5px;
|
||||||
|
border-right: none;
|
||||||
|
|
||||||
|
}
|
||||||
|
form #search_type{
|
||||||
|
color: #363739;
|
||||||
|
border-top-right-radius: 5px;
|
||||||
|
border-bottom-right-radius: 5px;
|
||||||
|
border-left: 1px outset #83A9A9;
|
||||||
|
margin-left: -4px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
text-indent: 0.01px;
|
||||||
|
text-overflow: '';
|
||||||
|
}
|
||||||
|
.search_widget{
|
||||||
|
display:inline-block;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.search_widget:hover{
|
||||||
|
box-shadow: 0px 0px 3px #56B4EF;
|
||||||
|
}
|
||||||
|
<%#完了把上面东西放到 .css 里%>
|
||||||
|
</style>
|
||||||
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
|
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
|
||||||
<div class="project-search" style="float: right">
|
<div class="project-search" style="float: right">
|
||||||
|
<div class='search_widget'>
|
||||||
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
|
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
|
||||||
<%= select_tag(:search_type, options_for_select(select_option) ) %>
|
<%= select_tag(:search_type, options_for_select(select_option) ) %>
|
||||||
|
</div>
|
||||||
<%#= hidden_field_tag 'project_type', project_type %>
|
<%#= hidden_field_tag 'project_type', project_type %>
|
||||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -111,23 +111,32 @@
|
||||||
<div class="d-p-projectlist-box">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<% find_miracle_course(10, 7).map do |project| %>
|
<% find_miracle_course(10, 7).map do |project| %>
|
||||||
<li style="position:relative;height:5em;" class='<%= cycle("odd", "even") %>'>
|
<li style="position:relative; height:5em;" class='<%= cycle("odd", "even") %>' title=<%=project.description.to_s%>>
|
||||||
<div style="float: left;">
|
<div style="float: left; height: 100%;">
|
||||||
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
||||||
</div>
|
</div>
|
||||||
<!-- 上左下右 -->
|
<!-- 上左下右 -->
|
||||||
<div style="float: left; margin-left: 10px; width: 380px;">
|
<div class='desc_item' style="" >
|
||||||
<span>[<%= get_course_term project %>]</span>
|
[<%= 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( 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' %>)
|
(<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
<div class='desc_item' style="">
|
||||||
<span class='font_lighter' title =<%=project.description.to_s%>><%=project.description.truncate(25, omission: '...')%></span>
|
<span class='font_bolder'>
|
||||||
|
<%=l :label_main_teacher%>: <%=Course.find_by_extra(project.identifier).try(:teacher).try(:name)%>
|
||||||
|
</span>
|
||||||
|
<span class='font_italic'>
|
||||||
|
<%= Course.find_by_extra(project.identifier).teacher.user_extensions.occupation %>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class='desc_item' style="">
|
||||||
|
<span class='font_lighter' title=<%#=project.description.to_s%>><%#=project.description.truncate(25, omission: '...')%></span>
|
||||||
|
</div> -->
|
||||||
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
||||||
<% if !course_endTime_timeout?(project)%>
|
<% if !course_endTime_timeout?(project)%>
|
||||||
|
<div >
|
||||||
<%= join_in_course(project, User.current)%>
|
<%= join_in_course(project, User.current)%>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -136,7 +145,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject hidden" style="float: right;">
|
||||||
|
|
||||||
<div class="web_status">
|
<div class="web_status">
|
||||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>当前网站状态</strong></h3>
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>当前网站状态</strong></h3>
|
||||||
|
@ -156,13 +165,13 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div style="text-align: right; padding-right: 20px">
|
<div class='hidden' style="text-align: right; padding-right: 20px">
|
||||||
<%= link_to "意见反馈" , suggestion_send_path, {:class => 'orangeButton', :style => "color: #EEEEEE" }%>
|
<%= link_to "意见反馈" , suggestion_send_path, {:class => 'orangeButton', :style => "color: #EEEEEE" }%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="margin-top: 20px; float: right;">
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||||
<h3 style="padding-bottom:5px ;margin-left: 5px; color: #e8770d;">
|
<h3 style="padding-bottom:px ;margin-left: 5px; color: #e8770d;">
|
||||||
<strong>问题和反馈动态</strong>
|
<strong>问题和反馈动态</strong>
|
||||||
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :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" }%>
|
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||||
|
@ -170,8 +179,8 @@
|
||||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||||
<div class="d-p-projectlist-box">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<% find_new_forum_topics(11).each do |topic|%>
|
<% find_new_forum_topics(10).each do |topic|%>
|
||||||
<li class="message-brief-intro" style="min-height: 20px;padding-bottom:3px; line-height:1.27em; ">
|
<li class="message-brief-intro" style="min-height: 65px; line-height:2em; ">
|
||||||
<div style="display: inline-block; width: 100%;">
|
<div style="display: inline-block; width: 100%;">
|
||||||
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||||
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
|
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
|
||||||
|
|
|
@ -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( 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' %>)
|
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
||||||
<span class='font_lighter' title =<%=project.description.to_s%>><%=project.description.truncate(50, omission: '...')%></span>
|
<span class='font_lighter' title =<%=project.description.to_s%>><%=project.description.truncate(50, omission: '...')%></span>
|
||||||
</div>
|
</div>
|
||||||
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
||||||
|
@ -157,15 +157,17 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right" style="float: right; min-height: 470px; width: 48%; ">
|
<div class="right" style="float: right; width: 48%; ">
|
||||||
<ul class="welcome-message-list">
|
<ul class="welcome-message-list">
|
||||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||||
<h3 style="color: rgb(21, 188, 207);"><strong>贴吧动态</strong></h3>
|
<h3 style="color: rgb(21, 188, 207);">
|
||||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
<strong>贴吧动态</strong>
|
||||||
|
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%></h3>
|
||||||
|
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="welcome-box-list-new">
|
<div class="welcome-box-list-new">
|
||||||
<% find_new_forum_topics(8).each do |topic|%>
|
<% find_new_forum_topics(7).each do |topic|%>
|
||||||
<li class="message-brief-intro" style="min-height: 25px;padding-bottom:3px;">
|
<li class="message-brief-intro" style="line-height: 1.63em;padding-bottom:3px;">
|
||||||
<div style="display: inline-block; width: 100%;">
|
<div style="display: inline-block; width: 100%;">
|
||||||
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||||
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %>
|
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %>
|
||||||
|
|
|
@ -606,7 +606,7 @@ ul.tool li{list-style-type:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.font_welcome_trustie{
|
.font_welcome_trustie{
|
||||||
font-family:Impact, '微软雅黑';
|
font-family: Tahoma,"Microsoft YaHei";
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color:#15bccf;
|
color:#15bccf;
|
||||||
|
|
|
@ -5,6 +5,21 @@
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-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_center{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,14 @@ ul.even{
|
||||||
ul.d-p-projectlist{
|
ul.d-p-projectlist{
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
|
.d-p-projectlist li .desc_item{
|
||||||
|
float: left;
|
||||||
|
display: inline-block;
|
||||||
|
/*margin: 2px;*/
|
||||||
|
line-height: 2em;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: 380px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue