socialforge/app/views/projects/_project.html.erb

51 lines
1.9 KiB
Plaintext

<!--Added by nie-->
<div class="project-block">
<div class="img-tag">
<%= image_tag(url_to_avatar(project), :class => "avatar2") %>
</div>
<div class="wiki-description">
<p>
<%= textilizable(project.short_description, :project => project) %>
</p>
</div>
<div class="information">
<p class="stats">
<%= content_tag('span', @project.watcher_users.count, :class => "info") %><%= content_tag('span', l(:label_follow_people)) %>
</p>
<p class="stats">
<%= content_tag('span', "#{@project.users.count}", :class => "info") %><%= content_tag('span', l(:label_current_contributors)) %>
</p>
<p class="stats">
<%= 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)) %>
</p>
<p class="stats">
<%= content_tag('span', "#{@project.repository.nil? ? '0' : @project.repository.changesets.count }", :class => "info") %><%= 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.project_infos%>
<% if @admin.size > 0 %>
<%= content_tag('a', @admin.collect{|u| link_to(u.user.name, user_path(u.user_id))}.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">
<%= image_tag( "/images/sidebar/tags.png") %>
<%= render :partial => 'tags/tag_name', :locals => {:obj => @project,:object_flag => "2",:non_list_all => true }%>
</div>
</div>