Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
a4441bca37
|
@ -75,3 +75,9 @@ bundle exec rake db:migrate:up version=20140725062302
|
|||
kw: Mysql2::Error,存储过程,CALL sp_project_status_cursor();
|
||||
bundle exec rake db:migrate:down version=20130828004955
|
||||
bundle exec rake db:migrate:up version=20130828004955
|
||||
|
||||
=================================[2014-08-13]====================================
|
||||
kw:配置支持的图片格式
|
||||
默认支持如下格式:"bmp,jpeg,jpg,png,gif"
|
||||
可在configuration.yml中修改,格式:pic_types: "bmp,jpeg,jpg,png,gif"(注意:pic_types若前面有#号需去掉)
|
||||
配置完成后重启服务
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
|
||||
<div class="autoscroll">
|
||||
<table class="list">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<%= sort_header_tag('login', :caption => l(:field_login)) %>
|
||||
|
@ -37,20 +37,20 @@
|
|||
<%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
|
||||
<%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
|
||||
<%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
|
||||
<th></th>
|
||||
<th style="width: 100px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% for user in @users -%>
|
||||
<tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>">
|
||||
<td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
|
||||
<td class="firstname"><%= h(user.firstname) %></td>
|
||||
<td class="lastname"><%= h(user.lastname) %></td>
|
||||
<td class="email"><%= mail_to(h(user.mail)) %></td>
|
||||
<td align="center"><%= checked_image user.admin? %></td>
|
||||
<td class="created_on" align="center"><%= format_time(user.created_on) %></td>
|
||||
<td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
|
||||
<td class="buttons"> <%= change_status_link(user) %>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="username" title='<%=user.login%>'> <%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="firstname" align="center" title='<%=user.firstname%>'><%= h(user.firstname) %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="lastname" align="center" title='<%=user.lastname%>'><%= h(user.lastname) %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="email" align="center" title='<%=user.mail%>'><%= mail_to(h(user.mail)) %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" align="center" align="center"><%= checked_image user.admin? %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="created_on" align="center" title='<%=format_time(user.created_on)%>'><%= format_time(user.created_on) %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="last_login_on" align="center" title='<%= format_time(user.last_login_on)%>'><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
|
||||
<td class="buttons"> <%= change_status_link(user) %>
|
||||
<%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %> </td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
|
|
|
@ -37,18 +37,9 @@
|
|||
<%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
|
||||
<%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
|
||||
<%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
|
||||
<th></th>
|
||||
<th style="width: 100px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 5%" />
|
||||
<col style="width: 5%" />
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 5%" />
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 5%" />
|
||||
<col style="width: 5%" />
|
||||
<tbody>
|
||||
<% for user in @users -%>
|
||||
<tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>">
|
||||
|
@ -59,7 +50,7 @@
|
|||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" align="center" align="center"><%= checked_image user.admin? %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="created_on" align="center" title='<%=format_time(user.created_on)%>'><%= format_time(user.created_on) %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="last_login_on" align="center" title='<%= format_time(user.last_login_on)%>'><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
|
||||
<td class="buttons"> <%= change_status_link(user) %>
|
||||
<td class="buttons"> <%= change_status_link(user) %>
|
||||
<%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %> </td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
|
|
|
@ -79,7 +79,7 @@ function checkMaxLength() {
|
|||
return false;"} %>
|
||||
<% end %>
|
||||
<% if journal.delete_by_user?(User.current) %>
|
||||
<%= link_to(l(:button_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => journal.user}, :method => :delete,:remote => true)%>
|
||||
<%= link_to(l(:button_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => journal.user}, :method => :delete,:confirm => l(:text_are_you_sure),:remote => true)%>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
<%= render :partial => 'action_menu' %>
|
||||
|
||||
<h3><%= issue_heading(@issue) %></h3>
|
||||
<h3>
|
||||
<%= issue_heading(@issue) %>
|
||||
</h3>
|
||||
|
||||
<style type="text/css"></style>
|
||||
|
||||
|
@ -25,9 +27,9 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- <%= avatar(@issue.author, :size => "50") %> -->
|
||||
<!-- <%#= avatar(@issue.author, :size => "50") %> -->
|
||||
|
||||
<div class="subject">
|
||||
<div class="subject" style="word-wrap: break-word;">
|
||||
<%= render_issue_subject_with_tree(@issue) %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
<% else%>
|
||||
<%= content_tag "div", content_tag("p", rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ')), :class => "clear avatar_name" %>
|
||||
<div class="clear avatar_user">
|
||||
<p> <!--user_scores(member.user,2,@project).total_score).to_i -->
|
||||
<%= l(:label_user_for_project_grade) %>: <span style="color:#ec6300"><%= format("%.2f" ,UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade).to_i %></span>
|
||||
<p> <!--user_scores(member.user,2,@project).total_score).to_i UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade).to_i-->
|
||||
<%= l(:label_user_for_project_grade) %>: <span style="color:#ec6300"><%= format("%.2f" ,user_scores(member.user,2,@project).total_score).to_i %></span>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
|
||||
<%= submit_tag l(:label_search), :class => "enterprise"%>
|
||||
<% end %>
|
||||
<div class='font_lighter' style="display: inline-block; margin-top:3px;">全站文件搜索。不会搜索私有项目中的内容、学生已经提交的作业。</div>
|
||||
<div class='font_lighter' style="display: inline-block; margin-top:3px;">全站文件搜索。不会搜索私有项目中的内容。</div>
|
||||
</div>
|
|
@ -1,8 +1,9 @@
|
|||
<div>技术得分:</div>
|
||||
<div> 踩别人的帖子 -2</div>
|
||||
<div> 帖子被一级会员顶 +4</div>
|
||||
<div> 帖子被二级会员顶 +6</div>
|
||||
<div> 帖子被三级会员顶 +8</div>
|
||||
<div> 帖子被一级会员踩 -2</div>
|
||||
<div> 帖子被二级会员踩 -4</div>
|
||||
<div> 帖子被三级会员踩 -6</div>
|
||||
|
||||
<div> 踩别人的帖子数量 * (-2) = <%= option_num.tread %> * (-2) = <%= option_num.tread * (-2) %></div>
|
||||
<div> 帖子被一级会员顶的次数 * 4 = <%= option_num.praise_by_one %> * 4 = <%= option_num.praise_by_one * 4 %></div>
|
||||
<div> 帖子被二级会员顶的次数 * 6 = <%= option_num.praise_by_two %> * 6 = <%= option_num.praise_by_two * 6 %></div>
|
||||
<div> 帖子被三级会员顶的次数 * 8 = <%= option_num.praise_by_three %> * 8 = <%= option_num.praise_by_three * 8 %></div>
|
||||
<div> 帖子被一级会员踩的次数 * (-2) = <%= option_num.tread_by_one %> * (-2) = <%= option_num.tread_by_one * (-2) %></div>
|
||||
<div> 帖子被二级会员踩的次数 * (-4) = <%= option_num.tread_by_two %> * (-4) = <%= option_num.tread_by_two * (-4) %></div>
|
||||
<div> 帖子被三级会员踩的次数 * (-6) = <%= option_num.tread_by_three %> * (-6) = <%= option_num.tread_by_three * (-6) %></div>
|
||||
<div> 技术得分 = <%= option_num.tread * (-2) %> + <%= option_num.praise_by_one * 4 %> + <%= option_num.praise_by_two * 6 %> + <%= option_num.praise_by_three * 8 %> + (<%= option_num.tread_by_one * (-2) %>) + ( <%= option_num.tread_by_two * (-4) %>) + (<%= option_num.tread_by_three * (-6) %>) = <%= skill(option_num) %> </div>
|
|
@ -1,6 +1,7 @@
|
|||
<div>项目贡献得分:</div>
|
||||
<div> 提交代码 +4</div>
|
||||
<div> 提交文档 +4</div>
|
||||
<div> 提交附件 +4</div>
|
||||
<div> 更新缺陷完成度 +2</div>
|
||||
<div> 发布缺陷 +4</div>
|
||||
|
||||
<div> 提交代码次数 * 4 = <%= option_num.changeset %> * 4 = <%= option_num.changeset * 4 %></div>
|
||||
<div> 提交文档次数 * 4 = <%= option_num.document %> * 4 = <%= option_num.document * 4 %></div>
|
||||
<div> 提交附件次数 * 4 = <%= option_num.attachment %> * 4 = <%= option_num.attachment * 4 %></div>
|
||||
<div> 更新缺陷完成度次数 * 2 = <%= option_num.issue_done_ratio %> * 2 = <%= option_num.issue_done_ratio * 2 %></div>
|
||||
<div> 发布缺陷数量 * 4 = <%= option_num.post_issue %> * 4 = <%= option_num.post_issue * 4 %></div>
|
||||
<div> 项目贡献得分 = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> = <%= active(option_num) %> </div>
|
|
@ -1,4 +1,4 @@
|
|||
<% roles = Role.find_all_givable %>
|
||||
<% roles = Role.find_all_givable[0..2] %>
|
||||
<% projects = Project.active.all %>
|
||||
|
||||
<div class="splitcontentleft">
|
||||
|
@ -50,12 +50,19 @@
|
|||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
window.onready = function()
|
||||
{
|
||||
$("#membership_project_id").css("width","150px");
|
||||
$("#membership_project_id").css("overflow ","hidden");
|
||||
|
||||
}
|
||||
</script>
|
||||
<div class="splitcontentright">
|
||||
<% if projects.any? %>
|
||||
<fieldset><legend><%=l(:label_project_new)%></legend>
|
||||
<fieldset style="width: 170px;"><legend><%=l(:label_project_new)%></legend>
|
||||
<%= form_for(:membership, :remote => true, :url => user_memberships_path(@user)) do %>
|
||||
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects) %>
|
||||
<div style="width:100px;"><%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects)%></div>
|
||||
<p><%= l(:label_role_plural) %>:
|
||||
<% roles.each do |role| %>
|
||||
<label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
<div>影响力得分:</div>
|
||||
<div> 被关注人数 +2/人</div>
|
||||
|
||||
<div> 被关注人数 * 2 = <%= option_num.follow %> * 2 = <%= option_num.follow * 2 %></div>
|
||||
<div> 影响力得分 = <%= option_num.follow * 2 %></div>
|
||||
|
|
|
@ -1,34 +1,10 @@
|
|||
<!-- added by bai -->
|
||||
<%# messages_count = @user.messages.count %>
|
||||
<%# messages_score = messages_count * 0.05%>
|
||||
<%# finall_messages_score = messages_score %>
|
||||
|
||||
<%# journals_count = @user.journals.count %>
|
||||
<%# journals_score = journals_count * 0.1 %>
|
||||
<%# user_changesets_count = @user.changesets.count %>
|
||||
<%# user_changesets_score = user_changesets_count * 0.3 %>
|
||||
<%# finall_user_project_score = journals_score + user_changesets_score %>
|
||||
|
||||
<%# journals_for_messages_count = @user.journals_messages.count %>
|
||||
<%# activities_count = @user.activities.count %>
|
||||
<%# journals_for_messages_score = journals_for_messages_count * 0.05 %>
|
||||
<%# activities_score = activities_count * 0.2 %>
|
||||
<%# finall_activity_score = journals_for_messages_score + activities_score %>
|
||||
|
||||
<%# news_count = @user.news.count %>
|
||||
<%# news_score = news_count * 0.1 %>
|
||||
<%# wiki_contents_count = @user.wiki_contents.count %>
|
||||
<%# wiki_contents_score = wiki_contents_count * 0.1 %>
|
||||
<%# comments_count = @user.comments.count %>
|
||||
<%# comments_score = comments_count * 0.1 %>
|
||||
<%# finall_influence_score = news_score + wiki_contents_score + comments_score %>
|
||||
<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
|
||||
|
||||
<div><%= l(:label_user_score) %></div>
|
||||
<div> = <%= l(:label_user_score_of_collaboration) %> + <%= l(:label_user_score_of_influence) %> +
|
||||
<%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %></div>
|
||||
<!-- <div> + <%#= l(:label_user_score_of_influence) %></div> -->
|
||||
<div> = <%= format("%.2f" ,@user.user_score_attr.collaboration.nil? ? 0:@user.user_score_attr.collaboration).to_i %> + <%= format("%.2f" , @user.user_score_attr.influence.nil? ? 0:@user.user_score_attr.influence ).to_i %>
|
||||
+ <%= format("%.2f" , @user.user_score_attr.skill.nil? ? 0:@user.user_score_attr.skill).to_i %> + <%= format("%.2f" , @user.user_score_attr.active.nil? ? 0:@user.user_score_attr.active).to_i %></div>
|
||||
<div> = <%= format("%.2f" ,@user.user_score_attr.total_score.nil? ? 0:@user.user_score_attr.total_score).to_i %></div>
|
||||
<div> = <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %>
|
||||
+ <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %></div>
|
||||
<div> = <%= format("%.2f" ,option_num.total_score).to_i %></div>
|
||||
<!-- end -->
|
||||
|
|
|
@ -1,28 +1,4 @@
|
|||
<!-- added by bai -->
|
||||
<%# messages_count = @user.messages.count %>
|
||||
<%# messages_score = messages_count * 0.05%>
|
||||
<%# finall_messages_score = messages_score %>
|
||||
|
||||
<%# journals_count = @user.journals.count %>
|
||||
<%# journals_score = journals_count * 0.1 %>
|
||||
<%# user_changesets_count = @user.changesets.count %>
|
||||
<%# user_changesets_score = user_changesets_count * 0.3 %>
|
||||
<%# finall_user_project_score = journals_score + user_changesets_score %>
|
||||
|
||||
<%# journals_for_messages_count = @user.journals_messages.count %>
|
||||
<%# activities_count = @user.activities.count %>
|
||||
<%# journals_for_messages_score = journals_for_messages_count * 0.05 %>
|
||||
<%# activities_score = activities_count * 0.2 %>
|
||||
<%# finall_activity_score = journals_for_messages_score + activities_score %>
|
||||
|
||||
<%# news_count = @user.news.count %>
|
||||
<%# news_score = news_count * 0.1 %>
|
||||
<%# wiki_contents_count = @user.wiki_contents.count %>
|
||||
<%# wiki_contents_score = wiki_contents_count * 0.1 %>
|
||||
<%# comments_count = @user.comments.count %>
|
||||
<%# comments_score = comments_count * 0.1 %>
|
||||
<%# finall_influence_score = news_score + wiki_contents_score + comments_score %>
|
||||
<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
|
||||
|
||||
<h3 class="title"><%= l(:label_user_score) %></h3>
|
||||
<div class="inf_user_image">
|
||||
|
@ -37,8 +13,9 @@
|
|||
</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr class="info_font"><td><%= l(:label_user_score) %></td></tr>
|
||||
<tr class="buttons_for_score" style="margin-top:30px;margin-left:144px"><td><span style="color:#ec6300"><%= format("%.2f" , @user.user_score_attr.total_score).to_i %></span></td></tr>
|
||||
<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>
|
||||
|
@ -46,31 +23,57 @@
|
|||
|
||||
</table>
|
||||
|
||||
<table style="border-bottom: solid 0px #80a6d2;" width="100%">
|
||||
<tr>
|
||||
<%= link_to l(:label_user_score) , {:controller => 'users', :action => 'score_new_index', :remote => true} %> :
|
||||
<%= format("%.2f" , @user.user_score_attr.total_score).to_i %>
|
||||
</tr><br>
|
||||
<tr>
|
||||
<%= link_to l(:label_user_score_of_collaboration), {:controller => 'users',:action => 'topic_new_score_index', :remote => true} %> :
|
||||
<%= format("%.2f" , @user.user_score_attr.collaboration.nil? ? 0:@user.user_score_attr.collaboration).to_i %>
|
||||
</tr><br>
|
||||
<tr>
|
||||
<%= link_to l(:label_user_score_of_influence), {:controller => 'users',:action => 'project_new_score_index', :remote => true} %> :
|
||||
<%= format("%.2f" , @user.user_score_attr.influence.nil? ? 0:@user.user_score_attr.influence).to_i %>
|
||||
</tr><br>
|
||||
<tr>
|
||||
<%= link_to l(:label_user_score_of_skill), {:controller => 'users',:action => 'activity_new_score_index', :remote => true} %> :
|
||||
<%= format("%.2f" , @user.user_score_attr.skill.nil? ? 0:@user.user_score_attr.skill).to_i %>
|
||||
</tr><br>
|
||||
<tr>
|
||||
<%= link_to l(:label_user_score_of_active), {:controller => 'users',:action => 'influence_new_score_index', :remote => true} %> :
|
||||
<%= format("%.2f" , @user.user_score_attr.active.nil? ? 0:@user.user_score_attr.active).to_i %>
|
||||
</tr><br>
|
||||
</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" , 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 } %>
|
||||
<%= render :partial => 'users/score_new_index', :locals => {:index => 0,:option_num => option_num } %>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<div>协同得分:</div>
|
||||
<div> 发帖 +2</div>
|
||||
<div> 对缺陷留言 +1</div>
|
||||
<div> 更改一次缺陷状态 +1</div>
|
||||
<div> 对留言的回复 +1</div>
|
||||
<div> 对帖子的回复 +1</div>
|
||||
|
||||
<div> 发帖数量 * 2 = <%= option_num.memo %> * 2 = <%= option_num.memo * 2 %></div>
|
||||
<div> 对缺陷留言数量 * 1 = <%= option_num.messages_for_issues %> * 1 = <%= option_num.messages_for_issues * 1 %></div>
|
||||
<div> 更改缺陷状态次数 * 1 = <%= option_num.issues_status %> * 1= <%= option_num.issues_status * 1 %></div>
|
||||
<div> 对留言的回复数量 * 1 = <%= option_num.replay_for_message %> * 1 = <%= option_num.replay_for_message * 1 %></div>
|
||||
<div> 对帖子的回复数量 * 1 = <%= option_num.replay_for_memo %> * 1 = <%= option_num.replay_for_memo * 1 %></div>
|
||||
<div> 协同得分 = <%= option_num.memo * 2 %> + <%= option_num.messages_for_issues * 1 %> + <%= option_num.issues_status * 1 %> + <%= option_num.replay_for_message * 1 %> + <%= option_num.replay_for_memo * 1 %> = <%= collaboration(option_num) %> </div>
|
||||
|
|
|
@ -1,28 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
<% messages_count = @user.messages.count %>
|
||||
<% messages_score = messages_count * 0.05%>
|
||||
<% finall_messages_score = messages_score %>
|
||||
|
||||
<% journals_count = @user.journals.count %>
|
||||
<% journals_score = journals_count * 0.1 %>
|
||||
<% user_changesets_count = @user.changesets.count %>
|
||||
<% user_changesets_score = user_changesets_count * 0.3 %>
|
||||
<% finall_user_project_score = journals_score + user_changesets_score %>
|
||||
|
||||
<% journals_for_messages_count = @user.journals_messages.count %>
|
||||
<% activities_count = @user.activities.count %>
|
||||
<% journals_for_messages_score = journals_for_messages_count * 0.05 %>
|
||||
<% activities_score = activities_count * 0.2 %>
|
||||
<% finall_activity_score = journals_for_messages_score + activities_score %>
|
||||
|
||||
<% news_count = @user.news.count %>
|
||||
<% news_score = news_count * 0.1 %>
|
||||
<% wiki_contents_count = @user.wiki_contents.count %>
|
||||
<% wiki_contents_score = wiki_contents_count * 0.1 %>
|
||||
<% comments_count = @user.comments.count %>
|
||||
<% comments_score = comments_count * 0.1 %>
|
||||
<% finall_influence_score = news_score + wiki_contents_score + comments_score %>
|
||||
<% finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title><%= h html_title %></title>
|
||||
|
@ -52,8 +29,8 @@
|
|||
</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr class="info_font"><td><%= l(:label_user_score) %></td></tr>
|
||||
<tr class="buttons_for_score" style="margin-top:30px;margin-left:144px"><td><span style="color:#ec6300"><%= format("%.2f" , @user.user_score_attr.total_score).to_i %></span></td></tr>
|
||||
<tr class="info_font"><td><%= l(:label_user_score) %></td></tr> <!-- @user.user_score_attr.total_score).to_i-->
|
||||
<tr class="buttons_for_score" style="margin-top:30px;margin-left:144px"><td><span style="color:#ec6300"><%= format("%.2f" , get_option_number(@user,1).total_score).to_i %></span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
|
||||
<%= submit_tag l(:label_search), :class => "enterprise"%>
|
||||
<% end %>
|
||||
<div class='font_lighter' style="margin: 0; padding: 0; margin-top: 4px;">全站文件搜索。不会搜索私有项目中的内容和学生已经提交的作业。</div>
|
||||
<div class='font_lighter' style="margin: 0; padding: 0; margin-top: 4px;">全站文件搜索。不会搜索私有项目中的内容。</div>
|
||||
</div>
|
|
@ -1039,7 +1039,7 @@ zh:
|
|||
button_ok_and_submit: 确定并提交
|
||||
|
||||
button_apply: 查询
|
||||
button_clear: 清除留言
|
||||
button_clear: 取消查询
|
||||
button_clear_requirement: 取消
|
||||
button_lock: 锁定
|
||||
button_unlock: 解锁
|
||||
|
|
33
db/schema.rb
33
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20140811022947) do
|
||||
ActiveRecord::Schema.define(:version => 20140812065417) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -291,6 +291,24 @@ ActiveRecord::Schema.define(:version => 20140811022947) do
|
|||
t.datetime "updated_on", :null => false
|
||||
end
|
||||
|
||||
create_table "course_attachments", :force => true do |t|
|
||||
t.string "filename"
|
||||
t.string "disk_filename"
|
||||
t.integer "filesize"
|
||||
t.string "content_type"
|
||||
t.string "digest"
|
||||
t.integer "downloads"
|
||||
t.string "author_id"
|
||||
t.string "integer"
|
||||
t.string "description"
|
||||
t.string "disk_directory"
|
||||
t.integer "attachtype"
|
||||
t.integer "is_public"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "container_id", :default => 0
|
||||
end
|
||||
|
||||
create_table "course_infos", :force => true do |t|
|
||||
t.integer "course_id"
|
||||
t.integer "user_id"
|
||||
|
@ -889,6 +907,19 @@ ActiveRecord::Schema.define(:version => 20140811022947) do
|
|||
|
||||
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
||||
|
||||
create_table "rich_rich_files", :force => true do |t|
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "rich_file_file_name"
|
||||
t.string "rich_file_content_type"
|
||||
t.integer "rich_file_file_size"
|
||||
t.datetime "rich_file_updated_at"
|
||||
t.string "owner_type"
|
||||
t.integer "owner_id"
|
||||
t.text "uri_cache"
|
||||
t.string "simplified_type", :default => "file"
|
||||
end
|
||||
|
||||
create_table "roles", :force => true do |t|
|
||||
t.string "name", :limit => 30, :default => "", :null => false
|
||||
t.integer "position", :default => 1
|
||||
|
|
Loading…
Reference in New Issue