| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
4917d82174 | remove course from header | 12 years ago |
|
|
5215f64cfd | delete weichat icon from welcome#index | 12 years ago |
|
|
a9aae59b28 | issue id bug, readme | 12 years ago |
|
|
85c99d6abe | 首页,页脚,migrate的整理,个人页面课程tab的删除,登录语言文件的添加,导航栏的修改 | 12 years ago |
|
|
4ed8e1defa | add robots picture to welcome index page | 12 years ago |
|
|
284b0b15f6 | for president do | 12 years ago |
| @@ -32,7 +32,7 @@ group :assets do | |||||
| gem 'coffee-rails', '~> 3.2.1' | gem 'coffee-rails', '~> 3.2.1' | ||||
| # See https://github.com/sstephenson/execjs#readme for more supported runtimes | # See https://github.com/sstephenson/execjs#readme for more supported runtimes | ||||
| # gem 'therubyracer', :platforms => :ruby | |||||
| gem 'therubyracer', :platforms => :ruby | |||||
| gem 'uglifier', '>= 1.0.3' | gem 'uglifier', '>= 1.0.3' | ||||
| end | end | ||||
| @@ -42,14 +42,6 @@ group :ldap do | |||||
| gem "net-ldap", "~> 0.3.1" | gem "net-ldap", "~> 0.3.1" | ||||
| 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 | |||||
| platforms :mri, :mingw do | platforms :mri, :mingw do | ||||
| group :rmagick do | group :rmagick do | ||||
| @@ -52,15 +52,6 @@ GEM | |||||
| rails (>= 3, < 5) | rails (>= 3, < 5) | ||||
| arel (3.0.2) | arel (3.0.2) | ||||
| builder (3.0.0) | builder (3.0.0) | ||||
| capybara (2.0.3) | |||||
| mime-types (>= 1.16) | |||||
| nokogiri (>= 1.3.3) | |||||
| rack (>= 1.0.0) | |||||
| rack-test (>= 0.5.4) | |||||
| selenium-webdriver (~> 2.0) | |||||
| xpath (~> 1.0.0) | |||||
| childprocess (0.5.3) | |||||
| ffi (~> 1.0, >= 1.0.11) | |||||
| coderay (1.0.9) | coderay (1.0.9) | ||||
| coffee-rails (3.2.2) | coffee-rails (3.2.2) | ||||
| coffee-script (>= 2.2.0) | coffee-script (>= 2.2.0) | ||||
| @@ -68,30 +59,28 @@ GEM | |||||
| coffee-script (2.2.0) | coffee-script (2.2.0) | ||||
| coffee-script-source | coffee-script-source | ||||
| execjs | execjs | ||||
| coffee-script-source (1.6.1) | |||||
| coffee-script-source (1.3.3) | |||||
| erubis (2.7.0) | erubis (2.7.0) | ||||
| execjs (1.4.0) | execjs (1.4.0) | ||||
| multi_json (~> 1.0) | multi_json (~> 1.0) | ||||
| fastercsv (1.5.0) | |||||
| ffi (1.9.3-x86-mingw32) | |||||
| hike (1.2.3) | |||||
| fastercsv (1.5.4) | |||||
| hike (1.2.1) | |||||
| i18n (0.6.1) | i18n (0.6.1) | ||||
| iconv (1.0.4) | |||||
| journey (1.0.4) | journey (1.0.4) | ||||
| jquery-rails (2.0.3) | jquery-rails (2.0.3) | ||||
| railties (>= 3.1.0, < 5.0) | railties (>= 3.1.0, < 5.0) | ||||
| thor (~> 0.14) | thor (~> 0.14) | ||||
| json (1.8.0) | |||||
| mail (2.5.4) | |||||
| json (1.7.7) | |||||
| libv8 (3.11.8.13) | |||||
| mail (2.5.3) | |||||
| i18n (>= 0.4.0) | |||||
| mime-types (~> 1.16) | mime-types (~> 1.16) | ||||
| treetop (~> 1.4.8) | treetop (~> 1.4.8) | ||||
| metaclass (0.0.4) | |||||
| mime-types (1.23) | |||||
| mocha (0.13.3) | |||||
| metaclass (~> 0.0.1) | |||||
| multi_json (1.7.6) | |||||
| mysql2 (0.3.11-x86-mingw32) | |||||
| mime-types (1.19) | |||||
| multi_json (1.5.0) | |||||
| mysql2 (0.3.11) | |||||
| net-ldap (0.3.1) | net-ldap (0.3.1) | ||||
| nokogiri (1.5.11-x86-mingw32) | |||||
| polyglot (0.3.3) | polyglot (0.3.3) | ||||
| rack (1.4.5) | rack (1.4.5) | ||||
| rack-cache (1.2) | rack-cache (1.2) | ||||
| @@ -99,9 +88,9 @@ GEM | |||||
| rack-openid (1.3.1) | rack-openid (1.3.1) | ||||
| rack (>= 1.1.0) | rack (>= 1.1.0) | ||||
| ruby-openid (>= 2.1.8) | ruby-openid (>= 2.1.8) | ||||
| rack-ssl (1.3.3) | |||||
| rack-ssl (1.3.2) | |||||
| rack | rack | ||||
| rack-test (0.6.2) | |||||
| rack-test (0.6.1) | |||||
| rack (>= 1.0) | rack (>= 1.0) | ||||
| rails (3.2.13) | rails (3.2.13) | ||||
| actionmailer (= 3.2.13) | actionmailer (= 3.2.13) | ||||
| @@ -118,48 +107,40 @@ GEM | |||||
| rake (>= 0.8.7) | rake (>= 0.8.7) | ||||
| rdoc (~> 3.4) | rdoc (~> 3.4) | ||||
| thor (>= 0.14.6, < 2.0) | thor (>= 0.14.6, < 2.0) | ||||
| rake (10.3.2) | |||||
| rdoc (3.12.2) | |||||
| rake (0.9.2.2) | |||||
| rdoc (3.12) | |||||
| json (~> 1.4) | json (~> 1.4) | ||||
| rmagick (2.13.2) | |||||
| ref (1.0.2) | |||||
| rmagick (2.13.1) | |||||
| ruby-openid (2.1.8) | ruby-openid (2.1.8) | ||||
| rubyzip (1.1.4) | |||||
| sass (3.2.7) | |||||
| sass-rails (3.2.6) | |||||
| rubyzip (1.0.0) | |||||
| sass (3.1.20) | |||||
| sass-rails (3.2.5) | |||||
| railties (~> 3.2.0) | railties (~> 3.2.0) | ||||
| sass (>= 3.1.10) | sass (>= 3.1.10) | ||||
| tilt (~> 1.3) | tilt (~> 1.3) | ||||
| selenium-webdriver (2.42.0) | |||||
| childprocess (>= 0.5.0) | |||||
| multi_json (~> 1.0) | |||||
| rubyzip (~> 1.0) | |||||
| websocket (~> 1.0.4) | |||||
| shoulda (3.5.0) | |||||
| shoulda-context (~> 1.0, >= 1.0.1) | |||||
| shoulda-matchers (>= 1.4.1, < 3.0) | |||||
| shoulda-context (1.2.1) | |||||
| shoulda-matchers (2.6.1) | |||||
| activesupport (>= 3.0.0) | |||||
| sprockets (2.2.2) | |||||
| sprockets (2.2.1) | |||||
| hike (~> 1.2) | hike (~> 1.2) | ||||
| multi_json (~> 1.0) | multi_json (~> 1.0) | ||||
| rack (~> 1.0) | rack (~> 1.0) | ||||
| tilt (~> 1.1, != 1.3.0) | tilt (~> 1.1, != 1.3.0) | ||||
| thor (0.18.1) | |||||
| tilt (1.4.1) | |||||
| treetop (1.4.14) | |||||
| therubyracer (0.11.3) | |||||
| libv8 (~> 3.11.8.12) | |||||
| ref | |||||
| thor (0.15.4) | |||||
| tilt (1.3.3) | |||||
| treetop (1.4.10) | |||||
| polyglot | polyglot | ||||
| polyglot (>= 0.3.1) | polyglot (>= 0.3.1) | ||||
| tzinfo (0.3.37) | |||||
| uglifier (1.0.3) | |||||
| tzinfo (0.3.33) | |||||
| uglifier (1.2.6) | |||||
| execjs (>= 0.3.0) | execjs (>= 0.3.0) | ||||
| multi_json (>= 1.0.2) | |||||
| websocket (1.0.7) | |||||
| xpath (1.0.0) | |||||
| nokogiri (~> 1.3) | |||||
| multi_json (~> 1.3) | |||||
| zip-zip (0.3) | |||||
| rubyzip (>= 1.0.0) | |||||
| PLATFORMS | PLATFORMS | ||||
| x86-mingw32 | |||||
| ruby | |||||
| DEPENDENCIES | DEPENDENCIES | ||||
| activerecord-jdbc-adapter (= 1.2.5) | activerecord-jdbc-adapter (= 1.2.5) | ||||
| @@ -167,22 +148,22 @@ DEPENDENCIES | |||||
| acts-as-taggable-on (= 2.4.1) | acts-as-taggable-on (= 2.4.1) | ||||
| better_errors! | better_errors! | ||||
| builder (= 3.0.0) | builder (= 3.0.0) | ||||
| capybara (~> 2.0.0) | |||||
| coderay (~> 1.0.6) | coderay (~> 1.0.6) | ||||
| coffee-rails (~> 3.2.1) | coffee-rails (~> 3.2.1) | ||||
| fastercsv (~> 1.5.0) | fastercsv (~> 1.5.0) | ||||
| i18n (~> 0.6.0) | i18n (~> 0.6.0) | ||||
| iconv | |||||
| jquery-rails (~> 2.0.2) | jquery-rails (~> 2.0.2) | ||||
| mocha (~> 0.13.3) | |||||
| mysql2 (~> 0.3.11) | mysql2 (~> 0.3.11) | ||||
| net-ldap (~> 0.3.1) | net-ldap (~> 0.3.1) | ||||
| nokogiri (< 1.6.0) | |||||
| rack-mini-profiler! | rack-mini-profiler! | ||||
| rack-openid | rack-openid | ||||
| rails (= 3.2.13) | rails (= 3.2.13) | ||||
| rmagick (>= 2.0.0) | rmagick (>= 2.0.0) | ||||
| ruby-openid (~> 2.1.4) | ruby-openid (~> 2.1.4) | ||||
| rubyzip | |||||
| sass-rails (~> 3.2.3) | sass-rails (~> 3.2.3) | ||||
| seems_rateable! | seems_rateable! | ||||
| shoulda (> 3.3.2) | |||||
| therubyracer | |||||
| uglifier (>= 1.0.3) | uglifier (>= 1.0.3) | ||||
| zip-zip | |||||
| @@ -50,4 +50,12 @@ app\controller\welcome_controller.rb | |||||
| 0606:新坑 | 0606:新坑 | ||||
| user_scores表结构有问题,需要运行 | user_scores表结构有问题,需要运行 | ||||
| bundle exec rake db:migrate:down VERSION=20140410021724 | bundle exec rake db:migrate:down VERSION=20140410021724 | ||||
| bundle exec rake db:migrate:up VERSION=20140410021724 | |||||
| bundle exec rake db:migrate:up VERSION=20140410021724 | |||||
| ================================================================================ | |||||
| 0626:新坑 journal_replies 无法删除问题 | |||||
| journal_replies表没有主键,在对User调用destroy方法时候,rails默认调用查找id删除的方法,journal_replies没有id字段,导致删除失败 | |||||
| ================================================================================ | |||||
| 首页:我要提问 我要反馈两个链接 | |||||
| 依次对应 新手讨论 网站建议 两个论坛的发帖,没有建立论坛就返回首页 | |||||
| @@ -893,8 +893,9 @@ class BidsController < ApplicationController | |||||
| def memberAccess | def memberAccess | ||||
| # 是课程,则判断当前用户是否参加了课程 | # 是课程,则判断当前用户是否参加了课程 | ||||
| return true unless @bid.reward_type.eql?(Bid::Homework) | |||||
| return true if current_user.admin? | return true if current_user.admin? | ||||
| return 0 if @bid.courses.first.project_type == Project::ProjectType_project | |||||
| return 0 if @bid.courses.first.try(:project_type) == Project::ProjectType_project | |||||
| currentUser = User.current | currentUser = User.current | ||||
| render_403 unless currentUser.member_of?(@bid.courses.first) | render_403 unless currentUser.member_of?(@bid.courses.first) | ||||
| end | end | ||||
| @@ -116,17 +116,17 @@ class RepositoriesController < ApplicationController | |||||
| if request.post? && @repository.save | if request.post? && @repository.save | ||||
| if(params[:repository_scm]=="Git") | if(params[:repository_scm]=="Git") | ||||
| system "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+" "+@repository_tag | system "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+" "+@repository_tag | ||||
| system "echo -e '"+@repo_name+"-write:"+ | |||||
| " "+@repo_name+"' >> "+@root_path+"group.passwd" | |||||
| #system "echo -e '"+@repo_name+"-write:"+ | |||||
| # " "+@repo_name+"' >> "+@root_path+"group.passwd" | |||||
| system "mkdir "+@root_path+"htdocs/"+User.current.login.to_s | system "mkdir "+@root_path+"htdocs/"+User.current.login.to_s | ||||
| system "git init --bare "+@project_path | system "git init --bare "+@project_path | ||||
| system "mv "+@project_path+"/hooks/post-update{.sample,}" | |||||
| system "chmod a+x "+@project_path+"/hooks/post-update" | |||||
| system "echo -e 'Allow from all \n Order Deny,Allow \n "+ | |||||
| "<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+ | |||||
| "Require group "+@repo_name+"-write \n "+ | |||||
| "</Limit> \n ' >> "+ | |||||
| @root_path+"htdocs/"+ @repository_name+"/.htaccess" | |||||
| #system "mv "+@project_path+"/hooks/post-update{.sample,}" | |||||
| #system "chmod a+x "+@project_path+"/hooks/post-update" | |||||
| #system "echo -e 'Allow from all \n Order Deny,Allow \n "+ | |||||
| # "<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+ | |||||
| # "Require group "+@repo_name+"-write \n "+ | |||||
| # "</Limit> \n ' >> "+ | |||||
| # @root_path+"htdocs/"+ @repository_name+"/.htaccess" | |||||
| system "cd "+@project_path+" ;git update-server-info" | system "cd "+@project_path+" ;git update-server-info" | ||||
| # if(create_repo_file&&create_passwd&&create_group&&init_repository&&add_privilege&&init_server_info) | # if(create_repo_file&&create_passwd&&create_group&&init_repository&&add_privilege&&init_server_info) | ||||
| # else | # else | ||||
| @@ -816,7 +816,8 @@ class UsersController < ApplicationController | |||||
| # 必填自己的工作单位,其实就是学校 | # 必填自己的工作单位,其实就是学校 | ||||
| def auth_user_extension | def auth_user_extension | ||||
| if @user == User.current && @user.user_extensions.school.nil? | |||||
| user_identity = @user.extensions.identity | |||||
| if @user == User.current && (user_identity.eql?(User::TEACHER)||user_identity.eql?(User::STUDENT) ) && @user.user_extensions.school.nil? | |||||
| flash[:error] = l(:error_complete_occupation) | flash[:error] = l(:error_complete_occupation) | ||||
| redirect_to my_account_path | redirect_to my_account_path | ||||
| end | end | ||||
| @@ -1661,7 +1661,7 @@ module ApplicationHelper | |||||
| #@nav_dispaly_project_label | #@nav_dispaly_project_label | ||||
| nav_list = Array.new | nav_list = Array.new | ||||
| nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label | |||||
| #nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label | |||||
| nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label | nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label | ||||
| nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label | nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label | ||||
| @@ -20,7 +20,7 @@ | |||||
| module RepositoriesHelper | module RepositoriesHelper | ||||
| ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/" | ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/" | ||||
| PROJECT_PATH_CUT = 40 | PROJECT_PATH_CUT = 40 | ||||
| REPO_IP_ADDRESS = "repository.trustie.net" | |||||
| REPO_IP_ADDRESS = "10.0.47.204:8082" | |||||
| def format_revision(revision) | def format_revision(revision) | ||||
| if revision.respond_to? :format_identifier | if revision.respond_to? :format_identifier | ||||
| @@ -223,7 +223,7 @@ class Issue < ActiveRecord::Base | |||||
| end | end | ||||
| def to_param | def to_param | ||||
| @to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize | |||||
| @to_param ||= "#{id} #{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})".parameterize | |||||
| end | end | ||||
| # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields | # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields | ||||
| @@ -98,7 +98,7 @@ class User < Principal | |||||
| has_many :softapplications, :foreign_key => 'user_id', :dependent => :destroy | has_many :softapplications, :foreign_key => 'user_id', :dependent => :destroy | ||||
| has_many :journals_for_messages, :as => :jour, :dependent => :destroy | has_many :journals_for_messages, :as => :jour, :dependent => :destroy | ||||
| has_many :new_jours, :as => :jour, :class_name => 'JournalsForMessage', :conditions => "status=1" | has_many :new_jours, :as => :jour, :class_name => 'JournalsForMessage', :conditions => "status=1" | ||||
| has_many :journal_replies, :dependent => :destroy | |||||
| has_many :journal_replies | |||||
| has_many :activities, :dependent => :destroy | has_many :activities, :dependent => :destroy | ||||
| has_many :students_for_courses | has_many :students_for_courses | ||||
| has_many :courses, :through => :students_for_courses, :source => :project | has_many :courses, :through => :students_for_courses, :source => :project | ||||
| @@ -208,62 +208,13 @@ class User < Principal | |||||
| # ====================================================================== | # ====================================================================== | ||||
| # 集中处理 User 扩展表为空的问题 | |||||
| # 合并 user_score 属性 | |||||
| validate :valid_user_extensions | |||||
| after_save :save_user_extensions | |||||
| def extensions | def extensions | ||||
| self.user_extensions ||= UserExtensions.new | |||||
| self.user_extensions ||= self.build_user_extensions | |||||
| end | end | ||||
| def user_score_attr | def user_score_attr | ||||
| self.user_score ||= UserScore.new | |||||
| end | |||||
| alias_method :ori_respond_to?, :respond_to? | |||||
| def respond_to?(m, include_private = false) | |||||
| flag = false | |||||
| flag = ori_respond_to? m.to_sym unless flag | |||||
| flag = UserExtensions.new.respond_to? m.to_sym unless flag | |||||
| flag = UserScore.new.respond_to? m.to_sym unless flag | |||||
| flag | |||||
| end | |||||
| def method_missing m, *args, &block | |||||
| if extensions.respond_to? m.to_sym | |||||
| self.class.send(:define_method, "_meta_#{m}".to_sym) do |*args, &block| | |||||
| self.extensions.__send__ m.to_sym, *args | |||||
| end | |||||
| __send__ "_meta_#{m}".to_sym, *args, &block | |||||
| elsif user_score_attr.respond_to? m.to_sym | |||||
| self.class.send(:define_method, "_meta_#{m}".to_sym) do |*args, &block| | |||||
| self.user_score_attr.__send__ m.to_sym, *args | |||||
| end | |||||
| __send__ "_meta_#{m}".to_sym, *args, &block | |||||
| else | |||||
| super | |||||
| end | |||||
| end | |||||
| def valid_user_extensions | |||||
| if !self.extensions.valid? | |||||
| self.extensions.errors.messages.each do |key, values| | |||||
| values.each do |value| | |||||
| self.errors.add key, value | |||||
| end | |||||
| end | |||||
| end | |||||
| end | |||||
| def save_user_extensions | |||||
| self.extensions.save | |||||
| self.user_score_attr.save | |||||
| self.user_score ||= self.build_user_score | |||||
| end | end | ||||
| # 集中处理 User 扩展表为空的问题 < end | |||||
| # ====================================================================== | # ====================================================================== | ||||
| #选择项目成员时显示的用户信息文字 | #选择项目成员时显示的用户信息文字 | ||||
| @@ -1,35 +1,21 @@ | |||||
| <!--add by huang--> | <!--add by huang--> | ||||
| <% cache "footer" do %> | |||||
| <div class="clearfix"></div> | <div class="clearfix"></div> | ||||
| <div id="footer" style="margin-left:-5px;padding-top: 20px;clear: both;font-size: 12px;"> | <div id="footer" style="margin-left:-5px;padding-top: 20px;clear: both;font-size: 12px;"> | ||||
| <div style="border-top:solid 1px #C6E9F1;"></div> | |||||
| <div class="base_footer"> | |||||
| <div align="center"> | |||||
| <!--gcm--> | |||||
| <p> | |||||
| <span><%=l(:label_organizers)%></span> | |||||
| <span class="footer_text_link"><%= link_to l(:label_organizers_information),"http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%></span> | |||||
| <span class="footer_text_link"><%= link_to l(:label_organizers_information_institute), "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %></span> | |||||
| <span id="copyright"><%=l(:label_copyright)%>@2007~2014</span> | |||||
| <span id="contact_us" class="footer_text_link"><%= link_to l(:label_contact_us),"http://forge.trustie.net/projects/2/member", :target=>"_blank" %></span> | |||||
| <span id="record"class="footer_text_link"><%= link_to l(:label_record),"http://www.miibeian.gov.cn/", :target => "_blank" %></span> | |||||
| </p> | |||||
| <div id="logo_link"> | |||||
| <span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/nudt.png',:size=>'100x30',:alt=>"国防科学技术大学计算机学院"),"http://www.nudt.edu.cn/special.asp?classid=12", :target => "_blank" %></span> | |||||
| <span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>"北京大学信息科学技术学院软件研究所"), "http://eecs.pku.edu.cn", :target => "_blank" %></span> | |||||
| <span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/buaa_scse.png',:size=>'100x30',:alt=>"北京航空航天大学计算机学院"), "http://scse.buaa.edu.cn/", :target => "_blank" %></span> | |||||
| <span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/iscas.png',:size=>'100x30',:alt=>"中国科学院软件研究所"), "http://www.iscas.ac.cn", :target => "_blank" %></span> | |||||
| <span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/inforbus.png',:size=>'100x30',:alt=>"山东中创软件商用中间件股份有限公司"), "http://www.inforbus.com", :target => "_blank" %></span> | |||||
| </div> | |||||
| <!--gcm--> | |||||
| </div> | |||||
| </div> | |||||
| <div style="border-top:solid 1px #C6E9F1;"></div> | |||||
| <div class="base_footer"> | |||||
| <div align="center"> | |||||
| <p> | |||||
| <span><%=l(:label_organizers)%></span> | |||||
| <span class="footer_text_link"><%= link_to l(:label_nudt_name),"http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%></span> | |||||
| <span id="copyright"><%=l(:label_copyright)%>@2007~2014</span> | |||||
| </p> | |||||
| </div> | |||||
| </div> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="debug"> | |||||
| <div class="debug hidden"> | |||||
| <%= debug(params) if Rails.env.development? %> | <%= debug(params) if Rails.env.development? %> | ||||
| <script src="http://s4.cnzz.com/z_stat.php?id=1000482288&web_id=1000482288" language="JavaScript"></script> | <script src="http://s4.cnzz.com/z_stat.php?id=1000482288&web_id=1000482288" language="JavaScript"></script> | ||||
| @@ -46,4 +32,3 @@ | |||||
| </script> | </script> | ||||
| </div> | </div> | ||||
| <% end %> | |||||
| @@ -19,12 +19,13 @@ | |||||
| @nav_dispaly_store_all_label = 1 | @nav_dispaly_store_all_label = 1 | ||||
| else | else | ||||
| @nav_dispaly_project_all_label = 1 | @nav_dispaly_project_all_label = 1 | ||||
| @nav_dispaly_course_all_label = 1 | |||||
| @nav_dispaly_project_label = 1 | |||||
| #@nav_dispaly_course_all_label = 1 | |||||
| @nav_dispaly_forum_label = 1 | @nav_dispaly_forum_label = 1 | ||||
| @nav_dispaly_bid_label = 1 | |||||
| @nav_dispaly_contest_label = 1 | |||||
| @nav_dispaly_store_all_label = 1 | |||||
| @nav_dispaly_user_label = 1 | |||||
| #@nav_dispaly_bid_label = 1 | |||||
| #@nav_dispaly_contest_label = 1 | |||||
| #@nav_dispaly_store_all_label = 1 | |||||
| #@nav_dispaly_user_label = 1 | |||||
| end | end | ||||
| %> | %> | ||||
| <div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;"> | <div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;"> | ||||
| @@ -41,7 +42,7 @@ | |||||
| <%=link_to_user(User.current)%> | <%=link_to_user(User.current)%> | ||||
| <ul class="sub_menu"> | <ul class="sub_menu"> | ||||
| <% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%> | <% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%> | ||||
| <li><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %></li> | |||||
| <li class="hidden"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %></li> | |||||
| <% end -%> | <% end -%> | ||||
| <li><%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %></li> | <li><%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %></li> | ||||
| <li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%></li> | <li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%></li> | ||||
| @@ -110,7 +110,6 @@ | |||||
| <table class="borad-text-list"> | <table class="borad-text-list"> | ||||
| <tr> | <tr> | ||||
| <td rowspan="3" valign="top" width="60px"> | <td rowspan="3" valign="top" width="60px"> | ||||
| <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %> | |||||
| </td> | </td> | ||||
| <td class="comments"> | <td class="comments"> | ||||
| <div class="reply_content" ><%=h sanitize(reply.content.html_safe) %></div> | <div class="reply_content" ><%=h sanitize(reply.content.html_safe) %></div> | ||||
| @@ -1,6 +1,5 @@ | |||||
| <div class="clearfix"></div> | <div class="clearfix"></div> | ||||
| <div class="linkother"> | |||||
| <a href="http://forge.trustie.net" class="link_other_item"><%=l(:label_projects_management_platform)%></a> | |||||
| <a href="http://course.trustie.net" class="link_other_item"><%=l(:label_courses_management_platform)%></a> | |||||
| <a href="http://contest.trustie.net" class="link_other_item"><%=l(:label_contests_management_platform)%></a> | |||||
| </div> | |||||
| <div class="linkother hidden"> | |||||
| <a href="http://<%=Setting.project_domain%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a> | |||||
| <a href="http://<%=Setting.course_domain%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a> | |||||
| </div> | |||||
| @@ -27,16 +27,22 @@ | |||||
| </script> | </script> | ||||
| <div class='top_bar'> | <div class='top_bar'> | ||||
| <div id="identifier-pannel" style="display:none"> | |||||
| <%= link_to image_tag('/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" ), home_path %> | |||||
| <div class="weixin-content">微信扫码</div> | |||||
| <div id="identifier-pannel" style="display:none;"> | |||||
| <%= link_to image_tag('/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin", style: "display: none;" ), home_path %> | |||||
| <div class="weixin-content hidden">微信扫码</div> | |||||
| </div> | </div> | ||||
| <div class="main-content-bar" id="main-content-bar"> | <div class="main-content-bar" id="main-content-bar"> | ||||
| <div style="float: left"> | |||||
| <%= image_tag '/images/transparent.png', size: "75x75" %> | |||||
| <div style="float: left; padding-left: 15px;"> | |||||
| <%= image_tag '/images/welcome/rosNetworkingCrop.png', size: "107x63" %> | |||||
| </div> | </div> | ||||
| <div class="welcome_left" id="welcome_left"> | <div class="welcome_left" id="welcome_left"> | ||||
| <span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_project) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_project_description) %></span> | |||||
| <span class="" style="font-weight: bold; font-size: 18px; color: #e8770d;display: inline-block; margin-top: 5px;"> | |||||
| micROS多态智能集群机器人操作系统 | |||||
| </span> | |||||
| <br/> | |||||
| <span class="" style="font-weight:bold; font-size:18px;color:#15bccf; display:inline-block; margin-top:5px;"> | |||||
| 中国开源社区 | |||||
| </span> | |||||
| </div> | </div> | ||||
| <div class="search-bar" id="search-bar"> | <div class="search-bar" id="search-bar"> | ||||
| <%= render :partial => "search_project", :locals => {:project_type => 0}%> | <%= render :partial => "search_project", :locals => {:project_type => 0}%> | ||||
| @@ -54,7 +60,6 @@ | |||||
| <ul class="d-p-projectlist"> | <ul class="d-p-projectlist"> | ||||
| <% projects = find_miracle_project(10, 3) %> | <% projects = find_miracle_project(10, 3) %> | ||||
| <% projects.map do |project| %> | <% projects.map do |project| %> | ||||
| <% cache cache_key_for_project(project) do %> | |||||
| <li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'> | <li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'> | ||||
| <div style="float: left;"> | <div style="float: left;"> | ||||
| <%= image_tag(get_project_avatar(project), :class => "avatar-4") %> | <%= image_tag(get_project_avatar(project), :class => "avatar-4") %> | ||||
| @@ -75,7 +80,6 @@ | |||||
| :id => "tooltip-#{project.id}" %> | :id => "tooltip-#{project.id}" %> | ||||
| </div> | </div> | ||||
| </li> | </li> | ||||
| <% end %> | |||||
| <% end; reset_cycle %> | <% end; reset_cycle %> | ||||
| </ul> | </ul> | ||||
| </div> | </div> | ||||
| @@ -83,12 +87,11 @@ | |||||
| <div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;"> | <div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;"> | ||||
| <ul class="user-welcome-message-list"> | <ul class="user-welcome-message-list"> | ||||
| <h3 style="color: rgb(21, 188, 207)"><strong>用户动态</strong></h3> | |||||
| <h3 style="color: rgb(21, 188, 207)"><strong>开发动态</strong></h3> | |||||
| <span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span> | <span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span> | ||||
| <div class="user-message-box-list" style="margin-top: 10px;"> | <div class="user-message-box-list" style="margin-top: 10px;"> | ||||
| <%activities = find_all_activities%> | <%activities = find_all_activities%> | ||||
| <% activities.each do |event| %> | <% activities.each do |event| %> | ||||
| <% cache cache_key_for_event(event) do %> | |||||
| <li style="display: block;height:60px; padding-bottom: 4px;"> | <li style="display: block;height:60px; padding-bottom: 4px;"> | ||||
| <div class="inner-right" style="float: left; height: 100%; "> | <div class="inner-right" style="float: left; height: 100%; "> | ||||
| <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> | <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> | ||||
| @@ -99,7 +102,6 @@ | |||||
| <p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p> | <p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p> | ||||
| </div> | </div> | ||||
| </li> | </li> | ||||
| <% end %><!-- cache --> | |||||
| <% end %> | <% end %> | ||||
| </div> | </div> | ||||
| </ul> | </ul> | ||||
| @@ -107,7 +109,6 @@ | |||||
| <div class="right" style="float: right; width: 48%; "> | <div class="right" style="float: right; width: 48%; "> | ||||
| <ul class="welcome-message-list"> | <ul class="welcome-message-list"> | ||||
| <% cache 'forum_links' do %> | |||||
| <div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;"> | <div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;"> | ||||
| <h3 style="color: rgb(21, 188, 207);"> | <h3 style="color: rgb(21, 188, 207);"> | ||||
| <strong>贴吧动态</strong> | <strong>贴吧动态</strong> | ||||
| @@ -115,11 +116,9 @@ | |||||
| <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%></h3> | <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%></h3> | ||||
| <span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span> | <span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span> | ||||
| </div> | </div> | ||||
| <% end %> | |||||
| <div class="welcome-box-list-new memo_activity"> | <div class="welcome-box-list-new memo_activity"> | ||||
| <% topics = find_new_forum_topics(7) %> | <% topics = find_new_forum_topics(7) %> | ||||
| <% topics.includes(:forum, :last_reply, :author).each do |topic|%> | <% topics.includes(:forum, :last_reply, :author).each do |topic|%> | ||||
| <% cache cache_key_for_topic(topic) do %> | |||||
| <li class="message-brief-intro"> | <li class="message-brief-intro"> | ||||
| <div class='memo_title text_nowrap'> | <div class='memo_title text_nowrap'> | ||||
| <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %> | <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %> | ||||
| @@ -139,7 +138,6 @@ | |||||
| </span> | </span> | ||||
| </div> | </div> | ||||
| </li> | </li> | ||||
| <% end %> <!-- cache --> | |||||
| <% end %> | <% end %> | ||||
| </div> | </div> | ||||
| </ul> | </ul> | ||||
| @@ -147,4 +145,4 @@ | |||||
| <div class="clearfix"></div> | <div class="clearfix"></div> | ||||
| <%= render partial: 'link_to_another' %> | |||||
| <%= render partial: 'link_to_another' %> | |||||
| @@ -1778,6 +1778,7 @@ en: | |||||
| label_bidding_user_studentcode: Student ID | label_bidding_user_studentcode: Student ID | ||||
| label_organizers: Organizer | label_organizers: Organizer | ||||
| label_nudt_name: National University of Defense Technology | |||||
| label_organizers_information: National Key Laboratory of Parallel and Distributed Processing, NUDT | label_organizers_information: National Key Laboratory of Parallel and Distributed Processing, NUDT | ||||
| label_organizers_information_institute: Department of Computer Sciencer and Technology | label_organizers_information_institute: Department of Computer Sciencer and Technology | ||||
| label_copyright: Copyright | label_copyright: Copyright | ||||
| @@ -1789,3 +1790,4 @@ en: | |||||
| # ajax异步验证 | # ajax异步验证 | ||||
| modal_valid_passing: can be used. | modal_valid_passing: can be used. | ||||
| lable_user_name: "nickname/email" | |||||
| @@ -2023,10 +2023,11 @@ zh: | |||||
| label_search_intimation: 请输入要搜索的关键字 | label_search_intimation: 请输入要搜索的关键字 | ||||
| label_work_quantity: 个作品 | label_work_quantity: 个作品 | ||||
| label_projects_management_platform: 项目托管平台 | label_projects_management_platform: 项目托管平台 | ||||
| label_courses_management_platform: 课程实践平台 | |||||
| label_courses_management_platform: 项目培训平台 | |||||
| label_contests_management_platform: 竞赛托管平台 | label_contests_management_platform: 竞赛托管平台 | ||||
| label_organizers: 主办单位 | label_organizers: 主办单位 | ||||
| label_nudt_name: 国防科学技术大学 | |||||
| label_organizers_information: 国防科学技术大学并行与分布处理国家重点实验室 | label_organizers_information: 国防科学技术大学并行与分布处理国家重点实验室 | ||||
| label_organizers_information_institute: 计算机科学与技术系 | label_organizers_information_institute: 计算机科学与技术系 | ||||
| label_copyright: 版权 | label_copyright: 版权 | ||||
| @@ -2041,4 +2042,4 @@ zh: | |||||
| # ajax异步验证 | # ajax异步验证 | ||||
| modal_valid_passing: 可以使用 | modal_valid_passing: 可以使用 | ||||
| label_bug: 漏洞 | label_bug: 漏洞 | ||||
| @@ -237,11 +237,20 @@ tags_max_length: | |||||
| tags_show_search_results: | tags_show_search_results: | ||||
| format: int | format: int | ||||
| default: 5 | default: 5 | ||||
| #user_domain: | |||||
| # default: user.trustie.net | |||||
| #project_domain: | |||||
| # default: forge.trustie.net | |||||
| #contest_domain: | |||||
| # default: contest.trustie.net | |||||
| #course_domain: | |||||
| # default: course.trustie.net | |||||
| user_domain: | user_domain: | ||||
| default: user.trustie.net | |||||
| default: 10.0.47.204 | |||||
| project_domain: | project_domain: | ||||
| default: forge.trustie.net | |||||
| default: 10.0.47.204 | |||||
| contest_domain: | contest_domain: | ||||
| default: contest.trustie.net | |||||
| default: 10.0.47.204 | |||||
| course_domain: | course_domain: | ||||
| default: course.trustie.net | |||||
| default: 10.0.47.204 | |||||
| @@ -5,7 +5,9 @@ class CreateUserScores < ActiveRecord::Migration | |||||
| t.integer :collaboration | t.integer :collaboration | ||||
| t.integer :influence | t.integer :influence | ||||
| t.integer :skill | t.integer :skill | ||||
| t.integer :activity | |||||
| t.integer :active | |||||
| t.timestamps | |||||
| end | end | ||||
| end | end | ||||
| end | end | ||||
| @@ -2,7 +2,7 @@ class CreateOpenSourceProjects < ActiveRecord::Migration | |||||
| def change | def change | ||||
| create_table :open_source_projects do |t| | create_table :open_source_projects do |t| | ||||
| t.column "name", :string, :default => nil, :null => true | t.column "name", :string, :default => nil, :null => true | ||||
| t.column "description", :string, :default => '', :null => true | |||||
| t.column "description", :text, :null => true | |||||
| t.column "commit_count", :integer, :default => 0 | t.column "commit_count", :integer, :default => 0 | ||||
| t.column "code_line", :integer, :default => 0 | t.column "code_line", :integer, :default => 0 | ||||
| t.column "users_count",:integer, :default => 0 | t.column "users_count",:integer, :default => 0 | ||||
| @@ -1,13 +0,0 @@ | |||||
| class CreateUserScore < ActiveRecord::Migration | |||||
| def change | |||||
| create_table :user_scores do |t| | |||||
| t.integer :user_id, :null => false | |||||
| t.integer :collaboration | |||||
| t.integer :influence | |||||
| t.integer :skill | |||||
| t.integer :active | |||||
| t.timestamps | |||||
| end | |||||
| end | |||||
| end | |||||
| @@ -1,9 +0,0 @@ | |||||
| class ChangeDescriptionTypeToOpenSourceProject < ActiveRecord::Migration | |||||
| def up | |||||
| change_column :open_source_projects, :description, :text | |||||
| end | |||||
| def down | |||||
| raise ActiveRecord::IrreversibleMigration | |||||
| end | |||||
| end | |||||
| @@ -1,5 +0,0 @@ | |||||
| class DropUserScores < ActiveRecord::Migration | |||||
| def change | |||||
| drop_table :user_scores | |||||
| end | |||||
| end | |||||
| @@ -387,7 +387,7 @@ Redmine::MenuManager.map :course_menu do |menu| | |||||
| end | end | ||||
| Redmine::MenuManager.map :user_menu do |menu| | Redmine::MenuManager.map :user_menu do |menu| | ||||
| menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_domain } | menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_domain } | ||||
| menu.push :user_course, {:controller => 'users', :action => 'user_courses', :host => Setting.course_domain} | |||||
| # menu.push :user_course, {:controller => 'users', :action => 'user_courses', :host => Setting.course_domain} | |||||
| #menu.push :user_homework, {:controller => 'users', :action => 'user_homeworks'} by huang | #menu.push :user_homework, {:controller => 'users', :action => 'user_homeworks'} by huang | ||||
| menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain} | menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain} | ||||
| # menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang | # menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang | ||||
| @@ -58,7 +58,7 @@ | |||||
| } | } | ||||
| } | } | ||||
| fixedBar('backTopBtn' , {autoHidden: true, top : 186}); | |||||
| fixedBar('identifier-pannel' , {autoHidden: false , top : 956 , show : true}); | |||||
| // fixedBar('backTopBtn' , {autoHidden: true, top : 186}); | |||||
| // fixedBar('identifier-pannel' , {autoHidden: false , top : 956 , show : true}); | |||||
| } | } | ||||
| })(); | })(); | ||||
| @@ -617,6 +617,8 @@ ul.tool li{list-style-type:none; | |||||
| font-weight: bold; | font-weight: bold; | ||||
| font-size: 18px; | font-size: 18px; | ||||
| color:#15bccf; | color:#15bccf; | ||||
| display: inline-block; | |||||
| margin-top: 5px; | |||||
| } | } | ||||
| .font_welcome_school{ | .font_welcome_school{ | ||||
| @@ -633,11 +635,14 @@ ul.tool li{list-style-type:none; | |||||
| } | } | ||||
| .font_welcome_tdescription{ | .font_welcome_tdescription{ | ||||
| font-family: "Microsoft YaHei"; | |||||
| font-family: "Microsoft YaHei"; | |||||
| font-size: 16px; | font-size: 16px; | ||||
| color: #5c5c5c; | color: #5c5c5c; | ||||
| text-align: justify; | text-align: justify; | ||||
| text-justify: inter-ideograph; | text-justify: inter-ideograph; | ||||
| display: inline-block; | |||||
| margin-top: 5px; | |||||
| float: right; | |||||
| } | } | ||||
| .inf_user_image{ | .inf_user_image{ | ||||
| @@ -6,7 +6,7 @@ | |||||
| /************************** 页脚 footer 开始 *****************************/ | /************************** 页脚 footer 开始 *****************************/ | ||||
| .linkother{ | .linkother{ | ||||
| width: 460px; | |||||
| width: 310px; | |||||
| margin: 70px auto -35px ; | margin: 70px auto -35px ; | ||||
| } | } | ||||
| .link_other_item{ | .link_other_item{ | ||||
| @@ -478,4 +478,4 @@ a.attachments_list_color { | |||||
| font-size: 20px; | font-size: 20px; | ||||
| color:#e8770d; | color:#e8770d; | ||||
| } | } | ||||
| /************************** 学校课程 结束 ****************************/ | |||||
| /************************** 学校课程 结束 ****************************/ | |||||