socialforge/app/views/layouts/_base_project_top.html.erb

46 lines
2.7 KiB
Plaintext

<div class="sy_class_infobox mb10 clear">
<div class="sy_class_logo fl">
<div class="pr" style="width: 110px; height:110px;">
<% if User.current.logged? && (User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) || User.current.admin?) %>
<%=link_to image_tag(url_to_avatar(@project), width:"110", height: "110", :id => 'nh_source_tx'), my_clear_user_avatar_temp_path(:course => @project.id), :remote => true%>
<div class="homepageEditProfile undis">
<%=link_to '', my_clear_user_avatar_temp_path(:project => @project.id), :class => 'homepageEditProfileIcon', :title => '点击编辑头像', :remote => true %>
</div>
<% else %>
<%= image_tag(url_to_avatar(@project), :width => "110", :height => "110", :alt => "项目logo") %>
<% end %>
</div>
</div>
<%# 更新访问数,刷新的时候更新访问次数 %>
<% update_visiti_count @project %>
<div class="sy_class_id fl"><p><%= l(:label_project_ivite_code)%><br /><span class="sy_corange"><%= (User.current.member_of?(@project) || User.current.admin?) ? @project.invite_code : "******" %></span></p></div>
<div class="sy_class_info fl ml15">
<div class="sy_class_titbox clear">
<h3 class="fl sy_class_title">
<a href="javascript:void(0);"class="mr5 c_dark"><%= @project.creater %></a>/
<a href="javascript:void(0);"class=" ml5 c_dark"><%= @project.name %></a>
</h3>
<span class="sy_new_orange fl ml10 mt5"><%= @project.is_public? ? l(:label_public) : l(:label_private) %></span>
</div>
<p class="sy_cgrey">
<span class=" mr15">项目评分:
<% if @project.project_type == 0 %>
<%# unless static_project_score(@project.project_score) == 0 %>
<%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i,
{:controller => 'projects',
:action => 'show_projects_score',
:remote => true,
:id => @project.id}, :class => "sy_cblue" ) %>
<%# end %>
<% end %>
</span>
<span class=" mr15">浏览:<a class="sy_corange"><%= @project.visits.to_i %></a></span>
<span class=" mr15">关注:<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'sy_corange' %></span>
<span class=" mr15">成员:<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'sy_corange', :id => 'project_members_number' %></span>
</p>
<div class="mt15 clear" id="join_exit_project_div">
<%= render 'layouts/join_exit_project' %>
</div>
</div>
<div class="cl"></div>
</div>