Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
9bfe9ba1b2
16
Gemfile
16
Gemfile
|
@ -19,6 +19,22 @@ gem 'acts-as-taggable-on'
|
|||
group :development do
|
||||
gem 'better_errors', path: 'lib/better_errors'
|
||||
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
|
||||
if ENV['PRY']
|
||||
gem 'pry'
|
||||
gem 'pry-nav'
|
||||
end
|
||||
end
|
||||
|
||||
# Gems used only for assets and not required
|
||||
# in production environments by default.
|
||||
group :assets do
|
||||
gem 'sass-rails', '~> 3.2.3'
|
||||
gem 'coffee-rails', '~> 3.2.1'
|
||||
|
||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||
# gem 'therubyracer', :platforms => :ruby
|
||||
|
||||
gem 'uglifier', '>= 1.0.3'
|
||||
end
|
||||
|
||||
# Optional gem for LDAP authentication
|
||||
|
|
20
Gemfile.lock
20
Gemfile.lock
|
@ -53,7 +53,16 @@ GEM
|
|||
arel (3.0.2)
|
||||
builder (3.0.0)
|
||||
coderay (1.0.9)
|
||||
coffee-rails (3.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (~> 3.2.0)
|
||||
coffee-script (2.2.0)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.6.1)
|
||||
erubis (2.7.0)
|
||||
execjs (1.4.0)
|
||||
multi_json (~> 1.0)
|
||||
fastercsv (1.5.0)
|
||||
hike (1.2.3)
|
||||
i18n (0.6.1)
|
||||
|
@ -99,6 +108,11 @@ GEM
|
|||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
ruby-openid (2.1.8)
|
||||
sass (3.2.7)
|
||||
sass-rails (3.2.6)
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
sprockets (2.2.2)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
|
@ -110,6 +124,9 @@ GEM
|
|||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.37)
|
||||
uglifier (1.0.3)
|
||||
execjs (>= 0.3.0)
|
||||
multi_json (>= 1.0.2)
|
||||
|
||||
PLATFORMS
|
||||
x86-mingw32
|
||||
|
@ -121,6 +138,7 @@ DEPENDENCIES
|
|||
better_errors!
|
||||
builder (= 3.0.0)
|
||||
coderay (~> 1.0.6)
|
||||
coffee-rails (~> 3.2.1)
|
||||
fastercsv (~> 1.5.0)
|
||||
i18n (~> 0.6.0)
|
||||
jquery-rails (~> 2.0.2)
|
||||
|
@ -130,4 +148,6 @@ DEPENDENCIES
|
|||
rack-openid
|
||||
rails (= 3.2.13)
|
||||
ruby-openid (~> 2.1.4)
|
||||
sass-rails (~> 3.2.3)
|
||||
seems_rateable!
|
||||
uglifier (>= 1.0.3)
|
||||
|
|
27
ReadMe.txt
27
ReadMe.txt
|
@ -1,11 +1,18 @@
|
|||
patch:
|
||||
用户姓名的部分,根据issues#655。
|
||||
为了修改方便
|
||||
alias:
|
||||
方法 之前显示 调整之后
|
||||
用户姓名的部分,根据issues#655。
|
||||
为了修改方便
|
||||
alias:
|
||||
方法 之前显示 调整之后
|
||||
name firstname+lastname login
|
||||
nickname xxx login
|
||||
realname xxx firstname+lastname
|
||||
|
||||
User model经过修改,已经完全集成了user_extensions的功能
|
||||
例如
|
||||
user.gender=1
|
||||
user.save
|
||||
user_extensions字段会自动保存
|
||||
不必要每次user.user_extensions.xxx以及判断是否为空
|
||||
================================================================================
|
||||
app/models/setting.rb :165
|
||||
# fixed domain url in development. tantantan's bug
|
||||
|
@ -14,22 +21,22 @@ app/models/setting.rb :165
|
|||
define_singleton_method m do; nil; end if m.to_s =~ /([a-zA-Z]+_domain)$/
|
||||
end
|
||||
end
|
||||
程序部分链接中制定了subdomain参数,使链接在二级域名中来回跳转。
|
||||
为了开发方便,使之功能在development模式下失效。
|
||||
程序部分链接中制定了subdomain参数,使链接在二级域名中来回跳转。
|
||||
为了开发方便,使之功能在development模式下失效。
|
||||
# => nyan
|
||||
================================================================================
|
||||
app/controller/projects_controller.rb ===> projects#fake
|
||||
fake filter: 修改了传到页面中的Count后缀的数量
|
||||
改为正确的数量,删掉fake过滤器即可
|
||||
fake filter: 修改了传到页面中的Count后缀的数量
|
||||
改为正确的数量,删掉fake过滤器即可
|
||||
================================================================================
|
||||
#导航栏匹配域名显示和改变
|
||||
#导航栏匹配域名显示和改变
|
||||
app\helper\application_helper.rb
|
||||
# rewrite navigation
|
||||
|
||||
app\views\layouts\_base_header.html.erb
|
||||
# reset navigation by domain name and url through regular match
|
||||
================================================================================
|
||||
#首页根据域名匹配进入不同的页面
|
||||
#首页根据域名匹配进入不同的页面
|
||||
app\controller\welcome_controller.rb
|
||||
def entry_select_user
|
||||
if request.original_url.match(/user\.trustie\.net/)
|
||||
|
|
|
@ -881,6 +881,7 @@ class BidsController < ApplicationController
|
|||
|
||||
def memberAccess
|
||||
# 是课程,则判断当前用户是否参加了课程
|
||||
return true if current_user.admin?
|
||||
return 0 if @bid.courses.first.project_type == Project::ProjectType_project
|
||||
currentUser = User.current
|
||||
render_403 unless currentUser.member_of?(@bid.courses.first)
|
||||
|
|
|
@ -5,7 +5,8 @@ class ContestsController < ApplicationController
|
|||
menu_item :project, :only => :show_project
|
||||
menu_item :application, :only => :show_softapplication
|
||||
menu_item :attendingcontest, :only => :show_attendingcontest
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :set_reward_project, :set_reward_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward,
|
||||
menu_item :contestnotification, :only => :show_notification
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :show_notification, :set_reward_project, :set_reward_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward,
|
||||
:show_contest_project, :show_contest_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings]
|
||||
|
||||
# added by fq
|
||||
|
@ -356,6 +357,17 @@ class ContestsController < ApplicationController
|
|||
|
||||
###end
|
||||
|
||||
def show_notification
|
||||
@contest = Contest.find_by_id(params[:id])
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => 'base_newcontest'
|
||||
}
|
||||
format.api
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def set_reward_project
|
||||
@c_p = nil
|
||||
@contesting_project_id = nil
|
||||
|
|
|
@ -70,7 +70,7 @@ class FilesController < ApplicationController
|
|||
Mailer.attachments_added(attachments[:files]).deliver
|
||||
end
|
||||
|
||||
# 临时用
|
||||
# TODO: 临时用 nyan
|
||||
sort_init 'created_on', 'desc'
|
||||
sort_update 'created_on' => "#{Attachment.table_name}.created_on",
|
||||
'filename' => "#{Attachment.table_name}.filename",
|
||||
|
|
|
@ -12,6 +12,7 @@ class OpenSourceProjectsController < ApplicationController
|
|||
# GET /open_source_projects
|
||||
# GET /open_source_projects.json
|
||||
def index
|
||||
|
||||
@app_dir = params[:app_dir]
|
||||
@language = params[:language]
|
||||
@created_at = params[:created_at]
|
||||
|
@ -25,6 +26,8 @@ class OpenSourceProjectsController < ApplicationController
|
|||
|
||||
@open_source_projects = @open_source_projects.offset(@os_project_pages.offset).limit(@os_project_pages.per_page)
|
||||
|
||||
@bugs = BugToOsp.order('created_at desc').limit(8)
|
||||
|
||||
# @open_source_projects = OpenSourceProject.all
|
||||
|
||||
respond_to do |format|
|
||||
|
@ -76,14 +79,52 @@ class OpenSourceProjectsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def allbug
|
||||
@bugs = BugToOsp.visible
|
||||
|
||||
def search
|
||||
@bug_count = @bugs.count
|
||||
@bug_pages = Paginator.new @bug_count, per_page_option, params['page']
|
||||
@bugs = @bugs.includes(:bug).reorder("#{RelativeMemo.table_name}.created_at DESC").limit(@bug_pages.per_page).offset(@bug_pages.offset).all
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render json: @open_source_project }
|
||||
end
|
||||
end
|
||||
|
||||
def search
|
||||
|
||||
end
|
||||
|
||||
def showbug
|
||||
@open_source_project = OpenSourceProject.find(params[:id])
|
||||
|
||||
# added by yiang 暴力添加,请绕道
|
||||
def showmemo
|
||||
sort_init 'updated_at', 'desc'
|
||||
sort_update 'created_at' => "#{RelativeMemo.table_name}.created_at",
|
||||
'replies' => "#{RelativeMemo.table_name}.replies_count",
|
||||
'updated_at' => "COALESCE (last_replies_relative_memos.created_at, #{RelativeMemo.table_name}.created_at)"
|
||||
|
||||
@memo = RelativeMemo.new(:open_source_project => @open_source_project)
|
||||
@topic_count = @open_source_project.bugs.count
|
||||
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
||||
@memos = @open_source_project.bugs.
|
||||
reorder("#{RelativeMemo.table_name}.sticky DESC").
|
||||
includes(:last_reply).
|
||||
limit(@topic_pages.per_page).
|
||||
offset(@topic_pages.offset).
|
||||
order(sort_clause).
|
||||
all
|
||||
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => "base_opensource_p"
|
||||
}
|
||||
format.json { render json: @open_source_project }
|
||||
end
|
||||
end
|
||||
|
||||
# added by yiang 暴力添加,请绕道
|
||||
def showmemo
|
||||
@open_source_project = OpenSourceProject.find(params[:id])
|
||||
|
||||
sort_init 'updated_at', 'desc'
|
||||
|
@ -108,7 +149,8 @@ def showmemo
|
|||
}
|
||||
format.json { render json: @open_source_project }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# GET /open_source_projects/new
|
||||
# GET /open_source_projects/new.json
|
||||
def new
|
||||
|
@ -178,13 +220,13 @@ end
|
|||
|
||||
def search
|
||||
# per_page_option = 10
|
||||
#
|
||||
#
|
||||
# @open_source_projects = OpenSourceProject.filter(@app_dir, @language, @created_at)
|
||||
# @open_source_projects = @open_source_projects.like(params[:name]) if params[:name].present?
|
||||
#
|
||||
#
|
||||
# @os_project_count = @open_source_projects.count
|
||||
# @os_project_pages = Paginator.new @os_project_count, per_page_option, params['page']
|
||||
#
|
||||
#
|
||||
# @open_source_projects = @open_source_projects.offset(@os_project_pages.offset).limit(@os_project_pages.per_page)
|
||||
|
||||
redirect_to open_source_projects_path(:name => params[:name])
|
||||
|
@ -207,7 +249,6 @@ end
|
|||
redirect_to master_apply_open_source_project_path
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def require_master
|
||||
|
|
|
@ -47,7 +47,7 @@ class SoftapplicationsController < ApplicationController
|
|||
|
||||
def show
|
||||
@softapplication = Softapplication.find(params[:id])
|
||||
@project = Project.find_by_identifier(@softapplication.deposit_project)
|
||||
@project = @softapplication.project
|
||||
# 打分统计
|
||||
stars_reates = @softapplication.
|
||||
rates(:quality)
|
||||
|
@ -142,13 +142,16 @@ class SoftapplicationsController < ApplicationController
|
|||
def create
|
||||
@softapplication = Softapplication.new(params[:softapplication])
|
||||
@softapplication.user = User.current
|
||||
@softapplication.deposit_project = params[:project]
|
||||
#@softapplication.deposit_project = params[:project]
|
||||
@softapplication.project = Project.find_by_id(params[:project])
|
||||
|
||||
@softapplication.save_attachments(params[:attachments])
|
||||
|
||||
respond_to do |format|
|
||||
if @softapplication.save
|
||||
ContestingSoftapplication.create(:contest_id => params[:contest_id], :softapplication_id => @softapplication.id)
|
||||
#ProjectingSoftapplication.create_softapplication_projecting(:project_id => params[:project_id], :softapplication_id => @softapplication.id)
|
||||
#ProjectingSoftapplication.create_softapplication_projecting(@project.id, softapplication.id)
|
||||
format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_id]), notice: l(:notice_attendingcontest_work_successfully_created) }
|
||||
# format.json { render json: @softapplication, status: :created, location: @softapplication }
|
||||
else
|
||||
|
@ -170,7 +173,8 @@ class SoftapplicationsController < ApplicationController
|
|||
# @softapplication = Softapplication.find(params[:id])
|
||||
@softapplication.attachments.map{|attach| attach.destroy }
|
||||
@softapplication.save_attachments(params[:attachments])
|
||||
@softapplication.deposit_project = params[:project]
|
||||
#@softapplication.deposit_project = params[:project]
|
||||
@softapplication.project = Project.find_by_id(params[:project])
|
||||
respond_to do |format|
|
||||
if @softapplication.update_attributes(params[:softapplication])
|
||||
format.html { redirect_to @softapplication, notice: l(:notice_softapplication_was_successfully_updated) }
|
||||
|
|
|
@ -21,13 +21,7 @@ class WelcomeController < ApplicationController
|
|||
before_filter :entry_select_course, :entry_select_contest, :entry_select_user, :only => [:index]
|
||||
|
||||
def index
|
||||
projectActive = Project.project_entities.active
|
||||
@projectCount = projectActive.count
|
||||
@projectPublicCount = projectActive.all_public.count
|
||||
@projectHidenCount = @projectCount - @projectPublicCount
|
||||
|
||||
@developerCount = User.developer.count
|
||||
@allUsercount = User.count
|
||||
end
|
||||
|
||||
def robots
|
||||
|
@ -36,10 +30,7 @@ class WelcomeController < ApplicationController
|
|||
end
|
||||
|
||||
def course
|
||||
@courseCount = Project.course_entities.count
|
||||
@teacherCount = User.teacher.count
|
||||
@studentCount = User.student.count
|
||||
@logoLink = logolink()
|
||||
@logoLink ||= logolink()
|
||||
end
|
||||
|
||||
|
||||
|
@ -121,25 +112,25 @@ class WelcomeController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def render(*args)
|
||||
_fake if @fake_filter
|
||||
super
|
||||
end
|
||||
# def render(*args)
|
||||
# _fake if @fake_filter
|
||||
# super
|
||||
# end
|
||||
|
||||
private
|
||||
# private
|
||||
|
||||
def fake
|
||||
@fake_filter = true
|
||||
end
|
||||
# def fake
|
||||
# @fake_filter = true
|
||||
# end
|
||||
|
||||
# 骗子方法
|
||||
def _fake
|
||||
instance_variables.map { |variable|
|
||||
if variable.to_s =~ /Count$/
|
||||
self.instance_variable_set(variable.to_sym,
|
||||
("1" + (self.instance_variable_get(variable.to_sym).to_s)).to_i)
|
||||
end
|
||||
}
|
||||
end
|
||||
# # 骗子方法
|
||||
# def _fake
|
||||
# instance_variables.map { |variable|
|
||||
# if variable.to_s =~ /Count$/
|
||||
# self.instance_variable_set(variable.to_sym,
|
||||
# ("1" + (self.instance_variable_get(variable.to_sym).to_s)).to_i)
|
||||
# end
|
||||
# }
|
||||
# end
|
||||
|
||||
end
|
||||
|
|
|
@ -750,7 +750,7 @@ module ApplicationHelper
|
|||
tmp = Hash.new
|
||||
tmp={"" => ""}
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
tmp[project.name] = project.id
|
||||
end
|
||||
tmp
|
||||
end
|
||||
|
|
|
@ -59,12 +59,11 @@ module IssuesHelper
|
|||
|
||||
def issue_heading(issue)
|
||||
#h("#{issue.tracker} ##{issue.id}")
|
||||
#h("#{issue.tracker} #{issue.source_from}")
|
||||
# h("#{issue.tracker} #{issue.source_from}")
|
||||
s = ''
|
||||
s << ">>"
|
||||
s << link_to(@issue.project.name+l(:issue_list), project_issues_path(@issue.project))
|
||||
s << " >"
|
||||
s << @issue.source_from
|
||||
s << link_to(@issue.project.name, project_issues_path(@issue.project))
|
||||
s << " > #"
|
||||
s << @issue.project_index
|
||||
s.html_safe
|
||||
end
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
module JournalsHelper
|
||||
def render_notes(issue, journal, options={})
|
||||
def render_links(issue, journal, options={})
|
||||
content = ''
|
||||
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))
|
||||
destroyable = User.current.logged? && ((journal.user == User.current) || (issue.author_id == User.current.id) || (User.current.admin == 1))
|
||||
|
@ -38,7 +38,35 @@ module JournalsHelper
|
|||
:title => l(:button_delete))
|
||||
end
|
||||
end
|
||||
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual', :style => 'margin-top:-25px;') unless links.empty?
|
||||
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
|
||||
#content << textilizable(journal, :notes)
|
||||
#css_classes = "wiki"
|
||||
#css_classes << " editable" if editable
|
||||
#content_tag('div', content.html_safe, :id => "journal-#{journal.id}-notes", :class => css_classes)
|
||||
content.html_safe
|
||||
end
|
||||
|
||||
def render_notes (issue, journal, options={})
|
||||
content = ''
|
||||
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))
|
||||
destroyable = User.current.logged? && ((journal.user == User.current) || (issue.author_id == User.current.id) || (User.current.admin == 1))
|
||||
links = []
|
||||
if !journal.notes.blank?
|
||||
links << link_to(l(:button_quote),
|
||||
{:controller => 'journals', :action => 'new', :id => issue.id, :journal_id => journal},
|
||||
:remote => true,
|
||||
:method => 'post',
|
||||
:title => l(:button_quote)) if options[:reply_links]
|
||||
links << link_to_in_place_notes_editor(l(:button_edit), "journal-#{journal.id}-notes",
|
||||
{ :controller => 'journals', :action => 'edit', :id => journal, :format => 'js' },
|
||||
:title => l(:button_edit)) if editable
|
||||
#Added by young
|
||||
if destroyable
|
||||
links << link_to(l(:button_delete), { :controller => 'journals', :action => 'destroy', :id => journal, :format => 'js' },
|
||||
:title => l(:button_delete))
|
||||
end
|
||||
end
|
||||
#content << content_tag('div', links.join(' ').html_safe, :class => 'contextual', :style => 'margin-top:-25px;') unless links.empty?
|
||||
content << textilizable(journal, :notes)
|
||||
css_classes = "wiki"
|
||||
css_classes << " editable" if editable
|
||||
|
|
|
@ -46,4 +46,12 @@ module OpenSourceProjectsHelper
|
|||
end
|
||||
description
|
||||
end
|
||||
|
||||
def show_description_of_bug(bug)
|
||||
description = bug.description
|
||||
if description.nil? || description == ''
|
||||
description = bug.open_source_project.name + l(:label_bug)
|
||||
end
|
||||
description
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,4 +5,8 @@ class BugToOsp < ActiveRecord::Base
|
|||
|
||||
validates_presence_of :osp_id, :relative_memo_id
|
||||
|
||||
scope :visible, lambda {|*args|
|
||||
nil
|
||||
}
|
||||
|
||||
end
|
||||
|
|
|
@ -1156,7 +1156,11 @@ class Issue < ActiveRecord::Base
|
|||
# back string obj which is belong to project.
|
||||
def source_from
|
||||
"" << self.project.name.to_s <<
|
||||
"#" << (self.project.issues.index(self).to_i + 1).to_s
|
||||
"#" << project_index
|
||||
end
|
||||
|
||||
def project_index
|
||||
(self.project.issues.index(self).to_i + 1).to_s
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -57,13 +57,17 @@ class Mailer < ActionMailer::Base
|
|||
#如果是直接留言并且留言对象是Project并且Project类型是课程
|
||||
if !journals_for_message.at_user && journals_for_message.jour.class.to_s.to_sym == :Project && journals_for_message.jour.project_type == 1
|
||||
project = journals_for_message.jour
|
||||
@author = journals_for_message.user
|
||||
#课程的教师
|
||||
@teachers = searchTeacherAndAssistant journals_for_message.jour
|
||||
#收件人邮箱
|
||||
@recipients ||= []
|
||||
@teachers.each do |teacher|
|
||||
if teacher.user.notify_about? journals_for_message
|
||||
@recipients << teacher.user.mail
|
||||
end
|
||||
|
||||
end
|
||||
mail :to => @recipients,
|
||||
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} "
|
||||
else
|
||||
|
@ -440,10 +444,7 @@ class Mailer < ActionMailer::Base
|
|||
headers[:to].delete(@author.mail) if headers[:to].is_a?(Array)
|
||||
headers[:cc].delete(@author.mail) if headers[:cc].is_a?(Array)
|
||||
end
|
||||
if !User.current.nil?
|
||||
#不给本人发邮件
|
||||
headers[:to].delete(User.current.mail) if headers[:to].is_a?(Array)
|
||||
end
|
||||
|
||||
if @author && @author.logged?
|
||||
redmine_headers 'Sender' => @author.login
|
||||
end
|
||||
|
|
|
@ -71,6 +71,11 @@ class RelativeMemo < ActiveRecord::Base
|
|||
errors.add :base, l(:label_memo_locked) if root.locked? && self != root
|
||||
end
|
||||
|
||||
def short_content(length = 25)
|
||||
str = "^(.{,#{length}})[^\n\r]*.*$"
|
||||
content.gsub(Regexp.new(str), '\1...').strip if content
|
||||
end
|
||||
|
||||
# def update_memos_forum
|
||||
# if forum_id_changed?
|
||||
# Message.update_all({:board_id => board_id}, ["id = ? OR parent_id = ?", root.id, root.id ])
|
||||
|
|
|
@ -6,10 +6,11 @@ class Softapplication < ActiveRecord::Base
|
|||
|
||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||
has_many :contesting_softapplications, :dependent => :destroy
|
||||
has_many :projecting_softapplications, :dependent => :destroy
|
||||
#has_many :projecting_softapplications, :dependent => :destroy
|
||||
belongs_to :user
|
||||
belongs_to :project
|
||||
has_many :contests, :through => :contesting_softapplications
|
||||
belongs_to :project
|
||||
|
||||
def add_jour(user, notes, reference_user_id = 0, options = {})
|
||||
if options.count == 0
|
||||
|
|
|
@ -199,6 +199,53 @@ class User < Principal
|
|||
end
|
||||
}
|
||||
|
||||
|
||||
# ======================================================================
|
||||
# 集中处理 User 扩展表为空的问题
|
||||
validate :valid_user_extensions
|
||||
before_save :save_user_extensions
|
||||
|
||||
def extensions
|
||||
self.user_extensions ||= self.create_user_extensions
|
||||
end
|
||||
|
||||
def respond_to?(m, include_private = false)
|
||||
flag = extensions.respond_to? m.to_sym
|
||||
if flag
|
||||
flag
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def method_missing m, *args, &block
|
||||
if extensions.respond_to? m.to_sym
|
||||
self.class.send :define_method, m.to_sym, *args do
|
||||
self.extensions.__send__ m.to_sym, *args
|
||||
end
|
||||
__send__ m.to_sym, *args, &block
|
||||
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def valid_user_extensions
|
||||
if !self.extensions.valid?
|
||||
self.extensions.errors.messages.each do |key, values|
|
||||
values.each do |value|
|
||||
self.errors.add key, value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def save_user_extensions
|
||||
self.extensions.save
|
||||
end
|
||||
# 集中处理 User 扩展表为空的问题 < end
|
||||
# ======================================================================
|
||||
|
||||
#选择项目成员时显示的用户信息文字
|
||||
def userInfo
|
||||
info=self.nickname + ' (' + self.realname + ')';
|
||||
|
@ -645,6 +692,7 @@ class User < Principal
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
# Return true if the user is allowed to do the specified action on a specific context
|
||||
# Action can be:
|
||||
# * a parameter-like Hash (eg. :controller => 'projects', :action => 'edit')
|
||||
|
@ -748,7 +796,36 @@ class User < Principal
|
|||
when News
|
||||
# always send to project members except when mail_notification is set to 'none'
|
||||
true
|
||||
#判定用户是否接受留言提醒邮件
|
||||
when JournalsForMessage
|
||||
##如果是直接留言并且留言对象是Project并且Project类型是课程(课程留言)
|
||||
if !object.at_user && object.jour.class.to_s.to_sym == :Project && object.jour.project_type == 1
|
||||
#根据用户设置邮件接收模式判定当前用户是否接受邮件提醒
|
||||
is_notified_project object.jour
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#用户是否接收project的消息提醒
|
||||
def is_notified_project arg
|
||||
if arg.is_a?(Project)
|
||||
case mail_notification
|
||||
when 'selected'
|
||||
notified_projects_ids.include?(arg.id)
|
||||
when 'only_my_events'
|
||||
projects.include?(arg)
|
||||
when 'only_assigned'
|
||||
false
|
||||
when 'only_owner'
|
||||
course = Course.find_by_extra(arg.identifier)
|
||||
course.teacher == self
|
||||
end
|
||||
#勾选的项目或用户的项目 TODO:需改
|
||||
#notified_projects_ids.include?(arg) || projects.include?(arg)
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<tr>
|
||||
<td><strong>应用软件:</strong></td>
|
||||
<td><strong><%=l(:label_softapplication)%>:</strong></td>
|
||||
<td>
|
||||
<%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %>
|
||||
</td>
|
||||
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
<div style="padding-left: 68px">
|
||||
<tr>
|
||||
<td>简介:</td>
|
||||
<td><%=l(:label_profile)%>:</td>
|
||||
<td>
|
||||
<%= c_softapplication.softapplication.description.truncate(90, omission: '...') %>
|
||||
</td>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||
<tr>
|
||||
<td>发布时间:</td>
|
||||
<td><%=l(:label_activity_time)%>:</td>
|
||||
<td>
|
||||
<%=format_time c_softapplication.created_at %>
|
||||
</td>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</table>
|
||||
<!-- end -->
|
||||
<% else %>
|
||||
<div style="font-size: 14px;margin:10px;">
|
||||
<div style="font-size: 14px;margin:10px;padding-left: 13px">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
</div>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<h3 class="title">请输入竞赛密码</h3>
|
||||
<h3 class="title"><%=l(:label_please_input_password)%></h3>
|
||||
|
||||
<%= form_tag( join_in_contest_contests_path(id: contest.id),
|
||||
:remote => true,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$('#contesting_project_list').html('<%= escape_javascript(render(:partial => 'project_list', :locals => {:contesting_project => @contesting_project})) %>');
|
||||
$("#project_id").val("请选择项目");
|
||||
$("#project_id").val("<%= l(:label_please_select_project) %>");
|
||||
$("#contest_message").val( "<%= l(:label_bid_reason) %>" );
|
||||
$("#put-bid-form").hide();
|
|
@ -1,4 +1,4 @@
|
|||
$('#contesting_softapplication_list').html('<%= escape_javascript(render(:partial => 'softapplication_list', :locals => {:contesting_softapplication => @contesting_softapplication})) %>');
|
||||
$("#softapplication_id").val("请选择参赛应用");
|
||||
$("#softapplication_id").val("<%= l(:label_please_select_contestingsoftapplication) %>");
|
||||
$("#contest_message").val( "<%= l(:label_bid_reason) %>" );
|
||||
$("#put-bid-form").hide();
|
|
@ -15,6 +15,7 @@
|
|||
margin-top: -10px;
|
||||
/*margin-right: -4px;*/
|
||||
}
|
||||
|
||||
input[type="button"].contest_btn {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
|
@ -30,6 +31,7 @@
|
|||
margin-top: -10px;
|
||||
margin-right: -2px;
|
||||
}
|
||||
|
||||
textarea:focus {
|
||||
border: #d5dee9 1px solid;
|
||||
}
|
||||
|
@ -62,24 +64,17 @@
|
|||
<%= render_flash_messages %>
|
||||
<!--参赛步骤-->
|
||||
<div style="padding-left: 23px; padding-bottom: 10px; color: grey; font-size: 12px">
|
||||
<div>温馨提示:如果您准备参加竞赛,请点击下面的"新建参赛作品"!</div>
|
||||
<div style="margin-left: 59px; padding-top: 2px">1) 若您已完成开发,且只希望发布您的作品,“托管项目”一项可以不选;</div>
|
||||
<div style="margin-left: 59px; padding-top: 2px">2) 若您希望托管竞赛数据和代码以及保留开发和提交代码的轨迹,请从“托管项目”中选择一项您已创建好的项目作为该参赛作品的托管项目,若您还没有创建项目,请点击右边的“创建项目”,然后回到本页再选择。</div>
|
||||
<div><%= l(:label_wellmeaning_intimation_contentone) %></div>
|
||||
<div style="margin-left: 59px; padding-top: 2px">1) <%= l(:label_wellmeaning_intimation_contenttwo) %></div>
|
||||
<div style="margin-left: 59px; padding-top: 2px">2) <%= l(:label_wellmeaning_intimation_contentthree) %></div>
|
||||
</div>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<div style="padding-bottom: 10px; line-height: 15px">
|
||||
<div style="padding-left: 82px; font-size: 14px">
|
||||
<span><strong>参加竞赛:</strong></span>
|
||||
<span><%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||
<span><strong><%= l(:label_attending_contest) %>:</strong></span>
|
||||
<span><%= link_to l(:label_new_attendingcontest_work), "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||
</div>
|
||||
<!-- <div style="padding-left: 82px; ">
|
||||
<span style="padding-top: 50px">步骤1:</span>
|
||||
<span><%#= link_to '新建参赛作品', new_softapplication_path(:target=>'_blank'), :target=>'_blank' %></span>
|
||||
<span><%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||
<span style="font-size: 12px; color: grey">(先点击“新建参赛作品”,然后刷新页面,再继续步骤2。)</span>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="font-size: 14px;margin:10px;padding-left: 73px">
|
||||
|
@ -91,69 +86,81 @@
|
|||
<!--点击新建参赛作品弹出框新建参赛作品并关联到竞赛中-->
|
||||
<div id="put-project-form" style="display: none; padding-left: 83px; width: 88%">
|
||||
<%= form_for Softapplication.new, :url => softapplications_path do |f| %>
|
||||
<fieldset class="contes-new-box", style="padding-left: 36px; line-height: 8px; margin-left: 1px">
|
||||
<fieldset class="contes-new-box" style="padding-left: 36px; line-height: 8px; margin-left: 1px" >
|
||||
<%= hidden_field_tag 'contest_id', @contest.id %>
|
||||
<tr style="width:700px; margin-left: -10px;">
|
||||
<span><%= l(:label_work_name) %></span>
|
||||
<span class="contest-star"> * </span>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(25个汉字以内)</span>
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
<span class="contest-star"> * </span>:
|
||||
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_running_platform) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_type) %></span>
|
||||
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(125个汉字以内)</span>
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_developers) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_deposit_project) %>:</span>
|
||||
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2' %></span>
|
||||
<span><%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%></span>
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
<span><%= link_to l(:label_create_new_projects), new_project_path(course: 0, project_type: 0), :target => '_blank' %></span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<fieldset style="width: 500px; padding-top: 10px">
|
||||
<legend>
|
||||
上传作品软件包和作品截图
|
||||
<%= l(:label_upload_softworkpacket_photo) %>
|
||||
</legend>
|
||||
<%#= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
|
||||
<p style="font-size: 11px">
|
||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed)%> <br />
|
||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/>
|
||||
<br>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition)%>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition) %>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
|
@ -176,38 +183,40 @@
|
|||
|
||||
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
||||
|
||||
<% @contesting_project.sort.reverse.each do |c_project|%>
|
||||
<% if c_project.project %>
|
||||
<div style="padding-left: 18px">
|
||||
<% @contesting_project.sort.reverse.each do |c_project| %>
|
||||
<% if c_project.project %>
|
||||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<div>
|
||||
<div><strong>参赛作品: <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %> </strong>
|
||||
<div><strong><%= l(:label_contest_work) %>
|
||||
: <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %> </strong>
|
||||
|
||||
<div style="float: right">
|
||||
<td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
|
||||
<strong>
|
||||
<span id="reward_result_<%=c_project.id%>"> <!-- 调用js进行刷新 -->
|
||||
<span id="reward_result_<%= c_project.id %>"> <!-- 调用js进行刷新 -->
|
||||
<% if get_prize(c_project).nil? or get_prize(c_project) == "" %>
|
||||
<% if @contest.deadline < Date.today %>
|
||||
<span style="color: red"><%= l(:label_noawards)%></span>
|
||||
<% else%>
|
||||
<span style="color: red"><%= l(:label_noawards_current)%></span>
|
||||
<span style="color: red"><%= l(:label_noawards) %></span>
|
||||
<% else %>
|
||||
<span style="color: red"><%= l(:label_noawards_current) %></span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% case get_prize(c_project) %>
|
||||
<% when '-1' %>
|
||||
<%= image_tag("/images/bid/special_reward.png")%>
|
||||
<%= image_tag("/images/bid/special_reward.png") %>
|
||||
<% when '0' %>
|
||||
<%= image_tag("/images/bid/first_reward.png")%>
|
||||
<%= image_tag("/images/bid/first_reward.png") %>
|
||||
<% when '1' %>
|
||||
<%= image_tag("/images/bid/second_reward.png")%>
|
||||
<%= image_tag("/images/bid/second_reward.png") %>
|
||||
<% when '2' %>
|
||||
<%= image_tag("/images/bid/third_reward.png")%>
|
||||
<%= image_tag("/images/bid/third_reward.png") %>
|
||||
<% when '3' %>
|
||||
<%= image_tag("/images/bid/forth_reward.png")%>
|
||||
<%= image_tag("/images/bid/forth_reward.png") %>
|
||||
<% when '4' %>
|
||||
<%= image_tag("/images/bid/fifth_reward.png")%>
|
||||
<%= image_tag("/images/bid/fifth_reward.png") %>
|
||||
<% when '5' %>
|
||||
<%= image_tag("/images/bid/qualified.png")%>
|
||||
<%= image_tag("/images/bid/qualified.png") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
|
@ -217,97 +226,107 @@
|
|||
<!-- 评价显隐控制按钮-->
|
||||
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
||||
<td valign="top" align="right" width="10%">
|
||||
<span> <%= toggle_link '评奖', c_project.id.to_s %></span>
|
||||
<span> <%= toggle_link l(:label_reward), c_project.id.to_s %></span>
|
||||
<!-- 评价应标项目的表单 -->
|
||||
<span style="display: none; vertical-align: top " id = '<%= c_project.id %>'>
|
||||
<%= form_for "set_reward_project",:remote=>true,:url=>set_reward_project_contest_path do |f| %>
|
||||
<%= f.text_field :c_id,:style => "display:none",:value => c_project.id,:size=>"0" %>
|
||||
<%= f.select :reward,"<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||
<span style="display: none; vertical-align: top " id='<%= c_project.id %>'>
|
||||
<%= form_for "set_reward_project", :remote => true, :url => set_reward_project_contest_path do |f| %>
|
||||
<%= f.text_field :c_id, :style => "display:none", :value => c_project.id, :size => "0" %>
|
||||
<%= f.select :reward, "<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||
<option value = '0'>#{l(:label_first_reward)}</option>
|
||||
<option value = '1'>#{l(:label_second_reward)}</option>
|
||||
<option value = '2'>三等奖</option>
|
||||
<option value = '3'>四等奖</option>
|
||||
<option value = '4'>五等奖</option>
|
||||
<option value = '2'>#{l(:label_third_reward)}</option>
|
||||
<option value = '3'>#{l(:label_fourth_reward)}</option>
|
||||
<option value = '4'>#{l(:label_fifth_reward)}</option>
|
||||
<option value = '5'>#{l(:label_comfort_reward)}</option>".html_safe %>
|
||||
<%= f.submit "提交",:class=>"submit" %>
|
||||
<%= f.submit :value => l(:button_submit), :class => "submit" %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div></br>
|
||||
</div>
|
||||
</br>
|
||||
</div>
|
||||
<div style="padding-left: 68px">
|
||||
<tr>
|
||||
<td>简介:</td>
|
||||
<td><%= l(:label_profile) %>:</td>
|
||||
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
||||
</tr></br>
|
||||
</tr>
|
||||
</br>
|
||||
</div>
|
||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||
<span><strong>参赛时间:</strong><%= format_time c_project.created_at%></span>
|
||||
<span style="padding-left: 240px"><strong>参赛代表:</strong><%= c_project.user.name %></span>
|
||||
<span><strong><%= l(:label_attendingcontest_time) %>
|
||||
:</strong><%= format_time c_project.created_at %></span>
|
||||
<span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %>
|
||||
:</strong><%= c_project.user.name %></span>
|
||||
</div>
|
||||
|
||||
<div style="padding-left: 68px">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @contesting_softapplication.each do |c_softapplication|%>
|
||||
<% if c_softapplication.softapplication %>
|
||||
<div style="padding-left: 18px">
|
||||
<% @contesting_softapplication.each do |c_softapplication| %>
|
||||
<% if c_softapplication.softapplication %>
|
||||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<tr>
|
||||
<td><strong>参赛作品: </strong></td>
|
||||
<td><strong><%= l(:label_contest_work) %>: </strong></td>
|
||||
<td> <%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %> </td>
|
||||
</tr></br>
|
||||
</tr>
|
||||
</br>
|
||||
</div>
|
||||
|
||||
<div style="padding-left: 68px; padding-top: 5px">
|
||||
<tr>
|
||||
<td><strong>简介:</strong></td>
|
||||
<td><strong><%= l(:label_profile) %>:</strong></td>
|
||||
<td> <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> </td>
|
||||
</tr></br>
|
||||
</tr>
|
||||
</br>
|
||||
</div>
|
||||
|
||||
<div style="padding-left: 68px; pading-bottom: 8px">
|
||||
<span><strong>参赛时间:</strong><%= format_time c_softapplication.created_at %></span>
|
||||
<span style="padding-left: 240px"><strong>参赛代表:</strong><%= c_softapplication.softapplication.user.name %></span>
|
||||
<span><strong><%= l(:label_attendingcontest_time) %>
|
||||
:</strong><%= format_time c_softapplication.created_at %></span>
|
||||
<span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %>
|
||||
:</strong><%= c_softapplication.softapplication.user.name %></span>
|
||||
</div>
|
||||
|
||||
<!--获奖及教师评奖-->
|
||||
<div style="padding-left: 18px; padding-bottom: 5px">
|
||||
<span style="padding-left: 50px"><strong>最终得分:</strong></span><span style="color: red"><%= c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s%>分</span>
|
||||
<span style="padding-left: 50px"><strong><%= l(:label_final_scores) %>
|
||||
:</strong></span><span style="color: red"><%= c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>
|
||||
分</span>
|
||||
<span style="padding-left: 334px">
|
||||
<td>
|
||||
<strong>
|
||||
<span id="reward_result_<%=c_softapplication.id%>" > <!-- 调用js进行刷新 -->
|
||||
<span id="reward_result_<%= c_softapplication.id %>"> <!-- 调用js进行刷新 -->
|
||||
<% if get_prize(c_softapplication).nil? or get_prize(c_softapplication) == "" %>
|
||||
<% if @contest.deadline < Date.today %>
|
||||
<span style="color: red"><%= l(:label_noawards)%></span>
|
||||
<% else%>
|
||||
<span style="color: red"><%= l(:label_noawards_current)%></span>
|
||||
<span style="color: red"><%= l(:label_noawards) %></span>
|
||||
<% else %>
|
||||
<span style="color: red"><%= l(:label_noawards_current) %></span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% case get_prize(c_softapplication) %>
|
||||
<% when '-1' %>
|
||||
<%= image_tag("/images/bid/special_reward.png")%>
|
||||
<%= image_tag("/images/bid/special_reward.png") %>
|
||||
<% when '0' %>
|
||||
<%= image_tag("/images/bid/first_reward.png")%>
|
||||
<%= image_tag("/images/bid/first_reward.png") %>
|
||||
<% when '1' %>
|
||||
<%= image_tag("/images/bid/second_reward.png")%>
|
||||
<%= image_tag("/images/bid/second_reward.png") %>
|
||||
<% when '2' %>
|
||||
<%= image_tag("/images/bid/third_reward.png")%>
|
||||
<%= image_tag("/images/bid/third_reward.png") %>
|
||||
<% when '3' %>
|
||||
<%= image_tag("/images/bid/forth_reward.png")%>
|
||||
<%= image_tag("/images/bid/forth_reward.png") %>
|
||||
<% when '4' %>
|
||||
<%= image_tag("/images/bid/fifth_reward.png")%>
|
||||
<%= image_tag("/images/bid/fifth_reward.png") %>
|
||||
<% when '5' %>
|
||||
<%= image_tag("/images/bid/qualified.png")%>
|
||||
<%= image_tag("/images/bid/qualified.png") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
|
@ -316,30 +335,30 @@
|
|||
|
||||
<!-- 评价显隐控制按钮-->
|
||||
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
||||
<div style="valign="top" align="right" width="10%"">
|
||||
<div style="valign=" top" align="right" width="10%"">
|
||||
<span style="padding-right: 5px; padding-top: 1px"> <%= toggle_link '评奖', c_softapplication.id.to_s %></span>
|
||||
<!-- 评价应标项目的表单 -->
|
||||
<span style="display: none; vertical-align: top " id = '<%= c_softapplication.id %>'>
|
||||
<%= form_for "set_reward_softapplication",:remote=>true,:url=>set_reward_softapplication_contest_path do |f| %>
|
||||
<%= f.text_field :c_id,:style => "display:none",:value => c_softapplication.id,:size=>"0" %>
|
||||
<%= f.select :reward,"<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||
<span style="display: none; vertical-align: top " id='<%= c_softapplication.id %>'>
|
||||
<%= form_for "set_reward_softapplication", :remote => true, :url => set_reward_softapplication_contest_path do |f| %>
|
||||
<%= f.text_field :c_id, :style => "display:none", :value => c_softapplication.id, :size => "0" %>
|
||||
<%= f.select :reward, "<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||
<option value = '0'>#{l(:label_first_reward)}</option>
|
||||
<option value = '1'>#{l(:label_second_reward)}</option>
|
||||
<option value = '2'>三等奖</option>
|
||||
<option value = '3'>四等奖</option>
|
||||
<option value = '4'>五等奖</option>
|
||||
<option value = '2'>#{l(:label_third_reward)}</option>
|
||||
<option value = '3'>#{l(:label_fourth_reward)}</option>
|
||||
<option value = '4'>#{l(:label_fifth_reward)}</option>
|
||||
<option value = '5'>#{l(:label_comfort_reward)}</option>".html_safe %>
|
||||
<%= f.submit "提交",:class=>"submit" %>
|
||||
<%= f.submit :value => l(:button_submit), :class => "submit" %>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="pagination">
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<td>
|
||||
<p>
|
||||
<div class="font_lighter" style="font-size: 13px;">
|
||||
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%> <!--跳转到project的new.html.erb-->
|
||||
<%= link_to l(:label_create_new_projects), new_project_path(course: 0, project_type: 0), :target=>'_blank'%> <!--跳转到project的new.html.erb-->
|
||||
</div>
|
||||
</p>
|
||||
</td>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<td>
|
||||
<p>
|
||||
<div class="font_lighter" style="font-size: 13px;">
|
||||
<%= link_to '发布应用', new_softapplication_path(:target=>'_blank'), :target=>'_blank' %>
|
||||
<%= link_to l(:label_release_softapplication), new_softapplication_path(:target=>'_blank'), :target=>'_blank' %>
|
||||
</div>
|
||||
</p>
|
||||
</td>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<% versions = project.versions.sort %>
|
||||
<% attachmenttypes = project.attachmenttypes %>
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<%= form_tag(project_files_path(project), :multipart => true,:remote => true,:method => :post,:name=>"upload_form", :class => "tabular") do %>
|
||||
<%= form_tag(project_files_path(project), :multipart => true,:remote => false,:method => :post,:name=>"upload_form", :class => "tabular") do %>
|
||||
<div class="box">
|
||||
<p>
|
||||
<table>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
;
|
||||
});
|
||||
|
||||
function eval_ajax (xhr, textStatus) {
|
||||
function eval_ajax(xhr, textStatus) {
|
||||
if (textStatus == 'success') {
|
||||
eval(xhr.responseText);
|
||||
} else if (textStatus == 'error') {
|
||||
|
@ -128,7 +128,7 @@
|
|||
type: "POST",
|
||||
data: {
|
||||
type: encodeURIComponent(value),
|
||||
contentType:$('#attach_sufix_browse').val()
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
|
@ -190,18 +190,17 @@
|
|||
|
||||
|
||||
<script type='text/javascript'>
|
||||
function tagAddClick(divid,objId,objTag)
|
||||
{
|
||||
function tagAddClick(divid, objId, objTag) {
|
||||
alert("OK");
|
||||
$.ajax({
|
||||
type :"POST",
|
||||
url :'/users/tag_saveEx',
|
||||
type: "POST",
|
||||
url: '/users/tag_saveEx',
|
||||
data: {
|
||||
tagname: $('tag_name').value,
|
||||
obj_id: encodeURIComponent(objId),
|
||||
obj_flag:encodeURIComponent(objTag)
|
||||
obj_flag: encodeURIComponent(objTag)
|
||||
},
|
||||
success: function(data, textStatus){
|
||||
success: function (data, textStatus) {
|
||||
alert("OK");
|
||||
$(divid).empty();
|
||||
$(divid).html('123');
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<table width="580px" border="0">
|
||||
<tr>
|
||||
<!-- add by huang -->
|
||||
<td colspan="2" valign="top"> <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> <div id="note-<%= journal.indice %>"></td>
|
||||
<td colspan="1" valign="top"> <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> <div id="note-<%= journal.indice %>"></div></td>
|
||||
<td><%= render_links(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></td>
|
||||
<!--end-->
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
<h3 style="padding-left: 10px;"><%= l(:label_my_account) %></h3>
|
||||
<%= error_messages_for 'user' %>
|
||||
<%= error_messages_for 'se' %>
|
||||
|
||||
<fieldset class="box" style="margin:10px;">
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
<!--added by fq -->
|
||||
<!--display the board-->
|
||||
|
||||
<div class="borad-topic-count" style="margin-top:10px">
|
||||
<span>共有 <%= link_to @topic_count %> 个贴子 </span>
|
||||
</div>
|
||||
<div style="padding-top: 10px">
|
||||
<% if memos.any? %>
|
||||
<% memos.each do |topic| %>
|
||||
<table class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
|
||||
<%= image_tag('../images/avatars/User/0', :class => "avatar") unless topic.author%> </td>
|
||||
<td>
|
||||
<table width="630px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
||||
<% if topic.url.nil? || topic.url == '' %>
|
||||
<%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %>
|
||||
<% else %>
|
||||
<%= link_to h(topic.subject), topic.url, :target => '_blank' %>
|
||||
<% end %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回帖</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">关注</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">浏览</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_description"><%= topic.short_content(70) %> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to topic.topic_resource, topic.url, :target => '_blank' %>
|
||||
</span></td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<% end %>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @topic_pages, @topic_count %>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
|
@ -2,7 +2,7 @@
|
|||
<!--display the board-->
|
||||
|
||||
<div class="borad-topic-count" style="margin-top:10px">
|
||||
<span>共有 <%= link_to memos.count %> 个贴子 </span
|
||||
<span>共有 <%= link_to @topic_count %> 个贴子 </span>
|
||||
</div>
|
||||
<div style="padding-top: 10px">
|
||||
<% if memos.any? %>
|
||||
|
@ -18,12 +18,12 @@
|
|||
<% if topic.url.nil? || topic.url == '' %>
|
||||
<%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %>
|
||||
<% else %>
|
||||
<%= link_to h(topic.subject), topic.url %>
|
||||
<%= link_to h(topic.subject), topic.url, :target => '_blank' %>
|
||||
<% end %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回帖</td>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">关注</td>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">浏览</td>
|
||||
|
@ -51,17 +51,17 @@
|
|||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
<td><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<td align="left"><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
</span></td>
|
||||
<td align="left"><%= no_use_link(topic, User.current) %> </td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<%= javascript_include_tag "ichart.1.2.min" %>
|
||||
<%= stylesheet_link_tag "sec-analysis.css" %>
|
||||
<%= stylesheet_link_tag "buglist-ichart.css" %>
|
||||
<%= stylesheet_link_tag "buglist.css" %>
|
||||
|
||||
|
||||
<div class="mask">
|
||||
<div class="header2"></div>
|
||||
<div class="colleft">
|
||||
|
@ -20,33 +21,63 @@
|
|||
</div>
|
||||
|
||||
<div class="col2" style="margin-left:0px">
|
||||
<div style="margin-left:0px" > <span> <h1 style="fontsize:19px;color:orange;font-weight:900">项目安全态势 </h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多 >>", :controller => "open_source_projects",:action => "showmemo", :id => @open_source_project.id %></span></div>
|
||||
<div style="margin-left:0px" > <span> <h1 style="fontsize:19px;color:orange;font-weight:900">项目安全态势 </h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多 >>", :controller => "open_source_projects",:action => "showbug", :id => @open_source_project.id %></span></div>
|
||||
|
||||
<% if @open_source_project.id ==42 then %>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<img src="/images/version_marker.png" alt="Tags">
|
||||
</span>
|
||||
<span class="tag_fouse">聚焦:</span>
|
||||
<div id="tag">栈溢出</div>
|
||||
<div id="tag">远程权限</div>
|
||||
<div id="tag">框架安全</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% elsif @open_source_project.id ==70 then %>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<img src="/images/version_marker.png" alt="Tags">
|
||||
</span>
|
||||
<span class="tag_fouse">聚焦:</span>
|
||||
<div id="tag">Kernel安全</div>
|
||||
<div id="tag">函数漏洞</div>
|
||||
<div id="tag">ping_init_sock()</div>
|
||||
</div>
|
||||
|
||||
<% elsif @open_source_project.id ==17 then %>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<img src="/images/version_marker.png" alt="Tags">
|
||||
</span>
|
||||
<span class="tag_fouse">聚焦:</span>
|
||||
<div id="tag">Heartbleed</div>
|
||||
<div id="tag">致命漏洞</div>
|
||||
</div>
|
||||
|
||||
<% elsif @open_source_project.id ==55 then %>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<img src="/images/version_marker.png" alt="Tags">
|
||||
</span>
|
||||
<span class="tag_fouse">聚焦:</span>
|
||||
<div id="tag">DDos攻击</div>
|
||||
<div id="tag">信息泄露</div>
|
||||
</div>
|
||||
|
||||
<%end%>
|
||||
|
||||
<div class="fixed"></div>
|
||||
<div class="li_list" style="margin-top:10px;margin-left:10px">
|
||||
<ul style="list-style-type: square;">
|
||||
<% @bugs.each do |bug| %>
|
||||
<li><span class="li_time">>[<%= show_description(bug, open_source_project) %>]</span><%= link_to bug.subject, bug.url %></li>
|
||||
<li><span class="li_time">>[<%= show_description(bug, open_source_project) %>]</span><%= link_to bug.subject, bug.url, :target => '_blank' %></li>
|
||||
<% end %>
|
||||
|
||||
<!-- <li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62261" title="Cobbler 2.4.x - 2.6.x 本地文件包含">Cobbler 2.4.x - 2.6.x 本地文件包含</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62260" title="Ruby OpenSSL CA私钥伪造漏洞">Ruby OpenSSL CA私钥伪造漏洞</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">>[远程溢出漏洞]</span><a href="/vuldb/ssvid-62259" title="Adobe Flash Player 整数堆栈下溢远程命令执行">Adobe Flash Player 远程命令执行</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">14-05-07</span><a href="/vuldb/ssvid-62258" title="PHPDISK phpdisk_del_process.php SQL注入漏洞">PHPDISK phpdisk_del_process.php SQL注入漏洞</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
|
||||
|
||||
<!-- <li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62248" title="Eucalyptus Web Services拒绝服务漏洞">Eucalyptus Web Services</a></li> -->
|
||||
|
||||
<!-- <li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62245" title="Watchguard Fireware XTM OpenSSL TLS心跳信息泄漏漏洞"> Fireware XTM OpenSSL TLS</a></li> -->
|
||||
|
||||
<!-- <li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62244" title="SAP Sybase SQL Anywhere OpenSSL TLS泄漏漏洞">Sybase SQL Anywhere OpenSSL TLS</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -61,8 +92,6 @@
|
|||
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var data = [
|
||||
{
|
||||
name :'',
|
||||
|
@ -127,7 +156,7 @@
|
|||
parseText:function(tip,name,value,text,i){
|
||||
return name+"漏洞数:"+value;
|
||||
}
|
||||
} ,
|
||||
}
|
||||
|
||||
},
|
||||
tipMocker:function(tips,i){
|
||||
|
@ -144,17 +173,6 @@
|
|||
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
|
||||
"</div>"+tips.join("<br/>");
|
||||
},
|
||||
|
||||
// legend : {
|
||||
// enable : true,
|
||||
// row:1,//设置在一行上显示,与column配合使用
|
||||
// column : 'max',
|
||||
// valign:'top',
|
||||
// sign:'bar',
|
||||
// background_color:null,//设置透明背景
|
||||
// offsetx:-80,//设置x轴偏移,满足位置需要
|
||||
// border : true
|
||||
// },
|
||||
crosshair:{
|
||||
enable:true, //十字交叉线
|
||||
line_color:'#62bce9'
|
||||
|
@ -194,8 +212,7 @@
|
|||
start_scale:0,
|
||||
scale_space:50,
|
||||
end_scale:70,
|
||||
scale_color:'#9f9f9f',
|
||||
// label : {color:'#ffffff',fontsize:11},
|
||||
scale_color:'#9f9f9f'
|
||||
|
||||
},{
|
||||
position:'bottom',
|
||||
|
@ -203,35 +220,10 @@
|
|||
}]
|
||||
}
|
||||
});
|
||||
//开始画图
|
||||
|
||||
/**
|
||||
*自定义组件,画平均线。
|
||||
*/
|
||||
// line.plugin(new iChart.Custom({
|
||||
// drawFn:function(){
|
||||
// /**
|
||||
// *计算平均值的高度(坐标Y值)
|
||||
// *计算高度还不会! 会划线了!
|
||||
// */
|
||||
// // var avg = line.total/5,
|
||||
// // coo = line.getCoordinate(),
|
||||
// // x = coo.get('originx'),
|
||||
// // W = coo.width,
|
||||
// // S = coo.getScale('left'),
|
||||
// // H = coo.height,
|
||||
// // h = (avg - S.start) * H / S.distance,
|
||||
// // y = line.y + H - h;
|
||||
// line.target.line(28,97,400,97,2,'#b32c0d')
|
||||
// .textAlign('start')
|
||||
// .textBaseline('middle')
|
||||
// .textFont('600 12px Verdana');
|
||||
// }
|
||||
// }));
|
||||
line.draw();
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<!--我是分割线1===================================================================================================!-->
|
||||
|
@ -282,9 +274,6 @@
|
|||
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var data = [
|
||||
{
|
||||
name : '',
|
||||
|
@ -297,16 +286,9 @@
|
|||
|
||||
//创建x轴标签文本
|
||||
var date = new Date()
|
||||
|
||||
var labels = [];
|
||||
/* labels.push(date.getFullYear()-2);
|
||||
labels.push(date.getFullYear()-1);
|
||||
labels.push(date.getFullYear());
|
||||
labels.push(date.getFullYear()+1);*/
|
||||
|
||||
labels=["2012","","","","","","","","","","","","2013","","","","","","","","","","","","2014","","","",""];
|
||||
|
||||
|
||||
var line = new iChart.LineBasic2D({
|
||||
render : 'canvasDiv2',
|
||||
data: data,
|
||||
|
@ -352,7 +334,7 @@
|
|||
parseText:function(tip,name,value,text,i){
|
||||
return name+"帖子数:"+value+"万";
|
||||
}
|
||||
} ,
|
||||
}
|
||||
},
|
||||
|
||||
tipMocker:function(tips,i){
|
||||
|
@ -378,10 +360,9 @@
|
|||
label:false, //是否显示数值
|
||||
// hollow_inside:false,
|
||||
smooth : true,//平滑曲线
|
||||
point_size:2, // 焦点大小
|
||||
point_size:2 // 焦点大小
|
||||
// point_hollow : true,
|
||||
|
||||
|
||||
},
|
||||
coordinate:{
|
||||
width:225, // 图表大小
|
||||
|
@ -404,7 +385,7 @@
|
|||
start_scale:0,
|
||||
scale_space:50,
|
||||
end_scale:70,
|
||||
scale_color:'#9f9f9f',
|
||||
scale_color:'#9f9f9f'
|
||||
// label : {color:'#ffffff',fontsize:11},
|
||||
|
||||
},{
|
||||
|
@ -435,11 +416,11 @@
|
|||
<td>
|
||||
<table width="630px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), topic.url %></td>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), topic.url, :target => '_blank' %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回帖</td>
|
||||
|
@ -449,7 +430,7 @@
|
|||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">关注</td>
|
||||
|
@ -459,7 +440,7 @@
|
|||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">浏览</td>
|
||||
|
@ -467,17 +448,17 @@
|
|||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
<td><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%#= authoring topic.created_at, topic.author %>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"><%=user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
</span></td>
|
||||
<td align="left"><%= no_use_link(topic, User.current) %> </td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
<!-- added by fq -->
|
||||
|
||||
|
||||
|
||||
<div style="width: 940px">
|
||||
|
||||
<div class="borad-topic-count" style="margin-top:10px; width: 600px">
|
||||
<span>共有 <%= link_to @bug_count %> 个安全贴子 </span>
|
||||
</div>
|
||||
<div style="padding-top: 10px ;width: 940px">
|
||||
<% if @bugs.any? %>
|
||||
<% @bugs.each do |bug| %>
|
||||
<% topic = bug.bug %>
|
||||
<table style="width: 940px" class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
|
||||
<%= image_tag('../images/avatars/User/0', :class => "avatar") unless topic.author%> </td>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td valign="top" width="700px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
||||
<% if topic.url.nil? || topic.url == '' %>
|
||||
<%= link_to h(topic.subject), open_source_project_relative_memo_path(bug.open_source_project, topic) %>
|
||||
<% else %>
|
||||
<%= link_to h(topic.subject), topic.url, :target => '_blank' %>
|
||||
<% end %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回帖</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">关注</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">浏览</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_description"> <%= topic.short_content(100) %></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to topic.topic_resource, topic.url, :target => '_blank' %>
|
||||
</span></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<% end %>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @bug_pages, @bug_count %>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%#= render :partial => 'open_source_projects/show_memo', :locals => {:memos => @memos, :open_source_project => @open_source_project} %>
|
||||
</div>
|
|
@ -48,7 +48,7 @@
|
|||
background-position: -266px 3px;
|
||||
}
|
||||
.navigation .icon-search, .navigation .nav-pill-cancle, .navigation .nav-switch-icon, .navigation .nav-topbar .topbar-search .topbar-submit, .navigation .nav-topbar-arror {
|
||||
background: url();
|
||||
/*background: url()*/
|
||||
}
|
||||
.nav-switch-icon {
|
||||
width: 15px;
|
||||
|
@ -129,8 +129,6 @@ li {
|
|||
.nav-search-con{
|
||||
padding-top: 7px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<%= javascript_include_tag "ichart.1.2.min" %>
|
||||
<%= stylesheet_link_tag "buglist-div-use.css" %>
|
||||
|
@ -146,29 +144,13 @@ li {
|
|||
</div>
|
||||
|
||||
<div class="col2">
|
||||
<div> <span> <h1 style="fontsize:19px">软件安全漏洞 </h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><a href="#" hover="text-decoration: underline;" >More >></span></a></div>
|
||||
<div> <span> <h1 style="fontsize:19px">软件安全态势</h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to '更多 >>', allbug_open_source_projects_path %></span></div>
|
||||
<div class="fixed"></div>
|
||||
<div id ="buglist" class="li_list" style="margin-top:10px;margin-left:10px">
|
||||
<div class="li_list" style="margin-top:10px;margin-left:10px">
|
||||
<ul style="list-style-type: square;">
|
||||
<li><span class="li_time">[DDoS漏洞]</span><a href="/vuldb/ssvid-62261" title="Cobbler 2.4.x - 2.6.x 本地文件包含">Cobbler 2.4.x - 2.6.x 本地文件包含</a></li>
|
||||
|
||||
<li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62260" title="Ruby OpenSSL CA私钥伪造漏洞">Ruby OpenSSL CA私钥伪造漏洞</a></li>
|
||||
|
||||
<li style="color: red"><span class="li_time">[远程溢出漏洞]</span><a href="/vuldb/ssvid-62259" title="Adobe Flash Player 整数堆栈下溢远程命令执行">Adobe Flash Player 整数堆栈下溢远程命令执行</a></li>
|
||||
|
||||
<!-- <li><span class="li_time">14-05-07</span><a href="/vuldb/ssvid-62258" title="PHPDISK phpdisk_del_process.php SQL注入漏洞">PHPDISK phpdisk_del_process.php SQL注入漏洞</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
|
||||
|
||||
<li ><span class="li_time">[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM 拒绝服务漏洞</a></li>
|
||||
|
||||
<li><span class="li_time">[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入以及远程代码执行</a></li>
|
||||
|
||||
<li><span class="li_time">[DDoS漏洞]</span><a href="/vuldb/ssvid-62248" title="Eucalyptus Web Services拒绝服务漏洞">Eucalyptus Web Services拒绝服务漏洞</a></li>
|
||||
|
||||
<li ><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62245" title="Watchguard Fireware XTM OpenSSL TLS心跳信息泄漏漏洞">Watchguard Fireware XTM OpenSSL TLS心跳...</a></li>
|
||||
|
||||
<li style="color: red"><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62244" title="SAP Sybase SQL Anywhere OpenSSL TLS泄漏漏洞">SAP Sybase SQL Anywhere OpenSSL TLS</a></li>
|
||||
<% @bugs.each do |bug| %>
|
||||
<li style="width:400px;"><span class="li_time">[<%= show_description_of_bug(bug) %>]</span><%= link_to bug.bug.subject, bug.bug.url, :target => '_blank' %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -236,7 +218,7 @@ li {
|
|||
parseText:function(tip,name,value,text,i){
|
||||
return name+"漏洞数:"+value;
|
||||
}
|
||||
} ,
|
||||
}
|
||||
},
|
||||
tipMocker:function(tips,i){
|
||||
var index;
|
||||
|
@ -272,7 +254,7 @@ li {
|
|||
label:false, //是否显示数值
|
||||
// hollow_inside:false,
|
||||
smooth : true,//平滑曲线
|
||||
point_size:2, // 焦点大小
|
||||
point_size:2 // 焦点大小
|
||||
// point_hollow : true,
|
||||
|
||||
|
||||
|
@ -298,7 +280,7 @@ li {
|
|||
start_scale:0,
|
||||
scale_space:50,
|
||||
end_scale:70,
|
||||
scale_color:'#9f9f9f',
|
||||
scale_color:'#9f9f9f'
|
||||
// label : {color:'#ffffff',fontsize:11},
|
||||
|
||||
},{
|
||||
|
@ -417,7 +399,7 @@ line.target.line(28,97,400,97,2,'#b32c0d')
|
|||
</div>
|
||||
<div class="nav-flexbox last">
|
||||
<div class="nav-category">
|
||||
<h4 title="上市时间">
|
||||
<h4 title="上市时间"> </h4>
|
||||
<div class="nav-category-wrap ">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<!--modified by huang-->
|
||||
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
||||
<span>
|
||||
<%= link_to l(:label_memo_new_from_forum), new_open_source_project_relative_memo_path(@open_source_project), :class => 'icon icon-add',
|
||||
<%#= link_to l(:label_memo_new_from_forum), new_open_source_project_relative_memo_path(@open_source_project), :class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
<!-- added by fq -->
|
||||
<div id="add-memo" class='lz' style="display: none; padding: 20px;">
|
||||
<h3><%=l(:label_memo_new)%></h3>
|
||||
<% if User.current.logged? %>
|
||||
<%= labelled_form_for(@memo, :url => open_source_project_relative_memos_path(@open_source_project), :html => {:multipart => true} ) do |f| %>
|
||||
<% if @memo.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @memo.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="actions" style="max-width:680px">
|
||||
<p><%= f.text_field :subject, :required => true%></p>
|
||||
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
|
||||
<br/>
|
||||
<p>
|
||||
<%#= l(:label_attachment_plural) %><br />
|
||||
<%#= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
</p>
|
||||
<%= f.submit :value => l(:label_memo_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="contextual-borad">
|
||||
<%#= link_to(
|
||||
image_tag('edit.png')+l(:label_forum_edit),
|
||||
{:action => 'edit', :id => @forum},
|
||||
:method => 'get',
|
||||
:title => l(:button_edit)
|
||||
) if @forum.editable_by?(User.current) %>
|
||||
<%#= link_to(
|
||||
image_tag('delete.png')+'删除讨论区',
|
||||
{:action => 'destroy', :id => @forum},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if @forum.destroyable_by?(User.current) %>
|
||||
</div>
|
||||
<%= render :partial => 'open_source_projects/show_bug', :locals => {:memos => @memos, :open_source_project => @open_source_project} %>
|
||||
</div>
|
|
@ -1,58 +1,43 @@
|
|||
<%= error_messages_for 'member' %>
|
||||
<% roles = Role.find_all_givable
|
||||
members = @project.member_principals.includes(:roles, :principal).all.sort %>
|
||||
<%
|
||||
roles = Role.givable.all
|
||||
if @project.project_type == Project::ProjectType_course
|
||||
roles = roles[3..5]
|
||||
else
|
||||
roles = roles[0..2]
|
||||
end
|
||||
members = @project.member_principals.includes(:roles, :principal).all.sort
|
||||
%>
|
||||
|
||||
<div class="splitcontentleft">
|
||||
<% if members.any? %>
|
||||
<table class="list members">
|
||||
<thead><tr>
|
||||
<% if members.any? %>
|
||||
<table class="list members">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= l(:label_user) %></th>
|
||||
<th><%= l(:label_role_plural) %></th>
|
||||
<th style="width:15%"></th>
|
||||
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
|
||||
</tr></thead>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% members.each do |member| %>
|
||||
<% next if member.new_record? %>
|
||||
<tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
|
||||
<td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
|
||||
<td class="roles">
|
||||
<span id="member-<%= member.id %>-roles"><!-- <%=h member.roles.sort.collect(&:to_s).join(', ') %> -->
|
||||
<!--modified by huang for: -->
|
||||
<% if @project.project_type == 1 %>
|
||||
<% if member.roles.sort.collect(&:to_s).join(', ') =='Manager' %>
|
||||
老师
|
||||
<% else %>
|
||||
<%=h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%=h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||
<% end %>
|
||||
<span id="member-<%= member.id %>-roles">
|
||||
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||
</span>
|
||||
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
||||
:method => :put,
|
||||
:html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }}
|
||||
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
|
||||
) do |f| %>
|
||||
<!--added by huang for: filer the roles-->
|
||||
<%= error_messages_for 'member' %>
|
||||
<% if @project.project_type == 1 %>
|
||||
<% r = [] %>
|
||||
<% for i in 3..5 %>
|
||||
<% roles = Role.givable.all[i]
|
||||
members = @project.member_principals.includes(:roles, :principal).all.sort %>
|
||||
<% r << roles %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% r = [] %>
|
||||
<% for i in 0..2 %>
|
||||
<% roles = Role.givable.all[i]
|
||||
members = @project.member_principals.includes(:roles, :principal).all.sort %>
|
||||
<% r << roles %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<!--end-->
|
||||
<p><% r.each do |role| %>
|
||||
|
||||
<p>
|
||||
<% roles.each do |role| %>
|
||||
<label><%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
|
||||
:disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
|
||||
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %> <%= h role %></label><br/>
|
||||
<% end %></p>
|
||||
<%= hidden_field_tag 'membership[role_ids][]', '' %>
|
||||
<p><%= submit_tag l(:button_change), :class => "small" %>
|
||||
|
@ -62,11 +47,8 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<!--modified by huang for: if the user'roles is Manager that he will can't modified himself-->
|
||||
<%= error_messages_for 'member' %>
|
||||
<% roles = Role.find_all_givable
|
||||
members = @project.member_principals.includes(:roles, :principal).all.sort %>
|
||||
<% if @project.project_type == 1 %>
|
||||
<%if member.roles.first.to_s == "Manager" %>
|
||||
<% if member.roles.first.to_s == "Manager" %>
|
||||
<td class="buttons"></td>
|
||||
<% else %>
|
||||
<td class="buttons">
|
||||
|
@ -89,37 +71,18 @@
|
|||
</td>
|
||||
<% end %>
|
||||
<!--end-->
|
||||
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
|
||||
<%= call_hook(:view_projects_settings_members_table_row, {:project => @project, :member => member}) %>
|
||||
</tr>
|
||||
<% end; reset_cycle %>
|
||||
<% end; reset_cycle %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--added by huang for: filer the roles-->
|
||||
<%= error_messages_for 'member' %>
|
||||
<% if @project.project_type == 1 %>
|
||||
<% r = [] %>
|
||||
<% for i in 3..5 %>
|
||||
<% roles = Role.givable.all[i]
|
||||
members = @project.member_principals.includes(:roles, :principal).all.sort %>
|
||||
<% r << roles %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% r = [] %>
|
||||
<% for i in 0..2 %>
|
||||
<% roles = Role.givable.all[i]
|
||||
members = @project.member_principals.includes(:roles, :principal).all.sort %>
|
||||
<% r << roles %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<!--end-->
|
||||
|
||||
<div class="splitcontentright">
|
||||
<% if r.any? %>
|
||||
<% if roles.any? %>
|
||||
<% if @project.applied_projects.any? %>
|
||||
<div id="applied_project_block">
|
||||
<%= form_for(@applied_members, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
|
@ -131,7 +94,7 @@
|
|||
</div>
|
||||
<!--show the roles which will select-->
|
||||
<p style="padding-top: 5px"><%= l(:label_role_plural) %>:
|
||||
<% r.each do |role| %>
|
||||
<% roles.each do |role| %>
|
||||
|
||||
<label><%= check_box_tag 'membership[role_ids][]', role.id %> <%= h role %></label>
|
||||
<% end %></p>
|
||||
|
@ -145,7 +108,8 @@
|
|||
<% end %>
|
||||
|
||||
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
<fieldset><legend><%=l(:label_member_new)%></legend>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_member_new) %></legend>
|
||||
|
||||
<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
|
||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
|
||||
|
@ -155,13 +119,13 @@
|
|||
</div>
|
||||
<!--show the roles which will select-->
|
||||
<p style="padding-top: 5px"><%= l(:label_role_plural) %>:
|
||||
<% r.each do |role| %>
|
||||
<% roles.each do |role| %>
|
||||
|
||||
<label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
|
||||
<label><%= check_box_tag 'membership[role_ids][]', role.id %> <%= h role %></label>
|
||||
<% end %></p>
|
||||
|
||||
<p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,12 @@
|
|||
<td colspan="2" valign="top">
|
||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
|
||||
<span class="font_lighter">
|
||||
<% if @canShowRealName %>
|
||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>(<%= link_to_user(e.event_author,@canShowRealName) if e.respond_to?(:event_author) %>)
|
||||
<% else %>
|
||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||
<% end %>
|
||||
|
||||
<%= l(:label_new_activity) %> </span>
|
||||
|
||||
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
|
||||
<fieldset style="width: 500px">
|
||||
<legend>上传作品软件包和作品截图</legend>
|
||||
<legend><%=l(:label_upload_softworkpacket_photo)%></legend>
|
||||
<%= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
<div style="float: left; width: 600px; padding-top: 6px; margin-left: 8px"><%= softapplication.description.truncate(95, omission: '...') %></div>
|
||||
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; line-height: 0.5em ">
|
||||
<%contest = softapplication.contests.first%>
|
||||
<p>所属竞赛:<%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p>所属类别:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
||||
<p>系统支持:<%= softapplication.android_min_version_available %></p>
|
||||
<p><%=l(:label_attendingcontestwork_belongs_contest)%>:<%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p><%=l(:label_attendingcontestwork_belongs_type)%>:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
||||
<p><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= softapplication.android_min_version_available %></p>
|
||||
</div>
|
||||
<div style="padding-left: 53px">
|
||||
<span>开发人员:<%= softapplication.application_developers %></span>
|
||||
<span style="padding-left: 50px">发布时间:<%=format_time softapplication.created_at %></span>
|
||||
<span><%=l(:label_attendingcontestwork_developers)%>:<%= softapplication.application_developers %></span>
|
||||
<span style="padding-left: 50px"><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time softapplication.created_at %></span>
|
||||
</div>
|
||||
<div style="border-left: 1px solid #d9d8d8; border-bottom: 1px solid #d9d8d8; margin-left: 50px; padding-bottom: 10px; margin-bottom: 20px; width: 66%"></div>
|
||||
<div class="underline-contests_one" style="margin-top: -7px"></div>
|
||||
|
|
|
@ -16,38 +16,35 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all">所属类别:<%= @softapplication.app_type_name %></td>
|
||||
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_belongs_type)%>:<%= @softapplication.app_type_name %></td>
|
||||
<% contest = @softapplication.contests.first %>
|
||||
<td style="width: 240px; word-wrap: break-word; word-break: break-all">所属竞赛:<%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %></td>
|
||||
<td style="width: 240px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_belongs_contest)%>:<%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">发布人员:<%= @softapplication.user.name %></td>
|
||||
<td>系统支持:<%= @softapplication.android_min_version_available %></td>
|
||||
<td style="padding-left: 40px"><%=l(:label_attendingcontestwork_release_person)%>:<%= @softapplication.user.name %></td>
|
||||
<td><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= @softapplication.android_min_version_available %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<span>作品下载:</span>
|
||||
<span><%=l(:label_attendingcontestwork_download)%>:</span>
|
||||
<span>
|
||||
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>开发人员:<%= @softapplication.application_developers %></td>
|
||||
<td><%=l(:label_attendingcontestwork_developers)%>:<%= @softapplication.application_developers %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">平均评分: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
|
||||
<td>发布时间:<%=format_time @softapplication.created_at %></td>
|
||||
<td style="padding-left: 40px"><%=l(:label_attendingcontestwork_average_scores)%>: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
|
||||
<td><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time @softapplication.created_at %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<% if (@softapplication.deposit_project != "nil" && @softapplication.deposit_project != "") %>
|
||||
<%#= textilizable ("托管项目: " + @project.name) %>
|
||||
托管项目:<%= link_to "#@project", project_path(@project.id) %>
|
||||
<% if @project %>
|
||||
<%=l(:label_attendingcontestwork_deposit_project)%>:<%= link_to "#@project", project_path(@project) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -56,7 +53,7 @@
|
|||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong>
|
||||
<div style="font-size: 15px;">作品简介:</div>
|
||||
<div style="font-size: 15px;"><%=l(:label_work_description)%>:</div>
|
||||
</strong>
|
||||
|
||||
<div style="padding-top: 5px"><%= @softapplication.description %></div>
|
||||
|
@ -64,11 +61,11 @@
|
|||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<div style="font-size: 15px;"><strong>作品得分:</strong></div>
|
||||
<div style="font-size: 15px;"><strong><%=l(:label_work_scores)%>:</strong></div>
|
||||
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count %></div> -->
|
||||
<div style="overflow: hidden">
|
||||
<div style="margin-left: 15%; float: left">
|
||||
<div style="padding-left: 45px; padding-bottom: 5px">得分比例</div>
|
||||
<div style="padding-left: 45px; padding-bottom: 5px"><%=l(:label_work_scores_proportion)%></div>
|
||||
<div>
|
||||
<% 100.step(20, -20) do |star| %>
|
||||
<div data-kls="Softapplication" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled" style="height: 20px; width: 115px; overflow: hidden; z-index: 1; position: relative;">
|
||||
|
@ -83,14 +80,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="float: left; padding-left: 100px; padding-top:35px " align="center">
|
||||
<div>最终得分</div>
|
||||
<div style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>
|
||||
分
|
||||
</div>
|
||||
<div><%=l(:label_final_scores)%></div>
|
||||
<div style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>分</div>
|
||||
<div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
|
||||
</div>
|
||||
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center">
|
||||
<div>打分总人数</div>
|
||||
<div><%=l(:label_rating_person_amount)%></div>
|
||||
<div style="padding-top: 1px; font-size: 25px; color: blue;">
|
||||
<strong><%= @softapplication.raters(:quality).count %></strong></div>
|
||||
</div>
|
||||
|
@ -100,7 +95,7 @@
|
|||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong>
|
||||
<div style="font-size: 15px">作品截图:</div>
|
||||
<div style="font-size: 15px"><%=l(:label_work_photo)%>:</div>
|
||||
</strong>
|
||||
|
||||
<div class="softapplication-img" >
|
||||
|
@ -119,10 +114,10 @@
|
|||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: 50px">
|
||||
<div style="font-size: 15px"><strong>作品评论:</strong></div>
|
||||
<div style="font-size: 15px"><strong><%=l(:label_work_comment)%>:</strong></div>
|
||||
<% if (User.current.logged? and User.current.id != @softapplication.user_id) %>
|
||||
<div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
|
||||
<div style="padding-left: 210px"><%=l(:label_work_rating)%>: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(<%=l(:label_attendingcontestwork_sorting_intimation)%>)</span></div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -51,14 +51,14 @@
|
|||
|
||||
<% when '2' %>
|
||||
|
||||
<% if (ProjectInfo.find_by_project_id(obj.id)).user_id == User.current.id %>
|
||||
<% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
|
||||
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
|
||||
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
|
||||
<% end %>
|
||||
|
||||
<% when '3' %>
|
||||
|
||||
<% if (ProjectInfo.find_by_project_id(obj.project_id)).user_id == User.current.id %>
|
||||
<% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
|
||||
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
|
||||
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
|
||||
<% end %>
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_new_forum_topics(11).each do |topic|%>
|
||||
<li class="message-brief-intro" style="min-height: 60px; line-height:2em; ">
|
||||
<li class="message-brief-intro" style="height: auto; line-height:2em; padding-bottom: 1px ">
|
||||
<div style="display: inline-block; width: 100%;">
|
||||
<span class="memo_activity text_nowrap" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
|
||||
|
|
|
@ -259,17 +259,4 @@
|
|||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="hidden" style="width:100%;">
|
||||
<div style="width:600px;margin:0px auto;margin-top:80px;">
|
||||
<table style="width:600px;font-size:15px; color: #e8770d;">
|
||||
<tr>
|
||||
<td><strong>当前网站状态</strong></td>
|
||||
<td>活跃课程: <%=@courseCount%></td>
|
||||
<td>高校: 2个</td>
|
||||
<td>教师: <%=@teacherCount%> 名</td>
|
||||
<td>学生: <%=@studentCount%> 名<td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<%= render partial: 'link_to_another' %>
|
|
@ -137,16 +137,4 @@
|
|||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="hidden" style="width:100%;">
|
||||
<div style="width:600px;margin:0px auto;margin-top:180px;">
|
||||
<table style="width:600px;font-size:15px; color: gray;">
|
||||
<tr>
|
||||
<td><strong>当前网站状态</strong></td>
|
||||
<td>活跃项目:<%=@projectCount%>个</td>
|
||||
<td>私有项目: <%=@projectHidenCount%>个</td>
|
||||
<td>开发者:<%=@allUsercount%>个 </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<%= render partial: 'link_to_another' %>
|
|
@ -1728,6 +1728,8 @@ zh:
|
|||
label_first_reward: 一等奖
|
||||
label_second_reward: 二等奖
|
||||
label_third_reward: 三等奖
|
||||
label_fourth_reward: 四等奖
|
||||
label_fifth_reward: 五等奖
|
||||
label_excellence_reward: 优秀奖
|
||||
label_comfort_reward: 入围奖
|
||||
label_course_settings: 课程设置
|
||||
|
@ -1884,8 +1886,14 @@ zh:
|
|||
label_work_name: 作品名称
|
||||
label_softapplication_description: 应用简介
|
||||
label_work_description: 作品简介
|
||||
label_work_scores: 作品得分
|
||||
label_work_rating: 评分
|
||||
label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主!
|
||||
label_work_scores_proportion: 得分比例
|
||||
label_softapplication_type: 应用分类
|
||||
label_work_type: 作品分类
|
||||
label_work_photo: 作品截图
|
||||
label_work_comment: 作品评论
|
||||
label_softapplication_version_available: 适配版本
|
||||
label_running_platform: 运行平台
|
||||
label_softapplication_developer: 上传人员
|
||||
|
@ -1900,6 +1908,8 @@ zh:
|
|||
label_button_ok: 确定
|
||||
label_tags_contest: 竞赛标签
|
||||
label_tags_contest: 竞赛名称
|
||||
label_final_scores: 最终得分
|
||||
label_rating_person_amount: 打分总人数
|
||||
label_tags_contest_description: 竞赛描述
|
||||
label_release_add_contest_succeed: 该应用发布并添加成功.
|
||||
label_add_contest_succeed_fail: 添加失败,该应用已参赛.
|
||||
|
@ -1910,6 +1920,7 @@ zh:
|
|||
label_softapplication_list: 应用列表
|
||||
label_contest_work_list: 参赛作品列表
|
||||
label_attending_contest: 我要参赛
|
||||
label_contest_notification: 竞赛通知
|
||||
|
||||
label_coursefile_sharingarea: 课程资源共享区
|
||||
label_sort_by_activity: 按动态数排序
|
||||
|
@ -1925,9 +1936,39 @@ zh:
|
|||
label_contest_delete: 删除竞赛
|
||||
label_noawards_current: 暂未评奖
|
||||
|
||||
label_softapplication: 应用软件
|
||||
label_attending_contest: 参加竞赛
|
||||
label_new_attendingcontest_work: 新建参赛作品
|
||||
label_workname_lengthlimit: 25个汉字以内
|
||||
label_workdescription_lengthlimit: 125个汉字以内
|
||||
label_please_input_password: 请输入竞赛密码
|
||||
label_please_select_project: 请选择项目
|
||||
label_upload_softworkpacket_photo: 上传作品软件包和作品截图
|
||||
label_reward: 评奖
|
||||
label_please_select_contestingsoftapplication: 请选择参赛应用
|
||||
label_attendingcontest_time: 参赛时间
|
||||
label_attendingcontest_spoksman: 参赛代表
|
||||
label_wellmeaning_intimation_contentone: 温馨提示:如果您准备参加竞赛,请点击下面的"新建参赛作品"!
|
||||
label_wellmeaning_intimation_contenttwo: 若您已完成开发,且只希望发布您的作品,“托管项目”一项可以不选;
|
||||
label_wellmeaning_intimation_contentthree: 若您希望托管竞赛数据和代码以及保留开发和提交代码的轨迹,请从“托管项目”中选择一项您已创建好的项目作为该参赛作品的托管项目,若您还没有创建项目,请点击右边的“创建项目”,然后回到本页再选择。
|
||||
|
||||
notice_account_updated: 帐号更新成功
|
||||
notice_attendingcontest_work_successfully_created: 恭喜您,参赛作品创建成功!
|
||||
notice_softapplication_was_successfully_updated: 恭喜您,参赛作品更新成功!
|
||||
|
||||
label_attendingcontestwork_belongs_contest: 所属竞赛
|
||||
label_attendingcontestwork_belongs_type: 所属类别
|
||||
label_attendingcontestwork_release_person: 发布人员
|
||||
label_attendingcontestwork_adaptive_system: 系统支持
|
||||
label_attendingcontestwork_download: 作品下载
|
||||
label_attendingcontestwork_developers: 开发人员
|
||||
label_attendingcontestwork_average_scores: 平均评分
|
||||
label_attendingcontestwork_release_time: 发布时间
|
||||
label_attendingcontestwork_deposit_project: 托管项目
|
||||
label_attendingcontestwork_sorting_intimation: 您可以重新打分,打分结果以最后一次打分为主!
|
||||
|
||||
#end
|
||||
|
||||
# ajax异步验证
|
||||
modal_valid_passing: 可以使用
|
||||
label_bug: 漏洞
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
RedmineApp::Application.routes.draw do
|
||||
resources :homework_users
|
||||
|
||||
|
||||
resources :no_uses
|
||||
delete 'no_uses', :to => 'no_uses#delete'
|
||||
|
||||
|
@ -36,17 +35,19 @@ RedmineApp::Application.routes.draw do
|
|||
collection do
|
||||
match 'search', via: [:get, :post]
|
||||
match 'remove_condition', via: [:get, :post]
|
||||
match 'allbug', via: [:get, :post]
|
||||
end
|
||||
resources :relative_memos
|
||||
member do
|
||||
match 'master_apply', via: [:get, :post]
|
||||
match 'accept_master_apply', via: [:get, :post]
|
||||
match 'refuse_master_apply', via: [:get, :post]
|
||||
match 'showmemo', via: [:get, :post]
|
||||
match 'showbug', via: [:get, :post]
|
||||
end
|
||||
end
|
||||
mount SeemsRateable::Engine => '/rateable', :as => :rateable
|
||||
|
||||
|
||||
namespace :zipdown do
|
||||
match 'assort'
|
||||
end
|
||||
|
@ -82,6 +83,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'show_project' , via: :get
|
||||
match 'show_softapplication' , via: :get
|
||||
match 'show_attendingcontest' , via: :get
|
||||
match 'show_notification' , via: :get
|
||||
match 'show_participator' , via: :get
|
||||
match 'set_reward_project' , via: [:get, :post]
|
||||
match 'set_reward_softapplication' , via: [:get, :post]
|
||||
|
@ -624,10 +626,13 @@ RedmineApp::Application.routes.draw do
|
|||
match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond'
|
||||
match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403
|
||||
|
||||
|
||||
########################
|
||||
##added by wen##########
|
||||
#######confusing########
|
||||
get 'welcome/search', to: 'welcome#search'
|
||||
get 'school/index', to: 'school#index'
|
||||
get 'course/:school_id', to: 'welcome#course'
|
||||
get 'course/:school_id', to: 'welcome#course'
|
||||
post 'school/get_options/:province', :to => 'school#get_options'
|
||||
get 'school/get_options/:province', :to => 'school#get_options'
|
||||
|
||||
|
@ -666,5 +671,4 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
end
|
||||
get ':controller(/:action(/:id))'
|
||||
end
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
class CreateProjectingSoftapplications < ActiveRecord::Migration
|
||||
def up
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddProjectToSoftapplication < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :softapplications, :project_id, :integer
|
||||
end
|
||||
end
|
1074
db/schema.rb.orig
1074
db/schema.rb.orig
File diff suppressed because it is too large
Load Diff
|
@ -292,6 +292,7 @@ Redmine::MenuManager.map :contest_menu do |menu|
|
|||
#menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
||||
#menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
|
||||
menu.push :attendingcontest, {:controller => 'contests', :action => 'show_attendingcontest'}, :caption => :label_attending_contest
|
||||
# menu.push :contestnotification, {:controller => 'contests', :action => 'show_notification'}, :caption => :label_contest_notification
|
||||
# menu.push :attendingcontest, :show_attendingcontest_contest_path, :caption => :label_attendin,g_contest
|
||||
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
||||
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
||||
|
|
|
@ -1449,7 +1449,7 @@ div.square {
|
|||
overflow: hidden;
|
||||
width: .6em; height: .6em;
|
||||
}
|
||||
.contextual {float:right; white-space: nowrap; line-height:1.4em;margin-top:5px; padding-left: 10px; font-size:0.9em;}
|
||||
.contextual {float:right; white-space: nowrap; line-height:1.4em;/*margin-top:5px;*/ padding-left: 10px; font-size:0.9em;}
|
||||
.contextual input, .contextual select {font-size:0.9em;}
|
||||
.message .contextual { margin-top: 0; }
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
margin: 0px 0 0 0;
|
||||
width: 970px;
|
||||
|
||||
|
||||
}
|
||||
.header2{
|
||||
float: left;
|
||||
|
@ -15,6 +16,7 @@
|
|||
width: 100%;
|
||||
right: 50%;
|
||||
background-color: #000000
|
||||
|
||||
}
|
||||
.col1{
|
||||
position: relative;
|
||||
|
@ -28,14 +30,36 @@
|
|||
position: relative;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
width: 470px;
|
||||
width: 440px;
|
||||
left: 3%;
|
||||
|
||||
}
|
||||
|
||||
a:hover, a:active {
|
||||
color: #c61a1a;
|
||||
text-decoration: underline;
|
||||
|
||||
}
|
||||
|
||||
#tag {
|
||||
background: url("../images/issue_tag.png") no-repeat scroll right -19px rgba(0, 0, 0, 0);
|
||||
border-radius: 3px;
|
||||
color: #3A587D !important;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
margin: 3px;
|
||||
padding: 1px 4px 2px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#buglist
|
||||
{
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
.li_list {
|
||||
clear:both;
|
||||
padding:0 0 0 0px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,6 +14,7 @@ padding:0 7px 0 0;
|
|||
|
||||
ol.linenums {
|
||||
margin:0 0 0 20px;
|
||||
|
||||
}
|
||||
|
||||
ol.linenums li {
|
||||
|
@ -31,6 +33,7 @@ padding:0;
|
|||
background-color:#105DB5;
|
||||
color:#FFF;
|
||||
text-decoration:none;
|
||||
|
||||
}
|
||||
|
||||
.li_list li,.na_list li {
|
||||
|
@ -38,6 +41,12 @@ clear:both;
|
|||
height:18px;
|
||||
list-style-type:square;
|
||||
padding:2px;
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,3 +62,11 @@ font-size:18px;
|
|||
div.pages .break,.created a {
|
||||
color:#999;
|
||||
}
|
||||
|
||||
.tag_fouse {
|
||||
font-family: "Microsoft YaHei";
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 3px;
|
||||
padding-top: 3px;
|
||||
}
|
|
@ -968,7 +968,7 @@ hr
|
|||
p
|
||||
{
|
||||
font-size: 13px;
|
||||
/*position:relative;/*gcm*/
|
||||
/*position: static;/*gcm*/
|
||||
}
|
||||
/*end*/
|
||||
div.issue
|
||||
|
|
Loading…
Reference in New Issue