Merge remote-tracking branch 'remotes/origin/develop' into szzh
Conflicts: Gemfile app/controllers/users_controller.rb db/schema.rb
This commit is contained in:
commit
b33ee17343
12
Gemfile
12
Gemfile
|
@ -21,6 +21,18 @@ group :development do
|
|||
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
|
||||
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
|
||||
group :ldap do
|
||||
gem "net-ldap", "~> 0.3.1"
|
||||
|
|
20
Gemfile.lock
20
Gemfile.lock
|
@ -53,7 +53,16 @@ GEM
|
|||
arel (3.0.2)
|
||||
builder (3.0.0)
|
||||
coderay (1.0.9)
|
||||
coffee-rails (3.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (~> 3.2.0)
|
||||
coffee-script (2.2.0)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.6.1)
|
||||
erubis (2.7.0)
|
||||
execjs (1.4.0)
|
||||
multi_json (~> 1.0)
|
||||
fastercsv (1.5.0)
|
||||
hike (1.2.3)
|
||||
i18n (0.6.1)
|
||||
|
@ -99,6 +108,11 @@ GEM
|
|||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
ruby-openid (2.1.8)
|
||||
sass (3.2.7)
|
||||
sass-rails (3.2.6)
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
sprockets (2.2.2)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
|
@ -110,6 +124,9 @@ GEM
|
|||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.37)
|
||||
uglifier (1.0.3)
|
||||
execjs (>= 0.3.0)
|
||||
multi_json (>= 1.0.2)
|
||||
|
||||
PLATFORMS
|
||||
x86-mingw32
|
||||
|
@ -121,6 +138,7 @@ DEPENDENCIES
|
|||
better_errors!
|
||||
builder (= 3.0.0)
|
||||
coderay (~> 1.0.6)
|
||||
coffee-rails (~> 3.2.1)
|
||||
fastercsv (~> 1.5.0)
|
||||
i18n (~> 0.6.0)
|
||||
jquery-rails (~> 2.0.2)
|
||||
|
@ -130,4 +148,6 @@ DEPENDENCIES
|
|||
rack-openid
|
||||
rails (= 3.2.13)
|
||||
ruby-openid (~> 2.1.4)
|
||||
sass-rails (~> 3.2.3)
|
||||
seems_rateable!
|
||||
uglifier (>= 1.0.3)
|
||||
|
|
|
@ -5,7 +5,8 @@ class ContestsController < ApplicationController
|
|||
menu_item :project, :only => :show_project
|
||||
menu_item :application, :only => :show_softapplication
|
||||
menu_item :attendingcontest, :only => :show_attendingcontest
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :set_reward_project, :set_reward_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward,
|
||||
menu_item :contestnotification, :only => :show_notification
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :show_notification, :set_reward_project, :set_reward_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward,
|
||||
:show_contest_project, :show_contest_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings]
|
||||
|
||||
# added by fq
|
||||
|
@ -356,6 +357,17 @@ class ContestsController < ApplicationController
|
|||
|
||||
###end
|
||||
|
||||
def show_notification
|
||||
@contest = Contest.find_by_id(params[:id])
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => 'base_newcontest'
|
||||
}
|
||||
format.api
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def set_reward_project
|
||||
@c_p = nil
|
||||
@contesting_project_id = nil
|
||||
|
|
|
@ -12,6 +12,7 @@ class OpenSourceProjectsController < ApplicationController
|
|||
# GET /open_source_projects
|
||||
# GET /open_source_projects.json
|
||||
def index
|
||||
|
||||
@app_dir = params[:app_dir]
|
||||
@language = params[:language]
|
||||
@created_at = params[:created_at]
|
||||
|
@ -25,6 +26,8 @@ class OpenSourceProjectsController < ApplicationController
|
|||
|
||||
@open_source_projects = @open_source_projects.offset(@os_project_pages.offset).limit(@os_project_pages.per_page)
|
||||
|
||||
@bugs = BugToOsp.order('created_at desc').limit(8)
|
||||
|
||||
# @open_source_projects = OpenSourceProject.all
|
||||
|
||||
respond_to do |format|
|
||||
|
@ -76,25 +79,35 @@ class OpenSourceProjectsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def allbug
|
||||
@bugs = BugToOsp.visible
|
||||
|
||||
def search
|
||||
@bug_count = @bugs.count
|
||||
@bug_pages = Paginator.new @bug_count, per_page_option, params['page']
|
||||
@bugs = @bugs.includes(:bug).reorder("#{RelativeMemo.table_name}.created_at DESC").limit(@bug_pages.per_page).offset(@bug_pages.offset).all
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render json: @open_source_project }
|
||||
end
|
||||
end
|
||||
|
||||
def search
|
||||
|
||||
end
|
||||
|
||||
def showbug
|
||||
@open_source_project = OpenSourceProject.find(params[:id])
|
||||
|
||||
# added by yiang 暴力添加,请绕道
|
||||
def showmemo
|
||||
@open_source_project = OpenSourceProject.find(params[:id])
|
||||
|
||||
sort_init 'updated_at', 'desc'
|
||||
sort_update 'created_at' => "#{RelativeMemo.table_name}.created_at",
|
||||
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.
|
||||
@memo = RelativeMemo.new(:open_source_project => @open_source_project)
|
||||
@topic_count = @open_source_project.bugs.count
|
||||
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
||||
@memos = @open_source_project.bugs.
|
||||
reorder("#{RelativeMemo.table_name}.sticky DESC").
|
||||
includes(:last_reply).
|
||||
limit(@topic_pages.per_page).
|
||||
|
@ -102,13 +115,42 @@ def showmemo
|
|||
order(sort_clause).
|
||||
all
|
||||
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => "base_opensource_p"
|
||||
}
|
||||
format.json { render json: @open_source_project }
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => "base_opensource_p"
|
||||
}
|
||||
format.json { render json: @open_source_project }
|
||||
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.json
|
||||
def new
|
||||
|
@ -178,13 +220,13 @@ end
|
|||
|
||||
def search
|
||||
# per_page_option = 10
|
||||
#
|
||||
#
|
||||
# @open_source_projects = OpenSourceProject.filter(@app_dir, @language, @created_at)
|
||||
# @open_source_projects = @open_source_projects.like(params[:name]) if params[:name].present?
|
||||
#
|
||||
#
|
||||
# @os_project_count = @open_source_projects.count
|
||||
# @os_project_pages = Paginator.new @os_project_count, per_page_option, params['page']
|
||||
#
|
||||
#
|
||||
# @open_source_projects = @open_source_projects.offset(@os_project_pages.offset).limit(@os_project_pages.per_page)
|
||||
|
||||
redirect_to open_source_projects_path(:name => params[:name])
|
||||
|
@ -207,7 +249,6 @@ end
|
|||
redirect_to master_apply_open_source_project_path
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def require_master
|
||||
|
|
|
@ -47,7 +47,7 @@ class SoftapplicationsController < ApplicationController
|
|||
|
||||
def show
|
||||
@softapplication = Softapplication.find(params[:id])
|
||||
@project = Project.find_by_identifier(@softapplication.deposit_project)
|
||||
@project = @softapplication.project
|
||||
# 打分统计
|
||||
stars_reates = @softapplication.
|
||||
rates(:quality)
|
||||
|
@ -142,13 +142,16 @@ class SoftapplicationsController < ApplicationController
|
|||
def create
|
||||
@softapplication = Softapplication.new(params[:softapplication])
|
||||
@softapplication.user = User.current
|
||||
@softapplication.deposit_project = params[:project]
|
||||
#@softapplication.deposit_project = params[:project]
|
||||
@softapplication.project = Project.find_by_id(params[:project])
|
||||
|
||||
@softapplication.save_attachments(params[:attachments])
|
||||
|
||||
respond_to do |format|
|
||||
if @softapplication.save
|
||||
ContestingSoftapplication.create(:contest_id => params[:contest_id], :softapplication_id => @softapplication.id)
|
||||
#ProjectingSoftapplication.create_softapplication_projecting(:project_id => params[:project_id], :softapplication_id => @softapplication.id)
|
||||
#ProjectingSoftapplication.create_softapplication_projecting(@project.id, softapplication.id)
|
||||
format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_id]), notice: l(:notice_attendingcontest_work_successfully_created) }
|
||||
# format.json { render json: @softapplication, status: :created, location: @softapplication }
|
||||
else
|
||||
|
@ -170,7 +173,8 @@ class SoftapplicationsController < ApplicationController
|
|||
# @softapplication = Softapplication.find(params[:id])
|
||||
@softapplication.attachments.map{|attach| attach.destroy }
|
||||
@softapplication.save_attachments(params[:attachments])
|
||||
@softapplication.deposit_project = params[:project]
|
||||
#@softapplication.deposit_project = params[:project]
|
||||
@softapplication.project = Project.find_by_id(params[:project])
|
||||
respond_to do |format|
|
||||
if @softapplication.update_attributes(params[:softapplication])
|
||||
format.html { redirect_to @softapplication, notice: l(:notice_softapplication_was_successfully_updated) }
|
||||
|
|
|
@ -750,7 +750,7 @@ module ApplicationHelper
|
|||
tmp = Hash.new
|
||||
tmp={"" => ""}
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
tmp[project.name] = project.id
|
||||
end
|
||||
tmp
|
||||
end
|
||||
|
|
|
@ -59,12 +59,11 @@ module IssuesHelper
|
|||
|
||||
def issue_heading(issue)
|
||||
#h("#{issue.tracker} ##{issue.id}")
|
||||
#h("#{issue.tracker} #{issue.source_from}")
|
||||
# h("#{issue.tracker} #{issue.source_from}")
|
||||
s = ''
|
||||
s << ">>"
|
||||
s << link_to(@issue.project.name+l(:issue_list), project_issues_path(@issue.project))
|
||||
s << " >"
|
||||
s << @issue.source_from
|
||||
s << link_to(@issue.project.name, project_issues_path(@issue.project))
|
||||
s << " > #"
|
||||
s << @issue.project_index
|
||||
s.html_safe
|
||||
end
|
||||
|
||||
|
|
|
@ -46,4 +46,12 @@ module OpenSourceProjectsHelper
|
|||
end
|
||||
description
|
||||
end
|
||||
|
||||
def show_description_of_bug(bug)
|
||||
description = bug.description
|
||||
if description.nil? || description == ''
|
||||
description = bug.open_source_project.name + l(:label_bug)
|
||||
end
|
||||
description
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,4 +5,8 @@ class BugToOsp < ActiveRecord::Base
|
|||
|
||||
validates_presence_of :osp_id, :relative_memo_id
|
||||
|
||||
scope :visible, lambda {|*args|
|
||||
nil
|
||||
}
|
||||
|
||||
end
|
||||
|
|
|
@ -1156,7 +1156,11 @@ class Issue < ActiveRecord::Base
|
|||
# back string obj which is belong to project.
|
||||
def source_from
|
||||
"" << self.project.name.to_s <<
|
||||
"#" << (self.project.issues.index(self).to_i + 1).to_s
|
||||
"#" << project_index
|
||||
end
|
||||
|
||||
def project_index
|
||||
(self.project.issues.index(self).to_i + 1).to_s
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -71,6 +71,11 @@ class RelativeMemo < ActiveRecord::Base
|
|||
errors.add :base, l(:label_memo_locked) if root.locked? && self != root
|
||||
end
|
||||
|
||||
def short_content(length = 25)
|
||||
str = "^(.{,#{length}})[^\n\r]*.*$"
|
||||
content.gsub(Regexp.new(str), '\1...').strip if content
|
||||
end
|
||||
|
||||
# def update_memos_forum
|
||||
# if forum_id_changed?
|
||||
# Message.update_all({:board_id => board_id}, ["id = ? OR parent_id = ?", root.id, root.id ])
|
||||
|
|
|
@ -6,10 +6,11 @@ class Softapplication < ActiveRecord::Base
|
|||
|
||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||
has_many :contesting_softapplications, :dependent => :destroy
|
||||
has_many :projecting_softapplications, :dependent => :destroy
|
||||
#has_many :projecting_softapplications, :dependent => :destroy
|
||||
belongs_to :user
|
||||
belongs_to :project
|
||||
has_many :contests, :through => :contesting_softapplications
|
||||
belongs_to :project
|
||||
|
||||
def add_jour(user, notes, reference_user_id = 0, options = {})
|
||||
if options.count == 0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<tr>
|
||||
<td><strong>应用软件:</strong></td>
|
||||
<td><strong><%=l(:label_softapplication)%>:</strong></td>
|
||||
<td>
|
||||
<%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %>
|
||||
</td>
|
||||
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
<div style="padding-left: 68px">
|
||||
<tr>
|
||||
<td>简介:</td>
|
||||
<td><%=l(:label_profile)%>:</td>
|
||||
<td>
|
||||
<%= c_softapplication.softapplication.description.truncate(90, omission: '...') %>
|
||||
</td>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||
<tr>
|
||||
<td>发布时间:</td>
|
||||
<td><%=l(:label_activity_time)%>:</td>
|
||||
<td>
|
||||
<%=format_time c_softapplication.created_at %>
|
||||
</td>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</table>
|
||||
<!-- end -->
|
||||
<% else %>
|
||||
<div style="font-size: 14px;margin:10px;">
|
||||
<div style="font-size: 14px;margin:10px;padding-left: 13px">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
</div>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<h3 class="title">请输入竞赛密码</h3>
|
||||
<h3 class="title"><%=l(:label_please_input_password)%></h3>
|
||||
|
||||
<%= form_tag( join_in_contest_contests_path(id: contest.id),
|
||||
:remote => true,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$('#contesting_project_list').html('<%= escape_javascript(render(:partial => 'project_list', :locals => {:contesting_project => @contesting_project})) %>');
|
||||
$("#project_id").val("请选择项目");
|
||||
$("#project_id").val("<%= l(:label_please_select_project) %>");
|
||||
$("#contest_message").val( "<%= l(:label_bid_reason) %>" );
|
||||
$("#put-bid-form").hide();
|
|
@ -1,4 +1,4 @@
|
|||
$('#contesting_softapplication_list').html('<%= escape_javascript(render(:partial => 'softapplication_list', :locals => {:contesting_softapplication => @contesting_softapplication})) %>');
|
||||
$("#softapplication_id").val("请选择参赛应用");
|
||||
$("#softapplication_id").val("<%= l(:label_please_select_contestingsoftapplication) %>");
|
||||
$("#contest_message").val( "<%= l(:label_bid_reason) %>" );
|
||||
$("#put-bid-form").hide();
|
|
@ -1,170 +1,177 @@
|
|||
<style>
|
||||
input[type="submit"].contest_btn {
|
||||
vertical-align: middle;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: rgb(0, 0, 0);
|
||||
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
||||
padding: 0px 0px 4px 0px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgb(148, 148, 148);
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
margin-top: -10px;
|
||||
/*margin-right: -4px;*/
|
||||
}
|
||||
input[type="button"].contest_btn {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: rgb(0, 0, 0);
|
||||
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
||||
padding: 0px 0px 4px 0px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgb(148, 148, 148);
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
margin-top: -10px;
|
||||
margin-right: -2px;
|
||||
}
|
||||
textarea:focus {
|
||||
border: #d5dee9 1px solid;
|
||||
}
|
||||
input[type="submit"].contest_btn {
|
||||
vertical-align: middle;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: rgb(0, 0, 0);
|
||||
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
||||
padding: 0px 0px 4px 0px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgb(148, 148, 148);
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
margin-top: -10px;
|
||||
/*margin-right: -4px;*/
|
||||
}
|
||||
|
||||
input[type="button"].contest_btn {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: rgb(0, 0, 0);
|
||||
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
||||
padding: 0px 0px 4px 0px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgb(148, 148, 148);
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
margin-top: -10px;
|
||||
margin-right: -2px;
|
||||
}
|
||||
|
||||
textarea:focus {
|
||||
border: #d5dee9 1px solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == content) {
|
||||
$('#' + id).val('');
|
||||
}
|
||||
}
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == content) {
|
||||
$('#' + id).val('');
|
||||
}
|
||||
}
|
||||
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
$("#put-bid-form").hide();
|
||||
}
|
||||
function cancel() {
|
||||
$("#put-bid-form").hide();
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
$("#put-project-form").hide();
|
||||
}
|
||||
function cancel() {
|
||||
$("#put-project-form").hide();
|
||||
}
|
||||
|
||||
</script>
|
||||
<%= render_flash_messages %>
|
||||
<!--参赛步骤-->
|
||||
<div style="padding-left: 23px; padding-bottom: 10px; color: grey; font-size: 12px">
|
||||
<div>温馨提示:如果您准备参加竞赛,请点击下面的"新建参赛作品"!</div>
|
||||
<div style="margin-left: 59px; padding-top: 2px">1) 若您已完成开发,且只希望发布您的作品,“托管项目”一项可以不选;</div>
|
||||
<div style="margin-left: 59px; padding-top: 2px">2) 若您希望托管竞赛数据和代码以及保留开发和提交代码的轨迹,请从“托管项目”中选择一项您已创建好的项目作为该参赛作品的托管项目,若您还没有创建项目,请点击右边的“创建项目”,然后回到本页再选择。</div>
|
||||
<div><%= l(:label_wellmeaning_intimation_contentone) %></div>
|
||||
<div style="margin-left: 59px; padding-top: 2px">1) <%= l(:label_wellmeaning_intimation_contenttwo) %></div>
|
||||
<div style="margin-left: 59px; padding-top: 2px">2) <%= l(:label_wellmeaning_intimation_contentthree) %></div>
|
||||
</div>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<div style="padding-bottom: 10px; line-height: 15px">
|
||||
<div style="padding-left: 82px; font-size: 14px">
|
||||
<span><strong>参加竞赛:</strong></span>
|
||||
<span><%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||
</div>
|
||||
<!-- <div style="padding-left: 82px; ">
|
||||
<span style="padding-top: 50px">步骤1:</span>
|
||||
<span><%#= link_to '新建参赛作品', new_softapplication_path(:target=>'_blank'), :target=>'_blank' %></span>
|
||||
<span><%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||
<span style="font-size: 12px; color: grey">(先点击“新建参赛作品”,然后刷新页面,再继续步骤2。)</span>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
<div style="padding-bottom: 10px; line-height: 15px">
|
||||
<div style="padding-left: 82px; font-size: 14px">
|
||||
<span><strong><%= l(:label_attending_contest) %>:</strong></span>
|
||||
<span><%= link_to l(:label_new_attendingcontest_work), "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="font-size: 14px;margin:10px;padding-left: 73px">
|
||||
<%= l(:label_user_login_attending_contest) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
</div>
|
||||
<div style="font-size: 14px;margin:10px;padding-left: 73px">
|
||||
<%= l(:label_user_login_attending_contest) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!--点击新建参赛作品弹出框新建参赛作品并关联到竞赛中-->
|
||||
<div id="put-project-form" style="display: none; padding-left: 83px; width: 88%">
|
||||
<%= form_for Softapplication.new, :url => softapplications_path do |f| %>
|
||||
<fieldset class="contes-new-box", style="padding-left: 36px; line-height: 8px; margin-left: 1px">
|
||||
<%= hidden_field_tag 'contest_id', @contest.id %>
|
||||
<tr style="width:700px; margin-left: -10px;">
|
||||
<span><%= l(:label_work_name) %></span>
|
||||
<span class="contest-star"> * </span>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(25个汉字以内)</span>
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
<%= form_for Softapplication.new, :url => softapplications_path do |f| %>
|
||||
<fieldset class="contes-new-box" style="padding-left: 36px; line-height: 8px; margin-left: 1px" >
|
||||
<%= hidden_field_tag 'contest_id', @contest.id %>
|
||||
<tr style="width:700px; margin-left: -10px;">
|
||||
<span><%= l(:label_work_name) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_running_platform) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_running_platform) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_type) %></span>
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_type) %></span>
|
||||
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(125个汉字以内)</span>
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_developers) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_developers) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_deposit_project) %>:</span>
|
||||
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2' %></span>
|
||||
<span><%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%></span>
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_deposit_project) %>:</span>
|
||||
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2' %></span>
|
||||
<span><%= link_to l(:label_create_new_projects), new_project_path(course: 0, project_type: 0), :target => '_blank' %></span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<fieldset style="width: 500px; padding-top: 10px">
|
||||
<legend>
|
||||
上传作品软件包和作品截图
|
||||
</legend>
|
||||
<%#= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
<p style="font-size: 11px">
|
||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed)%> <br />
|
||||
<br>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition)%>
|
||||
</p>
|
||||
<fieldset style="width: 500px; padding-top: 10px">
|
||||
<legend>
|
||||
<%= l(:label_upload_softworkpacket_photo) %>
|
||||
</legend>
|
||||
<%#= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
</fieldset></br>
|
||||
<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 %>
|
||||
<p style="font-size: 11px">
|
||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/>
|
||||
<br>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition) %>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
</fieldset></br>
|
||||
<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>
|
||||
|
||||
|
||||
|
@ -176,173 +183,185 @@
|
|||
|
||||
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
||||
|
||||
<% @contesting_project.sort.reverse.each do |c_project|%>
|
||||
<% if c_project.project %>
|
||||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<div>
|
||||
<div><strong>参赛作品: <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %> </strong>
|
||||
<div style="float: right">
|
||||
<td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
|
||||
<strong>
|
||||
<span id="reward_result_<%=c_project.id%>"> <!-- 调用js进行刷新 -->
|
||||
<% if get_prize(c_project).nil? or get_prize(c_project) == "" %>
|
||||
<% @contesting_project.sort.reverse.each do |c_project| %>
|
||||
<% if c_project.project %>
|
||||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<div>
|
||||
<div><strong><%= l(:label_contest_work) %>
|
||||
: <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %> </strong>
|
||||
|
||||
<div style="float: right">
|
||||
<td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
|
||||
<strong>
|
||||
<span id="reward_result_<%= c_project.id %>"> <!-- 调用js进行刷新 -->
|
||||
<% if get_prize(c_project).nil? or get_prize(c_project) == "" %>
|
||||
<% if @contest.deadline < Date.today %>
|
||||
<span style="color: red"><%= l(:label_noawards)%></span>
|
||||
<% else%>
|
||||
<span style="color: red"><%= l(:label_noawards_current)%></span>
|
||||
<span style="color: red"><%= l(:label_noawards) %></span>
|
||||
<% else %>
|
||||
<span style="color: red"><%= l(:label_noawards_current) %></span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% case get_prize(c_project) %>
|
||||
<% case get_prize(c_project) %>
|
||||
<% when '-1' %>
|
||||
<%= image_tag("/images/bid/special_reward.png")%>
|
||||
<%= image_tag("/images/bid/special_reward.png") %>
|
||||
<% when '0' %>
|
||||
<%= image_tag("/images/bid/first_reward.png")%>
|
||||
<%= image_tag("/images/bid/first_reward.png") %>
|
||||
<% when '1' %>
|
||||
<%= image_tag("/images/bid/second_reward.png")%>
|
||||
<%= image_tag("/images/bid/second_reward.png") %>
|
||||
<% when '2' %>
|
||||
<%= image_tag("/images/bid/third_reward.png")%>
|
||||
<%= image_tag("/images/bid/third_reward.png") %>
|
||||
<% when '3' %>
|
||||
<%= image_tag("/images/bid/forth_reward.png")%>
|
||||
<%= image_tag("/images/bid/forth_reward.png") %>
|
||||
<% when '4' %>
|
||||
<%= image_tag("/images/bid/fifth_reward.png")%>
|
||||
<%= image_tag("/images/bid/fifth_reward.png") %>
|
||||
<% when '5' %>
|
||||
<%= image_tag("/images/bid/qualified.png")%>
|
||||
<%= image_tag("/images/bid/qualified.png") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</strong>
|
||||
</td>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<!-- 评价显隐控制按钮-->
|
||||
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
||||
<td valign="top" align="right" width="10%">
|
||||
<span> <%= toggle_link '评奖', c_project.id.to_s %></span>
|
||||
<!-- 评价应标项目的表单 -->
|
||||
<span style="display: none; vertical-align: top " id = '<%= c_project.id %>'>
|
||||
<%= form_for "set_reward_project",:remote=>true,:url=>set_reward_project_contest_path do |f| %>
|
||||
<%= f.text_field :c_id,:style => "display:none",:value => c_project.id,:size=>"0" %>
|
||||
<%= f.select :reward,"<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||
<!-- 评价显隐控制按钮-->
|
||||
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
||||
<td valign="top" align="right" width="10%">
|
||||
<span> <%= toggle_link l(:label_reward), c_project.id.to_s %></span>
|
||||
<!-- 评价应标项目的表单 -->
|
||||
<span style="display: none; vertical-align: top " id='<%= c_project.id %>'>
|
||||
<%= form_for "set_reward_project", :remote => true, :url => set_reward_project_contest_path do |f| %>
|
||||
<%= f.text_field :c_id, :style => "display:none", :value => c_project.id, :size => "0" %>
|
||||
<%= f.select :reward, "<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||
<option value = '0'>#{l(:label_first_reward)}</option>
|
||||
<option value = '1'>#{l(:label_second_reward)}</option>
|
||||
<option value = '2'>三等奖</option>
|
||||
<option value = '3'>四等奖</option>
|
||||
<option value = '4'>五等奖</option>
|
||||
<option value = '2'>#{l(:label_third_reward)}</option>
|
||||
<option value = '3'>#{l(:label_fourth_reward)}</option>
|
||||
<option value = '4'>#{l(:label_fifth_reward)}</option>
|
||||
<option value = '5'>#{l(:label_comfort_reward)}</option>".html_safe %>
|
||||
<%= f.submit "提交",:class=>"submit" %>
|
||||
<%= f.submit :value => l(:button_submit), :class => "submit" %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div></br>
|
||||
</div>
|
||||
<div style="padding-left: 68px">
|
||||
<tr>
|
||||
<td>简介:</td>
|
||||
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
||||
</tr></br>
|
||||
</div>
|
||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||
<span><strong>参赛时间:</strong><%= format_time c_project.created_at%></span>
|
||||
<span style="padding-left: 240px"><strong>参赛代表:</strong><%= c_project.user.name %></span>
|
||||
</div>
|
||||
</td>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
</div>
|
||||
<div style="padding-left: 68px">
|
||||
<tr>
|
||||
<td><%= l(:label_profile) %>:</td>
|
||||
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
||||
</tr>
|
||||
</br>
|
||||
</div>
|
||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||
<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>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @contesting_softapplication.each do |c_softapplication|%>
|
||||
<% if c_softapplication.softapplication %>
|
||||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<tr>
|
||||
<td><strong>参赛作品: </strong></td>
|
||||
<td> <%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %> </td>
|
||||
</tr></br>
|
||||
</div>
|
||||
<% @contesting_softapplication.each do |c_softapplication| %>
|
||||
<% if c_softapplication.softapplication %>
|
||||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<tr>
|
||||
<td><strong><%= l(:label_contest_work) %>: </strong></td>
|
||||
<td> <%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %> </td>
|
||||
</tr>
|
||||
</br>
|
||||
</div>
|
||||
|
||||
<div style="padding-left: 68px; padding-top: 5px">
|
||||
<tr>
|
||||
<td><strong>简介:</strong></td>
|
||||
<td> <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> </td>
|
||||
</tr></br>
|
||||
</div>
|
||||
<div style="padding-left: 68px; padding-top: 5px">
|
||||
<tr>
|
||||
<td><strong><%= l(:label_profile) %>:</strong></td>
|
||||
<td> <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> </td>
|
||||
</tr>
|
||||
</br>
|
||||
</div>
|
||||
|
||||
<div style="padding-left: 68px; pading-bottom: 8px">
|
||||
<span><strong>参赛时间:</strong><%= format_time c_softapplication.created_at %></span>
|
||||
<span style="padding-left: 240px"><strong>参赛代表:</strong><%= c_softapplication.softapplication.user.name %></span>
|
||||
</div>
|
||||
<div style="padding-left: 68px; pading-bottom: 8px">
|
||||
<span><strong><%= l(:label_attendingcontest_time) %>
|
||||
:</strong><%= format_time c_softapplication.created_at %></span>
|
||||
<span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %>
|
||||
:</strong><%= c_softapplication.softapplication.user.name %></span>
|
||||
</div>
|
||||
|
||||
<!--获奖及教师评奖-->
|
||||
<div style="padding-left: 18px; padding-bottom: 5px">
|
||||
<span style="padding-left: 50px"><strong>最终得分:</strong></span><span style="color: red"><%= c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s%>分</span>
|
||||
<!--获奖及教师评奖-->
|
||||
<div style="padding-left: 18px; padding-bottom: 5px">
|
||||
<span style="padding-left: 50px"><strong><%= l(:label_final_scores) %>
|
||||
:</strong></span><span style="color: red"><%= c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>
|
||||
分</span>
|
||||
<span style="padding-left: 334px">
|
||||
<td>
|
||||
<strong>
|
||||
<span id="reward_result_<%=c_softapplication.id%>" > <!-- 调用js进行刷新 -->
|
||||
<% if get_prize(c_softapplication).nil? or get_prize(c_softapplication) == "" %>
|
||||
<strong>
|
||||
<span id="reward_result_<%= c_softapplication.id %>"> <!-- 调用js进行刷新 -->
|
||||
<% if get_prize(c_softapplication).nil? or get_prize(c_softapplication) == "" %>
|
||||
<% if @contest.deadline < Date.today %>
|
||||
<span style="color: red"><%= l(:label_noawards)%></span>
|
||||
<% else%>
|
||||
<span style="color: red"><%= l(:label_noawards_current)%></span>
|
||||
<span style="color: red"><%= l(:label_noawards) %></span>
|
||||
<% else %>
|
||||
<span style="color: red"><%= l(:label_noawards_current) %></span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% case get_prize(c_softapplication) %>
|
||||
<% case get_prize(c_softapplication) %>
|
||||
<% when '-1' %>
|
||||
<%= image_tag("/images/bid/special_reward.png")%>
|
||||
<%= image_tag("/images/bid/special_reward.png") %>
|
||||
<% when '0' %>
|
||||
<%= image_tag("/images/bid/first_reward.png")%>
|
||||
<%= image_tag("/images/bid/first_reward.png") %>
|
||||
<% when '1' %>
|
||||
<%= image_tag("/images/bid/second_reward.png")%>
|
||||
<%= image_tag("/images/bid/second_reward.png") %>
|
||||
<% when '2' %>
|
||||
<%= image_tag("/images/bid/third_reward.png")%>
|
||||
<%= image_tag("/images/bid/third_reward.png") %>
|
||||
<% when '3' %>
|
||||
<%= image_tag("/images/bid/forth_reward.png")%>
|
||||
<%= image_tag("/images/bid/forth_reward.png") %>
|
||||
<% when '4' %>
|
||||
<%= image_tag("/images/bid/fifth_reward.png")%>
|
||||
<%= image_tag("/images/bid/fifth_reward.png") %>
|
||||
<% when '5' %>
|
||||
<%= image_tag("/images/bid/qualified.png")%>
|
||||
<%= image_tag("/images/bid/qualified.png") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</strong>
|
||||
</td>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<!-- 评价显隐控制按钮-->
|
||||
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
||||
<div style="valign="top" align="right" width="10%"">
|
||||
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
||||
<div style="valign=" top" align="right" width="10%"">
|
||||
<span style="padding-right: 5px; padding-top: 1px"> <%= toggle_link '评奖', c_softapplication.id.to_s %></span>
|
||||
<!-- 评价应标项目的表单 -->
|
||||
<span style="display: none; vertical-align: top " id = '<%= c_softapplication.id %>'>
|
||||
<%= form_for "set_reward_softapplication",:remote=>true,:url=>set_reward_softapplication_contest_path do |f| %>
|
||||
<%= f.text_field :c_id,:style => "display:none",:value => c_softapplication.id,:size=>"0" %>
|
||||
<%= f.select :reward,"<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||
<span style="display: none; vertical-align: top " id='<%= c_softapplication.id %>'>
|
||||
<%= form_for "set_reward_softapplication", :remote => true, :url => set_reward_softapplication_contest_path do |f| %>
|
||||
<%= f.text_field :c_id, :style => "display:none", :value => c_softapplication.id, :size => "0" %>
|
||||
<%= f.select :reward, "<option value = '-1'>#{l(:label_special_reward)}</option>
|
||||
<option value = '0'>#{l(:label_first_reward)}</option>
|
||||
<option value = '1'>#{l(:label_second_reward)}</option>
|
||||
<option value = '2'>三等奖</option>
|
||||
<option value = '3'>四等奖</option>
|
||||
<option value = '4'>五等奖</option>
|
||||
<option value = '2'>#{l(:label_third_reward)}</option>
|
||||
<option value = '3'>#{l(:label_fourth_reward)}</option>
|
||||
<option value = '4'>#{l(:label_fifth_reward)}</option>
|
||||
<option value = '5'>#{l(:label_comfort_reward)}</option>".html_safe %>
|
||||
<%= f.submit "提交",:class=>"submit" %>
|
||||
<%= f.submit :value => l(:button_submit), :class => "submit" %>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<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>
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<td>
|
||||
<p>
|
||||
<div class="font_lighter" style="font-size: 13px;">
|
||||
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%> <!--跳转到project的new.html.erb-->
|
||||
<%= link_to l(:label_create_new_projects), new_project_path(course: 0, project_type: 0), :target=>'_blank'%> <!--跳转到project的new.html.erb-->
|
||||
</div>
|
||||
</p>
|
||||
</td>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<td>
|
||||
<p>
|
||||
<div class="font_lighter" style="font-size: 13px;">
|
||||
<%= link_to '发布应用', new_softapplication_path(:target=>'_blank'), :target=>'_blank' %>
|
||||
<%= link_to l(:label_release_softapplication), new_softapplication_path(:target=>'_blank'), :target=>'_blank' %>
|
||||
</div>
|
||||
</p>
|
||||
</td>
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
<!--added by fq -->
|
||||
<!--display the board-->
|
||||
|
||||
<div class="borad-topic-count" style="margin-top:10px">
|
||||
<span>共有 <%= link_to @topic_count %> 个贴子 </span>
|
||||
</div>
|
||||
<div style="padding-top: 10px">
|
||||
<% if memos.any? %>
|
||||
<% memos.each do |topic| %>
|
||||
<table class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
|
||||
<%= image_tag('../images/avatars/User/0', :class => "avatar") unless topic.author%> </td>
|
||||
<td>
|
||||
<table width="630px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
||||
<% if topic.url.nil? || topic.url == '' %>
|
||||
<%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %>
|
||||
<% else %>
|
||||
<%= link_to h(topic.subject), topic.url, :target => '_blank' %>
|
||||
<% end %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回帖</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">关注</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">浏览</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_description"><%= topic.short_content(70) %> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to topic.topic_resource, topic.url, :target => '_blank' %>
|
||||
</span></td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<% end %>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @topic_pages, @topic_count %>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
|
@ -2,7 +2,7 @@
|
|||
<!--display the board-->
|
||||
|
||||
<div class="borad-topic-count" style="margin-top:10px">
|
||||
<span>共有 <%= link_to memos.count %> 个贴子 </span
|
||||
<span>共有 <%= link_to @topic_count %> 个贴子 </span>
|
||||
</div>
|
||||
<div style="padding-top: 10px">
|
||||
<% if memos.any? %>
|
||||
|
@ -18,12 +18,12 @@
|
|||
<% if topic.url.nil? || topic.url == '' %>
|
||||
<%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %>
|
||||
<% else %>
|
||||
<%= link_to h(topic.subject), topic.url %>
|
||||
<%= link_to h(topic.subject), topic.url, :target => '_blank' %>
|
||||
<% end %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回帖</td>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">关注</td>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">浏览</td>
|
||||
|
@ -51,17 +51,17 @@
|
|||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
<td><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<td align="left"><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
</span></td>
|
||||
<td align="left"><%= no_use_link(topic, User.current) %> </td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<%= javascript_include_tag "ichart.1.2.min" %>
|
||||
<%= stylesheet_link_tag "sec-analysis.css" %>
|
||||
<%= stylesheet_link_tag "buglist-ichart.css" %>
|
||||
<%= stylesheet_link_tag "buglist.css" %>
|
||||
|
||||
|
||||
<div class="mask">
|
||||
<div class="header2"></div>
|
||||
<div class="colleft">
|
||||
|
@ -20,33 +21,66 @@
|
|||
</div>
|
||||
|
||||
<div class="col2" style="margin-left:0px">
|
||||
<div style="margin-left:0px" > <span> <h1 style="fontsize:19px;color:orange;font-weight:900">项目安全态势 </h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多 >>", :controller => "open_source_projects",:action => "showmemo", :id => @open_source_project.id %></span></div>
|
||||
<div style="margin-left:0px" > <span> <h1 style="fontsize:19px;color:orange;font-weight:900">项目安全态势 </h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多 >>", :controller => "open_source_projects",:action => "showbug", :id => @open_source_project.id %></span></div>
|
||||
|
||||
<% if @open_source_project.id ==42 then %>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<img src="/images/version_marker.png" alt="Tags">
|
||||
</span>
|
||||
<span class="tag_fouse">聚焦:</span>
|
||||
<div id="tag">栈溢出</div>
|
||||
<div id="tag">远程权限</div>
|
||||
<div id="tag">框架安全</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% elsif @open_source_project.id ==70 then %>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<img src="/images/version_marker.png" alt="Tags">
|
||||
</span>
|
||||
<span class="tag_fouse">聚焦:</span>
|
||||
<div id="tag">Kernel安全</div>
|
||||
<div id="tag">函数漏洞</div>
|
||||
<div id="tag">ping_init_sock()</div>
|
||||
</div>
|
||||
|
||||
<% elsif @open_source_project.id ==17 then %>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<img src="/images/version_marker.png" alt="Tags">
|
||||
</span>
|
||||
<span class="tag_fouse">聚焦:</span>
|
||||
<div id="tag">Heartblood</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 if %>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="fixed"></div>
|
||||
<div class="li_list" style="margin-top:10px;margin-left:10px">
|
||||
<ul style="list-style-type: square;">
|
||||
<% @bugs.each do |bug| %>
|
||||
<li><span class="li_time">>[<%= show_description(bug, open_source_project) %>]</span><%= link_to bug.subject, bug.url %></li>
|
||||
<li><span class="li_time">>[<%= show_description(bug, open_source_project) %>]</span><%= link_to bug.subject, bug.url, :target => '_blank' %></li>
|
||||
<% end %>
|
||||
|
||||
<!-- <li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62261" title="Cobbler 2.4.x - 2.6.x 本地文件包含">Cobbler 2.4.x - 2.6.x 本地文件包含</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62260" title="Ruby OpenSSL CA私钥伪造漏洞">Ruby OpenSSL CA私钥伪造漏洞</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">>[远程溢出漏洞]</span><a href="/vuldb/ssvid-62259" title="Adobe Flash Player 整数堆栈下溢远程命令执行">Adobe Flash Player 远程命令执行</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">14-05-07</span><a href="/vuldb/ssvid-62258" title="PHPDISK phpdisk_del_process.php SQL注入漏洞">PHPDISK phpdisk_del_process.php SQL注入漏洞</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
|
||||
|
||||
<!-- <li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62248" title="Eucalyptus Web Services拒绝服务漏洞">Eucalyptus Web Services</a></li> -->
|
||||
|
||||
<!-- <li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62245" title="Watchguard Fireware XTM OpenSSL TLS心跳信息泄漏漏洞"> Fireware XTM OpenSSL TLS</a></li> -->
|
||||
|
||||
<!-- <li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62244" title="SAP Sybase SQL Anywhere OpenSSL TLS泄漏漏洞">Sybase SQL Anywhere OpenSSL TLS</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -61,8 +95,6 @@
|
|||
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var data = [
|
||||
{
|
||||
name :'',
|
||||
|
@ -127,7 +159,7 @@
|
|||
parseText:function(tip,name,value,text,i){
|
||||
return name+"漏洞数:"+value;
|
||||
}
|
||||
} ,
|
||||
}
|
||||
|
||||
},
|
||||
tipMocker:function(tips,i){
|
||||
|
@ -144,17 +176,6 @@
|
|||
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
|
||||
"</div>"+tips.join("<br/>");
|
||||
},
|
||||
|
||||
// legend : {
|
||||
// enable : true,
|
||||
// row:1,//设置在一行上显示,与column配合使用
|
||||
// column : 'max',
|
||||
// valign:'top',
|
||||
// sign:'bar',
|
||||
// background_color:null,//设置透明背景
|
||||
// offsetx:-80,//设置x轴偏移,满足位置需要
|
||||
// border : true
|
||||
// },
|
||||
crosshair:{
|
||||
enable:true, //十字交叉线
|
||||
line_color:'#62bce9'
|
||||
|
@ -194,8 +215,7 @@
|
|||
start_scale:0,
|
||||
scale_space:50,
|
||||
end_scale:70,
|
||||
scale_color:'#9f9f9f',
|
||||
// label : {color:'#ffffff',fontsize:11},
|
||||
scale_color:'#9f9f9f'
|
||||
|
||||
},{
|
||||
position:'bottom',
|
||||
|
@ -203,35 +223,10 @@
|
|||
}]
|
||||
}
|
||||
});
|
||||
//开始画图
|
||||
|
||||
/**
|
||||
*自定义组件,画平均线。
|
||||
*/
|
||||
// line.plugin(new iChart.Custom({
|
||||
// drawFn:function(){
|
||||
// /**
|
||||
// *计算平均值的高度(坐标Y值)
|
||||
// *计算高度还不会! 会划线了!
|
||||
// */
|
||||
// // var avg = line.total/5,
|
||||
// // coo = line.getCoordinate(),
|
||||
// // x = coo.get('originx'),
|
||||
// // W = coo.width,
|
||||
// // S = coo.getScale('left'),
|
||||
// // H = coo.height,
|
||||
// // h = (avg - S.start) * H / S.distance,
|
||||
// // y = line.y + H - h;
|
||||
// line.target.line(28,97,400,97,2,'#b32c0d')
|
||||
// .textAlign('start')
|
||||
// .textBaseline('middle')
|
||||
// .textFont('600 12px Verdana');
|
||||
// }
|
||||
// }));
|
||||
line.draw();
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<!--我是分割线1===================================================================================================!-->
|
||||
|
@ -282,10 +277,7 @@
|
|||
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var data = [
|
||||
var data = [
|
||||
{
|
||||
name : '',
|
||||
value:flow,
|
||||
|
@ -297,16 +289,9 @@
|
|||
|
||||
//创建x轴标签文本
|
||||
var date = new Date()
|
||||
|
||||
var labels = [];
|
||||
/* labels.push(date.getFullYear()-2);
|
||||
labels.push(date.getFullYear()-1);
|
||||
labels.push(date.getFullYear());
|
||||
labels.push(date.getFullYear()+1);*/
|
||||
|
||||
labels=["2012","","","","","","","","","","","","2013","","","","","","","","","","","","2014","","","",""];
|
||||
|
||||
|
||||
var line = new iChart.LineBasic2D({
|
||||
render : 'canvasDiv2',
|
||||
data: data,
|
||||
|
@ -352,7 +337,7 @@
|
|||
parseText:function(tip,name,value,text,i){
|
||||
return name+"帖子数:"+value+"万";
|
||||
}
|
||||
} ,
|
||||
}
|
||||
},
|
||||
|
||||
tipMocker:function(tips,i){
|
||||
|
@ -378,10 +363,9 @@
|
|||
label:false, //是否显示数值
|
||||
// hollow_inside:false,
|
||||
smooth : true,//平滑曲线
|
||||
point_size:2, // 焦点大小
|
||||
point_size:2 // 焦点大小
|
||||
// point_hollow : true,
|
||||
|
||||
|
||||
},
|
||||
coordinate:{
|
||||
width:225, // 图表大小
|
||||
|
@ -404,7 +388,7 @@
|
|||
start_scale:0,
|
||||
scale_space:50,
|
||||
end_scale:70,
|
||||
scale_color:'#9f9f9f',
|
||||
scale_color:'#9f9f9f'
|
||||
// label : {color:'#ffffff',fontsize:11},
|
||||
|
||||
},{
|
||||
|
@ -435,11 +419,11 @@
|
|||
<td>
|
||||
<table width="630px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), topic.url %></td>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), topic.url, :target => '_blank' %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回帖</td>
|
||||
|
@ -449,7 +433,7 @@
|
|||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">关注</td>
|
||||
|
@ -459,7 +443,7 @@
|
|||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(open_source_project, topic) %></td>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">浏览</td>
|
||||
|
@ -467,17 +451,17 @@
|
|||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
<td><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%#= authoring topic.created_at, topic.author %>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"><%=user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
|
||||
</span></td>
|
||||
<td align="left"><%= no_use_link(topic, User.current) %> </td>
|
||||
<td colspan="3" align="center"><%= no_use_link(topic, User.current) %> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
<!-- added by fq -->
|
||||
|
||||
|
||||
|
||||
<div style="width: 940px">
|
||||
|
||||
<div class="borad-topic-count" style="margin-top:10px; width: 600px">
|
||||
<span>共有 <%= link_to @bug_count %> 个安全贴子 </span>
|
||||
</div>
|
||||
<div style="padding-top: 10px ;width: 940px">
|
||||
<% if @bugs.any? %>
|
||||
<% @bugs.each do |bug| %>
|
||||
<% topic = bug.bug %>
|
||||
<table style="width: 940px" class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
|
||||
<%= image_tag('../images/avatars/User/0', :class => "avatar") unless topic.author%> </td>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td valign="top" width="700px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
||||
<% if topic.url.nil? || topic.url == '' %>
|
||||
<%= link_to h(topic.subject), open_source_project_relative_memo_path(bug.open_source_project, topic) %>
|
||||
<% else %>
|
||||
<%= link_to h(topic.subject), topic.url, :target => '_blank' %>
|
||||
<% end %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回帖</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">关注</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">浏览</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_description"> <%= topic.short_content(100) %></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to topic.topic_resource, topic.url, :target => '_blank' %>
|
||||
</span></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<% end %>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @bug_pages, @bug_count %>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%#= render :partial => 'open_source_projects/show_memo', :locals => {:memos => @memos, :open_source_project => @open_source_project} %>
|
||||
</div>
|
|
@ -48,7 +48,7 @@
|
|||
background-position: -266px 3px;
|
||||
}
|
||||
.navigation .icon-search, .navigation .nav-pill-cancle, .navigation .nav-switch-icon, .navigation .nav-topbar .topbar-search .topbar-submit, .navigation .nav-topbar-arror {
|
||||
background: url();
|
||||
/*background: url()*/
|
||||
}
|
||||
.nav-switch-icon {
|
||||
width: 15px;
|
||||
|
@ -129,8 +129,6 @@ li {
|
|||
.nav-search-con{
|
||||
padding-top: 7px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<%= javascript_include_tag "ichart.1.2.min" %>
|
||||
<%= stylesheet_link_tag "buglist-div-use.css" %>
|
||||
|
@ -146,29 +144,13 @@ li {
|
|||
</div>
|
||||
|
||||
<div class="col2">
|
||||
<div> <span> <h1 style="fontsize:19px">软件安全漏洞 </h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><a href="#" hover="text-decoration: underline;" >More >></span></a></div>
|
||||
<div> <span> <h1 style="fontsize:19px">软件安全态势</h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to '更多 >>', allbug_open_source_projects_path %></span></div>
|
||||
<div class="fixed"></div>
|
||||
<div id ="buglist" class="li_list" style="margin-top:10px;margin-left:10px">
|
||||
<div class="li_list" style="margin-top:10px;margin-left:10px">
|
||||
<ul style="list-style-type: square;">
|
||||
<li><span class="li_time">[DDoS漏洞]</span><a href="/vuldb/ssvid-62261" title="Cobbler 2.4.x - 2.6.x 本地文件包含">Cobbler 2.4.x - 2.6.x 本地文件包含</a></li>
|
||||
|
||||
<li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62260" title="Ruby OpenSSL CA私钥伪造漏洞">Ruby OpenSSL CA私钥伪造漏洞</a></li>
|
||||
|
||||
<li style="color: red"><span class="li_time">[远程溢出漏洞]</span><a href="/vuldb/ssvid-62259" title="Adobe Flash Player 整数堆栈下溢远程命令执行">Adobe Flash Player 整数堆栈下溢远程命令执行</a></li>
|
||||
|
||||
<!-- <li><span class="li_time">14-05-07</span><a href="/vuldb/ssvid-62258" title="PHPDISK phpdisk_del_process.php SQL注入漏洞">PHPDISK phpdisk_del_process.php SQL注入漏洞</a></li> -->
|
||||
|
||||
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
|
||||
|
||||
<li ><span class="li_time">[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM 拒绝服务漏洞</a></li>
|
||||
|
||||
<li><span class="li_time">[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入以及远程代码执行</a></li>
|
||||
|
||||
<li><span class="li_time">[DDoS漏洞]</span><a href="/vuldb/ssvid-62248" title="Eucalyptus Web Services拒绝服务漏洞">Eucalyptus Web Services拒绝服务漏洞</a></li>
|
||||
|
||||
<li ><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62245" title="Watchguard Fireware XTM OpenSSL TLS心跳信息泄漏漏洞">Watchguard Fireware XTM OpenSSL TLS心跳...</a></li>
|
||||
|
||||
<li style="color: red"><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62244" title="SAP Sybase SQL Anywhere OpenSSL TLS泄漏漏洞">SAP Sybase SQL Anywhere OpenSSL TLS</a></li>
|
||||
<% @bugs.each do |bug| %>
|
||||
<li style="width:400px;"><span class="li_time">[<%= show_description_of_bug(bug) %>]</span><%= link_to bug.bug.subject, bug.bug.url, :target => '_blank' %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -236,7 +218,7 @@ li {
|
|||
parseText:function(tip,name,value,text,i){
|
||||
return name+"漏洞数:"+value;
|
||||
}
|
||||
} ,
|
||||
}
|
||||
},
|
||||
tipMocker:function(tips,i){
|
||||
var index;
|
||||
|
@ -272,7 +254,7 @@ li {
|
|||
label:false, //是否显示数值
|
||||
// hollow_inside:false,
|
||||
smooth : true,//平滑曲线
|
||||
point_size:2, // 焦点大小
|
||||
point_size:2 // 焦点大小
|
||||
// point_hollow : true,
|
||||
|
||||
|
||||
|
@ -298,7 +280,7 @@ li {
|
|||
start_scale:0,
|
||||
scale_space:50,
|
||||
end_scale:70,
|
||||
scale_color:'#9f9f9f',
|
||||
scale_color:'#9f9f9f'
|
||||
// label : {color:'#ffffff',fontsize:11},
|
||||
|
||||
},{
|
||||
|
@ -417,7 +399,7 @@ line.target.line(28,97,400,97,2,'#b32c0d')
|
|||
</div>
|
||||
<div class="nav-flexbox last">
|
||||
<div class="nav-category">
|
||||
<h4 title="上市时间">
|
||||
<h4 title="上市时间"> </h4>
|
||||
<div class="nav-category-wrap ">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<!--modified by huang-->
|
||||
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
||||
<span>
|
||||
<%= link_to l(:label_memo_new_from_forum), new_open_source_project_relative_memo_path(@open_source_project), :class => 'icon icon-add',
|
||||
<%#= link_to l(:label_memo_new_from_forum), new_open_source_project_relative_memo_path(@open_source_project), :class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
<!-- added by fq -->
|
||||
<div id="add-memo" class='lz' style="display: none; padding: 20px;">
|
||||
<h3><%=l(:label_memo_new)%></h3>
|
||||
<% if User.current.logged? %>
|
||||
<%= labelled_form_for(@memo, :url => open_source_project_relative_memos_path(@open_source_project), :html => {:multipart => true} ) do |f| %>
|
||||
<% if @memo.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @memo.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="actions" style="max-width:680px">
|
||||
<p><%= f.text_field :subject, :required => true%></p>
|
||||
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
|
||||
<br/>
|
||||
<p>
|
||||
<%#= l(:label_attachment_plural) %><br />
|
||||
<%#= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
</p>
|
||||
<%= f.submit :value => l(:label_memo_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="contextual-borad">
|
||||
<%#= link_to(
|
||||
image_tag('edit.png')+l(:label_forum_edit),
|
||||
{:action => 'edit', :id => @forum},
|
||||
:method => 'get',
|
||||
:title => l(:button_edit)
|
||||
) if @forum.editable_by?(User.current) %>
|
||||
<%#= link_to(
|
||||
image_tag('delete.png')+'删除讨论区',
|
||||
{:action => 'destroy', :id => @forum},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if @forum.destroyable_by?(User.current) %>
|
||||
</div>
|
||||
<%= render :partial => 'open_source_projects/show_bug', :locals => {:memos => @memos, :open_source_project => @open_source_project} %>
|
||||
</div>
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
|
||||
<fieldset style="width: 500px">
|
||||
<legend>上传作品软件包和作品截图</legend>
|
||||
<legend><%=l(:label_upload_softworkpacket_photo)%></legend>
|
||||
<%= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
<div style="float: left; width: 600px; padding-top: 6px; margin-left: 8px"><%= softapplication.description.truncate(95, omission: '...') %></div>
|
||||
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; line-height: 0.5em ">
|
||||
<%contest = softapplication.contests.first%>
|
||||
<p>所属竞赛:<%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p>所属类别:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
||||
<p>系统支持:<%= softapplication.android_min_version_available %></p>
|
||||
<p><%=l(:label_attendingcontestwork_belongs_contest)%>:<%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p><%=l(:label_attendingcontestwork_belongs_type)%>:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
||||
<p><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= softapplication.android_min_version_available %></p>
|
||||
</div>
|
||||
<div style="padding-left: 53px">
|
||||
<span>开发人员:<%= softapplication.application_developers %></span>
|
||||
<span style="padding-left: 50px">发布时间:<%=format_time softapplication.created_at %></span>
|
||||
<span><%=l(:label_attendingcontestwork_developers)%>:<%= softapplication.application_developers %></span>
|
||||
<span style="padding-left: 50px"><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time softapplication.created_at %></span>
|
||||
</div>
|
||||
<div style="border-left: 1px solid #d9d8d8; border-bottom: 1px solid #d9d8d8; margin-left: 50px; padding-bottom: 10px; margin-bottom: 20px; width: 66%"></div>
|
||||
<div class="underline-contests_one" style="margin-top: -7px"></div>
|
||||
|
|
|
@ -16,38 +16,35 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all">所属类别:<%= @softapplication.app_type_name %></td>
|
||||
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_belongs_type)%>:<%= @softapplication.app_type_name %></td>
|
||||
<% contest = @softapplication.contests.first %>
|
||||
<td style="width: 240px; word-wrap: break-word; word-break: break-all">所属竞赛:<%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %></td>
|
||||
<td style="width: 240px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_belongs_contest)%>:<%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">发布人员:<%= @softapplication.user.name %></td>
|
||||
<td>系统支持:<%= @softapplication.android_min_version_available %></td>
|
||||
<td style="padding-left: 40px"><%=l(:label_attendingcontestwork_release_person)%>:<%= @softapplication.user.name %></td>
|
||||
<td><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= @softapplication.android_min_version_available %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<span>作品下载:</span>
|
||||
<span><%=l(:label_attendingcontestwork_download)%>:</span>
|
||||
<span>
|
||||
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>开发人员:<%= @softapplication.application_developers %></td>
|
||||
<td><%=l(:label_attendingcontestwork_developers)%>:<%= @softapplication.application_developers %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">平均评分: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
|
||||
<td>发布时间:<%=format_time @softapplication.created_at %></td>
|
||||
<td style="padding-left: 40px"><%=l(:label_attendingcontestwork_average_scores)%>: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
|
||||
<td><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time @softapplication.created_at %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<% if (@softapplication.deposit_project != "nil" && @softapplication.deposit_project != "") %>
|
||||
<%#= textilizable ("托管项目: " + @project.name) %>
|
||||
托管项目:<%= link_to "#@project", project_path(@project.id) %>
|
||||
<% end %>
|
||||
<% if @project %>
|
||||
<%=l(:label_attendingcontestwork_deposit_project)%>:<%= link_to "#@project", project_path(@project) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -56,7 +53,7 @@
|
|||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong>
|
||||
<div style="font-size: 15px;">作品简介:</div>
|
||||
<div style="font-size: 15px;"><%=l(:label_work_description)%>:</div>
|
||||
</strong>
|
||||
|
||||
<div style="padding-top: 5px"><%= @softapplication.description %></div>
|
||||
|
@ -64,11 +61,11 @@
|
|||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<div style="font-size: 15px;"><strong>作品得分:</strong></div>
|
||||
<div style="font-size: 15px;"><strong><%=l(:label_work_scores)%>:</strong></div>
|
||||
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count %></div> -->
|
||||
<div style="overflow: hidden">
|
||||
<div style="margin-left: 15%; float: left">
|
||||
<div style="padding-left: 45px; padding-bottom: 5px">得分比例</div>
|
||||
<div style="padding-left: 45px; padding-bottom: 5px"><%=l(:label_work_scores_proportion)%></div>
|
||||
<div>
|
||||
<% 100.step(20, -20) do |star| %>
|
||||
<div data-kls="Softapplication" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled" style="height: 20px; width: 115px; overflow: hidden; z-index: 1; position: relative;">
|
||||
|
@ -83,14 +80,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="float: left; padding-left: 100px; padding-top:35px " align="center">
|
||||
<div>最终得分</div>
|
||||
<div style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>
|
||||
分
|
||||
</div>
|
||||
<div><%=l(:label_final_scores)%></div>
|
||||
<div style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>分</div>
|
||||
<div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
|
||||
</div>
|
||||
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center">
|
||||
<div>打分总人数</div>
|
||||
<div><%=l(:label_rating_person_amount)%></div>
|
||||
<div style="padding-top: 1px; font-size: 25px; color: blue;">
|
||||
<strong><%= @softapplication.raters(:quality).count %></strong></div>
|
||||
</div>
|
||||
|
@ -100,7 +95,7 @@
|
|||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong>
|
||||
<div style="font-size: 15px">作品截图:</div>
|
||||
<div style="font-size: 15px"><%=l(:label_work_photo)%>:</div>
|
||||
</strong>
|
||||
|
||||
<div class="softapplication-img" >
|
||||
|
@ -119,10 +114,10 @@
|
|||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: 50px">
|
||||
<div style="font-size: 15px"><strong>作品评论:</strong></div>
|
||||
<div style="font-size: 15px"><strong><%=l(:label_work_comment)%>:</strong></div>
|
||||
<% if (User.current.logged? and User.current.id != @softapplication.user_id) %>
|
||||
<div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
|
||||
<div style="padding-left: 210px"><%=l(:label_work_rating)%>: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(<%=l(:label_attendingcontestwork_sorting_intimation)%>)</span></div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_new_forum_topics(11).each do |topic|%>
|
||||
<li class="message-brief-intro" style="min-height: 60px; line-height:2em; ">
|
||||
<li class="message-brief-intro" style="height: auto; line-height:2em; padding-bottom: 1px ">
|
||||
<div style="display: inline-block; width: 100%;">
|
||||
<span class="memo_activity text_nowrap" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
|
||||
|
|
|
@ -1728,6 +1728,8 @@ zh:
|
|||
label_first_reward: 一等奖
|
||||
label_second_reward: 二等奖
|
||||
label_third_reward: 三等奖
|
||||
label_fourth_reward: 四等奖
|
||||
label_fifth_reward: 五等奖
|
||||
label_excellence_reward: 优秀奖
|
||||
label_comfort_reward: 入围奖
|
||||
label_course_settings: 课程设置
|
||||
|
@ -1884,8 +1886,14 @@ zh:
|
|||
label_work_name: 作品名称
|
||||
label_softapplication_description: 应用简介
|
||||
label_work_description: 作品简介
|
||||
label_work_scores: 作品得分
|
||||
label_work_rating: 评分
|
||||
label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主!
|
||||
label_work_scores_proportion: 得分比例
|
||||
label_softapplication_type: 应用分类
|
||||
label_work_type: 作品分类
|
||||
label_work_photo: 作品截图
|
||||
label_work_comment: 作品评论
|
||||
label_softapplication_version_available: 适配版本
|
||||
label_running_platform: 运行平台
|
||||
label_softapplication_developer: 上传人员
|
||||
|
@ -1900,6 +1908,8 @@ zh:
|
|||
label_button_ok: 确定
|
||||
label_tags_contest: 竞赛标签
|
||||
label_tags_contest: 竞赛名称
|
||||
label_final_scores: 最终得分
|
||||
label_rating_person_amount: 打分总人数
|
||||
label_tags_contest_description: 竞赛描述
|
||||
label_release_add_contest_succeed: 该应用发布并添加成功.
|
||||
label_add_contest_succeed_fail: 添加失败,该应用已参赛.
|
||||
|
@ -1910,6 +1920,7 @@ zh:
|
|||
label_softapplication_list: 应用列表
|
||||
label_contest_work_list: 参赛作品列表
|
||||
label_attending_contest: 我要参赛
|
||||
label_contest_notification: 竞赛通知
|
||||
|
||||
label_coursefile_sharingarea: 课程资源共享区
|
||||
label_sort_by_activity: 按动态数排序
|
||||
|
@ -1925,9 +1936,39 @@ zh:
|
|||
label_contest_delete: 删除竞赛
|
||||
label_noawards_current: 暂未评奖
|
||||
|
||||
label_softapplication: 应用软件
|
||||
label_attending_contest: 参加竞赛
|
||||
label_new_attendingcontest_work: 新建参赛作品
|
||||
label_workname_lengthlimit: 25个汉字以内
|
||||
label_workdescription_lengthlimit: 125个汉字以内
|
||||
label_please_input_password: 请输入竞赛密码
|
||||
label_please_select_project: 请选择项目
|
||||
label_upload_softworkpacket_photo: 上传作品软件包和作品截图
|
||||
label_reward: 评奖
|
||||
label_please_select_contestingsoftapplication: 请选择参赛应用
|
||||
label_attendingcontest_time: 参赛时间
|
||||
label_attendingcontest_spoksman: 参赛代表
|
||||
label_wellmeaning_intimation_contentone: 温馨提示:如果您准备参加竞赛,请点击下面的"新建参赛作品"!
|
||||
label_wellmeaning_intimation_contenttwo: 若您已完成开发,且只希望发布您的作品,“托管项目”一项可以不选;
|
||||
label_wellmeaning_intimation_contentthree: 若您希望托管竞赛数据和代码以及保留开发和提交代码的轨迹,请从“托管项目”中选择一项您已创建好的项目作为该参赛作品的托管项目,若您还没有创建项目,请点击右边的“创建项目”,然后回到本页再选择。
|
||||
|
||||
notice_account_updated: 帐号更新成功
|
||||
notice_attendingcontest_work_successfully_created: 恭喜您,参赛作品创建成功!
|
||||
notice_softapplication_was_successfully_updated: 恭喜您,参赛作品更新成功!
|
||||
|
||||
label_attendingcontestwork_belongs_contest: 所属竞赛
|
||||
label_attendingcontestwork_belongs_type: 所属类别
|
||||
label_attendingcontestwork_release_person: 发布人员
|
||||
label_attendingcontestwork_adaptive_system: 系统支持
|
||||
label_attendingcontestwork_download: 作品下载
|
||||
label_attendingcontestwork_developers: 开发人员
|
||||
label_attendingcontestwork_average_scores: 平均评分
|
||||
label_attendingcontestwork_release_time: 发布时间
|
||||
label_attendingcontestwork_deposit_project: 托管项目
|
||||
label_attendingcontestwork_sorting_intimation: 您可以重新打分,打分结果以最后一次打分为主!
|
||||
|
||||
#end
|
||||
|
||||
# ajax异步验证
|
||||
modal_valid_passing: 可以使用
|
||||
label_bug: 漏洞
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
RedmineApp::Application.routes.draw do
|
||||
resources :homework_users
|
||||
|
||||
|
||||
resources :no_uses
|
||||
delete 'no_uses', :to => 'no_uses#delete'
|
||||
|
||||
resources :apply_project_masters
|
||||
resources :apply_project_masters
|
||||
delete 'apply_project_masters', :to => 'apply_project_masters#delete'
|
||||
|
||||
resources :homework_attach do
|
||||
|
@ -36,17 +35,19 @@ RedmineApp::Application.routes.draw do
|
|||
collection do
|
||||
match 'search', via: [:get, :post]
|
||||
match 'remove_condition', via: [:get, :post]
|
||||
match 'allbug', via: [:get, :post]
|
||||
end
|
||||
resources :relative_memos
|
||||
member do
|
||||
match 'master_apply', via: [:get, :post]
|
||||
match 'accept_master_apply', via: [:get, :post]
|
||||
match 'refuse_master_apply', via: [:get, :post]
|
||||
match 'showmemo', via: [:get, :post]
|
||||
match 'showbug', via: [:get, :post]
|
||||
end
|
||||
end
|
||||
mount SeemsRateable::Engine => '/rateable', :as => :rateable
|
||||
|
||||
|
||||
namespace :zipdown do
|
||||
match 'assort'
|
||||
end
|
||||
|
@ -82,6 +83,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'show_project' , via: :get
|
||||
match 'show_softapplication' , via: :get
|
||||
match 'show_attendingcontest' , via: :get
|
||||
match 'show_notification' , via: :get
|
||||
match 'show_participator' , via: :get
|
||||
match 'set_reward_project' , via: [:get, :post]
|
||||
match 'set_reward_softapplication' , via: [:get, :post]
|
||||
|
@ -324,7 +326,7 @@ RedmineApp::Application.routes.draw do
|
|||
resources :files, :only => [:index, :new, :create] do
|
||||
collection do
|
||||
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
|
||||
|
||||
|
@ -483,8 +485,8 @@ RedmineApp::Application.routes.draw do
|
|||
collection do
|
||||
match "updateType" , via: [:get, :post]
|
||||
match "renderTag" , via: [:get, :post]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resources :groups do
|
||||
member do
|
||||
|
@ -624,10 +626,13 @@ RedmineApp::Application.routes.draw do
|
|||
match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond'
|
||||
match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403
|
||||
|
||||
|
||||
########################
|
||||
##added by wen##########
|
||||
#######confusing########
|
||||
get 'welcome/search', to: 'welcome#search'
|
||||
get 'school/index', to: 'school#index'
|
||||
get 'course/:school_id', to: 'welcome#course'
|
||||
get 'course/:school_id', to: 'welcome#course'
|
||||
post 'school/get_options/:province', :to => 'school#get_options'
|
||||
get 'school/get_options/:province', :to => 'school#get_options'
|
||||
|
||||
|
@ -666,5 +671,4 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
end
|
||||
get ':controller(/:action(/:id))'
|
||||
end
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
class CreateProjectingSoftapplications < ActiveRecord::Migration
|
||||
def up
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddProjectToSoftapplication < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :softapplications, :project_id, :integer
|
||||
end
|
||||
end
|
1074
db/schema.rb.orig
1074
db/schema.rb.orig
File diff suppressed because it is too large
Load Diff
|
@ -292,6 +292,7 @@ Redmine::MenuManager.map :contest_menu do |menu|
|
|||
#menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
||||
#menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
|
||||
menu.push :attendingcontest, {:controller => 'contests', :action => 'show_attendingcontest'}, :caption => :label_attending_contest
|
||||
menu.push :contestnotification, {:controller => 'contests', :action => 'show_notification'}, :caption => :label_contest_notification
|
||||
# menu.push :attendingcontest, :show_attendingcontest_contest_path, :caption => :label_attendin,g_contest
|
||||
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
||||
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
margin: 0px 0 0 0;
|
||||
width: 970px;
|
||||
|
||||
|
||||
}
|
||||
.header2{
|
||||
float: left;
|
||||
|
@ -15,6 +16,7 @@
|
|||
width: 100%;
|
||||
right: 50%;
|
||||
background-color: #000000
|
||||
|
||||
}
|
||||
.col1{
|
||||
position: relative;
|
||||
|
@ -28,14 +30,36 @@
|
|||
position: relative;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
width: 470px;
|
||||
width: 440px;
|
||||
left: 3%;
|
||||
|
||||
}
|
||||
|
||||
a:hover, a:active {
|
||||
color: #c61a1a;
|
||||
text-decoration: underline;
|
||||
|
||||
}
|
||||
|
||||
#tag {
|
||||
background: url("../images/issue_tag.png") no-repeat scroll right -19px rgba(0, 0, 0, 0);
|
||||
border-radius: 3px;
|
||||
color: #3A587D !important;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
margin: 3px;
|
||||
padding: 1px 4px 2px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#buglist
|
||||
{
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
.li_list {
|
||||
clear:both;
|
||||
padding:0 0 0 0px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,6 +14,7 @@ padding:0 7px 0 0;
|
|||
|
||||
ol.linenums {
|
||||
margin:0 0 0 20px;
|
||||
|
||||
}
|
||||
|
||||
ol.linenums li {
|
||||
|
@ -31,6 +33,7 @@ padding:0;
|
|||
background-color:#105DB5;
|
||||
color:#FFF;
|
||||
text-decoration:none;
|
||||
|
||||
}
|
||||
|
||||
.li_list li,.na_list li {
|
||||
|
@ -38,6 +41,12 @@ clear:both;
|
|||
height:18px;
|
||||
list-style-type:square;
|
||||
padding:2px;
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,3 +62,11 @@ font-size:18px;
|
|||
div.pages .break,.created a {
|
||||
color:#999;
|
||||
}
|
||||
|
||||
.tag_fouse {
|
||||
font-family: "Microsoft YaHei";
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 3px;
|
||||
padding-top: 3px;
|
||||
}
|
Loading…
Reference in New Issue