diff --git a/0) b/0) deleted file mode 100644 index 70d77d63e..000000000 --- a/0) +++ /dev/null @@ -1 +0,0 @@ -终止批处理操作吗(Y/N)? 终止批处理操作吗(Y/N)? 终止批处理操作吗(Y/N)? 终止批处理操作吗(Y/N)? \ No newline at end of file diff --git a/Gemfile b/Gemfile index f462133c3..634af9683 100644 --- a/Gemfile +++ b/Gemfile @@ -1,136 +1,125 @@ -source 'http://ruby.taobao.org' -#source 'http://ruby.sdutlinux.org/' - -unless RUBY_PLATFORM =~ /w32/ - # unix-like only - gem 'iconv' - gem 'rubyzip' - gem 'zip-zip' -end - -gem 'seems_rateable', path: 'lib/seems_rateable' -gem "rails", "3.2.13" -gem "jquery-rails", "~> 2.0.2" -gem "i18n", "~> 0.6.0" -gem "coderay", "~> 1.0.6" -gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] -gem "builder", "3.0.0" -gem 'acts-as-taggable-on', '2.4.1' -gem 'spreadsheet' -gem 'ruby-ole' - -group :development do - gem 'better_errors', path: 'lib/better_errors' - gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler' -end - -group :test do - gem "shoulda", "~> 3.5.0" - gem "mocha", "~> 1.1.0" - gem 'capybara', '~> 2.4.1' - gem 'nokogiri', '~> 1.6.3' - gem 'factory_girl', '~> 4.4.0' - gem 'selenium-webdriver', '~> 2.42.0' - - - platforms :mri, :mingw do - group :rmagick do - # RMagick 2 supports ruby 1.9 - # RMagick 1 would be fine for ruby 1.8 but Bundler does not support - # different requirements for the same gem on different platforms - gem "rmagick", ">= 2.0.0" - end - end -end - -group :development, :test do - gem "guard-rails", '~> 0.5.3' - gem 'spork-testunit', '~> 0.0.8' - gem 'guard-spork', '~> 1.5.1' - gem 'guard-test', '~> 1.0.0' - gem 'ruby-prof', '~> 0.15.1' unless RUBY_PLATFORM =~ /w32/ - gem 'pry' - gem 'pry-nav' - -end - - -# Gems used only for assets and not required -# in production environments by default. -group :assets do - gem 'sass-rails', '~> 3.2.3' - gem 'coffee-rails', '~> 3.2.1' - - # See https://github.com/sstephenson/execjs#readme for more supported runtimes - gem 'therubyracer', :platforms => :ruby - - gem 'uglifier', '>= 1.0.3' -end - -# Optional gem for LDAP authentication -group :ldap do - gem "net-ldap", "~> 0.3.1" -end - - -# Optional gem for OpenID authentication -group :openid do - gem "ruby-openid", "~> 2.1.4", :require => "openid" - gem "rack-openid" -end - -# Optional gem for exporting the gantt to a PNG file, not supported with jruby -platforms :jruby do - # jruby-openssl is bundled with JRuby 1.7.0 - gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0' - gem "activerecord-jdbc-adapter", "1.2.5" -end - -# Include database gems for the adapters found in the database -# configuration file -require 'erb' -require 'yaml' -database_file = File.join(File.dirname(__FILE__), "config/database.yml") -if File.exist?(database_file) - database_config = YAML::load(ERB.new(IO.read(database_file)).result) - adapters = database_config.values.map {|c| c['adapter']}.compact.uniq - if adapters.any? - adapters.each do |adapter| - case adapter - when 'mysql2' - gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw] - gem "activerecord-jdbcmysql-adapter", :platforms => :jruby - when 'mysql' - gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw] - gem "activerecord-jdbcmysql-adapter", :platforms => :jruby - when /postgresql/ - gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw] - gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby - when /sqlite3/ - gem "sqlite3", :platforms => [:mri, :mingw] - gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby - when /sqlserver/ - gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw] - gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw] - else - warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") - end - end - else - warn("No adapter found in config/database.yml, please configure it first") - end -else - warn("Please configure your config/database.yml first") -end - -local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") -if File.exists?(local_gemfile) - puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v` - instance_eval File.read(local_gemfile) -end - -# Load plugins' Gemfiles -Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file| - puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` - instance_eval File.read(file) -end +source 'https://rubygems.org' + +unless RUBY_PLATFORM =~ /w32/ + # unix-like only + gem 'iconv' + gem 'rubyzip' + gem 'zip-zip' +end + +gem 'seems_rateable', path: 'lib/seems_rateable' +gem "rails", "3.2.13" +gem "jquery-rails", "~> 2.0.2" +gem "i18n", "~> 0.6.0" +gem "coderay", "~> 1.0.6" +gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] +gem "builder", "3.0.0" +gem 'acts-as-taggable-on', '2.4.1' + +group :development do + gem 'better_errors', path: 'lib/better_errors' + gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler' + if ENV['PRY'] + gem 'pry' + gem 'pry-nav' + end +end + +group :test do + # shoulda鐨勭増鏈仛浜嗘敼鍔 + #gem "shoulda", "~> 3.3.2" + gem "shoulda", "> 3.3.2" + gem "mocha", "~> 0.13.3" + gem 'capybara', '~> 2.0.0' + gem 'nokogiri', '< 1.6.0' +end + + +# Gems used only for assets and not required +# in production environments by default. +group :assets do + gem 'sass-rails', '~> 3.2.3' + gem 'coffee-rails', '~> 3.2.1' + + # See https://github.com/sstephenson/execjs#readme for more supported runtimes + gem 'therubyracer', :platforms => :ruby + + gem 'uglifier', '>= 1.0.3' +end + +# Optional gem for LDAP authentication +group :ldap do + gem "net-ldap", "~> 0.3.1" +end + + +platforms :mri, :mingw do + group :rmagick do + # RMagick 2 supports ruby 1.9 + # RMagick 1 would be fine for ruby 1.8 but Bundler does not support + # different requirements for the same gem on different platforms + gem "rmagick", ">= 2.0.0" + end +end + +# Optional gem for OpenID authentication +group :openid do + gem "ruby-openid", "~> 2.1.4", :require => "openid" + gem "rack-openid" +end + +# Optional gem for exporting the gantt to a PNG file, not supported with jruby +platforms :jruby do + # jruby-openssl is bundled with JRuby 1.7.0 + gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0' + gem "activerecord-jdbc-adapter", "1.2.5" +end + +# Include database gems for the adapters found in the database +# configuration file +require 'erb' +require 'yaml' +database_file = File.join(File.dirname(__FILE__), "config/database.yml") +if File.exist?(database_file) + database_config = YAML::load(ERB.new(IO.read(database_file)).result) + adapters = database_config.values.map {|c| c['adapter']}.compact.uniq + if adapters.any? + adapters.each do |adapter| + case adapter + when 'mysql2' + gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw] + gem "activerecord-jdbcmysql-adapter", :platforms => :jruby + when 'mysql' + gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw] + gem "activerecord-jdbcmysql-adapter", :platforms => :jruby + when /postgresql/ + gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw] + gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby + when /sqlite3/ + gem "sqlite3", :platforms => [:mri, :mingw] + gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby + when /sqlserver/ + gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw] + gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw] + else + warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") + end + end + else + warn("No adapter found in config/database.yml, please configure it first") + end +else + warn("Please configure your config/database.yml first") +end + +local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") +if File.exists?(local_gemfile) + puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v` + instance_eval File.read(local_gemfile) +end + +# Load plugins' Gemfiles +Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file| + puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` + instance_eval File.read(file) +end diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 1a8506b12..e76fa31dc 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -19,7 +19,7 @@ class CoursesController < ApplicationController before_filter :authorize_course, :only => [:show, :settings, :edit, :update, :modules, :close, :reopen, :view_homework_attaches, :course] before_filter :authorize_course_global, :only => [:view_homework_attaches, :new,:create] before_filter :require_admin, :only => [:copy, :archive, :unarchive, :destroy, :calendar] - before_filter :toggleCourse, only: [:finishcourse, :restartcourse] + before_filter :toggleCourse, :only => [:finishcourse, :restartcourse] before_filter :require_login, :only => [:join, :unjoin] #before_filter :allow_join, :only => [:join] @@ -500,7 +500,8 @@ class CoursesController < ApplicationController end end - def course + def + course @school_id = params[:school_id] per_page_option = 10 if @school_id == "0" or @school_id.nil? diff --git a/app/controllers/poll_answer_controller.rb b/app/controllers/poll_answer_controller.rb new file mode 100644 index 000000000..521f7ed3f --- /dev/null +++ b/app/controllers/poll_answer_controller.rb @@ -0,0 +1,2 @@ +class PollAnswerController < ApplicationController +end \ No newline at end of file diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb new file mode 100644 index 000000000..a21fdb549 --- /dev/null +++ b/app/controllers/poll_controller.rb @@ -0,0 +1,2 @@ +class PollController < ApplicationController +end \ No newline at end of file diff --git a/app/controllers/poll_question_controller.rb b/app/controllers/poll_question_controller.rb new file mode 100644 index 000000000..46a75c0ab --- /dev/null +++ b/app/controllers/poll_question_controller.rb @@ -0,0 +1,2 @@ +class PollQuestionController < ApplicationController +end \ No newline at end of file diff --git a/app/controllers/poll_user_controller.rb b/app/controllers/poll_user_controller.rb new file mode 100644 index 000000000..0373fe085 --- /dev/null +++ b/app/controllers/poll_user_controller.rb @@ -0,0 +1,2 @@ +class PollUserController < ApplicationController +end \ No newline at end of file diff --git a/app/controllers/poll_vote_controller.rb b/app/controllers/poll_vote_controller.rb new file mode 100644 index 000000000..e77bdc622 --- /dev/null +++ b/app/controllers/poll_vote_controller.rb @@ -0,0 +1,2 @@ +class PollVoteController < ApplicationController +end \ No newline at end of file diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index fa0beb311..0fcf35aff 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -129,7 +129,7 @@ class UsersController < ApplicationController end def show_new_score - render :layout => false + render :layout => 'users_base' end # end @@ -188,9 +188,9 @@ class UsersController < ApplicationController for user in @watcher events << Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 30) end - - - + + + @events_by_day = events.group_by(&:event_date) unless User.current.admin? diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index c023a0ba3..8e11bceb5 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -62,13 +62,49 @@ class WelcomeController < ApplicationController @course_page = FirstPage.find_by_page_type('course') @school_id = params[:school_id] || User.current.user_extensions.school.try(:id) @logoLink ||= logolink() + + ##3-8鏈堜唤涓烘煡鎵炬槬瀛h绋嬶紝9-2鏈堜唤涓烘煡鎵剧瀛h绋 + #month_now = Time.now.strftime("%m").to_i + #year_now = Time.new.strftime("%Y").to_i + #(month_now >= 3 && month_now < 9) ? course_term = l(:label_spring) : course_term = l(:label_autumn) + ##year_now -= 1 if year_now < 3 + #@school_id.nil? ? @cur_school_course = [] : @cur_school_course = find_miracle_course(10,7,@school_id, year_now, course_term) + ##鏈櫥褰曟垨鑰呭綋鍓嶅鏍℃湭寮璁捐绋 + #if @cur_school_course.empty? + # @has_course = false + # User.current.logged? ? course_count = 9 : course_count = 10 + # @cur_school_course += find_all_new_hot_course(course_count, @school_id, year_now, course_term) + # while @cur_school_course.count < 9 do + # if course_term == l(:label_spring) + # course_term = l(:label_autumn) + # year_now -= 1 + # else + # course_term = l(:label_spring) + # end + # @cur_school_course += find_all_new_hot_course((10-@cur_school_course.count), nil, year_now, course_term) + # end + #else + # if @cur_school_course.count < 9 + # @has_course = false + # @cur_school_course += find_all_new_hot_course(9-@cur_school_course.count, @school_id, year_now, course_term) + # if @cur_school_course.count < 9 + # if course_term == l(:label_spring) + # course_term = l(:label_autumn) + # year_now -= 1 + # else + # course_term = l(:label_spring) + # end + # @cur_school_course += find_all_new_hot_course(9-@cur_school_course.count, nil, year_now, course_term) + # end + # else + # @has_course = true + # end + #end end - - - - def logolink() - @course_page = FirstPage.find_by_page_type('course') - logo = get_avatar?(@course_page) + + def logolink() + @course_page = FirstPage.find_by_page_type('course') + logo = get_avatar?(@course_page) id = params[:school_id] logo_link = "" if id.nil? && (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 096ce7ad8..a862753ef 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -20,7 +20,7 @@ module CoursesHelper # 杩斿洖鏁欏笀鏁伴噺锛屽嵆roles琛ㄤ腑瀹氫箟鐨凪anager def teacherCount project - searchTeacherAndAssistant(project).count + project.members.count - studentCount(project).to_i # or # searchTeacherAndAssistant(project).count end @@ -114,7 +114,7 @@ module CoursesHelper # 瀛︾敓浜烘暟璁$畻 # add by nwb def studentCount course - searchStudent(course).count.to_s#course.student.count + course.student.count.to_s#course.student.count end #璇剧▼鎴愬憳鏁拌绠 diff --git a/app/models/course.rb b/app/models/course.rb index 196e7168d..c11f66d49 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -38,7 +38,7 @@ class Course < ActiveRecord::Base validates_presence_of :password, :term,:name validates_format_of :class_period, :with =>/^[1-9]\d*$/ - validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/ + validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/ validates_length_of :description, :maximum => 10000 before_save :self_validate after_create :create_board_sync diff --git a/app/models/poll.rb b/app/models/poll.rb new file mode 100644 index 000000000..803ee6ac6 --- /dev/null +++ b/app/models/poll.rb @@ -0,0 +1,9 @@ +class Poll < ActiveRecord::Base + #attr_accessible :closed_at, :polls_group_id, :polls_name, :polls_status, :polls_type, :published_at, :user_id + include Redmine::SafeAttributes + + belongs_to :user + has_many :poll_questions, :dependent => :destroy + has_many :poll_users, :dependent => :destroy + has_many :users, :through => :poll_users #璇ユ枃浠惰鍝簺鐢ㄦ埛鎻愪氦绛旀杩 +end diff --git a/app/models/poll_answer.rb b/app/models/poll_answer.rb new file mode 100644 index 000000000..93c75da97 --- /dev/null +++ b/app/models/poll_answer.rb @@ -0,0 +1,7 @@ +class PollAnswer < ActiveRecord::Base + # attr_accessible :answer_position, :answer_text, :poll_questions_id + include Redmine::SafeAttributes + + belongs_to :poll_question + has_many :poll_votes, :dependent => :destroy +end diff --git a/app/models/poll_question.rb b/app/models/poll_question.rb new file mode 100644 index 000000000..66dcea67e --- /dev/null +++ b/app/models/poll_question.rb @@ -0,0 +1,8 @@ +class PollQuestion < ActiveRecord::Base + # attr_accessible :is_necessary, :polls_id, :question_title, :question_type + include Redmine::SafeAttributes + + belongs_to :poll + has_many :poll_answers, :dependent => :destroy + has_many :poll_votes, :dependent => :destroy +end diff --git a/app/models/poll_user.rb b/app/models/poll_user.rb new file mode 100644 index 000000000..e7a122da9 --- /dev/null +++ b/app/models/poll_user.rb @@ -0,0 +1,7 @@ +class PollUser < ActiveRecord::Base + # attr_accessible :poll_id, :user_id + include Redmine::SafeAttributes + + belongs_to :poll + belongs_to :user +end diff --git a/app/models/poll_vote.rb b/app/models/poll_vote.rb new file mode 100644 index 000000000..550563e38 --- /dev/null +++ b/app/models/poll_vote.rb @@ -0,0 +1,8 @@ +class PollVote < ActiveRecord::Base + # attr_accessible :poll_answers_id, :poll_questions_id, :user_id, :vote_text + include Redmine::SafeAttributes + + belongs_to :poll_answer + belongs_to :poll_question + belongs_to :user +end diff --git a/app/models/user.rb b/app/models/user.rb index e966742f1..735b80762 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -77,6 +77,13 @@ class User < Principal has_many :homework_attaches, :through => :homework_users has_many :homework_evaluations + #闂嵎鐩稿叧鍏冲叧绯 + has_many :poll_users, :dependent => :destroy + has_many :poll_votes, :dependent => :destroy + has_many :poll, :dependent => :destroy #鐢ㄦ埛鍒涘缓鐨勯棶鍗 + has_many :answers, :source => :poll, :through => :poll_users, :dependent => :destroy #鐢ㄦ埛宸茬粡瀹屾垚闂瓟鐨勯棶鍗 + # end + has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)}, :after_remove => Proc.new {|user, group| group.user_removed(user)} has_many :changesets, :dependent => :nullify diff --git a/app/views/contests/index.html.erb b/app/views/contests/index.html.erb index 75b892461..170f11037 100644 --- a/app/views/contests/index.html.erb +++ b/app/views/contests/index.html.erb @@ -10,7 +10,7 @@
diff --git a/app/views/layouts/base_contest.html.erb b/app/views/layouts/base_contest.html.erb index 6e980957b..d28456329 100644 --- a/app/views/layouts/base_contest.html.erb +++ b/app/views/layouts/base_contest.html.erb @@ -41,11 +41,14 @@
- <%= l(:label_user_joinin) %>锛 + | + <%= l(:label_user_joinin) %>锛 | <%= format_time(@user.created_on) %> | |
- <%= l(:label_user_login) %>锛 + | + <%= l(:label_user_login) %>锛 | <%= format_time(@user.last_login_on) %> @@ -239,8 +239,8 @@ <% unless @user.user_extensions.nil? %> <% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %> | |
- <%= l(:field_occupation) %>锛 + | + <%= l(:field_occupation) %>锛 | <% unless @user.user_extensions.school.nil? %> @@ -250,8 +250,8 @@ | |
- <%= l(:field_occupation) %>锛 + | + <%= l(:field_occupation) %>锛 | <%= @user.user_extensions.occupation %> @@ -259,8 +259,8 @@ | |
- <%= l(:label_company_name) %>锛 + | + <%= l(:label_company_name) %>锛 | <%= @user.firstname %> @@ -268,8 +268,8 @@ | |
- <%= l(:label_location) %>锛 + | + <%= l(:label_location) %>锛 | <%= @user.user_extensions.location %> @@ -278,8 +278,8 @@ | |
- <%= l(:label_technical_title) %>锛 + | + <%= l(:label_technical_title) %>锛 | @@ -289,8 +289,8 @@ <% if @user.user_extensions.identity == 1 %> <% if(is_watching?(@user) ) %> | |
- <%= l(:label_bidding_user_studentcode)%>锛 + | + <%= l(:label_bidding_user_studentcode)%>锛 | <%= @user.user_extensions.student_id %> @@ -298,7 +298,7 @@ | |
+ | <%= l(:label_identity)%>锛 | @@ -309,7 +309,7 @@ <% end %> <% elsif @user.user_extensions.identity == 3 %> | |
+ | <%= l(:label_identity)%>锛 |
diff --git a/app/views/layouts/users_base.html.erb b/app/views/layouts/users_base.html.erb
index d98ef3f46..b34609471 100644
--- a/app/views/layouts/users_base.html.erb
+++ b/app/views/layouts/users_base.html.erb
@@ -1,7 +1,7 @@
<% @nav_dispaly_home_path_label = 1
- @nav_dispaly_main_course_label = 1
- @nav_dispaly_main_project_label = 1
- @nav_dispaly_main_contest_label = 1 %>
+ @nav_dispaly_user_label = 1
+ @nav_dispaly_store_all_label = 1
+ %>
<% @nav_dispaly_forum_label = 1%>
@@ -39,12 +39,12 @@
- <%= l(:label_loading) %>
-
+<%= call_hook :view_layouts_base_body_bottom %>
diff --git a/app/views/projects/search.html.erb b/app/views/projects/search.html.erb
index 8e810b087..7a91082ca 100644
--- a/app/views/projects/search.html.erb
+++ b/app/views/projects/search.html.erb
@@ -10,7 +10,7 @@
|
+ |
<%= l(:label_course_practice) %> | <%= l(:label_user_location) %> : | -+ | <% if User.current.logged?%> <% if User.current.user_extensions.identity == 0 %> <%= link_to(l(:label_course_new), {:controller => 'projects', :action => 'new', :course => 1, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %> | @@ -35,7 +35,7 @@
<%= l(:label_project_deposit) %> | <%= l(:label_user_location) %> : | -+ |
<% if User.current.logged? %>
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
<% end %>
diff --git a/app/views/tags/_tag.html.erb b/app/views/tags/_tag.html.erb
index c08a3b553..21aefa511 100644
--- a/app/views/tags/_tag.html.erb
+++ b/app/views/tags/_tag.html.erb
@@ -77,10 +77,10 @@
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
-
+
<%= l(:button_project_tags_add)%>
- <%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();',:class=>'ButtonColor m3p10'%>
+ <%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();',:class=>'ButtonColor m3p10' ,:style=>"padding:3px 6px"%>
<% end %>
<% end %>
diff --git a/app/views/welcome/_link_to_another.html.erb b/app/views/welcome/_link_to_another.html.erb
index 14640897c..e9a19be4e 100644
--- a/app/views/welcome/_link_to_another.html.erb
+++ b/app/views/welcome/_link_to_another.html.erb
@@ -1,6 +1,6 @@
-
-
- <%=l(:label_projects_management_platform)%>
- <%=l(:label_courses_management_platform)%>
- <%=l(:label_contests_management_platform)%>
+
+
+ <%=l(:label_projects_management_platform)%>
+ <%=l(:label_courses_management_platform)%>
+ <%=l(:label_contests_management_platform)%>
\ No newline at end of file
diff --git a/app/views/welcome/_search_course.html.erb b/app/views/welcome/_search_course.html.erb
index fda9dae7c..5721af9fb 100644
--- a/app/views/welcome/_search_course.html.erb
+++ b/app/views/welcome/_search_course.html.erb
@@ -1,58 +1,58 @@
-<%
- select_option = []
- (select_option << ['椤圭洰', 'projects']) if project_type == Project::ProjectType_project
- (select_option << ['璇剧▼', 'courses']) if project_type == Project::ProjectType_course
- select_option << ['鐢ㄦ埛', 'users']
- #select_option << ['鏁欏笀', 'users_teacher'],
- #select_option << ['瀛︾敓', 'users_student']
-%>
-
-<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
-
-
-<% end %>
+<%
+ select_option = []
+ (select_option << ['椤圭洰', 'projects']) if project_type == Project::ProjectType_project
+ (select_option << ['璇剧▼', 'courses']) if project_type == Project::ProjectType_course
+ select_option << ['鐢ㄦ埛', 'users']
+ #select_option << ['鏁欏笀', 'users_teacher'],
+ #select_option << ['瀛︾敓', 'users_student']
+%>
+
+<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
+
- <%#= hidden_field_tag 'project_type', project_type %>
- <%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
-
+
+<% end %>
diff --git a/app/views/welcome/_search_project.html.erb b/app/views/welcome/_search_project.html.erb
index b86ff64f9..5922d4180 100644
--- a/app/views/welcome/_search_project.html.erb
+++ b/app/views/welcome/_search_project.html.erb
@@ -29,7 +29,7 @@ form #search_type{
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
border-left: 1px outset #83A9A9;
- margin-left: -4px;
+ margin-left: 0px;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 0.01px;
@@ -45,7 +45,7 @@ form #search_by
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
border-left: 1px outset #83A9A9;
- margin-left: -6px;
+ margin-left: 0px;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 0.01px;
@@ -87,13 +87,14 @@ form #search_by
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
+ <%#= hidden_field_tag 'project_type', project_type %>
+ <%= submit_tag l(:label_search), :class => "enterprise", :name => nil, :style => "float:right" %>
+
-
<% end %>
diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb
index 07696386f..c85b75797 100644
--- a/app/views/welcome/contest.html.erb
+++ b/app/views/welcome/contest.html.erb
@@ -119,6 +119,7 @@
}
})();
+
|