|
|
|
@ -111,34 +111,25 @@
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
<% find_miracle_course(10, 7).map do |project| %>
|
|
|
|
|
<li style="background-image:none;">
|
|
|
|
|
<li style="position:relative;height:5em;" class='<%= cycle("odd", "even") %>'>
|
|
|
|
|
<div style="float: left;">
|
|
|
|
|
<% if get_avatar?(project)%>
|
|
|
|
|
<%= image_tag(url_to_avatar(project), :class => "avatar-4") %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= image_tag('../images/avatars/Project/course.jpg', :class => "avatar-4") %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="float: left; margin-left: 10px; width: 360px;">
|
|
|
|
|
<p class="layout">
|
|
|
|
|
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}", :target => "_blank" )%>
|
|
|
|
|
<span style="cursor: pointer; display: inline-block; float: right; color: #ec6300; white-space: nowrap;">学生人数:<%= link_to "#{studentCount(project)}", project_member_path(project, :role => 2) ,:course =>'1', :target => "_blank" %></span>
|
|
|
|
|
|
|
|
|
|
<div id='join_in_course' style='margin: 0px 4px;display:inline-block;float:right;color:#ff4800;'>
|
|
|
|
|
<%if User.current.logged? && !(course_timeout? project)%>
|
|
|
|
|
<%= join_in_course(project, User.current) unless project.course_extra.teacher.id == User.current.id %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="layout-1" >
|
|
|
|
|
<%= content_tag "div", " ".html_safe<<project.course_extra.time.to_s<<project.course_extra.term.to_s, :class => "d-p-project-intro", :style => 'display:inline-block; position:relative;float:right;color:#ff4800;' %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<%= content_tag "span", " ".html_safe+project.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => project.description.to_s %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 上左下右 -->
|
|
|
|
|
<div style="float: left; margin-left: 10px; width: 380px;">
|
|
|
|
|
<span>[<%= get_course_term project %>]</span>
|
|
|
|
|
<%#= 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' %>)
|
|
|
|
|
</div>
|
|
|
|
|
<div style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
|
|
|
|
<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 ;">
|
|
|
|
|
<%= join_in_course(project, User.current)%>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end; reset_cycle %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|