Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
710adb8fed
|
@ -88,8 +88,12 @@
|
|||
<% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %>
|
||||
|
||||
<% if @project.project_type == 0 %>
|
||||
<%= link_to(l(:label_project_grade), {:controller => 'projects', :action => 'show_projects_score', :remote => true, :id => @project.id})%> :
|
||||
<span style='color:#ec6300'><%= format("%.2f" , finall_project_score ).to_f %></span>
|
||||
<%= l(:label_project_grade)%> :
|
||||
<%= link_to(format("%.2f" , finall_project_score ).to_f, {:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id
|
||||
}, :style => "color: #EC6300;")%>
|
||||
<% end %>
|
||||
<!-- end -->
|
||||
</div>
|
||||
|
|
|
@ -93,9 +93,13 @@
|
|||
<% 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 %>
|
||||
|
||||
<tr><td class="buttons_for_course" style="margin-top:30px;margin-left:144px">
|
||||
<%= link_to(l(:label_user_grade), {:controller => 'users', :action => 'show_score', :remote => true, :id => @user.id})%>:
|
||||
<span style="color:#ec6300"><%= format("%.2f" , finall_user_score).to_f %></span>
|
||||
<tr><td class="score">
|
||||
<%= l(:label_user_grade)%>:
|
||||
<%= link_to(format("%.2f" , finall_user_score).to_f, {:controller => 'users',
|
||||
:action => 'show_score',
|
||||
:remote => true,
|
||||
:id => @user.id
|
||||
}, :style => 'color :#E8770D;') %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -1,151 +1,181 @@
|
|||
<style type="text/css">
|
||||
/** {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-box-sizing: border-box;
|
||||
}*/
|
||||
.lz {
|
||||
position:relative;
|
||||
/** {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-box-sizing: border-box;
|
||||
}*/
|
||||
.lz {
|
||||
position: relative;
|
||||
min-height: 200px;
|
||||
margin: 10px 2px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 1px 1px 6px #97EBF4;
|
||||
}
|
||||
.lz-left{
|
||||
float: left;
|
||||
margin: 2%;
|
||||
padding: 0;
|
||||
}
|
||||
.memo-section{
|
||||
width: auto;
|
||||
margin-left: 15%;
|
||||
padding-top: 1%;
|
||||
border-left: 2px dotted #EEE;/*#8BE9F3;*/
|
||||
}
|
||||
.memo-title{
|
||||
margin: 1em 0;
|
||||
padding-left: 1%;
|
||||
padding-bottom: 1%;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dashed rgb(204, 204, 204);
|
||||
|
||||
}
|
||||
.memo-content{
|
||||
padding: 1%;
|
||||
margin: 1%;
|
||||
margin-bottom: 40px;
|
||||
background-color: #F6F6F6;
|
||||
white-space: normal;
|
||||
/*word-break: break-all; */
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.memo-timestamp{
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
right: 0;
|
||||
margin: 20px;
|
||||
}
|
||||
.replies{
|
||||
float: right;
|
||||
/*max-width: 90%;*/
|
||||
}
|
||||
.reply-box{
|
||||
float: right;
|
||||
width: 640px;
|
||||
padding: 3%;
|
||||
/*border: 2px solid #C6F3F9;*/
|
||||
border-top: 2px double #C6F3F9;
|
||||
/*border-radius: 10px;*/
|
||||
}
|
||||
}
|
||||
.lz-left {
|
||||
float: left;
|
||||
margin: 2%;
|
||||
padding: 0;
|
||||
}
|
||||
.memo-section {
|
||||
width: auto;
|
||||
margin-left: 15%;
|
||||
padding-top: 1%;
|
||||
border-left: 2px dotted #EEE;/*#8BE9F3;*/
|
||||
}
|
||||
.memo-title {
|
||||
margin: 1em 0;
|
||||
padding-left: 1%;
|
||||
padding-bottom: 1%;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dashed rgb(204, 204, 204);
|
||||
}
|
||||
.memo-content {
|
||||
padding: 1%;
|
||||
margin: 1%;
|
||||
margin-bottom: 40px;
|
||||
background-color: #F6F6F6;
|
||||
white-space: normal;
|
||||
/*word-break: break-all; */
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.memo-timestamp {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
/*right: 0;*/
|
||||
left: 0;
|
||||
margin: 20px;
|
||||
}
|
||||
.replies {
|
||||
float: right;
|
||||
/*max-width: 90%;*/
|
||||
}
|
||||
.reply-box {
|
||||
float: right;
|
||||
width: 640px;
|
||||
padding: 3%;
|
||||
/*border: 2px solid #C6F3F9;*/
|
||||
border-top: 2px double #C6F3F9;
|
||||
/*border-radius: 10px;*/
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="lz">
|
||||
<div class="contextual">
|
||||
<%= watcher_link(@topic, User.current) %>
|
||||
<%= link_to(
|
||||
l(:button_quote),
|
||||
{:action => 'quote', :id => @topic},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:class => 'icon icon-comment',
|
||||
:remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :id => @topic},
|
||||
:class => 'icon icon-edit'
|
||||
) if @message.editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => @topic},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'icon icon-del'
|
||||
) if @message.destroyable_by?(User.current) %>
|
||||
</div>
|
||||
<div class="lz-left">
|
||||
<div class=""><%= link_to image_tag(url_to_avatar(@topic.author), :class => "avatar"), user_path(@topic.author) %></div>
|
||||
<p class=""><%=link_to @topic.author, user_path(@topic.author) %></p>
|
||||
<div class="contextual">
|
||||
<%= watcher_link(@topic, User.current) %>
|
||||
<%= link_to(
|
||||
l(:button_quote),
|
||||
{:action => 'quote', :id => @topic},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:class => 'icon icon-comment',
|
||||
:remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :id => @topic},
|
||||
:class => 'icon icon-edit'
|
||||
) if @message.editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => @topic},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'icon icon-del'
|
||||
) if @message.destroyable_by?(User.current) %>
|
||||
</div>
|
||||
<div class="lz-left">
|
||||
<div class="">
|
||||
<%= link_to image_tag(url_to_avatar(@topic.author), :class => "avatar"), user_path(@topic.author) %>
|
||||
</div>
|
||||
<p class="">
|
||||
<%= link_to @topic.author, user_path(@topic.author) %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="memo-section">
|
||||
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>"><%= label_tag l(:field_subject) %>: <%=link_to @topic.subject, project_boards_path(@topic.project) %></div>
|
||||
<div class="memo-content"><%= textilizable(@topic, :content) %>
|
||||
<%= link_to_attachments @topic, :author => false %>
|
||||
</div>
|
||||
<div class="memo-timestamp"> <%= authoring @topic.created_on, @topic.author %></div>
|
||||
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>">
|
||||
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %>
|
||||
</div>
|
||||
<div class="memo-content">
|
||||
<%= textilizable(@topic, :content) %>
|
||||
<%= link_to_attachments @topic, :author => false %>
|
||||
</div>
|
||||
<div class="memo-timestamp">
|
||||
<%= authoring @topic.created_on, @topic.author %>
|
||||
</div>
|
||||
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<p style="float: right;">
|
||||
<%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %>
|
||||
</p>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<% unless @replies.empty? %>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
|
||||
<% reply_count = 0 %>
|
||||
<% reply_count = 0 %>
|
||||
<% @replies.each do |message| %>
|
||||
<div class="message reply" id="<%= "message-#{message.id}" %>">
|
||||
<div class="contextual-borad">
|
||||
<%= link_to(
|
||||
image_tag('comment.png'),
|
||||
{:action => 'quote', :id => message},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<%= link_to(
|
||||
image_tag('edit.png'),
|
||||
{:action => 'edit', :id => message},
|
||||
:title => l(:button_edit)
|
||||
) if message.editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
image_tag('delete.png'),
|
||||
{:action => 'destroy', :id => message},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if message.destroyable_by?(User.current) %>
|
||||
</div>
|
||||
|
||||
<table class="borad-text-list">
|
||||
<tr><td class="font_lighter"><%= reply_count += 1 %>楼 </td></tr>
|
||||
<tr><td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
|
||||
<td class="comments"><div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
|
||||
<%= link_to_attachments message, :author => false %>
|
||||
</td></tr>
|
||||
<tr><td class="font_lighter" style="float: right"><%= authoring message.created_on, message.author %></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="message reply" id="<%= "message-#{message.id}" %>">
|
||||
|
||||
<table class="borad-text-list">
|
||||
<tr>
|
||||
<td class="font_lighter"><%= reply_count += 1 %>楼 </td>
|
||||
<td>
|
||||
<div class="contextual-borad">
|
||||
<%= link_to(
|
||||
"引用",
|
||||
{:action => 'quote', :id => message},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<%= link_to(
|
||||
#image_tag('edit.png'),
|
||||
"编辑",
|
||||
{:action => 'edit', :id => message},
|
||||
:title => l(:button_edit)
|
||||
) if message.editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
#image_tag('delete.png'),
|
||||
"删除",
|
||||
{:action => 'destroy', :id => message},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if message.destroyable_by?(User.current) %>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
|
||||
<td class="comments">
|
||||
<div class="wiki">
|
||||
<%= textilizable message, :content, :attachments => message.attachments %>
|
||||
</div> <%= link_to_attachments message, :author => false %> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font_lighter" style="float: left"><%= authoring message.created_on, message.author %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<div class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></div>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<p style="float: right;"><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
|
||||
|
||||
|
||||
|
||||
<div id="reply" style="display:none;">
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<!-- added by bai -->
|
||||
<% changeset_count = @project.changesets.count %>
|
||||
<% code_submit_score = changeset_count * 0.3 %>
|
||||
<% finall_code_submit_score = code_submit_score %>
|
||||
<div><%= l(:label_code_submit_number) %> * 0.3 = <%= changeset_count %> * 0.3 = <%= format("%.2f" , code_submit_score).to_f %></div>
|
||||
<div><%= l(:label_code_submit_score) %> = <%= format("%.2f" , finall_code_submit_score).to_f %></div>
|
||||
<!-- end -->
|
|
@ -1,5 +1,7 @@
|
|||
<!-- added by bai -->
|
||||
<% document_count = @project.documents.count %>
|
||||
<% file_score = document_count * 0.1 %>
|
||||
<% finall_file_score = file_score %>
|
||||
<div><%= l(:label_file_number) %> * 0.1 = <%= document_count %> * 0.1 = <%= format("%.2f" , file_score).to_f %></div>
|
||||
<div><%= l(:label_file_score) %> = <%= format("%.2f" , finall_file_score).to_f %></div>
|
||||
<div><%= l(:label_file_score) %> = <%= format("%.2f" , finall_file_score).to_f %></div>
|
||||
<!-- end -->
|
|
@ -1,5 +1,7 @@
|
|||
<!-- added by bai -->
|
||||
<% new_count = @project.news.count %>
|
||||
<% new_score = new_count * 0.1 %>
|
||||
<% finall_new_score = new_score %>
|
||||
<div><%= l(:label_new_number) %> * 0.1 = <%= new_count %> * 0.1 = <%= format("%.2f" , new_score).to_f %></div>
|
||||
<div><%= l(:label_news_score) %> = <%= format("%.2f" , finall_new_score).to_f %></div>
|
||||
<div><%= l(:label_news_score) %> = <%= format("%.2f" , finall_new_score).to_f %></div>
|
||||
<!-- end -->
|
|
@ -87,14 +87,50 @@
|
|||
<div class="licences">
|
||||
<%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
|
||||
</div>
|
||||
|
||||
<!-- added by bai -->
|
||||
<div class="grade">
|
||||
<% issue_count = @project.issues.count %>
|
||||
<% issue_journal_count = @project.issue_changes.count %>
|
||||
<% issue_score = issue_count * 0.2 %>
|
||||
<% issue_journal_score = issue_journal_count * 0.1 %>
|
||||
<% finall_issue_score = issue_score + issue_journal_score %>
|
||||
|
||||
<% new_count = @project.news.count %>
|
||||
<% new_score = new_count * 0.1 %>
|
||||
<% finall_new_score = new_score %>
|
||||
|
||||
<% document_count = @project.documents.count %>
|
||||
<% file_score = document_count * 0.1 %>
|
||||
<% finall_file_score = file_score %>
|
||||
|
||||
<% changeset_count = @project.changesets.count %>
|
||||
<% code_submit_score = changeset_count * 0.3 %>
|
||||
<% finall_code_submit_score = code_submit_score %>
|
||||
|
||||
<% board_message_count = 0 %>
|
||||
<% @project.boards.each do |board| %>
|
||||
<% board_message_count += board.messages_count %>
|
||||
<% end %>
|
||||
<% topic_score = board_message_count * 0.1 %>
|
||||
<% finall_topic_score = topic_score %>
|
||||
|
||||
<% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %>
|
||||
|
||||
<% if @project.project_type !=1 %>
|
||||
<%= content_tag('span', "#{l(:label_project_grade)}: ")%><span style='color:#ec6300'><%=@project.project_status ? @project.project_status.grade : 0.0 %></span>
|
||||
<%= l(:label_project_grade)%>:
|
||||
<span >
|
||||
<%= link_to(format("%.2f" , finall_project_score ).to_f,
|
||||
{:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true, :id => @project.id}, :style=>"color: #EC6300;") %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- added by liuping -->
|
||||
<!-- end -->
|
||||
|
||||
|
||||
|
||||
<!-- added by liuping -->
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- added by bai -->
|
||||
<% issue_count = @project.issues.count %>
|
||||
<% issue_journal_count = @project.issue_changes.count %>
|
||||
<% issue_score = issue_count * 0.2 %>
|
||||
|
@ -32,3 +33,4 @@
|
|||
<%= format("%.2f" , finall_file_score).to_f %> + <%= format("%.2f" , finall_code_submit_score).to_f %> +
|
||||
<%= format("%.2f" , topic_score).to_f %></div>
|
||||
<div> = <%= format("%.2f" , finall_project_score).to_f %></div>
|
||||
<!-- end -->
|
|
@ -1,3 +1,4 @@
|
|||
<!-- added by bai -->
|
||||
<% board_message_count = 0 %>
|
||||
<% @project.boards.each do |board| %>
|
||||
<% board_message_count += board.messages_count %>
|
||||
|
@ -6,3 +7,4 @@
|
|||
<% finall_topic_score = topic_score %>
|
||||
<div><%= l(:label_topic_number) %> * 0.1 = <%= board_message_count %> * 0.1 = <%= topic_score %></div>
|
||||
<div><%= l(:label_topic_score) %> = <%= format("%.2f" , finall_topic_score).to_f %></div>
|
||||
<!-- end -->
|
|
@ -1,3 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/code_submit_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
<!-- end -->
|
|
@ -1,3 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/file_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
<!-- end -->
|
|
@ -1,3 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/issue_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
<!-- end -->
|
|
@ -1,3 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/news_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
<!-- end -->
|
|
@ -1,3 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/project_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
<!-- end -->
|
|
@ -1,3 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/projects_topic_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
<!-- end -->
|
|
@ -1,3 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/show_projects_score') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
<!-- end -->
|
|
@ -1,7 +1,9 @@
|
|||
<!-- added by bai -->
|
||||
<% unless @user.id == 1%>
|
||||
<% messages_count = @user.messages.count %>
|
||||
<% messages_score = messages_count * 0.05%>
|
||||
<% finall_messages_score = messages_score %>
|
||||
<% end %>
|
||||
|
||||
<% journals_count = @user.journals.count %>
|
||||
<% journals_score = journals_count * 0.1 %>
|
||||
|
|
|
@ -1,6 +1,33 @@
|
|||
<!-- added by bai -->
|
||||
<div class="autoscroll">
|
||||
<% for user in @users -%>
|
||||
<% unless user.id == 1%>
|
||||
<!-- 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_for_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 %>
|
||||
<!-- end -->
|
||||
<div class="well">
|
||||
|
||||
<%= content_tag "p", "#{format_date(user.created_on)} #{l(:label_member_since)}", :class => "float_right member_since" %>
|
||||
|
@ -9,10 +36,17 @@
|
|||
<div>
|
||||
<%= image_tag(url_to_avatar(user), :class => 'avatar') %>
|
||||
<%= content_tag "span", link_to_user(user), :class => "nomargin avatar_name" %>
|
||||
|
||||
<!-- modified by bai -->
|
||||
<div style="position:relative;float:left;margin-top:-2px;margin-left: 160px">
|
||||
<%= l(:label_user_grade) %>: <span style="color:#ec6300"><%= user.user_status.grade %></span>
|
||||
<%= l(:label_user_grade) %>: <span style="color:#ec6300">
|
||||
<%= link_to( format("%.2f" , finall_user_score).to_f, {:controller => 'users',
|
||||
:action => 'show_score',
|
||||
:remote => true,
|
||||
:id => user.id},
|
||||
:style=>"color: #EC6300;") %></span>
|
||||
</div>
|
||||
|
||||
<!-- end -->
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 20px;margin-left:66px">
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/activity_score_index', :locals => {:index =>0 }) %>');
|
||||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/activity_score_index', :locals => {:index =>0 }) %>');
|
||||
<!-- end -->
|
|
@ -1 +1,3 @@
|
|||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/influence_score_index', :locals => {:index =>0 }) %>');
|
||||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/influence_score_index', :locals => {:index =>0 }) %>');
|
||||
<!-- end -->
|
|
@ -1 +1,3 @@
|
|||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/project_score_index', :locals => {:index =>1 }) %>');
|
||||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/project_score_index', :locals => {:index =>1 }) %>');
|
||||
<!-- end -->
|
|
@ -1 +1,3 @@
|
|||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/score_index', :locals => {:index =>0 }) %>');
|
||||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/score_index', :locals => {:index =>0 }) %>');
|
||||
<!-- end -->
|
|
@ -1,3 +1,5 @@
|
|||
<!-- added by bai -->
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_score') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
<!-- end -->
|
|
@ -1 +1,3 @@
|
|||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/topic_score_index', :locals => {:index =>0 }) %>');
|
||||
<!-- added by bai -->
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/topic_score_index', :locals => {:index =>0 }) %>');
|
||||
<!-- end -->
|
|
@ -258,7 +258,7 @@ span.forums-avatar-right{
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
.contextual-borad{
|
||||
float:right;
|
||||
/*float:right;*/
|
||||
white-space: nowrap;
|
||||
line-height:1.4em;
|
||||
margin-top:0px;
|
||||
|
@ -1371,7 +1371,7 @@ table.attributes { width: 100% }
|
|||
table.attributes th { vertical-align: top; text-align: left; }
|
||||
table.attributes td { vertical-align: top; }
|
||||
|
||||
table.boards a.board, h3.comments { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; }
|
||||
table.boards a.board, h3.comments { /*background: url(../images/comment.png) no-repeat 0% 50%; */padding-left: 5px; }
|
||||
table.boards td.topic-count, table.boards td.message-count {text-align:center;}
|
||||
table.boards td.last-message {font-size:80%;}
|
||||
|
||||
|
@ -2458,7 +2458,7 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');}
|
|||
.icon-edit { background-image: url(../images/edit.png); }
|
||||
.icon-copy { background-image: url(../images/copy.png); }
|
||||
.icon-duplicate { background-image: url(../images/duplicate.png); }
|
||||
.icon-del { background-image: url(../images/delete.png); }
|
||||
.icon-del { /*background-image: url(../images/delete.png); */}
|
||||
.icon-move { background-image: url(../images/move.png); }
|
||||
.icon-save { background-image: url(../images/save.png); }
|
||||
.icon-cancel { background-image: url(../images/cancel.png); }
|
||||
|
@ -2483,7 +2483,7 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');}
|
|||
.icon-checked { background-image: url(../images/true.png); }
|
||||
.icon-details { background-image: url(../images/zoom_in.png); }
|
||||
.icon-report { background-image: url(../images/report.png); }
|
||||
.icon-comment { background-image: url(../images/comment.png); }
|
||||
.icon-comment { /*background-image: url(../images/comment.png); */}
|
||||
.icon-summary { background-image: url(../images/lightning.png); }
|
||||
.icon-server-authentication { background-image: url(../images/server_key.png); }
|
||||
.icon-issue { background-image: url(../images/ticket.png); }
|
||||
|
|
Loading…
Reference in New Issue