Merge branch 'develop' into 'develop'

这周上线任务



See merge request !122
This commit is contained in:
黄井泉 2017-01-13 11:24:07 +08:00
commit c177230b08
32 changed files with 67696 additions and 1341 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

@ -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

@ -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)

View File

@ -1990,26 +1990,23 @@ end
end
def show
if is_current_user
if User.current == @user
# 系统消息总显示在最前面,显示周期30天
@system_messages = SystemMessage.where("created_at > ?", Time.now - 86400 * 30)
# 自己的主页显示消息
# 系统消息为管理员发送,我的消息中包含有系统消息
@message_alls = []
messages = MessageAll.where("(user_id =? and message_type !=?) or message_type =?" , @user.id, "SystemMessage", "SystemMessage").includes(:message).order("created_at desc")
messages.each do |message_all|
mess = message_all.message
unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1)
if (message_all.message_type =="SystemMessage" && !many_days_ago(mess.created_at, 30))
next
else
@message_alls << mess
end
end
end
@message_count = @message_alls.count
@message_alls = paginateHelper @message_alls, 20
messages_all = MessageAll.where(:user_id => @user.id)
@message_count = messages_all.count
# REDO:已删除的内容应该在页面中显示不点击
@message_all_pages = Paginator.new @message_count, per_page_option, params['page']
@message_alls = messages_all.includes(:message).
limit(@message_all_pages.per_page).
offset(@message_all_pages.offset).
reorder("#{MessageAll.table_name}.created_at desc")
@unsolved_issues_count = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 4, 6]).includes(:author, :project).count
# 用户待完成的作业
my_course_ids = StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").blank? ? "(-1)" : "(" + StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").map{|sc| sc.course_id}.join(",") + ")"
my_course_ids = StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").blank? ? "(-1)" : "(" + StudentsForCourse.includes(:course).
where("student_id = #{@user.id} and courses.is_delete = 0").map{|sc| sc.course_id}.join(",") + ")"
homeworks = HomeworkCommon.where("course_id in #{my_course_ids} and publish_time <= '#{Date.today}'")
homework_ids = homeworks.blank? ? "(-1)" : "(" + homeworks.map{|homework| homework.id}.join(",") + ")"
student_works = StudentWork.where("user_id = #{@user.id} and homework_common_id in #{homework_ids} and work_status != 0")

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

@ -99,8 +99,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

@ -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

@ -1,32 +1,49 @@
<% 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_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

@ -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

@ -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 %>
<% 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

@ -1,4 +1,4 @@
<% if ma.class == ContestMessage %>
<% if ma.contest_message_type == "ContestRequestDealResult" %>
<% user = User.find(ma.user_id) %>
<% if ma.content
@ -311,4 +311,3 @@
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% 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,222 +39,200 @@
<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 %>
<% 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(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">
<%= 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' %>
<!--: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" %>">
<%= pull_request_message_status(ma) %>
</span>
</li>
<li class="messageInformationContents">
<%= link_to "#{send_message_user[0].title}", project_pull_requests_path(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>
</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 %>
<% 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(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">
<%= 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' %>
<!--: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" %>">
<%= pull_request_message_status(ma) %>
</span>
</li>
<li class="messageInformationContents">
<%= link_to "#{send_message_user[0].title}", project_pull_requests_path(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>
</ul>
<% 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

@ -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 %>
<% 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 %>

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 %>
</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

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

View File

@ -11,7 +11,8 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20161223083022) do
ActiveRecord::Schema.define(:version => 20170106024520) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
t.string "act_type", :null => false
@ -51,6 +52,28 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
create_table "application_settings", :force => true do |t|
t.integer "default_projects_limit"
t.boolean "signup_enabled"
t.boolean "signin_enabled"
t.boolean "gravatar_enabled"
t.text "sign_in_text"
t.datetime "created_at"
t.datetime "updated_at"
t.string "home_page_url"
t.integer "default_branch_protection", :default => 2
t.boolean "twitter_sharing_enabled", :default => true
t.text "restricted_visibility_levels"
t.boolean "version_check_enabled", :default => true
t.integer "max_attachment_size", :default => 10, :null => false
t.integer "default_project_visibility"
t.integer "default_snippet_visibility"
t.text "restricted_signup_domains"
t.boolean "user_oauth_applications", :default => true
t.string "after_sign_out_path"
t.integer "session_expire_delay", :default => 10080, :null => false
end
create_table "applied_contests", :force => true do |t|
t.integer "contest_id"
t.integer "user_id"
@ -207,6 +230,20 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.string "typeName", :limit => 50
end
create_table "audit_events", :force => true do |t|
t.integer "author_id", :null => false
t.string "type", :null => false
t.integer "entity_id", :null => false
t.string "entity_type", :null => false
t.text "details"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "audit_events", ["author_id"], :name => "index_audit_events_on_author_id"
add_index "audit_events", ["entity_id", "entity_type"], :name => "index_audit_events_on_entity_id_and_entity_type"
add_index "audit_events", ["type"], :name => "index_audit_events_on_type"
create_table "auth_sources", :force => true do |t|
t.string "type", :limit => 30, :default => "", :null => false
t.string "name", :limit => 60, :default => "", :null => false
@ -308,6 +345,17 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
add_index "boards", ["project_id"], :name => "boards_project_id"
create_table "broadcast_messages", :force => true do |t|
t.text "message", :null => false
t.datetime "starts_at"
t.datetime "ends_at"
t.integer "alert_type"
t.datetime "created_at"
t.datetime "updated_at"
t.string "color"
t.string "font"
end
create_table "bug_to_osps", :force => true do |t|
t.integer "osp_id"
t.integer "relative_memo_id"
@ -566,6 +614,7 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.boolean "is_delete", :default => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "judge_score"
end
add_index "contestant_works", ["project_id"], :name => "index_contestant_works_on_project_id"
@ -614,20 +663,6 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.integer "container_id", :default => 0
end
create_table "course_class_post", :id => false, :force => true do |t|
t.integer "班级id", :default => 0, :null => false
t.string "班级名"
t.integer "帖子id", :default => 0, :null => false
t.integer "主贴id"
t.string "帖子标题", :default => "", :null => false
t.text "帖子内容"
t.integer "帖子用户id"
t.integer "帖子回复数", :default => 0, :null => false
t.integer "最后回帖id"
t.datetime "发帖时间", :null => false
t.datetime "帖子更新时间", :null => false
end
create_table "course_contributor_scores", :force => true do |t|
t.integer "course_id"
t.integer "user_id"
@ -802,6 +837,15 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
create_table "deploy_keys_projects", :force => true do |t|
t.integer "deploy_key_id", :null => false
t.integer "project_id", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "deploy_keys_projects", ["project_id"], :name => "index_deploy_keys_projects_on_project_id"
create_table "discuss_demos", :force => true do |t|
t.string "title"
t.text "body"
@ -851,6 +895,16 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "created_at"
end
create_table "emails", :force => true do |t|
t.integer "user_id", :null => false
t.string "email", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "emails", ["email"], :name => "index_emails_on_email", :unique => true
add_index "emails", ["user_id"], :name => "index_emails_on_user_id"
create_table "enabled_modules", :force => true do |t|
t.integer "project_id"
t.string "name", :null => false
@ -873,6 +927,25 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
create_table "events", :force => true do |t|
t.string "target_type"
t.integer "target_id"
t.string "title"
t.text "data"
t.integer "project_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "action"
t.integer "author_id"
end
add_index "events", ["action"], :name => "index_events_on_action"
add_index "events", ["author_id"], :name => "index_events_on_author_id"
add_index "events", ["created_at"], :name => "index_events_on_created_at"
add_index "events", ["project_id"], :name => "index_events_on_project_id"
add_index "events", ["target_id"], :name => "index_events_on_target_id"
add_index "events", ["target_type"], :name => "index_events_on_target_type"
create_table "exercise_answers", :force => true do |t|
t.integer "user_id"
t.integer "exercise_question_id"
@ -927,13 +1000,11 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.integer "exercise_status"
t.integer "user_id"
t.integer "time"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "publish_time"
t.datetime "end_time"
t.integer "show_result"
t.integer "question_random", :default => 0
t.integer "choice_random", :default => 0
end
create_table "first_pages", :force => true do |t|
@ -979,6 +1050,15 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type"
add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at"
create_table "forked_project_links", :force => true do |t|
t.integer "forked_to_project_id", :null => false
t.integer "forked_from_project_id", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "forked_project_links", ["forked_to_project_id"], :name => "index_forked_project_links_on_forked_to_project_id", :unique => true
create_table "forums", :force => true do |t|
t.string "name", :null => false
t.text "description"
@ -1078,6 +1158,7 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "updated_at", :null => false
t.integer "no_anon_penalty", :default => 1
t.integer "appeal_penalty", :default => 0
t.integer "ta_mode", :default => 1
end
create_table "homework_detail_programings", :force => true do |t|
@ -1122,6 +1203,17 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "updated_at", :null => false
end
create_table "identities", :force => true do |t|
t.string "extern_uid"
t.string "provider"
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "identities", ["created_at", "id"], :name => "index_identities_on_created_at_and_id"
add_index "identities", ["user_id"], :name => "index_identities_on_user_id"
create_table "invite_lists", :force => true do |t|
t.integer "project_id"
t.integer "user_id"
@ -1271,6 +1363,20 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "journals_for_messages", ["root_id"], :name => "index_journals_for_messages_on_root_id"
create_table "keys", :force => true do |t|
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
t.text "key"
t.string "title"
t.string "type"
t.string "fingerprint"
t.boolean "public", :default => false, :null => false
end
add_index "keys", ["created_at", "id"], :name => "index_keys_on_created_at_and_id"
add_index "keys", ["user_id"], :name => "index_keys_on_user_id"
create_table "kindeditor_assets", :force => true do |t|
t.string "asset"
t.integer "file_size"
@ -1282,6 +1388,27 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.integer "owner_type", :default => 0
end
create_table "label_links", :force => true do |t|
t.integer "label_id"
t.integer "target_id"
t.string "target_type"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "label_links", ["label_id"], :name => "index_label_links_on_label_id"
add_index "label_links", ["target_id", "target_type"], :name => "index_label_links_on_target_id_and_target_type"
create_table "labels", :force => true do |t|
t.string "title"
t.string "color"
t.integer "project_id"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "labels", ["project_id"], :name => "index_labels_on_project_id"
create_table "member_roles", :force => true do |t|
t.integer "member_id", :null => false
t.integer "role_id", :null => false
@ -1338,6 +1465,47 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "memos", ["root_id"], :name => "index_memos_on_root_id"
create_table "merge_request_diffs", :force => true do |t|
t.string "state"
t.text "st_commits", :limit => 2147483647
t.text "st_diffs", :limit => 2147483647
t.integer "merge_request_id", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "merge_request_diffs", ["merge_request_id"], :name => "index_merge_request_diffs_on_merge_request_id", :unique => true
create_table "merge_requests", :force => true do |t|
t.string "target_branch", :null => false
t.string "source_branch", :null => false
t.integer "source_project_id", :null => false
t.integer "author_id"
t.integer "assignee_id"
t.string "title"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "milestone_id"
t.string "state"
t.string "merge_status"
t.integer "target_project_id", :null => false
t.integer "iid"
t.text "description"
t.integer "position", :default => 0
t.datetime "locked_at"
end
add_index "merge_requests", ["assignee_id"], :name => "index_merge_requests_on_assignee_id"
add_index "merge_requests", ["author_id"], :name => "index_merge_requests_on_author_id"
add_index "merge_requests", ["created_at", "id"], :name => "index_merge_requests_on_created_at_and_id"
add_index "merge_requests", ["created_at"], :name => "index_merge_requests_on_created_at"
add_index "merge_requests", ["milestone_id"], :name => "index_merge_requests_on_milestone_id"
add_index "merge_requests", ["source_branch"], :name => "index_merge_requests_on_source_branch"
add_index "merge_requests", ["source_project_id"], :name => "index_merge_requests_on_source_project_id"
add_index "merge_requests", ["target_branch"], :name => "index_merge_requests_on_target_branch"
add_index "merge_requests", ["target_project_id", "iid"], :name => "index_merge_requests_on_target_project_id_and_iid", :unique => true
add_index "merge_requests", ["title"], :name => "index_merge_requests_on_title"
create_table "message_alls", :force => true do |t|
t.integer "user_id"
t.integer "message_id"
@ -1374,6 +1542,39 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "messages", ["parent_id"], :name => "messages_parent_id"
add_index "messages", ["root_id"], :name => "index_messages_on_root_id"
create_table "milestones", :force => true do |t|
t.string "title", :null => false
t.integer "project_id", :null => false
t.text "description"
t.date "due_date"
t.datetime "created_at"
t.datetime "updated_at"
t.string "state"
t.integer "iid"
end
add_index "milestones", ["created_at", "id"], :name => "index_milestones_on_created_at_and_id"
add_index "milestones", ["due_date"], :name => "index_milestones_on_due_date"
add_index "milestones", ["project_id", "iid"], :name => "index_milestones_on_project_id_and_iid", :unique => true
add_index "milestones", ["project_id"], :name => "index_milestones_on_project_id"
create_table "namespaces", :force => true do |t|
t.string "name", :null => false
t.string "path", :null => false
t.integer "owner_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "type"
t.string "description", :default => "", :null => false
t.string "avatar"
end
add_index "namespaces", ["created_at", "id"], :name => "index_namespaces_on_created_at_and_id"
add_index "namespaces", ["name"], :name => "index_namespaces_on_name", :unique => true
add_index "namespaces", ["owner_id"], :name => "index_namespaces_on_owner_id"
add_index "namespaces", ["path"], :name => "index_namespaces_on_path", :unique => true
add_index "namespaces", ["type"], :name => "index_namespaces_on_type"
create_table "news", :force => true do |t|
t.integer "project_id"
t.string "title", :limit => 60, :default => "", :null => false
@ -1400,6 +1601,31 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "updated_at", :null => false
end
create_table "notes", :force => true do |t|
t.text "note"
t.string "noteable_type"
t.integer "author_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "project_id"
t.string "attachment"
t.string "line_code"
t.string "commit_id"
t.integer "noteable_id"
t.boolean "system", :default => false, :null => false
t.text "st_diff", :limit => 2147483647
end
add_index "notes", ["author_id"], :name => "index_notes_on_author_id"
add_index "notes", ["commit_id"], :name => "index_notes_on_commit_id"
add_index "notes", ["created_at", "id"], :name => "index_notes_on_created_at_and_id"
add_index "notes", ["created_at"], :name => "index_notes_on_created_at"
add_index "notes", ["noteable_id", "noteable_type"], :name => "index_notes_on_noteable_id_and_noteable_type"
add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type"
add_index "notes", ["project_id", "noteable_type"], :name => "index_notes_on_project_id_and_noteable_type"
add_index "notes", ["project_id"], :name => "index_notes_on_project_id"
add_index "notes", ["updated_at"], :name => "index_notes_on_updated_at"
create_table "notificationcomments", :force => true do |t|
t.string "notificationcommented_type"
t.integer "notificationcommented_id"
@ -1409,6 +1635,49 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "updated_at", :null => false
end
create_table "oauth_access_grants", :force => true do |t|
t.integer "resource_owner_id", :null => false
t.integer "application_id", :null => false
t.string "token", :null => false
t.integer "expires_in", :null => false
t.text "redirect_uri", :null => false
t.datetime "created_at", :null => false
t.datetime "revoked_at"
t.string "scopes"
end
add_index "oauth_access_grants", ["token"], :name => "index_oauth_access_grants_on_token", :unique => true
create_table "oauth_access_tokens", :force => true do |t|
t.integer "resource_owner_id"
t.integer "application_id"
t.string "token", :null => false
t.string "refresh_token"
t.integer "expires_in"
t.datetime "revoked_at"
t.datetime "created_at", :null => false
t.string "scopes"
end
add_index "oauth_access_tokens", ["refresh_token"], :name => "index_oauth_access_tokens_on_refresh_token", :unique => true
add_index "oauth_access_tokens", ["resource_owner_id"], :name => "index_oauth_access_tokens_on_resource_owner_id"
add_index "oauth_access_tokens", ["token"], :name => "index_oauth_access_tokens_on_token", :unique => true
create_table "oauth_applications", :force => true do |t|
t.string "name", :null => false
t.string "uid", :null => false
t.string "secret", :null => false
t.text "redirect_uri", :null => false
t.string "scopes", :default => "", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "owner_id"
t.string "owner_type"
end
add_index "oauth_applications", ["owner_id", "owner_type"], :name => "index_oauth_applications_on_owner_id_and_owner_type"
add_index "oauth_applications", ["uid"], :name => "index_oauth_applications_on_uid", :unique => true
create_table "onclick_times", :force => true do |t|
t.integer "user_id"
t.datetime "onclick_time"
@ -1569,6 +1838,23 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.integer "allow_teacher", :default => 0
end
create_table "permissions", :force => true do |t|
t.string "controller", :limit => 30, :default => "", :null => false
t.string "action", :limit => 30, :default => "", :null => false
t.string "description", :limit => 60, :default => "", :null => false
t.boolean "is_public", :default => false, :null => false
t.integer "sort", :default => 0, :null => false
t.boolean "mail_option", :default => false, :null => false
t.boolean "mail_enabled", :default => false, :null => false
end
create_table "permissions_roles", :id => false, :force => true do |t|
t.integer "permission_id", :default => 0, :null => false
t.integer "role_id", :default => 0, :null => false
end
add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
create_table "phone_app_versions", :force => true do |t|
t.string "version"
t.text "description"
@ -1659,6 +1945,11 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "updated_at", :null => false
end
create_table "project_import_data", :force => true do |t|
t.integer "project_id"
t.text "data"
end
create_table "project_infos", :force => true do |t|
t.integer "project_id"
t.integer "user_id"
@ -1745,13 +2036,22 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
create_table "protected_branches", :force => true do |t|
t.integer "project_id", :null => false
t.string "name", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "developers_can_push", :default => false, :null => false
end
add_index "protected_branches", ["project_id"], :name => "index_protected_branches_on_project_id"
create_table "pull_requests", :force => true do |t|
t.integer "pull_request_id"
t.integer "gpid"
t.integer "user_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "status", :default => 0
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "project_id"
t.string "title"
end
@ -1760,9 +2060,10 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
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.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.float "version", :default => 0.0
t.integer "sonar_version", :default => 1
t.string "path"
t.string "branch"
t.string "language"
@ -1904,6 +2205,25 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.integer "is_teacher_score", :default => 0
end
create_table "services", :force => true do |t|
t.string "type"
t.string "title"
t.integer "project_id"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "active", :default => false, :null => false
t.text "properties"
t.boolean "template", :default => false
t.boolean "push_events", :default => true
t.boolean "issues_events", :default => true
t.boolean "merge_requests_events", :default => true
t.boolean "tag_push_events", :default => true
t.boolean "note_events", :default => true, :null => false
end
add_index "services", ["created_at", "id"], :name => "index_services_on_created_at_and_id"
add_index "services", ["project_id"], :name => "index_services_on_project_id"
create_table "settings", :force => true do |t|
t.string "name", :default => "", :null => false
t.text "value"
@ -1942,6 +2262,26 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "updated_at", :null => false
end
create_table "snippets", :force => true do |t|
t.string "title"
t.text "content", :limit => 2147483647
t.integer "author_id", :null => false
t.integer "project_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "file_name"
t.datetime "expires_at"
t.string "type"
t.integer "visibility_level", :default => 0, :null => false
end
add_index "snippets", ["author_id"], :name => "index_snippets_on_author_id"
add_index "snippets", ["created_at", "id"], :name => "index_snippets_on_created_at_and_id"
add_index "snippets", ["created_at"], :name => "index_snippets_on_created_at"
add_index "snippets", ["expires_at"], :name => "index_snippets_on_expires_at"
add_index "snippets", ["project_id"], :name => "index_snippets_on_project_id"
add_index "snippets", ["visibility_level"], :name => "index_snippets_on_visibility_level"
create_table "softapplications", :force => true do |t|
t.string "name"
t.text "description"
@ -2108,6 +2448,17 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "updated_at", :null => false
end
create_table "subscriptions", :force => true do |t|
t.integer "user_id"
t.integer "subscribable_id"
t.string "subscribable_type"
t.boolean "subscribed"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "subscriptions", ["subscribable_id", "subscribable_type", "user_id"], :name => "subscriptions_user_id_and_ref_fields", :unique => true
create_table "syllabus_members", :force => true do |t|
t.integer "rank"
t.integer "syllabus_id"
@ -2381,6 +2732,17 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
add_index "users", ["type"], :name => "index_users_on_type"
create_table "users_star_projects", :force => true do |t|
t.integer "project_id", :null => false
t.integer "user_id", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "users_star_projects", ["project_id"], :name => "index_users_star_projects_on_project_id"
add_index "users_star_projects", ["user_id", "project_id"], :name => "index_users_star_projects_on_user_id_and_project_id", :unique => true
add_index "users_star_projects", ["user_id"], :name => "index_users_star_projects_on_user_id"
create_table "versions", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.string "name", :default => "", :null => false
@ -2433,6 +2795,33 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
t.datetime "updated_at", :null => false
end
create_table "web_hooks", :force => true do |t|
t.string "url"
t.integer "project_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "type", :default => "ProjectHook"
t.integer "service_id"
t.boolean "push_events", :default => true, :null => false
t.boolean "issues_events", :default => false, :null => false
t.boolean "merge_requests_events", :default => false, :null => false
t.boolean "tag_push_events", :default => false
t.boolean "note_events", :default => false, :null => false
end
add_index "web_hooks", ["created_at", "id"], :name => "index_web_hooks_on_created_at_and_id"
add_index "web_hooks", ["project_id"], :name => "index_web_hooks_on_project_id"
create_table "wechat_logs", :force => true do |t|
t.string "openid", :null => false
t.text "request_raw"
t.text "response_raw"
t.text "session_raw"
t.datetime "created_at", :null => false
end
add_index "wechat_logs", ["openid"], :name => "index_wechat_logs_on_openid"
create_table "wiki_content_versions", :force => true do |t|
t.integer "wiki_content_id", :null => false
t.integer "page_id", :null => false

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

@ -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; }
@ -1075,3 +1075,71 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
.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;}
/* 版本库分析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;}