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

59 lines
2.5 KiB
Plaintext

<div class="project-block">
<div class="img-tag">
<%= tag('img', {:src => '../images/logo-only_med.png', :class => 'img_ta'}, false, false) %>
</div>
<div class="wiki-description">
<p>
<span>Claimed by </span><%= content_tag('a', project.name) %> | <span>Analyzed about 11 hours ago</span>
</p>
<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 class="reviews">
<%= content_tag('a', tag('img', {:src => '../images/pai.png', :class => 'img-ta'}, false, false), :class => 'img-tag3') %>
<%= content_tag('div', "Vert High Activity", :class => 'img-tag4') %>
<%= content_tag('div', tag('img', {:src => '../images/stars_ro.png', :class => 'img-ta'}, false, false), :class => 'img-tag2') %>
<%= content_tag('div', "#{WatchersOfProjects.watcher_count(project)}Reviews", :class => 'img-tag1') %>
</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">
<%= tag('img', {:src => "../images/user.png"}, false, false) %>
<%= render :partial => 'layouts/tag_name', :locals => {:obj => @project,:object_flag => "2",:non_list_all => true }%>
</div>
</div>