0604
This commit is contained in:
commit
4404222437
16
Gemfile
16
Gemfile
|
@ -19,6 +19,22 @@ gem 'acts-as-taggable-on'
|
||||||
group :development do
|
group :development do
|
||||||
gem 'better_errors', path: 'lib/better_errors'
|
gem 'better_errors', path: 'lib/better_errors'
|
||||||
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
|
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
|
end
|
||||||
|
|
||||||
# Optional gem for LDAP authentication
|
# Optional gem for LDAP authentication
|
||||||
|
|
20
Gemfile.lock
20
Gemfile.lock
|
@ -53,7 +53,16 @@ GEM
|
||||||
arel (3.0.2)
|
arel (3.0.2)
|
||||||
builder (3.0.0)
|
builder (3.0.0)
|
||||||
coderay (1.0.9)
|
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)
|
erubis (2.7.0)
|
||||||
|
execjs (1.4.0)
|
||||||
|
multi_json (~> 1.0)
|
||||||
fastercsv (1.5.0)
|
fastercsv (1.5.0)
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
i18n (0.6.1)
|
i18n (0.6.1)
|
||||||
|
@ -99,6 +108,11 @@ GEM
|
||||||
rdoc (3.12.2)
|
rdoc (3.12.2)
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
ruby-openid (2.1.8)
|
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)
|
sprockets (2.2.2)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
|
@ -110,6 +124,9 @@ GEM
|
||||||
polyglot
|
polyglot
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
tzinfo (0.3.37)
|
tzinfo (0.3.37)
|
||||||
|
uglifier (1.0.3)
|
||||||
|
execjs (>= 0.3.0)
|
||||||
|
multi_json (>= 1.0.2)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
x86-mingw32
|
x86-mingw32
|
||||||
|
@ -121,6 +138,7 @@ DEPENDENCIES
|
||||||
better_errors!
|
better_errors!
|
||||||
builder (= 3.0.0)
|
builder (= 3.0.0)
|
||||||
coderay (~> 1.0.6)
|
coderay (~> 1.0.6)
|
||||||
|
coffee-rails (~> 3.2.1)
|
||||||
fastercsv (~> 1.5.0)
|
fastercsv (~> 1.5.0)
|
||||||
i18n (~> 0.6.0)
|
i18n (~> 0.6.0)
|
||||||
jquery-rails (~> 2.0.2)
|
jquery-rails (~> 2.0.2)
|
||||||
|
@ -130,4 +148,6 @@ DEPENDENCIES
|
||||||
rack-openid
|
rack-openid
|
||||||
rails (= 3.2.13)
|
rails (= 3.2.13)
|
||||||
ruby-openid (~> 2.1.4)
|
ruby-openid (~> 2.1.4)
|
||||||
|
sass-rails (~> 3.2.3)
|
||||||
seems_rateable!
|
seems_rateable!
|
||||||
|
uglifier (>= 1.0.3)
|
||||||
|
|
27
ReadMe.txt
27
ReadMe.txt
|
@ -1,11 +1,18 @@
|
||||||
patch:
|
patch:
|
||||||
用户姓名的部分,根据issues#655。
|
用户姓名的部分,根据issues#655。
|
||||||
为了修改方便
|
为了修改方便
|
||||||
alias:
|
alias:
|
||||||
方法 之前显示 调整之后
|
方法 之前显示 调整之后
|
||||||
name firstname+lastname login
|
name firstname+lastname login
|
||||||
nickname xxx login
|
nickname xxx login
|
||||||
realname xxx firstname+lastname
|
realname xxx firstname+lastname
|
||||||
|
|
||||||
|
User model经过修改,已经完全集成了user_extensions的功能
|
||||||
|
例如
|
||||||
|
user.gender=1
|
||||||
|
user.save
|
||||||
|
user_extensions字段会自动保存
|
||||||
|
不必要每次user.user_extensions.xxx以及判断是否为空
|
||||||
================================================================================
|
================================================================================
|
||||||
app/models/setting.rb :165
|
app/models/setting.rb :165
|
||||||
# fixed domain url in development. tantantan's bug
|
# 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)$/
|
define_singleton_method m do; nil; end if m.to_s =~ /([a-zA-Z]+_domain)$/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
程序部分链接中制定了subdomain参数,使链接在二级域名中来回跳转。
|
程序部分链接中制定了subdomain参数,使链接在二级域名中来回跳转。
|
||||||
为了开发方便,使之功能在development模式下失效。
|
为了开发方便,使之功能在development模式下失效。
|
||||||
# => nyan
|
# => nyan
|
||||||
================================================================================
|
================================================================================
|
||||||
app/controller/projects_controller.rb ===> projects#fake
|
app/controller/projects_controller.rb ===> projects#fake
|
||||||
fake filter: 修改了传到页面中的Count后缀的数量
|
fake filter: 修改了传到页面中的Count后缀的数量
|
||||||
改为正确的数量,删掉fake过滤器即可
|
改为正确的数量,删掉fake过滤器即可
|
||||||
================================================================================
|
================================================================================
|
||||||
#导航栏匹配域名显示和改变
|
#导航栏匹配域名显示和改变
|
||||||
app\helper\application_helper.rb
|
app\helper\application_helper.rb
|
||||||
# rewrite navigation
|
# rewrite navigation
|
||||||
|
|
||||||
app\views\layouts\_base_header.html.erb
|
app\views\layouts\_base_header.html.erb
|
||||||
# reset navigation by domain name and url through regular match
|
# reset navigation by domain name and url through regular match
|
||||||
================================================================================
|
================================================================================
|
||||||
#首页根据域名匹配进入不同的页面
|
#首页根据域名匹配进入不同的页面
|
||||||
app\controller\welcome_controller.rb
|
app\controller\welcome_controller.rb
|
||||||
def entry_select_user
|
def entry_select_user
|
||||||
if request.original_url.match(/user\.trustie\.net/)
|
if request.original_url.match(/user\.trustie\.net/)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
// Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
// All this logic will automatically be available in application.js.
|
|
@ -0,0 +1,2 @@
|
||||||
|
// Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
// All this logic will automatically be available in application.js.
|
|
@ -0,0 +1,4 @@
|
||||||
|
/*
|
||||||
|
Place all the styles related to the matching controller here.
|
||||||
|
They will automatically be included in application.css.
|
||||||
|
*/
|
|
@ -0,0 +1,4 @@
|
||||||
|
/*
|
||||||
|
Place all the styles related to the matching controller here.
|
||||||
|
They will automatically be included in application.css.
|
||||||
|
*/
|
|
@ -139,9 +139,9 @@ class AttachmentsController < ApplicationController
|
||||||
# Make sure association callbacks are called
|
# Make sure association callbacks are called
|
||||||
container = @attachment.container
|
container = @attachment.container
|
||||||
@attachment.container.attachments.delete(@attachment)
|
@attachment.container.attachments.delete(@attachment)
|
||||||
if container.attachments.empty?
|
#if container.attachments.empty?
|
||||||
container.delete
|
#container.delete
|
||||||
end
|
#end
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to_referer_or respond_path(@bid) }
|
format.html { redirect_to_referer_or respond_path(@bid) }
|
||||||
|
|
|
@ -695,7 +695,7 @@ class BidsController < ApplicationController
|
||||||
@bid.budget = 0
|
@bid.budget = 0
|
||||||
@bid.author_id = User.current.id
|
@bid.author_id = User.current.id
|
||||||
@bid.commit = 0
|
@bid.commit = 0
|
||||||
@bid.homework_type = params[:bid][:homework_type]
|
@bid.homework_type = 1
|
||||||
@bid.save_attachments(params[:attachments] || (params[:bid] && params[:bid][:uploads]))
|
@bid.save_attachments(params[:attachments] || (params[:bid] && params[:bid][:uploads]))
|
||||||
# @bid.
|
# @bid.
|
||||||
if @bid.save
|
if @bid.save
|
||||||
|
@ -881,6 +881,7 @@ class BidsController < ApplicationController
|
||||||
|
|
||||||
def memberAccess
|
def memberAccess
|
||||||
# 是课程,则判断当前用户是否参加了课程
|
# 是课程,则判断当前用户是否参加了课程
|
||||||
|
return true if current_user.admin?
|
||||||
return 0 if @bid.courses.first.project_type == Project::ProjectType_project
|
return 0 if @bid.courses.first.project_type == Project::ProjectType_project
|
||||||
currentUser = User.current
|
currentUser = User.current
|
||||||
render_403 unless currentUser.member_of?(@bid.courses.first)
|
render_403 unless currentUser.member_of?(@bid.courses.first)
|
||||||
|
|
|
@ -5,7 +5,8 @@ class ContestsController < ApplicationController
|
||||||
menu_item :project, :only => :show_project
|
menu_item :project, :only => :show_project
|
||||||
menu_item :application, :only => :show_softapplication
|
menu_item :application, :only => :show_softapplication
|
||||||
menu_item :attendingcontest, :only => :show_attendingcontest
|
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]
|
:show_contest_project, :show_contest_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings]
|
||||||
|
|
||||||
# added by fq
|
# added by fq
|
||||||
|
@ -356,6 +357,17 @@ class ContestsController < ApplicationController
|
||||||
|
|
||||||
###end
|
###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
|
def set_reward_project
|
||||||
@c_p = nil
|
@c_p = nil
|
||||||
@contesting_project_id = nil
|
@contesting_project_id = nil
|
||||||
|
|
|
@ -70,7 +70,7 @@ class FilesController < ApplicationController
|
||||||
Mailer.attachments_added(attachments[:files]).deliver
|
Mailer.attachments_added(attachments[:files]).deliver
|
||||||
end
|
end
|
||||||
|
|
||||||
# 临时用
|
# TODO: 临时用 nyan
|
||||||
sort_init 'created_on', 'desc'
|
sort_init 'created_on', 'desc'
|
||||||
sort_update 'created_on' => "#{Attachment.table_name}.created_on",
|
sort_update 'created_on' => "#{Attachment.table_name}.created_on",
|
||||||
'filename' => "#{Attachment.table_name}.filename",
|
'filename' => "#{Attachment.table_name}.filename",
|
||||||
|
|
|
@ -18,7 +18,7 @@ class HomeworkAttachController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0)
|
#if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0)
|
||||||
user_id = params[:user_id]
|
user_id = params[:user_id]
|
||||||
bid_id = params[:bid_id]
|
bid_id = params[:bid_id]
|
||||||
sta = 0
|
sta = 0
|
||||||
|
@ -32,21 +32,22 @@ class HomeworkAttachController < ApplicationController
|
||||||
:bid_id => bid_id
|
:bid_id => bid_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#@bid = Bid.find bid_id
|
||||||
|
#@homework_list = @bid.homeworks
|
||||||
|
|
||||||
@homework = HomeworkAttach.new(options)
|
@homework = HomeworkAttach.new(options)
|
||||||
@homework.save_attachments(params[:attachments])
|
@homework.save_attachments(params[:attachments])
|
||||||
render_attachment_warning_if_needed(@homework)
|
render_attachment_warning_if_needed(@homework)
|
||||||
|
|
||||||
@homework.save
|
|
||||||
respond_to do |format|
|
|
||||||
if @homework.save
|
if @homework.save
|
||||||
format.html { redirect_to @homework, notice: 'Post was successfully created.' }
|
respond_to do |format|
|
||||||
format.json { render json: @homework, status: :created, location: @homework }
|
format.html { redirect_to project_for_bid_path @homework.bid }
|
||||||
|
format.json { head :no_content }
|
||||||
|
end
|
||||||
else
|
else
|
||||||
format.html { render action: "new" }
|
|
||||||
format.json { render json: @homework.errors, status: :unprocessable_entity }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
#end
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
@ -65,23 +66,30 @@ class HomeworkAttachController < ApplicationController
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@homework = HomeworkAttach.find(params[:id])
|
@homework = HomeworkAttach.find(params[:id])
|
||||||
respond_to do |format|
|
name = params[:homework_name]
|
||||||
if @post.update_attributes(params[:homework])
|
description = params[:homework_description]
|
||||||
format.html { redirect_to @homework, notice: 'Homework was successfully updated.' }
|
@homework.name = name
|
||||||
format.json { head :no_content }
|
@homework.description = description
|
||||||
else
|
if params[:attachments]
|
||||||
format.html { render action: "edit" }
|
@homework.save_attachments(params[:attachments])
|
||||||
format.json { render json: @homework.errors, status: :unprocessable_entity }
|
|
||||||
end
|
end
|
||||||
|
if @homework.save
|
||||||
|
respond_to do |format|
|
||||||
|
format.html { redirect_to project_for_bid_path @homework.bid }
|
||||||
|
format.json { head :no_content }
|
||||||
|
end
|
||||||
|
else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@homework = HomeworkAttach.find(params([:id]))
|
@homework = HomeworkAttach.find(params[:id])
|
||||||
@homework.destroy
|
if @homework.destroy
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {render @homework}
|
format.html { redirect_to project_for_bid_path @homework.bid }
|
||||||
format.json {render json: @homework}
|
format.json { head :no_content }
|
||||||
|
end
|
||||||
|
else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,11 @@ class MailHandlerController < ActionController::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#取消邮件通知
|
||||||
|
def cancel_mail_notify
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def check_credential
|
def check_credential
|
||||||
|
|
|
@ -12,6 +12,7 @@ class OpenSourceProjectsController < ApplicationController
|
||||||
# GET /open_source_projects
|
# GET /open_source_projects
|
||||||
# GET /open_source_projects.json
|
# GET /open_source_projects.json
|
||||||
def index
|
def index
|
||||||
|
|
||||||
@app_dir = params[:app_dir]
|
@app_dir = params[:app_dir]
|
||||||
@language = params[:language]
|
@language = params[:language]
|
||||||
@created_at = params[:created_at]
|
@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)
|
@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
|
# @open_source_projects = OpenSourceProject.all
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@ -76,11 +79,49 @@ class OpenSourceProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def allbug
|
||||||
|
@bugs = BugToOsp.visible
|
||||||
|
|
||||||
|
@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
|
def search
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def showbug
|
||||||
|
@open_source_project = OpenSourceProject.find(params[:id])
|
||||||
|
|
||||||
|
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 暴力添加,请绕道
|
# added by yiang 暴力添加,请绕道
|
||||||
def showmemo
|
def showmemo
|
||||||
|
@ -109,6 +150,7 @@ def showmemo
|
||||||
format.json { render json: @open_source_project }
|
format.json { render json: @open_source_project }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /open_source_projects/new
|
# GET /open_source_projects/new
|
||||||
# GET /open_source_projects/new.json
|
# GET /open_source_projects/new.json
|
||||||
def new
|
def new
|
||||||
|
@ -207,7 +249,6 @@ end
|
||||||
redirect_to master_apply_open_source_project_path
|
redirect_to master_apply_open_source_project_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def require_master
|
def require_master
|
||||||
|
|
|
@ -47,7 +47,7 @@ class SoftapplicationsController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@softapplication = Softapplication.find(params[:id])
|
@softapplication = Softapplication.find(params[:id])
|
||||||
@project = Project.find_by_identifier(@softapplication.deposit_project)
|
@project = @softapplication.project
|
||||||
# 打分统计
|
# 打分统计
|
||||||
stars_reates = @softapplication.
|
stars_reates = @softapplication.
|
||||||
rates(:quality)
|
rates(:quality)
|
||||||
|
@ -142,13 +142,16 @@ class SoftapplicationsController < ApplicationController
|
||||||
def create
|
def create
|
||||||
@softapplication = Softapplication.new(params[:softapplication])
|
@softapplication = Softapplication.new(params[:softapplication])
|
||||||
@softapplication.user = User.current
|
@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])
|
@softapplication.save_attachments(params[:attachments])
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @softapplication.save
|
if @softapplication.save
|
||||||
ContestingSoftapplication.create(:contest_id => params[:contest_id], :softapplication_id => @softapplication.id)
|
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.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 }
|
# format.json { render json: @softapplication, status: :created, location: @softapplication }
|
||||||
else
|
else
|
||||||
|
@ -170,7 +173,8 @@ class SoftapplicationsController < ApplicationController
|
||||||
# @softapplication = Softapplication.find(params[:id])
|
# @softapplication = Softapplication.find(params[:id])
|
||||||
@softapplication.attachments.map{|attach| attach.destroy }
|
@softapplication.attachments.map{|attach| attach.destroy }
|
||||||
@softapplication.save_attachments(params[:attachments])
|
@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|
|
respond_to do |format|
|
||||||
if @softapplication.update_attributes(params[:softapplication])
|
if @softapplication.update_attributes(params[:softapplication])
|
||||||
format.html { redirect_to @softapplication, notice: l(:notice_softapplication_was_successfully_updated) }
|
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]
|
before_filter :entry_select_course, :entry_select_contest, :entry_select_user, :only => [:index]
|
||||||
|
|
||||||
def 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
|
end
|
||||||
|
|
||||||
def robots
|
def robots
|
||||||
|
@ -36,10 +30,7 @@ class WelcomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def course
|
def course
|
||||||
@courseCount = Project.course_entities.count
|
@logoLink ||= logolink()
|
||||||
@teacherCount = User.teacher.count
|
|
||||||
@studentCount = User.student.count
|
|
||||||
@logoLink = logolink()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,25 +112,25 @@ class WelcomeController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def render(*args)
|
# def render(*args)
|
||||||
_fake if @fake_filter
|
# _fake if @fake_filter
|
||||||
super
|
# super
|
||||||
end
|
# end
|
||||||
|
|
||||||
private
|
# private
|
||||||
|
|
||||||
def fake
|
# def fake
|
||||||
@fake_filter = true
|
# @fake_filter = true
|
||||||
end
|
# end
|
||||||
|
|
||||||
# 骗子方法
|
# # 骗子方法
|
||||||
def _fake
|
# def _fake
|
||||||
instance_variables.map { |variable|
|
# instance_variables.map { |variable|
|
||||||
if variable.to_s =~ /Count$/
|
# if variable.to_s =~ /Count$/
|
||||||
self.instance_variable_set(variable.to_sym,
|
# self.instance_variable_set(variable.to_sym,
|
||||||
("1" + (self.instance_variable_get(variable.to_sym).to_s)).to_i)
|
# ("1" + (self.instance_variable_get(variable.to_sym).to_s)).to_i)
|
||||||
end
|
# end
|
||||||
}
|
# }
|
||||||
end
|
# end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,8 +20,36 @@ class ZipdownController < ApplicationController
|
||||||
#@error = e
|
#@error = e
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#下载某一学生的作业的所有文件
|
||||||
|
def download_user_homework
|
||||||
|
obj_class = params[:obj_class]
|
||||||
|
obj_id = params[:obj_id]
|
||||||
|
user_id = params[:user_id]
|
||||||
|
obj = obj_class.constantize.find(obj_id)
|
||||||
|
zipfile = nil
|
||||||
|
case obj.class.to_s.to_sym
|
||||||
|
when :Bid
|
||||||
|
zipfile = zip_user_bid obj,user_id
|
||||||
|
else
|
||||||
|
logger.error "[ZipDown#assort] ===> #{obj.class.to_s.to_sym} unKown !!"
|
||||||
|
end
|
||||||
|
send_file zipfile, :filename => obj.name, :type => detect_content_type(zipfile) if zipfile
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def zip_user_bid(bid,user_id)
|
||||||
|
# Todo: User Access Controll
|
||||||
|
|
||||||
|
homeattaches = bid.homeworks.where("user_id = ?",user_id)
|
||||||
|
# 得到每一个人所有文件打包的zip文件
|
||||||
|
# 并将每一个人的zip打包为一个并返回路径
|
||||||
|
user_zip_paths = homeattaches.map do |homeattach|
|
||||||
|
zip_homework_by_user homeattach
|
||||||
|
end
|
||||||
|
zipping "#{Time.now.to_i}_#{bid.name}.zip", user_zip_paths, OUTPUT_FOLDER
|
||||||
|
end
|
||||||
|
|
||||||
def zip_bid(bid)
|
def zip_bid(bid)
|
||||||
# Todo: User Access Controll
|
# Todo: User Access Controll
|
||||||
|
|
||||||
|
|
|
@ -796,7 +796,7 @@ module ApplicationHelper
|
||||||
tmp = Hash.new
|
tmp = Hash.new
|
||||||
tmp={"" => ""}
|
tmp={"" => ""}
|
||||||
option.each do |project|
|
option.each do |project|
|
||||||
tmp[project.name] = project.identifier
|
tmp[project.name] = project.id
|
||||||
end
|
end
|
||||||
tmp
|
tmp
|
||||||
end
|
end
|
||||||
|
|
|
@ -216,4 +216,9 @@ module CoursesHelper
|
||||||
end
|
end
|
||||||
people.include?(User.current)
|
people.include?(User.current)
|
||||||
end
|
end
|
||||||
|
#获取当前用户在指定作业下提交的作业的集合
|
||||||
|
def cur_user_homework_for_bid bid
|
||||||
|
cur_user_homework = HomeworkAttach.where("user_id = ? and bid_id = ?",User.current,params[:id])
|
||||||
|
cur_user_homework
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
module HomeworkAttachHelper
|
||||||
|
def attach_delete(project)
|
||||||
|
if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and project_id = ?', User.current.id, project.bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, project.bid.courses.first.id).first.roles&Role.where('id = ? or id = ?', 3, 7)).size >0) || project.user_id == User.current.id)
|
||||||
|
true
|
||||||
|
else
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
|
@ -61,10 +61,9 @@ module IssuesHelper
|
||||||
#h("#{issue.tracker} ##{issue.id}")
|
#h("#{issue.tracker} ##{issue.id}")
|
||||||
# h("#{issue.tracker} #{issue.source_from}")
|
# h("#{issue.tracker} #{issue.source_from}")
|
||||||
s = ''
|
s = ''
|
||||||
s << ">>"
|
s << link_to(@issue.project.name, project_issues_path(@issue.project))
|
||||||
s << link_to(@issue.project.name+l(:issue_list), project_issues_path(@issue.project))
|
s << " > #"
|
||||||
s << " >"
|
s << @issue.project_index
|
||||||
s << @issue.source_from
|
|
||||||
s.html_safe
|
s.html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,34 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
module JournalsHelper
|
module JournalsHelper
|
||||||
|
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))
|
||||||
|
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') 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={})
|
def render_notes (issue, journal, options={})
|
||||||
content = ''
|
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)))
|
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)))
|
||||||
|
@ -38,7 +66,7 @@ module JournalsHelper
|
||||||
:title => l(:button_delete))
|
:title => l(:button_delete))
|
||||||
end
|
end
|
||||||
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', :style => 'margin-top:-25px;') unless links.empty?
|
||||||
content << textilizable(journal, :notes)
|
content << textilizable(journal, :notes)
|
||||||
css_classes = "wiki"
|
css_classes = "wiki"
|
||||||
css_classes << " editable" if editable
|
css_classes << " editable" if editable
|
||||||
|
|
|
@ -46,4 +46,12 @@ module OpenSourceProjectsHelper
|
||||||
end
|
end
|
||||||
description
|
description
|
||||||
end
|
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
|
end
|
||||||
|
|
|
@ -69,28 +69,30 @@ module UsersHelper
|
||||||
# <li><%= link_to("所有反馈", {:controller => 'users', :action => 'show', :type => 2}) %></li>
|
# <li><%= link_to("所有反馈", {:controller => 'users', :action => 'show', :type => 2}) %></li>
|
||||||
# </ul></div>
|
# </ul></div>
|
||||||
|
|
||||||
def show_activity(state)
|
# TODO: 待删
|
||||||
content = ''.html_safe
|
# def show_activity(state)
|
||||||
case state
|
# content = ''.html_safe
|
||||||
when 0
|
# case state
|
||||||
s = content_tag('span', l(:label_user_all_activity), :class => "current-page")
|
# when 0
|
||||||
content << content_tag('li', s)
|
# s = content_tag('span', l(:label_user_all_activity), :class => "current-page")
|
||||||
content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1}))
|
# content << content_tag('li', s)
|
||||||
content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2}))
|
# content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1}))
|
||||||
when 1
|
# content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2}))
|
||||||
s = content_tag('span', l(:label_user_activity_myself), :class => "current-page")
|
# when 1
|
||||||
content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'}))
|
# s = content_tag('span', l(:label_user_activity_myself), :class => "current-page")
|
||||||
content << content_tag('li', s, :class => "current-page")
|
# content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'}))
|
||||||
content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2}))
|
# content << content_tag('li', s, :class => "current-page")
|
||||||
when 2
|
# content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2}))
|
||||||
s = content_tag('span', l(:label_user_all_respond), :class => "current-page")
|
# when 2
|
||||||
content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'}))
|
# s = content_tag('span', l(:label_user_all_respond), :class => "current-page")
|
||||||
content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1}))
|
# content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'}))
|
||||||
content << content_tag('li', s, :class => "current-page")
|
# content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1}))
|
||||||
end
|
# content << content_tag('li', s, :class => "current-page")
|
||||||
content_tag('div', content, :class => "pagination")
|
# end
|
||||||
end
|
# content_tag('div', content, :class => "pagination")
|
||||||
|
# end
|
||||||
|
|
||||||
|
#TODO: 待删
|
||||||
def watch_projects(state)
|
def watch_projects(state)
|
||||||
content = ''.html_safe
|
content = ''.html_safe
|
||||||
case state
|
case state
|
||||||
|
|
|
@ -237,7 +237,7 @@ module WelcomeHelper
|
||||||
content_tag('span', find_all_event_type(event)) <<
|
content_tag('span', find_all_event_type(event)) <<
|
||||||
': '.html_safe <<
|
': '.html_safe <<
|
||||||
link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) <<
|
link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) <<
|
||||||
link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container), :class => "attachments_list_color")
|
link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container.project), :class => "attachments_list_color")
|
||||||
else
|
else
|
||||||
str << content_tag("span", "更新了") <<
|
str << content_tag("span", "更新了") <<
|
||||||
content_tag("span", find_all_event_type(event)) <<
|
content_tag("span", find_all_event_type(event)) <<
|
||||||
|
|
|
@ -5,4 +5,8 @@ class BugToOsp < ActiveRecord::Base
|
||||||
|
|
||||||
validates_presence_of :osp_id, :relative_memo_id
|
validates_presence_of :osp_id, :relative_memo_id
|
||||||
|
|
||||||
|
scope :visible, lambda {|*args|
|
||||||
|
nil
|
||||||
|
}
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1156,7 +1156,11 @@ class Issue < ActiveRecord::Base
|
||||||
# back string obj which is belong to project.
|
# back string obj which is belong to project.
|
||||||
def source_from
|
def source_from
|
||||||
"" << self.project.name.to_s <<
|
"" << 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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -57,13 +57,17 @@ class Mailer < ActionMailer::Base
|
||||||
#如果是直接留言并且留言对象是Project并且Project类型是课程
|
#如果是直接留言并且留言对象是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
|
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
|
project = journals_for_message.jour
|
||||||
|
@author = journals_for_message.user
|
||||||
#课程的教师
|
#课程的教师
|
||||||
@teachers = searchTeacherAndAssistant journals_for_message.jour
|
@teachers = searchTeacherAndAssistant journals_for_message.jour
|
||||||
#收件人邮箱
|
#收件人邮箱
|
||||||
@recipients ||= []
|
@recipients ||= []
|
||||||
@teachers.each do |teacher|
|
@teachers.each do |teacher|
|
||||||
|
if teacher.user.notify_about? journals_for_message
|
||||||
@recipients << teacher.user.mail
|
@recipients << teacher.user.mail
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
mail :to => @recipients,
|
mail :to => @recipients,
|
||||||
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} "
|
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} "
|
||||||
else
|
else
|
||||||
|
@ -440,10 +444,7 @@ class Mailer < ActionMailer::Base
|
||||||
headers[:to].delete(@author.mail) if headers[:to].is_a?(Array)
|
headers[:to].delete(@author.mail) if headers[:to].is_a?(Array)
|
||||||
headers[:cc].delete(@author.mail) if headers[:cc].is_a?(Array)
|
headers[:cc].delete(@author.mail) if headers[:cc].is_a?(Array)
|
||||||
end
|
end
|
||||||
if !User.current.nil?
|
|
||||||
#不给本人发邮件
|
|
||||||
headers[:to].delete(User.current.mail) if headers[:to].is_a?(Array)
|
|
||||||
end
|
|
||||||
if @author && @author.logged?
|
if @author && @author.logged?
|
||||||
redmine_headers 'Sender' => @author.login
|
redmine_headers 'Sender' => @author.login
|
||||||
end
|
end
|
||||||
|
|
|
@ -71,6 +71,11 @@ class RelativeMemo < ActiveRecord::Base
|
||||||
errors.add :base, l(:label_memo_locked) if root.locked? && self != root
|
errors.add :base, l(:label_memo_locked) if root.locked? && self != root
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def short_content(length = 25)
|
||||||
|
str = "^(.{,#{length}})[^\n\r]*.*$"
|
||||||
|
content.gsub(Regexp.new(str), '\1...').strip if content
|
||||||
|
end
|
||||||
|
|
||||||
# def update_memos_forum
|
# def update_memos_forum
|
||||||
# if forum_id_changed?
|
# if forum_id_changed?
|
||||||
# Message.update_all({:board_id => board_id}, ["id = ? OR parent_id = ?", root.id, root.id ])
|
# 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 :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||||
has_many :contesting_softapplications, :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 :user
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
has_many :contests, :through => :contesting_softapplications
|
has_many :contests, :through => :contesting_softapplications
|
||||||
|
belongs_to :project
|
||||||
|
|
||||||
def add_jour(user, notes, reference_user_id = 0, options = {})
|
def add_jour(user, notes, reference_user_id = 0, options = {})
|
||||||
if options.count == 0
|
if options.count == 0
|
||||||
|
|
|
@ -86,8 +86,6 @@ class User < Principal
|
||||||
## added by xianbo for delete
|
## added by xianbo for delete
|
||||||
has_many :biding_projects, :dependent => :destroy
|
has_many :biding_projects, :dependent => :destroy
|
||||||
has_many :contesting_projects, :dependent => :destroy
|
has_many :contesting_projects, :dependent => :destroy
|
||||||
has_many :contesting_softapplications, :dependent => :destroy
|
|
||||||
has_many :projecting_softapplications, :dependent => :destroy
|
|
||||||
belongs_to :softapplication, :foreign_key => 'id', :dependent => :destroy
|
belongs_to :softapplication, :foreign_key => 'id', :dependent => :destroy
|
||||||
##ended by xianbo
|
##ended by xianbo
|
||||||
|
|
||||||
|
@ -199,6 +197,53 @@ class User < Principal
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# ======================================================================
|
||||||
|
# 集中处理 User 扩展表为空的问题
|
||||||
|
validate :valid_user_extensions
|
||||||
|
after_save :save_user_extensions
|
||||||
|
|
||||||
|
def extensions
|
||||||
|
self.user_extensions ||= UserExtensions.new
|
||||||
|
end
|
||||||
|
|
||||||
|
def respond_to?(m, include_private = false)
|
||||||
|
flag = UserExtensions.instance_methods.include? 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
|
def userInfo
|
||||||
info=self.nickname + ' (' + self.realname + ')';
|
info=self.nickname + ' (' + self.realname + ')';
|
||||||
|
@ -665,6 +710,7 @@ class User < Principal
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Return true if the user is allowed to do the specified action on a specific context
|
# Return true if the user is allowed to do the specified action on a specific context
|
||||||
# Action can be:
|
# Action can be:
|
||||||
# * a parameter-like Hash (eg. :controller => 'projects', :action => 'edit')
|
# * a parameter-like Hash (eg. :controller => 'projects', :action => 'edit')
|
||||||
|
@ -768,7 +814,36 @@ class User < Principal
|
||||||
when News
|
when News
|
||||||
# always send to project members except when mail_notification is set to 'none'
|
# always send to project members except when mail_notification is set to 'none'
|
||||||
true
|
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
|
||||||
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="tags_area">
|
||||||
|
<%= render :partial => 'tags/tagEx', :locals => {:obj => file, :object_flag => "6"} %>
|
||||||
|
</div>
|
|
@ -15,9 +15,10 @@
|
||||||
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
||||||
</p> -->
|
</p> -->
|
||||||
<p><%= f.text_field :deadline, :value => nil,:required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
|
<p><%= f.text_field :deadline, :value => nil,:required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
|
||||||
</p>
|
<!--
|
||||||
<p><%= f.select :homework_type, homework_type_option %>
|
<p><%= f.select :homework_type, homework_type_option %>
|
||||||
</p>
|
</p>
|
||||||
|
-->
|
||||||
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
||||||
<p><%= render :partial => 'attachments/form', :locals => {:container => @homework} %></p>
|
<p><%= render :partial => 'attachments/form', :locals => {:container => @homework} %></p>
|
||||||
</fieldset>
|
</fieldset>
|
|
@ -13,19 +13,22 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function j_submit () {
|
function j_submit () {
|
||||||
alert('start')
|
alert('start');
|
||||||
var submit_homework = function(){
|
var submit_homework = function(){
|
||||||
$('#add_homework_form').clone().attr('action', '<%= url_for({:controller => "bids", :action => "add_homework"})+".js" %>').ajaxSubmit()
|
$('#add_homework_form').clone().attr('action', '<%= url_for({:controller => "bids", :action => "add_homework"})+".js" %>').ajaxSubmit()
|
||||||
};
|
};
|
||||||
alert('stop')
|
alert('stop');
|
||||||
$.globalEval(submit_homework());
|
$.globalEval(submit_homework());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0) %>
|
<% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? &&
|
||||||
|
(Member.where('user_id = ? and project_id = ?', User.current.id,
|
||||||
|
@bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0) && cur_user_homework_for_bid(@bid).count == 0 %>
|
||||||
<div class='icon icon-add'>
|
<div class='icon icon-add'>
|
||||||
<%= link_to l(:label_commit_homework), new_submit_homework_path, :onclick => "$('#put-bid-form').slideToggle(); this.blur(); return false;" %>
|
<!-- <%= link_to l(:label_commit_homework), new_submit_homework_path, :onclick => "$('#put-bid-form').slideToggle(); this.blur(); return false;" %> -->
|
||||||
|
<%= link_to l(:label_course_new_homework),new_homework_attach_path %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,10 @@
|
||||||
</p> -->
|
</p> -->
|
||||||
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
|
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
|
||||||
</p>
|
</p>
|
||||||
|
<!--
|
||||||
<p><%= f.select :homework_type, homework_type_option %>
|
<p><%= f.select :homework_type, homework_type_option %>
|
||||||
</p>
|
</p>
|
||||||
|
-->
|
||||||
<p><%= hidden_field_tag 'course_id', @project_id %>
|
<p><%= hidden_field_tag 'course_id', @project_id %>
|
||||||
</p>
|
</p>
|
||||||
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
||||||
|
|
|
@ -25,25 +25,35 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% display_id = im_watching_student_id? @bid%>
|
<% display_id = im_watching_student_id? @bid%>
|
||||||
<% @homework_list.each do |homework|%>
|
<% @homework_list.each do |homework|%>
|
||||||
<% if homework.attachments.any?%>
|
<table width="660px" border="0" align="center" id="homework_attach_<%= homework.id %>" >
|
||||||
<table width="660px" border="0" align="center">
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(homework.user), :class => "avatar")%></td>
|
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(homework.user), :class => "avatar")%></td>
|
||||||
<td>
|
<td>
|
||||||
<table width="580px" border="0">
|
<table width="580px" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 300px">
|
<td style="width: 300px;">
|
||||||
<strong>作业 :</strong>
|
<strong>作业 :</strong>
|
||||||
|
<% if homework.name == nil || homework.name == "" %>
|
||||||
<% attachments = homework.attachments.map %>
|
<% attachments = homework.attachments.map %>
|
||||||
<% for attachment in attachments %>
|
<% for attachment in attachments %>
|
||||||
|
<% if attachments.count > 1 %>
|
||||||
|
<% homework_filename = attachment.filename + "等" + attachments.count.to_s + "个文件" %>
|
||||||
|
<% else %>
|
||||||
|
<% homework_filename = attachment.filename %>
|
||||||
|
<% end %>
|
||||||
|
<!--
|
||||||
<% if attachments.count > 1 && attachment != attachments.first %>
|
<% if attachments.count > 1 && attachment != attachments.first %>
|
||||||
<br/>
|
<br/>
|
||||||
<% for item in 1..7 %>
|
<% for item in 1..7 %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to_attachment attachment , :download => true -%>
|
-->
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% homework_filename = homework.name %>
|
||||||
|
<% end %>
|
||||||
|
<strong><%= link_to homework_filename, :controller => "zipdown", :action => "download_user_homework",:obj_class => @bid.class,:obj_id => @bid, :user_id =>homework.user%></strong>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align: top">
|
<td style="vertical-align: top">
|
||||||
<% if is_student %>
|
<% if is_student %>
|
||||||
|
@ -70,18 +80,28 @@
|
||||||
<%= format("%.2f", sum * 1.0 / stars_reates_count) %>
|
<%= format("%.2f", sum * 1.0 / stars_reates_count) %>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" align="right">
|
<td valign="top" align="right">
|
||||||
<% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.attachments[0].created_on.to_s) %>
|
<% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
|
||||||
<span class="required">迟交</span>
|
<span class="required">迟交</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<td valign="top">
|
||||||
<% if is_cur_course_user? @bid %>
|
<% if is_cur_course_user? @bid %>
|
||||||
<strong><%= l(:label_bidding_user_studentcode) %> : <%= homework.user.user_extensions.student_id%></strong>
|
<strong><%= l(:label_bidding_user_studentcode) %> : <%= homework.user.user_extensions.student_id%></strong>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if (User.current == homework.user) || (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? &&
|
||||||
|
(Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',3,7, 9)).size >0) %>
|
||||||
|
<%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
|
||||||
|
<%= link_to(l(:label_bid_respond_delete), homework,
|
||||||
|
method: :delete, :confirm => l(:text_are_you_sure)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<!--
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580px" >
|
<td colspan="2" width="580px" >
|
||||||
<% if (User.current == homework.user) || (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',3,7, 9)).size >0) %>
|
<% if (User.current == homework.user) || (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',3,7, 9)).size >0) %>
|
||||||
|
@ -93,10 +113,10 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
-->
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="line_under"></div>
|
<div class="line_under"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div style="padding-left: 18px">
|
<div style="padding-left: 18px">
|
||||||
<div style="font-size: 15px">
|
<div style="font-size: 15px">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>应用软件:</strong></td>
|
<td><strong><%=l(:label_softapplication)%>:</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %>
|
<%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %>
|
||||||
</td>
|
</td>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 68px">
|
<div style="padding-left: 68px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>简介:</td>
|
<td><%=l(:label_profile)%>:</td>
|
||||||
<td>
|
<td>
|
||||||
<%= c_softapplication.softapplication.description.truncate(90, omission: '...') %>
|
<%= c_softapplication.softapplication.description.truncate(90, omission: '...') %>
|
||||||
</td>
|
</td>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>发布时间:</td>
|
<td><%=l(:label_activity_time)%>:</td>
|
||||||
<td>
|
<td>
|
||||||
<%=format_time c_softapplication.created_at %>
|
<%=format_time c_softapplication.created_at %>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
</table>
|
</table>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
<% else %>
|
<% else %>
|
||||||
<div style="font-size: 14px;margin:10px;">
|
<div style="font-size: 14px;margin:10px;padding-left: 13px">
|
||||||
<%= l(:label_user_login_tips) %>
|
<%= l(:label_user_login_tips) %>
|
||||||
<%= link_to l(:label_user_login_new), signin_path %>
|
<%= link_to l(:label_user_login_new), signin_path %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h3 class="title">请输入竞赛密码</h3>
|
<h3 class="title"><%=l(:label_please_input_password)%></h3>
|
||||||
|
|
||||||
<%= form_tag( join_in_contest_contests_path(id: contest.id),
|
<%= form_tag( join_in_contest_contests_path(id: contest.id),
|
||||||
:remote => true,
|
:remote => true,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$('#contesting_project_list').html('<%= escape_javascript(render(:partial => 'project_list', :locals => {:contesting_project => @contesting_project})) %>');
|
$('#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) %>" );
|
$("#contest_message").val( "<%= l(:label_bid_reason) %>" );
|
||||||
$("#put-bid-form").hide();
|
$("#put-bid-form").hide();
|
|
@ -1,4 +1,4 @@
|
||||||
$('#contesting_softapplication_list').html('<%= escape_javascript(render(:partial => 'softapplication_list', :locals => {:contesting_softapplication => @contesting_softapplication})) %>');
|
$('#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) %>" );
|
$("#contest_message").val( "<%= l(:label_bid_reason) %>" );
|
||||||
$("#put-bid-form").hide();
|
$("#put-bid-form").hide();
|
|
@ -15,6 +15,7 @@
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
/*margin-right: -4px;*/
|
/*margin-right: -4px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="button"].contest_btn {
|
input[type="button"].contest_btn {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
@ -30,6 +31,7 @@
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
margin-right: -2px;
|
margin-right: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea:focus {
|
textarea:focus {
|
||||||
border: #d5dee9 1px solid;
|
border: #d5dee9 1px solid;
|
||||||
}
|
}
|
||||||
|
@ -62,24 +64,17 @@
|
||||||
<%= render_flash_messages %>
|
<%= render_flash_messages %>
|
||||||
<!--参赛步骤-->
|
<!--参赛步骤-->
|
||||||
<div style="padding-left: 23px; padding-bottom: 10px; color: grey; font-size: 12px">
|
<div style="padding-left: 23px; padding-bottom: 10px; color: grey; font-size: 12px">
|
||||||
<div>温馨提示:如果您准备参加竞赛,请点击下面的"新建参赛作品"!</div>
|
<div><%= l(:label_wellmeaning_intimation_contentone) %></div>
|
||||||
<div style="margin-left: 59px; padding-top: 2px">1) 若您已完成开发,且只希望发布您的作品,“托管项目”一项可以不选;</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) 若您希望托管竞赛数据和代码以及保留开发和提交代码的轨迹,请从“托管项目”中选择一项您已创建好的项目作为该参赛作品的托管项目,若您还没有创建项目,请点击右边的“创建项目”,然后回到本页再选择。</div>
|
<div style="margin-left: 59px; padding-top: 2px">2) <%= l(:label_wellmeaning_intimation_contentthree) %></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<div style="padding-bottom: 10px; line-height: 15px">
|
<div style="padding-bottom: 10px; line-height: 15px">
|
||||||
<div style="padding-left: 82px; font-size: 14px">
|
<div style="padding-left: 82px; font-size: 14px">
|
||||||
<span><strong>参加竞赛:</strong></span>
|
<span><strong><%= l(:label_attending_contest) %>:</strong></span>
|
||||||
<span><%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
<span><%= link_to l(:label_new_attendingcontest_work), "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div style="font-size: 14px;margin:10px;padding-left: 73px">
|
<div style="font-size: 14px;margin:10px;padding-left: 73px">
|
||||||
|
@ -91,65 +86,77 @@
|
||||||
<!--点击新建参赛作品弹出框新建参赛作品并关联到竞赛中-->
|
<!--点击新建参赛作品弹出框新建参赛作品并关联到竞赛中-->
|
||||||
<div id="put-project-form" style="display: none; padding-left: 83px; width: 88%">
|
<div id="put-project-form" style="display: none; padding-left: 83px; width: 88%">
|
||||||
<%= form_for Softapplication.new, :url => softapplications_path do |f| %>
|
<%= 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 %>
|
<%= hidden_field_tag 'contest_id', @contest.id %>
|
||||||
<tr style="width:700px; margin-left: -10px;">
|
<tr style="width:700px; margin-left: -10px;">
|
||||||
<span><%= l(:label_work_name) %></span>
|
<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 class="contest-star"> * </span>:
|
||||||
<span style="font-size: 10px">(25个汉字以内)</span>
|
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||||
</tr><br/>
|
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
|
||||||
|
</tr>
|
||||||
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<tr style="width:800px;">
|
<tr style="width:800px;">
|
||||||
<span><%= l(:label_running_platform) %></span>
|
<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/>
|
</tr>
|
||||||
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<tr style="width:800px;">
|
<tr style="width:800px;">
|
||||||
<span><%= l(:label_work_type) %></span>
|
<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/>
|
</tr>
|
||||||
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<tr style="width:800px;">
|
<tr style="width:800px;">
|
||||||
<span><%= l(:label_work_description) %></span>
|
<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 class="contest-star"> * </span>:
|
||||||
<span style="font-size: 10px">(125个汉字以内)</span>
|
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||||
</tr><br/>
|
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||||
|
</tr>
|
||||||
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<tr style="width:800px;">
|
<tr style="width:800px;">
|
||||||
<span><%= l(:label_softapplication_developers) %></span>
|
<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/>
|
</tr>
|
||||||
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<tr style="width:800px;">
|
<tr style="width:800px;">
|
||||||
<span><%= l(:label_work_deposit_project) %>:</span>
|
<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 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>
|
<span><%= link_to l(:label_create_new_projects), new_project_path(course: 0, project_type: 0), :target => '_blank' %></span>
|
||||||
</tr><br/>
|
</tr>
|
||||||
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<fieldset style="width: 500px; padding-top: 10px">
|
<fieldset style="width: 500px; padding-top: 10px">
|
||||||
<legend>
|
<legend>
|
||||||
上传作品软件包和作品截图
|
<%= l(:label_upload_softworkpacket_photo) %>
|
||||||
</legend>
|
</legend>
|
||||||
<%#= render_flash_messages %>
|
<%#= render_flash_messages %>
|
||||||
<p id="put-bid-form-partial">
|
<p id="put-bid-form-partial">
|
||||||
<%= render :partial => 'attachments/form' %>
|
<%= render :partial => 'attachments/form' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p style="font-size: 11px">
|
<p style="font-size: 11px">
|
||||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/>
|
1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/>
|
||||||
<br>
|
<br>
|
||||||
|
@ -181,7 +188,9 @@
|
||||||
<div style="padding-left: 18px">
|
<div style="padding-left: 18px">
|
||||||
<div style="font-size: 15px">
|
<div style="font-size: 15px">
|
||||||
<div>
|
<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">
|
<div style="float: right">
|
||||||
<td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
|
<td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
|
||||||
<strong>
|
<strong>
|
||||||
|
@ -217,7 +226,7 @@
|
||||||
<!-- 评价显隐控制按钮-->
|
<!-- 评价显隐控制按钮-->
|
||||||
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
||||||
<td valign="top" align="right" width="10%">
|
<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 %>'>
|
<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| %>
|
<%= form_for "set_reward_project", :remote => true, :url => set_reward_project_contest_path do |f| %>
|
||||||
|
@ -225,28 +234,32 @@
|
||||||
<%= f.select :reward, "<option value = '-1'>#{l(:label_special_reward)}</option>
|
<%= f.select :reward, "<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||||
<option value = '0'>#{l(:label_first_reward)}</option>
|
<option value = '0'>#{l(:label_first_reward)}</option>
|
||||||
<option value = '1'>#{l(:label_second_reward)}</option>
|
<option value = '1'>#{l(:label_second_reward)}</option>
|
||||||
<option value = '2'>三等奖</option>
|
<option value = '2'>#{l(:label_third_reward)}</option>
|
||||||
<option value = '3'>四等奖</option>
|
<option value = '3'>#{l(:label_fourth_reward)}</option>
|
||||||
<option value = '4'>五等奖</option>
|
<option value = '4'>#{l(:label_fifth_reward)}</option>
|
||||||
<option value = '5'>#{l(:label_comfort_reward)}</option>".html_safe %>
|
<option value = '5'>#{l(:label_comfort_reward)}</option>".html_safe %>
|
||||||
<%= f.submit "提交",:class=>"submit" %>
|
<%= f.submit :value => l(:button_submit), :class => "submit" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div></br>
|
</div>
|
||||||
|
</br>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 68px">
|
<div style="padding-left: 68px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>简介:</td>
|
<td><%= l(:label_profile) %>:</td>
|
||||||
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
||||||
</tr></br>
|
</tr>
|
||||||
|
</br>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||||
<span><strong>参赛时间:</strong><%= format_time c_project.created_at%></span>
|
<span><strong><%= l(:label_attendingcontest_time) %>
|
||||||
<span style="padding-left: 240px"><strong>参赛代表:</strong><%= c_project.user.name %></span>
|
:</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>
|
||||||
|
|
||||||
<div style="padding-left: 68px">
|
<div style="padding-left: 68px">
|
||||||
|
@ -262,26 +275,32 @@
|
||||||
<div style="padding-left: 18px">
|
<div style="padding-left: 18px">
|
||||||
<div style="font-size: 15px">
|
<div style="font-size: 15px">
|
||||||
<tr>
|
<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>
|
<td> <%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %> </td>
|
||||||
</tr></br>
|
</tr>
|
||||||
|
</br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding-left: 68px; padding-top: 5px">
|
<div style="padding-left: 68px; padding-top: 5px">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>简介:</strong></td>
|
<td><strong><%= l(:label_profile) %>:</strong></td>
|
||||||
<td> <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> </td>
|
<td> <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> </td>
|
||||||
</tr></br>
|
</tr>
|
||||||
|
</br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding-left: 68px; pading-bottom: 8px">
|
<div style="padding-left: 68px; pading-bottom: 8px">
|
||||||
<span><strong>参赛时间:</strong><%= format_time c_softapplication.created_at %></span>
|
<span><strong><%= l(:label_attendingcontest_time) %>
|
||||||
<span style="padding-left: 240px"><strong>参赛代表:</strong><%= c_softapplication.softapplication.user.name %></span>
|
:</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>
|
||||||
|
|
||||||
<!--获奖及教师评奖-->
|
<!--获奖及教师评奖-->
|
||||||
<div style="padding-left: 18px; padding-bottom: 5px">
|
<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">
|
<span style="padding-left: 334px">
|
||||||
<td>
|
<td>
|
||||||
<strong>
|
<strong>
|
||||||
|
@ -325,11 +344,11 @@
|
||||||
<%= f.select :reward, "<option value = '-1'>#{l(:label_special_reward)}</option>
|
<%= f.select :reward, "<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||||
<option value = '0'>#{l(:label_first_reward)}</option>
|
<option value = '0'>#{l(:label_first_reward)}</option>
|
||||||
<option value = '1'>#{l(:label_second_reward)}</option>
|
<option value = '1'>#{l(:label_second_reward)}</option>
|
||||||
<option value = '2'>三等奖</option>
|
<option value = '2'>#{l(:label_third_reward)}</option>
|
||||||
<option value = '3'>四等奖</option>
|
<option value = '3'>#{l(:label_fourth_reward)}</option>
|
||||||
<option value = '4'>五等奖</option>
|
<option value = '4'>#{l(:label_fifth_reward)}</option>
|
||||||
<option value = '5'>#{l(:label_comfort_reward)}</option>".html_safe %>
|
<option value = '5'>#{l(:label_comfort_reward)}</option>".html_safe %>
|
||||||
<%= f.submit "提交",:class=>"submit" %>
|
<%= f.submit :value => l(:button_submit), :class => "submit" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
<div class="font_lighter" style="font-size: 13px;">
|
<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>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
<div class="font_lighter" style="font-size: 13px;">
|
<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>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<% versions = project.versions.sort %>
|
<% versions = project.versions.sort %>
|
||||||
<% attachmenttypes = project.attachmenttypes %>
|
<% attachmenttypes = project.attachmenttypes %>
|
||||||
<%= error_messages_for 'attachment' %>
|
<%= 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">
|
<div class="box">
|
||||||
<p>
|
<p>
|
||||||
<table>
|
<table>
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<%if @addTag%>
|
||||||
|
<% if @obj_flag == '3'%>
|
||||||
|
|
||||||
|
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||||
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
|
//$('#put-tag-form-issue').hide();
|
||||||
|
$('#name-issue').val("");
|
||||||
|
<% elsif @obj_flag == '6'%>
|
||||||
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||||
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
|
//$("#put-tag-form-
|
||||||
|
<%=@obj.class%>-
|
||||||
|
<%=@obj.id%>").hide();
|
||||||
|
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
|
||||||
|
<% else %>
|
||||||
|
|
||||||
|
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||||
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
|
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
|
||||||
|
$('#put-tag-form #name').val("");
|
||||||
|
//$('#put-tag-form').hide();
|
||||||
|
<% end %>
|
||||||
|
<%else%>
|
||||||
|
$("#attachments_fields").children().remove();
|
||||||
|
$("#upload_file_count").text("未上传文件");
|
||||||
|
$('#upload_file_div').slideToggle('slow');
|
||||||
|
$("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>');
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<span class="borad-title"><%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区</span>
|
<span class="borad-title"><%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区</span>
|
||||||
|
|
||||||
<div class="content-title-top">
|
<div class="content-title-top">
|
||||||
|
|
||||||
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
|
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div id="file_buttons" class="nhidden">
|
<div id="file_buttons" class="nhidden">
|
||||||
|
@ -190,8 +191,7 @@
|
||||||
|
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
function tagAddClick(divid,objId,objTag)
|
function tagAddClick(divid, objId, objTag) {
|
||||||
{
|
|
||||||
alert("OK");
|
alert("OK");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<%= form_tag({:controller => 'homework_attach', :action => 'add_jour_reply'}, :remote => true) do %>
|
<%= form_tag({:controller => 'homework_attach', :action => 'add_jour_reply'}, :remote => true) do %>
|
||||||
<%= text_area_tag 'user_notes', "", :class => 'noline',
|
<%= text_area_tag 'user_notes', "", :class => 'noline',
|
||||||
:style => "resize: none;", :rows => 4,
|
:style => "resize: none;", :rows => 4,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<!-- fq -->
|
|
||||||
<style>
|
<style>
|
||||||
input[type="submit"].bid_btn {
|
input[type="submit"].bid_btn {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<!-- #wang -->
|
|
||||||
<% for attachment in attachments %>
|
<% for attachment in attachments %>
|
||||||
<% if attachments.count > 1 && attachment != attachments.first%>
|
<% if attachments.count > 1 && attachment != attachments.first%>
|
||||||
<br/>
|
<br/>
|
||||||
|
@ -9,4 +8,6 @@
|
||||||
:controller => 'attachments', :action => 'show',
|
:controller => 'attachments', :action => 'show',
|
||||||
:id => attachment, :filename => attachment.filename %>
|
:id => attachment, :filename => attachment.filename %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
||||||
|
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<!-- fq -->
|
|
||||||
<% unless content.nil?%>
|
<% unless content.nil?%>
|
||||||
<table width="60%" style="margin-left: 60px;">
|
<table width="60%" style="margin-left: 60px;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=raw l(:label_new_homework)%> </p>
|
||||||
|
<div class="box">
|
||||||
|
<%= form_for(@homework) do |f|%>
|
||||||
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||||
|
<strong>标 题:</strong>
|
||||||
|
<%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;"%>
|
||||||
|
</p>
|
||||||
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||||
|
<strong style="vertical-align: top">描 述:</strong>
|
||||||
|
<span style="margin-left:-10px;padding-right: 20px;">
|
||||||
|
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p style="padding-left: 60px">
|
||||||
|
<fieldset style="text-align: left;">
|
||||||
|
<p style="padding-left: 60px">
|
||||||
|
<% options = {:author => true, :deletable => attach_delete(@homework)} %>
|
||||||
|
<%= render :partial => 'attachments/links',
|
||||||
|
:locals => {:attachments => @homework.attachments, :options => options} %>
|
||||||
|
</p>
|
||||||
|
<legend>
|
||||||
|
<%= l(:label_attachment_plural) %>
|
||||||
|
</legend>
|
||||||
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||||
|
<%= render :partial => 'attachments/form' %>
|
||||||
|
</p>
|
||||||
|
</fieldset>
|
||||||
|
</p>
|
||||||
|
<p style="padding-left: 60px;padding-top: 10px;">
|
||||||
|
<span >
|
||||||
|
<%= submit_tag t(:label_button_ok), :sta => 0, :class => "enterprise"%>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
|
@ -1,32 +1,34 @@
|
||||||
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=raw l(:label_new_homework)%> </p>
|
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=h l(:label_new_homework)%> </p>
|
||||||
<div class="box tabular">
|
<div class="box">
|
||||||
<%= form_for('new_form', :remote => true, :method => :post,
|
<%= form_for('new_form', :method => :post,
|
||||||
:url => {:controller => 'homework_attach',
|
:url => {:controller => 'homework_attach',
|
||||||
:action => 'create',
|
:action => 'create',
|
||||||
:user_id => User.current.id,
|
:user_id => User.current.id,
|
||||||
:bid_id => @bid
|
:bid_id => @bid
|
||||||
}) do |f|%>
|
}) do |f|%>
|
||||||
<p>
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||||
<strong>标 题:</strong>
|
<strong>标 题:</strong>
|
||||||
<%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;" %>
|
<%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;" %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||||
<strong style="vertical-align: top">描 述:</strong>
|
<strong style="vertical-align: top">描 述:</strong>
|
||||||
<span style="margin-left:-10px;padding-right: 20px;">
|
<span style="margin-left:-10px;padding-right: 20px;">
|
||||||
<%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
<%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<fieldset>
|
<p style="padding-left: 60px">
|
||||||
|
<fieldset style="text-align: left;">
|
||||||
<legend>
|
<legend>
|
||||||
<%= l(:label_attachment_plural) %>
|
<%= l(:label_attachment_plural) %>
|
||||||
</legend>
|
</legend>
|
||||||
<p id="put-bid-form-partial">
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||||
<%= render :partial => 'attachments/form' %>
|
<%= render :partial => 'attachments/form' %>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<span style="padding-left: 60px">
|
</p>
|
||||||
<%= submit_tag t(:label_new), :sta => 0, :class => "enterprise"%>
|
<p style="padding-left: 60px;padding-top: 10px;">
|
||||||
<%= submit_tag t(:label_memo_create), :sta => 1, :class => "enterprise"%>
|
<span >
|
||||||
|
<%= submit_tag t(:label_button_ok), :sta => 0, :class => "enterprise"%>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
发布人员:<%= link_to @homework.user, user_path(@homework.user)%>
|
发布人员:<%= link_to @homework.user, user_path(@homework.user)%>
|
||||||
</td>
|
</td>
|
||||||
<td>发布时间:<%=format_time @homework.created_at %></td>
|
<td>发布时间:<%=format_time @homework.created_at %></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 40px">
|
<td style="padding-left: 40px">
|
||||||
|
@ -58,15 +57,19 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top"><div style="font-size: 15px;"><strong>作业描述:</strong></div></td>
|
<td colspan="2" valign="top"><div style="font-size: 15px;"><strong>作业描述:</strong></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% @homework.attachments.map do |attachment| %>
|
|
||||||
<% if attachment.description != nil && attachment.description != "" %>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all">
|
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all">
|
||||||
<div style="padding-top: 5px"> <%= attachment.description %></div>
|
<div style="padding-top: 5px">
|
||||||
|
<% if @homework.description != nil && @homework.description != "" %>
|
||||||
|
<%= @homework.description %>
|
||||||
|
<% else %>
|
||||||
|
<div style="font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 10px;padding-left: 10px ">
|
||||||
|
<strong>该作业无任何描述!</strong>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<table width="580px" border="0">
|
<table width="580px" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<!-- add by huang -->
|
<!-- 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-->
|
<!--end-->
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -107,10 +107,12 @@ end %>
|
||||||
|
|
||||||
<% if false # !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
|
<% if false # !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<div id="issue_tree">
|
<div id="issue_tree">
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
|
<%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p><strong><%=l(:label_subtask_plural)%></strong></p>
|
<p><strong><%=l(:label_subtask_plural)%></strong></p>
|
||||||
<%= render_descendants_tree(@issue) unless @issue.leaf? %>
|
<%= render_descendants_tree(@issue) unless @issue.leaf? %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
<div class="top-content">
|
<div class="top-content">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info_font" style="width: 240px; color: #15bccf"">高校课程实践社区</td>
|
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
|
||||||
<td style="width: auto; color: #15bccf""><strong><%= l(:label_user_location) %> : </strong></td>
|
<td style="width: auto; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
<!-- tags -->
|
<!-- tags -->
|
||||||
<div class="user_fans">
|
<div class="user_fans">
|
||||||
<div class="user_underline"></div>
|
<div class="user_underline"></div>
|
||||||
<table style="font-family:微软雅黑; padding-left: 8px">
|
<table style="font-family:'微软雅黑'; padding-left: 8px">
|
||||||
<tr>
|
<tr>
|
||||||
<td><!-- added by william -for tag --> <%= render :partial => 'tags/tag', :locals => {:obj => @bid, :object_flag => "4"}%> </td>
|
<td><!-- added by william -for tag --> <%= render :partial => 'tags/tag', :locals => {:obj => @bid, :object_flag => "4"}%> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<em>尊敬的用户,<%= @user %>给你留言了:</em>
|
<em>尊敬的用户,<%= @user %>给你留言了:</em>
|
||||||
<div><%= @message %></div>
|
<div><%= @message %></div>
|
||||||
<h1>点击链接查看最新回复<%= link_to(@url, @url) %></h1>
|
<h1>点击链接查看最新回复<%= link_to(@url, @url) %></h1>
|
||||||
|
<h4><%= link_to(l(:lable_not_receive_mail),"http://forge.trustie.net/my/account")%></h4>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
|
|
||||||
<h3 style="padding-left: 10px;"><%= l(:label_my_account) %></h3>
|
<h3 style="padding-left: 10px;"><%= l(:label_my_account) %></h3>
|
||||||
<%= error_messages_for 'user' %>
|
<%= error_messages_for 'user' %>
|
||||||
<%= error_messages_for 'se' %>
|
|
||||||
|
|
||||||
<fieldset class="box" style="margin:10px;">
|
<fieldset class="box" style="margin:10px;">
|
||||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 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-->
|
<!--display the board-->
|
||||||
|
|
||||||
<div class="borad-topic-count" style="margin-top:10px">
|
<div class="borad-topic-count" style="margin-top:10px">
|
||||||
<span>共有 <%= link_to memos.count %> 个贴子 </span
|
<span>共有 <%= link_to @topic_count %> 个贴子 </span>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 10px">
|
<div style="padding-top: 10px">
|
||||||
<% if memos.any? %>
|
<% if memos.any? %>
|
||||||
|
@ -18,12 +18,12 @@
|
||||||
<% if topic.url.nil? || topic.url == '' %>
|
<% if topic.url.nil? || topic.url == '' %>
|
||||||
<%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %>
|
<%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to h(topic.subject), topic.url %>
|
<%= link_to h(topic.subject), topic.url, :target => '_blank' %>
|
||||||
<% end %></td>
|
<% end %></td>
|
||||||
<td align="right" rowspan="3">
|
<td align="right" rowspan="3">
|
||||||
<table class="borad-count">
|
<table class="borad-count">
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">回帖</td>
|
<td align="center">回帖</td>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<td align="right" rowspan="3">
|
<td align="right" rowspan="3">
|
||||||
<table class="borad-count">
|
<table class="borad-count">
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">关注</td>
|
<td align="center">关注</td>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
<td align="right" rowspan="3">
|
<td align="right" rowspan="3">
|
||||||
<table class="borad-count">
|
<table class="borad-count">
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">浏览</td>
|
<td align="center">浏览</td>
|
||||||
|
@ -51,17 +51,17 @@
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" ><span class="font_description"> </span></td>
|
<td><span class="font_description"> </span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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 />
|
<br />
|
||||||
</span></td>
|
</span></td>
|
||||||
</tr>
|
</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>
|
</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>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<%= javascript_include_tag "ichart.1.2.min" %>
|
<%= javascript_include_tag "ichart.1.2.min" %>
|
||||||
<%= stylesheet_link_tag "sec-analysis.css" %>
|
<%= stylesheet_link_tag "sec-analysis.css" %>
|
||||||
<%= stylesheet_link_tag "buglist-ichart.css" %>
|
<%= stylesheet_link_tag "buglist-ichart.css" %>
|
||||||
<%= stylesheet_link_tag "buglist.css" %>
|
<%= stylesheet_link_tag "buglist.css" %>
|
||||||
|
|
||||||
|
|
||||||
<div class="mask">
|
<div class="mask">
|
||||||
<div class="header2"></div>
|
<div class="header2"></div>
|
||||||
<div class="colleft">
|
<div class="colleft">
|
||||||
|
@ -20,33 +21,63 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col2" style="margin-left:0px">
|
<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="fixed"></div>
|
||||||
<div 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;">
|
<ul style="list-style-type: square;">
|
||||||
<% @bugs.each do |bug| %>
|
<% @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 %>
|
<% 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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,8 +92,6 @@
|
||||||
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
|
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var data = [
|
var data = [
|
||||||
{
|
{
|
||||||
name :'',
|
name :'',
|
||||||
|
@ -127,7 +156,7 @@
|
||||||
parseText:function(tip,name,value,text,i){
|
parseText:function(tip,name,value,text,i){
|
||||||
return name+"漏洞数:"+value;
|
return name+"漏洞数:"+value;
|
||||||
}
|
}
|
||||||
} ,
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
tipMocker:function(tips,i){
|
tipMocker:function(tips,i){
|
||||||
|
@ -144,17 +173,6 @@
|
||||||
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
|
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
|
||||||
"</div>"+tips.join("<br/>");
|
"</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:{
|
crosshair:{
|
||||||
enable:true, //十字交叉线
|
enable:true, //十字交叉线
|
||||||
line_color:'#62bce9'
|
line_color:'#62bce9'
|
||||||
|
@ -194,8 +212,7 @@
|
||||||
start_scale:0,
|
start_scale:0,
|
||||||
scale_space:50,
|
scale_space:50,
|
||||||
end_scale:70,
|
end_scale:70,
|
||||||
scale_color:'#9f9f9f',
|
scale_color:'#9f9f9f'
|
||||||
// label : {color:'#ffffff',fontsize:11},
|
|
||||||
|
|
||||||
},{
|
},{
|
||||||
position:'bottom',
|
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();
|
line.draw();
|
||||||
});
|
});
|
||||||
|
|
||||||
//]]>
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--我是分割线1===================================================================================================!-->
|
<!--我是分割线1===================================================================================================!-->
|
||||||
|
@ -282,9 +274,6 @@
|
||||||
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
|
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var data = [
|
var data = [
|
||||||
{
|
{
|
||||||
name : '',
|
name : '',
|
||||||
|
@ -297,16 +286,9 @@
|
||||||
|
|
||||||
//创建x轴标签文本
|
//创建x轴标签文本
|
||||||
var date = new Date()
|
var date = new Date()
|
||||||
|
|
||||||
var labels = [];
|
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","","","",""];
|
labels=["2012","","","","","","","","","","","","2013","","","","","","","","","","","","2014","","","",""];
|
||||||
|
|
||||||
|
|
||||||
var line = new iChart.LineBasic2D({
|
var line = new iChart.LineBasic2D({
|
||||||
render : 'canvasDiv2',
|
render : 'canvasDiv2',
|
||||||
data: data,
|
data: data,
|
||||||
|
@ -352,7 +334,7 @@
|
||||||
parseText:function(tip,name,value,text,i){
|
parseText:function(tip,name,value,text,i){
|
||||||
return name+"帖子数:"+value+"万";
|
return name+"帖子数:"+value+"万";
|
||||||
}
|
}
|
||||||
} ,
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
tipMocker:function(tips,i){
|
tipMocker:function(tips,i){
|
||||||
|
@ -378,10 +360,9 @@
|
||||||
label:false, //是否显示数值
|
label:false, //是否显示数值
|
||||||
// hollow_inside:false,
|
// hollow_inside:false,
|
||||||
smooth : true,//平滑曲线
|
smooth : true,//平滑曲线
|
||||||
point_size:2, // 焦点大小
|
point_size:2 // 焦点大小
|
||||||
// point_hollow : true,
|
// point_hollow : true,
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
coordinate:{
|
coordinate:{
|
||||||
width:225, // 图表大小
|
width:225, // 图表大小
|
||||||
|
@ -404,7 +385,7 @@
|
||||||
start_scale:0,
|
start_scale:0,
|
||||||
scale_space:50,
|
scale_space:50,
|
||||||
end_scale:70,
|
end_scale:70,
|
||||||
scale_color:'#9f9f9f',
|
scale_color:'#9f9f9f'
|
||||||
// label : {color:'#ffffff',fontsize:11},
|
// label : {color:'#ffffff',fontsize:11},
|
||||||
|
|
||||||
},{
|
},{
|
||||||
|
@ -435,11 +416,11 @@
|
||||||
<td>
|
<td>
|
||||||
<table width="630px" border="0">
|
<table width="630px" border="0">
|
||||||
<tr>
|
<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">
|
<td align="right" rowspan="3">
|
||||||
<table class="borad-count">
|
<table class="borad-count">
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">回帖</td>
|
<td align="center">回帖</td>
|
||||||
|
@ -449,7 +430,7 @@
|
||||||
<td align="right" rowspan="3">
|
<td align="right" rowspan="3">
|
||||||
<table class="borad-count">
|
<table class="borad-count">
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">关注</td>
|
<td align="center">关注</td>
|
||||||
|
@ -459,7 +440,7 @@
|
||||||
<td align="right" rowspan="3">
|
<td align="right" rowspan="3">
|
||||||
<table class="borad-count">
|
<table class="borad-count">
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">浏览</td>
|
<td align="center">浏览</td>
|
||||||
|
@ -467,17 +448,17 @@
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" ><span class="font_description"> </span></td>
|
<td><span class="font_description"> </span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- <tr>
|
<tr>
|
||||||
<td align="left" colspan="2" ><span class="font_lighter"><%#= authoring topic.created_at, topic.author %>
|
<td align="left"><span class="font_lighter"><%=user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||||
<br />
|
<br />
|
||||||
</span></td>
|
</span></td>
|
||||||
</tr> -->
|
</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>
|
</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>
|
</tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</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;
|
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 {
|
.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 {
|
.nav-switch-icon {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
|
@ -129,8 +129,6 @@ li {
|
||||||
.nav-search-con{
|
.nav-search-con{
|
||||||
padding-top: 7px;
|
padding-top: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<%= javascript_include_tag "ichart.1.2.min" %>
|
<%= javascript_include_tag "ichart.1.2.min" %>
|
||||||
<%= stylesheet_link_tag "buglist-div-use.css" %>
|
<%= stylesheet_link_tag "buglist-div-use.css" %>
|
||||||
|
@ -146,29 +144,13 @@ li {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col2">
|
<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 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;">
|
<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>
|
<% @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>
|
||||||
<li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62260" title="Ruby OpenSSL CA私钥伪造漏洞">Ruby OpenSSL CA私钥伪造漏洞</a></li>
|
<% end %>
|
||||||
|
|
||||||
<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>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -236,7 +218,7 @@ li {
|
||||||
parseText:function(tip,name,value,text,i){
|
parseText:function(tip,name,value,text,i){
|
||||||
return name+"漏洞数:"+value;
|
return name+"漏洞数:"+value;
|
||||||
}
|
}
|
||||||
} ,
|
}
|
||||||
},
|
},
|
||||||
tipMocker:function(tips,i){
|
tipMocker:function(tips,i){
|
||||||
var index;
|
var index;
|
||||||
|
@ -272,7 +254,7 @@ li {
|
||||||
label:false, //是否显示数值
|
label:false, //是否显示数值
|
||||||
// hollow_inside:false,
|
// hollow_inside:false,
|
||||||
smooth : true,//平滑曲线
|
smooth : true,//平滑曲线
|
||||||
point_size:2, // 焦点大小
|
point_size:2 // 焦点大小
|
||||||
// point_hollow : true,
|
// point_hollow : true,
|
||||||
|
|
||||||
|
|
||||||
|
@ -298,7 +280,7 @@ li {
|
||||||
start_scale:0,
|
start_scale:0,
|
||||||
scale_space:50,
|
scale_space:50,
|
||||||
end_scale:70,
|
end_scale:70,
|
||||||
scale_color:'#9f9f9f',
|
scale_color:'#9f9f9f'
|
||||||
// label : {color:'#ffffff',fontsize:11},
|
// label : {color:'#ffffff',fontsize:11},
|
||||||
|
|
||||||
},{
|
},{
|
||||||
|
@ -417,7 +399,7 @@ line.target.line(28,97,400,97,2,'#b32c0d')
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-flexbox last">
|
<div class="nav-flexbox last">
|
||||||
<div class="nav-category">
|
<div class="nav-category">
|
||||||
<h4 title="上市时间">
|
<h4 title="上市时间"> </h4>
|
||||||
<div class="nav-category-wrap ">
|
<div class="nav-category-wrap ">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<!--modified by huang-->
|
<!--modified by huang-->
|
||||||
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
||||||
<span>
|
<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? %>
|
:onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
|
||||||
</span>
|
</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>
|
|
@ -32,8 +32,10 @@
|
||||||
</p> -->
|
</p> -->
|
||||||
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
|
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
|
||||||
</p>
|
</p>
|
||||||
|
<!--
|
||||||
<p><%= f.select :homework_type, homework_type_option %>
|
<p><%= f.select :homework_type, homework_type_option %>
|
||||||
</p>
|
</p>
|
||||||
|
-->
|
||||||
<p><%= hidden_field_tag 'course_id', @project.id %>
|
<p><%= hidden_field_tag 'course_id', @project.id %>
|
||||||
</p>
|
</p>
|
||||||
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
||||||
|
|
|
@ -1,56 +1,41 @@
|
||||||
<%= error_messages_for 'member' %>
|
<%= 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">
|
<div class="splitcontentleft">
|
||||||
<% if members.any? %>
|
<% if members.any? %>
|
||||||
<table class="list members">
|
<table class="list members">
|
||||||
<thead><tr>
|
<thead>
|
||||||
|
<tr>
|
||||||
<th><%= l(:label_user) %></th>
|
<th><%= l(:label_user) %></th>
|
||||||
<th><%= l(:label_role_plural) %></th>
|
<th><%= l(:label_role_plural) %></th>
|
||||||
<th style="width:15%"></th>
|
<th style="width:15%"></th>
|
||||||
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
|
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
|
||||||
</tr></thead>
|
</tr>
|
||||||
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% members.each do |member| %>
|
<% members.each do |member| %>
|
||||||
<% next if member.new_record? %>
|
<% next if member.new_record? %>
|
||||||
<tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
|
<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="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
|
||||||
<td class="roles">
|
<td class="roles">
|
||||||
<span id="member-<%= member.id %>-roles"><!-- <%=h member.roles.sort.collect(&:to_s).join(', ') %> -->
|
<span id="member-<%= member.id %>-roles">
|
||||||
<!--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(', ') %>
|
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<%=h member.roles.sort.collect(&:to_s).join(', ') %>
|
|
||||||
<% end %>
|
|
||||||
</span>
|
</span>
|
||||||
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
||||||
:method => :put,
|
:method => :put,
|
||||||
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
|
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
|
||||||
) do |f| %>
|
) do |f| %>
|
||||||
<!--added by huang for: filer the roles-->
|
|
||||||
<%= error_messages_for 'member' %>
|
<p>
|
||||||
<% if @project.project_type == 1 %>
|
<% roles.each do |role| %>
|
||||||
<% 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| %>
|
|
||||||
<label><%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(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>
|
<% end %></p>
|
||||||
|
@ -62,9 +47,6 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<!--modified by huang for: if the user'roles is Manager that he will can't modified himself-->
|
<!--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 @project.project_type == 1 %>
|
||||||
<% if member.roles.first.to_s == "Manager" %>
|
<% if member.roles.first.to_s == "Manager" %>
|
||||||
<td class="buttons"></td>
|
<td class="buttons"></td>
|
||||||
|
@ -99,27 +81,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</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">
|
<div class="splitcontentright">
|
||||||
<% if r.any? %>
|
<% if roles.any? %>
|
||||||
<% if @project.applied_projects.any? %>
|
<% if @project.applied_projects.any? %>
|
||||||
<div id="applied_project_block">
|
<div id="applied_project_block">
|
||||||
<%= form_for(@applied_members, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
<%= form_for(@applied_members, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||||
|
@ -131,7 +94,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!--show the roles which will select-->
|
<!--show the roles which will select-->
|
||||||
<p style="padding-top: 5px"><%= l(:label_role_plural) %>:
|
<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>
|
<% end %></p>
|
||||||
|
@ -145,7 +108,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
<%= 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>
|
<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') }')" %>
|
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
|
||||||
|
@ -155,7 +119,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!--show the roles which will select-->
|
<!--show the roles which will select-->
|
||||||
<p style="padding-top: 5px"><%= l(:label_role_plural) %>:
|
<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>
|
<% end %></p>
|
||||||
|
|
|
@ -18,7 +18,12 @@
|
||||||
<td colspan="2" valign="top">
|
<td colspan="2" valign="top">
|
||||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
|
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
|
||||||
<span class="font_lighter">
|
<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) %>)
|
<%= 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>
|
<%= 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 %>
|
<%= 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">
|
<fieldset style="width: 500px">
|
||||||
<legend>上传作品软件包和作品截图</legend>
|
<legend><%=l(:label_upload_softworkpacket_photo)%></legend>
|
||||||
<%= render_flash_messages %>
|
<%= render_flash_messages %>
|
||||||
<p id="put-bid-form-partial">
|
<p id="put-bid-form-partial">
|
||||||
<%= render :partial => 'attachments/form' %>
|
<%= 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: 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 ">
|
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; line-height: 0.5em ">
|
||||||
<%contest = softapplication.contests.first%>
|
<%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><%=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>所属类别:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
<p><%=l(:label_attendingcontestwork_belongs_type)%>:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
||||||
<p>系统支持:<%= softapplication.android_min_version_available %></p>
|
<p><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= softapplication.android_min_version_available %></p>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 53px">
|
<div style="padding-left: 53px">
|
||||||
<span>开发人员:<%= softapplication.application_developers %></span>
|
<span><%=l(:label_attendingcontestwork_developers)%>:<%= softapplication.application_developers %></span>
|
||||||
<span style="padding-left: 50px">发布时间:<%=format_time softapplication.created_at %></span>
|
<span style="padding-left: 50px"><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time softapplication.created_at %></span>
|
||||||
</div>
|
</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 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>
|
<div class="underline-contests_one" style="margin-top: -7px"></div>
|
||||||
|
|
|
@ -16,38 +16,35 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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 %>
|
<% 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>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 40px">发布人员:<%= @softapplication.user.name %></td>
|
<td style="padding-left: 40px"><%=l(:label_attendingcontestwork_release_person)%>:<%= @softapplication.user.name %></td>
|
||||||
<td>系统支持:<%= @softapplication.android_min_version_available %></td>
|
<td><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= @softapplication.android_min_version_available %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 40px">
|
<td style="padding-left: 40px">
|
||||||
<span>作品下载:</span>
|
<span><%=l(:label_attendingcontestwork_download)%>:</span>
|
||||||
<span>
|
<span>
|
||||||
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>开发人员:<%= @softapplication.application_developers %></td>
|
<td><%=l(:label_attendingcontestwork_developers)%>:<%= @softapplication.application_developers %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 40px">平均评分: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
|
<td style="padding-left: 40px"><%=l(:label_attendingcontestwork_average_scores)%>: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
|
||||||
<td>发布时间:<%=format_time @softapplication.created_at %></td>
|
<td><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time @softapplication.created_at %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 40px">
|
<td style="padding-left: 40px">
|
||||||
<% if (@softapplication.deposit_project != "nil" && @softapplication.deposit_project != "") %>
|
<% if @project %>
|
||||||
<%#= textilizable ("托管项目: " + @project.name) %>
|
<%=l(:label_attendingcontestwork_deposit_project)%>:<%= link_to "#@project", project_path(@project) %>
|
||||||
托管项目:<%= link_to "#@project", project_path(@project.id) %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -56,7 +53,7 @@
|
||||||
|
|
||||||
<div style="height: auto; padding-bottom: 10px">
|
<div style="height: auto; padding-bottom: 10px">
|
||||||
<strong>
|
<strong>
|
||||||
<div style="font-size: 15px;">作品简介:</div>
|
<div style="font-size: 15px;"><%=l(:label_work_description)%>:</div>
|
||||||
</strong>
|
</strong>
|
||||||
|
|
||||||
<div style="padding-top: 5px"><%= @softapplication.description %></div>
|
<div style="padding-top: 5px"><%= @softapplication.description %></div>
|
||||||
|
@ -64,11 +61,11 @@
|
||||||
<div class="underline-contests_one"></div>
|
<div class="underline-contests_one"></div>
|
||||||
|
|
||||||
<div style="height: auto; padding-bottom: 10px">
|
<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>打分总人数:<%= @softapplication.raters(:quality).count %></div> -->
|
||||||
<div style="overflow: hidden">
|
<div style="overflow: hidden">
|
||||||
<div style="margin-left: 15%; float: left">
|
<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>
|
<div>
|
||||||
<% 100.step(20, -20) do |star| %>
|
<% 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;">
|
<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>
|
</div>
|
||||||
<div style="float: left; padding-left: 100px; padding-top:35px " align="center">
|
<div style="float: left; padding-left: 100px; padding-top:35px " align="center">
|
||||||
<div>最终得分</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 style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>分</div>
|
||||||
分
|
|
||||||
</div>
|
|
||||||
<div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
|
<div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center">
|
<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;">
|
<div style="padding-top: 1px; font-size: 25px; color: blue;">
|
||||||
<strong><%= @softapplication.raters(:quality).count %></strong></div>
|
<strong><%= @softapplication.raters(:quality).count %></strong></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,7 +95,7 @@
|
||||||
|
|
||||||
<div style="height: auto; padding-bottom: 10px">
|
<div style="height: auto; padding-bottom: 10px">
|
||||||
<strong>
|
<strong>
|
||||||
<div style="font-size: 15px">作品截图:</div>
|
<div style="font-size: 15px"><%=l(:label_work_photo)%>:</div>
|
||||||
</strong>
|
</strong>
|
||||||
|
|
||||||
<div class="softapplication-img" >
|
<div class="softapplication-img" >
|
||||||
|
@ -119,10 +114,10 @@
|
||||||
<div class="underline-contests_one"></div>
|
<div class="underline-contests_one"></div>
|
||||||
|
|
||||||
<div style="height: 50px">
|
<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) %>
|
<% 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' %>
|
<div style="padding-left: 210px"><%=l(:label_work_rating)%>: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
|
||||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
|
<span style="font-size: 11px">(<%=l(:label_attendingcontestwork_sorting_intimation)%>)</span></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -51,14 +51,14 @@
|
||||||
|
|
||||||
<% when '2' %>
|
<% 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,
|
<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>
|
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% when '3' %>
|
<% 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,
|
<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>
|
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="user_course_list">
|
<div class="user_course_list menu-div">
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<%= link_to "#{l(:label_course_new)}", new_project_path(course: 1, project_type: 1), class: 'icon icon-add' if @user == User.current %>
|
<%= link_to "#{l(:label_course_new)}", new_project_path(course: 1, project_type: 1), class: 'icon icon-add' if @user == User.current %>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="user_course_list">
|
<div class="user_course_list menu-div">
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<%= link_to"#{l(:label_course_view_student)}",course_path(course: 1), :class => 'icon icon-add' %>
|
<%= link_to"#{l(:label_course_view_student)}",course_path(course: 1), :class => 'icon icon-add' %>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -1,5 +1,24 @@
|
||||||
<% if User.current.id == @user.id%>
|
<% if User.current.id == @user.id%>
|
||||||
<%= show_activity @state%>
|
<div class="menu-div">
|
||||||
|
<div class="menu">
|
||||||
|
<span style="color: #000; font-weight: ;"><%= "#{@user.name}的动态" %></span>
|
||||||
|
<ul><%#链接绑定在页面最下方的jQuery%>
|
||||||
|
<li mode='all' class="<%= "on" if @state.eql?(0)%>"><%=l :label_user_all_activity%></li>
|
||||||
|
<li mode='myself' class="<%= "on" if @state.eql?(1)%>"><%=l :label_user_activity_myself%></li>
|
||||||
|
<li mode='respond' class="<%= "on" if @state.eql?(2)%>"><%=l :label_user_all_respond%></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<%#= show_activity @state%>
|
||||||
|
<div style="height:20px"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%= form_tag(:controller => 'users', :action => "show") do %>
|
<%= form_tag(:controller => 'users', :action => "show") do %>
|
||||||
<div class="user-search-block hidden" style="float:right;margin-top:-55px">
|
<div class="user-search-block hidden" style="float:right;margin-top:-55px">
|
||||||
<table width="100%" valign="center">
|
<table width="100%" valign="center">
|
||||||
|
@ -34,13 +53,13 @@
|
||||||
<% if User.current.login == @user.login %>
|
<% if User.current.login == @user.login %>
|
||||||
<%# if e.user_id == act.jour.id %>
|
<%# if e.user_id == act.jour.id %>
|
||||||
<tr><td colspan="2" valign="top"><strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %><%=
|
<tr><td colspan="2" valign="top"><strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %><%=
|
||||||
link_to("#{e.act.user.name}", user_path(e.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span></td></tr>
|
link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span></td></tr>
|
||||||
<%# else %>
|
<%# else %>
|
||||||
<!-- <tr><td colspan="2" valign="top" class="font_lighter"><strong><%#= link_to("#{e.user.name}", user_path(e.user_id)) %> 给 <%#= link_to("#{act.at_user.name if act.at_user}", user_path(act.jour.id)) %> 留言了</strong> </td></tr> -->
|
<!-- <tr><td colspan="2" valign="top" class="font_lighter"><strong><%#= link_to("#{e.user.name}", user_path(e.user_id)) %> 给 <%#= link_to("#{act.at_user.name if act.at_user}", user_path(act.jour.id)) %> 留言了</strong> </td></tr> -->
|
||||||
<%# end %>
|
<%# end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<tr><td colspan="2" valign="top"><strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %><%=
|
<tr><td colspan="2" valign="top"><strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %><%=
|
||||||
link_to("#{e.act.user.name}", user_path(e.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span></td></tr>
|
link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span></td></tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580"><p class="font_description"> <%= textilizable act.notes %> </p>
|
<td colspan="2" width="580"><p class="font_description"> <%= textilizable act.notes %> </p>
|
||||||
|
@ -281,6 +300,9 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
$(document).ready(function($) {
|
$(document).ready(function($) {
|
||||||
$("#content .pagination:first~ div").first().find("a").attr("target", "_blank");
|
$("#content .menu-div:first~ div").first().find("a").attr("target", "_blank");
|
||||||
|
$('[mode=all]').click(function(event) {window.location.href='<%=user_activities_url%>'; });
|
||||||
|
$('[mode=myself]').click(function(event) {window.location.href='<%=user_activities_url(type: 1)%>'; });
|
||||||
|
$('[mode=respond]').click(function(event) {window.location.href='<%=user_activities_url(type: 2)%>'; });
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -1,7 +1,18 @@
|
||||||
<!--add by huang-->
|
<!--add by huang-->
|
||||||
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if(User.current.allowed_to?(:add_project, nil, :global => true) && @user == User.current)%>
|
|
||||||
<!--span class="font_lighter" >温馨提示:项目可以是一次作业,也可以是别人或者自己创建的一项小工程~</span-->
|
<!--span class="font_lighter" >温馨提示:项目可以是一次作业,也可以是别人或者自己创建的一项小工程~</span-->
|
||||||
<%= watch_projects @state %>
|
<div class="menu-div">
|
||||||
|
<div class="menu">
|
||||||
|
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if(User.current.allowed_to?(:add_project, nil, :global => true) && @user == User.current)%>
|
||||||
|
<ul><%#链接绑定在页面最下方的jQuery%>
|
||||||
|
<li mode='take' class="<%= "on" if @state.eql?(0)%>"><%=l :label_project_take%></li>
|
||||||
|
<li mode='watched' class="<%= "on" if @state.eql?(1)%>"><%=l :label_has_watched_project%></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height:20px"></div>
|
||||||
|
|
||||||
|
<%#= watch_projects @state %>
|
||||||
<% unless @memberships.empty? %>
|
<% unless @memberships.empty? %>
|
||||||
<div class="content_frame">
|
<div class="content_frame">
|
||||||
<ul class="user_project_sort">
|
<ul class="user_project_sort">
|
||||||
|
@ -48,5 +59,7 @@
|
||||||
$(document).ready(function($) {
|
$(document).ready(function($) {
|
||||||
$("#content .tabs_new~").find("a").attr("target", "_blank");
|
$("#content .tabs_new~").find("a").attr("target", "_blank");
|
||||||
$("#content .tabs_new~ .pagination").find("a").removeAttr("target");
|
$("#content .tabs_new~ .pagination").find("a").removeAttr("target");
|
||||||
|
$('[mode=take]').click(function(event) {window.location.href='<%=user_projects_user_url%>'; });
|
||||||
|
$('[mode=watched]').click(function(event) {window.location.href='<%=watch_projects_user_url(type: 1)%>'; });
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if(User.current.allowed_to?(:add_project, nil, :global => true) && @user == User.current)%>
|
|
||||||
<!--span class="font_lighter" >温馨提示:项目可以是一次作业,也可以是别人或者自己创建的一项小工程~</span-->
|
<!--span class="font_lighter" >温馨提示:项目可以是一次作业,也可以是别人或者自己创建的一项小工程~</span-->
|
||||||
<%= watch_projects @state%>
|
|
||||||
|
<div class="menu-div">
|
||||||
|
<div class="menu">
|
||||||
|
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if(User.current.allowed_to?(:add_project, nil, :global => true) && @user == User.current)%>
|
||||||
|
<ul><%#链接绑定在页面最下方的jQuery%>
|
||||||
|
<li mode='take' class="<%= "on" if @state.eql?(0)%>"><%=l :label_project_take%></li>
|
||||||
|
<li mode='watched' class="<%= "on" if @state.eql?(1)%>"><%=l :label_has_watched_project%></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%#= watch_projects @state%>
|
||||||
<% if @watch_projects.count > 0 %>
|
<% if @watch_projects.count > 0 %>
|
||||||
<% for watch_project in @watch_projects %>
|
<% for watch_project in @watch_projects %>
|
||||||
<table width="660" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
<table width="660" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||||
|
@ -30,3 +41,10 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= l(:label_watch_no_projects)%>
|
<%= l(:label_watch_no_projects)%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
$(document).ready(function($) {
|
||||||
|
|
||||||
|
$('[mode=take]').click(function(event) {window.location.href='<%=user_projects_user_url%>'; });
|
||||||
|
$('[mode=watched]').click(function(event) {window.location.href='<%=watch_projects_user_url(type: 1)%>'; });
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
<div class="d-p-projectlist-box">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<% find_new_forum_topics(11).each do |topic|%>
|
<% 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%;">
|
<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;">
|
<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;" %>
|
<%= 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>
|
||||||
<div class="clearfix"></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' %>
|
<%= render partial: 'link_to_another' %>
|
|
@ -137,16 +137,4 @@
|
||||||
|
|
||||||
<div class="clearfix"></div>
|
<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' %>
|
<%= render partial: 'link_to_another' %>
|
|
@ -1620,6 +1620,6 @@ en:
|
||||||
label_your_course: your course
|
label_your_course: your course
|
||||||
label_have_message : have a new message
|
label_have_message : have a new message
|
||||||
label_login_prompt: Email/NickName
|
label_login_prompt: Email/NickName
|
||||||
|
:lable_not_receive_mail: Click here don't receive email form site!
|
||||||
# ajax异步验证
|
# ajax异步验证
|
||||||
modal_valid_passing: can be used.
|
modal_valid_passing: can be used.
|
||||||
|
|
|
@ -600,7 +600,7 @@ zh:
|
||||||
label_my_page_block: 我的工作台模块
|
label_my_page_block: 我的工作台模块
|
||||||
label_administration: 管理
|
label_administration: 管理
|
||||||
label_login: 登录
|
label_login: 登录
|
||||||
label_login_prompt: 邮箱/账号
|
label_login_prompt: 邮箱/昵称
|
||||||
lable_user_name: 登录名
|
lable_user_name: 登录名
|
||||||
label_logout: 退出
|
label_logout: 退出
|
||||||
label_help: 帮助
|
label_help: 帮助
|
||||||
|
@ -1728,6 +1728,8 @@ zh:
|
||||||
label_first_reward: 一等奖
|
label_first_reward: 一等奖
|
||||||
label_second_reward: 二等奖
|
label_second_reward: 二等奖
|
||||||
label_third_reward: 三等奖
|
label_third_reward: 三等奖
|
||||||
|
label_fourth_reward: 四等奖
|
||||||
|
label_fifth_reward: 五等奖
|
||||||
label_excellence_reward: 优秀奖
|
label_excellence_reward: 优秀奖
|
||||||
label_comfort_reward: 入围奖
|
label_comfort_reward: 入围奖
|
||||||
label_course_settings: 课程设置
|
label_course_settings: 课程设置
|
||||||
|
@ -1884,8 +1886,14 @@ zh:
|
||||||
label_work_name: 作品名称
|
label_work_name: 作品名称
|
||||||
label_softapplication_description: 应用简介
|
label_softapplication_description: 应用简介
|
||||||
label_work_description: 作品简介
|
label_work_description: 作品简介
|
||||||
|
label_work_scores: 作品得分
|
||||||
|
label_work_rating: 评分
|
||||||
|
label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主!
|
||||||
|
label_work_scores_proportion: 得分比例
|
||||||
label_softapplication_type: 应用分类
|
label_softapplication_type: 应用分类
|
||||||
label_work_type: 作品分类
|
label_work_type: 作品分类
|
||||||
|
label_work_photo: 作品截图
|
||||||
|
label_work_comment: 作品评论
|
||||||
label_softapplication_version_available: 适配版本
|
label_softapplication_version_available: 适配版本
|
||||||
label_running_platform: 运行平台
|
label_running_platform: 运行平台
|
||||||
label_softapplication_developer: 上传人员
|
label_softapplication_developer: 上传人员
|
||||||
|
@ -1900,6 +1908,8 @@ zh:
|
||||||
label_button_ok: 确定
|
label_button_ok: 确定
|
||||||
label_tags_contest: 竞赛标签
|
label_tags_contest: 竞赛标签
|
||||||
label_tags_contest: 竞赛名称
|
label_tags_contest: 竞赛名称
|
||||||
|
label_final_scores: 最终得分
|
||||||
|
label_rating_person_amount: 打分总人数
|
||||||
label_tags_contest_description: 竞赛描述
|
label_tags_contest_description: 竞赛描述
|
||||||
label_release_add_contest_succeed: 该应用发布并添加成功.
|
label_release_add_contest_succeed: 该应用发布并添加成功.
|
||||||
label_add_contest_succeed_fail: 添加失败,该应用已参赛.
|
label_add_contest_succeed_fail: 添加失败,该应用已参赛.
|
||||||
|
@ -1910,6 +1920,7 @@ zh:
|
||||||
label_softapplication_list: 应用列表
|
label_softapplication_list: 应用列表
|
||||||
label_contest_work_list: 参赛作品列表
|
label_contest_work_list: 参赛作品列表
|
||||||
label_attending_contest: 我要参赛
|
label_attending_contest: 我要参赛
|
||||||
|
label_contest_notification: 竞赛通知
|
||||||
|
|
||||||
label_coursefile_sharingarea: 课程资源共享区
|
label_coursefile_sharingarea: 课程资源共享区
|
||||||
label_sort_by_activity: 按动态数排序
|
label_sort_by_activity: 按动态数排序
|
||||||
|
@ -1925,9 +1936,39 @@ zh:
|
||||||
label_contest_delete: 删除竞赛
|
label_contest_delete: 删除竞赛
|
||||||
label_noawards_current: 暂未评奖
|
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_account_updated: 帐号更新成功
|
||||||
notice_attendingcontest_work_successfully_created: 恭喜您,参赛作品创建成功!
|
notice_attendingcontest_work_successfully_created: 恭喜您,参赛作品创建成功!
|
||||||
notice_softapplication_was_successfully_updated: 恭喜您,参赛作品更新成功!
|
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: 您可以重新打分,打分结果以最后一次打分为主!
|
||||||
|
lable_not_receive_mail: 点此设置接收本站邮件偏好!
|
||||||
|
#end
|
||||||
|
|
||||||
# ajax异步验证
|
# ajax异步验证
|
||||||
modal_valid_passing: 可以使用
|
modal_valid_passing: 可以使用
|
||||||
label_bug: 漏洞
|
label_bug: 漏洞
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
RedmineApp::Application.routes.draw do
|
RedmineApp::Application.routes.draw do
|
||||||
resources :homework_users
|
resources :homework_users
|
||||||
|
|
||||||
|
|
||||||
resources :no_uses
|
resources :no_uses
|
||||||
delete 'no_uses', :to => 'no_uses#delete'
|
delete 'no_uses', :to => 'no_uses#delete'
|
||||||
|
|
||||||
|
@ -36,19 +35,24 @@ RedmineApp::Application.routes.draw do
|
||||||
collection do
|
collection do
|
||||||
match 'search', via: [:get, :post]
|
match 'search', via: [:get, :post]
|
||||||
match 'remove_condition', via: [:get, :post]
|
match 'remove_condition', via: [:get, :post]
|
||||||
|
match 'allbug', via: [:get, :post]
|
||||||
end
|
end
|
||||||
resources :relative_memos
|
resources :relative_memos
|
||||||
member do
|
member do
|
||||||
match 'master_apply', via: [:get, :post]
|
match 'master_apply', via: [:get, :post]
|
||||||
match 'accept_master_apply', via: [:get, :post]
|
match 'accept_master_apply', via: [:get, :post]
|
||||||
match 'refuse_master_apply', via: [:get, :post]
|
match 'refuse_master_apply', via: [:get, :post]
|
||||||
|
match 'showmemo', via: [:get, :post]
|
||||||
|
match 'showbug', via: [:get, :post]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
mount SeemsRateable::Engine => '/rateable', :as => :rateable
|
|
||||||
|
|
||||||
|
|
||||||
|
mount SeemsRateable::Engine => '/rateable', :as => :rateable
|
||||||
|
|
||||||
namespace :zipdown do
|
namespace :zipdown do
|
||||||
match 'assort'
|
match 'assort'
|
||||||
|
match 'download_user_homework', :as => :download_user_homework
|
||||||
end
|
end
|
||||||
namespace :test do
|
namespace :test do
|
||||||
match 'courselist'
|
match 'courselist'
|
||||||
|
@ -82,6 +86,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'show_project' , via: :get
|
match 'show_project' , via: :get
|
||||||
match 'show_softapplication' , via: :get
|
match 'show_softapplication' , via: :get
|
||||||
match 'show_attendingcontest' , via: :get
|
match 'show_attendingcontest' , via: :get
|
||||||
|
match 'show_notification' , via: :get
|
||||||
match 'show_participator' , via: :get
|
match 'show_participator' , via: :get
|
||||||
match 'set_reward_project' , via: [:get, :post]
|
match 'set_reward_project' , via: [:get, :post]
|
||||||
match 'set_reward_softapplication' , via: [:get, :post]
|
match 'set_reward_softapplication' , via: [:get, :post]
|
||||||
|
@ -518,6 +523,7 @@ RedmineApp::Application.routes.draw do
|
||||||
get 'search', :controller => 'search', :action => 'index'
|
get 'search', :controller => 'search', :action => 'index'
|
||||||
|
|
||||||
match 'mail_handler', :controller => 'mail_handler', :action => 'index', :via => :post
|
match 'mail_handler', :controller => 'mail_handler', :action => 'index', :via => :post
|
||||||
|
match 'mail_handler/cancel/:id', :controller => 'mail_handler', :action => 'cancel_mail_notify',:via => :get
|
||||||
|
|
||||||
match 'admin', :controller => 'admin', :action => 'index', :via => :get
|
match 'admin', :controller => 'admin', :action => 'index', :via => :get
|
||||||
match 'admin/projects', :controller => 'admin', :action => 'projects', :via => :get
|
match 'admin/projects', :controller => 'admin', :action => 'projects', :via => :get
|
||||||
|
@ -587,7 +593,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'calls/new_bid', :controller => 'bids', :action => 'new_bid'
|
match 'calls/new_bid', :controller => 'bids', :action => 'new_bid'
|
||||||
match 'contest/new_contest', :controller => 'bids', :action => 'new_contest' #huang
|
match 'contest/new_contest', :controller => 'bids', :action => 'new_contest' #huang
|
||||||
match 'calls/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
match 'calls/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
||||||
match 'calls/:id/new_homework', :controller => 'homework_attach', :action => 'new', :as => 'new_homework_attach'
|
match 'calls/:id/new_exercise_book', :controller => 'homework_attach', :action => 'new', :as => 'new_homework_attach'
|
||||||
match 'calls/:id/add', :controller => 'bids', :action => 'add'
|
match 'calls/:id/add', :controller => 'bids', :action => 'add'
|
||||||
match 'calls/:id/delete', :controller => 'bids', :action => 'delete'
|
match 'calls/:id/delete', :controller => 'bids', :action => 'delete'
|
||||||
match 'calls/:id/add_homework', :controller => 'bids', :action => 'add_homework', via: :post
|
match 'calls/:id/add_homework', :controller => 'bids', :action => 'add_homework', via: :post
|
||||||
|
@ -636,10 +642,13 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond'
|
match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond'
|
||||||
match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403
|
match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403
|
||||||
|
|
||||||
|
|
||||||
########################
|
########################
|
||||||
##added by wen##########
|
##added by wen##########
|
||||||
#######confusing########
|
#######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'
|
post 'school/get_options/:province', :to => 'school#get_options'
|
||||||
get 'school/get_options/:province', :to => 'school#get_options'
|
get 'school/get_options/:province', :to => 'school#get_options'
|
||||||
|
|
||||||
|
@ -678,5 +687,4 @@ RedmineApp::Application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
get ':controller(/:action(/:id))'
|
|
||||||
end
|
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
|
27
db/schema.rb
27
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20140604011630) do
|
ActiveRecord::Schema.define(:version => 20140527060344) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -116,7 +116,6 @@ ActiveRecord::Schema.define(:version => 20140604011630) do
|
||||||
t.integer "messages_count", :default => 0, :null => false
|
t.integer "messages_count", :default => 0, :null => false
|
||||||
t.integer "last_message_id"
|
t.integer "last_message_id"
|
||||||
t.integer "parent_id"
|
t.integer "parent_id"
|
||||||
t.integer "course_id"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
|
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
|
||||||
|
@ -218,16 +217,6 @@ ActiveRecord::Schema.define(:version => 20140604011630) do
|
||||||
t.datetime "updated_on", :null => false
|
t.datetime "updated_on", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "course_statuses", :force => true do |t|
|
|
||||||
t.integer "changesets_count"
|
|
||||||
t.integer "watchers_count"
|
|
||||||
t.integer "course_id"
|
|
||||||
t.float "grade", :default => 0.0
|
|
||||||
t.integer "course_ac_para", :default => 0
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "courses", :force => true do |t|
|
create_table "courses", :force => true do |t|
|
||||||
t.integer "tea_id"
|
t.integer "tea_id"
|
||||||
t.string "name"
|
t.string "name"
|
||||||
|
@ -245,11 +234,6 @@ ActiveRecord::Schema.define(:version => 20140604011630) do
|
||||||
t.string "endup_time"
|
t.string "endup_time"
|
||||||
t.string "class_period"
|
t.string "class_period"
|
||||||
t.integer "school_id"
|
t.integer "school_id"
|
||||||
t.text "description"
|
|
||||||
t.integer "status", :default => 1
|
|
||||||
t.integer "attachmenttype", :default => 2
|
|
||||||
t.integer "lft"
|
|
||||||
t.integer "rgt"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "custom_fields", :force => true do |t|
|
create_table "custom_fields", :force => true do |t|
|
||||||
|
@ -312,7 +296,6 @@ ActiveRecord::Schema.define(:version => 20140604011630) do
|
||||||
create_table "enabled_modules", :force => true do |t|
|
create_table "enabled_modules", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "name", :null => false
|
t.string "name", :null => false
|
||||||
t.integer "course_id"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id"
|
add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id"
|
||||||
|
@ -516,14 +499,13 @@ ActiveRecord::Schema.define(:version => 20140604011630) do
|
||||||
|
|
||||||
create_table "members", :force => true do |t|
|
create_table "members", :force => true do |t|
|
||||||
t.integer "user_id", :default => 0, :null => false
|
t.integer "user_id", :default => 0, :null => false
|
||||||
t.integer "project_id", :default => 0
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.datetime "created_on"
|
t.datetime "created_on"
|
||||||
t.boolean "mail_notification", :default => false, :null => false
|
t.boolean "mail_notification", :default => false, :null => false
|
||||||
t.integer "course_id"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "members", ["project_id"], :name => "index_members_on_project_id"
|
add_index "members", ["project_id"], :name => "index_members_on_project_id"
|
||||||
add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true
|
add_index "members", ["user_id", "project_id"], :name => "index_members_on_user_id_and_project_id", :unique => true
|
||||||
add_index "members", ["user_id"], :name => "index_members_on_user_id"
|
add_index "members", ["user_id"], :name => "index_members_on_user_id"
|
||||||
|
|
||||||
create_table "memos", :force => true do |t|
|
create_table "memos", :force => true do |t|
|
||||||
|
@ -708,7 +690,7 @@ ActiveRecord::Schema.define(:version => 20140604011630) do
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "relative_memos", :force => true do |t|
|
create_table "relative_memos", :force => true do |t|
|
||||||
t.integer "osp_id"
|
t.integer "osp_id", :null => false
|
||||||
t.integer "parent_id"
|
t.integer "parent_id"
|
||||||
t.string "subject", :null => false
|
t.string "subject", :null => false
|
||||||
t.text "content", :null => false
|
t.text "content", :null => false
|
||||||
|
@ -817,6 +799,7 @@ ActiveRecord::Schema.define(:version => 20140604011630) do
|
||||||
t.string "application_developers"
|
t.string "application_developers"
|
||||||
t.string "deposit_project_url"
|
t.string "deposit_project_url"
|
||||||
t.string "deposit_project"
|
t.string "deposit_project"
|
||||||
|
t.integer "project_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "students_for_courses", :force => true do |t|
|
create_table "students_for_courses", :force => true do |t|
|
||||||
|
|
1074
db/schema.rb.orig
1074
db/schema.rb.orig
File diff suppressed because it is too large
Load Diff
|
@ -293,6 +293,7 @@ Redmine::MenuManager.map :contest_menu do |menu|
|
||||||
#menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
#menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
||||||
#menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
|
#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 :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 :attendingcontest, :show_attendingcontest_contest_path, :caption => :label_attendin,g_contest
|
||||||
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
||||||
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
||||||
|
|
|
@ -1449,7 +1449,7 @@ div.square {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: .6em; height: .6em;
|
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;}
|
.contextual input, .contextual select {font-size:0.9em;}
|
||||||
.message .contextual { margin-top: 0; }
|
.message .contextual { margin-top: 0; }
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
margin: 0px 0 0 0;
|
margin: 0px 0 0 0;
|
||||||
width: 970px;
|
width: 970px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.header2{
|
.header2{
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -15,6 +16,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
right: 50%;
|
right: 50%;
|
||||||
background-color: #000000
|
background-color: #000000
|
||||||
|
|
||||||
}
|
}
|
||||||
.col1{
|
.col1{
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -28,14 +30,36 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
float: left;
|
float: left;
|
||||||
width: 470px;
|
width: 440px;
|
||||||
left: 3%;
|
left: 3%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover, a:active {
|
a:hover, a:active {
|
||||||
color: #c61a1a;
|
color: #c61a1a;
|
||||||
text-decoration: underline;
|
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 {
|
.li_list {
|
||||||
clear:both;
|
clear:both;
|
||||||
padding:0 0 0 0px;
|
padding:0 0 0 0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +14,7 @@ padding:0 7px 0 0;
|
||||||
|
|
||||||
ol.linenums {
|
ol.linenums {
|
||||||
margin:0 0 0 20px;
|
margin:0 0 0 20px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ol.linenums li {
|
ol.linenums li {
|
||||||
|
@ -31,6 +33,7 @@ padding:0;
|
||||||
background-color:#105DB5;
|
background-color:#105DB5;
|
||||||
color:#FFF;
|
color:#FFF;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.li_list li,.na_list li {
|
.li_list li,.na_list li {
|
||||||
|
@ -38,6 +41,12 @@ clear:both;
|
||||||
height:18px;
|
height:18px;
|
||||||
list-style-type:square;
|
list-style-type:square;
|
||||||
padding:2px;
|
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 {
|
div.pages .break,.created a {
|
||||||
color:#999;
|
color:#999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag_fouse {
|
||||||
|
font-family: "Microsoft YaHei";
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
padding-top: 3px;
|
||||||
|
}
|
|
@ -1205,14 +1205,14 @@ div.pagination {
|
||||||
|
|
||||||
/* user_courses
|
/* user_courses
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
.user_course_list {
|
.menu-div {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: -15px;
|
margin-top: -15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_course_list .menu{
|
.menu-div .menu{
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
border-radius: 2px 2px 0 0;
|
border-radius: 2px 2px 0 0;
|
||||||
|
@ -1225,7 +1225,7 @@ div.pagination {
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_course_list .menu:after {
|
.menu-div .menu:after {
|
||||||
content: ".";
|
content: ".";
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -1233,16 +1233,16 @@ div.pagination {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_course_list .menu ul {
|
.menu-div .menu ul {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
}
|
}
|
||||||
.user_course_list .menu ul {
|
.menu-div .menu ul {
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_course_list .menu li {
|
.menu-div .menu li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
@ -1250,17 +1250,17 @@ div.pagination {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_course_list .menu li:hover {
|
.menu-div .menu li:hover {
|
||||||
color: #00a1d6;
|
color: #00a1d6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_course_list .menu li.on {
|
.menu-div .menu li.on {
|
||||||
color: #00a1d6;
|
color: #00a1d6;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.user_course_list .list_top {
|
.menu-div .list_top {
|
||||||
margin: 20px auto 0px;
|
margin: 20px auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -968,7 +968,7 @@ hr
|
||||||
p
|
p
|
||||||
{
|
{
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
position:relative;/*gcm*/
|
/*position: static;/*gcm*/
|
||||||
}
|
}
|
||||||
/*end*/
|
/*end*/
|
||||||
div.issue
|
div.issue
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||||
|
|
||||||
|
one:
|
||||||
|
project_id: 1
|
||||||
|
user_id: 1
|
||||||
|
|
||||||
|
two:
|
||||||
|
project_id: 1
|
||||||
|
user_id: 1
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||||
|
|
||||||
|
one:
|
||||||
|
changesets_count: 1
|
||||||
|
watchers_count: 1
|
||||||
|
course_id: 1
|
||||||
|
grade: 1.5
|
||||||
|
course_ac_para: 1
|
||||||
|
|
||||||
|
two:
|
||||||
|
changesets_count: 1
|
||||||
|
watchers_count: 1
|
||||||
|
course_id: 1
|
||||||
|
grade: 1.5
|
||||||
|
course_ac_para: 1
|
|
@ -0,0 +1,7 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class AppliedProjectControllerTest < ActionController::TestCase
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue