Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
4747375499
12
Gemfile
12
Gemfile
|
@ -21,6 +21,18 @@ group :development do
|
||||||
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
|
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Gems used only for assets and not required
|
||||||
|
# in production environments by default.
|
||||||
|
group :assets do
|
||||||
|
gem 'sass-rails', '~> 3.2.3'
|
||||||
|
gem 'coffee-rails', '~> 3.2.1'
|
||||||
|
|
||||||
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
|
# gem 'therubyracer', :platforms => :ruby
|
||||||
|
|
||||||
|
gem 'uglifier', '>= 1.0.3'
|
||||||
|
end
|
||||||
|
|
||||||
# Optional gem for LDAP authentication
|
# Optional gem for LDAP authentication
|
||||||
group :ldap do
|
group :ldap do
|
||||||
gem "net-ldap", "~> 0.3.1"
|
gem "net-ldap", "~> 0.3.1"
|
||||||
|
|
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)
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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,25 +79,35 @@ class OpenSourceProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def allbug
|
||||||
|
@bugs = BugToOsp.visible
|
||||||
|
|
||||||
def search
|
@bug_count = @bugs.count
|
||||||
|
@bug_pages = Paginator.new @bug_count, per_page_option, params['page']
|
||||||
|
@bugs = @bugs.includes(:bug).reorder("#{RelativeMemo.table_name}.created_at DESC").limit(@bug_pages.per_page).offset(@bug_pages.offset).all
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
format.json { render json: @open_source_project }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def search
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def showbug
|
||||||
|
@open_source_project = OpenSourceProject.find(params[:id])
|
||||||
|
|
||||||
# added by yiang 暴力添加,请绕道
|
sort_init 'updated_at', 'desc'
|
||||||
def showmemo
|
sort_update 'created_at' => "#{RelativeMemo.table_name}.created_at",
|
||||||
@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",
|
'replies' => "#{RelativeMemo.table_name}.replies_count",
|
||||||
'updated_at' => "COALESCE (last_replies_relative_memos.created_at, #{RelativeMemo.table_name}.created_at)"
|
'updated_at' => "COALESCE (last_replies_relative_memos.created_at, #{RelativeMemo.table_name}.created_at)"
|
||||||
|
|
||||||
@memo = RelativeMemo.new(:open_source_project => @open_source_project)
|
@memo = RelativeMemo.new(:open_source_project => @open_source_project)
|
||||||
@topic_count = @open_source_project.topics.count
|
@topic_count = @open_source_project.bugs.count
|
||||||
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
||||||
@memos = @open_source_project.topics.
|
@memos = @open_source_project.bugs.
|
||||||
reorder("#{RelativeMemo.table_name}.sticky DESC").
|
reorder("#{RelativeMemo.table_name}.sticky DESC").
|
||||||
includes(:last_reply).
|
includes(:last_reply).
|
||||||
limit(@topic_pages.per_page).
|
limit(@topic_pages.per_page).
|
||||||
|
@ -102,13 +115,42 @@ def showmemo
|
||||||
order(sort_clause).
|
order(sort_clause).
|
||||||
all
|
all
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
render :layout => "base_opensource_p"
|
render :layout => "base_opensource_p"
|
||||||
}
|
}
|
||||||
format.json { render json: @open_source_project }
|
format.json { render json: @open_source_project }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
# added by yiang 暴力添加,请绕道
|
||||||
|
def showmemo
|
||||||
|
@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.topics.count
|
||||||
|
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
||||||
|
@memos = @open_source_project.topics.
|
||||||
|
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
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -178,13 +220,13 @@ end
|
||||||
|
|
||||||
def search
|
def search
|
||||||
# per_page_option = 10
|
# per_page_option = 10
|
||||||
#
|
#
|
||||||
# @open_source_projects = OpenSourceProject.filter(@app_dir, @language, @created_at)
|
# @open_source_projects = OpenSourceProject.filter(@app_dir, @language, @created_at)
|
||||||
# @open_source_projects = @open_source_projects.like(params[:name]) if params[:name].present?
|
# @open_source_projects = @open_source_projects.like(params[:name]) if params[:name].present?
|
||||||
#
|
#
|
||||||
# @os_project_count = @open_source_projects.count
|
# @os_project_count = @open_source_projects.count
|
||||||
# @os_project_pages = Paginator.new @os_project_count, per_page_option, params['page']
|
# @os_project_pages = Paginator.new @os_project_count, per_page_option, params['page']
|
||||||
#
|
#
|
||||||
# @open_source_projects = @open_source_projects.offset(@os_project_pages.offset).limit(@os_project_pages.per_page)
|
# @open_source_projects = @open_source_projects.offset(@os_project_pages.offset).limit(@os_project_pages.per_page)
|
||||||
|
|
||||||
redirect_to open_source_projects_path(:name => params[:name])
|
redirect_to open_source_projects_path(:name => params[:name])
|
||||||
|
@ -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) }
|
||||||
|
|
|
@ -750,7 +750,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
|
||||||
|
|
|
@ -59,12 +59,11 @@ module IssuesHelper
|
||||||
|
|
||||||
def issue_heading(issue)
|
def issue_heading(issue)
|
||||||
#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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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();
|
|
@ -1,170 +1,177 @@
|
||||||
<style>
|
<style>
|
||||||
input[type="submit"].contest_btn {
|
input[type="submit"].contest_btn {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: rgb(0, 0, 0);
|
color: rgb(0, 0, 0);
|
||||||
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
||||||
padding: 0px 0px 4px 0px;
|
padding: 0px 0px 4px 0px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
border: 1px solid rgb(148, 148, 148);
|
border: 1px solid rgb(148, 148, 148);
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
/*margin-right: -4px;*/
|
/*margin-right: -4px;*/
|
||||||
}
|
}
|
||||||
input[type="button"].contest_btn {
|
|
||||||
width: 60px;
|
input[type="button"].contest_btn {
|
||||||
height: 30px;
|
width: 60px;
|
||||||
line-height: 18px;
|
height: 30px;
|
||||||
font-size: 14px;
|
line-height: 18px;
|
||||||
color: rgb(0, 0, 0);
|
font-size: 14px;
|
||||||
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
color: rgb(0, 0, 0);
|
||||||
padding: 0px 0px 4px 0px;
|
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
||||||
border-radius: 2px;
|
padding: 0px 0px 4px 0px;
|
||||||
border: 1px solid rgb(148, 148, 148);
|
border-radius: 2px;
|
||||||
box-shadow: none;
|
border: 1px solid rgb(148, 148, 148);
|
||||||
text-shadow: none;
|
box-shadow: none;
|
||||||
margin-top: -10px;
|
text-shadow: none;
|
||||||
margin-right: -2px;
|
margin-top: -10px;
|
||||||
}
|
margin-right: -2px;
|
||||||
textarea:focus {
|
}
|
||||||
border: #d5dee9 1px solid;
|
|
||||||
}
|
textarea:focus {
|
||||||
|
border: #d5dee9 1px solid;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
function clearInfo(id, content) {
|
function clearInfo(id, content) {
|
||||||
var text = $('#' + id);
|
var text = $('#' + id);
|
||||||
if (text.val() == content) {
|
if (text.val() == content) {
|
||||||
$('#' + id).val('');
|
$('#' + id).val('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showInfo(id, content) {
|
function showInfo(id, content) {
|
||||||
var text = $('#' + id);
|
var text = $('#' + id);
|
||||||
if (text.val() == '') {
|
if (text.val() == '') {
|
||||||
$('#' + id).val(content);
|
$('#' + id).val(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel() {
|
function cancel() {
|
||||||
$("#put-bid-form").hide();
|
$("#put-bid-form").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel() {
|
function cancel() {
|
||||||
$("#put-project-form").hide();
|
$("#put-project-form").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<%= 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; ">
|
</div>
|
||||||
<span style="padding-top: 50px">步骤1:</span>
|
|
||||||
<span><%#= link_to '新建参赛作品', new_softapplication_path(:target=>'_blank'), :target=>'_blank' %></span>
|
|
||||||
<span><%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
|
||||||
<span style="font-size: 12px; color: grey">(先点击“新建参赛作品”,然后刷新页面,再继续步骤2。)</span>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<div style="font-size: 14px;margin:10px;padding-left: 73px">
|
<div style="font-size: 14px;margin:10px;padding-left: 73px">
|
||||||
<%= l(:label_user_login_attending_contest) %>
|
<%= l(:label_user_login_attending_contest) %>
|
||||||
<%= link_to l(:label_user_login_new), signin_path %>
|
<%= link_to l(:label_user_login_new), signin_path %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!--点击新建参赛作品弹出框新建参赛作品并关联到竞赛中-->
|
<!--点击新建参赛作品弹出框新建参赛作品并关联到竞赛中-->
|
||||||
<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>
|
||||||
<br />
|
</tr>
|
||||||
<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>
|
||||||
<br />
|
</tr>
|
||||||
<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">
|
|
||||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed)%> <br />
|
|
||||||
<br>
|
|
||||||
2、<%= l(:label_upload_softapplication_photo_condition)%>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</fieldset>
|
<p style="font-size: 11px">
|
||||||
</fieldset></br>
|
1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/>
|
||||||
<div class="align-center" style="padding-top: -3px; padding-bottom: 8px">
|
<br>
|
||||||
<%= submit_tag l(:button_create) %>
|
2、<%= l(:label_upload_softapplication_photo_condition) %>
|
||||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
|
</p>
|
||||||
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
|
|
||||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
|
</fieldset>
|
||||||
</div>
|
</fieldset></br>
|
||||||
<% end %>
|
<div class="align-center" style="padding-top: -3px; padding-bottom: 8px">
|
||||||
|
<%= submit_tag l(:button_create) %>
|
||||||
|
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
|
||||||
|
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||||
|
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,173 +183,185 @@
|
||||||
|
|
||||||
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
||||||
|
|
||||||
<% @contesting_project.sort.reverse.each do |c_project|%>
|
<% @contesting_project.sort.reverse.each do |c_project| %>
|
||||||
<% if c_project.project %>
|
<% if c_project.project %>
|
||||||
<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) %>
|
||||||
<div style="float: right">
|
: <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %> </strong>
|
||||||
<td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
|
|
||||||
<strong>
|
<div style="float: right">
|
||||||
<span id="reward_result_<%=c_project.id%>"> <!-- 调用js进行刷新 -->
|
<td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
|
||||||
<% if get_prize(c_project).nil? or get_prize(c_project) == "" %>
|
<strong>
|
||||||
|
<span id="reward_result_<%= c_project.id %>"> <!-- 调用js进行刷新 -->
|
||||||
|
<% if get_prize(c_project).nil? or get_prize(c_project) == "" %>
|
||||||
<% if @contest.deadline < Date.today %>
|
<% if @contest.deadline < Date.today %>
|
||||||
<span style="color: red"><%= l(:label_noawards)%></span>
|
<span style="color: red"><%= l(:label_noawards) %></span>
|
||||||
<% else%>
|
<% else %>
|
||||||
<span style="color: red"><%= l(:label_noawards_current)%></span>
|
<span style="color: red"><%= l(:label_noawards_current) %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% case get_prize(c_project) %>
|
<% case get_prize(c_project) %>
|
||||||
<% when '-1' %>
|
<% when '-1' %>
|
||||||
<%= image_tag("/images/bid/special_reward.png")%>
|
<%= image_tag("/images/bid/special_reward.png") %>
|
||||||
<% when '0' %>
|
<% when '0' %>
|
||||||
<%= image_tag("/images/bid/first_reward.png")%>
|
<%= image_tag("/images/bid/first_reward.png") %>
|
||||||
<% when '1' %>
|
<% when '1' %>
|
||||||
<%= image_tag("/images/bid/second_reward.png")%>
|
<%= image_tag("/images/bid/second_reward.png") %>
|
||||||
<% when '2' %>
|
<% when '2' %>
|
||||||
<%= image_tag("/images/bid/third_reward.png")%>
|
<%= image_tag("/images/bid/third_reward.png") %>
|
||||||
<% when '3' %>
|
<% when '3' %>
|
||||||
<%= image_tag("/images/bid/forth_reward.png")%>
|
<%= image_tag("/images/bid/forth_reward.png") %>
|
||||||
<% when '4' %>
|
<% when '4' %>
|
||||||
<%= image_tag("/images/bid/fifth_reward.png")%>
|
<%= image_tag("/images/bid/fifth_reward.png") %>
|
||||||
<% when '5' %>
|
<% when '5' %>
|
||||||
<%= image_tag("/images/bid/qualified.png")%>
|
<%= image_tag("/images/bid/qualified.png") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- 评价显隐控制按钮-->
|
<!-- 评价显隐控制按钮-->
|
||||||
<% 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| %>
|
||||||
<%= f.text_field :c_id,:style => "display:none",:value => c_project.id,:size=>"0" %>
|
<%= f.text_field :c_id, :style => "display:none", :value => c_project.id, :size => "0" %>
|
||||||
<%= f.select :reward,"<option value = '-1'>#{l(:label_special_reward)}</option>
|
<%= 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>
|
||||||
</div>
|
</br>
|
||||||
<div style="padding-left: 68px">
|
</div>
|
||||||
<tr>
|
<div style="padding-left: 68px">
|
||||||
<td>简介:</td>
|
<tr>
|
||||||
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
<td><%= l(:label_profile) %>:</td>
|
||||||
</tr></br>
|
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
||||||
</div>
|
</tr>
|
||||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
</br>
|
||||||
<span><strong>参赛时间:</strong><%= format_time c_project.created_at%></span>
|
</div>
|
||||||
<span style="padding-left: 240px"><strong>参赛代表:</strong><%= c_project.user.name %></span>
|
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||||
</div>
|
<span><strong><%= l(:label_attendingcontest_time) %>
|
||||||
|
:</strong><%= format_time c_project.created_at %></span>
|
||||||
|
<span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %>
|
||||||
|
:</strong><%= c_project.user.name %></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="padding-left: 68px">
|
<div style="padding-left: 68px">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="underline-contests_three"></div>
|
<div class="underline-contests_three"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% @contesting_softapplication.each do |c_softapplication|%>
|
<% @contesting_softapplication.each do |c_softapplication| %>
|
||||||
<% if c_softapplication.softapplication %>
|
<% if c_softapplication.softapplication %>
|
||||||
<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>
|
||||||
</div>
|
</br>
|
||||||
|
</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>
|
||||||
</div>
|
</br>
|
||||||
|
</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>
|
||||||
</div>
|
<span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %>
|
||||||
|
:</strong><%= c_softapplication.softapplication.user.name %></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--获奖及教师评奖-->
|
<!--获奖及教师评奖-->
|
||||||
<div style="padding-left: 18px; padding-bottom: 5px">
|
<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>
|
||||||
<span id="reward_result_<%=c_softapplication.id%>" > <!-- 调用js进行刷新 -->
|
<span id="reward_result_<%= c_softapplication.id %>"> <!-- 调用js进行刷新 -->
|
||||||
<% if get_prize(c_softapplication).nil? or get_prize(c_softapplication) == "" %>
|
<% if get_prize(c_softapplication).nil? or get_prize(c_softapplication) == "" %>
|
||||||
<% if @contest.deadline < Date.today %>
|
<% if @contest.deadline < Date.today %>
|
||||||
<span style="color: red"><%= l(:label_noawards)%></span>
|
<span style="color: red"><%= l(:label_noawards) %></span>
|
||||||
<% else%>
|
<% else %>
|
||||||
<span style="color: red"><%= l(:label_noawards_current)%></span>
|
<span style="color: red"><%= l(:label_noawards_current) %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% case get_prize(c_softapplication) %>
|
<% case get_prize(c_softapplication) %>
|
||||||
<% when '-1' %>
|
<% when '-1' %>
|
||||||
<%= image_tag("/images/bid/special_reward.png")%>
|
<%= image_tag("/images/bid/special_reward.png") %>
|
||||||
<% when '0' %>
|
<% when '0' %>
|
||||||
<%= image_tag("/images/bid/first_reward.png")%>
|
<%= image_tag("/images/bid/first_reward.png") %>
|
||||||
<% when '1' %>
|
<% when '1' %>
|
||||||
<%= image_tag("/images/bid/second_reward.png")%>
|
<%= image_tag("/images/bid/second_reward.png") %>
|
||||||
<% when '2' %>
|
<% when '2' %>
|
||||||
<%= image_tag("/images/bid/third_reward.png")%>
|
<%= image_tag("/images/bid/third_reward.png") %>
|
||||||
<% when '3' %>
|
<% when '3' %>
|
||||||
<%= image_tag("/images/bid/forth_reward.png")%>
|
<%= image_tag("/images/bid/forth_reward.png") %>
|
||||||
<% when '4' %>
|
<% when '4' %>
|
||||||
<%= image_tag("/images/bid/fifth_reward.png")%>
|
<%= image_tag("/images/bid/fifth_reward.png") %>
|
||||||
<% when '5' %>
|
<% when '5' %>
|
||||||
<%= image_tag("/images/bid/qualified.png")%>
|
<%= image_tag("/images/bid/qualified.png") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- 评价显隐控制按钮-->
|
<!-- 评价显隐控制按钮-->
|
||||||
<% 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 %>
|
||||||
<div style="valign="top" align="right" width="10%"">
|
<div style="valign=" top" align="right" width="10%"">
|
||||||
<span style="padding-right: 5px; padding-top: 1px"> <%= toggle_link '评奖', c_softapplication.id.to_s %></span>
|
<span style="padding-right: 5px; padding-top: 1px"> <%= toggle_link '评奖', c_softapplication.id.to_s %></span>
|
||||||
<!-- 评价应标项目的表单 -->
|
<!-- 评价应标项目的表单 -->
|
||||||
<span style="display: none; vertical-align: top " id = '<%= c_softapplication.id %>'>
|
<span style="display: none; vertical-align: top " id='<%= c_softapplication.id %>'>
|
||||||
<%= form_for "set_reward_softapplication",:remote=>true,:url=>set_reward_softapplication_contest_path do |f| %>
|
<%= form_for "set_reward_softapplication", :remote => true, :url => set_reward_softapplication_contest_path do |f| %>
|
||||||
<%= f.text_field :c_id,:style => "display:none",:value => c_softapplication.id,:size=>"0" %>
|
<%= f.text_field :c_id, :style => "display:none", :value => c_softapplication.id, :size => "0" %>
|
||||||
<%= 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>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="underline-contests_three"></div>
|
<div class="underline-contests_three"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
</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>
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
:onchange => "attachment_contenttypes_searchex(this.value)" %>
|
:onchange => "attachment_contenttypes_searchex(this.value)" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="upload_file_div" class="relation_file_div hidden">
|
<div id="upload_file_div" class="relation_file_div hidden">
|
||||||
<%= render :partial => 'new', locals: {project: @project} %>
|
<%= render :partial => 'new', locals: {project: @project} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="relation_file_div" class="relation_file_div hidden">
|
<div id="relation_file_div" class="relation_file_div hidden">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
|
|
||||||
function eval_ajax (xhr, textStatus) {
|
function eval_ajax(xhr, textStatus) {
|
||||||
if (textStatus == 'success') {
|
if (textStatus == 'success') {
|
||||||
eval(xhr.responseText);
|
eval(xhr.responseText);
|
||||||
} else if (textStatus == 'error') {
|
} else if (textStatus == 'error') {
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
type: encodeURIComponent(value),
|
type: encodeURIComponent(value),
|
||||||
contentType:$('#attach_sufix_browse').val()
|
contentType: $('#attach_sufix_browse').val()
|
||||||
}
|
}
|
||||||
|
|
||||||
}).complete(eval_ajax);
|
}).complete(eval_ajax);
|
||||||
|
@ -179,8 +179,8 @@
|
||||||
contentType: $('#attach_sufix_browse').val()
|
contentType: $('#attach_sufix_browse').val()
|
||||||
}
|
}
|
||||||
}).error(function () {
|
}).error(function () {
|
||||||
alert('error');
|
alert('error');
|
||||||
});
|
});
|
||||||
} else if (textStatus == 'error') {
|
} else if (textStatus == 'error') {
|
||||||
alert('An error has occurred');
|
alert('An error has occurred');
|
||||||
}
|
}
|
||||||
|
@ -190,22 +190,21 @@
|
||||||
|
|
||||||
|
|
||||||
<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",
|
||||||
url :'/users/tag_saveEx',
|
url: '/users/tag_saveEx',
|
||||||
data: {
|
data: {
|
||||||
tagname: $('tag_name').value,
|
tagname: $('tag_name').value,
|
||||||
obj_id: encodeURIComponent(objId),
|
obj_id: encodeURIComponent(objId),
|
||||||
obj_flag:encodeURIComponent(objTag)
|
obj_flag: encodeURIComponent(objTag)
|
||||||
},
|
},
|
||||||
success: function(data, textStatus){
|
success: function (data, textStatus) {
|
||||||
alert("OK");
|
alert("OK");
|
||||||
$(divid).empty();
|
$(divid).empty();
|
||||||
$(divid).html('123');
|
$(divid).html('123');
|
||||||
$("#" + divid + " #name").val("");
|
$("#" + divid + " #name").val("");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,10 +274,7 @@
|
||||||
// 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 : '',
|
||||||
value:flow,
|
value:flow,
|
||||||
|
@ -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>
|
|
@ -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>
|
||||||
|
|
|
@ -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">
|
||||||
|
@ -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;" %>
|
||||||
|
|
|
@ -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: 您可以重新打分,打分结果以最后一次打分为主!
|
||||||
|
|
||||||
|
#end
|
||||||
|
|
||||||
# ajax异步验证
|
# ajax异步验证
|
||||||
modal_valid_passing: 可以使用
|
modal_valid_passing: 可以使用
|
||||||
label_bug: 漏洞
|
label_bug: 漏洞
|
||||||
|
|
|
@ -18,11 +18,10 @@
|
||||||
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'
|
||||||
|
|
||||||
resources :apply_project_masters
|
resources :apply_project_masters
|
||||||
delete 'apply_project_masters', :to => 'apply_project_masters#delete'
|
delete 'apply_project_masters', :to => 'apply_project_masters#delete'
|
||||||
|
|
||||||
resources :homework_attach do
|
resources :homework_attach do
|
||||||
|
@ -36,17 +35,19 @@ 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'
|
||||||
end
|
end
|
||||||
|
@ -82,6 +83,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]
|
||||||
|
@ -324,7 +326,7 @@ RedmineApp::Application.routes.draw do
|
||||||
resources :files, :only => [:index, :new, :create] do
|
resources :files, :only => [:index, :new, :create] do
|
||||||
collection do
|
collection do
|
||||||
match "getattachtype" , via: [:get, :post]
|
match "getattachtype" , via: [:get, :post]
|
||||||
#match 'getattachtype/:attachtype', :to => 'files#getattachtype', via: [:get, :post]
|
#match 'getattachtype/:attachtype', :to => 'files#getattachtype', via: [:get, :post]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -483,8 +485,8 @@ RedmineApp::Application.routes.draw do
|
||||||
collection do
|
collection do
|
||||||
match "updateType" , via: [:get, :post]
|
match "updateType" , via: [:get, :post]
|
||||||
match "renderTag" , via: [:get, :post]
|
match "renderTag" , via: [:get, :post]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :groups do
|
resources :groups do
|
||||||
member do
|
member do
|
||||||
|
@ -624,10 +626,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'
|
||||||
|
|
||||||
|
@ -666,5 +671,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
|
1074
db/schema.rb.orig
1074
db/schema.rb.orig
File diff suppressed because it is too large
Load Diff
|
@ -292,6 +292,7 @@ Redmine::MenuManager.map :contest_menu do |menu|
|
||||||
#menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
#menu.push :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 }
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue