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-08-03 16:54:48 +08:00
|
|
|
<%= image_tag(url_to_avatar(project), :class => "avatar2") %>
|
2013-08-01 10:33:49 +08:00
|
|
|
</div>
|
|
|
|
<div class="wiki-description">
|
|
|
|
<p>
|
|
|
|
<%= textilizable(project.short_description, :project => project) %>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="information">
|
|
|
|
<p class="stats">
|
|
|
|
<%= content_tag('a', @project.watcher_users.count) %><%= content_tag('span', l(:label_follow_people)) %>
|
|
|
|
</p>
|
|
|
|
<p class="stats">
|
|
|
|
<%= content_tag('a', "#{@project.users.count}") %><%= content_tag('span', l(:label_current_contributors)) %>
|
|
|
|
</p>
|
|
|
|
<p class="stats">
|
|
|
|
<%= content_tag('a', "#{(@project.repository.nil? || @project.repository.changesets[0].nil?) ? '0' : distance_of_time_in_words(Time.now, @project.repository.changesets[0].committed_on)}") %><%= content_tag('span', l(:label_since_last_commits)) %>
|
|
|
|
</p>
|
|
|
|
<p class="stats">
|
|
|
|
<%= content_tag('a', "#{@project.repository.nil? ? '0' : @project.repository.changesets.count }") %><%= content_tag('span', l(:label_commit_on)) %>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="add-info">
|
|
|
|
<div class="main-language">
|
|
|
|
<%= content_tag('span', "#{l(:default_role_manager)}: ") %>
|
|
|
|
<% @admin = @project.users_by_role[Role.find(3)]%>
|
|
|
|
<% unless @admin.nil?%>
|
|
|
|
<%= content_tag('a', @admin.sort.collect{|u| link_to_user u}.join(", ").html_safe) %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="licences">
|
|
|
|
<%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
|
|
|
|
</div>
|
|
|
|
<!-- added by liuping -->
|
|
|
|
<% unless User.current.member_of?(@project) %>
|
|
|
|
<%= watcher_link(@project, User.current) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="tags">
|
|
|
|
<!-- added by william -for tag -->
|
|
|
|
<div id="tags">
|
2013-08-03 16:54:48 +08:00
|
|
|
<%= tag('img', {:src => "/images/sidebar/tags.png"}, false, false) %>
|
2013-08-01 10:33:49 +08:00
|
|
|
<%= render :partial => 'layouts/tag_name', :locals => {:obj => @project,:object_flag => "2",:non_list_all => true }%>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|