trustieforge/app/views/projects/_course.html.erb

93 lines
3.5 KiB
Plaintext
Raw Normal View History

2013-11-05 20:46:38 +08:00
<div class="project-block">
<div class="img-tag-2">
<% if get_avatar?(project)%>
<%= image_tag(url_to_avatar(project), :class => "avatar2") %>
<% else %>
<%= image_tag('../images/avatars/Project/course.jpg', :class => "avatar2") %>
<% end %>
</div>
<div class="wiki-description">
<p >
<%= content_tag('span',"#{l(:label_bid_show_course_name)}:", :class => "course-font")%>
<%= content_tag('span', link_to("#{@project.name}", project_path(@project), :class => "info"))%>
</p>
<p >
<%= content_tag('span', "#{l(:label_institution_name)}:", :class => "course-font")%>
2013-11-08 08:57:48 +08:00
<% @admin = @project.project_infos%>
2013-11-05 20:46:38 +08:00
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
2014-04-23 21:20:03 +08:00
<!-- <%= @admin.first.user.user_extensions.occupation %> -->
<%# unless @project.course_extra.school.nil? %>
<%= @project.course_extra.teacher.user_extensions.school.try(:name) %>
<%# end %>
2013-11-05 20:46:38 +08:00
<% end %>
</p>
<p >
<%= content_tag('div', "#{l(:field_teacher_name)}:", :class => "info course-font teacher") %>
<% if @admin.size > 0 %>
<%= content_tag('a', @admin.collect{|u| link_to(u.user.lastname+u.user.firstname, user_path(u.user_id))}.join(", ").html_safe) %>
<% end %>
</p>
</div>
<div class="information_for_course" >
<p class="stats">
<%= content_tag('span', link_to("#{@project.homeworks.count}", homework_project_path(@project)), :class => "info") %>
<%= content_tag('span', l(:label_x_task, :count => @project.homeworks.count)) %>
</p>
<p class="stats">
<% files_count = @project.attachments.count %>
<% @project.versions.each do |version| %>
<% files_count += version.attachments.count %>
<% end %>
<%= content_tag('span', link_to(files_count, project_files_path(@project)), :class => "info") %>
2013-11-05 20:46:38 +08:00
<%= content_tag('span', l(:label_x_data,:count => files_count)) %>
</p>
<p class="stats">
<%= content_tag('span', "#{garble @project.members.count}", :class => "info") %>
2013-11-05 20:46:38 +08:00
<%= content_tag('span', l(:label_x_member, :count => @project.members.count)) %>
</p>
2014-04-24 09:13:06 +08:00
<!--gcm-->
<p class="stats">
2014-04-28 09:53:22 +08:00
<%= content_tag('span', link_to("#{@project_activity_count[@project.id]}", project_path(@project)), :class => "info") %>
2014-04-24 09:13:06 +08:00
<%= content_tag('span', l(:label_x_activity, :count => @project_activity_count[@project.id])) %>
</p>
<!--gcm-->
2013-11-06 10:28:18 +08:00
<div class="buttons_for_course" style="margin-top:30px;margin-left:144px">
2013-11-05 20:46:38 +08:00
<span class="info"></span>
2014-04-12 09:40:26 +08:00
<% if @project.project_type==Project::ProjectType_course %>
2014-03-20 15:13:25 +08:00
<% if(course_endTime_timeout? @project) %>
2014-03-07 11:28:52 +08:00
<span class="font_lighter">
课程学期已结束
</span>
<% else %>
<%= join_in_course_for_list(@project, User.current,['regular'])%>
2014-03-07 11:28:52 +08:00
<% end -%>
2014-04-12 09:40:26 +08:00
<% end %>
2013-11-05 20:46:38 +08:00
</div>
</div>
</div>
<div class="add-info">
<div class="main-language" style="margin-left: 30px;margin-top:-10px">
<%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%>
<%= get_course_term @project %>
2013-11-05 20:46:38 +08:00
</div>
</div>
<div class="add-info" style="margin-left: 30px; margin-top: -20px">
<%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %>
<%= content_tag "div", project.short_description, :class => "brief_introduction", :title => project.short_description %>
</div>
<div class="tags">
<div id="tags">
<%= image_tag( "/images/sidebar/tags.png") %>
<%= render :partial => 'tags/tag_name', :locals => {:obj => @project,:object_flag => "2",:non_list_all => true }%>
</div>
</div>