From 845186a600117e19ed6b73ac09217ad15c3e1aa2 Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 9 May 2014 14:27:08 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=8A=E8=AF=BE=E7=A8=8B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E7=9A=84=E5=AD=A6=E6=A0=A1=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=EF=BC=8C=E6=98=BE=E7=A4=BA=E8=80=81?= =?UTF-8?q?=E5=B8=88=E8=BA=AB=E4=BB=BD=E4=B8=AD=E7=9A=84=E5=AD=A6=E6=A0=A1?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/_course.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/projects/_course.html.erb b/app/views/projects/_course.html.erb index d65df0530..58168c999 100644 --- a/app/views/projects/_course.html.erb +++ b/app/views/projects/_course.html.erb @@ -17,9 +17,9 @@ <% @admin = @project.project_infos%> <%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%> - <% unless @project.course_extra.school.nil? %> - <%= @project.course_extra.school.name %> - <% end %> + <%# unless @project.course_extra.school.nil? %> + <%= @project.course_extra.teacher.user_extensions.school.try(:name) %> + <%# end %> <% end %>

From 4d8701220bfa50e6baa44dbbb379456e64bce3a7 Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 9 May 2014 17:08:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?-=E3=80=82-=20acoount.html=E5=AF=B9?= =?UTF-8?q?=E9=BD=90=E4=BA=86=E4=B8=80=E4=B8=8B=20=E5=AD=A6=E6=A0=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8school/index.html=E9=BB=98=E8=AE=A4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=85=A8=E9=83=A8=E5=AD=A6=E6=A0=A1=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=A1=AB=E5=86=99=E5=B7=A5=E4=BD=9C=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E7=9A=84=E7=94=A8=E6=88=B7=E5=BC=BA=E8=A1=8C=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E4=BF=AE=E6=94=B9=E8=B5=84=E6=96=99=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 13 +- app/controllers/school_controller.rb | 24 +- app/controllers/users_controller.rb | 8 + app/views/my/account.html.erb | 1118 +++++++++--------- app/views/school/index.html.erb | 11 +- app/views/users/_mail_notifications.html.erb | 2 +- app/views/users/show.html.erb | 2 +- config/locales/zh.yml | 2 + 8 files changed, 576 insertions(+), 604 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 769214d65..d3d426857 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -111,8 +111,7 @@ class AccountController < ApplicationController user_params = params[:user] || {} @user = User.new @user.safe_attributes = user_params - #这里判断 - if params[:identity] == "2" + if params[:identity] == "2" # 2 企业 @user.firstname = params[:enterprise_name] @user.lastname = l(:field_enterprise) end @@ -132,16 +131,6 @@ class AccountController < ApplicationController @user.login = params[:user][:login] unless user_params[:identity_url].present? && user_params[:password].blank? && user_params[:password_confirmation].blank? @user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation] - # system "htpasswd -mb "+@root_path+"user.passwd "+params[:user][:login]+" "+user_params[:password] - # system "echo -e '\n"+params[:user][:login]+"-write:"+ - # " "+params[:user][:login]+"' >> "+@root_path+"group.passwd" - # system "mkdir "+@root_path+"htdocs/"+params[:user][:login] -# - # system "echo -e 'Allow from all \n Order Deny,Allow \n "+ - # " \n"+ - # "Require group "+params[:user][:login]+"-write \n "+ - # " \n ' >>"+ - # @root_path+"htdocs/"+params[:user][:login]+"/.htaccess" end case Setting.self_registration diff --git a/app/controllers/school_controller.rb b/app/controllers/school_controller.rb index 5b405a27a..00faa51c5 100644 --- a/app/controllers/school_controller.rb +++ b/app/controllers/school_controller.rb @@ -41,9 +41,22 @@ class SchoolController < ApplicationController @provinces.each do |p| options << "" end - - render :text => options + @school = School.all + + options_s = "" + + @school.each do |s| + #options << "" + options_s << "

  • #{s.name}
  • " + end + res = Hash.new + res[:text] = options + res[:text_s] = options_s + + render :json => res + + end def get_options @@ -74,8 +87,11 @@ class SchoolController < ApplicationController end def search_school - @school = School.where("province = ? AND name LIKE '%"+params[:key_word]+"%'", params[:province]); - + if params[:province].nil? or params[:province] == "0" + @school = School.where("name LIKE '%"+params[:key_word]+"%'"); + else + @school = School.where("province = ? AND name LIKE '%"+params[:key_word]+"%'", params[:province]); + end options = "" @school.each do |s| options << "
  • #{s.name}
  • " diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d4248e3cc..f68555055 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -38,6 +38,7 @@ class UsersController < ApplicationController :user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index, :activity_score_index, :influence_score_index, :score_index] + before_filter :auth_user_extension, only: :show accept_api_auth :index, :show, :create, :update, :destroy,:tag_save #william @@ -735,4 +736,11 @@ class UsersController < ApplicationController def setting_layout(default_base='base_users') User.current.admin? ? 'base_admin' : default_base end + + def auth_user_extension + if @user.user_extensions.school.nil? + flash[:error] = l(:error_complete_occupation) + redirect_to my_account_path + end + end end diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 58f684009..7158037eb 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -1,604 +1,556 @@ - - - - - -
    - <%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %> - <%= call_hook(:view_my_account_contextual, :user => @user)%> + + + +
    + <%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %> + <%= call_hook(:view_my_account_contextual, :user => @user) %>
    -

    <%= l(:label_my_account)%>

    +

    <%= l(:label_my_account) %>

    - - <%= labelled_form_for :user, @user, - :url => { :action => "account" }, - :html => { :id => 'my_account_form', - :method => :post } do |f| %> - +<% end %> +<% html_title(l(:label_my_account)) -%> + -<% province = User.current.user_extensions.location %> -<% city = User.current.user_extensions.location_city %> -<% identity = User.current.user_extensions.identity %> -<% title = User.current.user_extensions.technical_title %> - + function showtechnical_title(identity, technical_titleField) { + switch (identity) { -

    <%= l(:label_location) %> - -

    - - - - - - - - -<% unless @user.user_extensions.identity == 2 %> -

    <%= l(:label_identity) %> - - - - - -<% else %> -<%= text_field_tag :no, nil, :placeholder => "请输入学号" %> - -<% end %> - -

    -<% else %> - - - -<% end %> - -
    - - - - - - - <% if Setting.openid? %> -

    - <%= f.text_field :identity_url %> -

    - <% end %> - - <% @user.custom_field_values.select(&:editable?).each do |value| %> -

    - <%= custom_field_tag_with_label :user, value %> -

    - <% end %> - <%= call_hook(:view_my_account, :user => @user, :form => f) %> - - - --> - - - - <%= submit_tag l(:button_save) %> - -<% end %> -<% html_title(l(:label_my_account)) -%> + case '0' : + $('#technical_title').show() + $('#no').hide() + $('#name').show() + $('#enterprise').hide() + $('#gender').show() + var technical_titleOptions = new Array( + "<%= l(:label_technicl_title_professor) %>", "<%= l(:label_technicl_title_associate_professor) %>", "<%= l(:label_technicl_title_lecturer) %>", "<%= l(:label_technicl_title_teaching_assistant) %>"); + break; + + case '1' : + $('#technical_title').hide() + $('#no').show() + $('#name').show() + $('#enterprise').hide() + $('#gender').show() + var titleOptions = new Array(""); + break; + + case '2' : + $('#technical_title').hide() + $('#no').hide() + $('#name').hide() + $('#enterprise').show() + $('#gender').hide() + var titleOptions = new Array(""); + break; + default: + $('#technical_title').hide() + $('#no').hide() + $('#name').show() + $('#enterprise').hide() + $('#gender').show() + var titleOptions = new Array(""); + + break; + + } + technical_titleField.options.length = 0; + for (var i = 0; i < technical_titleOptions.length; i++) { + technical_titleField.options[i] = new Option(technical_titleOptions[i], technical_titleOptions[i]); + /* + if (cityField.options[i].value==city) + { + //alert("here put City ok!"); + document.oblogform["city"].selectedIndex = i; + }*/ + } + } + \ No newline at end of file diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index 06b294f89..755bd3151 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -4,12 +4,17 @@ $(document).ready(function() { $("#province").html(""); + + + $.ajax({ type :"POST", url :'/school/get_province', - data :'text', - success: function(data){ - $("#province").append(data); + data: "send", + success: function(data, textStatus){ + + $("#province").append(data.text); + $("#schoollist").html(data.text_s); } }) diff --git a/app/views/users/_mail_notifications.html.erb b/app/views/users/_mail_notifications.html.erb index ee6ccb00b..47face839 100644 --- a/app/views/users/_mail_notifications.html.erb +++ b/app/views/users/_mail_notifications.html.erb @@ -1,5 +1,5 @@

    -<%= label_tag "user_mail_notification", l(:description_user_mail_notification), :class => "hidden-for-sighted" %> +<%= label_tag "user_mail_notification", l(:description_user_mail_notification), :class => "hidden-for-sighted_bak" %> <%= select_tag( 'user[mail_notification]', options_for_select( diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index dd912cfe6..8168060e5 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -244,7 +244,7 @@

    <% else %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 26d3f6682..b8378c0d7 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -185,6 +185,8 @@ zh: notice_unable_delete_time_entry: 无法删除工时 notice_issue_done_ratios_updated: 问题完成度已更新。 notice_gantt_chart_truncated: "这个表是截断的因为它超过了可以显示的最大数量(%{max})" + + error_complete_occupation: "请您填写工作单位,否则本系统的部分功能将无法正常使用。" error_can_t_load_default_data: "无法载入默认设置:%{value}" error_scm_not_found: "版本库中不存在该条目和(或)其修订版本。" From 19ddb38e1b030a6e8575255091b7fc2275f7b0f3 Mon Sep 17 00:00:00 2001 From: yanxd Date: Sat, 10 May 2014 09:22:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=AD=97=E6=AE=B5=E5=90=88=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 27 ++++ app/views/account/register.html.erb | 39 +++++- config/locales/en.yml | 2 + config/locales/zh.yml | 3 + config/routes.rb | 181 +++++++++++++------------- public/stylesheets/nyan.css | 9 ++ 6 files changed, 168 insertions(+), 93 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index d3d426857..cf39898fe 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -172,6 +172,33 @@ class AccountController < ApplicationController redirect_to signin_path end + def valid_ajax + req = Hash.new(false) + req[:message] = '' + + valid_attr = params[:valid] + valid_value = params[:value] + + faker = User.new + + if valid_attr.eql?('login') + faker.login = valid_value + faker.valid? + req[:valid] = faker.errors[:login].blank? + req[:message] = faker.errors[:login] + end + + if valid_attr.eql?('mail') + faker.mail = valid_value + faker.valid? + req[:valid] = faker.errors[:mail].blank? + req[:message] = faker.errors[:mail] + end + + req[:message] = l(:modal_valid_passing) if req[:message].blank? + render :json => req + end + private def authenticate_user diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index 7f729552e..f24f7d052 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -278,8 +278,8 @@ <% if @user.auth_source_id.nil? %> -

    <%= f.text_field :login, :size => 25, :required => true %> - <%= l(:label_max_number) %>

    +

    <%= f.text_field :login, :size => 25, :required => true %> + <%= l(:label_max_number) %>

    <%= f.password_field :password, :size => 25, :required => true %> <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>

    @@ -294,7 +294,7 @@ <%= text_field_tag :enterprise_name %>

    -

    <%= f.text_field :mail, :required => true %>

    +

    <%= f.text_field :mail, :required => true %>

    <%="#{l(:label_mail_attention)} "%>

    <%= f.select :language, lang_options_for_select , :required => true %>

    @@ -368,3 +368,36 @@ + \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 08255e98d..1d2e9b6c3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1603,3 +1603,5 @@ en: label_activity_time: publish date + # ajax异步验证 + modal_valid_passing: can be used. \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index b8378c0d7..1fac59ddf 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1885,4 +1885,7 @@ zh: label_relation_files: 关联已有资源 label_contest_settings: 配置竞赛 label_contest_delete: 删除竞赛 + + # ajax异步验证 + modal_valid_passing: 可以使用 \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index be0d11cea..e0d1f6fb4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -16,73 +16,73 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. RedmineApp::Application.routes.draw do - resources :no_uses - delete 'no_uses', :to => 'no_uses#delete' - - resources :apply_project_masters - delete 'apply_project_masters', :to => 'apply_project_masters#delete' - - - resources :open_source_projects do - collection do - match 'search', via: [:get, :post] - match 'remove_condition', via: [:get, :post] - end - resources :relative_memos - member do - match 'master_apply', via: [:get, :post] - match 'accept_master_apply', via: [:get, :post] - match 'refuse_master_apply', via: [:get, :post] - end - end - mount SeemsRateable::Engine => '/rateable', :as => :rateable - - namespace :zipdown do - match 'assort' - end - namespace :test do - match 'courselist' - match 'zip' - end - ##new added by linchun #以发布应用的形式参与竞赛 - resources :softapplications do - - collection do - match 'new_message', via: :get - end - member do - match 'create_message' , via: :post - end - end - - ## new added by linchun #新竞赛相关 - resources :contests, only: [:index] do - collection do - match 'new_contest' , via: :get - match 'join_in_contest' , via: :post - match 'unjoin_in_contest' , via: :delete - match 'create_contest' , via: :post - match 'new_join' , via: :post - match 'new' , via: :post - end - member do - match 'add_softapplication' - match 'update_contest' , via: [:put] - match 'show_contest' , via: :get - match 'show_project' , via: :get - match 'show_softapplication', via: :get - match 'show_participator' , via: :get - match 'add' , via: [:get, :post] - match 'add_softapplication' , via: [:get, :post] - match 'create' , via: :post - match 'settings' , via: [:get, :post] - end - end - + resources :no_uses + delete 'no_uses', :to => 'no_uses#delete' + + resources :apply_project_masters + delete 'apply_project_masters', :to => 'apply_project_masters#delete' + + + resources :open_source_projects do + collection do + match 'search', via: [:get, :post] + match 'remove_condition', via: [:get, :post] + end + resources :relative_memos + member do + match 'master_apply', via: [:get, :post] + match 'accept_master_apply', via: [:get, :post] + match 'refuse_master_apply', via: [:get, :post] + end + end + mount SeemsRateable::Engine => '/rateable', :as => :rateable + + namespace :zipdown do + match 'assort' + end + namespace :test do + match 'courselist' + match 'zip' + end + ##new added by linchun #以发布应用的形式参与竞赛 + resources :softapplications do + + collection do + match 'new_message', via: :get + end + member do + match 'create_message' , via: :post + end + end + + ## new added by linchun #新竞赛相关 + resources :contests, only: [:index] do + collection do + match 'new_contest' , via: :get + match 'join_in_contest' , via: :post + match 'unjoin_in_contest' , via: :delete + match 'create_contest' , via: :post + match 'new_join' , via: :post + match 'new' , via: :post + end + member do + match 'add_softapplication' + match 'update_contest' , via: [:put] + match 'show_contest' , via: :get + match 'show_project' , via: :get + match 'show_softapplication', via: :get + match 'show_participator' , via: :get + match 'add' , via: [:get, :post] + match 'add_softapplication' , via: [:get, :post] + match 'create' , via: :post + match 'settings' , via: [:get, :post] + end + end + resources :stores do collection do match 'search', via: [:get, :post] - end + end end resources :forums do @@ -100,20 +100,20 @@ RedmineApp::Application.routes.draw do end end - resources :shares + resources :shares #added by william get "tags/index" - + get "tags/show" - + get "praise_tread/praise_plus" get "praise_tread/tread_plus" #end root :to => 'welcome#index', :as => 'home' - + #added by baiyu match 'git_usage/ch_usage', :controller => 'git_usage', :action => 'ch_usage', :via => :get, :as => 'ch_usage' match 'git_usage/en_usage', :controller => 'git_usage', :action => 'en_usage', :via => :get, :as => 'en_usage' @@ -126,6 +126,7 @@ RedmineApp::Application.routes.draw do match 'account/register', :to => 'account#register', :via => [:get, :post], :as => 'register' match 'account/lost_password', :to => 'account#lost_password', :via => [:get, :post], :as => 'lost_password' match 'account/activate', :to => 'account#activate', :via => :get + match 'account/valid_ajax', :to => 'account#valid_ajax', :via => :get match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news', :via => [:get, :post, :put] match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put] @@ -167,21 +168,21 @@ RedmineApp::Application.routes.draw do get 'projects/:id/issues/report', :to => 'reports#issue_report', :as => 'project_issues_report' get 'projects/:id/issues/report/:detail', :to => 'reports#issue_report_details', :as => 'project_issues_report_details' post '/users/:id/user_activities', :to => 'users#show', :as => "user_activities" - + #added by young - resources :users do + resources :users do member do match 'user_projects', :to => 'users#user_projects', :via => :get match 'user_activities', :to => 'users#show', :via => :get, :as => "user_activities" - match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback" - match 'watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post] + match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback" + match 'watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post] match 'info', :to => 'users#info', :via => [:get , :post], :as => 'user_info' match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang match 'user_courses', :to => 'users#user_courses', :via => :get match 'user_homeworks', :to => 'users#user_homeworks', :via => :get - match 'watch_projects', :to => 'users#watch_projects', :via => :get - # added by bai + match 'watch_projects', :to => 'users#watch_projects', :via => :get + # added by bai match 'show_score', :to => 'users#show_score', :via => :get match 'topic_score_index', :controller => 'users', :action => 'topic_score_index', :via => [:get, :post] match 'project_score_index', :to => 'users#project_score_index', :via => :get @@ -195,13 +196,13 @@ RedmineApp::Application.routes.draw do match 'file_score_index', :to => 'projects#file_score_index', :via => [:get, :post] match 'code_submit_score_index', :to => 'projects#code_submit_score_index', :via => [:get, :post] match 'projects_topic_score_index', :to => 'projects#projects_topic_score_index', :via => [:get, :post] - # end + # end end end match 'users/:id/user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "feedback" match 'users/:id/user_projects', :controller => 'users', :action => 'user_projects', :via => :get - #match 'user/:id/watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post] - + #match 'user/:id/watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post] + #end match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :post] match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post] @@ -276,7 +277,7 @@ RedmineApp::Application.routes.draw do # get 'projects/:project_id/repository', :to => 'repositories#show', :as => 'project_repository' # match '/show', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get - match '/watcherlist', :controller=>'projects', :action=> 'watcherlist', :as => 'watcherlist', :via => :get #add by huang + match '/watcherlist', :controller=>'projects', :action=> 'watcherlist', :as => 'watcherlist', :via => :get #add by huang # matche '/news', :controller => 'news', :action => 'index', :as => 'news', :via => :get #end @@ -326,7 +327,7 @@ RedmineApp::Application.routes.draw do resources :repositories, :except => [:index, :show] do member do get 'newrepo', :via => [:get, :post] - # get 'create', :via=>[:get, :post] + # get 'create', :via=>[:get, :post] end end match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get @@ -518,10 +519,10 @@ RedmineApp::Application.routes.draw do match 'uploads', :to => 'attachments#upload', :via => :post # Added by Tao - match 'upload_avatar', :to => 'avatar#upload', :via => :post + match 'upload_avatar', :to => 'avatar#upload', :via => :post # Endof Tao's code get 'robots.txt', :to => 'welcome#robots' - + ##############测试留言功能 fq post 'words/new', :to => 'words#new' post 'words/create', :to => 'words#create' @@ -545,7 +546,7 @@ RedmineApp::Application.routes.draw do match 'calls/:id/new_submit_homework', to: 'bids#new_submit_homework', via: :get, as: 'new_submit_homework' match 'words/add_project_respond', :controller => 'words', :action => 'add_project_respond' match 'words/:id/leave_project_message', :controller => 'words', :action => 'leave_project_message' - + match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback' match 'calls/create_bid', :to => 'bids#create_bid' match 'contest/create_contest', :to => 'bids#create_contest' #huang @@ -559,24 +560,24 @@ RedmineApp::Application.routes.draw do match 'calls/:id/show_course', :to => 'bids#show_course', :as => 'show_course' match 'calls/:id/show_bid_project', :to => 'bids#show_bid_project', :as => 'show_bid_project' match 'calls/:id/show_bid_user', :to => 'bids#show_bid_user', :as => 'show_bid_user' - + match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share - - post 'join_in/join', :to => 'courses#join', :as => 'join' + + post 'join_in/join', :to => 'courses#join', :as => 'join' delete 'join_in/join', :to => 'courses#unjoin' post 'calls/:id/join_in_contest', :to => 'bids#join_in_contest', :as => 'join_in_contest' delete 'calls/:id/join_in_contest', :to => 'bids#unjoin_in_contest' match 'calls/:id/show_participator', :to => 'bids#show_participator' #bai match 'calls/:id/update_contest', :to => 'bids#update_contest' #bai match 'calls/:id/settings', :to => 'bids#settings' #bai - + delete 'attachment/:id', :to => 'attachments#delete_homework' match 'new_join', :to => 'projects#new_join', :as => 'try_join' match 'new_join_in_contest', :to => 'bids#new_join', :as => 'try_join_in_contest' match 'projects/:id/respond', :to => 'projects#project_respond', :via => :post match 'calls/:id/manage',:to => 'bids#manage',:via => [:get,:post] match 'project/course', :to => 'projects#course', :as => 'course' - + #added by william # match 'calls/:id/set_results',:controller => 'bids', :action => 'set_results',:via => [:get,:post],:as => 'set_results' # match 'calls/:id/set_prizes',:controller => 'bids',:action => 'set_prizes',:as => 'set_prizes' @@ -584,10 +585,10 @@ RedmineApp::Application.routes.draw do # added by young match 'calls', :controller => 'bids', :action => 'index' - + match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond' match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403 - + ######################## ##added by wen########## @@ -616,7 +617,7 @@ RedmineApp::Application.routes.draw do match 'parise_tread/tread_plus',:to => 'parise_tread#tread_plus',:as=>"tread" match 'tags/delete',:to=>'tags#delete' match 'tags/remove_tag',:to=>'tags#remove_tag',:as=>"remove_tag" - + match 'words/add_brief_introdution', :controller => 'words', :action => 'add_brief_introdution' Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir| diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index 85751a088..5645e375e 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -1,5 +1,14 @@ /* TODO: base/common/page 准备封装一些基本样式组合调用 参考YUI *******************************************************************************/ +span[id^=valid_user]{ + padding-left: 10px; +} +.red{ + color: red; +} +.green{ + color: green; +} .border_box { -webkit-box-sizing: border-box; -moz-box-sizing: border-box;