将竞赛页面中“新建参赛作品”的弹出形式由弹出新页面改为本页弹出下拉框,目前已有效果,写数据库有问题
This commit is contained in:
parent
5d966df410
commit
b182debc16
|
@ -56,14 +56,19 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--参赛步骤-->
|
<!--参赛步骤-->
|
||||||
<div style="padding-left: 17px; padding-bottom: 15px">温馨提示:如果您希望在我们平台托管参赛数据和代码,请按下面参赛步骤参赛!</div>
|
<div style="padding-left: 17px; padding-bottom: 15px">
|
||||||
|
温馨提示:如果您希望在我们平台托管参赛数据和代码,请按下面参赛步骤参赛!
|
||||||
|
</div>
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
|
|
||||||
<div style="padding-bottom: 10px; line-height: 25px">
|
<div style="padding-bottom: 10px; line-height: 25px">
|
||||||
<div style="padding-left: 17px; font-size: 15px"><strong>参赛步骤:</strong></div>
|
<div style="padding-left: 17px; font-size: 15px">
|
||||||
|
<strong>参赛步骤:</strong>
|
||||||
|
</div>
|
||||||
<div style="padding-left: 82px; ">
|
<div style="padding-left: 82px; ">
|
||||||
<span style="padding-top: 50px">步骤1:</span>
|
<span style="padding-top: 50px">步骤1:</span>
|
||||||
<span><%= link_to '新建参赛作品', new_softapplication_path(:target=>'_blank'), :target=>'_blank' %></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>
|
<span style="font-size: 12px; color: grey">(先点击“新建参赛作品”, 然后返回本页继续步骤2即可。)</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 82px; ">
|
<div style="padding-left: 82px; ">
|
||||||
|
@ -72,10 +77,81 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--点击新建参赛作品弹出框-->
|
||||||
|
<div id="put-project-form" style="display: none; padding-left: 83px; width: 70%">
|
||||||
|
<%= form_for "project_for_save", :remote=>true, :url => {:controller => 'softapplications', :action => 'new'}, :complete => '$("#put-bid-form").hide();' do |f| %>
|
||||||
|
<fieldset class="contes-new-box">
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<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">
|
||||||
|
<%= submit_tag l(:button_create), :onclick => "return true" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--点击关联参赛作品后弹出关联框-->
|
<!--点击关联参赛作品后弹出关联框-->
|
||||||
<div id="put-bid-form" style="display: none; padding-left: 83px; width: 70%">
|
<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| %>
|
<%= 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为点击关联参赛作品后弹出的-->
|
<table id="contesting_table" border="0" width="102%" style="margin-left: -3px;">
|
||||||
|
<!--该table为点击关联参赛作品后弹出的-->
|
||||||
<tr style="padding-left: 50px">
|
<tr style="padding-left: 50px">
|
||||||
<%= select_tag 'contest', options_for_select(select_option_app_helper(@softapplication)), :name => 'contest', :class => 'grayline' %>
|
<%= select_tag 'contest', options_for_select(select_option_app_helper(@softapplication)), :name => 'contest', :class => 'grayline' %>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -85,14 +161,12 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right">
|
<td align="right"> <%= submit_tag l(:button_add), :name => nil , :class => "enterprise",
|
||||||
<%= submit_tag l(:button_add), :name => nil , :class => "enterprise",
|
|
||||||
:onmouseout => "this.style.backgroundPosition = 'left top'",
|
:onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'"%>
|
:onmouseover => "this.style.backgroundPosition = 'left -30px'"%>
|
||||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
|
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
|
||||||
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
|
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
|
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %> </td>
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -112,25 +186,19 @@
|
||||||
<div style="font-size: 15px">
|
<div style="font-size: 15px">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>参赛作品: </strong></td>
|
<td><strong>参赛作品: </strong></td>
|
||||||
<td>
|
<td> <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %> </td>
|
||||||
<%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %>
|
|
||||||
</td>
|
|
||||||
</tr></br>
|
</tr></br>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 68px">
|
<div style="padding-left: 68px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>简介:</td>
|
<td>简介:</td>
|
||||||
<td>
|
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
||||||
<%= c_project.project.description.truncate(90, omission: '...') %>
|
|
||||||
</td>
|
|
||||||
</tr></br>
|
</tr></br>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>发布时间:</td>
|
<td>发布时间:</td>
|
||||||
<td>
|
<td> <%= format_time c_project.created_at%> </td>
|
||||||
<%= format_time c_project.created_at%>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</div>
|
</div>
|
||||||
|
@ -145,25 +213,19 @@
|
||||||
<div style="font-size: 15px">
|
<div style="font-size: 15px">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>参赛作品: </strong></td>
|
<td><strong>参赛作品: </strong></td>
|
||||||
<td>
|
<td> <%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %> </td>
|
||||||
<%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %>
|
|
||||||
</td>
|
|
||||||
</tr></br>
|
</tr></br>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 68px">
|
<div style="padding-left: 68px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>简介:</td>
|
<td>简介:</td>
|
||||||
<td>
|
<td> <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> </td>
|
||||||
<%= c_softapplication.softapplication.description.truncate(90, omission: '...') %>
|
|
||||||
</td>
|
|
||||||
</tr></br>
|
</tr></br>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>发布时间:</td>
|
<td>发布时间:</td>
|
||||||
<td>
|
<td> <%= format_time c_softapplication.created_at %> </td>
|
||||||
<%=format_time c_softapplication.created_at %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</div>
|
</div>
|
||||||
|
@ -173,7 +235,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="pagination"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %></div>
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -279,8 +279,8 @@ end
|
||||||
###new add by linchun
|
###new add by linchun
|
||||||
Redmine::MenuManager.map :contest_menu do |menu|
|
Redmine::MenuManager.map :contest_menu do |menu|
|
||||||
menu.push :respond, :show_contest_contest_path, :caption => :label_user_response
|
menu.push :respond, :show_contest_contest_path, :caption => :label_user_response
|
||||||
#menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
||||||
#menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
|
menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
|
||||||
menu.push :attendingcontest, {:controller => 'contests', :action => 'show_attendingcontest'}, :caption => :label_attending_contest
|
menu.push :attendingcontest, {:controller => 'contests', :action => 'show_attendingcontest'}, :caption => :label_attending_contest
|
||||||
# menu.push :attendingcontest, :show_attendingcontest_contest_path, :caption => :label_attendin,g_contest
|
# menu.push :attendingcontest, :show_attendingcontest_contest_path, :caption => :label_attendin,g_contest
|
||||||
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
||||||
|
|
Loading…
Reference in New Issue