<!-- added by bai -->

<h3 class="title"><%= l(:label_projects_score) %></h3>
<div class="inf_user_image">
<table style="border-bottom: solid 1px #80a6d2;" width="100%">
	<tr>
		<td class="pr_info_logo fl mr10 mb5"><%= image_tag(url_to_avatar(@project), :width => "60", :height => "60") %></td>
	    <td>
	    	<table>
	    		<tr class="info_font" align="center" ><td class="problem_tit fl fb"><%= @project.name %></td>
	    	    </tr>
	    	</table>
	    </td>
	    <td width="35%">
	    	<table>
	    		<tr class="info_font" style="color: #64BDD9;font-size: 14px;font-weight: bold"><td><%= l(:label_projects_score) %></td></tr>
	    		<tr class="buttons_for_score" style="margin-top:30px;margin-left:144px"><td><span style="color:#ec6300"><%= format("%.2f" , project_scores(@project) ).to_i %></span></td></tr>
	    	</table>
	    </td>
	</tr>
</table>
</div>

<script type="text/javascript">
    function show_div(url)
    {
        if(url == 'project_score_index')
        {
            $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/project_score_index', :locals => {:project => @project}) %>');
        }
        else if(url == 'issue_score_index')
        {
            $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/issue_score_index', :locals => {:project => @project}) %>');
        }
        else if(url == 'news_score_index')
        {
            $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/news_score_index', :locals => {:project => @project}) %>');
        }
        else if(url == 'file_score_index')
        {
            $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/file_score_index', :locals => {:project => @project}) %>');
        }
        else if(url == 'code_submit_score_index')
        {
            $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/code_submit_score_index', :locals => {:project => @project}) %>');
        }
        else if(url == 'projects_topic_score_index')
        {
            $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/projects_topic_score_index', :locals => {:project => @project}) %>');
        }
    }
</script>

<div class="tabs_new">
	<ul>
		<li>
			<%= link_to l(:label_projects_score),"javascript:void(0)", :onclick => "show_div('project_score_index')"%> :
			<%= format("%.2f" , project_scores(@project) ).to_i %>
		</li>
		<li>
			<%= link_to l(:label_issue_score), "javascript:void(0)", :onclick => "show_div('issue_score_index')"%> :
			<%= format("%.2f" , issue_score(@project)).to_i %>
		</li>
		<li>
			<%= link_to l(:label_news_score),  "javascript:void(0)", :onclick => "show_div('news_score_index')"%> :
			<%= format("%.2f" , news_score(@project)).to_i %>
		</li>
		<li>
			<%= link_to l(:label_file_score),  "javascript:void(0)", :onclick => "show_div('file_score_index')"%> :
			<%= format("%.2f" , documents_score(@project)).to_i %>
		</li>
		<li>
			<%= link_to l(:label_code_submit_score), "javascript:void(0)", :onclick => "show_div('code_submit_score_index')" %> :
			<%= format("%.2f" , changesets_score(@project)).to_i %>
		</li>
		<li>
			<%= link_to l(:label_topic_score),  "javascript:void(0)", :onclick => "show_div('projects_topic_score_index')"%> :
			<%= format("%.2f" , board_message_score(@project)).to_i %>
		</li>
	</ul>
</div>
<div id="show_score_detail">
	<%= render :partial => 'projects/project_score_index', :locals => {:project => @project } %>
</div>
<!-- end -->