Merge branch 'dai_ao' into develop

This commit is contained in:
daiao 2016-11-24 10:45:43 +08:00
commit f7db47be41
24 changed files with 187 additions and 106 deletions

View File

@ -102,6 +102,7 @@ class IssuesController < ApplicationController
@issue_count = @query.issue_count @issue_count = @query.issue_count
@test = params[:test] @test = params[:test]
@project_sort = 'issues.updated_on desc' @project_sort = 'issues.updated_on desc'
if params[:test] != "0" if params[:test] != "0"
case @test case @test
when "1" when "1"
@ -285,10 +286,10 @@ class IssuesController < ApplicationController
# 用户编辑更改issue # 用户编辑更改issue
def update def update
# params[:assigned_to_id] = nil if params[:assigned_to_id].to_i == 0 # params[:assigned_to_id] = nil if params[:assigned_to_id].to_i == 0
# params[:fixed_version_id] = nil if params[:fixed_version_id].to_i == 0
if params[:issue_detail] if params[:issue_detail]
issue = Issue.find(params[:id]) issue = Issue.find(params[:id])
issue = update_user_issue_detail(issue, params) issue = update_user_issue_detail(issue, params)
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
@saved = update_user_issue_detail(issue, params) @saved = update_user_issue_detail(issue, params)
return return
else else
@ -296,6 +297,7 @@ class IssuesController < ApplicationController
return unless update_issue_from_params return unless update_issue_from_params
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads])) @issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0 @issue.assigned_to_id = nil if @issue.assigned_to_id == 0
@issue.fixed_version_id = nil if @issue.fixed_version_id == 0
saved = false saved = false
begin begin
@saved = @issue.save_issue_with_child_records(params, @time_entry) @saved = @issue.save_issue_with_child_records(params, @time_entry)
@ -630,7 +632,9 @@ class IssuesController < ApplicationController
end end
end end
# 搜索结果 # 搜索结果
@issues_filter = @query.issues(:order => @project_sort) # SELECT assigned_to_id, count(*) as ac FROM `issues` where project_id = @project.id group by assigned_to_id order by ac desc;
@issues_filter = @query.issues.sort_by{ |i| Issue.where(:project_id => @project.id , :assigned_to_id => i.assigned_to_id).count }.reverse
# @issues_filter = @query.issues(:order => @project_sort)
# if params[:type] == 1 || params[:type].nil? # if params[:type] == 1 || params[:type].nil?
# @results = @issues_filter # @results = @issues_filter
@ -668,7 +672,7 @@ class IssuesController < ApplicationController
@alltotal[issue.tracker_id.to_i] = @alltotal[issue.tracker_id.to_i] + 1 @alltotal[issue.tracker_id.to_i] = @alltotal[issue.tracker_id.to_i] + 1
user_id = issue.assigned_to_id user_id = issue.assigned_to_id
if issue.assigned_to_id.nil? if issue.assigned_to_id.nil?
user_id = issue.author_id user_id = 0
end end
if !@results[user_id].nil? if !@results[user_id].nil?

View File

@ -95,7 +95,7 @@ class PullRequestsController < ApplicationController
if params[:target_project_id] if params[:target_project_id]
target_project_id = params[:forked_project_id].to_i target_project_id = params[:forked_project_id].to_i
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id) request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id)
@fork_project_name = Project.find(target_project_id).try(:name) @fork_project_name = Project.find(params[:target_project_id]).try(:name)
@fork_pr_message = true if @fork_project_name @fork_pr_message = true if @fork_project_name
else else
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch) request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch)

View File

@ -267,6 +267,16 @@ module ProjectsHelper
project_name = versions.blank? ? "" : versions.first.project.name project_name = versions.blank? ? "" : versions.first.project.name
grouped = Hash.new {|h,k| h[k] = []} grouped = Hash.new {|h,k| h[k] = []}
grouped[project_name] << ["请选择里程碑", 0] grouped[project_name] << ["请选择里程碑", 0]
=begin
unless selected.nil?
if (params[:action] == "show" ) && Version.find(selected.id).status == "closed"
version_name = Version.find(selected.id).name
grouped[project_name] << [version_name, selected.id]
end
end
=end
versions.each do |version| versions.each do |version|
grouped[version.project.name] << [version.name, version.id] grouped[version.project.name] << [version.name, version.id]
end end

View File

@ -100,7 +100,7 @@ module UsersHelper
def applied_project_users applied_message def applied_project_users applied_message
# case applied_message.status # case applied_message.status
# when 3,2,1,5,4,7,6 # when 3,2,1,5,4,7,6
user = User.find(applied_message.applied_user_id) user = User.find(applied_message.applied_user_id).show_name
# end # end
end end

View File

@ -854,7 +854,8 @@ class Issue < ActiveRecord::Base
return @assignable_versions if @assignable_versions return @assignable_versions if @assignable_versions
# versions = project.shared_versions.open.all # versions = project.shared_versions.open.all
versions = Version.where(:project_id => project.id, :status => "open").order("created_on desc") # versions = Version.where(:project_id => project.id, :status => "open").order("created_on desc")
versions = Version.where(:project_id => project.id).order("created_on desc")
if fixed_version if fixed_version
if fixed_version_id_changed? if fixed_version_id_changed?
# nothing to do # nothing to do

View File

@ -9,6 +9,7 @@ class Organization < ActiveRecord::Base
has_many :org_subfields, :dependent => :destroy has_many :org_subfields, :dependent => :destroy
has_many :users, :through => :org_members has_many :users, :through => :org_members
has_many :files has_many :files
has_many :org_messages, :class_name => 'OrgMessage', :dependent => :destroy
acts_as_attachable acts_as_attachable
validates_uniqueness_of :name validates_uniqueness_of :name
after_create :save_as_org_activity, :add_default_subfields after_create :save_as_org_activity, :add_default_subfields

View File

@ -42,9 +42,9 @@
<% end %> <% end %>
<% else %> <% else %>
<% if User.current.logged? %> <% if User.current.logged? %>
<%= link_to_short_attachment attachment, :length=> 58,:class => 'hidden link_file_a fl newsBlue mw400', :download => true -%> <%= link_to_short_attachment attachment, :length => 58,:class => 'hidden link_file_a fl newsBlue mw400 h15', :download => true -%>
<% else %> <% else %>
<%= link_to(attachment.filename, signin_url_without_domain,:length=> 58, :class => "hidden link_file_a fl newsBlue mw400") %> <%= link_to(attachment.filename, signin_url_without_domain,:length => 58, :class => "hidden link_file_a fl newsBlue mw400 h15") %>
<% end %> <% end %>
<% end %> <% end %>
</span> </span>

View File

@ -160,9 +160,5 @@
} }
// 里程碑添加默认选项 // 里程碑添加默认选项
$("#issue_fixed_version_id option[value='']").remove(); $("#issue_fixed_version_id option[value='']").remove();
<%# if params[:action] == "new" %>
// $('#issue_fixed_version_id').prepend("<option value='0' selected='selected'>选择里程碑</option>");
<%# else %>
// $('#issue_fixed_version_id').prepend("<option value='0'>选择里程碑</option>");
<%# end %>
</script> </script>

View File

@ -11,9 +11,18 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<td class="hidden dis p10" style="width:166px;">合计</td>
<td class="w130"><%= @alltotal[0] %></td>
<td class="w130"><%= @alltotal[2] %></td>
<td class="w130"><%= @alltotal[4] %></td>
<td class="w130"><%= @alltotal[1] %></td>
<td class="w130"><%= @alltotal[3] %></td>
<td class="w130"><%= @alltotal[5] %></td>
</tr>
<% @results.each do |k,v|%> <% @results.each do |k,v|%>
<tr> <tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td> <td class="hidden dis p10" style="width:166px;"><%= v[:name] =="Anonymous" ? "未指派" : v[:name] %></td>
<td class="w130"><%= v[0] %></td> <td class="w130"><%= v[0] %></td>
<td class="w130"><%= v[2] %></td> <td class="w130"><%= v[2] %></td>
<td class="w130"><%= v[4] %></td> <td class="w130"><%= v[4] %></td>
@ -22,14 +31,5 @@
<td class="w130"><%= v[5] %></td> <td class="w130"><%= v[5] %></td>
</tr> </tr>
<% end %> <% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @alltotal[0] %></td>
<td class="w130"><%= @alltotal[2] %></td>
<td class="w130"><%= @alltotal[4] %></td>
<td class="w130"><%= @alltotal[1] %></td>
<td class="w130"><%= @alltotal[3] %></td>
<td class="w130"><%= @alltotal[5] %></td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -11,10 +11,19 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<td class="hidden dis p10" style="width:166px;">合计</td>
<td class="w130"><%= @closetotal[0] %></td>
<td class="w130"><%= @closetotal[2] %></td>
<td class="w130"><%= @closetotal[4] %></td>
<td class="w130"><%= @closetotal[1] %></td>
<td class="w130"><%= @closetotal[3] %></td>
<td class="w130"><%= @closetotal[5] %></td>
</tr>
<% @results.each do |k,v|%> <% @results.each do |k,v|%>
<% if v[12] > 0 %> <% if v[12] > 0 %>
<tr> <tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td> <td class="hidden dis p10" style="width:166px;"><%= v[:name] == "Anonymous" ? "未指派" : v[:name] %></td>
<td class="w130"><%= v[12] %></td> <td class="w130"><%= v[12] %></td>
<td class="w130"><%= v[14] %></td> <td class="w130"><%= v[14] %></td>
<td class="w130"><%= v[16] %></td> <td class="w130"><%= v[16] %></td>
@ -24,14 +33,5 @@
</tr> </tr>
<% end %> <% end %>
<% end %> <% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @closetotal[0] %></td>
<td class="w130"><%= @closetotal[2] %></td>
<td class="w130"><%= @closetotal[4] %></td>
<td class="w130"><%= @closetotal[1] %></td>
<td class="w130"><%= @closetotal[3] %></td>
<td class="w130"><%= @closetotal[5] %></td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -11,10 +11,19 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<td class="hidden dis p10" style="width:166px;">合计</td>
<td class="w130"><%= @opentotal[0] %></td>
<td class="w130"><%= @opentotal[2] %></td>
<td class="w130"><%= @opentotal[4] %></td>
<td class="w130"><%= @opentotal[1] %></td>
<td class="w130"><%= @opentotal[3] %></td>
<td class="w130"><%= @opentotal[5] %></td>
</tr>
<% @results.each do |k,v|%> <% @results.each do |k,v|%>
<% if v[6] > 0 %> <% if v[6] > 0 %>
<tr> <tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td> <td class="hidden dis p10" style="width:166px;"><%= v[:name] =="Anonymous" ? "未指派" : v[:name] %></td>
<td class="w130"><%= v[6] %></td> <td class="w130"><%= v[6] %></td>
<td class="w130"><%= v[8] %></td> <td class="w130"><%= v[8] %></td>
<td class="w130"><%= v[10] %></td> <td class="w130"><%= v[10] %></td>
@ -24,14 +33,5 @@
</tr> </tr>
<% end %> <% end %>
<% end %> <% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @opentotal[0] %></td>
<td class="w130"><%= @opentotal[2] %></td>
<td class="w130"><%= @opentotal[4] %></td>
<td class="w130"><%= @opentotal[1] %></td>
<td class="w130"><%= @opentotal[3] %></td>
<td class="w130"><%= @opentotal[5] %></td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -18,7 +18,7 @@
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span> <span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
</li> </li>
<li class="clear"> <li class="clear">
<label class=" fl">&nbsp;&nbsp;</label> <!-- <label class=" fl">&nbsp;&nbsp;</label>-->
<p class=" fl c_grey pro_new_grey">1.长度必须在1到254个字符之间<br/> <p class=" fl c_grey pro_new_grey">1.长度必须在1到254个字符之间<br/>
2.仅限使用小写字母a-z、数字、破折号-和下划线_<br> 2.仅限使用小写字母a-z、数字、破折号-和下划线_<br>
3.一旦保存,标识无法修改</p> 3.一旦保存,标识无法修改</p>

View File

@ -3,9 +3,18 @@
<div class="new_roadmap_conbox mb10" > <div class="new_roadmap_conbox mb10" >
<div class="new_roadmap_navbox clear"> <div class="new_roadmap_navbox clear">
<ul class="new_roadmap_nav fl" > <ul class="new_roadmap_nav fl" >
<li class="new_roadmap_nav_hover"><%= link_to "待处理<span class='new_roadmap_nav_taghover ml5'>#{@requests_opened_count}</span>".html_safe, project_pull_requests_path(:type => "1"), :remote => true, :class => "new_roadmap_type_nomal" %></li> <li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
<li><%= link_to "已处理<span class='new_roadmap_nav_tagnomal ml5'>#{@requests_merged_count}</span>".html_safe, project_pull_requests_path(:type => "2"), :remote => true, :class => "new_roadmap_type_nomal" %></li> <%= link_to "待处理<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@requests_opened_count}</span>".html_safe,
<li><%= link_to "已关闭<span class='new_roadmap_nav_tagnomal ml5'>#{@requests_closed_count}</span>".html_safe, project_pull_requests_path(:type => "3"), :remote => true, :class => "new_roadmap_type_nomal" %></li> project_pull_requests_path(:type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
</li>
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
<%= link_to "已处理<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@requests_merged_count}</span>".html_safe,
project_pull_requests_path(:type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
</li>
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
<%= link_to "已关闭<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@requests_closed_count}</span>".html_safe,
project_pull_requests_path(:type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
</li>
</ul> </ul>
<% if allow_pull_request(@project) && User.current.member_of?(@project) %> <% if allow_pull_request(@project) && User.current.member_of?(@project) %>
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "btn btn-green fr mr15 mt10" %> <%= link_to "创建Pull Request", new_project_pull_request_path, :class => "btn btn-green fr mr15 mt10" %>
@ -34,11 +43,23 @@
<script> <script>
// $("#mergeBanner").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"}); // $("#mergeBanner").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
// $("#mergeBanner").parent().before("<div class='homepageRightBanner mb10'><span class='f16 fontGrey3'>Pull Request</span></div>"); // $("#mergeBanner").parent().before("<div class='homepageRightBanner mb10'><span class='f16 fontGrey3'>Pull Request</span></div>");
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=3;i++){
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
g('new_roadmap_num_'+i).className='new_roadmap_nav_tagnomal';
g('pull_requests_list').className='undis';
}
g('new_roadmap_nav_'+n).className='new_roadmap_nav_hover';
g('new_roadmap_type_'+n).className='new_roadmap_type_hover';
g('new_roadmap_num_'+n).className='new_roadmap_nav_taghover';
g('pull_requests_list').className='dis';
}
$(".new_roadmap_nav li").click(function(){
$(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
$(this).addClass("new_roadmap_nav_hover");
});
</script> </script>
<% else %> <% else %>
<%= render :partial => "projects/no_data" %> <%= render :partial => "projects/no_data" %>

View File

@ -2,7 +2,9 @@
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher"><%= ma.author.login %></span><span class="homepageNewsType fl">提到了你:</span> <span class="newsBlue homepageNewsPublisher">
<%= link_to ma.author.show_name, user_path(ma.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
</span><span class="homepageNewsType fl">提到了你:</span>
</li> </li>
<li class="homepageNewsContent fl"> <li class="homepageNewsContent fl">
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %> <% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>

View File

@ -2,6 +2,6 @@
<% if ma.status != 0 %> <% if ma.status != 0 %>
<span class="newsBlue homepageNewsPublisher">系统提示</span> <span class="newsBlue homepageNewsPublisher">系统提示</span>
<% else %> <% else %>
<%=link_to User.where("id=?", ma.applied_user_id).first.show_name, user_path(ma.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.where("id=?", ma.applied_user_id).first.show_name, user_path(ma.applied_user_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<% end %> <% end %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= applied_school_tip(ma) %></span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= applied_school_tip(ma) %></span>

View File

@ -1,8 +1,15 @@
<% if ma.class == CourseMessage %> <% if ma.class == CourseMessage %>
<% if ma.course_message_type == "News" && ma.course_message %> <% if ma.course_message_type == "News" && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl">
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li> <a href="javascript:void(0);">
<%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author), :target => '_blank' %>
</a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span>
</li>
<li class="homepageNewsContent fl"> <li class="homepageNewsContent fl">
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id }, <%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@ -22,7 +29,7 @@
<% if ma.course_message_type == "Comment" && ma.course_message %> <% if ma.course_message_type == "Comment" && ma.course_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li> <li class="homepageNewsPubType fl"><%=link_to User.find(ma.course_message.author_id).show_name, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
<li class="homepageNewsContent fl"> <li class="homepageNewsContent fl">
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id }, <%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" , :target => '_blank'%> :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" , :target => '_blank'%>
@ -291,7 +298,7 @@
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"> <%=link_to ma.course_message.author.show_name, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
<%= ma.course_message.parent_id.nil? ? "发布了班级帖子:" : "评论了班级帖子:" %></span></li> <%= ma.course_message.parent_id.nil? ? "发布了班级帖子:" : "评论了班级帖子:" %></span></li>
<% if ma.course_message.parent_id.nil? %> <% if ma.course_message.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
@ -615,7 +622,7 @@
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.find(ma.course_message_id).show_name, user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了班级:</span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了班级:</span>
</li> </li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
@ -683,7 +690,7 @@
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id), :target => '_blank' %></a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.find(ma.course_message_id).show_name, user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了班级:</span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了班级:</span>
</li> </li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">

View File

@ -26,7 +26,7 @@
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %></a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.find(ma.forge_message_id).show_name, user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了项目:</span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了项目:</span>
</li> </li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
@ -47,7 +47,7 @@
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %></a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.find(ma.forge_message_id).show_name, user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了项目:</span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了项目:</span>
</li> </li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
@ -99,11 +99,15 @@
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%></span> :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
<%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%>
</span>
</li> </li>
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover => "message_titile_show($(this),event)",--> <!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>--> <!--:onmouseout => "message_titile_hide($(this))" %>-->
</a> </a>
@ -117,8 +121,11 @@
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%></span> :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
<%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%>
</span>
</li> </li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@ -133,10 +140,12 @@
<% if ma.forge_message_type == "Journal" && ma.forge_message %> <% if ma.forge_message_type == "Journal" && ma.forge_message %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %></a> <a href="javascript:void(0);">
<%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %>
</a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%= link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
更新了问题状态:</span> 更新了问题状态:</span>
</li> </li>
@ -153,7 +162,7 @@
<% if ma.forge_message_type == "Message" %> <% if ma.forge_message_type == "Message" %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <li class="homepageNewsPubType fl"><%=link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, board_message_path(ma.forge_message.board_id, ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> <%= link_to ma.forge_message.subject, board_message_path(ma.forge_message.board_id, ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@ -166,9 +175,16 @@
<% end %> <% end %>
<% if ma.forge_message_type == "Comment" %> <% if ma.forge_message_type == "Comment" %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a></li> <li class="homepageNewsPortrait fl">
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <a href="javascript:void(0);">
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li> <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span>
</li>
<li class="homepageNewsContent fl"> <li class="homepageNewsContent fl">
<%= link_to "#{ma.forge_message.commented.title}", <%= link_to "#{ma.forge_message.commented.title}",
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>

View File

@ -5,7 +5,7 @@
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author), :target => '_blank' %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author), :target => '_blank' %></a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.find(ma.memo.author_id).show_name, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
</li> </li>
<% if ma.memo.parent_id.nil? %> <% if ma.memo.parent_id.nil? %>

View File

@ -2,11 +2,16 @@
<% if ma.journals_for_message_type == "JournalsForMessage" %> <% if ma.journals_for_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user), :target => '_blank' %></a> <a href="javascript:void(0);">
<%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"),
user_path(ma.journals_for_message.user), :target => '_blank' %>
</a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> <%=link_to User.find(ma.journals_for_message.user_id).show_name, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
<%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
</span>
</li> </li>
<li class="homepageNewsContent fl"> <li class="homepageNewsContent fl">
<%= link_to message_content(ma.journals_for_message.notes), feedback_path(ma.journals_for_message.jour_id, :anchor => "user_activity_#{ma.journals_for_message.id}"), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank'%> <%= link_to message_content(ma.journals_for_message.notes), feedback_path(ma.journals_for_message.jour_id, :anchor => "user_activity_#{ma.journals_for_message.id}"), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank'%>

View File

@ -87,3 +87,4 @@

View File

@ -0,0 +1,12 @@
class DeleteTempErrorMessage < ActiveRecord::Migration
def up
Organization.where(:id => 68).update_all(:name => "blankname")
MessageAll.where(:message_id => 171).destroy_all
OrgMessage.where(:id => 171).destroy_all
MessageAll.where(:message_id => 16).destroy_all
OrgMessage.where(:id => 16).destroy_all
end
def down
end
end

View File

@ -0,0 +1,8 @@
class ModifyFixedVersionId < ActiveRecord::Migration
def up
Issue.where(:fixed_version_id => 0).update_all(:fixed_version_id => nil)
end
def down
end
end

View File

@ -996,6 +996,19 @@ ActiveRecord::Schema.define(:version => 20161117060138) do
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
create_table "ii", :force => true do |t|
t.integer "project_id"
t.string "author_login"
t.string "rep_identifier"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "sonar_version", :default => 0
t.string "path"
t.string "branch"
t.string "language"
t.string "sonar_name"
end
create_table "innodb_monitor", :id => false, :force => true do |t| create_table "innodb_monitor", :id => false, :force => true do |t|
t.integer "a" t.integer "a"
end end
@ -1587,6 +1600,7 @@ ActiveRecord::Schema.define(:version => 20161117060138) do
t.boolean "hidden_repo", :default => false, :null => false t.boolean "hidden_repo", :default => false, :null => false
t.integer "attachmenttype", :default => 1 t.integer "attachmenttype", :default => 1
t.integer "user_id" t.integer "user_id"
t.integer "dts_test", :default => 0
t.string "enterprise_name" t.string "enterprise_name"
t.integer "organization_id" t.integer "organization_id"
t.integer "project_new_type" t.integer "project_new_type"
@ -1594,11 +1608,6 @@ ActiveRecord::Schema.define(:version => 20161117060138) do
t.integer "forked_from_project_id" t.integer "forked_from_project_id"
t.integer "forked_count" t.integer "forked_count"
t.integer "publish_resource", :default => 0 t.integer "publish_resource", :default => 0
t.integer "boards_count", :default => 0
t.integer "news_count", :default => 0
t.integer "acts_count", :default => 0
t.integer "journals_count", :default => 0
t.integer "boards_reply_count", :default => 0
t.integer "visits", :default => 0 t.integer "visits", :default => 0
t.integer "hot", :default => 0 t.integer "hot", :default => 0
t.string "invite_code" t.string "invite_code"
@ -1625,19 +1634,6 @@ ActiveRecord::Schema.define(:version => 20161117060138) do
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
create_table "quality_analyses", :force => true do |t|
t.integer "project_id"
t.string "author_login"
t.string "rep_identifier"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "sonar_version", :default => 0
t.string "path"
t.string "branch"
t.string "language"
t.string "sonar_name"
end
create_table "queries", :force => true do |t| create_table "queries", :force => true do |t|
t.integer "project_id" t.integer "project_id"
t.string "name", :default => "", :null => false t.string "name", :default => "", :null => false

View File

@ -301,6 +301,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.w720{width:721px;} .w720{width:721px;}
.w730{width:730px;} .w730{width:730px;}
.w770{ width:770px;} .w770{ width:770px;}
.h15{ height: 15px; }
.h28{height: 28px;} .h28{height: 28px;}
.h20{height: 20px;} .h20{height: 20px;}
.h22{ height:22px;} .h22{ height:22px;}