From 0b46fd99b56a67499c82b08b9399ba2dee553143 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 5 Mar 2015 17:02:03 +0800 Subject: [PATCH 01/10] ok --- .gitignore | 23 ---- Gemfile | 132 ------------------- Gemfile.lock | 348 --------------------------------------------------- 3 files changed, 503 deletions(-) delete mode 100644 .gitignore delete mode 100644 Gemfile delete mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore deleted file mode 100644 index af337a4e7..000000000 --- a/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -*.swp -/.project -/.idea -/.bundle -*.swp -/config/database.yml -/config/configuration.yml -/files/* -/log/* -/public/tmp/* -/tmp/* -/public/cache/* -.gitignore -/config/newrelic.yml -/public/images/avatars/* -/Gemfile -/Gemfile.lock -/db/schema.rb -/Gemfile.lock -/lib/plugins/acts_as_versioned/test/debug.log -.rbenv-gemsets -.DS_Store -public/api_doc/ diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 037c606c8..000000000 --- a/Gemfile +++ /dev/null @@ -1,132 +0,0 @@ -source 'http://rubygems.org' -#source 'http://ruby.sdutlinux.org/' - -unless RUBY_PLATFORM =~ /w32/ - # unix-like only - gem 'iconv' - gem 'rubyzip' - gem 'zip-zip' -end - -gem 'grape', '~> 0.9.0' -gem 'grape-entity' -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' -#gem 'email_verifier', path: 'lib/email_verifier' - -group :development do - gem 'grape-swagger' - gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git' - #gem 'puma' - 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' - - gem "faker" - # 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 - - gem 'rspec-rails' , '2.13.1' - gem 'guard-rspec','2.5.0' -# 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 diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 355ca422d..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,348 +0,0 @@ -GIT - remote: https://github.com/guange2015/grape-swagger-ui.git - revision: 4c33439f236c174ae0e774b3435ef2547995c21d - specs: - grape-swagger-ui (0.0.4) - railties (>= 3.1) - -PATH - remote: lib/better_errors - specs: - better_errors (1.1.0) - coderay (>= 1.0.0) - erubis (>= 2.6.6) - -PATH - remote: lib/rack-mini-profiler - specs: - rack-mini-profiler (0.9.1) - rack (>= 1.1.3) - -PATH - remote: lib/seems_rateable - specs: - seems_rateable (1.0.13) - jquery-rails - rails - -GEM - remote: http://rubygems.org/ - remote: https://rubygems.org/ - specs: - actionmailer (3.2.13) - actionpack (= 3.2.13) - mail (~> 2.5.3) - actionpack (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.5) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - activerecord (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - activesupport (3.2.13) - i18n (= 0.6.1) - multi_json (~> 1.0) - acts-as-taggable-on (2.4.1) - rails (>= 3, < 5) - arel (3.0.3) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - builder (3.0.0) - capybara (2.4.1) - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - celluloid (0.16.0) - timers (~> 4.0.0) - childprocess (0.5.3) - ffi (~> 1.0, >= 1.0.11) - climate_control (0.0.3) - activesupport (>= 3.0) - cocaine (0.5.4) - climate_control (>= 0.0.3, < 1.0) - coderay (1.0.9) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (3.2.2) - coffee-script (>= 2.2.0) - railties (~> 3.2.0) - coffee-script (2.3.0) - coffee-script-source - execjs - coffee-script-source (1.7.1) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - diff-lcs (1.2.5) - equalizer (0.0.9) - erubis (2.7.0) - execjs (2.2.1) - factory_girl (4.4.0) - activesupport (>= 3.0.0) - faker (1.4.3) - i18n (~> 0.5) - fastercsv (1.5.5) - ffi (1.9.3) - ffi (1.9.3-x86-mingw32) - formatador (0.2.5) - grape (0.9.0) - activesupport - builder - hashie (>= 2.1.0) - multi_json (>= 1.3.2) - multi_xml (>= 0.5.2) - rack (>= 1.3.0) - rack-accept - rack-mount - virtus (>= 1.0.0) - grape-entity (0.4.4) - activesupport - multi_json (>= 1.3.2) - grape-swagger (0.8.0) - grape - grape-entity - guard (2.11.1) - formatador (>= 0.2.4) - listen (~> 2.7) - lumberjack (~> 1.0) - nenv (~> 0.1) - notiffany (~> 0.0) - pry (>= 0.9.12) - shellany (~> 0.0) - thor (>= 0.18.1) - guard-rspec (2.5.0) - guard (>= 1.1) - rspec (~> 2.11) - hashie (3.3.1) - hike (1.2.3) - hitimes (1.2.2) - hitimes (1.2.2-x86-mingw32) - htmlentities (4.3.2) - i18n (0.6.1) - ice_nine (0.11.0) - journey (1.0.4) - jquery-rails (2.0.3) - railties (>= 3.1.0, < 5.0) - thor (~> 0.14) - json (1.8.1) - kaminari (0.16.1) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - libv8 (3.16.14.3) - listen (2.8.5) - celluloid (>= 0.15.2) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - lumberjack (1.0.9) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) - metaclass (0.0.4) - method_source (0.8.2) - mime-types (1.25.1) - mini_portile (0.6.0) - mocha (1.1.0) - metaclass (~> 0.0.1) - multi_json (1.10.1) - multi_xml (0.5.5) - mysql2 (0.3.11) - mysql2 (0.3.11-x86-mingw32) - nenv (0.2.0) - net-ldap (0.3.1) - nokogiri (1.6.3) - mini_portile (= 0.6.0) - nokogiri (1.6.3-x86-mingw32) - mini_portile (= 0.6.0) - notiffany (0.0.3) - nenv (~> 0.1) - shellany (~> 0.0) - paperclip (3.5.4) - activemodel (>= 3.0.0) - activesupport (>= 3.0.0) - cocaine (~> 0.5.3) - mime-types - polyglot (0.3.5) - pry (0.9.12.6) - coderay (~> 1.0) - method_source (~> 0.8) - slop (~> 3.4) - pry (0.9.12.6-x86-mingw32) - coderay (~> 1.0) - method_source (~> 0.8) - slop (~> 3.4) - win32console (~> 1.3) - rack (1.4.5) - rack-accept (0.4.5) - rack (>= 0.4) - rack-cache (1.2) - rack (>= 0.4) - rack-mount (0.8.3) - rack (>= 1.0.0) - rack-openid (1.4.2) - rack (>= 1.1.0) - ruby-openid (>= 2.1.8) - rack-raw-upload (1.1.1) - multi_json - rack-ssl (1.3.4) - rack - rack-test (0.6.2) - rack (>= 1.0) - rails (3.2.13) - actionmailer (= 3.2.13) - actionpack (= 3.2.13) - activerecord (= 3.2.13) - activeresource (= 3.2.13) - activesupport (= 3.2.13) - bundler (~> 1.0) - railties (= 3.2.13) - railties (3.2.13) - actionpack (= 3.2.13) - activesupport (= 3.2.13) - rack-ssl (~> 1.3.2) - rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (10.3.2) - rb-fsevent (0.9.4) - rb-inotify (0.9.5) - ffi (>= 0.5.0) - rdoc (3.12.2) - json (~> 1.4) - ref (1.0.5) - rich (1.4.6) - jquery-rails - kaminari - mime-types - paperclip - rack-raw-upload - rails (>= 3.2.0) - sass-rails - rspec (2.13.0) - rspec-core (~> 2.13.0) - rspec-expectations (~> 2.13.0) - rspec-mocks (~> 2.13.0) - rspec-core (2.13.1) - rspec-expectations (2.13.0) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.13.1) - rspec-rails (2.13.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 2.13.0) - rspec-expectations (~> 2.13.0) - rspec-mocks (~> 2.13.0) - ruby-ole (1.2.11.7) - ruby-openid (2.1.8) - rubyzip (1.1.6) - sass (3.3.10) - sass-rails (3.2.6) - railties (~> 3.2.0) - sass (>= 3.1.10) - tilt (~> 1.3) - selenium-webdriver (2.42.0) - childprocess (>= 0.5.0) - multi_json (~> 1.0) - rubyzip (~> 1.0) - websocket (~> 1.0.4) - shellany (0.0.1) - 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) - slop (3.6.0) - spreadsheet (1.0.0) - ruby-ole (>= 1.0) - sprockets (2.2.2) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - therubyracer (0.12.1) - libv8 (~> 3.16.14.0) - ref - thor (0.19.1) - thread_safe (0.3.4) - tilt (1.4.1) - timers (4.0.1) - hitimes - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) - tzinfo (0.3.40) - uglifier (2.5.1) - execjs (>= 0.3.0) - json (>= 1.8.0) - virtus (1.0.3) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - websocket (1.0.7) - win32console (1.3.2-x86-mingw32) - xpath (2.0.0) - nokogiri (~> 1.3) - -PLATFORMS - ruby - x86-mingw32 - -DEPENDENCIES - activerecord-jdbc-adapter (= 1.2.5) - activerecord-jdbcmysql-adapter - acts-as-taggable-on (= 2.4.1) - better_errors! - builder (= 3.0.0) - capybara (~> 2.4.1) - coderay (~> 1.0.6) - coffee-rails (~> 3.2.1) - factory_girl (~> 4.4.0) - faker - fastercsv (~> 1.5.0) - grape (~> 0.9.0) - grape-entity - grape-swagger - grape-swagger-ui! - guard-rspec (= 2.5.0) - htmlentities - i18n (~> 0.6.0) - jquery-rails (~> 2.0.2) - kaminari - mocha (~> 1.1.0) - mysql2 (= 0.3.11) - net-ldap (~> 0.3.1) - nokogiri (~> 1.6.3) - paperclip (~> 3.5.4) - rack-mini-profiler! - rack-openid - rails (= 3.2.13) - rich (= 1.4.6) - rspec-rails (= 2.13.1) - ruby-ole - ruby-openid (~> 2.1.4) - sass-rails (~> 3.2.3) - seems_rateable! - selenium-webdriver (~> 2.42.0) - shoulda (~> 3.5.0) - spreadsheet - therubyracer - uglifier (>= 1.0.3) From 26081c61205d549ffadb52195bd1ddb5f7d87a2e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 6 Mar 2015 09:27:43 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=97=B6=E5=A2=9E=E5=8A=A0=E4=B8=8D=E9=80=89=E6=8B=A9=E6=89=80?= =?UTF-8?q?=E5=B1=9E=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 4 ++++ config/locales/zh.yml | 1 + db/schema.rb | 30 ++++++++++++++---------------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index ccc750462..3c1663fcb 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -374,6 +374,10 @@ module ProjectsHelper def project_organizations_id_option type = [] + option1 = [] + option1 << l(:label_organization_choose) + option1 << 0 + type << option1 Organization.all.each do |org| option = [] option << org.name diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 72634bd2b..edfea2cb7 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -539,6 +539,7 @@ zh: label_activity_project: '项目: ' #added by bai label_organization: 组织 + label_organization_choose: --请选择组织-- label_organization_name: 组织名称 label_organization_list: 组织列表 label_organization_new: 新建组织 diff --git a/db/schema.rb b/db/schema.rb index 4a3b14edc..b863dbaed 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150302091345) do +ActiveRecord::Schema.define(:version => 20150305011359) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -631,16 +631,6 @@ ActiveRecord::Schema.define(:version => 20150302091345) do add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_details_copy", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_replies", :id => false, :force => true do |t| t.integer "journal_id" t.integer "user_id" @@ -825,6 +815,13 @@ ActiveRecord::Schema.define(:version => 20150302091345) do t.integer "project_id" end + create_table "organizations", :force => true do |t| + t.string "name" + t.string "logo_link" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "poll_answers", :force => true do |t| t.integer "poll_question_id" t.text "answer_text" @@ -949,6 +946,7 @@ ActiveRecord::Schema.define(:version => 20150302091345) do t.integer "user_id" t.integer "dts_test", :default => 0 t.string "enterprise_name" + t.integer "organization_id" end add_index "projects", ["lft"], :name => "index_projects_on_lft" @@ -1036,12 +1034,12 @@ ActiveRecord::Schema.define(:version => 20150302091345) do end create_table "roles", :force => true do |t| - t.string "name", :limit => 90 - t.integer "position" - t.boolean "assignable" - t.integer "builtin" + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false t.text "permissions" - t.string "issues_visibility", :limit => 90 + t.string "issues_visibility", :limit => 30, :default => "default", :null => false end create_table "schools", :force => true do |t| From 3c1f1d8baddb12647d6a99ec5baa8e13ac078898 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 6 Mar 2015 09:45:38 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=8B=E5=8F=91=E5=B8=83=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E3=80=81=E5=8F=96=E6=B6=88=E5=8F=91=E5=B8=83=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E6=A0=B7=E5=BC=8F=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/publish_poll.js.erb | 2 +- app/views/poll/republish_poll.js.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/poll/publish_poll.js.erb b/app/views/poll/publish_poll.js.erb index 6074df6c6..2e8dab181 100644 --- a/app/views/poll/publish_poll.js.erb +++ b/app/views/poll/publish_poll.js.erb @@ -1,6 +1,6 @@ $("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); $('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>"); -showModal('ajax-modal', '180px'); +showModal('ajax-modal', '250px'); $('#ajax-modal').css('height','111px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + diff --git a/app/views/poll/republish_poll.js.erb b/app/views/poll/republish_poll.js.erb index 94369678d..f2fcee96a 100644 --- a/app/views/poll/republish_poll.js.erb +++ b/app/views/poll/republish_poll.js.erb @@ -1,6 +1,6 @@ $("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); $('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>"); -showModal('ajax-modal', '180px'); +showModal('ajax-modal', '250px'); $('#ajax-modal').css('height','80px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + From 5692cbf2020a74ecb552028136e157dabbfcd459 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 6 Mar 2015 09:50:17 +0800 Subject: [PATCH 04/10] =?UTF-8?q?#1965=20=E5=85=AC=E5=85=B1=E8=B4=B4?= =?UTF-8?q?=E5=90=A7=E5=8F=96=E6=B6=88=E8=BD=AF=E4=BB=B6=E5=88=9B=E5=AE=A2?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5579fe79b..1ac0a5bbf 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1841,7 +1841,7 @@ module ApplicationHelper # course_all_course_link = link_to l(:label_course_all), {:controller => 'courses', :action => 'index'} course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.course_domain} # courses_link = link_to l(:label_course_practice), {:controller => 'courses', :action => 'index'} - users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain} + #users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain} # contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'} bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'} forum_link = link_to l(:label_forum_all), {:controller => "forums", :action => "index"} @@ -1860,7 +1860,7 @@ module ApplicationHelper nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1 # nav_list.push(projects_link) if @nav_dispaly_project_label - nav_list.push(users_link) if @nav_dispaly_user_label + #nav_list.push(users_link) if @nav_dispaly_user_label # nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1 nav_list.push(bids_link) if @nav_dispaly_bid_label nav_list.push(forum_link) if @nav_dispaly_forum_label From e32693402761a8ae09bd3698b346644553a5c514 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 6 Mar 2015 10:58:12 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=BC=BA=E5=B0=91=E9=A1=B9=E7=9B=AE=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/index.html.erb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index a2fb9657a..b1a699afa 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -94,9 +94,13 @@ <% @organization_projects.map do |project| %> <%= render :partial => 'hot_projects_list', :locals => {:project => project} %> <% end %> -
- <%= l(:label_part_enterprise_tips) %> -
+
  • +

    +
    + <%= l(:label_part_enterprise_tips) %> +
    +

    +
  • <% @part_projects.map do |project| %> <%= render :partial => 'hot_projects_list', :locals => {:project => project} %> <% end %> From 140cb81748976481e3569b581b8061e9dd463700 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 6 Mar 2015 11:38:32 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5=E5=92=8C=E8=AE=A8?= =?UTF-8?q?=E8=AE=BA=E5=8C=BA=E5=8F=91=E5=B8=83=E6=96=B0=E5=B8=96=E6=8A=A5?= =?UTF-8?q?500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/message.rb | 7 +++++-- app/models/news.rb | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/models/message.rb b/app/models/message.rb index 413a4f91c..85a87132d 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -164,8 +164,11 @@ class Message < ActiveRecord::Base # Author lizanle # Description def act_as_forge_activity - self.forge_acts << ForgeActivity.new(:user_id => self.author_id, - :project_id => self.board.project.id) + # 如果project为空,那么就是课程相关的消息 + if !self.board.project.nil? + self.forge_acts << ForgeActivity.new(:user_id => self.author_id, + :project_id => self.board.project.id) + end end #更新用户分数 -by zjc diff --git a/app/models/news.rb b/app/models/news.rb index fa9f31712..d2547fc02 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -98,8 +98,11 @@ class News < ActiveRecord::Base # Author lizanle # Description 公用表中也要记录 def act_as_forge_activity - self.forge_acts << ForgeActivity.new(:user_id => self.author_id, - :project_id => self.project.id) + # 如果是project为空,那么是课程相关的,不需要保存 + if !self.project.nil? + self.forge_acts << ForgeActivity.new(:user_id => self.author_id, + :project_id => self.project.id) + end end end From 10faab012967ac375694fa917d6911da3326dbf9 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 6 Mar 2015 11:53:16 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E7=9A=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=8F=91=E5=B8=83=E6=96=B0=E9=97=AE=E9=A2=98=E6=8A=A5?= =?UTF-8?q?500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 5dc945cc7..d429f9d3e 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -154,7 +154,7 @@ class IssuesController < ApplicationController call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue }) @issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads])) # 给该issue在它所在的项目中所有的issues中所在的位置给一个序号 - @issue.project_issues_index = @issue.project.issues.last.project_issues_index + 1 + @issue.project_issues_index = @issue.project.issues.last.nil? ? 1 : @issue.project.issues.last.project_issues_index + 1 if @issue.save call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue}) respond_to do |format| From beac15475dd9fdbd6441083fcab379c75dd7e1f6 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 6 Mar 2015 14:55:21 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E6=96=B0=E9=A1=B9=E7=9B=AE=E5=8F=8A?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8F=8D=E9=A6=88=E6=A1=86=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/boards_controller.rb | 1 + app/controllers/documents_controller.rb | 4 + app/controllers/files_controller.rb | 6 +- app/controllers/issues_controller.rb | 2 + app/controllers/projects_controller.rb | 22 +- app/helpers/application_helper.rb | 2 +- app/helpers/watchers_helper.rb | 2 +- app/views/boards/_project_show.html.erb | 8 +- app/views/calendars/show.html.erb | 4 +- app/views/documents/index.html.erb | 27 +- app/views/documents/show.html.erb | 4 +- app/views/files/_newfile_index.html.erb | 250 +++++++++++++++ app/views/files/_project_file.html.erb | 9 +- app/views/files/index.html.erb | 251 +-------------- app/views/files/index.js.erb | 2 + app/views/files/new.html.erb | 4 +- app/views/gantts/show.html.erb | 6 +- app/views/issues/_newissue_index.html.erb | 137 ++++++++ app/views/issues/index.html.erb | 136 +------- app/views/issues/index.js.erb | 1 + app/views/issues/new.html.erb | 3 + app/views/issues/show.html.erb | 5 +- app/views/layouts/_base_feedback.html.erb | 63 ++-- app/views/layouts/_join_exit_project.html.erb | 24 +- app/views/layouts/base_projects.html.erb | 296 +++++++++--------- app/views/projects/_form.html.erb | 2 +- app/views/projects/_newproject_show.html.erb | 107 +++++++ app/views/projects/_tools_expand.html.erb | 62 ++-- app/views/projects/feedback.html.erb | 3 + app/views/projects/member.html.erb | 7 +- app/views/projects/new.html.erb | 4 +- app/views/projects/settings.html.erb | 4 +- app/views/projects/share.html.erb | 4 +- app/views/projects/show.html.erb | 105 +------ app/views/projects/show.js.erb | 1 + app/views/projects/watcherlist.html.erb | 4 +- app/views/repositories/new.html.erb | 4 +- app/views/repositories/show.html.erb | 4 +- app/views/wiki/show.html.erb | 99 +++--- app/views/words/_new.html.erb | 5 +- config/locales/zh.yml | 3 +- .../app/views/code_review/index.html.erb | 6 +- public/images/sidebar_bg.png | Bin 9419 -> 9739 bytes public/stylesheets/application.css | 129 +++++++- .../stylesheets/application.css | 108 +++---- 45 files changed, 1034 insertions(+), 896 deletions(-) create mode 100644 app/views/files/_newfile_index.html.erb create mode 100644 app/views/files/index.js.erb create mode 100644 app/views/issues/_newissue_index.html.erb create mode 100644 app/views/issues/index.js.erb create mode 100644 app/views/projects/_newproject_show.html.erb create mode 100644 app/views/projects/show.js.erb diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 383da0bbe..67355fdfa 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -57,6 +57,7 @@ class BoardsController < ApplicationController def show respond_to do |format| + format.js format.html { sort_init 'updated_on', 'desc' sort_update 'created_on' => "#{Message.table_name}.created_on", diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 932ffaa7a..545d61155 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -61,6 +61,10 @@ class DocumentsController < ApplicationController if @project.project_type ==1 render :action => 'show', :layout => 'base_courses' end + respond_to do |format| + format.html + format.api + end end def new diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 56f760e13..8421e9be1 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -148,7 +148,11 @@ class FilesController < ApplicationController show_attachments @containers - render :layout => !request.xhr? + + respond_to do |format| + format.html + format.js + end elsif params[:course_id] @isproject = false diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index c0d83fdcd..4e3c28468 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -90,6 +90,7 @@ class IssuesController < ApplicationController respond_to do |format| + format.js format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young format.api { Issue.load_visible_relations(@issues) if include_in_api_response?('relations') @@ -103,6 +104,7 @@ class IssuesController < ApplicationController format.html { render(:template => 'issues/index', :layout => @project_base_tag) }#by young format.any(:atom, :csv, :pdf) { render(:nothing => true) } format.api { render_validation_errors(@query) } + format.js end end rescue ActiveRecord::RecordNotFound diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 02bfc9e19..c67b5197b 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -278,7 +278,7 @@ class ProjectsController < ApplicationController :with_subprojects => @with_subprojects, :author => @author) @activity.scope_select {|t| !has["show_#{t}"].nil?} - + # 根据私密性,取出符合条件的所有数据 if User.current.member_of?(@project) || User.current.admin? events = @activity.events(@date_from, @date_to) @@ -286,7 +286,6 @@ class ProjectsController < ApplicationController events = @activity.events(@date_from, @date_to, :is_public => 1) end - @offset, @limit = api_offset_and_limit({:limit => 10}) @events_count = events.count @events_pages = Paginator.new @events_count, @limit, params['page'] @@ -295,11 +294,14 @@ class ProjectsController < ApplicationController events = events.slice(@offset,@limit) # 按天分组 @events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)} - + # 获取讨论区总数 + boards = @project.boards.includes(:last_message => :author).all + @topic_count = @project.boards.count # 根据对应的请求,返回对应的数据 respond_to do |format| format.html format.api + format.js end end @@ -311,6 +313,20 @@ class ProjectsController < ApplicationController @wiki ||= @project.wiki end + + #发送邮件邀请新用户 + def invite_members_by_mail + + end + + # 邀请Trustie注册用户 + def invite_members_had_loged + @member ||= @project.members.new + respond_to do |format| + format.js + end + end + def edit end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5579fe79b..dbe292f76 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -48,7 +48,7 @@ module ApplicationHelper def authorize_for(controller, action) User.current.allowed_to?({:controller => controller, :action => action}, @project) end - + # add by nwb def authorize_for_course(controller, action) User.current.allowed_to?({:controller => controller, :action => action}, @course) diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 842e1f1b7..f47ced545 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -283,6 +283,6 @@ module WatchersHelper def exit_project_link(project) link_to(l(:label_exit_project),exit_cur_project_path(project.id), - :remote => true, :confirm => l(:lable_sure_exit_project) ) + :remote => true, :confirm => l(:lable_sure_exit_project), :style => "color: #fff; display:block; padding: 0px 5px;margin-right:10px;height:20px;text-aligh:center;" ) end end diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 1a5cbd2fa..97ed903d9 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -9,9 +9,7 @@ -
    - <%= h @board.name %> +
    +

    <%= h @board.name %>

    <% if !User.current.logged? %> diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb index dae061251..39cab4a53 100644 --- a/app/views/calendars/show.html.erb +++ b/app/views/calendars/show.html.erb @@ -1,4 +1,6 @@ -

    <%= @query.new_record? ? l(:label_calendar) : h(@query.name) %>

    +
    +

    <%= @query.new_record? ? l(:label_calendar) : h(@query.name) %>

    +
    <%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project}, :method => :get, :id => 'query_form') do %> diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index f7f76a812..e0c39eb33 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -1,3 +1,6 @@ +
    +

    <%=l(:label_document_plural)%>

    +
    <%= l(:label_documents_sort) %> @@ -8,24 +11,22 @@ | <%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %> + :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>
    -

    <%=l(:label_document_plural)%>

    - <% if @grouped.empty? %>

    <%= l(:label_no_data) %> diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 45f54ad9b..5632c9d63 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -1,3 +1,6 @@ +

    +

    <%=h @document.title %>

    +
    @@ -9,7 +12,6 @@ <% end %>
    -

    <%=h @document.title %>

    <%#=h @document.category.name %>
    <%= format_date @document.created_on %>

    diff --git a/app/views/files/_newfile_index.html.erb b/app/views/files/_newfile_index.html.erb new file mode 100644 index 000000000..5ffaacae4 --- /dev/null +++ b/app/views/files/_newfile_index.html.erb @@ -0,0 +1,250 @@ + +
    + <% if @isproject %> + <%= render :partial => 'project_file', locals: {project: @project} %> + <% else %> + <%= render :partial => 'course_file', locals: {course: @course} %> + <% end %> +
    + + + + + diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb index e2f928332..e204030f1 100644 --- a/app/views/files/_project_file.html.erb +++ b/app/views/files/_project_file.html.erb @@ -1,11 +1,8 @@ - <% attachmenttypes = @project.attachmenttypes %> <% sufixtypes = @project.contenttypes %> - - - <%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %> - 资源共享区 - +
    +

    资源共享区

    +
    <%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %> diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index fe04c4e3f..39bc8b52e 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1,250 +1 @@ - -
    -<% if @isproject %> - <%= render :partial => 'project_file', locals: {project: @project} %> -<% else %> - <%= render :partial => 'course_file', locals: {course: @course} %> -<% end %> -
    - - - - - +<%= render :partial => 'files/newfile_index' %> \ No newline at end of file diff --git a/app/views/files/index.js.erb b/app/views/files/index.js.erb new file mode 100644 index 000000000..59bc2407f --- /dev/null +++ b/app/views/files/index.js.erb @@ -0,0 +1,2 @@ +alert("eeee"); +$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>'); diff --git a/app/views/files/new.html.erb b/app/views/files/new.html.erb index 8fd99b195..be9bcd722 100644 --- a/app/views/files/new.html.erb +++ b/app/views/files/new.html.erb @@ -1,4 +1,6 @@ -

    <%=l(:label_attachment_new)%>

    +
    +

    <%=l(:label_attachment_new)%>

    +
    <%= error_messages_for 'attachment' %> <%= form_tag(project_files_path(@project), :multipart => true, :class => "tabular") do %> diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 6ec189256..2808a99cc 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -1,5 +1,7 @@ -<% @gantt.view = self %> -

    <%= @query.new_record? ? l(:label_gantt) : h(@query.name) %>

    +
    +

    <% @gantt.view = self %> + <%= @query.new_record? ? l(:label_gantt) : h(@query.name) %>

    +
    <%= form_tag({:controller => 'gantts', :action => 'show', :project_id => @project, :month => params[:month], diff --git a/app/views/issues/_newissue_index.html.erb b/app/views/issues/_newissue_index.html.erb new file mode 100644 index 000000000..f0b7c0108 --- /dev/null +++ b/app/views/issues/_newissue_index.html.erb @@ -0,0 +1,137 @@ +
    +

    问题跟踪

    +
    +
    + <% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %> + + <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new, + :html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %> + <%= link_to l(:label_query), '#', :class => 'icon icon-help', + :onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %> + + <% end %> + 问题总数:100 未解决:20 +
    +
    + <% if !@query.new_record? && @query.editable_by?(User.current) %> + <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> + <%= delete_link query_path(@query) %> + <% end %> +
    + +<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %> +
    + <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %> + <%= hidden_field_tag 'set_filter', '1' %> + +
    + ---<%= l :label_query_new %>--- + +
    +
    "> + + <%= l(:label_issue_query_condition) %> + +
    "> + <%= render :partial => 'queries/filters', :locals => {:query => @query} %> +
    +
    + +
    + <%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %> + <%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %> +
    +
    +
    + <% end %> +
    + +<%= error_messages_for 'query' %> + +<% if @query.valid? %> + <% if @issues.empty? %> +

    + <%= l(:label_no_data) %> +

    + <% else %> + <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> + + <% end %> +
    + <% other_formats_links do |f| %> + <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> + <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %> + <%= f.link_to 'PDF', :url => params %> + <% end %> +
    + + + + +<% end %> + +<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %> + +<% content_for :sidebar do %> + <%= render :partial => 'issues/sidebar' %> +<% end %> + +<% content_for :header_tags do %> + <%= auto_discovery_link_tag(:atom, + {:query_id => @query, :format => 'atom', + :page => nil, :key => User.current.rss_key}, + :title => l(:label_issue_plural)) %> + <%= auto_discovery_link_tag(:atom, + {:controller => 'journals', :action => 'index', + :query_id => @query, :format => 'atom', + :page => nil, :key => User.current.rss_key}, + :title => l(:label_changes_details)) %> +<% end %> + +<%= context_menu issues_context_menu_path %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 219a0f641..b3750a770 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1,135 +1 @@ -
    - <% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %> -
    - <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new, - :html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %> - - <%= link_to l(:label_query), '#', :class => 'icon icon-help', - :onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %> -
    - <% end %> -
    - -
    - <% if !@query.new_record? && @query.editable_by?(User.current) %> - <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> - <%= delete_link query_path(@query) %> - <% end %> -
    - -<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %> -
    - <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %> - <%= hidden_field_tag 'set_filter', '1' %> - -
    - ---<%= l :label_query_new %>--- - -
    -
    "> - - <%= l(:label_issue_query_condition) %> - -
    "> - <%= render :partial => 'queries/filters', :locals => {:query => @query} %> -
    -
    - -
    - <%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %> - <%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %> -
    -
    -
    - <% end %> -
    - -<%= error_messages_for 'query' %> - -<% if @query.valid? %> - <% if @issues.empty? %> -

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

    - <% else %> - <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> - - <% end %> -
    - <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> - <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %> - <%= f.link_to 'PDF', :url => params %> - <% end %> -
    - - - - -<% end %> - -<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %> - -<% content_for :sidebar do %> - <%= render :partial => 'issues/sidebar' %> -<% end %> - -<% content_for :header_tags do %> - <%= auto_discovery_link_tag(:atom, - {:query_id => @query, :format => 'atom', - :page => nil, :key => User.current.rss_key}, - :title => l(:label_issue_plural)) %> - <%= auto_discovery_link_tag(:atom, - {:controller => 'journals', :action => 'index', - :query_id => @query, :format => 'atom', - :page => nil, :key => User.current.rss_key}, - :title => l(:label_changes_details)) %> -<% end %> - -<%= context_menu issues_context_menu_path %> +<%= render :partial => 'issues/newissue_index' %> \ No newline at end of file diff --git a/app/views/issues/index.js.erb b/app/views/issues/index.js.erb new file mode 100644 index 000000000..866882053 --- /dev/null +++ b/app/views/issues/index.js.erb @@ -0,0 +1 @@ +$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>'); diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 05ec50c11..51ebd139e 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -1,3 +1,6 @@ +
    +

    问题跟踪

    +
    <%= call_hook(:view_issues_new_top, {:issue => @issue}) %> <%= labelled_form_for @issue, :url => project_issues_path(@project), diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 204dd519a..47ba63ebf 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,5 +1,6 @@ -<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> - +
    +

    问题跟踪

    +
    <% html_title "#{@issue.tracker.name} #{@issue.source_from}: #{@issue.subject}" %> <%= render :partial => 'action_menu' %> diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index c4479b43a..2444af68c 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -1,32 +1,30 @@