Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2017-01-13 15:18:39 +08:00
commit b02c272998
58 changed files with 72174 additions and 6016 deletions

View File

@ -54,6 +54,7 @@ gem 'elasticsearch-rails'
### profile
# gem 'oneapm_rpm'
# gem 'therubyracer'
group :development do
gem 'grape-swagger'

View File

@ -577,19 +577,19 @@ class ApplicationController < ActionController::Base
end
def redirect_back_or_default(default, options={})
back_url = '' #params[:back_url].to_s
back_url = params[:back_url].to_s
if back_url.present?
begin
uri = URI.parse(back_url)
# do not redirect user to another host or to the login or register page
if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s) if default.is_a?(:User)
back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s) if default.is_a?(User)
redirect_to(back_url)
return
end
rescue URI::InvalidURIError
logger.warn("Could not redirect to invalid URL #{back_url}")
# redirect to default
redirect to default
end
elsif options[:referer]
redirect_to_referer_or default

View File

@ -173,12 +173,19 @@ class BlogCommentsController < ApplicationController
render_attachment_warning_if_needed(@blogComment)
#@article.save
# redirect_to user_blogs_path(:user_id=>params[:user_id])
# 给回复的人发消息
reply_user_id = params[:reply_id].nil? ? @blogComment.blog.author_id: params[:reply_id].to_i
# 回复的作业与评论的作者不是同一人则发送消息
if ( params[:reply_id].nil? && @blogComment.author.id != @blogComment.blog.author_id )|| (!params[:reply_id].nil? && @blogComment.author.id != params[:reply_id].to_i)
BlogMessage.create(:user_id => reply_user_id, :blog_id => params[:blog_id].to_i, :content => params[:blog_comment][:content],
:blog_commont_id => @blogComment.id, :blog_message_type => "BlogComment", :user_operator_id => @blogComment.author.id)
end
respond_to do |format|
format.html {
if params[:course_id] #如果呆了course_id过来了那么这是要跳到课程大纲去的
redirect_to syllabus_course_path(:id=>params[:course_id])
else
redirect_to user_blog_blog_comment_path(:user_id=>@article.author_id,:blog_id=>@article.blog_id,:id=>@article)
redirect_to user_blog_blog_comment_path(:user_id => @article.author_id, :blog_id => @article.blog_id, :id => @article)
end
}

View File

@ -51,7 +51,12 @@ class OrgSubfieldsController < ApplicationController
@organization = Organization.find(params[:id])
else
domain = Secdomain.where("subname=?", request.subdomain).first
@organization = Organization.find(domain.pid)
begin
@organization = Organization.find(domain.pid)
rescue
render_404
return
end
end
if @organization.is_public? or User.current.admin? or User.current.member_of_org?(@organization)
@org_subfield = OrgSubfield.find_by_sql("select distinct org_subfields.* from org_subfields,"+

View File

@ -28,7 +28,8 @@ class ProjectsController < ApplicationController
menu_item :feedback, :only => :feedback
menu_item :share, :only => :share
before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_project]
before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,
:view_homework_attaches,:join_project, :project_home]
before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course]
before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches]
before_filter :require_admin, :only => [ :copy, :unarchive, :destroy, :calendar]
@ -72,6 +73,22 @@ class ProjectsController < ApplicationController
### added by william
include ActsAsTaggableOn::TagsHelper
# 仅仅为了转换Gitlab地址
def project_home
rep = params[:rep]
login = params[:username]
begin
user = User.find_by_login(login)
project = Project.find_by_sql("SELECT projects.* FROM `repositories`,`projects` where repositories.project_id = projects.id and projects.user_id =#{user.try(:id)} and repositories.identifier='#{rep}'").first
respond_to do |format|
format.html{redirect_to(:controller => 'repositories', :action => 'show', :id => project.id, :repository_id => rep)}
end
rescue
render_404
return
end
end
#查找组织
def search_public_orgs_not_in_project
condition = '%%'

View File

@ -157,6 +157,9 @@ class PullRequestsController < ApplicationController
def show
# compare_pull_request source_project, source_branch, target_project, target_branch
# compare_pull_request
# 如何从个人主页点击进入,则将该消息设为“已读”
ForgeMessage.where(:forge_message_id => params[:id], :forge_message_type => "PullRequest", :user_id => User.current.id, :viewed => false).update_all(:viewed => true)
@project_menu_type = 6
@type = params[:type]
@request = @g.merge_request(@project.gpid, params[:id])
@ -189,9 +192,13 @@ class PullRequestsController < ApplicationController
def accept_pull_request
begin
@status = @g.accept_merge_rquest(@project.gpid, params[:id], User.current.gid)
user = User.find_by_login(@status.author.try(:username))
# 更新管理员的pullrequest消息
update_pullrequest_message(params[:id].to_i, @project.id, "PullRequest", 2)
# 接受后,给用户发消息
send_message_to_author(@project.id, @status.author.try(:username), params[:id], 2)
if ForgeMessage.where(:forge_message_id => params[:id].to_i, :project_id => @project.id, :forge_message_type => "PullRequest", :user_id => user.id).count == 0
send_message_to_author(@project.id, @status.author.try(:username), params[:id], 2)
end
respond_to do |format|
format.js{redirect_to project_pull_request_path(@status.id, :project_id => @project.id)}
end
@ -225,8 +232,10 @@ class PullRequestsController < ApplicationController
request = @g.update_merge_request(@project.gpid, params[:id], User.current.gid, :state_event => params[:state])
user = User.find_by_login(request.author.try(:username))
status = params[:state] == "close" ? 4 : 3
send_message_to_manager(@project.id, params[:id], status)
if is_project_manager?(User.current.id, @project.id)
#send_message_to_manager(@project.id, params[:id], status)
update_pullrequest_message(request.id, @project.id, "PullRequest", status)
# 给作者发送消息,如何已经发送了消息,则不发
if is_project_manager?(User.current.id, @project.id) && ForgeMessage.where(:forge_message_id => request.id, :project_id => @project.id, :forge_message_type => "PullRequest", :user_id => user.id).count == 0
send_message_to_author(@project.id, user.login, request.id, status)
end
respond_to do |format|
@ -360,12 +369,21 @@ class PullRequestsController < ApplicationController
:project_id => project_id,
:forge_message_id => pull_request_id,
:forge_message_type => "PullRequest",
:viewed => true,
:viewed => false,
:status => status,
:operate_user_id => User.current.id,
)
end
def update_pullrequest_message forge_message_id, project_id, forge_message_type, status
# 更新这条pullrequest消息所有相关的信息
ForgeMessage.where(:forge_message_id => forge_message_id, :project_id => project_id, :forge_message_type => forge_message_type).update_all(:status => status, :operate_user_id => User.current.id, :updated_at => Time.now)
# 更新自己的消息为已读
ForgeMessage.where(:forge_message_id => forge_message_id, :project_id => project_id, :forge_message_type => forge_message_type, :user_id => User.current.id).update_all(:viewed => true)
# 更新pullrequest的status字段
PullRequest.where(:pull_request_id => forge_message_id).update_all(:status => status)
end
def authorize_logged
if !User.current.logged?
redirect_to signin_path

View File

@ -6,7 +6,7 @@ class QualityAnalysisController < ApplicationController
layout "base_projects"
include ApplicationHelper
include QualityAnalysisHelper
require 'jenkins_api_client'
# require 'jenkins_api_client'
require 'nokogiri'
require 'json'
require 'open-uri'
@ -230,7 +230,7 @@ class QualityAnalysisController < ApplicationController
# resource_id: login + @repository.id
def index
# 顶部导
# 顶部导
@project_menu_type = 5
begin

View File

@ -407,7 +407,8 @@ update
@entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
else
unless @entries.blank?
@changesets_latest_coimmit = @g.commit(@project.gpid, @entries.first.try(:lastrev))
@changesets_latest_coimmit = @g.rep_last_changes(@project.gpid, :rev => @rev, :path => @path)
# @g.rep_last_changes(@project.gpid, :rev => @rev, :path => @path)
# 总的提交数
@changesets_all_count = @g.user_static(@project.gpid, :rev => @rev).count
# 获取默认分支
@ -497,7 +498,8 @@ update
entry_and_raw(false)
@content = @repository.cat(@path, @rev)
@changesets_latest_coimmit = @g.commit(@project.gpid, @entry.try(:lastrev))
# @changesets_latest_coimmit = @g.commit(@project.gpid, @entry.try(:lastrev))
@changesets_latest_coimmit = @g.rep_last_changes(@project.gpid, :rev => @rev, :path => @path)
# 总的提交数
@changesets_all_count = @g.user_static(@project.gpid, :rev => @rev).count
if is_entry_text_data?(@content, @path)

File diff suppressed because it is too large Load Diff

View File

@ -1341,6 +1341,8 @@ module ApplicationHelper
title << @contest.name
elsif @organization
title << @organization.name
elsif @forum || params[:controller] == "forums"
title << "问吧"
elsif @user
if !@project_community.blank?
title << @project_community

View File

@ -307,7 +307,8 @@ module UsersHelper
user_feedback_count = UserFeedbackMessage.where("user_id =? and viewed =?", user, 0).count
user_memo_count = MemoMessage.where("user_id =? and viewed =?", user, 0).count
at_count = user.at_messages.where(viewed: false).count
messages_count = course_count + forge_count + user_feedback_count + user_memo_count + at_count + org_count
contest_count = ContestMessage.where(:user_id => user, :viewed => 0).count
messages_count = course_count + forge_count + user_feedback_count + user_memo_count + at_count + org_count + contest_count
end
def user_mail_notification_options(user)

View File

@ -0,0 +1,20 @@
class BlogMessage < ActiveRecord::Base
# attr_accessible :title, :body
attr_accessible :content, :blog_commont_id, :blog_message_type, :viewed, :user_id, :blog_id, :user_operator_id
belongs_to :blog_comment ,:polymorphic => true
belongs_to :user
has_many :message_alls, :class_name => 'MessageAll', :as => :message, :dependent => :destroy
validates :user_id, presence: true
validates :blog_id, presence: true
validates :blog_commont_id, presence: true
validates :blog_message_type, presence: true
after_create :add_user_message
def add_user_message
if MessageAll.where("message_type = '#{self.class.to_s}' and message_id = '#{self.id}'").first.nil?
self.message_alls << MessageAll.new(:user_id => self.user_id)
end
end
end

View File

@ -48,6 +48,7 @@ class Message < ActiveRecord::Base
has_many :forge_messages, :class_name => 'ForgeMessage', :as => :forge_message, :dependent => :destroy
has_many :contest_messages, :class_name =>'ContestMessage', :as => :contest_message, :dependent => :destroy
has_many :at_messages, as: :at_message, dependent: :destroy
has_many :blog_messages, :class_name => 'BlogMessage', :as => :blog_message, :dependent => :destroy
has_many :ActivityNotifies,:as => :activity, :dependent => :destroy

View File

@ -1,5 +1,6 @@
class MessageAll < ActiveRecord::Base
attr_accessible :message_id, :message_type, :user_id
belongs_to :user
# 虚拟关联---项目消息表/课程消息表/用户留言消息表/贴吧消息表
belongs_to :message ,:polymorphic => true
end

View File

@ -1,6 +1,6 @@
class PullRequest < ActiveRecord::Base
# status 1创建 2接受 3重新打开 4关闭
attr_accessible :gpid, :pull_request_id, :user_id, :project_id, :title
attr_accessible :gpid, :pull_request_id, :user_id, :project_id, :title, :status
validates_uniqueness_of :pull_request_id
has_many :forge_messages, :class_name => 'ForgeMessage', :as => :forge_message, :dependent => :destroy

View File

@ -2,14 +2,19 @@
<div class="fl mr10"><%= link_to image_tag(url_to_avatar(User.current), :width => 50, :height => 50,:alt=>'贴吧图像' ), user_path( User.current) %></div>
<div class="fl">
<div class="f16 fontGrey2 ml38">我在问吧</div>
<div class="homepageImageBlock" style="width: 68px !important;">
<div><a href="javascript:void(0);" class="homepageImageNumber" style="cursor: default"><%= @my_memos_count %></a></div>
<div class="homepageImageText">回答</div>
<div class="homepageImageBlock" style="width: 75px !important;">
<!--<div><a href="javascript:void(0);" class="homepageImageNumber" style="cursor: default"><%#= @my_memos_count %></a></div>-->
<div class="mt10">
<div class="homepageImageText fl ml10">回答</div>
<div><a href="javascript:void(0);" class="homepageImageNumber fl ml10" style="cursor: default;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%= @my_memos_count %>"><%= @my_memos_count %></a></div>
</div>
</div>
<div class="homepageVerDiv"></div>
<div class="homepageImageBlock" style="width: 68px !important;">
<div><a href="javascript:void(0);" class="homepageImageNumber" style="cursor: default"><%= @my_forums_count %></a></div>
<div class="homepageImageText">发帖</div>
<!-- <div class="homepageVerDiv"></div>-->
<div class="homepageImageBlock" style="width: 70px !important;">
<div class="mt10">
<div class="homepageImageText fl ml10">发帖</div>
<div><a href="javascript:void(0);" class="homepageImageNumber fl ml10" style="width:26px;cursor:default; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%= @my_forums_count %>"><%= @my_forums_count %></a></div>
</div>
</div>
</div>
<div class="cl"></div>

View File

@ -1,14 +1,9 @@
<% @forums.each_with_index do |forum, i| %>
<div class="wenba-rightbar-li clearfix <%= i > 9 ? 'none' : ''%> " id="forum_list_<%= forum.id %>">
<h4 class="fl wenba-rightbar-title mt5 ml10" style="border-bottom: 0px"><%= link_to forum.name, forum_path(forum), :class => "", :target => "_blank" %></h4>
<ul class=" fl right-line wenba-rightbar-ul" >
<li><%= link_to forum.memo_count, forum_path(forum), :class => "linkGrey5" %></li>
<li>回答</li>
</ul>
<ul class=" fl wenba-rightbar-ul" >
<li><%= link_to forum.topic_count, forum_path(forum), :class => "linkGrey5" %></li>
<li>帖子</li>
</ul>
<% @forums.each_with_index do |forum, i| %>
<div class="wenba-rightbar-li clearfix <%= i > 9 ? 'none' : ''%> " id="forum_list_<%= forum.id %>">
<h4 class="fl wenba-rightbar-title mt5 ml10" style="border-bottom: 0px;font-weight: normal;"><%= link_to forum.name, forum_path(forum), :style => "color:#666;", :target => "_blank" %></h4>
<div style="width: 40px; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" class="mt5 mr10 fr" title="回答数+帖子数">
<%= link_to forum.topic_count + forum.memo_count, forum_path(forum), :class => "fontGrey4", :style => "font-size: 10px;" %>
</div>
<% end %>
</div>
<% end %>

View File

@ -33,9 +33,10 @@
<a href="<%= forum_memo_path(topic.forum, topic)%>" class="postReplyIcon mr5" target="_blank"></a>
<% replies_count = Memo.where("root_id = #{topic.id}").count %>
<%= link_to (replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
<% if get_praise_num(topic) > 0 %>
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
<% end %>
</div>
<div class="postDetailDes maxh300" id = "postDetailDes_<%= topic.id %>">
<div id="intro_content_<%= topic.id %>">
<%= topic.content.html_safe%>

View File

@ -9,7 +9,7 @@
<div class="postSort" id="popu"><a href="javascript:void(0);" class="linkGrey2 fl">人气</a><a href="javascript:void(0);" id="reorder_popu" class=""></a></div>
<div class="postSort" id="complex"><a href="javascript:void(0);" class="linkGrey2 fl">综合</a><a href="javascript:void(0);" id="reorder_complex" class=""></a><!--<a href="javascript:void(0);" class="sortArrowActiveD"></a>--></div>
<div class="creatPost" id="create_memo_btn">
<%= link_to "发布新帖",new_forum_memo_path(:forum_id => Forum.first.id), :class => "c_white db creatPostIcon bBlue" %>
<%= link_to "发布新帖",new_forum_memo_path(:forum_id => Forum.first.id), :class => "c_white db creatPostIcon bGreen" %>
</div>
<div class="cl"></div>
</div>
@ -23,7 +23,7 @@
<div class="wenba-rightbar fr">
<div class="wenba-rightbar-top clearfix">
<h3 class="fl ml10">问吧</h3>
<%= link_to "新建贴吧", new_forum_path, :class => "btn-blue btn fr mt5 mr5", :remote => true %>
<%= link_to "新建贴吧", new_forum_path, :class => "btn-blue forum_btn fr mt7 mr5", :remote => true %>
</div>
<div id="forums_right_list">
<%= render :partial => "forums/right_bar" %>

View File

@ -58,11 +58,7 @@
<% name = name%>
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
<% if hidden_unproject_infos %>
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词搜索公开的课程、班级、项目、用户、资源以及帖子" />
<% else %>
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词搜索公开的项目、用户、资源以及帖子" />
<% end %>
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词搜索" style="width: 300px" />
<input type="hidden" name="search_type" id="type" value="all"/>
<input type="text" style="display: none;"/>
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
@ -99,8 +95,9 @@
<div class="navHomepageNews" id="user_messages">
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
<% if User.current.count_new_message.to_i > 0 %>
<div ><%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
<% new_message_count = User.current.count_new_message.to_i %>
<% if new_message_count > 0 %>
<div ><%= link_to new_message_count, user_message_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
<% end %>
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
<div class="shadowbox_news undis" id="user_messages_list">

View File

@ -202,11 +202,17 @@
<li><a href="<%=news_path(ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 发布了新闻:<%= ma.forge_message.title.html_safe%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>发布了新闻:<%= ma.forge_message.title.html_safe%></a></li>
<% elsif ma.forge_message_type == "Comment" %>
<li><a href="<%=news_path(ma.forge_message.commented.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 评论了新闻:<%= ma.forge_message.commented.title%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>评论了新闻:<%= ma.forge_message.commented.title%></a></li>
<%# elsif ma.forge_message_type == "PullRequest" && PullRequest.where(:pull_request_id => ma.forge_message_id).count != 0%>
<%# send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
<%# author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
<!-- <li><a href="<%#= project_pull_requests_path(ma.project_id) %>" target="_blank" title="<%#= User.find(author.id).show_name %> <%#= pull_request_message_status(ma) %> <%#= send_message_user[0].title %>"><span class="shadowbox_news_user"><%#= User.find(author.id).show_name %> </span><%#= pull_request_message_status(ma) %> <%#= send_message_user[0].title %></a></li>-->
<% elsif ma.forge_message_type == "PullRequest" && PullRequest.where(:pull_request_id => ma.forge_message_id).count != 0%>
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
<% author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
<li><a href="<%= project_pull_requests_path(ma.project_id) %>" target="_blank" title="<%= User.find(author.id).show_name %> <%= pull_request_message_status(ma) %> <%= send_message_user[0].title %>"><span class="shadowbox_news_user"><%= User.find(author.id).show_name %> </span><%= pull_request_message_status(ma) %> <%= send_message_user[0].title %></a></li>
<% end %>
<% elsif ma.class == BlogMessage %>
<% if ma.blog_message_type == "BlogComment" %>
<% user_id = User.find(BlogComment.find(ma.blog_commont_id).blog.author_id) %>
<% blog_id = BlogComment.find(ma.blog_commont_id).root_id %>
<li><a href="<%= user_blog_blog_comment_path(:user_id => user_id, :blog_id => ma.blog_id, :id => blog_id) %>" target="_blank" title="<%= User.find(ma.user_operator_id).show_name %> 回复了博客:<%= message_content(ma.content) %>"><span class="shadowbox_news_user"><%= User.find(ma.user_operator_id).show_name %> </span>回复了博客:<%= message_content(ma.content) %></a></li>
<% end %>
<% elsif ma.class == MemoMessage %>
<% if ma.memo_type == "Memo" && !ma.memo.nil? && !ma.memo.author.nil? %>
<li><a href="<%=forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id) %>" target="_blank" title="<%=ma.memo.author.show_name %> <%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %><%= ma.memo.parent_id.nil? ? ma.memo.subject : message_content(ma.memo.content)%>"><span class="shadowbox_news_user"><%=ma.memo.author.show_name %> </span><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %><%= ma.memo.parent_id.nil? ? ma.memo.subject : message_content(ma.memo.content)%></a></li>

View File

@ -11,7 +11,7 @@
<%= heads_for_theme %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application','prettify', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= stylesheet_link_tag 'css/common','css/structure','css/public','css/forum','css/popup' ,:media => 'all'%>
<%= stylesheet_link_tag 'css/common','css/structure','css/public','css/forum','css/popup', 'css/font-awesome', :media => 'all'%>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>

View File

@ -9,7 +9,7 @@
<%= favicon %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel', 'css/font-awesome' %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>

View File

@ -1,4 +1,5 @@
<%= javascript_include_tag 'highcharts','highcharts-more' %>
<%= render :partial => "header" %>
<div class="container-big mb10">

View File

@ -3,15 +3,13 @@
<% unless @path.blank? %>
<tbody>
<tr style="border: 1px solid #DDD; border-bottom:none;">
<td>
<a href="javascript:history.go(-1)" class="fl linkBlue2 mt3" >
<span class="new_roadmap_icons_back mr5"></span>
返回上级目录
</a>
<td colspan="4">
<!--<a href="javascript:history.go(-1)" class="fl linkBlue2 mt3" >-->
<!--<span class="new_roadmap_icons_back mr5"></span>-->
<!--<span></span>返回上级目录-->
<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
<!--</a>-->
</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
<% end %>

View File

@ -22,7 +22,7 @@
<% end %>
<%= link_to h(ent_name),
{:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
:class => (entry.is_dir? ? 'old-icon old-icon-folder' : "old-icon old-icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
</td>
<div id="children_tree">
<td class="tree-author c_grey">

View File

@ -1,25 +1,11 @@
<div class="recordBanner mt3">
<% if @changesets_latest_coimmit %>
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150 ml5"><%=link_to get_user_by_mail(@changesets_latest_coimmit.author_email).show_name, user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
<div class="fl">提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:</div>
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
</span>
<% else %>
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150 ml5"><%= @changesets_latest_coimmit.author_email %></div>
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %></div>
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
</span>
<%end%>
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.try(:author_email))), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
<%= link_to_user_mail(@changesets_latest_coimmit.try(:author_email), "fb fontGrey3 mr5 fl hidden maxwidth150 ml5") %>
<div class="fl">提交于 <%= time_tag(@changesets_latest_coimmit.try(:time)) %> 前:</div>
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.message %>"><%= @changesets_latest_coimmit.message %></div>
<% end %>
<% if @entry && @entry.kind == 'file' %>
<%= render :partial => 'link_to_functions' %>
<% else %>
<span class="fr mr5 "><font class="fb ml2 mr2 vl_branch mt2"><%= @repository.branches.count %></font> 个分支</span>
<% end %>
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
<%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
</span>
</div>

View File

@ -17,8 +17,9 @@
{:method => :get, :id => 'revision_selector'}) do -%>
<!-- Branches Dropdown -->
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
<%= l(:label_branch) %>:
<%= select_tag :branch, options_for_select(@repository.branches, @rev), :id => 'branch' %>
<label class="pro-fenzhi-label fl">分支</label>
<%= select_tag :branch, options_for_select(@repository.branches, @rev), :id => 'branch', :class => "pro-fenzhi-select fl" %>
<% end -%>
<%# if !@repository.tags.nil? && @repository.tags.length > 0 -%>

View File

@ -1,8 +1,5 @@
<%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
<div class="wrap-big">
<div class="project_r_h">
<%= render :partial => "top" %>
</div>
<div class="repository_con" style="line-height:1.9;">
<% if @entries.nil? %>
<%# 未提交代码提示 %>
@ -20,33 +17,43 @@
<div class="cl"></div>
</div>
<% else %>
<%= render :partial => 'navigation' %>
<div class="fl c_grey02 mt5 mr5">克隆网址:</div>
<textarea id="copy_rep_content" class="cloneUrl mt5 fl" type="input" ><%= @repos_url.to_s.lstrip %></textarea>
<a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy" title="点击复制版本库地址"></span></a>
<!--quality_analysis-->
<% unless @entries.nil? %>
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
<% if User.current.member_of?(@project) && @project.is_public? %>
<% if quality_analysis(User.current.try(:login), @repository.id).nil? %>
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
<% else %>
<%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
<% end %>
<% end %>
<% end %>
<% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
<%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
<% end %>
<ul class="clearfix pro-top-info mb10">
<li><i class="icon-time mr5 c_grey02 f16 fb"></i>
<%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)}",
{:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param,
:rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"}, :class => "linkBlue fb" %> 提交
</li>
<li><i class="icon-sitemap mr5 c_grey02 f16 fb"></i>
<a class="linkBlue fb "><%= @repository.branches.count %></a>分支
</li>
<li><i class="icon-bar-chart mr5 c_grey02 f16 fb"></i>
<%=link_to "贡献统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev,
:creator => @creator, :default_branch => @g_default_branch ) %>
</li>
</ul>
<div class=" clearfix mb5">
<div class=" fl clearfix">
<%= render :partial => 'navigation' %>
</div>
<a href="<%= @zip_path %>" class="btn_zipdown fl ml10" onclick="">ZIP下载</a>
<% if User.current.member_of?(@project) && @project.is_public? %>
<% if quality_analysis(User.current.try(:login), @repository.id).nil? %>
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fl ml10" %>
<% else %>
<%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fl ml10" %>
<% end %>
<% end %>
<% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
<%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fl ml10" %>
<% end %>
<div class="fl mt5 ml15">
<%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>
</div>
<div class="cl"></div>
<!--目录跳转-->
<div class="mt3">
<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
<div class="fr ">
<label class="pro-fenzhi-label fl">克隆网址</label>
<input type="text" id="copy_rep_content" class="pro-fenzhi-input fl" value="<%= @repos_url.to_s.lstrip %>"/>
<a href="javascript:void(0);" alt="点击复制版本库地址" onclick="jsCopy()" title="点击复制版本库地址" class="fl pro-fenzhi-a"><i class="icon-copy"></i></a>
</div>
</div>
<div class="cl"></div>
<%= render :partial => 'latest_commit' %>
<div class="cl"></div>

View File

@ -7,7 +7,7 @@
<ul class="sy_classlist">
<span class="icons-user-homework homework-user-leftnav-li fl"></span>
<div class="fl ">
<h3 class="sy_classlist_title fl">
<h3 class="sy_classlist_title fl" style="max-width: 800px" title="<%= homework.course.name %> / <%= homework.name %>">
<%= link_to homework.course.name+" / "+homework.name, student_work_index_path(:homework => homework.id), :class => 'sy_cblack', :target => '_blank' %>
</h3>
<div class="cl"></div>

View File

@ -1,32 +1,51 @@
<% message_alls.each do |ma| %>
<%# 系统消息 %>
<%= render :partial => 'users/user_message_system', :locals => {:ma => ma} %>
<%# 系统消息总显示在最上面 %>
<%= render :partial => 'users/user_message_system' %>
<%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
<% message_alls.each do |ma| %>
<% ma = ma.try(:message) %>
<% if ma.class == AtMessage && ma.at_valid? && ma.at_message %>
<%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
<% end %>
<%# 课程消息 %>
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
<% if ma.class == CourseMessage %>
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
<% end %>
<!--项目消息-->
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
<% if ma.class == ForgeMessage %>
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
<% end %>
<%# 竞赛消息 %>
<%= render :partial => 'users/user_message_contest', :locals => {:ma => ma} %>
<% if ma.class == ContestMessage %>
<%= render :partial => 'users/user_message_contest', :locals => {:ma => ma} %>
<% end %>
<%# 博客消息 %>
<%= render :partial => 'users/user_message_blog', :locals => {:ma => ma} %>
<!--公共贴吧-->
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
<% if ma.class == MemoMessage %>
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
<% end %>
<!--用户留言-->
<%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
<% if ma.class == UserFeedbackMessage %>
<%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
<% end %>
<%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %>
<% if ma.class == OrgMessage %>
<%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %>
<% end %>
<%# 申请类消息 %>
<%= render :partial => 'users/user_message_applied', :locals => {:ma => ma} %>
<% if ma.class == AppliedMessage %>
<%= render :partial => 'users/user_message_applied', :locals => {:ma => ma} %>
<% end %>
<% end %>
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
<%= pagination_links_full @message_all_pages, @messages_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
</ul>
<script>
$(function(){

View File

@ -7,7 +7,7 @@
<ul class="sy_classlist">
<span class="icons-user-homework homework-user-leftnav-li fl"></span>
<div class="fl ">
<h3 class="sy_classlist_title fl">
<h3 class="sy_classlist_title fl" style="max-width: 800px" title="<%= homework.course.name %> / <%= homework.name %>">
<%= link_to homework.course.name + " / " +homework.name, student_work_index_path(:homework => homework.id), :class => 'sy_cblack', :target => '_blank' %>
</h3>
<div class="cl"></div>

View File

@ -1,34 +1,33 @@
<% if ma.class == AtMessage && ma.at_valid? && ma.at_message %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%= link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"), user_path(ma.author) %>
</li>
<li class="homepageNewsPubType fl">
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%= link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"), user_path(ma.author) %>
</li>
<li class="homepageNewsPubType fl">
<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 class="messageInformationContents">
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,
:topic_id => ma.at_message.id),
:title => "#{ma.subject.html_safe}",
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,
:topic_id => ma.at_message.id),
:title => "#{ma.subject.html_safe}",
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
<% else %>
<%= link_to ma.subject.html_safe, ma.url,
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
:title => "#{ma.subject.html_safe}" %>
<% end %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
</li>
<li class="messageInformationContents">
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,
:topic_id => ma.at_message.id),
:title => "#{ma.subject.html_safe}",
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,
:topic_id => ma.at_message.id),
:title => "#{ma.subject.html_safe}",
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
<% else %>
<%= link_to ma.subject.html_safe, ma.url,
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
:title => "#{ma.subject.html_safe}" %>
<% end %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>

View File

@ -7,25 +7,25 @@
<% elsif ma.status == 2 %>
<span class="fontGrey3" style="font-size:14px;">已处理</span>
<% elsif ma.status == 4 %>
<% operator_message = AppliedMessage.where("applied_id=? and status = 4", ma.applied_id).first %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<span class="fontGrey3" style="font-size:14px" title="<%= operator %>已拒绝">
<%= operator %>已拒绝
</span>
<% elsif ma.status == 5 %>
<% operator_message = AppliedMessage.where("applied_id=? and status not in (2,5)", ma.applied_id).first %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.applied_user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<span class="fontGrey3" style="font-size:14px" title="<%= operator %>已拒绝">
<%= operator %>已拒绝
</span>
<% elsif ma.status == 6 %>
<% operator_message = AppliedMessage.where("applied_id=? and status = 6", ma.applied_id).first %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 6", ma.applied_id, ma.user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<span class="fontGrey3" style="font-size:14px" title="<%= operator %>已同意">
<%= operator %>已同意
</span>
<% elsif ma.status == 7 %>
<% operator_message = AppliedMessage.where("applied_id=? and status not in (2,7)", ma.applied_id).first %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 6", ma.applied_id, ma.applied_user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<span class="fontGrey3" style="font-size:14px" title="<%= operator %>已同意">
<%= operator %>已同意

View File

@ -1,54 +1,52 @@
<% if ma.class == AppliedMessage %>
<!-- 申请添加单位 -->
<% if ma.applied_type == "ApplyAddSchools" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<% if ma.status == 0 %>
<% applied_user = User.find(ma.applied_user_id) %>
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
<% else %>
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
<% end %>
</li>
<li class="homepageNewsPubType fl">
<%= render :partial => "users/user_message_applied_schools", :locals =>{:ma => ma} %>
</li>
<li class = "messageInformationContents">
<%= render :partial => "users/user_message_applied_school_action", :locals =>{:ma => ma} %>
</li>
<!-- 申请添加单位 -->
<% if ma.applied_type == "ApplyAddSchools" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<% if ma.status == 0 %>
<% applied_user = User.find(ma.applied_user_id) %>
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
<% else %>
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
<% end %>
</li>
<li class="homepageNewsPubType fl">
<%= render :partial => "users/user_message_applied_schools", :locals =>{:ma => ma} %>
</li>
<li class = "messageInformationContents">
<%= render :partial => "users/user_message_applied_school_action", :locals =>{:ma => ma} %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<!-- 申请加入项目 -->
<% elsif ma && ma.applied_type == "AppliedProject" %>
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
</ul>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<!-- 申请加入项目 -->
<% elsif ma && ma.applied_type == "AppliedProject" %>
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
</ul>
<!-- 匿评成绩申诉 -->
<% elsif ma && ma.applied_type == "StudentWorksScoresAppeal" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<% applied_user = User.find(ma.applied_user_id) %>
<li class="homepageNewsPortrait fl">
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to applied_user.show_name, user_path(applied_user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申诉匿评成绩:</span>
</li>
<li class="messageInformationContents fl">
<% homework = ma.applied.student_works_score.student_work.homework_common %>
<%= link_to homework.name, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %>
</li>
</ul>
<% elsif ma && ma.applied_type == "AppliedContest" %>
<ul class="homepageNewsList fl" id="contest_message_join_<%=ma.id %>">
<%= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
</ul>
<% end %>
<% end %>
<% elsif ma && ma.applied_type == "StudentWorksScoresAppeal" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<% applied_user = User.find(ma.applied_user_id) %>
<li class="homepageNewsPortrait fl">
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to applied_user.show_name, user_path(applied_user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申诉匿评成绩:</span>
</li>
<li class="messageInformationContents fl">
<% homework = ma.applied.student_works_score.student_work.homework_common %>
<%= link_to homework.name, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %>
</li>
</ul>
<% elsif ma && ma.applied_type == "AppliedContest" %>
<ul class="homepageNewsList fl" id="contest_message_join_<%=ma.id %>">
<%= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
</ul>
<% end %>

View File

@ -0,0 +1,22 @@
<% if ma.class == BlogMessage %>
<% if ma.blog_message_type == "BlogComment" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%= link_to image_tag(url_to_avatar(User.find(ma.user_operator_id)), :width => "30", :height => "30"), user_path(ma.user_operator_id), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%= link_to User.find(ma.user_operator_id).show_name, user_path(ma.user_operator_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">回复了博客:</span>
</li>
<li class="messageInformationContents">
<% user_id = User.find(BlogComment.find(ma.blog_commont_id).blog.author_id) %>
<% blog_id = BlogComment.find(ma.blog_commont_id).root_id %>
<%= link_to message_content(ma.content), user_blog_blog_comment_path(:user_id => user_id, :blog_id => ma.blog_id, :id => blog_id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>

View File

@ -1,4 +1,4 @@
<% if ma.class == ContestMessage %>
<% if ma.contest_message_type == "ContestRequestDealResult" %>
<% user = User.find(ma.user_id) %>
<% if ma.content
@ -310,5 +310,4 @@
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% end %>

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,37 @@
<% if ma.class == ForgeMessage %>
<!--申请加入项目-->
<% if ma.forge_message_type == "AppliedProject" %>
<% if ma.forge_message_type == "AppliedProject" %>
<%#= 这类数据其实已经不要了 %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%= link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">申请加入:</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--被管理员拉入项目-->
<% if ma.forge_message_type == "JoinProject" %>
<% unless ma.project.nil? %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%= link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %>
<%=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' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">申请加入:</span>
<%=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="homepageNewsType fl">将您加入了项目</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
@ -19,192 +39,110 @@
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--被管理员拉入项目-->
<% if ma.forge_message_type == "JoinProject" %>
<% unless ma.project.nil? %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=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' %>
</li>
<li class="homepageNewsPubType fl">
<%=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="homepageNewsType fl">将您加入了项目:</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<!--被管理员移出项目-->
<% if ma.forge_message_type == "RemoveFromProject" %>
<% unless ma.project.nil? %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=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' %>
</li>
<li class="homepageNewsPubType fl">
<%=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="homepageNewsType fl">将您移出了项目:</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--被管理员移出项目-->
<% if ma.forge_message_type == "RemoveFromProject" %>
<% unless ma.project.nil? %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=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' %>
</li>
<li class="homepageNewsPubType fl">
<%=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="homepageNewsType fl">将您移出了项目:</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<!--邀请加入项目-->
<% if ma.forge_message_type == "ProjectInvite" %>
<% inviter = User.find(ma.forge_message_id) %>
<% end %>
<!--邀请加入项目-->
<% if ma.forge_message_type == "ProjectInvite" %>
<% inviter = User.find(ma.forge_message_id) %>
<ul class="homepageNewsList fl">
<div class="shortMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目:</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.project, project_path(ma.project),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "ma.project"
%>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<% unless User.current.member_of?(ma.project) %>
<li class="messageOperateContents fl">
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
:value => ma.secret_key,
:class => "green_btn_cir",
:style => "color:#fff",
:target => '_blank' %>
</li>
<% end %>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Issue" %>
<% if ma.status == 1%>
<ul class="homepageNewsList fl">
<div class="shortMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter), :target => '_blank' %>
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目:</span>
<%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">
<%= ma.forge_message.tracker_id == 5 ? "发布的周报:" : "指派给你的问题:"%>
</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.project, project_path(ma.project),
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "ma.project"
:title => "#{ma.forge_message.subject}"
%>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<% unless User.current.member_of?(ma.project) %>
<li class="messageOperateContents fl">
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
:value => ma.secret_key,
:class => "green_btn_cir",
:style => "color:#fff",
:target => '_blank' %>
</li>
<% end %>
<li class="messageOperateContents fl" title="截止时间快到了!">截止时间快到啦</li>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Issue" %>
<% if ma.status == 1%>
<ul class="homepageNewsList fl">
<div class="shortMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">
<%= ma.forge_message.tracker_id == 5 ? "发布的周报:" : "指派给你的问题:"%>
</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "#{ma.forge_message.subject}"
%>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="messageOperateContents fl" title="截止时间快到了!">截止时间快到啦</li>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% else %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">
<% else %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">
<%= ma.forge_message.tracker_id == 5 ? "发布了周报:" : "指派了问题给你:"%>
</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.forge_message.subject,
issue_path(:id => ma.forge_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "#{ma.forge_message.subject}"
%>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% if ma.forge_message_type == "Journal" && ma.forge_message %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%= link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">更新了问题状态:</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.forge_message.journalized.subject,
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover =>"message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Message" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span>
</li>
<li class="messageInformationContents">
<%= 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' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">评论了新闻:</span>
</li>
<li class="messageInformationContents">
<%= 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' %>
<%= link_to ma.forge_message.subject,
issue_path(:id => ma.forge_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "#{ma.forge_message.subject}"
%>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
@ -212,29 +150,89 @@
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% if ma.forge_message_type == "Journal" && ma.forge_message %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%= link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">更新了问题状态:</span>
</li>
<li class="messageInformationContents">
<%= link_to ma.forge_message.journalized.subject,
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover =>"message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Message" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span>
</li>
<li class="messageInformationContents">
<%= 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' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="homepageNewsType fl">评论了新闻:</span>
</li>
<li class="messageInformationContents">
<%= 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' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "PullRequest" && PullRequest.where(:pull_request_id => ma.forge_message_id).count != 0 %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
<% author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
<%= link_to image_tag(url_to_avatar(author), :width => "30", :height => "30"), user_path(author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%= link_to User.find(author.id).show_name, user_path(author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
<% if ma.forge_message_type == "PullRequest" && PullRequest.where(:pull_request_id => ma.forge_message_id).count != 0 %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
<% author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
<%= link_to image_tag(url_to_avatar(author), :width => "30", :height => "30"), user_path(author), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%= link_to User.find(author.id).show_name, user_path(author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
<%= pull_request_message_status(ma) %>
</span>
</li>
<li class="messageInformationContents">
<%= link_to "#{send_message_user[0].title}", project_pull_requests_path(ma.project_id),
<%= link_to "#{send_message_user[0].title}", project_pull_request_path(ma.forge_message_id, :project_id => ma.project_id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
<li class="homepageNewsTime fr"><%= time_tag(ma.updated_at).html_safe %> </li>
</ul>
<% end %>
<% end %>

View File

@ -1,4 +1,4 @@
<% if ma.class == MemoMessage %>
<% if ma.memo_type == "Memo" && !ma.memo.nil? && !ma.memo.author.nil? %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
@ -26,4 +26,3 @@
<li class="homepageNewsTime fr"><%= time_tag(ma.memo.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>

View File

@ -2,22 +2,26 @@
<div class="NewsBannerName">
消息动态
</div>
<span class="fr" style="margin-top:5px;">
共 <span style="color: red;"><%= @message_count %></span> 个消息
</span>
<% count = unviewed_message(@user) %>
<span class="fr" style="margin-top:5px;">
<% unless (count == 0 || User.current != @user) %>
<%= link_to "全部设为已读", user_path(User.current, :viewed => 'all'), :class => "fl mr10" %>
<% end %>
<span class="fl">共 <span style="color: red;"><%= @message_count %></span> 个消息</span>
</span>
</div>
<div class="resources">
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
</div>
<script>
$(function(){
$(".messageInformationContents").each(function(){
var parentWidth = $(this).parent().width();
var eq0Width = $(this).parent().children().eq(0).width();
var eq1Width = $(this).parent().children().eq(1).width();
var classWidth = parentWidth - eq0Width - eq1Width - 20;
$(this).css("max-width",classWidth + "px");
});
});
$(function(){
$(".messageInformationContents").each(function(){
var parentWidth = $(this).parent().width();
var eq0Width = $(this).parent().children().eq(0).width();
var eq1Width = $(this).parent().children().eq(1).width();
var classWidth = parentWidth - eq0Width - eq1Width - 20;
$(this).css("max-width",classWidth + "px");
});
});
</script>

View File

@ -1,44 +1,43 @@
<% if ma.class == OrgMessage %>
<% if ma.message_type == 'ApplySubdomain'%>
<ul class="homepageNewsList fl">
<div class="shortMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.organization), :width => "30", :height => "30"), organization_path(ma.organization_id), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.organization.name, organization_path(ma.organization_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class='homepageNewsType fl'>申请子域名:</span>
</li>
<li class="messageInformationContents">
<%= ma.content %>
</li>
</div>
<li class="messageOperateContents fl">
<%=link_to (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准",
agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ),
:id => "agree_apply_subdomain_#{ma.id}",
:method => 'post',
:remote => true,
:class => 'link-blue'
%>
</li>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.message_type == 'AgreeApplySubdomain'%>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>
</li>
<li class="homepageNewsPubType fl">
<span class='homepageNewsType fl'>管理员同意了您的子域名申请:</span>
</li>
<li class="messageInformationContents">
<%= ma.content %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% if ma.message_type == 'ApplySubdomain'%>
<ul class="homepageNewsList fl">
<div class="shortMessageWidth">
<li class="homepageNewsPortrait fl">
<%=link_to image_tag(url_to_avatar(ma.organization), :width => "30", :height => "30"), organization_path(ma.organization_id), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.organization.name, organization_path(ma.organization_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class='homepageNewsType fl'>申请子域名:</span>
</li>
<li class="messageInformationContents">
<%= ma.content %>
</li>
</div>
<li class="messageOperateContents fl">
<%=link_to (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准",
agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ),
:id => "agree_apply_subdomain_#{ma.id}",
:method => 'post',
:remote => true,
:class => 'link-blue'
%>
</li>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.message_type == 'AgreeApplySubdomain'%>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>
</li>
<li class="homepageNewsPubType fl">
<span class='homepageNewsType fl'>管理员同意了您的子域名申请:</span>
</li>
<li class="messageInformationContents">
<%= ma.content %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>

View File

@ -1,5 +1,4 @@
<% if ma.class == SystemMessage && many_days_ago(ma.created_at, 30) %>
<%# @user_system_messages.each do |usm| %>
<% @system_messages.each do |ma| %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
@ -7,16 +6,14 @@
</li>
<li class="homepageNewsPubType fl">
<span style="color: red;float: left">系统消息:</span>
<!-- <span class="homepageNewsType fl">发布新消息:</span>-->
</li>
<li class="messageInformationContents">
<%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current, :anchor => "position_#{ma.id}"),
:id => "content_link_#{ma.id}", :target => '_blank' %>
<!--:onmouseover =>"message_titile_show($(this),event);",-->
<!--:onmouseout => "message_titile_hide($(this));"-->
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<%# end %>
<% end %>
<% end %>

View File

@ -1,36 +1,35 @@
<% if ma.class == UserFeedbackMessage %>
<% if ma.journals_for_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=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' %>
</li>
<li class="homepageNewsPubType fl">
<%=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="homepageNewsType fl">
<% if ma.journals_for_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<%=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' %>
</li>
<li class="homepageNewsPubType fl">
<%=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="homepageNewsType fl">
<%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
</span>
</li>
<li class="messageInformationContents">
<%= 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'%>
</li>
</div>
<div style="display: none" class="message_title_red system_message_style" >
<% if ma.journals_for_message.reply_id == 0 %>
<%= ma.journals_for_message.notes.html_safe %>
<% else %>
<div class="fl"><strong>您的留言:</strong></div>
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
<div class="fl"><strong>回复内容:</strong></div>
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% end %>
</li>
<li class="messageInformationContents">
<%= 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'%>
</li>
</div>
<div style="display: none" class="message_title_red system_message_style" >
<% if ma.journals_for_message.reply_id == 0 %>
<%= ma.journals_for_message.notes.html_safe %>
<% else %>
<div class="fl"><strong>您的留言:</strong></div>
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
<div class="fl"><strong>回复内容:</strong></div>
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
</ul>
<% end %>

View File

@ -2,7 +2,7 @@ if($("#comment_reply_<%=@parent_id %> #reply_message_<%= @reply.id%>").length >
$("#comment_reply_<%=@parent_id %> #reply_message_<%= @reply.id%>").replaceWith("<%= escape_javascript(render :partial => 'users/reply_to_comment', :locals => {:reply => @reply}) %>");
$("#comment_reply_<%=@parent_id %> #reply_iconup_<%=@reply.id %>").show();
$(function(){
sd_create_editor_from_data(<%= @reply.id%>,null,"100%", "<%=@reply.class.to_s%>");
sd_create_editor_from_data(<%= @reply.id%>,null,"100%", "<%= @reply.class.to_s %>");
});
}else if($("#comment_reply_<%=@parent_id %> #reply_to_message_<%= @reply.id%>").length >0) {
$("#comment_reply_<%=@parent_id %> #reply_to_message_<%= @reply.id%>").replaceWith("<p id='reply_message_<%= @reply.id%>'></p>");

View File

@ -912,6 +912,7 @@ RedmineApp::Application.routes.draw do
end
collection do
get 'project_home'
match 'join_project', :via => [:get, :post]
end

View File

@ -0,0 +1,15 @@
class CreateBlogMessages < ActiveRecord::Migration
def change
create_table :blog_messages do |t|
t.references :user
t.references :blog_commont
t.integer :blog_id
t.string :blog_message_type
t.boolean :viewed, :default => false
t.text :content
t.timestamps
end
end
end

View File

@ -0,0 +1,5 @@
class AddUserOperaterIdToBlogMessage < ActiveRecord::Migration
def change
add_column :blog_messages, :user_operator_id, :integer
end
end

File diff suppressed because it is too large Load Diff

65842
public/javascripts/echarts.js Normal file

File diff suppressed because it is too large Load Diff

35
public/javascripts/echarts.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -418,6 +418,7 @@ a:hover.c_grey{ color:#333;}
.c_green{ color:#28be6c;}
.c_grey{color:#999;}
.c_grey02{ color:#666666;}
.c_grey03{ color:#bbbaba;}
.c_dgrey{ color:#696969;}
.c_dblue{ color:#09658c;}
.c_white {color:#fff;}
@ -473,6 +474,8 @@ a.linkGrey7 {color:#888888;}
a.linkGrey7:hover {color:#269ac9;}
a.bBlue {background-color:#3498db;}
a.bBlue:hover {background-color:#297fb8;}
a.bGreen {background-color:#60b25e;}
a.bGreen:hover {background-color:#51a74f;}
a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
a.submit_btn:hover {background-color:#3498db; color:#ffffff;}
a.link_file_a{ background:url(/images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
@ -856,6 +859,8 @@ a.export_icon:hover {background: url(/images/item.png) -58px -60px no-repeat;}
.break_full_word { word-break: normal !important;word-wrap: break-word !important; }
/*模板a标签按钮 20161013byLB*/
a.btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
a.forum_btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 25px;line-height: 25px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
a:hover.btn{background: #c3c3c3; color: #333;}
a.btn-green{background: #60b25e; color: #fff;}
a:hover.btn-green{background: #51a74f; color: #fff;}

View File

@ -2,10 +2,10 @@
.wenba-rightbar{ border: 1px solid #ddd;background-color:#fff; width: 238px;}
.wenba-h3-top{ font-size: 14px; color: #666; }
.wenba-rightbar-top{ height: 40px; line-height: 40px; border-bottom:1px solid #ddd; }
.wenba-rightbar-li{ padding:10px 0; border-bottom:1px solid #ddd; color: #666;}
.wenba-rightbar-li{ padding:10px 0; color: #999;}
.wenba-rightbar-title{ font-size: 14px; width: 145px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.right-line{ border-right:1px solid #ddd;}
.wenba-rightbar-ul{ width: 40px; text-align: center;}
.wenba-rightbar-ul{ width: auto; text-align: center; display: block}
.wenba-rightbar-more{ padding:10px 0 ; text-align: center; display: block;}
.wenba-tiwenbox{border: 1px solid #ddd;background-color:#fff; width: 718px; padding:15px;}
.wenba-tiwen-con{ width: 100%; }

View File

@ -71,7 +71,7 @@ dt.project { background-image: url(/images/projects.png); }
dt.time-entry { background-image: url(/images/time.png); }
/***** Icons *****/
.icon {
.old-icon {
background-position: 0% 50%;
background-repeat: no-repeat;
font-family: '微软雅黑'; /*modify by men*/
@ -97,7 +97,7 @@ dt.time-entry { background-image: url(/images/time.png); }
.icon-save { background-image: url(/images/save.png); }
.icon-cancel { background-image: url(/images/cancel.png); }
.icon-multiple { background-image: url(/images/table_multiple.png); }
.icon-folder { background-image: url(/images/folder.png); }
.old-icon-folder { background-image: url(/images/folder.png); }
.open .icon-folder { background-image: url(/images/folder_open.png); }
.icon-package { background-image: url(/images/package.png); }
.icon-user { background-image: url(/images/user.png); }
@ -126,24 +126,24 @@ dt.time-entry { background-image: url(/images/time.png); }
.icon-passwd { background-image: url(/images/textfield_key.png); }
.icon-test { background-image: url(/images/bullet_go.png); }
.icon-file { background-image: url(/images/files/default.png); }
.icon-file.text-plain { background-image: url(/images/files/text.png); }
.icon-file.text-x-c { background-image: url(/images/files/c.png); }
.icon-file.text-x-csharp { background-image: url(/images/files/csharp.png); }
.icon-file.text-x-java { background-image: url(/images/files/java.png); }
.icon-file.text-x-javascript { background-image: url(/images/files/js.png); }
.icon-file.text-x-php { background-image: url(/images/files/php.png); }
.icon-file.text-x-ruby { background-image: url(/images/files/ruby.png); }
.icon-file.text-xml { background-image: url(/images/files/xml.png); }
.icon-file.text-css { background-image: url(/images/files/css.png); }
.icon-file.text-html { background-image: url(/images/files/html.png); }
.icon-file.image-gif { background-image: url(/images/files/image.png); }
.icon-file.image-jpeg { background-image: url(/images/files/image.png); }
.icon-file.image-png { background-image: url(/images/files/image.png); }
.icon-file.image-tiff { background-image: url(/images/files/image.png); }
.icon-file.application-pdf { background-image: url(/images/files/pdf.png); }
.icon-file.application-zip { background-image: url(/images/files/zip.png); }
.icon-file.application-x-gzip { background-image: url(/images/files/zip.png); }
.old-icon-file { background-image: url(/images/files/default.png); }
.old-icon-file.text-plain { background-image: url(/images/files/text.png); }
.old-icon-file.text-x-c { background-image: url(/images/files/c.png); }
.old-icon-file.text-x-csharp { background-image: url(/images/files/csharp.png); }
.old-icon-file.text-x-java { background-image: url(/images/files/java.png); }
.old-icon-file.text-x-javascript { background-image: url(/images/files/js.png); }
.old-icon-file.text-x-php { background-image: url(/images/files/php.png); }
.old-icon-file.text-x-ruby { background-image: url(/images/files/ruby.png); }
.old-icon-file.text-xml { background-image: url(/images/files/xml.png); }
.old-icon-file.text-css { background-image: url(/images/files/css.png); }
.old-icon-file.text-html { background-image: url(/images/files/html.png); }
.old-icon-file.image-gif { background-image: url(/images/files/image.png); }
.old-icon-file.image-jpeg { background-image: url(/images/files/image.png); }
.old-icon-file.image-png { background-image: url(/images/files/image.png); }
.old-icon-file.image-tiff { background-image: url(/images/files/image.png); }
.old-icon-file.application-pdf { background-image: url(/images/files/pdf.png); }
.old-icon-file.application-zip { background-image: url(/images/files/zip.png); }
.old-icon-file.application-x-gzip { background-image: url(/images/files/zip.png); }
img.gravatar {
padding: 2px;

View File

@ -223,7 +223,7 @@ p.percent {
float: left;
white-space: nowrap;
line-height: 1.4em;
padding-top: 5px;
/*padding-top: 5px;*/
font-size: 12px;
}
.repositorytitle select{ width: 110px; height: 21px; }
@ -1074,4 +1074,72 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
.my_issues_form_filter{ position: absolute; top:0; right: 0;}
.my_issues_form_filter select{ width:70px; height:30px; border:none; font-size:14px; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; text-align:center}
.my_issues_form_filter select.issues_filter_select_min{width:50px; }
.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;}
.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;}
/* 版本库分析20170103byLB*/
#conbox {font-size: 12px; width:100%;}
#tags {padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px; height: 30px}
#tags li { float: left; margin-right: 1px; height:30px;}
#tags li a {float:left; padding:5px 25px; display: block; text-align:center;border:1px solid #dbdbdb; border-bottom:none;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; background: #f2f2f2;font-size: 14px; }
#tags li.emptyTag {background: none transparent scroll repeat 0% 0%; width: 4px}
#tags li.selectTag {background-position: left top; margin-bottom: -2px; position: relative; height: 25px}
#tags li.selectTag a {background:#fff; color: #333; }
#tagContent {border: #ddd 1px solid; background-color: #fff;}
.tagContent {display: none; color: #474747; }
#tagContent div.selectTag {display: block}
a.pro_new_tabbtn{padding: 3px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px; color: #333;}
a.pro_new_tabbtn_act { background-image: linear-gradient(#666, #848484); color: #fff;}
.momalselect{border:1px solid #e5e5e5; height:30px; light-height:30px;}
.new_roadmap_table_nobg thead tr th{ border-bottom:1px solid #e5e5e5; font-weight: bold; color: #333;}
.new_roadmap_table_nobg tbody tr td{ line-height: normal;}
.sy_class_users_st img { width: 30px;height: 30px; border: 1px solid #fff; border-radius: 50px; }
a.sy_class_users_st_name { display: inline-block; width: 70px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}
.new-conbox{ width: 1000px; }
.icons-commit-list{ display: block; width: 15px; height: 15px; background: url(../images/new_project/icons-commint.png) 0px -1px no-repeat }
.icons-commit-list:hover,.icons-commit-list:active{background: url(../images/new_project/icons-commint.png) -33px -1px no-repeat }
.icons-commit-graph{ display: block; width: 18px; height: 15px; background: url(../images/new_project/icons-commint.png) 0 -31px no-repeat }
.icons-commit-graph:hover,.icons-commit-graph:active{background: url(../images/new_project/icons-commint.png) -33px -31px no-repeat }
.sonar-top{border-bottom:1px solid #e5e5e5; padding:10px; }
.sonar-con{ padding:15px; width: 968px; color: #666; line-height: 1.9;}
.sonar-con-left{ text-align: center;}
.sonar-con-top{margin:15px; width: 100%;}
.sonar-con-map{ margin:15px; margin-top:0; padding:15px; border:1px solid #e5e5e5; width: 938px;}
.level {display: inline-block;width: 80px; height: 24px; line-height: 24px;border-radius: 24px; box-sizing: border-box;color: #fff; text-align: center; text-shadow: 0 0 1px rgba(0,0,0,.35);}
.level-A{background-color: #00aa00;}
.level-B{background-color: #80cc00;}
.level-C{background-color: #ffee00; color: #333;}
.level-D{background-color: #f77700;}
.level-E {background-color: #ee0000;}
.level-OK {background-color: #85bb43;}
.level-ERROR {background-color: #d4333f;}
.level-box{ width:800px; margin:30px auto;}
.level-box li{ float: left; margin-right: 25px;}
.sonar-show-box{ width: 350px; height: 24px;}
.sonar-show-box span{ display:inline-block; height: 20px; color:#666; line-height: 20px; text-align: center;}
.sonar-25 { width: 25%;}
.sonar-35 { width: 35%;}
.sonar-40 { width: 40%;}
.sonar-bg-lgreen{ background:#eee;}
.sonar-bg-green{ background:#ddd;}
.sonar-bg-dgreen{ background:#ccc;}
.sonar-shuju-box{ width: 300px; padding:5px 0; border-left:1px solid #ddd; min-height: 118px;}
.t-c{ text-align:center;}
td.t-l{ text-align:left;}
td.t-r{ text-align:right;}
.sonar-shuju-table{ background: none; margin-left: 40px; margin-right: 40px;}
.sonar-shuju-table td{ width:100px;}
.fontGreen{ color:#85bb43;}
.pro-top-info{border:1px solid #eee; }
.pro-top-info li{ width:295px; padding:10px 15px; font-size: 14px; float: left; text-align: center;}
.pro-top-info li:hover{ background:#f2f2f2;}
a.btn_zipdown{ display:block; height:25px; width:80px; text-align: center; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE);
color: #7f7f7f; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin-left: 5px;}
a:hover.btn_zipdown{color:#269ac9;}
label.pro-fenzhi-label{ height:25px; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE);color: #7f7f7f;border-radius:3px; border-top-right-radius: 0;
border-bottom-right-radius: 0; display: inline-block; text-align: center; padding:0 15px; border-right: none;}
select.pro-fenzhi-select{ height: 27px; line-height: 27px; color: #666;}
input.pro-fenzhi-input { height: 25px; line-height: 25px; color: #666; width:300px;}
a.pro-fenzhi-a{height:25px; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE);color: #7f7f7f;border-radius:3px; border-top-left-radius: 0;
border-bottom-right-radius: 0; display: inline-block; text-align: center; padding:0 5px; border-left: none;}
a:hover.pro-fenzhi-a{color:#3b94d6;}

View File

@ -297,7 +297,7 @@ a:hover.qx_btn{color:#64bdd9;}
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(/images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
.newsActive { border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;display: inline-block;padding: 0 5px;border-radius: 15px}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}

View File

@ -0,0 +1,6 @@
FactoryGirl.define do
factory :blog_message do
end
end

View File

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe BlogMessage, :type => :model do
pending "add some examples to (or delete) #{__FILE__}"
end