diff --git a/app/helpers/contests_helper.rb b/app/helpers/contests_helper.rb index 184fc7c40..01c7d544f 100644 --- a/app/helpers/contests_helper.rb +++ b/app/helpers/contests_helper.rb @@ -173,6 +173,18 @@ module ContestsHelper end tmp end - + + #作品分类下拉框 + def work_type_opttion + type = [] + #work_types = WorksCategory.all + WorksCategory.all.each do |work_type| + option = [] + option << work_type.category + option << work_type.category + type << option + end + type + end end \ No newline at end of file diff --git a/app/models/works_category.rb b/app/models/works_category.rb new file mode 100644 index 000000000..d8aeecd4e --- /dev/null +++ b/app/models/works_category.rb @@ -0,0 +1,3 @@ +class WorksCategory < ActiveRecord::Base + attr_accessible :category +end diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index 92b162035..f7c753b45 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -33,7 +33,7 @@

<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>

<%= f.select :is_evaluation, is_evaluation_option %> diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index b9463be93..c46de9be4 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -91,7 +91,7 @@ <%= l(:label_work_name) %> * : - <%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %> + <%= f.text_field :name, :required => true, :size => 60, :style => "width:350px;" %> (<%= l(:label_workname_lengthlimit) %>)
@@ -101,17 +101,32 @@ <%= l(:label_running_platform) %> * : - <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %> + <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:350px;" %>
+
+
+ + <%= l(:label_work_type) %> + * : + + + <%#= select_tag 'app_type_name', work_type_opttion, {:name => 'app_type_name',:style => "width:358px;"} %> + + <%= f.select :app_type_name,work_type_opttion, {},{:style => "width:358px;"} %> + <%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %> + + +
+

<%= l(:label_work_description) %> * : - <%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %> + <%= f.text_field :description, :required => true, :size => 60, :style => "width:350px;" %> (<%= l(:label_workdescription_lengthlimit) %>)
@@ -121,7 +136,7 @@ <%= l(:label_softapplication_developers) %> * : - <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %> + <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:350px;" %>
@@ -130,8 +145,8 @@ <%= l(:label_work_deposit_project) %>: - <%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2' %> - <%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0} , :target => '_blank',host:Setting.project_domain %> + <%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:358px;" %> + <%= link_to l(:label_create_new_projects), new_project_path(course: 0, project_type: 0), :target => '_blank' %>

@@ -240,7 +255,10 @@

<%= l(:label_profile) %>: - <%= c_project.project.description.truncate(90, omission: '...') %> + + <%#= c_project.project.description.truncate(90, omission: '...') %> + <%= c_project.project.description %> +
@@ -276,7 +294,10 @@
<%= l(:label_profile) %>: - <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> + + <%#= c_softapplication.softapplication.description.truncate(90, omission: '...') %> + <%= c_softapplication.softapplication.description %> +
diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 7e11d8357..17f0d1e60 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -41,6 +41,7 @@ <%=link_to_user(User.current)%>