2013-08-03 16:54:48 +08:00
|
|
|
|
<!--Added by nie-->
|
2013-08-01 10:33:49 +08:00
|
|
|
|
<div class="project-block">
|
|
|
|
|
<div class="img-tag">
|
2013-10-02 21:47:18 +08:00
|
|
|
|
<% if(@project.project_type==1)%>
|
2013-10-15 11:06:19 +08:00
|
|
|
|
<% if get_avatar?(project)%>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(project), :class => "avatar2"), project_path(project) %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to image_tag('../images/avatars/Project/course.jpg', :class => "avatar2"), project_path(project)%>
|
|
|
|
|
<% end %>
|
2013-10-02 21:47:18 +08:00
|
|
|
|
<% else %>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
<%= link_to image_tag(url_to_avatar(project), :class => "avatar2"), project_path(project) %>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="wiki-description">
|
|
|
|
|
<p>
|
|
|
|
|
<%= textilizable(project.short_description, :project => project) %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
|
2013-08-01 10:33:49 +08:00
|
|
|
|
<div class="information">
|
|
|
|
|
<p class="stats">
|
2013-10-15 17:10:37 +08:00
|
|
|
|
<strong><span style="font-size: 17px;margin-left: 145px"><%= link_to @project.watcher_users.count, project_watcherlist_path(project)%></span></strong>
|
|
|
|
|
<%= content_tag('span', l(:label_x_follow_people,:count =>@project.watcher_users.count)) %>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="stats">
|
2013-10-15 17:10:37 +08:00
|
|
|
|
<strong><span style="font-size: 17px;margin-left: 145px"><%= link_to "#{@project.members.count}", project_member_path(@project)%></span></strong>
|
|
|
|
|
<%= content_tag('span', l(:label_x_current_contributors, :count => @project.users.count)) %>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="stats">
|
2013-08-13 00:37:10 +08:00
|
|
|
|
<%= content_tag('span', "#{(@project.repository.nil? || @project.repository.changesets[0].nil?) ? '0' : distance_of_time_in_words(Time.now, @project.repository.changesets[0].committed_on)}", :class => "info") %><%= content_tag('span', l(:label_since_last_commits)) %>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="stats">
|
2013-09-23 16:42:19 +08:00
|
|
|
|
<%= content_tag('span', "#{@project.repository.nil? ? '0' : @project.project_status.changesets_count }", :class => "info") %><%= content_tag('span', l(:label_commit_on)) %>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<% if(@project.project_type==1)%>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wiki-description">
|
|
|
|
|
<p>
|
|
|
|
|
<%= textilizable(project.short_description, :project => project) %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
2013-10-15 11:06:19 +08:00
|
|
|
|
<div class="information"><!-- nyan -->
|
|
|
|
|
<!-- p class="stats">
|
2013-10-07 18:55:19 +08:00
|
|
|
|
<%= content_tag('span', @project.watcher_users.count, :class => "info") %><%= content_tag('span', l(:label_x_follow_people,:count =>@project.watcher_users.count)) %>
|
2013-10-15 11:06:19 +08:00
|
|
|
|
</p -->
|
2013-10-07 18:55:19 +08:00
|
|
|
|
<p class="stats">
|
2013-10-15 14:46:20 +08:00
|
|
|
|
<%= 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)) %>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="stats">
|
2013-10-15 14:46:20 +08:00
|
|
|
|
<%= content_tag('span', link_to("#{@project.members.count}", member_project_path(@project)), :class => "info") %><%= content_tag('span', l(:label_x_member, :count => @project.members.count)) %>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="stats">
|
|
|
|
|
<% files_count = @project.attachments.count %>
|
|
|
|
|
<% @project.versions.each do |version| %>
|
|
|
|
|
<% files_count += version.attachments.count %>
|
|
|
|
|
<% end %>
|
2013-10-15 14:46:20 +08:00
|
|
|
|
<%= content_tag('span', link_to(files_count, file_project_path(@project)), :class => "info") %><%= content_tag('span', l(:label_x_data,:count => files_count)) %>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
</p>
|
2013-10-09 16:04:23 +08:00
|
|
|
|
|
2013-10-07 18:55:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
2013-08-01 10:33:49 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="add-info">
|
|
|
|
|
<div class="main-language">
|
2013-10-15 09:39:42 +08:00
|
|
|
|
<!-- added by huang -->
|
2013-10-07 18:55:19 +08:00
|
|
|
|
<% if(@project.project_type==1)%>
|
|
|
|
|
<%= content_tag('span', "#{l(:field_tea_name)}: ") %>
|
2013-09-12 10:41:15 +08:00
|
|
|
|
<% else %>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
<%= content_tag('span', "#{l(:default_role_manager)}: ") %>
|
|
|
|
|
<% end %>
|
2013-09-12 10:41:15 +08:00
|
|
|
|
<!-- end -->
|
|
|
|
|
<!-- <%= content_tag('span', "#{l(:default_role_manager)}: ") %> -->
|
2013-08-12 17:11:41 +08:00
|
|
|
|
<% @admin = @project.project_infos%>
|
|
|
|
|
<% if @admin.size > 0 %>
|
2013-10-09 16:04:23 +08:00
|
|
|
|
<%= content_tag('a', @admin.collect{|u| link_to(u.user.lastname+u.user.firstname, user_path(u.user_id))}.join(", ").html_safe) %>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
<% end %>
|
2013-10-02 21:47:18 +08:00
|
|
|
|
<% if(@project.project_type==1)%>
|
2013-10-10 17:06:46 +08:00
|
|
|
|
<%= l(:label_course_college) %>:
|
2013-10-10 10:22:32 +08:00
|
|
|
|
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
|
|
|
|
|
<%= @admin.first.user.user_extensions.occupation %>
|
|
|
|
|
<% end %>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
<% end %>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="licences">
|
|
|
|
|
<%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
|
|
|
|
|
</div>
|
2013-10-21 09:42:09 +08:00
|
|
|
|
<div class="grade">
|
2013-10-21 21:16:41 +08:00
|
|
|
|
<% if @project.project_type !=1 %>
|
2013-10-21 09:42:09 +08:00
|
|
|
|
<%= content_tag('span', "#{l(:label_project_grade)}: ")%><span style='color:red'><%= @project.project_status.grade%></span>
|
2013-10-21 21:16:41 +08:00
|
|
|
|
<% end %>
|
2013-10-21 09:42:09 +08:00
|
|
|
|
</div>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
<!-- added by liuping -->
|
2013-10-15 11:06:19 +08:00
|
|
|
|
|
2013-10-15 09:39:42 +08:00
|
|
|
|
|
2013-10-09 16:04:23 +08:00
|
|
|
|
</span>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tags">
|
|
|
|
|
<!-- added by william -for tag -->
|
|
|
|
|
<div id="tags">
|
2013-10-07 18:55:19 +08:00
|
|
|
|
|
2013-08-13 10:43:52 +08:00
|
|
|
|
<%= image_tag( "/images/sidebar/tags.png") %>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
|
2013-08-12 20:18:10 +08:00
|
|
|
|
<%= render :partial => 'tags/tag_name', :locals => {:obj => @project,:object_flag => "2",:non_list_all => true }%>
|
2013-10-07 18:55:19 +08:00
|
|
|
|
|
2013-08-01 10:33:49 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|