socialforge/app/views/courses/_course.html.erb

88 lines
3.4 KiB
Plaintext

<div class="project-block">
<div class="img-tag-2">
<% if get_avatar?(course)%>
<%= image_tag(url_to_avatar(course), :class => "avatar2") %>
<% else %>
<%= image_tag('../images/avatars/course/course.jpg', :class => "avatar2") %>
<% end %>
</div>
<div class="wiki-description">
<p >
<%= content_tag('span',"#{l(:label_bid_show_course_name)}:", :class => "course-font")%>
<% unless @course.is_public == 1 %>
<span class='private_project'>
<%= l(:label_private) %>
</span>
<% end %>
<%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info #{User.current.member_of_course?(@course) ? 'my-project' : nil}"))%>
</p>
<p >
<%= content_tag('span', "#{l(:label_institution_name)}:", :class => "course-font")%>
<% @admin = @course.course_infos%>
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
<% unless @course.teacher.user_extensions.school.nil? %>
<%= link_to(@course.school.try(:name), school_course_list_path(@course.school)) if @course.school %>
<% end %>
<% 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>
<p>
<%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%>
<%= get_course_term @course %>
</p>
<p>
<%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %>
</p>
<%= content_tag "div", course.short_description, :class => "brief_introduction",:style=>'float:left;', :title => course.short_description %>
</div>
<div class="information_for_course" >
<p class="stats">
<%= content_tag('span', link_to("#{@course.homework_commons.count}", homework_common_index_path(:course => @course.id)), :class => "info") %>
<%= content_tag('span', l(:label_x_task, :count => @course.homework_commons.count)) %>
</p>
<p class="stats">
<% files_count = @course.attachments.count %>
<%= content_tag('span', link_to(files_count, course_files_path(@course)), :class => "info") %>
<%= content_tag('span', l(:label_x_data,:count => files_count)) %>
</p>
<p class="stats">
<%= content_tag('span', "#{garble @course.members.count}", :class => "info") %>
<%= content_tag('span', l(:label_x_member, :count => @course.members.count)) %>
</p>
<!--gcm-->
<p class="stats">
<%= content_tag('span', link_to("#{course_activity_count @course}", course_path(@course)), :class => "info") %>
<%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
</p>
<!--gcm-->
<div class="buttons_for_course" style="margin-top:30px;margin-left:144px">
<span class="info"></span>
<% if(course_endTime_timeout? @course) %>
<span class="font_lighter">
<%= l(:lable_course_end) %>
</span>
<% else %>
<%= join_in_course_for_list(@course, User.current,['regular'])%>
<% end -%>
</div>
</div>
</div>
<div class="tags">
<div id="tags">
<%= image_tag( "/images/sidebar/tags.png") %>
<%= render :partial => 'tags/tag_name', :locals => {:obj => @course,:object_flag => "9",:non_list_all => true }%>
</div>
</div>