diff --git a/app/models/contesting_softapplication.rb b/app/models/contesting_softapplication.rb
new file mode 100644
index 00000000..93aea265
--- /dev/null
+++ b/app/models/contesting_softapplication.rb
@@ -0,0 +1,15 @@
+
+class ContestingSoftapplication < ActiveRecord::Base
+ attr_accessible :contest_id, :description, :softapplication_id, :user_id
+
+ belongs_to :contest
+ belongs_to :softapplication
+ belongs_to :user
+
+
+ def self.create_softapplication_contesting(contest_id, softapplication_id, description = nil)
+ self.create(:user_id => User.current.id, :contest_id => contest_id,
+ :softapplication_id => softapplication_id, :description => description)
+ end
+
+end
diff --git a/app/models/softapplication.rb b/app/models/softapplication.rb
index e63eb428..fa90881b 100644
--- a/app/models/softapplication.rb
+++ b/app/models/softapplication.rb
@@ -1,5 +1,5 @@
class Softapplication < ActiveRecord::Base
- attr_accessible :android_min_version_available, :app_type_id, :app_type_name, :description, :name, :user_id, :contest_id
+ attr_accessible :android_min_version_available, :app_type_id, :app_type_name, :description, :name, :user_id, :contest_id, :application_developers
acts_as_attachable
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
has_many :contesting_softapplications, :dependent => :destroy
diff --git a/app/views/contests/_list_softapplications.html.erb b/app/views/contests/_list_softapplications.html.erb
new file mode 100644
index 00000000..a0099c72
--- /dev/null
+++ b/app/views/contests/_list_softapplications.html.erb
@@ -0,0 +1,40 @@
+
+<% contesting_softapplication.each do |c_softapplication|%>
+ <% if c_softapplication.softapplication %>
+
+
+
+
+
+
+
+
+
+
+
+ <%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication)) %>
+
+ <%= l(:label_joined_contest)%>
+ |
+
+
+
+ <%= c_softapplication.softapplication.description %> |
+
+
+
+
+ <%=format_time c_softapplication.created_at %>
+ |
+
+
+ |
+
+
+
+ |
+
+
+ <% end %>
+<% end %>
+
diff --git a/app/views/contests/add_softapplication.js.erb b/app/views/contests/add_softapplication.js.erb
new file mode 100644
index 00000000..6071c707
--- /dev/null
+++ b/app/views/contests/add_softapplication.js.erb
@@ -0,0 +1,4 @@
+$('#contesting_softapplication_list').html('<%= escape_javascript(render(:partial => 'softapplication_list', :locals => {:contesting_softapplication => @contesting_softapplication})) %>');
+$("#softapplication_id").val("请选择参赛应用");
+$("#contest_message").val( "<%= l(:label_bid_reason) %>" );
+$("#put-bid-form").hide();
\ No newline at end of file
diff --git a/app/views/softapplications/_message_history.erb b/app/views/softapplications/_message_history.erb
new file mode 100644
index 00000000..4190e899
--- /dev/null
+++ b/app/views/softapplications/_message_history.erb
@@ -0,0 +1,32 @@
+<% reply_allow = JournalsForMessage.create_by_user? User.current %>
+
+
+
+ <%= render :partial => 'new_message', :locals => {:softapplication => @softapplication, :sta => @state} %>
+
+
+
+<% if journals.size >0 %>
+
+ <% for journal in journals%>
+ -
+ <%= image_tag(url_to_avatar(journal.user), :class => "avatar") %>
+
+ <%= link_to journal.user, user_path(journal.user)%>
+ <% label = l(:label_contest_requirement) %>
+
<%= textilizable journal.notes%>
+ <%= l(:label_bids_published) %> <%= time_tag(journal.created_on).html_safe %> <%= l(:label_bids_published_ago) %>
+
+ <% ids = 'project_respond_form_'+ journal.id.to_s%>
+
+
+ <% if @user==User.current|| User.current.admin? %>
+ <%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
+ <% end %>
+
+
+
+
+ <% end %>
+
+<% end %>
diff --git a/app/views/softapplications/_new_message.erb b/app/views/softapplications/_new_message.erb
new file mode 100644
index 00000000..e46fb299
--- /dev/null
+++ b/app/views/softapplications/_new_message.erb
@@ -0,0 +1,53 @@
+
+
+
+<%= form_for('softapplication_message',
+ :remote => true, :method => :post,
+ :url => {:controller => 'softapplications',
+ :action => 'create_message',
+ :id => softapplication,
+ :sta => sta}
+ ) do |f|%>
+
+
+ <%= render :partial => 'pre_show', :locals => {:content => @content} %>
+
+
+ <% if User.current.logged? %>
+
+
+ <%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%> |
+
+
+
+ <%= f.text_field :reference_user_id, :style=>"display:none"%>
+
+
+
+
+ <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
+ <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('softapplication_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> |
+
+
+
+ <% else %>
+
+ <%= l(:label_user_login_tips) %>
+ <%= link_to l(:label_user_login_new), signin_path %>
+
+ <% end %>
+<% end %>
diff --git a/app/views/softapplications/_pre_show.html.erb b/app/views/softapplications/_pre_show.html.erb
new file mode 100644
index 00000000..fef1f16e
--- /dev/null
+++ b/app/views/softapplications/_pre_show.html.erb
@@ -0,0 +1,13 @@
+
+<% unless content.nil?%>
+
+
+ <%= textilizable content %> |
+
+
+ <%= hidden_field_tag 'reference_content', params[:reference_content], :value => content%> |
+
+
+<% end %>
+
+
diff --git a/app/views/softapplications/back.js.erb b/app/views/softapplications/back.js.erb
new file mode 100644
index 00000000..acd52a63
--- /dev/null
+++ b/app/views/softapplications/back.js.erb
@@ -0,0 +1,2 @@
+$('#message_history').html('<%= escape_javascript(render(:partial => 'history_message', :locals => {:softapplication => @softapplication, :journals => @jour, :state => @state})) %>');
+$('#softapplication_message_reference_user_id').val("");
\ No newline at end of file
diff --git a/app/views/softapplications/create_message.js.erb b/app/views/softapplications/create_message.js.erb
new file mode 100644
index 00000000..bd0b1336
--- /dev/null
+++ b/app/views/softapplications/create_message.js.erb
@@ -0,0 +1,4 @@
+$('#history').html('<%= escape_javascript(render(:partial => 'softapplications/message_history', :locals => {:contest => @softapplication, :journals => @jour, :state => true})) %>');
+$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
+$('#softapplication_message_message').val("");
+$('#softapplication_message_reference_user_id').val("");
diff --git a/app/views/softapplications/more.js.erb b/app/views/softapplications/more.js.erb
new file mode 100644
index 00000000..fc67a9fe
--- /dev/null
+++ b/app/views/softapplications/more.js.erb
@@ -0,0 +1,2 @@
+$('#message_history').html('<%= escape_javascript(render(:partial => 'message_history', :locals => {:softapplication => @softapplication, :journals => @jour, :state => @state})) %>');
+$('#softapplication_message_reference_user_id').val("");
\ No newline at end of file
diff --git a/app/views/softapplications/new.html.erb b/app/views/softapplications/new.html.erb
index cd46c757..b47930d6 100644
--- a/app/views/softapplications/new.html.erb
+++ b/app/views/softapplications/new.html.erb
@@ -41,7 +41,14 @@
br>
-
+
+
+ <%= l(:label_softapplication_developers) %> |
+ * | : <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %> |
+
+
br>
+
+