Merge branch 'competition' of 10.0.47.245:/home/trustie2 into develop
Conflicts: app/views/softapplications/show.html.erb db/schema.rb
This commit is contained in:
commit
e52886cf46
|
@ -293,7 +293,7 @@ class ContestsController < ApplicationController
|
|||
|
||||
###我要参赛
|
||||
def show_attendingcontest
|
||||
##取出参赛项目
|
||||
##取出参赛项目--项目列表
|
||||
@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
@option = []
|
||||
# @contesting_project_count = @contesting_project_all.count
|
||||
|
@ -333,7 +333,7 @@ class ContestsController < ApplicationController
|
|||
@contesting_project = @temp.sort {|a,b| b.project.project_status.grade <=> a.project.project_status.grade}
|
||||
end
|
||||
end
|
||||
##取出参赛应用
|
||||
##取出参赛应用 --应用列表
|
||||
@softapplication = Softapplication.all
|
||||
@contesting_softapplication = @contest.contesting_softapplications.
|
||||
joins("LEFT JOIN softapplications ON contesting_softapplications.softapplication_id=softapplications.id").
|
||||
|
|
|
@ -505,6 +505,7 @@ class ProjectsController < ApplicationController
|
|||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@project.user_id = User.current.id
|
||||
@project.safe_attributes = params[:project]
|
||||
if @course_tag == '1'
|
||||
@project.identifier = @course.extra
|
||||
|
|
|
@ -47,6 +47,7 @@ class SoftapplicationsController < ApplicationController
|
|||
|
||||
def show
|
||||
@softapplication = Softapplication.find(params[:id])
|
||||
@project = Project.find_by_identifier(@softapplication.deposit_project)
|
||||
# 打分统计
|
||||
stars_reates = @softapplication.
|
||||
rates(:quality)
|
||||
|
@ -87,6 +88,10 @@ class SoftapplicationsController < ApplicationController
|
|||
def new
|
||||
@softapplication = Softapplication.new
|
||||
|
||||
#添加当前用户创建过的项目作为托管项目(下拉项目列表)
|
||||
project = Project.find(params[:user_id])
|
||||
#end
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.json { render json: @softapplication }
|
||||
|
@ -96,6 +101,21 @@ class SoftapplicationsController < ApplicationController
|
|||
# GET /softapplications/1/edit
|
||||
def edit
|
||||
@softapplication = Softapplication.find(params[:id])
|
||||
|
||||
@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
@option = []
|
||||
# @contesting_project_count = @contesting_project_all.count
|
||||
# @contesting_project_pages = Paginator.new @contesting_project_count, per_page_option, params['page']
|
||||
@membership.each do |membership|
|
||||
unless(membership.project.project_type==1)
|
||||
membership.member_roles.each{|role|
|
||||
if(role.role_id == 3)
|
||||
@option << membership.project
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# POST /softapplications
|
||||
|
@ -122,12 +142,14 @@ class SoftapplicationsController < ApplicationController
|
|||
def create
|
||||
@softapplication = Softapplication.new(params[:softapplication])
|
||||
@softapplication.user = User.current
|
||||
@softapplication.deposit_project = 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)
|
||||
format.js
|
||||
format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_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
|
||||
format.js { render status: 406 }
|
||||
|
@ -148,9 +170,10 @@ class SoftapplicationsController < ApplicationController
|
|||
# @softapplication = Softapplication.find(params[:id])
|
||||
@softapplication.attachments.map{|attach| attach.destroy }
|
||||
@softapplication.save_attachments(params[:attachments])
|
||||
@softapplication.deposit_project = params[:project]
|
||||
respond_to do |format|
|
||||
if @softapplication.update_attributes(params[:softapplication])
|
||||
format.html { redirect_to @softapplication, notice: 'Softapplication was successfully updated.' }
|
||||
format.html { redirect_to @softapplication, notice: l(:notice_softapplication_was_successfully_updated) }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
format.html { render action: "edit" }
|
||||
|
|
|
@ -741,6 +741,14 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
def select_option_helper option
|
||||
tmp = Hash.new
|
||||
tmp={"" => ""}
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
end
|
||||
tmp
|
||||
end
|
||||
# Redmine links
|
||||
#
|
||||
# Examples:
|
||||
|
|
|
@ -145,13 +145,13 @@ module BidsHelper
|
|||
people.include?(User.current)
|
||||
end
|
||||
|
||||
def select_option_helper option
|
||||
tmp = Hash.new
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
end
|
||||
tmp
|
||||
end
|
||||
# def select_option_helper option
|
||||
# tmp = Hash.new
|
||||
# option.each do |project|
|
||||
# tmp[project.name] = project.identifier
|
||||
# end
|
||||
# tmp
|
||||
# end
|
||||
|
||||
def can_delete_project_homework bind_project,current_user
|
||||
current_user.id == bind_project.user.id || current_user.admin
|
||||
|
|
|
@ -157,13 +157,14 @@ module ContestsHelper
|
|||
people.include?(User.current)
|
||||
end
|
||||
|
||||
def select_option_helper option
|
||||
tmp = Hash.new
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.identifier
|
||||
end
|
||||
tmp
|
||||
end
|
||||
# def select_option_helper option
|
||||
# tmp = Hash.new
|
||||
# tmp={"" => ""}
|
||||
# option.each do |project|
|
||||
# tmp[project.name] = project.identifier
|
||||
# end
|
||||
# tmp
|
||||
# end
|
||||
def select_option_app_helper options
|
||||
tmp = Hash.new
|
||||
options.each do |option|
|
||||
|
|
|
@ -13,6 +13,15 @@ module SoftapplicationsHelper
|
|||
content = content_tag('ul', content)
|
||||
content_tag('div', content, :class => "tabs")
|
||||
end
|
||||
|
||||
# def select_option_helper option
|
||||
# tmp = Hash.new
|
||||
# option.each do |project|
|
||||
# tmp[project.name] = project.identifier
|
||||
# end
|
||||
# tmp
|
||||
# end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -55,6 +55,8 @@ class Project < ActiveRecord::Base
|
|||
#added by xianbo for delete biding_project
|
||||
has_many :biding_projects, :dependent => :destroy
|
||||
has_many :contesting_projects, :dependent => :destroy
|
||||
has_many :projecting_softapplications, :dependent => :destroy
|
||||
has_many :softapplications, :through => :projecting_softapplications
|
||||
#ended by xianbo
|
||||
# added by fq
|
||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
class ProjectingSoftapplication < ActiveRecord::Base
|
||||
attr_accessible :project_id, :softapplication_id, :user_id
|
||||
|
||||
belongs_to :project
|
||||
belongs_to :softapplication
|
||||
belongs_to :user
|
||||
|
||||
|
||||
def self.create_softapplication_projecting(project_id, softapplication_id)
|
||||
self.create(:user_id => User.current.id, :project_id => project_id,
|
||||
:softapplication_id => softapplication_id)
|
||||
end
|
||||
|
||||
|
||||
end
|
|
@ -1,12 +1,14 @@
|
|||
class Softapplication < ActiveRecord::Base
|
||||
attr_accessible :android_min_version_available, :app_type_id, :app_type_name, :description, :name, :user_id, :contest_id, :application_developers, :deposit_project_url
|
||||
attr_accessible :android_min_version_available, :app_type_id, :app_type_name, :description, :name, :user_id, :contest_id, :application_developers, :deposit_project_url, :deposit_project
|
||||
acts_as_attachable
|
||||
seems_rateable :allow_update => true, :dimensions => :quality
|
||||
|
||||
|
||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||
has_many :contesting_softapplications, :dependent => :destroy
|
||||
has_many :projecting_softapplications, :dependent => :destroy
|
||||
belongs_to :user
|
||||
belongs_to :project
|
||||
has_many :contests, :through => :contesting_softapplications
|
||||
|
||||
def add_jour(user, notes, reference_user_id = 0, options = {})
|
||||
|
|
|
@ -87,6 +87,7 @@ class User < Principal
|
|||
has_many :biding_projects, :dependent => :destroy
|
||||
has_many :contesting_projects, :dependent => :destroy
|
||||
has_many :contesting_softapplications, :dependent => :destroy
|
||||
has_many :projecting_softapplications, :dependent => :destroy
|
||||
belongs_to :softapplication, :foreign_key => 'id', :dependent => :destroy
|
||||
##ended by xianbo
|
||||
|
||||
|
|
|
@ -59,14 +59,16 @@
|
|||
}
|
||||
|
||||
</script>
|
||||
|
||||
<%= render_flash_messages %>
|
||||
<!--参赛步骤-->
|
||||
<div style="padding-left: 17px; padding-bottom: 10px; color: grey">
|
||||
温馨提示:如果您准备参加竞赛,请点击下面的"新建参赛作品"!
|
||||
<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>
|
||||
<% if User.current.logged? %>
|
||||
|
||||
<div style="padding-bottom: 10px; line-height: 15px">
|
||||
<% 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>
|
||||
|
@ -78,16 +80,23 @@
|
|||
<span style="font-size: 12px; color: grey">(先点击“新建参赛作品”,然后刷新页面,再继续步骤2。)</span>
|
||||
</div> -->
|
||||
|
||||
</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>
|
||||
<% 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: 10px">
|
||||
<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 />
|
||||
|
@ -125,11 +134,19 @@
|
|||
<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 />
|
||||
|
||||
<fieldset style="width: 500px; padding-top: 10px">
|
||||
<legend>
|
||||
上传作品软件包和作品截图
|
||||
</legend>
|
||||
<%= render_flash_messages %>
|
||||
<%#= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
|
@ -138,9 +155,6 @@
|
|||
<br>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition)%>
|
||||
</p>
|
||||
<p style="font-size: 11px; color: red">
|
||||
<%= l(:label_updated_caution)%>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
</fieldset></br>
|
||||
|
@ -154,7 +168,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="underline-contests_three"></div>
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<fieldset class="contes-new-box">
|
||||
|
||||
<tr style="width:700px; margin-left: -10px">
|
||||
<span><%= l(:label_softapplication_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><%= l(:label_softapplication_name_condition)%></span>
|
||||
</tr></ br>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_version_available) %></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>
|
||||
|
||||
</tr></ br>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_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>
|
||||
|
||||
|
@ -39,9 +39,9 @@
|
|||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_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><%= l(:label_softapplication_description_condition)%></span>
|
||||
</tr></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
@ -54,8 +54,18 @@
|
|||
<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 => 'grayline3' %></span>
|
||||
<span><%#= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%></span>
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
<fieldset style="width: 500px">
|
||||
<legend>上传应用软件包和应用截图</legend>
|
||||
<legend>上传作品软件包和作品截图</legend>
|
||||
<%= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<!-- end -->
|
||||
<% else %>
|
||||
<div style="font-size: 14px;margin:10px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= l(:label_user_login_score_and_comment) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h3 style="font-size: 18px"><%= l(:label_edit_softapplication)%></h3>
|
||||
<h3 style="font-size: 18px"><%= l(:label_edit_work)%></h3>
|
||||
|
||||
<%= render partial: 'form', locals:{softapplication: @softapplication} %>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= render :partial => 'layouts/base_softapplication_top_content' %>
|
||||
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<tr>
|
||||
|
@ -36,15 +36,18 @@
|
|||
</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>发布时间:<%=format_time @softapplication.created_at %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<% unless @softapplication.deposit_project_url.nil? %>
|
||||
<%= textilizable ("托管项目网址: " + @softapplication.deposit_project_url) %>
|
||||
<% if (@softapplication.deposit_project != "nil" && @softapplication.deposit_project != "") %>
|
||||
<%#= textilizable ("托管项目: " + @project.name) %>
|
||||
托管项目:<%= link_to "#@project", project_path(@project.id) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
<%= render :partial => 'layouts/base_softapplication_top_content' %>
|
||||
|
||||
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="320">
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%" border="0">
|
||||
<tr style="font-size: 18px">
|
||||
<td colspan="2" valign="top"><strong><%= @softapplication.name %></strong></td>
|
||||
<td style="font-size: 15px; padding-left: 0px">
|
||||
<%= link_to '删除', softapplication_path(@softapplication), method: :delete, data: {confirm: '您确定要删除吗?'} if @softapplication.destroyable_by? User.current %>
|
||||
<%= link_to '编辑', edit_softapplication_path(@softapplication), method: :get if @softapplication.destroyable_by? User.current %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all">所属类别:<%= @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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">发布人员:<%= @softapplication.user.name %></td>
|
||||
<td>系统支持:<%= @softapplication.android_min_version_available %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<span>作品下载:</span>
|
||||
<span>
|
||||
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
||||
</span>
|
||||
<<<<<<< HEAD
|
||||
</td>
|
||||
=======
|
||||
</td>
|
||||
|
||||
<td>开发人员:<%= @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>
|
||||
</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 %>
|
||||
</td>
|
||||
</tr>
|
||||
>>>>>>> 2f709c92ba93d46c81adc49fac0d77584018a3fe
|
||||
|
||||
<td>开发人员:<%= @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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<% unless @softapplication.deposit_project_url.nil? %>
|
||||
<%= textilizable ("托管项目网址: " + @softapplication.deposit_project_url) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong>
|
||||
<div style="font-size: 15px;">作品简介:</div>
|
||||
</strong>
|
||||
|
||||
<div style="padding-top: 5px"><%= @softapplication.description %></div>
|
||||
</div>
|
||||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<div style="font-size: 15px;"><strong>作品得分:</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>
|
||||
<% 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 class="jRatingColor" style="width: <%=star%>%;"></div>
|
||||
<div class="jRatingAverage" style="width: 0px; top: -20px;"></div>
|
||||
<div class="jStar" style="width: 115px; height: 20px; top: -40px; background: url(/images/seems_rateable/stars.png) repeat-x scroll 0% 0% transparent;">
|
||||
</div>
|
||||
</div>
|
||||
<%= @stars_status_map["star#{(star/20).to_s}".to_sym] %>
|
||||
<br>
|
||||
<% end %>
|
||||
</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><%= 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 style="padding-top: 1px; font-size: 25px; color: blue;">
|
||||
<strong><%= @softapplication.raters(:quality).count %></strong></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong>
|
||||
<div style="font-size: 15px">作品截图:</div>
|
||||
</strong>
|
||||
|
||||
<div class="softapplication-img" >
|
||||
<ul>
|
||||
<% @image_results.take(4).each do |attachment| %>
|
||||
<li>
|
||||
<div class="title"><a href="#"><%= attachment.filename.to_s -%></a></div>
|
||||
<%= link_to_attachment_img attachment, :class => "soft-application", :download => "true"%>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div style='clear :left;'></div>
|
||||
</div>
|
||||
|
||||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: 50px">
|
||||
<div style="font-size: 15px"><strong>作品评论:</strong></div>
|
||||
<div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--提示登录后对应用进行评价-->
|
||||
<div id="history">
|
||||
<%= render :partial => 'message_history', :locals => {:contest => @softapplication, :journals => @jour, :state => false} %>
|
||||
</div>
|
||||
|
||||
<!--分页-->
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
<%= pagination_links_full @feedback_pages %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
</div>
|
|
@ -561,6 +561,8 @@ zh:
|
|||
label_user_login_tips: 您还没有登录,请登录后留言
|
||||
label_user_login_course_board: 您还没有登录,请登录后参与课程讨论
|
||||
label_user_login_project_board: 您还没有登录,请登录后参与项目讨论
|
||||
label_user_login_attending_contest: 您还没有登录,请登录后参赛
|
||||
label_user_login_score_and_comment: 您还没有登录,请登录后对作品进行打分评价
|
||||
#end
|
||||
#by huang # modified by bai
|
||||
label_college: 高校进入
|
||||
|
@ -1871,7 +1873,7 @@ zh:
|
|||
label_upload_softapplication_photo: 上传产品截图
|
||||
label_upload_softapplication_packets_mustpacketed: 作品相关代码及相关说明文件必须打包后以压缩包的形式上传,便于上传和下载 ;
|
||||
label_upload_softapplication_photo_condition: 作品截图需上传0~4张;格式为gif/jpg/png, 每张小于5M
|
||||
label_updated_caution: 注意:若参赛作品,则之前上传的软件包和截图都将被删除,请重新上传!
|
||||
label_updated_caution: 注意:若编辑参赛作品,则之前上传的软件包和截图都将被删除,请重新上传!
|
||||
label_softapplication_name: 应用名称
|
||||
label_work_name: 作品名称
|
||||
label_softapplication_description: 应用简介
|
||||
|
@ -1883,7 +1885,9 @@ zh:
|
|||
label_softapplication_developer: 上传人员
|
||||
label_softapplication_developers: 开发人员
|
||||
label_work_deposit_project_url: 托管项目网址
|
||||
label_work_deposit_project: 托管项目
|
||||
label_softapplication_name_condition: 25个汉字以内(50个字符)
|
||||
label_softapplication_description_condition: 125个汉字以内
|
||||
label_user_login_softapplication_board: 您还没有登录,请登录后参与应用评价。
|
||||
label_contest_description_no: 暂无描述。
|
||||
label_no_contest_softapplication: 暂无参赛应用
|
||||
|
@ -1895,6 +1899,7 @@ zh:
|
|||
label_add_contest_succeed_fail: 添加失败,该应用已参赛.
|
||||
label_no_ftapplication: 暂无应用
|
||||
label_edit_softapplication: 修改应用
|
||||
label_edit_work: 修改作品
|
||||
label_contest_delete: 删除竞赛
|
||||
label_softapplication_list: 应用列表
|
||||
label_contest_work_list: 参赛作品列表
|
||||
|
@ -1914,6 +1919,9 @@ zh:
|
|||
label_contest_delete: 删除竞赛
|
||||
label_noawards_current: 暂未评奖
|
||||
|
||||
notice_account_updated: 帐号更新成功
|
||||
notice_attendingcontest_work_successfully_created: 恭喜您,参赛作品创建成功!
|
||||
notice_softapplication_was_successfully_updated: 恭喜您,参赛作品更新成功!
|
||||
# ajax异步验证
|
||||
modal_valid_passing: 可以使用
|
||||
label_bug: 漏洞
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddUserIdToProjects < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :projects, :user_id, :integer
|
||||
end
|
||||
end
|
|
@ -0,0 +1,14 @@
|
|||
class CreateProjectingSoftapplictions < ActiveRecord::Migration
|
||||
def up
|
||||
create_table :projecting_softapplictions do |t|
|
||||
t.integer :user_id
|
||||
t.integer :softapplication_id
|
||||
t.integer :project_id
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
def down
|
||||
drop_table :projecting_softapplictions
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddDepositProjectToSoftapplications < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :softapplications, :deposit_project, :string
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20140522025721) do
|
||||
ActiveRecord::Schema.define(:version => 20140519074133) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1867,6 +1867,23 @@ a.reference {
|
|||
color: #ACAEB1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.grayline2{
|
||||
border: #039EA0 1px solid;
|
||||
/*border: rgb(3,158,160) 1px solid;*/
|
||||
font-size: 12px;
|
||||
color: #ACAEB1;
|
||||
width: 72.4%;
|
||||
}
|
||||
|
||||
.grayline3{
|
||||
border: #039EA0 1px solid;
|
||||
/*border: rgb(3,158,160) 1px solid;*/
|
||||
font-size: 12px;
|
||||
color: #ACAEB1;
|
||||
width: 48.4%;
|
||||
}
|
||||
|
||||
div.tableline{
|
||||
height: 1px;
|
||||
background-color: #ACAEB1;
|
||||
|
|
Loading…
Reference in New Issue