<!-- added by bai -->

<h3 class="title"><%= l(:label_user_score) %></h3>
<div class="inf_user_image">
  <table style="border-bottom: solid 1px #80a6d2;" width="100%">
    <tr>
      <td align="left" valign="middle" ><%= image_tag(url_to_avatar(@user), :class => 'avatar2',:style=>'max-width:150px;max-height:150px;') %></td>
      <td width="35%">
        <table>
          <tr class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><td><%= h @user.name %></td></tr>
          <tr class="info_font" align="left" style=" word-wrap: break-word; word-break: break-all"><td><%= @user.user_extensions.show_identity %></td></tr>
        </table>
      </td>
      <td>
        <table>
          <tr class="info_font"><td><%= l(:label_user_score) %></td></tr>                                                               <!--@user.user_score_attr.total_score -->
          <% option_num = get_option_number(@user,1)  %>
          <tr class="buttons_for_score" style="margin-top:30px;margin-left:144px"><td><span style="color:#ec6300"><%= format("%.2f" , option_num.total_score).to_i %></span></td></tr>
        </table>
      </td>
    </tr>


  </table>

  <script type="text/javascript">
      function show_div(url)
      {
          if(url == 'topic_new_score_index')
          {
              $('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/topic_new_score_index', :locals => {:index =>0,:option_num => option_num}) %>');
          }
          else if(url == 'score_new_index')
          {
              $('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/score_new_index', :locals => {:index =>0,:option_num => option_num}) %>');
          }
          else if(url == 'project_new_score_index')
          {
              $('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/project_new_score_index', :locals => {:index =>0,:option_num => option_num}) %>');
          }
          else if(url == 'activity_new_score_index')
          {
              $('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/activity_new_score_index', :locals => {:index =>0,:option_num => option_num}) %>');
          }
          else if(url == 'influence_new_score_index')
          {
              $('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/influence_new_score_index', :locals => {:index =>0,:option_num => option_num}) %>');
          }
      }
  </script>

  <ul style="border-bottom: solid 0px #80a6d2;" width="100%">
    <li>                                                                     <!--  {:controller => 'users', :action => 'score_new_index', :remote => true} -->
      <%= link_to l(:label_user_score) ,"javascript:void(0)", :onclick => "show_div('score_new_index')" %> :
      <%= format("%.2f" , option_num.total_score).to_i %>
    </li>
    <li>                                                               <!-- {:controller => 'users',:action => 'topic_new_score_index', :remote => true,:option_num => option_num} -->
      <%= link_to l(:label_user_score_of_collaboration), "javascript:void(0)", :onclick => "show_div('topic_new_score_index')" %> :
      <%= format("%.2f" , collaboration(option_num)).to_i %>
    </li>
    <li>
      <%= link_to l(:label_user_score_of_influence),"javascript:void(0)", :onclick => "show_div('project_new_score_index')" %> :
      <%= format("%.2f" ,  influence(option_num)).to_i %>
    </li>
    <li>
      <%= link_to l(:label_user_score_of_skill),"javascript:void(0)", :onclick => "show_div('activity_new_score_index')" %> :
      <%= format("%.2f" , skill(option_num)).to_i %>
    </li>
    <li>
      <%= link_to l(:label_user_score_of_active), "javascript:void(0)", :onclick => "show_div('influence_new_score_index')" %> ：
      <%= format("%.2f" , project_active(option_num)).to_i %>
    </li>
  </ul>

</div>

<div id="show_score_detail" style="padding-left: 6px">
  <%= render :partial => 'users/score_new_index', :locals => {:index => 0,:option_num => option_num } %>
</div>
