与show_application相关的所有内容改为show_softapplication,以防和系统中的application冲突

exceptionHandle
wanglinchun 11 years ago
parent 8fb185681a
commit c86af5f483

@ -3,8 +3,8 @@
class ContestsController < ApplicationController
menu_item :respond
menu_item :project, :only => :show_project
menu_item :application, :only => :show_application
before_filter :find_contest, :only => [:show_contest, :show_project, :show_application, :create,:destroy,:more,:back,:add,:new,:show_results, :set_reward,
menu_item :application, :only => :show_softapplication
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :create,:destroy,:more,:back,:add,: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
@ -218,7 +218,7 @@ class ContestsController < ApplicationController
end
############
##显示参赛的应用
def show_application
def show_softapplication
respond_to do |format|
format.html {
render :layout => 'base_newcontest'

@ -1,15 +0,0 @@
<!-- fq -->
<%= render_flash_messages %>
<table width="100%" border="0" style="padding-left: 15px">
<td width="15%" class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %></td> <!--标注参与项目及数量-->
<% if User.current.logged? %>
<td width="85%">
<div class='icon icon-add'> <!--标注我要参加及添加图标-->
<%= toggle_link l(:button_contesting_as_application), 'put-bid-form' %>
</div>
</td>
<% end %>
</table>
<%#= render :partial=> "list_projects" %>

@ -1,67 +0,0 @@
<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();
}
</script>
<% if User.current.logged? %>
<!--我要竞标弹出框-->
<div id = 'flash' style="float:left; width: 100%; display: none" ></div>
<% end %>
<div id='bidding_project_list'>
<%= render :partial => 'application_list' %>
</div>

@ -92,7 +92,7 @@
<%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_project' %>
</td>
<td class="font_index">
<%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_application' %>
<%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_softapplication' %>
</td>
<tr class="font_aram">
<td align="center" width="70px"> <%= l(:label_participate) %></td>

@ -112,7 +112,7 @@
<div style="clear:both"></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 => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">

@ -16,6 +16,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
RedmineApp::Application.routes.draw do
resources :softapplications
## new added by linchun #新竞赛相关
resources :contests, only: [:index] do
collection do
@ -30,7 +33,7 @@ RedmineApp::Application.routes.draw do
match 'update_contest' , via: [:put]
match 'show_contest' , via: :get
match 'show_project' , via: :get
match 'show_application' , via: :get
match 'show_softapplication' , via: :get
match 'show_participator' , via: :get
match 'add' , via: [:get, :post]
match 'create' , via: :post

File diff suppressed because it is too large Load Diff

@ -280,7 +280,7 @@ end
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_application_contest_path, :caption => :label_contest_application
menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
end

Loading…
Cancel
Save