Merge branch 'competition' into develop
Conflicts: config/routes.rb
This commit is contained in:
commit
1e0e5a5ab1
|
@ -4,7 +4,8 @@ class ContestsController < ApplicationController
|
|||
menu_item :respond
|
||||
menu_item :project, :only => :show_project
|
||||
menu_item :application, :only => :show_softapplication
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward,
|
||||
menu_item :attendingcontest, :only => :show_attendingcontest
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :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
|
||||
|
@ -252,6 +253,7 @@ class ContestsController < ApplicationController
|
|||
############
|
||||
##显示参赛的应用
|
||||
def show_softapplication
|
||||
|
||||
# @membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
# @option = []
|
||||
|
||||
|
@ -288,6 +290,66 @@ class ContestsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
###我要参赛
|
||||
def show_attendingcontest
|
||||
##取出参赛项目
|
||||
@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
|
||||
@user = @contest.author
|
||||
@contesting_project = @contest.contesting_projects.all
|
||||
if params[:student_id].present?
|
||||
@temp = []
|
||||
@contesting_project.each do |pro|
|
||||
if pro.project && pro.project.project_status
|
||||
if /#{params[:student_id]}/ =~ pro.user.user_extensions.student_id
|
||||
@temp << pro
|
||||
end
|
||||
end
|
||||
@temp
|
||||
end
|
||||
@contesting_project = @temp
|
||||
else
|
||||
|
||||
@temp = []
|
||||
@contesting_project.each do |pro|
|
||||
if pro.project && pro.project.project_status
|
||||
@temp << pro
|
||||
end
|
||||
@temp
|
||||
end
|
||||
if @temp.size > 0
|
||||
@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.reverse
|
||||
@contesting_softapplication = paginateHelper @contesting_softapplication, 10
|
||||
|
||||
|
||||
##引用base_newcontest整体样式
|
||||
@contest = Contest.find_by_id(params[:id])
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => 'base_newcontest'
|
||||
}
|
||||
format.api
|
||||
end
|
||||
end
|
||||
|
||||
###end
|
||||
###添加已创建的参赛项目
|
||||
def add
|
||||
project = Project.find(params[:contest])
|
||||
|
@ -500,9 +562,9 @@ class ContestsController < ApplicationController
|
|||
@contest = Contest.find(params[:id])
|
||||
@user = @contest.author
|
||||
end
|
||||
rescue
|
||||
rescue
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -106,11 +106,13 @@ class SoftapplicationsController < ApplicationController
|
|||
@softapplication.save_attachments(params[:attachments])
|
||||
respond_to do |format|
|
||||
if @softapplication.save
|
||||
format.js
|
||||
format.html { redirect_to @softapplication, notice: 'Softapplication was successfully created.' }
|
||||
format.json { render json: @softapplication, status: :created, location: @softapplication }
|
||||
# format.json { render json: @softapplication, status: :created, location: @softapplication }
|
||||
else
|
||||
format.js { render status: 406 }
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @softapplication.errors, status: :unprocessable_entity }
|
||||
# format.json { render json: @softapplication.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,9 +18,14 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><span class="font_lighter"><%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_projects.count, show_project_contest_path(contest), :target => "_blank") %></span></strong>)</span>
|
||||
<span class="font_lighter"><%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_softapplication_contest_path(contest), :target => "_blank") %></span></strong>)</span>
|
||||
|
||||
<td class="font_lighter">
|
||||
<!-- <span class="font_lighter"><%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_projects.count, show_project_contest_path(contest), :target => "_blank") %></span></strong>)</span>
|
||||
<span class="font_lighter"><%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_softapplication_contest_path(contest), :target => "_blank") %></span></strong>)</span> -->
|
||||
<% if contest.id == 2 or contest.id == 3 or contest.id == 6 %>
|
||||
<%= l(:label_contest_work, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.projects.where('is_public=1').count, show_attendingcontest_contest_path(contest), :target => "_blank") %></span></strong>)
|
||||
<% else %>
|
||||
<%= l(:label_contest_work, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_attendingcontest_contest_path(contest), :target => "_blank") %></span></strong>)
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -0,0 +1,246 @@
|
|||
<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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
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 cancel() {
|
||||
$("#put-bid-form").hide();
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
$("#put-project-form").hide();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!--参赛步骤-->
|
||||
<div style="padding-left: 17px; padding-bottom: 15px">
|
||||
温馨提示:如果您希望在我们平台托管参赛数据和代码,请按下面参赛步骤参赛!
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
|
||||
<div style="padding-bottom: 10px; line-height: 25px">
|
||||
<div style="padding-left: 17px; font-size: 15px">
|
||||
<strong>参赛步骤:</strong>
|
||||
</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 style="padding-left: 82px; ">
|
||||
<span style="padding-top: 50px">步骤2:</span>
|
||||
<span><%= link_to '关联参赛作品', "javascript:void(0);", onclick: "$('#put-bid-form').toggle();" %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--点击新建参赛作品弹出框-->
|
||||
<div id="put-project-form" style="display: none; padding-left: 83px; width: 70%">
|
||||
<%= form_for Softapplication.new, :remote=>true, :url => softapplications_path, :complete => '$("#put-bid-form").hide();' do |f| %>
|
||||
<fieldset class="contes-new-box", style="padding-left: 36px">
|
||||
|
||||
<tr style="width:700px; margin-left: -10px">
|
||||
<span><%= l(:label_softapplication_name) %></span>
|
||||
<span class="contest-star"> * </span>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
</tr></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_version_available) %></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 style="width:800px;">
|
||||
<span><%= l(:label_softapplication_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>
|
||||
|
||||
</tr></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_description) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</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></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<fieldset style="width: 500px", style="padding-top: 10px">
|
||||
<legend>
|
||||
上传应用软件包和应用截图
|
||||
</legend>
|
||||
<%= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
<p style="font-size: 10px">
|
||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed)%>
|
||||
<br>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition)%>
|
||||
</p>
|
||||
<p style="font-size: 10px; color: red">
|
||||
<%= l(:label_updated_caution)%>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
</fieldset></br>
|
||||
<div class="align-center", style="padding-top: -3px; padding-bottom: 8px">
|
||||
<%= submit_tag l(:button_create), :onclick => "cancel();" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--点击关联参赛作品后弹出关联框-->
|
||||
<div id="put-bid-form" style="display: none; padding-left: 83px; width: 70%">
|
||||
<%= form_for "contest_for_save", :remote=>true, :url => {:controller => 'contests', :action => 'add_softapplication'}, :update => "contesting_softapplication_list", :complete => '$("#put-bid-form").hide();' do |f| %>
|
||||
<table id="contesting_table" border="0" width="102%" style="margin-left: -3px;">
|
||||
<!--该table为点击关联参赛作品后弹出的-->
|
||||
<tr style="padding-left: 50px">
|
||||
<%= select_tag 'contest', options_for_select(select_option_app_helper(@softapplication)), :name => 'contest', :class => 'grayline' %>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><%= f.text_area :contest_message, :id => "contest_message", :required => true, :rows => 2, :cols => 40, :placeholder => l(:label_bid_reason), :style => "resize: none;", :class => 'noline'%></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"> <%= submit_tag l(:button_add), :name => nil , :class => "enterprise",
|
||||
:onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'"%>
|
||||
<%= 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'" %> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="underline-contests_three"></div>
|
||||
|
||||
<!--参赛作品列表,通过判断,竞赛的id为2,3,6的显示参赛作品为提交的项目,否则显示参赛的应用-->
|
||||
|
||||
<% 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">
|
||||
<tr>
|
||||
<td><strong>参赛作品: </strong></td>
|
||||
<td> <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %> </td>
|
||||
</tr></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">
|
||||
<tr>
|
||||
<td>发布时间:</td>
|
||||
<td> <%= format_time c_project.created_at%> </td>
|
||||
|
||||
</tr>
|
||||
</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>
|
||||
<div style="padding-left: 68px">
|
||||
<tr>
|
||||
<td>简介:</td>
|
||||
<td> <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> </td>
|
||||
</tr></br>
|
||||
</div>
|
||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||
<tr>
|
||||
<td>发布时间:</td>
|
||||
<td> <%= format_time c_softapplication.created_at %> </td>
|
||||
|
||||
</tr>
|
||||
</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 %>
|
||||
</div>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<tr>
|
||||
<td style="padding-left: 8px"><%=link_to request.host()+"/softapplications", :controller=>'softapplications', :action=>'index' %></td>
|
||||
<td ><%=link_to l(:field_homepage), home_path %> >
|
||||
<%=link_to l(:label_contest_softapplication), :controller=>'softapplications', :action=>'index' %>
|
||||
<%=link_to l(:label_contest_work), :controller=>'softapplications', :action=>'index' %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -99,18 +99,25 @@
|
|||
<!-- <td class="font_index">
|
||||
<%=link_to "#{@contest.join_in_competitions.count}",:controller => "contests",:action => "show_participator" %>
|
||||
</td> -->
|
||||
<!--关注人数-->
|
||||
<td class="font_index">
|
||||
<%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_project' %>
|
||||
<!-- <%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_project' %> -->
|
||||
<%=link_to "#{@contest.watcher_users.count}", :controller => 'contests', :action => 'show_project' %>
|
||||
</td>
|
||||
<!--参赛作品数量-->
|
||||
<td class="font_index">
|
||||
<%=link_to "#{@contest.contesting_softapplications.count}", :controller => 'contests', :action => 'show_softapplication' %>
|
||||
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
||||
<%=link_to "#{@contest.projects.where('is_public=1').count}" %>
|
||||
<% else %>
|
||||
<%=link_to "#{@contest.contesting_softapplications.count}", :controller => 'contests', :action => 'show_attendingcontest' %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr class="font_aram">
|
||||
<!-- <td align="center" width="70px"> <%= l(:label_participate) %></td> -->
|
||||
<td align="center" width="70px"> <%= l(:label_contest_project) %></td>
|
||||
<td align="center" width="70px"> <%= l(:label_contest_application) %></td>
|
||||
<td align="center" width="70px"> <%= l(:label_contest_watchers) %></td>
|
||||
<td align="center" width="70px"> <%= l(:label_contest_work) %></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -178,9 +185,9 @@
|
|||
<div class="user_underline"></div>
|
||||
<div class="font_title_left">
|
||||
<strong><%= l(:label_x_followers, :count => @contest.watcher_users.count) %></strong>
|
||||
<% if show_more_fans?(@contest) %>
|
||||
<!-- <% if show_more_fans?(@contest) %>
|
||||
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'contests', :action => 'show_contest_user'%></span>
|
||||
<% end %>
|
||||
<% end %> -->
|
||||
</div>
|
||||
<div class="left_wf">
|
||||
<table>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
alert('新建参赛作品成功!');
|
|
@ -14,10 +14,10 @@
|
|||
</div>
|
||||
<div class="avatar-4"; style="float: left; margin-top: 7px "><%= image_tag('/images/app1.png')%></div>
|
||||
<div style="float: left; width: 600px; padding-top: 6px; margin-left: 8px"><%= softapplication.description.truncate(95, omission: '...') %></div>
|
||||
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; ">
|
||||
<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(10, omission: '...'), show_softapplication_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p>所属类别:<%= softapplication.app_type_name.truncate(5, omission: '...') %></p>
|
||||
<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>
|
||||
</div>
|
||||
<div style="padding-left: 53px">
|
||||
|
@ -36,4 +36,4 @@
|
|||
|
||||
<div class="pagination"><%= pagination_links_full @softapplication_pages, @softapplication_count, :per_page_links => false %></div>
|
||||
|
||||
<% html_title l(:label_softapplication_list)%>
|
||||
<% html_title l(:label_contest_work_list)%>
|
|
@ -27,7 +27,7 @@
|
|||
<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_softapplication_contest_path(contest)) : '尚未加入竞赛'%></td>
|
||||
<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>
|
||||
|
@ -35,7 +35,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<span>应用下载:</span>
|
||||
<span>作品下载:</span>
|
||||
<span>
|
||||
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current) } %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
||||
</span>
|
||||
|
@ -56,13 +56,13 @@
|
|||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong><div style="font-size: 15px;">应用简介:</div></strong>
|
||||
<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 style="font-size: 15px;"><strong>作品得分:</strong></div>
|
||||
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count%></div> -->
|
||||
<div style="overflow: hidden">
|
||||
<div style="margin-left: 15%; float: left">
|
||||
|
@ -93,7 +93,7 @@
|
|||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong><div style="font-size: 15px">软件截图:</div></strong>
|
||||
<strong><div style="font-size: 15px">作品截图:</div></strong>
|
||||
<div class="softapplication-img" style="padding-top: 5px">
|
||||
<% @image_results.take(4).each do |attachment| %>
|
||||
<%= link_to_attachment_img attachment, :class => "soft-application", :download => "true" %>
|
||||
|
@ -116,7 +116,7 @@
|
|||
<% end %>
|
||||
</div> -->
|
||||
<div style="height: 50px">
|
||||
<div style="font-size: 15px"><strong>软件评论:</strong></div>
|
||||
<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>
|
||||
|
|
|
@ -152,7 +152,11 @@
|
|||
<div style="float: left; margin-left: 12px; margin-top: 10px; margin-bottom: -4px; width: 380px;">
|
||||
<!-- <%= link_to(contest.name, contest.event_url, :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %> -->
|
||||
<%= link_to(contest.name, show_contest_contest_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %>
|
||||
<span class="font_lighter">(<span style="font-size: 17px"><%= link_to("含#{contest.contesting_softapplications.count}个app", show_softapplication_contest_path(contest), :target => "_blank") %></span>)</span>
|
||||
<% if contest.id == 2 or contest.id == 3 or contest.id == 6 %>
|
||||
<span class="font_lighter">(<span style="font-size: 13px"><%= link_to("含#{contest.projects.where('is_public=1').count}个app", show_attendingcontest_contest_path(contest), :target => "_blank") %></span>)</span>
|
||||
<% else %>
|
||||
<span class="font_lighter">(<span style="font-size: 13px"><%= link_to("含#{contest.contesting_softapplications.count}个app", show_attendingcontest_contest_path(contest), :target => "_blank") %></span>)</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 12px; margin-bottom: 2px; width: 380px;">
|
||||
|
@ -201,7 +205,7 @@
|
|||
</div>
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>最新参赛应用</strong></h3>
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>最新参赛作品</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'softapplications', :action => 'index', :host => Setting.contest_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<% if Softapplication.count > 0%>
|
||||
|
|
|
@ -1842,8 +1842,9 @@ zh:
|
|||
label_contest_project: 参赛项目
|
||||
label_contest_softapplication: 参赛应用
|
||||
label_contest_response: 用户反馈
|
||||
label_contest_watchers: 关注人员
|
||||
label_contest_watchers: 关注人数
|
||||
label_contest_application: 参赛应用
|
||||
label_contest_work: 参赛作品
|
||||
button_contesting_as_project: 我要参赛(新建项目)
|
||||
button_contesting_as_application: 我要参赛(发布应用)
|
||||
label_release_softapplication: 发布应用
|
||||
|
@ -1872,6 +1873,8 @@ zh:
|
|||
label_edit_softapplication: 修改应用
|
||||
label_contest_delete: 删除竞赛
|
||||
label_softapplication_list: 应用列表
|
||||
label_contest_work_list: 参赛作品列表
|
||||
label_attending_contest: 我要参赛
|
||||
|
||||
label_coursefile_sharingarea: 课程资源共享区
|
||||
label_sort_by_activity: 按动态数排序
|
||||
|
|
|
@ -67,15 +67,16 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
member do
|
||||
match 'add_softapplication'
|
||||
match 'update_contest' , via: [:put]
|
||||
match 'show_contest' , via: :get
|
||||
match 'show_project' , via: :get
|
||||
match 'show_softapplication', via: :get
|
||||
match 'show_participator' , via: :get
|
||||
match 'add' , via: [:get, :post]
|
||||
match 'add_softapplication' , via: [:get, :post]
|
||||
match 'create' , via: :post
|
||||
match 'settings' , via: [:get, :post]
|
||||
match 'update_contest' , via: [:put]
|
||||
match 'show_contest' , via: :get
|
||||
match 'show_project' , via: :get
|
||||
match 'show_softapplication' , via: :get
|
||||
match 'show_attendingcontest' , via: :get
|
||||
match 'show_participator' , via: :get
|
||||
match 'add' , via: [:get, :post]
|
||||
match 'add_softapplication' , via: [:get, :post]
|
||||
match 'create' , via: :post
|
||||
match 'settings' , via: [:get, :post]
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -126,7 +127,6 @@ RedmineApp::Application.routes.draw do
|
|||
match 'account/register', :to => 'account#register', :via => [:get, :post], :as => 'register'
|
||||
match 'account/lost_password', :to => 'account#lost_password', :via => [:get, :post], :as => 'lost_password'
|
||||
match 'account/activate', :to => 'account#activate', :via => :get
|
||||
match 'account/valid_ajax', :to => 'account#valid_ajax', :via => :get
|
||||
|
||||
match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news', :via => [:get, :post, :put]
|
||||
match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put]
|
||||
|
|
|
@ -279,8 +279,10 @@ end
|
|||
###new add by linchun
|
||||
Redmine::MenuManager.map :contest_menu do |menu|
|
||||
menu.push :respond, :show_contest_contest_path, :caption => :label_user_response
|
||||
menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
||||
menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
|
||||
#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 :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 }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue