2014-05-08 15:06:36 +08:00
|
|
|
|
<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">
|
2014-05-09 15:34:13 +08:00
|
|
|
|
function clearInfo(id, content) {
|
2014-05-08 15:06:36 +08:00
|
|
|
|
var text = $('#' + id);
|
|
|
|
|
if (text.val() == content) {
|
|
|
|
|
$('#' + id).val('');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-09 15:34:13 +08:00
|
|
|
|
function showInfo(id, content) {
|
2014-05-08 15:06:36 +08:00
|
|
|
|
var text = $('#' + id);
|
|
|
|
|
if (text.val() == '') {
|
|
|
|
|
$('#' + id).val(content);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function cancel() {
|
|
|
|
|
$("#put-bid-form").hide();
|
|
|
|
|
}
|
2014-05-09 22:13:54 +08:00
|
|
|
|
|
|
|
|
|
function cancel() {
|
|
|
|
|
$("#put-project-form").hide();
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-08 15:06:36 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
2014-05-08 16:49:52 +08:00
|
|
|
|
<!--参赛步骤-->
|
2014-05-09 15:34:13 +08:00
|
|
|
|
<div style="padding-left: 17px; padding-bottom: 15px">
|
|
|
|
|
温馨提示:如果您希望在我们平台托管参赛数据和代码,请按下面参赛步骤参赛!
|
|
|
|
|
</div>
|
2014-05-08 15:06:36 +08:00
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
|
2014-05-09 15:34:13 +08:00
|
|
|
|
<div style="padding-bottom: 10px; line-height: 25px">
|
|
|
|
|
<div style="padding-left: 17px; font-size: 15px">
|
|
|
|
|
<strong>参赛步骤:</strong>
|
2014-05-08 15:06:36 +08:00
|
|
|
|
</div>
|
2014-05-09 15:34:13 +08:00
|
|
|
|
<div style="padding-left: 82px; ">
|
|
|
|
|
<span style="padding-top: 50px">步骤1:</span>
|
2014-05-09 22:13:54 +08:00
|
|
|
|
<span><%#= link_to '新建参赛作品', new_softapplication_path(:target=>'_blank'), :target=>'_blank' %></span>
|
2014-05-09 15:34:13 +08:00
|
|
|
|
<span><%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
2014-05-09 22:13:54 +08:00
|
|
|
|
<span style="font-size: 12px; color: grey">(先点击“新建参赛作品”,然后刷新页面,再继续步骤2。)</span>
|
2014-05-08 15:06:36 +08:00
|
|
|
|
</div>
|
2014-05-09 15:34:13 +08:00
|
|
|
|
<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%">
|
2014-05-09 22:13:54 +08:00
|
|
|
|
<%= form_for Softapplication.new, :remote=>true, :url => softapplications_path, :complete => '$("#put-bid-form").hide();' do |f| %>
|
2014-05-09 17:04:26 +08:00
|
|
|
|
<fieldset class="contes-new-box", style="padding-left: 36px">
|
2014-05-09 15:34:13 +08:00
|
|
|
|
|
|
|
|
|
<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 />
|
|
|
|
|
|
2014-05-09 17:04:26 +08:00
|
|
|
|
<fieldset style="width: 500px", style="padding-top: 10px">
|
2014-05-09 15:34:13 +08:00
|
|
|
|
<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>
|
2014-05-09 17:04:26 +08:00
|
|
|
|
<div class="align-center", style="padding-top: -3px; padding-bottom: 8px">
|
2014-05-09 22:13:54 +08:00
|
|
|
|
<%= submit_tag l(:button_create), :onclick => "cancel();" %>
|
2014-05-09 15:34:13 +08:00
|
|
|
|
</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>
|
|
|
|
|
|
2014-05-08 15:06:36 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
|
2014-05-08 17:10:17 +08:00
|
|
|
|
<div class="underline-contests_three"></div>
|
|
|
|
|
|
2014-05-08 16:49:52 +08:00
|
|
|
|
<!--参赛作品列表,通过判断,竞赛的id为2,3,6的显示参赛作品为提交的项目,否则显示参赛的应用-->
|
2014-05-08 15:06:36 +08:00
|
|
|
|
|
2014-05-08 16:49:52 +08:00
|
|
|
|
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
2014-05-08 15:06:36 +08:00
|
|
|
|
|
2014-05-09 15:34:13 +08:00
|
|
|
|
<% @contesting_project.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>
|
2014-05-08 16:49:52 +08:00
|
|
|
|
|
2014-05-09 15:34:13 +08:00
|
|
|
|
</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>
|
2014-05-09 16:03:24 +08:00
|
|
|
|
<td> <%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %> </td>
|
2014-05-09 15:34:13 +08:00
|
|
|
|
</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>
|
2014-05-08 15:06:36 +08:00
|
|
|
|
|
2014-05-09 15:34:13 +08:00
|
|
|
|
</tr>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="underline-contests_three"></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
2014-05-08 15:06:36 +08:00
|
|
|
|
|
2014-05-09 15:34:13 +08:00
|
|
|
|
<div class="pagination">
|
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
|
|
|
|
</div>
|
2014-05-08 15:06:36 +08:00
|
|
|
|
|