Version
+Platform
+Update type
+Preferences
++ Начать сборку +
diff --git a/.gitignore b/.gitignore index fcd2664e1..ecb8b8624 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,10 @@ tmp/ config/database.yml .idea config/application.yml -public/stylesheets/compiled/* public/assets/* config/initializers/local.rb public/system/* public/downloads/* *.swp *.tmproj +.sass-cache/ diff --git a/Capfile b/Capfile index 4b185225f..ae1f8735e 100644 --- a/Capfile +++ b/Capfile @@ -1,4 +1,8 @@ load 'deploy' if respond_to?(:namespace) # cap2 differentiator + +# Uncomment if you are using Rails' asset pipeline +load 'deploy/assets' + Dir['vendor/gems/*/recipes/*.rb', 'vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } -load 'config/deploy' # remove this line to skip loading any of the default tasks \ No newline at end of file +load 'config/deploy' # remove this line to skip loading any of the default tasks diff --git a/Gemfile b/Gemfile index dd9ed33ea..ca599a431 100644 --- a/Gemfile +++ b/Gemfile @@ -1,88 +1,74 @@ source 'http://rubygems.org' -gem 'rails', '3.0.11' #, :git => 'git://github.com/rails/rails.git' -gem 'shotgun' +gem 'rails', '3.2.1' #, :git => 'git://github.com/rails/rails.git' -gem 'pg', '~> 0.11.0' -gem 'silent-postgres', '~> 0.1.1' -gem 'redhillonrails_core', '~> 1.2.0' # deprecated +gem 'pg', '~> 0.12.2' +# gem 'silent-postgres', :git => 'git://github.com/dolzenko/silent-postgres.git' #'~> 0.1.1' +gem 'redhillonrails_core', :git => 'git://github.com/chipiga/redhillonrails_core.git', :branch => 'rails31' # '~> 2.0.0.pre' # deprecated # gem 'schema_plus', '~> 0.2.1' # buggy shit! -gem 'devise', '~> 1.5.2' -gem 'omniauth', '~> 1.0.1' +gem 'devise', '~> 2.0.0' +gem 'omniauth', '~> 1.0.2' gem 'omniauth-openid', '~> 1.0.1' gem 'cancan', '~> 1.6.7' -gem "haml-rails", '~> 0.3.4' -# gem "compass", '~> 0.11.5' # update when it will be needed -gem 'jammit' -gem "yui-compressor", "0.9.5" # Higher versions depends on Platform gem which conflicts with Platform model -gem 'rails3-jquery-autocomplete' - gem 'ancestry', '~> 1.2.4' -gem 'paperclip', "~> 2.5" -gem "will_paginate", "~> 3.0.2" -gem 'meta-tags', '~> 1.2.4', :require => 'meta_tags' -gem "russian" +gem 'paperclip', '~> 2.5.2' +gem 'delayed_job_active_record', '~> 0.3.2' +gem 'russian', '~> 0.6.0' +gem 'highline', '~> 1.6.11' +gem 'rails-xmlrpc', '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.git' gem 'grack', :git => 'git://github.com/rdblue/grack.git', :require => 'git_http' gem "grit", :git => 'git://github.com/mojombo/grit.git', :branch => 'master' -gem 'whenever', :require => false -gem 'delayed_job', '2.1.4' -gem 'highline', '~> 1.6.8' - # Wiki gem "gollum", "1.3.1" gem "redcarpet", "1.17.2" gem 'creole' gem 'rdiscount' -#gem 'org-ruby' +# gem 'org-ruby' gem 'RedCloth' gem 'wikicloth' -# XML-RPC support -gem "rails-xmlrpc", '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.git' +gem 'unicorn', '~> 4.2.0' +gem 'newrelic_rpm', '~> 3.3.1' -gem 'unicorn', '~> 4.1.1' +gem 'rails3-jquery-autocomplete', '~> 1.0.6' +gem 'will_paginate', '~> 3.0.3' +gem 'meta-tags', '~> 1.2.4', :require => 'meta_tags' +gem "haml-rails", '~> 0.3.4' +gem 'jquery-rails', '~> 2.0.0' -group :production do - gem "airbrake", '~> 3.0.5' - gem 'bluepill', :require => false +group :assets do + gem 'sass-rails', '~> 3.2.4' + gem 'coffee-rails', '~> 3.2.2' + gem 'uglifier', '~> 1.2.1' + gem 'compass', '~> 0.12.rc.1' # :git => 'git://github.com/chriseppstein/compass.git', :branch => 'rails31' + gem 'therubyracer', '~> 0.9.9' end -gem 'newrelic_rpm' +group :production do + gem "airbrake", '~> 3.0.9' + gem 'bluepill', '~> 0.0.55', :require => false + gem 'daemons', '~> 1.1.8' # for DJ +end group :development do + gem 'shotgun' # gem 'letter_opener' gem 'rails3-generators' - gem 'web-app-theme' - gem 'hpricot' - gem 'ruby_parser' - gem 'hirb' - # deploy + gem 'whenever', :require => false gem 'capistrano', :require => false gem 'capistrano-ext', :require => false gem 'cape', :require => false gem 'capistrano_colors', :require => false end -group :development, :test do - gem 'rspec-rails', '~> 2.7.0' - gem 'factory_girl_rails', '~> 1.4.0' - gem 'rr' +group :test do + gem 'rspec-rails', '~> 2.8.1' + gem 'factory_girl_rails', '~> 1.6.0' + gem 'rr', '~> 1.0.4' end - -# group :test do -# gem 'spork', '>= 0.9.0.rc9' -# gem 'guard-spork', '~> 0.3.1' -# gem 'guard-rspec', '~> 0.5.0' -# gem 'guard-bundler', '~> 0.1.3' -# -# gem 'rb-fsevent', '>= 0.4.3', :require => false -# gem 'growl', '~> 1.0.3', :require => false -# gem 'rb-inotify', '>= 0.8.6', :require => false -# gem 'libnotify', '~> 0.5.7', :require => false -# end diff --git a/Gemfile.lock b/Gemfile.lock index d71c4ed97..871d3cf5b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,11 @@ +GIT + remote: git://github.com/chipiga/redhillonrails_core.git + revision: 5f58167c41882890c223168b0a5521d99e8d92aa + branch: rails31 + specs: + redhillonrails_core (2.0.0.pre) + activerecord (>= 3.1.0.rc) + GIT remote: git://github.com/mojombo/grit.git revision: 3fc864f3c637e06e2fa7a81f6b48a5df58a9bc5b @@ -18,33 +26,33 @@ GEM remote: http://rubygems.org/ specs: RedCloth (4.2.9) - abstract (1.0.0) - actionmailer (3.0.11) - actionpack (= 3.0.11) - mail (~> 2.2.19) - actionpack (3.0.11) - activemodel (= 3.0.11) - activesupport (= 3.0.11) - builder (~> 2.1.2) - erubis (~> 2.6.6) - i18n (~> 0.5.0) - rack (~> 1.2.1) - rack-mount (~> 0.6.14) - rack-test (~> 0.5.7) - tzinfo (~> 0.3.23) - activemodel (3.0.11) - activesupport (= 3.0.11) - builder (~> 2.1.2) - i18n (~> 0.5.0) - activerecord (3.0.11) - activemodel (= 3.0.11) - activesupport (= 3.0.11) - arel (~> 2.0.10) - tzinfo (~> 0.3.23) - activeresource (3.0.11) - activemodel (= 3.0.11) - activesupport (= 3.0.11) - activesupport (3.0.11) + actionmailer (3.2.1) + actionpack (= 3.2.1) + mail (~> 2.4.0) + actionpack (3.2.1) + activemodel (= 3.2.1) + activesupport (= 3.2.1) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.1) + rack (~> 1.4.0) + rack-cache (~> 1.1) + rack-test (~> 0.6.1) + sprockets (~> 2.1.2) + activemodel (3.2.1) + activesupport (= 3.2.1) + builder (~> 3.0.0) + activerecord (3.2.1) + activemodel (= 3.2.1) + activesupport (= 3.2.1) + arel (~> 3.0.0) + tzinfo (~> 0.3.29) + activeresource (3.2.1) + activemodel (= 3.2.1) + activesupport (= 3.2.1) + activesupport (3.2.1) + i18n (~> 0.6) + multi_json (~> 1.0) airbrake (3.0.9) activesupport builder @@ -52,16 +60,16 @@ GEM posix-spawn (>= 0.3.6) ancestry (1.2.4) activerecord (>= 2.2.2) - arel (2.0.10) + arel (3.0.0) bcrypt-ruby (3.0.1) - bluepill (0.0.52) + bluepill (0.0.55) activesupport (>= 3.0.0) - daemons (~> 1.1.0) + daemons (~> 1.1.4) i18n (>= 0.5.0) state_machine (~> 1.1.0) - builder (2.1.2) + builder (3.0.0) cancan (1.6.7) - cape (1.2.0) + cape (1.4.0) capistrano (2.9.0) highline net-scp (>= 1.0.0) @@ -72,25 +80,42 @@ GEM capistrano (>= 1.0.0) capistrano_colors (0.5.5) chronic (0.6.7) + chunky_png (1.2.5) cocaine (0.2.1) + coffee-rails (3.2.2) + coffee-script (>= 2.2.0) + railties (~> 3.2.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.2.0) + compass (0.12.rc.1) + chunky_png (~> 1.2) + fssm (>= 0.2.7) + sass (~> 3.1) creole (0.4.2) - daemons (1.1.6) - delayed_job (2.1.4) + daemons (1.1.8) + delayed_job (3.0.1) activesupport (~> 3.0) - daemons - devise (1.5.3) + delayed_job_active_record (0.3.2) + activerecord (> 2.1.0) + delayed_job (~> 3.0.0) + devise (2.0.0) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.0.3) + railties (~> 3.1) warden (~> 1.1) diff-lcs (1.1.3) - erubis (2.6.6) - abstract (>= 1.0.0) + erubis (2.7.0) + execjs (1.3.0) + multi_json (~> 1.0) expression_parser (0.9.0) - factory_girl (2.3.2) + factory_girl (2.5.1) activesupport - factory_girl_rails (1.4.0) - factory_girl (~> 2.3.0) + factory_girl_rails (1.6.0) + factory_girl (~> 2.5.0) railties (>= 3.0.0) + fssm (0.2.8.1) github-markup (0.7.0) gollum (1.3.1) albino (~> 1.3.2) @@ -109,21 +134,24 @@ GEM railties (~> 3.0) hashie (1.2.0) highline (1.6.11) + hike (1.2.1) hirb (0.6.0) - hpricot (0.8.6) - i18n (0.5.0) - jammit (0.6.5) - yui-compressor (>= 0.9.3) + i18n (0.6.0) + journey (1.0.1) + jquery-rails (2.0.0) + railties (>= 3.2.0.beta, < 5.0) + thor (~> 0.14) json (1.6.5) kgio (2.7.2) - mail (2.2.19) - activesupport (>= 2.3.6) + libv8 (3.3.10.4) + mail (2.4.1) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) meta-tags (1.2.4) actionpack mime-types (1.17.2) + multi_json (1.0.4) mustache (0.99.4) net-scp (1.0.4) net-ssh (>= 1.99.1) @@ -146,86 +174,99 @@ GEM activesupport (>= 2.3.2) cocaine (>= 0.0.2) mime-types - pg (0.11.0) + pg (0.12.2) polyglot (0.3.3) posix-spawn (0.3.6) - rack (1.2.5) - rack-mount (0.6.14) - rack (>= 1.0.0) + rack (1.4.1) + rack-cache (1.1) + rack (>= 0.4) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) - rack-test (0.5.7) + rack-protection (1.2.0) + rack + rack-ssl (1.3.2) + rack + rack-test (0.6.1) rack (>= 1.0) - rails (3.0.11) - actionmailer (= 3.0.11) - actionpack (= 3.0.11) - activerecord (= 3.0.11) - activeresource (= 3.0.11) - activesupport (= 3.0.11) + rails (3.2.1) + actionmailer (= 3.2.1) + actionpack (= 3.2.1) + activerecord (= 3.2.1) + activeresource (= 3.2.1) + activesupport (= 3.2.1) bundler (~> 1.0) - railties (= 3.0.11) + railties (= 3.2.1) rails-xmlrpc (0.3.6) rails3-generators (0.17.4) railties (>= 3.0.0) - rails3-jquery-autocomplete (1.0.5) + rails3-jquery-autocomplete (1.0.6) rails (~> 3.0) - railties (3.0.11) - actionpack (= 3.0.11) - activesupport (= 3.0.11) + railties (3.2.1) + actionpack (= 3.2.1) + activesupport (= 3.2.1) + rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) - thor (~> 0.14.4) + thor (~> 0.14.6) raindrops (0.8.0) rake (0.9.2.2) rdiscount (1.6.8) rdoc (3.12) json (~> 1.4) redcarpet (1.17.2) - redhillonrails_core (1.2.0) - activerecord (>= 2) rr (1.0.4) - rspec (2.7.0) - rspec-core (~> 2.7.0) - rspec-expectations (~> 2.7.0) - rspec-mocks (~> 2.7.0) - rspec-core (2.7.1) - rspec-expectations (2.7.0) + rspec (2.8.0) + rspec-core (~> 2.8.0) + rspec-expectations (~> 2.8.0) + rspec-mocks (~> 2.8.0) + rspec-core (2.8.0) + rspec-expectations (2.8.0) diff-lcs (~> 1.1.2) - rspec-mocks (2.7.0) - rspec-rails (2.7.0) - actionpack (~> 3.0) - activesupport (~> 3.0) - railties (~> 3.0) - rspec (~> 2.7.0) + rspec-mocks (2.8.0) + rspec-rails (2.8.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec (~> 2.8.0) ruby-openid (2.1.8) - ruby_parser (2.3.1) - sexp_processor (~> 3.0) russian (0.6.0) i18n (>= 0.5.0) sanitize (2.0.3) nokogiri (>= 1.4.4, < 1.6) - sexp_processor (3.0.10) + sass (3.1.14) + sass-rails (3.2.4) + railties (~> 3.2.0) + sass (>= 3.1.10) + tilt (~> 1.3) shotgun (0.9) rack (>= 1.0) - silent-postgres (0.1.1) - sinatra (1.2.8) - rack (~> 1.1) - tilt (>= 1.2.2, < 2.0) + sinatra (1.3.2) + rack (~> 1.3, >= 1.3.6) + rack-protection (~> 1.2) + tilt (~> 1.3, >= 1.3.3) + sprockets (2.1.2) + hike (~> 1.2) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) state_machine (1.1.2) + therubyracer (0.9.9) + libv8 (~> 3.3.10) thor (0.14.6) tilt (1.3.3) treetop (1.4.10) polyglot polyglot (>= 0.3.1) tzinfo (0.3.31) - unicorn (4.1.1) - kgio (~> 2.4) + uglifier (1.2.3) + execjs (>= 0.3.0) + multi_json (>= 1.0.2) + unicorn (4.2.0) + kgio (~> 2.6) rack - raindrops (~> 0.6) + raindrops (~> 0.7) warden (1.1.0) rack (>= 1.0) - web-app-theme (0.7.0) whenever (0.7.2) activesupport (>= 2.3.4) chronic (~> 0.6.3) @@ -233,55 +274,55 @@ GEM builder expression_parser will_paginate (3.0.3) - yui-compressor (0.9.5) PLATFORMS ruby DEPENDENCIES RedCloth - airbrake (~> 3.0.5) + airbrake (~> 3.0.9) ancestry (~> 1.2.4) - bluepill + bluepill (~> 0.0.55) cancan (~> 1.6.7) cape capistrano capistrano-ext capistrano_colors + coffee-rails (~> 3.2.2) + compass (~> 0.12.rc.1) creole - delayed_job (= 2.1.4) - devise (~> 1.5.2) - factory_girl_rails (~> 1.4.0) + daemons (~> 1.1.8) + delayed_job_active_record (~> 0.3.2) + devise (~> 2.0.0) + factory_girl_rails (~> 1.6.0) gollum (= 1.3.1) grack! grit! haml-rails (~> 0.3.4) - highline (~> 1.6.8) + highline (~> 1.6.11) hirb - hpricot - jammit + jquery-rails (~> 2.0.0) meta-tags (~> 1.2.4) - newrelic_rpm - omniauth (~> 1.0.1) + newrelic_rpm (~> 3.3.1) + omniauth (~> 1.0.2) omniauth-openid (~> 1.0.1) - paperclip (~> 2.5) - pg (~> 0.11.0) - rails (= 3.0.11) + paperclip (~> 2.5.2) + pg (~> 0.12.2) + rails (= 3.2.1) rails-xmlrpc (~> 0.3.6) rails3-generators - rails3-jquery-autocomplete + rails3-jquery-autocomplete (~> 1.0.6) rdiscount redcarpet (= 1.17.2) - redhillonrails_core (~> 1.2.0) - rr - rspec-rails (~> 2.7.0) - ruby_parser - russian + redhillonrails_core! + rr (~> 1.0.4) + rspec-rails (~> 2.8.1) + russian (~> 0.6.0) + sass-rails (~> 3.2.4) shotgun - silent-postgres (~> 0.1.1) - unicorn (~> 4.1.1) - web-app-theme + therubyracer (~> 0.9.9) + uglifier (~> 1.2.1) + unicorn (~> 4.2.0) whenever wikicloth - will_paginate (~> 3.0.2) - yui-compressor (= 0.9.5) + will_paginate (~> 3.0.3) diff --git a/app/assets/images/ava-admin.png b/app/assets/images/ava-admin.png new file mode 100644 index 000000000..b5927a3fd Binary files /dev/null and b/app/assets/images/ava-admin.png differ diff --git a/app/assets/images/ava.png b/app/assets/images/ava.png new file mode 100644 index 000000000..3c2371473 Binary files /dev/null and b/app/assets/images/ava.png differ diff --git a/app/assets/images/bg-droplist.png b/app/assets/images/bg-droplist.png new file mode 100644 index 000000000..2c5a4309b Binary files /dev/null and b/app/assets/images/bg-droplist.png differ diff --git a/app/assets/images/bg.png b/app/assets/images/bg.png new file mode 100644 index 000000000..62e74e049 Binary files /dev/null and b/app/assets/images/bg.png differ diff --git a/app/assets/images/checkbox-main.png b/app/assets/images/checkbox-main.png new file mode 100644 index 000000000..44aa8b14b Binary files /dev/null and b/app/assets/images/checkbox-main.png differ diff --git a/app/assets/images/code.png b/app/assets/images/code.png new file mode 100644 index 000000000..c348e8d7c Binary files /dev/null and b/app/assets/images/code.png differ diff --git a/app/assets/images/expand-gray.png b/app/assets/images/expand-gray.png new file mode 100644 index 000000000..cb8bbd46f Binary files /dev/null and b/app/assets/images/expand-gray.png differ diff --git a/app/assets/images/expand-gray2.png b/app/assets/images/expand-gray2.png new file mode 100644 index 000000000..c49b0b21b Binary files /dev/null and b/app/assets/images/expand-gray2.png differ diff --git a/app/assets/images/expand-white.png b/app/assets/images/expand-white.png new file mode 100644 index 000000000..78dc7c9fe Binary files /dev/null and b/app/assets/images/expand-white.png differ diff --git a/app/assets/images/expand.png b/app/assets/images/expand.png new file mode 100644 index 000000000..700e9957a Binary files /dev/null and b/app/assets/images/expand.png differ diff --git a/app/assets/images/flag.png b/app/assets/images/flag.png new file mode 100644 index 000000000..85b84ce4f Binary files /dev/null and b/app/assets/images/flag.png differ diff --git a/app/assets/images/folder.png b/app/assets/images/folder.png new file mode 100644 index 000000000..2df35409f Binary files /dev/null and b/app/assets/images/folder.png differ diff --git a/app/assets/images/lock.png b/app/assets/images/lock.png new file mode 100644 index 000000000..ddf7e233e Binary files /dev/null and b/app/assets/images/lock.png differ diff --git a/app/assets/images/logo-mini.png b/app/assets/images/logo-mini.png new file mode 100644 index 000000000..3175f3b21 Binary files /dev/null and b/app/assets/images/logo-mini.png differ diff --git a/app/assets/images/menu-hover.png b/app/assets/images/menu-hover.png new file mode 100644 index 000000000..8883a2116 Binary files /dev/null and b/app/assets/images/menu-hover.png differ diff --git a/app/assets/images/page-bg.png b/app/assets/images/page-bg.png new file mode 100644 index 000000000..f81678dec Binary files /dev/null and b/app/assets/images/page-bg.png differ diff --git a/app/assets/images/radio.png b/app/assets/images/radio.png new file mode 100644 index 000000000..28f16dfae Binary files /dev/null and b/app/assets/images/radio.png differ diff --git a/app/assets/images/search-button.png b/app/assets/images/search-button.png new file mode 100644 index 000000000..7a9e40bc4 Binary files /dev/null and b/app/assets/images/search-button.png differ diff --git a/app/assets/images/selects-2.png b/app/assets/images/selects-2.png new file mode 100644 index 000000000..150f7045b Binary files /dev/null and b/app/assets/images/selects-2.png differ diff --git a/app/assets/images/selects-focus.png b/app/assets/images/selects-focus.png new file mode 100644 index 000000000..e6fbaf8b5 Binary files /dev/null and b/app/assets/images/selects-focus.png differ diff --git a/app/assets/images/square.png b/app/assets/images/square.png new file mode 100644 index 000000000..a6f4b5f9b Binary files /dev/null and b/app/assets/images/square.png differ diff --git a/app/assets/images/submenu-hover.png b/app/assets/images/submenu-hover.png new file mode 100644 index 000000000..eda9a1a1a Binary files /dev/null and b/app/assets/images/submenu-hover.png differ diff --git a/app/assets/images/switch-off.png b/app/assets/images/switch-off.png new file mode 100644 index 000000000..e119baf8e Binary files /dev/null and b/app/assets/images/switch-off.png differ diff --git a/app/assets/images/switch-on.png b/app/assets/images/switch-on.png new file mode 100644 index 000000000..cdfa3e37e Binary files /dev/null and b/app/assets/images/switch-on.png differ diff --git a/app/assets/images/table-down.png b/app/assets/images/table-down.png new file mode 100644 index 000000000..0a6e66179 Binary files /dev/null and b/app/assets/images/table-down.png differ diff --git a/app/assets/images/table-header.png b/app/assets/images/table-header.png new file mode 100644 index 000000000..ff7181431 Binary files /dev/null and b/app/assets/images/table-header.png differ diff --git a/app/assets/images/table-sort.png b/app/assets/images/table-sort.png new file mode 100644 index 000000000..765c685e2 Binary files /dev/null and b/app/assets/images/table-sort.png differ diff --git a/app/assets/images/table-up.png b/app/assets/images/table-up.png new file mode 100644 index 000000000..53b1671cb Binary files /dev/null and b/app/assets/images/table-up.png differ diff --git a/app/assets/images/top-left.png b/app/assets/images/top-left.png new file mode 100644 index 000000000..3590e4141 Binary files /dev/null and b/app/assets/images/top-left.png differ diff --git a/app/assets/images/top-middle.png b/app/assets/images/top-middle.png new file mode 100644 index 000000000..2d01d9206 Binary files /dev/null and b/app/assets/images/top-middle.png differ diff --git a/app/assets/images/top-right.png b/app/assets/images/top-right.png new file mode 100644 index 000000000..8f6e2ac4c Binary files /dev/null and b/app/assets/images/top-right.png differ diff --git a/app/assets/images/unlock.png b/app/assets/images/unlock.png new file mode 100644 index 000000000..ca5ae11f2 Binary files /dev/null and b/app/assets/images/unlock.png differ diff --git a/app/assets/images/unlock2.png b/app/assets/images/unlock2.png new file mode 100644 index 000000000..97e9fe8be Binary files /dev/null and b/app/assets/images/unlock2.png differ diff --git a/app/assets/images/x.png b/app/assets/images/x.png new file mode 100644 index 000000000..ffd4e813e Binary files /dev/null and b/app/assets/images/x.png differ diff --git a/app/assets/javascripts/admin-members.js b/app/assets/javascripts/admin-members.js new file mode 100644 index 000000000..cef30a9e3 --- /dev/null +++ b/app/assets/javascripts/admin-members.js @@ -0,0 +1,14 @@ +function deleteAdminMember() { + if (document.getElementById("niceCheckbox1-1").checked == true) { + $("#admin-table-members-row1").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox2-1").checked == true) { + $("#admin-table-members-row2").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox3-1").checked == true) { + $("#admin-table-members-row3").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox4-1").checked == true) { + $("#admin-table-members-row4").fadeOut("slow"); + } +} \ No newline at end of file diff --git a/app/assets/javascripts/all.js b/app/assets/javascripts/all.js new file mode 100644 index 000000000..706de086e --- /dev/null +++ b/app/assets/javascripts/all.js @@ -0,0 +1,42 @@ +var state = 0; + +function droplist() { + if (state == 0) { + $("#droplist").slideToggle("slow"); + //borderDown(); + state = 1; + } +} + +function loadMessages() { + $("#messages-new").fadeOut("slow"); + $("#new-messages").delay(700).fadeIn("slow"); + //setTimeout(border1, 700) +} +function loadOldMessages() { + $("#old-messages").fadeIn("slow"); + //setTimeout(border1, 700) +} + + +$(document).click(function() { + var dl = $("#droplist").css("height"); + var dl2 = $("#droplist").css("display"); + if ((dl2 == "block")&&(dl == "91px")) { + state = 0; + droplist(); + state = 0; + } +}); + +function showActivity(elem) { + //borderDown(); + $("#activity-bottom"+elem).slideToggle("slow"); + var img = $("#expand" + elem).attr("src"); + if (img == "design/expand-gray.png") { + $("#expand" + elem).attr("src","design/expand-gray2.png"); + } else { + $("#expand" + elem).attr("src","design/expand-gray.png"); + } + //setTimeout(border1, 700) +} \ No newline at end of file diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 000000000..37a1a2883 --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,54 @@ +//= require jquery +//= require jquery_ujs +//= require jquery-ui +//= require autocomplete-rails +//= require vendor +//= require_tree . +//= require_self + +// function disableNotifierCbx(global_cbx) { +// if ($(global_cbx).attr('checked')) { +// $('.notify_cbx').removeAttr('disabled'); +// $('.notify_cbx').each(function(i,el) { $(el).prev().removeAttr('disabled'); }) +// } else { +// $('.notify_cbx').attr('disabled', 'disabled'); +// $('.notify_cbx').each(function(i,el) { $(el).prev().attr('disabled', 'disabled'); }) +// } +// } +// +// $(document).ready(function() { +// $('select#build_list_pl_id').change(function() { +// var platform_id = $(this).val(); +// var base_platforms = $('.base_platforms input[type=checkbox]'); +// +// $('#include_repos').html($('.preloaded_include_repos .include_repos_' + platform_id).html()); +// +// base_platforms.each(function(){ +// if ($.inArray(platform_id, base_platforms.map(function(){ return $(this).val() }).get()) >= 0) { +// if ($(this).val() == platform_id) { +// $(this).attr('checked', 'checked'); +// $(this).removeAttr('disabled'); +// } else { +// $(this).removeAttr('checked'); +// $(this).attr('disabled', 'disabled'); +// } +// } else { +// $(this).removeAttr('disabled'); +// } +// }); +// }); +// $('select#build_list_pl_id').trigger('change'); +// +// $('input.user_role_chbx').click(function() { +// var current = $(this); +// current.parent().find('input.user_role_chbx').each(function(i,el) { +// if ($(el).attr('id') != current.attr('id')) { +// $(el).removeAttr('checked'); +// } +// }); +// }); +// +// $('#settings_notifier_can_notify').click(function() { +// disableNotifierCbx($(this)); +// }); +// }); diff --git a/app/assets/javascripts/checkbox-main.js b/app/assets/javascripts/checkbox-main.js new file mode 100644 index 000000000..17253ffb0 --- /dev/null +++ b/app/assets/javascripts/checkbox-main.js @@ -0,0 +1,47 @@ +function changeCheck(el) +/* + Russsian comments deleted + el - span + input +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + + if(input.checked) + { + el.style.backgroundPosition="0 0"; + input.checked=false; + } + else + { + el.style.backgroundPosition="0 -18px"; + input.checked=true; + } + return true; +} +function startChangeCheck(el) +/* + Russsian comments deleted +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + if(input.checked) + { + el.style.backgroundPosition="0 -18px"; + } + return true; +} + +function startCheck() +{ + /* + Russsian comments deleted + Russsian comments deleted + */ + startChangeCheck(document.getElementById("niceCheckbox1")); + startChangeCheck(document.getElementById("niceCheckbox2")); + startChangeCheck(document.getElementById("niceCheckbox3")); + startChangeCheck(document.getElementById("niceCheckbox4")); +} \ No newline at end of file diff --git a/app/assets/javascripts/checkbox.js b/app/assets/javascripts/checkbox.js new file mode 100644 index 000000000..14072600c --- /dev/null +++ b/app/assets/javascripts/checkbox.js @@ -0,0 +1,44 @@ +function changeCheck(el) +/* + Russsian comments deleted + el - span + input +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + + if(input.checked) + { + el.style.backgroundPosition="0 0"; + input.checked=false; + } + else + { + el.style.backgroundPosition="0 -17px"; + input.checked=true; + } + return true; +} +function startChangeCheck(el) +/* + Russsian comments deleted +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + if(input.checked) + { + el.style.backgroundPosition="0 -17px"; + } + return true; +} + +function startCheck() +{ + /* + Russsian comments deleted + Russsian comments deleted + */ + startChangeCheck(document.getElementById("niceCheckbox1")); +} \ No newline at end of file diff --git a/app/assets/javascripts/cusel-init.js b/app/assets/javascripts/cusel-init.js new file mode 100644 index 000000000..04a7f7093 --- /dev/null +++ b/app/assets/javascripts/cusel-init.js @@ -0,0 +1,11 @@ +jQuery(document).ready(function(){ + +var params = { + changedEl: ".lineForm select", + visRows: 999999, + scrollArrows: false + } + + cuSel(params); + +}); \ No newline at end of file diff --git a/app/assets/javascripts/myprojects.js b/app/assets/javascripts/myprojects.js new file mode 100644 index 000000000..f0d45cf96 --- /dev/null +++ b/app/assets/javascripts/myprojects.js @@ -0,0 +1,16 @@ +$(document).ready(function() { + $("#myTable").tablesorter({ + headers: { + 1: { + sorter: false + }, + 3: { + sorter: false + } + } + }); +}); + +function deleteRow(num) { + $("#Row"+num).fadeOut("slow"); +} \ No newline at end of file diff --git a/app/assets/javascripts/radio.js b/app/assets/javascripts/radio.js new file mode 100644 index 000000000..4c30ceea0 --- /dev/null +++ b/app/assets/javascripts/radio.js @@ -0,0 +1,124 @@ +jQuery(document).ready(function(){ + +jQuery(".niceRadio").each( +/* Russsian comments deleted */ +function() { + + changeRadioStart(jQuery(this)); + +}); + + +}); + + +function changeRadio(el) +/* + Russsian comments deleted +*/ +{ + + var el = el, + input = el.find("input").eq(0); + var nm=input.attr("name"); + + jQuery(".niceRadio input").each( + + function() { + + if(jQuery(this).attr("name")==nm) + { + jQuery(this).parent().removeClass("radioChecked"); + } + + + }); + + + if(el.attr("class").indexOf("niceRadioDisabled")==-1) + { + el.addClass("radioChecked"); + input.attr("checked", true); + } + + return true; +} + +function changeVisualRadio(input) +{ +/* + Russsian comments deleted +*/ + var wrapInput = input.parent(); + var nm=input.attr("name"); + + jQuery(".niceRadio input").each( + + function() { + + if(jQuery(this).attr("name")==nm) + { + jQuery(this).parent().removeClass("radioChecked"); + } + + + }); + + if(input.attr("checked")) + { + wrapInput.addClass("radioChecked"); + } +} + +function changeRadioStart(el) +/* + Russsian comments deleted + Russsian comments deleted +*/ +{ + +try +{ +var el = el, + radioName = el.attr("name"), + radioId = el.attr("id"), + radioChecked = el.attr("checked"), + radioDisabled = el.attr("disabled"), + radioTab = el.attr("tabindex"), + radioValue = el.attr("value"); + if(radioChecked) + el.after(""+ + ""); + else + el.after(""+ + ""); + + /* Russsian comments deleted */ + if(radioDisabled) + { + el.next().addClass("niceRadioDisabled"); + el.next().find("input").eq(0).attr("disabled","disabled"); + } + + /* Russsian comments deleted */ + el.next().bind("mousedown", function(e) { changeRadio(jQuery(this)) }); + if(jQuery.browser.msie) el.next().find("input").eq(0).bind("click", function(e) { changeVisualRadio(jQuery(this)) }); + else el.next().find("input").eq(0).bind("change", function(e) { changeVisualRadio(jQuery(this)) }); + el.remove(); +} +catch(e) +{ + // Russsian comments deleted +} + + return true; +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss new file mode 100644 index 000000000..63daa576a --- /dev/null +++ b/app/assets/stylesheets/application.scss @@ -0,0 +1,3 @@ +@import "main"; +@import "tablesorter"; +@import "cusel"; diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss new file mode 100644 index 000000000..33159941a --- /dev/null +++ b/app/assets/stylesheets/main.scss @@ -0,0 +1,944 @@ +html, body { + margin: 0; + padding: 0; + font-family: Tahoma, Arial; + color: #565667; + background: #1f60a1 image-url("bg.png") repeat-x; + min-width: 940px; + min-height: 600px; + text-align: center; + height: 100%; +} + +header, section, footer, aside, nav, article, menu { + display: block; +} + +input[type="text"]:focus { outline: none; } + +input[type="password"]:focus { outline: none; } + +input:focus { outline: none; } + +select:focus { outline: none; } + +a img { border: none; } + +.wrap { + width: 940px; + margin: 0 auto; + text-align: center; + border: 1px solid #3f668c; + -webkit-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + background: #FFF; + min-height: 92%; +} + +.wrap.columns { + background: #FFF image-url("page-bg.png") repeat-y; +} + +.both { + clear: both; +} + +/* Top menu */ + +header { + -webkit-box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + position: relative; + z-index: 1000; +} + +header div.left { + background: image-url("top-left.png"); + height: 46px; + width: 14px; + float: left; +} + +header div.middle { + background: image-url("top-middle.png"); + float: left; + height: 46px; + width: 912px; +} + +header div.right { + background: image-url("top-right.png"); + height: 46px; + width: 14px; + float: right; +} + +/* Left part of top menu*/ + +header menu { + float: left; + margin: 0; + padding: 0; +} + +header menu ul { + list-style: none; + margin: 0; + padding: 10px 0px 0px 0px; +} + +header menu ul li { + display: inline; +} + +header menu ul li a { + font-size: 12px; + color: #FFF; + text-decoration: none; + height: 43px; + padding: 15px 15px 15px 15px; +} + +header menu ul li a:hover { + color: #cee7ff; +} + +header menu ul li a.first { + padding-left: 45px; +} + +header menu ul li a.active { + background: image-url("menu-hover.png") repeat-x; +} + +header div.logo { + float: left; + margin-top: -25px; + padding-left: 10px; + position: absolute; +} + +/* Right part of top menu */ + +header div.information { + float: right; +} + +header div.search { + float: left; + margin: 10px 0px 0px 0px; + -moz-border-radius-topleft: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; + background: #FFF; + border: 1px solid #7691aa; +} + +header div.search div.pic { + background: image-url("search-button.png"); + height: 22px; + width: 24px; + float: left; +} + +header div.search div.field { + float: left; + margin: -1px 0px 0px 0px; +} + +header div.search div.field input { + border: none; + height: 18px; + background: none; + width: 132px; + font-size: 12px; + font-family: Arial; + padding: 2px 0px 0px 0px; +} + +header div.search div.field input.gray { + color: #cfcfcf; +} + +header div.search div.field input.black { + color: #333333; +} + +header div.avatar { + float:left; + padding-top: 6px; + padding-right: 10px; + padding-bottom: 10px; + padding: 6px 10px 10px 24px; +} + +header div.profile { + float: left; + text-align: right; + color: #FFF; + font-size: 12px; + padding-top: 12px; +} + +header div.profile a { + color: #FFF; + text-decoration: none; +} + +header div.profile a:hover { + text-decoration: underline; +} + + +header div.droplist-wrap { + margin: -4px 0px 0px 0px; +} + +header div.droplist { + background: image-url("bg-droplist.png") repeat-x; + height: 91px; + width: 151px; + -webkit-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + position: absolute; + margin-top: 0px; + margin-left: 138px; + border-radius: 0px 0px 4px 4px; + display: none; + text-align: right; + z-index: 9999; +} + +header div.droplist-wrap div.a { + margin-top: 5px; +} + +header div.droplist a{ + position: relative; + padding-left: 15px; + font-size: 12px; + color: #7eb7ed; + text-decoration: none; + padding-right: 15px; + margin-top: 10px; +} + +header div.droplist a:hover{ + text-decoration: underline; +} + + +/* Submenu */ + +.sub-menu { + height: 38px; + margin: -7px 0px 0px 0px; + padding: 0px 0px 0px 15px; + background: #ededed; + position: relative; + z-index: 100; + border-bottom: 1px solid #FFF; + -webkit-box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); + -moz-box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); + box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); +} + +.sub-menu div.left { + float: left; + width: 200px; + border-right: 1px solid #dcdcdc; + font-size: 12px; + text-align: left; + font-weight: 700; + padding: 10px 0px 0px 0px; + height: 21px; +} + +.sub-menu div.right { + float: left; +} + + +.sub-menu nav { + float: left; + margin: 0px 0px 0px 0px; +} + +.sub-menu nav ul { + list-style: none; + text-align: left; + padding: 0; + margin: 0; + padding-top: 5px; +} + +.sub-menu nav ul li { + display: inline; +} + +.sub-menu nav ul li a { + font-size: 12px; + color: #575756; + text-decoration: none; + height: 34px; + padding: 0px 20px 6px 20px; +} + +.sub-menu nav ul li a.active { + background: image-url("submenu-hover.png") repeat-x; +} + +.sub-menu nav ul li a:hover { + color: #2b6daf; +} + +/* Page markup */ + +article { + font-size: 12px; +} + +aside { + float: left; + width: 215px; +} + +article div.right { + float: right; + width: 645px; + padding: 20px 40px 40px 40px; + text-align: left; +} + +article div.right.bigpadding { + width: 445px; + padding: 20px 140px 40px 140px; +} + +article div.all { + width: 855px; + padding: 20px 40px 20px 40px; + text-align: left; +} + + +/* Left part of page markup */ + +aside div.bordered { + border-bottom: 1px solid #dee5eb; + text-align: left; + padding: 20px 0px 0px 15px; +} + +aside div.block { + text-align: left; + padding-top: 10px; + padding-left: 15px; +} + +/* Common page parts markups */ + +article a.button { + display: inline-block; + white-space: nowrap; + background-color: #125687; + background-image: -webkit-gradient(linear, left top, left bottom, from(#68a3d8), to(#125687)); + background-image: -webkit-linear-gradient(top, #68a3d8, #125687); + background-image: -moz-linear-gradient(top, #68a3d8, #125687); + background-image: -ms-linear-gradient(top, #68a3d8, #125687); + background-image: -o-linear-gradient(top, #68a3d8, #125687); + background-image: linear-gradient(top, #68a3d8, #125687); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#68a3d8', EndColorStr='#125687'); + border: 1px solid #5084b4; + padding: 4px 20px; + margin: 0; + font-size: 12px; + text-decoration: none; + color: #FFF; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +article a.button:hover{ + background-color: #34719d; + background-image: -webkit-gradient(linear, left top, left bottom, from(#7fb3e1), to(#34719d)); + background-image: -webkit-linear-gradient(top, #7fb3e1, #34719d); + background-image: -moz-linear-gradient(top, #7fb3e1, #34719d); + background-image: -ms-linear-gradient(top, #7fb3e1, #34719d); + background-image: -o-linear-gradient(top, #7fb3e1, #34719d); + background-image: linear-gradient(top, #7fb3e1, #34719d); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#7fb3e1', EndColorStr='#34719d'); + text-decoration: none; +} + + + +article a.button:active{ + background-color: #125687; + background-image: -webkit-gradient(linear, left top, left bottom, from(#68a3d8), to(#125687)); + background-image: -webkit-linear-gradient(top, #68a3d8, #125687); + background-image: -moz-linear-gradient(top, #68a3d8, #125687); + background-image: -ms-linear-gradient(top, #68a3d8, #125687); + background-image: -o-linear-gradient(top, #68a3d8, #125687); + background-image: linear-gradient(top, #68a3d8, #125687); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#68a3d8', EndColorStr='#125687'); +} + +article a.disabled { + background-color: #888888; + background-image: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), to(#888888)); + background-image: -webkit-linear-gradient(top, #aaaaaa, #888888); + background-image: -moz-linear-gradient(top, #aaaaaa, #888888); + background-image: -ms-linear-gradient(top, #aaaaaa, #888888); + background-image: -o-linear-gradient(top, #aaaaaa, #888888); + background-image: linear-gradient(top, #aaaaaa, #888888); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#aaaaaa', EndColorStr='#888888'); + cursor: default; + color: #d8d8d8; + border: 1px solid #aaaaaa; + cursor: default; +} + +article h3{ + font-size: 14px; + color: #575756; + margin-bottom: 0; + padding-bottom: 2px; +} + +article h3.fix { + margin-top: 0px; + padding-top: 0px; +} + +article a{ + color: #7eb7ed; + font-size: 12px; + text-decoration: none; + padding: 0px 0px; +} + +article a:hover{ + text-decoration: underline; +} + +/* Right part of page markup */ + +article div.right div.hr { + border-bottom: 1px solid #dedede; + width: 100%; + padding-top: 30px; + margin-bottom: 40px; +} + +article div.right div.hr.bottom { + margin-bottom: 10px; + padding-top: 20px; +} + +article div.right div.hr.top { + padding-top: 7px; + margin-bottom: 20px; +} + +article div.right div.leftside { + float: left; +} + +article div.right div.rightside { + float: right; +} + + +.w25 { + width: 25px; +} + +.w420 { + width: 420px; + padding-bottom: 20px; +} + +.padd25 { + padding-left: 25px; +} + + +/* Footer */ + +footer { + height: 32px; + /*background: image-url("footer-bg.png");*/ + padding-left: 15px; + width: 900px; + margin: 0 auto; + text-align: center; +} + +footer ul { + margin: 0; + padding: 0; + list-style: none; + font-size: 12px; + color: #FFF; + padding-top: 10px; + text-align: left; +} + +footer ul li { + display: inline; +} + +footer ul li a { + font-size: 12px; + color: #FFF; + text-decoration: none; +} + +footer ul li a:hover { + text-decoration: underline; +} + +/* Main page */ + +aside div.bordered table{ + padding: 0; + margin: 0; + padding-bottom: 30px; + margin-left: -10px; +} + +aside div.bordered table td{ + font-size: 12px; + padding: 1px 0px 0px 0px; +} + +aside div.block table td { + text-align: right; + padding: 2px 0px 1px 0px; +} + + +aside div.block table td.first{ + width: 150px; + text-align: left; +} + +article div.right div.messages { + background: #e9f4fb; + border: 1px solid #dfeefa; + border-radius: 5px; + width: 100%; + color: #477cae; + text-align: center; + font-size: 12px; + padding: 4px 0px 4px 0px; + cursor: pointer; + margin: 15px 0px 15px 0px; +} + +article div.right div.messages:hover { + background: #dceffa; +} + +article div.right div.messages p{ + margin: 0; + padding: 0; +} + +article div.right div.activity { + border: 1px solid #d6d6d6; + width: 614px; + border-radius: 5px; + padding: 6px; + margin-top: 15px; + color: #333; +} + +article div.right div.activity div.top div.image { + float: left; +} + +article div.right div.activity div.top div.text { + float: left; + padding-left: 10px; + font-size: 12px; +} + +article div.right div.activity div.top div.text span.name { + font-weight: 700; +} + +article div.right div.activity div.top div.text span.date { + font-size: 11px; +} + +article div.right div.activity div.top div.text span.subject img { + cursor: pointer; +} + +article div.right div.activity div.fulltext { + font-size: 12px; + padding-top: 10px; + display: none; +} + +/* Admin page */ + +.admin-preferences ul { + list-style: none; + margin: 0; + padding: 0; + margin-top: 20px; + width: 215px; + text-align: left; +} + +.admin-preferences ul li{ + padding-top: 5px; + padding-bottom: 5px; + width: 215px; +} + +.admin-preferences ul li.active, .admin-preferences ul li:hover { + background: #dcecfa; +} + +.admin-preferences ul li a{ + color: #575756; + text-decoration: none; + padding-top: 5px; + padding-bottom: 5px; + padding-left: 15px; +} + +.right div.leftlist { + float: left; + width: 200px; + margin: 0px 0px 10px 0px; +} + +.right div.rightlist { + float: left; + width: 400px; + font-size: 12px; + color: #575756; + margin: 0px 0px 10px 0px; +} + +.right div.rightlist div.check { + float: left; +} + +.right div.rightlist div.forcheck { + float: left; + margin: 1px 0px 0px 5px; +} +.right div.rightlist textarea { + height: 110px; + width: 340px; + border: 1px solid #dedede; + border-radius: 4px; + padding: 5px; + font-family: Tahoma, Arial; + font-size: 12px; +} + +/* Admin-members page */ + +.right table div.img { + float: left; +} + +.right table div.radio { + float: left; + margin: 5px 0px 0px 0px; +} + +.right table div.forimg { + float: left; + margin: 5px 0px 0px 5px; +} + +.right table div.forradio { + float: left; + margin: 5px 0px 0px 5px; +} + +.right table span.niceCheck-main { + margin-top: 3px; +} + +.right div.admin-search { + float: left; +} + +.right div.admin-role { + float: left; +} + +.right div.admin-search input { + width: 300px; + margin-right: 5px; + height: 23px; + border: 1px solid #dedede; + border-radius: 3px; + margin-top: 1px; + font-size: 12px; + font-family: Tahoma, Arial; + padding-left: 5px; +} + +.right div.admin-search input.gray { + color: #cfcfcf; +} + +.right div.admin-search input.black { + color: #333333; +} + +.right div.admin-add { + float: left; + padding-top: 1px; + margin-left: 5px; +} + +.right div.admin-add a { + width: 86px; + text-align: center; + padding-bottom: 5px; +} + +/* Input elements */ + +.niceRadio { + width: 17px; + height: 17px; + display: inline-block; + cursor: pointer; + background: image-url("radio.png"); + overflow: hidden; +} +.radioChecked { + background-position: 0 -17px; +} +.niceRadio input { + margin-left: -18px; +} + +.sel80 { + width: 200px; + padding-bottom: 4px; + text-align: left; +} +.lineForm, +.lineForm3 { + margin-bottom: 0px; +} + +.niceCheck { + width: 17px; + height: 17px; + display: inline-block; + cursor: pointer; + background: image-url("checkbox.png"); +} +.niceCheck input { + display: none; +} + +.niceCheck-main { + width: 18px; + height: 18px; + display: inline-block; + cursor: pointer; + background: image-url("checkbox-main.png"); +} +.niceCheck-main input { + display: none; +} + +/* Admin build project */ + +section.left { + float: left; + text-align: left; + width: 230px; + margin-left: 250px; +} + +section.right { + float: right; + text-align: left; + width: 200px; + margin-right: 250px; +} + +section .left { + float: left; + margin-right: 4px; +} + +/* Commits history */ + +article .fright { + float: right; +} + +article .fright p{ + margin: 0; + padding: 5px 5px 0px 0px; +} + +article .date-block { + width: 100%; + margin-top: 17px; +} + +article .date-block div.date { + float: left; + background: #bedbf6; + color: #477cae; + border: 1px solid #98bede; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 0px; + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 4px 0px 0px 4px; + border-radius: 4px 0px 0px 4px; + width: 65px; + height: 55px; + padding: 10px; + padding-top: 20px; + -webkit-box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + -moz-box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + font-size: 14px; + text-align: center; +} + +article .date-block div.messages { + float: left; + border: 1px solid #cfdde7; + -moz-border-radius-topleft: 0px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 0px 4px 4px 4px; + border-radius: 0px 4px 4px 4px; + padding: 10px; + padding-bottom: 0px; + width: 746px; +} + +article .date-block div.message { + border: 1px solid #d6d6d6; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 4px 4px 4px 4px; + border-radius: 4px 4px 4px 4px; + padding: 6px; + margin-bottom: 10px; +} + +article .date-block div.message div.body { + float: left; + text-align: left; +} + +article .date-block div.message div.code { + float: right; + margin: -7px 0px 0px 640px; + position: absolute; +} + +article .date-block div.code div.top { + width: 90px; + height: 22px; + border: 1px solid #9dbcd5; + background: #cbdeef; +} + +article .date-block div.code div.bottom { + width: 90px; + text-align: right; +} + +article .date-block div.code div.left { + float: left; + width: 13px; + height: 13px; + padding-left: 2px; + padding-top: 4px; +} + +article .date-block div.code div.right { + float: right; + border: 1px solid #bcd5ea; + background: #FFF; + font-size: 12px; + width: 65px; + height: 14px; + margin: 2px; + padding: 0px 2px 2px 0px; + text-align: center; +} + +article .date-block div.image { + float: left; +} + +article .date-block div.text { + float: left; + padding-left: 10px; + font-size: 12px; +} + +article .date-block div.text span.name { + font-weight: 700; +} + +article .date-block div.text span.date { + font-size: 11px; +} + +article .date-block div.text span.subject img { + cursor: pointer; +} + +article .date-block div.fulltext { + font-size: 12px; + padding-top: 10px; + display: none; + /*width: 640px;*/ +} + + +article div.year { + background: #e9f4fb; + border: 1px solid #dfeefa; + border-radius: 5px; + width: 760px; + color: 477cae; + text-align: center; + font-size: 12px; + padding: 4px; + margin-left: 87px; + margin-top: 30px; + margin-bottom: 30px; +} + +article div.year p{ + margin: 0; + padding: 0; + color: #477CAE; +} \ No newline at end of file diff --git a/app/controllers/collaborators_controller.rb b/app/controllers/collaborators_controller.rb index f05ab25ac..c033a75b4 100644 --- a/app/controllers/collaborators_controller.rb +++ b/app/controllers/collaborators_controller.rb @@ -109,10 +109,9 @@ class CollaboratorsController < ApplicationController if flash[k].size > 0 flash[k] = flash[k].map{|i| (i.is_a? Array) ? sprintf(i.first, i.last) : i}.join('; ') else - flash[k] = nil + flash.delete k end end - flash.delete_if{|k, v| v.nil?} redirect_to(edit_project_collaborators_path(@project)) end diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 690695126..d802e9a0d 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -14,7 +14,7 @@ class CommentsController < ApplicationController def create @comment = @commentable.comments.build(params[:comment]) if @commentable.class == Issue - @comment = Comment.new(params[:comment].merge(:commentable_id => @commentable.id, :commentable_type => @commentable.class.name, :project => @project)) if @commentable.class == Grit::Commit + @comment = Comment.new(params[:comment].merge(:commentable_id => @commentable.id.hex, :commentable_type => @commentable.class.name, :project => @project)) if @commentable.class == Grit::Commit @comment.user = current_user if @comment.save flash[:notice] = I18n.t("flash.comment.saved") diff --git a/app/models/group.rb b/app/models/group.rb index bc89373d4..d74161e25 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -19,10 +19,9 @@ class Group < ActiveRecord::Base attr_readonly :uname, :own_projects_count - delegate :ssh_key, :to => :owner + delegate :ssh_key, :email, :to => :owner after_create :add_owner_to_members - after_initialize lambda {|r| r.name ||= r.uname } # default include Modules::Models::PersonalRepository # include Modules::Models::Owner diff --git a/app/models/private_user.rb b/app/models/private_user.rb index c21e6f97d..d68d5e423 100644 --- a/app/models/private_user.rb +++ b/app/models/private_user.rb @@ -1,7 +1,6 @@ # -*- encoding : utf-8 -*- class PrivateUser < ActiveRecord::Base require 'digest/sha2' - require 'active_support/secure_random' belongs_to :platform belongs_to :user diff --git a/app/models/project.rb b/app/models/project.rb index c15332d5e..68bdc9f62 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -153,7 +153,7 @@ class Project < ActiveRecord::Base class << self def commit_comments(commit, project) - comments = Comment.where(:commentable_id => commit.id, :commentable_type => 'Grit::Commit').order(:created_at) + comments = Comment.where(:commentable_id => commit.id.hex, :commentable_type => 'Grit::Commit').order(:created_at) comments.each {|x| x.project = project; x.helper} end end diff --git a/app/stylesheets/ie.scss b/app/stylesheets/ie.scss deleted file mode 100644 index 5cd5b6c5b..000000000 --- a/app/stylesheets/ie.scss +++ /dev/null @@ -1,5 +0,0 @@ -/* Welcome to Compass. Use this file to write IE specific override styles. - * Import this file using the following HTML or equivalent: - * */ diff --git a/app/stylesheets/print.scss b/app/stylesheets/print.scss deleted file mode 100644 index b0e9e456f..000000000 --- a/app/stylesheets/print.scss +++ /dev/null @@ -1,3 +0,0 @@ -/* Welcome to Compass. Use this file to define print styles. - * Import this file using the following HTML or equivalent: - * */ diff --git a/app/stylesheets/screen.scss b/app/stylesheets/screen.scss deleted file mode 100644 index 81de84703..000000000 --- a/app/stylesheets/screen.scss +++ /dev/null @@ -1,6 +0,0 @@ -/* Welcome to Compass. - * In this file you should write your main styles. (or centralize your imports) - * Import this file using the following HTML or equivalent: - * */ - -@import "compass/reset"; diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml index 64e59130c..8cba70c29 100644 --- a/app/views/devise/confirmations/new.html.haml +++ b/app/views/devise/confirmations/new.html.haml @@ -16,7 +16,8 @@ = f.text_field :email, :class => "text_field" .group.navform.wat-cf - %button.button{ :tyle => "submit" } - #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.confirmations.send"))} #{t("devise.confirmations.send")} + %button.button{:tyle => "submit"} + = image_tag("web-app-theme/icons/tick.png", :alt => t("devise.confirmations.send")) + = t("devise.confirmations.send") %span.text_button_padding - = render :partial => "devise/shared/links" \ No newline at end of file + = render :partial => "devise/shared/links" \ No newline at end of file diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index 324238cf4..457c8c943 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -21,7 +21,8 @@ = f.text_field :password_confirmation, :class => "text_field" .group.navform.wat-cf - %button.button{ :tyle => "submit" } - #{image_tag("web-app-theme/icons/application_edit.png", :alt => t("devise.passwords.edit_button"))} #{t("devise.passwords.edit_button")} + %button.button{:tyle => "submit"} + = image_tag("web-app-theme/icons/application_edit.png", :alt => t("devise.passwords.edit_button")) + = t("devise.passwords.edit_button") %span.text_button_padding = render :partial => "devise/shared/links" diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index a4ac16821..27dc033d0 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -15,7 +15,8 @@ = f.text_field :email, :class => "text_field" .group.navform.wat-cf - %button.button{ :tyle => "submit" } - #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.passwords.button"))} #{t("devise.passwords.button")} + %button.button{:tyle => "submit"} + = image_tag "web-app-theme/icons/tick.png", :alt => t("devise.passwords.button") + = t("devise.passwords.button") %span.text_button_padding = render :partial => "devise/shared/links" \ No newline at end of file diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index b983f1836..942173870 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -66,8 +66,9 @@ = f.password_field :password_confirmation, :class => "text_field" .group.navform.wat-cf - %button.button{ :type => "submit" } - #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.signed_up"))} #{t("layout.save")} + %button.button{:type => "submit"} + = image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.signed_up")) + = t("layout.save") = link_to image_tag("web-app-theme/icons/cross.png", :alt => t("devise.registrations.cancel")) + " " + t("devise.registrations.cancel"), registration_path(resource_name), :method => :delete, :class => "button", :confirm => t("devise.registrations.cancel_confirmation") diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 5c9d0de5d..12b39d4a3 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -44,7 +44,8 @@ = f.select :language, User::LANGUAGES_FOR_SELECT .group.navform.wat-cf - %button.button{ :type => "submit" } - #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.sign_up_header"))} #{t("devise.registrations.sign_up_header")} + %button.button{:type => "submit"} + = image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.sign_up_header")) + = t("devise.registrations.sign_up_header") %span.text_button_padding = render :partial => "devise/shared/links" diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index ef74f8b0b..eecab035d 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -6,20 +6,17 @@ - flash.each do |key, value| .message{ :title => key.to_s.humanize, :class => (key == :alert ? "error" : key) } %p= value - - form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f| + = form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f| .group.wat-cf - .left - = f.label :login, :class => "label right" - .right - = f.text_field :login, :class => "text_field" + .left= f.label :login, :class => "label right" + .right= f.text_field :login, :class => "text_field" .group.wat-cf - .left - = f.label :password, :class => "label right" - .right - = f.password_field :password, :class => "text_field" + .left= f.label :password, :class => "label right" + .right= f.password_field :password, :class => "text_field" .group.navform.wat-cf .right - %button.button{ :type => "submit" } - %img{ :src => "/images/web-app-theme/icons/key.png", :alt => "Save" }= t("layout.login") + %button.button{:type => "submit"} + = image_tag 'web-app-theme/icons/key.png', :alt => "Save" + = t("layout.login") %span.text_button_padding = render :partial => "devise/shared/links" diff --git a/app/views/layouts/_javascripts.html.haml b/app/views/layouts/_javascripts.html.haml deleted file mode 100644 index d128dbf35..000000000 --- a/app/views/layouts/_javascripts.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -= javascript_include_tag(Rails.env.production? ? 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js' : 'jquery.min.js') -= javascript_include_tag 'jquery-ui-1.8.16.custom.min.js' - --# fall back to local jQuery if necessary -:javascript - !window.jQuery && document.write(unescape('%3Cscript src="/javascripts/jquery.min.js"%3E%3C/script%3E')) - --#= include_javascripts :application - -= javascript_include_tag "rails", "application", "drop_down_menu" - --# Append your own using content_for :javascripts -= yield :javascripts diff --git a/app/views/layouts/_stylesheets.html.haml b/app/views/layouts/_stylesheets.html.haml deleted file mode 100644 index 101eb8857..000000000 --- a/app/views/layouts/_stylesheets.html.haml +++ /dev/null @@ -1,6 +0,0 @@ --#= include_stylesheets :application - -= stylesheet_link_tag "web-app-theme/base.css", "web-app-theme/themes/default/style.css", "web-app-theme/override.css", "git/style.css" -= stylesheet_link_tag "jquery-ui-1.8.16.custom.css", "datatable.css", "patches.css" - -= yield :stylesheets diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 1e72aff63..ba51619c2 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,59 +1,49 @@ !!! %html %head + %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"} %title= choose_title - = render :partial => "layouts/stylesheets" - = render :partial => "layouts/javascripts" + = stylesheet_link_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/base/jquery-ui.css', :media => 'screen, projection' + = stylesheet_link_tag "application" + = javascript_include_tag "application" = csrf_meta_tag + %body - #container - #header - %h1 - %a{:href => "/"}= choose_title - #user-navigation - %ul.wat-cf - %li= link_to current_user.uname, edit_user_registration_path - %li= link_to t('layout.logout'), destroy_user_session_path, :method => :delete, :class => "logout" - #main-navigation - %ul.wat-cf - -if can? :index, User - %li{:class => controller.controller_path == 'users' ? 'active' : '' } - %a{:href => users_path}= t("layout.menu.users") - -if can? :index, Platform - %li{:class => controller.controller_path == 'platforms' ? 'active' : '' } - %a{:href => platforms_path}= t("layout.menu.platforms") - -if can? :index, Project - %li{:class => controller.controller_path == 'projects' ? 'active' : '' } - %a{:href => projects_path}= t("layout.menu.projects") - -if can? :index, Group - %li{:class => controller.controller_path == 'groups' ? 'active' : '' } - %a{:href => groups_path}= t("layout.menu.groups") - -if can? :index, Download - %li{:class => controller.controller_path == 'downloads' ? 'active' : '' } - %a{:href => downloads_path}= t("layout.menu.downloads") - -if can? :index, EventLog - %li{:class => controller.controller_path == 'event_logs' ? 'active' : '' } - %a{:href => event_logs_path}= t("layout.menu.event_logs") - -if can? :index, BuildList - %li{:class => controller.controller_path == 'build_lists' ? 'active' : '' } - %a{:href => build_lists_path}= t("layout.menu.build_lists") - -if can? :platforms, Category - %li{:class => controller.controller_path == 'categories' ? 'active' : '' } - %a{:href => catalogs_path}= t("layout.menu.categories") - -if can? :read, current_user.personal_repository - %li{:class => controller.controller_path == 'personal_repositories' ? 'active' : '' } - %a{:href => personal_repository_path( current_user.personal_repository.id )}= t("layout.menu.personal_repository") - - if can? :index, AutoBuildList - %li{:class => controller.controller_path == 'auto_build_lists' ? 'active' : '' } - %a{:href => auto_build_lists_path}= t("layout.menu.auto_build_lists") - #wrapper.wat-cf - = render :partial => "layouts/flashes" - #main - = yield - #footer - .block - = yield :footer - - #sidebar - = yield :sidebar + .wrap + %header + .left + .middle + %menu + = render 'layouts/menu/top' + .logo= image_tag 'logo-mini.png', :alt => 'logo' + .information + .search + .pic + .field + %input.gray{:onclick => "if(this.value=='#{t "layout.search"}'){this.value='';this.className='black';}", :onblur => "if(this.value==''){this.value='#{t "layout.search"}';this.className='gray';}", :type => "text", :value => "#{t "layout.search"}"} + .avatar{:onclick => "droplist();"}= image_tag 'ava.png', :alt => 'avatar', :height => "30" + .profile{:onclick => "droplist();"} + %a{:href => "#", :onclick => "droplist();"} + = current_user.uname + = image_tag 'expand-white.png', :alt => 'ex' + .both + .droplist-wrap + #droplist.droplist + .a= link_to current_user.uname, current_user + .a= link_to t('layout.settings.label'), edit_user_registration_path + .a= link_to t('layout.logout'), destroy_user_session_path, :method => :delete + .right + .both + - if content_for?(:sub_menu) + .sub-menu= yield :sub_menu + .both + = render "layouts/flashes" + %article + - if content_for?(:sidebar) + %aside= yield :sidebar + .right= yield + - else + .all= yield + .both + %footer= render "layouts/menu/bottom" diff --git a/app/views/layouts/menu/_bottom.html.haml b/app/views/layouts/menu/_bottom.html.haml new file mode 100644 index 000000000..5f9aa9cdc --- /dev/null +++ b/app/views/layouts/menu/_bottom.html.haml @@ -0,0 +1,19 @@ +%ul + %li + = image_tag 'square.png' + = t('bottom_menu.copyright') + %li + = image_tag 'square.png' + = image_tag 'flag.png', :alt => 'flag' + %li + = image_tag 'square.png' + = link_to t('bottom_menu.about'), '#' + %li + = image_tag 'square.png' + = link_to t('bottom_menu.contacts'), '#' + %li + = image_tag 'square.png' + = link_to t('bottom_menu.tos'), '#' + %li + = image_tag 'square.png' + = link_to t('bottom_menu.security'), '#' \ No newline at end of file diff --git a/app/views/layouts/menu/_top.html.haml b/app/views/layouts/menu/_top.html.haml new file mode 100644 index 000000000..e3c7bbc15 --- /dev/null +++ b/app/views/layouts/menu/_top.html.haml @@ -0,0 +1,4 @@ +%ul + - (collection = t 'top_menu').each do |base, title| + - if can? :index, base.to_s.classify.constantize + %li= link_to title, send(:"#{base}_path"), :class => [].tap{|c| c << 'first' if collection.first.first == base; c << 'active' if params[:controller] == base.to_s}.join(' ') \ No newline at end of file diff --git a/app/views/layouts/sessions.html.haml b/app/views/layouts/sessions.html.haml index 055710952..f56fa2d68 100644 --- a/app/views/layouts/sessions.html.haml +++ b/app/views/layouts/sessions.html.haml @@ -1,11 +1,10 @@ !!! %html %head + %meta{:content => "text/html; charset=utf-8", "http-equiv" => "content-type"} = display_meta_tags :site => APP_CONFIG['project_name'] - = render :partial => "layouts/javascripts" - -#= include_stylesheets :sessions - = stylesheet_link_tag "web-app-theme/base.css", "web-app-theme/themes/default/style.css", "web-app-theme/override.css" - + = stylesheet_link_tag "application" + = javascript_include_tag "application" = csrf_meta_tag %body #container diff --git a/app/views/products/_crontab.html.haml b/app/views/products/_crontab.html.haml index 0982d7099..6e3074904 100644 --- a/app/views/products/_crontab.html.haml +++ b/app/views/products/_crontab.html.haml @@ -1,68 +1,67 @@ -- content_for :javascripts do - :javascript - $(function(){ - $(".chooser").click(function() { - var for_element = this.name.replace(/_chooser/,""); - $("#" + for_element).attr("disabled", (this.value !== "1")); - }); - - $(".cron").change(function() { - var minute, hour, day, month, weekday; - - minute = getSelected('minute'); - hour = getSelected('hour'); - day = getSelected('day'); - month = getSelected('month'); - weekday = getSelected('weekday'); - - $("#cron").attr("value", minute + " " + hour + " " + day + " " + month + " " + weekday); - - return false; - }); - - $("#product_use_cron").change(function(){ - if ($("#product_use_cron:checked").length > 0) { - $("#cron").attr("disabled", false); - } else { - $("#cron").attr("disabled", true); - } - }); - - $("#genereator_btn a").click(function(){ - $("#crontab_generator").slideToggle(function(){ - - if ($("#crontab_generator").css("display") == "none") { - $("#genereator_btn a").text("#{t("layout.products.cron_tab_generator.show")}"); - } else { - $("#genereator_btn a").text("#{t("layout.products.cron_tab_generator.hide")}"); - } - - }); - - return false; - }); +:javascript + $(function(){ + $(".chooser").click(function() { + var for_element = this.name.replace(/_chooser/,""); + $("#" + for_element).attr("disabled", (this.value !== "1")); }); - function getSelected(name) { - var chosen; + $(".cron").change(function() { + var minute, hour, day, month, weekday; - if ($("#" + name + "_chooser_every").attr("checked")) { - chosen = '*'; + minute = getSelected('minute'); + hour = getSelected('hour'); + day = getSelected('day'); + month = getSelected('month'); + weekday = getSelected('weekday'); + + $("#cron").attr("value", minute + " " + hour + " " + day + " " + month + " " + weekday); + + return false; + }); + + $("#product_use_cron").change(function(){ + if ($("#product_use_cron:checked").length > 0) { + $("#cron").attr("disabled", false); } else { - var all_selected = []; - - $("#" + name + " option:selected").each(function(i, ele) { all_selected.push($(ele).attr("value")); }); - - if (all_selected.length) { - chosen = all_selected.join(","); - } else { - chosen = '*'; - } + $("#cron").attr("disabled", true); } + }); - return chosen; + $("#genereator_btn a").click(function(){ + $("#crontab_generator").slideToggle(function(){ + + if ($("#crontab_generator").css("display") == "none") { + $("#genereator_btn a").text("#{t("layout.products.cron_tab_generator.show")}"); + } else { + $("#genereator_btn a").text("#{t("layout.products.cron_tab_generator.hide")}"); + } + + }); + + return false; + }); + }); + + function getSelected(name) { + var chosen; + + if ($("#" + name + "_chooser_every").attr("checked")) { + chosen = '*'; + } else { + var all_selected = []; + + $("#" + name + " option:selected").each(function(i, ele) { all_selected.push($(ele).attr("value")); }); + + if (all_selected.length) { + chosen = all_selected.join(","); + } else { + chosen = '*'; + } } + return chosen; + } + .group = form.check_box :use_cron diff --git a/app/views/repositories/_proj_list.html.haml b/app/views/repositories/_proj_list.html.haml index 64d8a5da8..1635b5a0c 100644 --- a/app/views/repositories/_proj_list.html.haml +++ b/app/views/repositories/_proj_list.html.haml @@ -16,6 +16,3 @@ %th.last %tbody %br - -= content_for :javascripts do - = javascript_include_tag 'jquery.dataTables.min.js' diff --git a/app/views/wiki/_editor.html.haml b/app/views/wiki/_editor.html.haml index 1be8c1735..cf060ad30 100644 --- a/app/views/wiki/_editor.html.haml +++ b/app/views/wiki/_editor.html.haml @@ -39,8 +39,8 @@ = link_to t("layout.wiki.preview"), "javascript:void(0)", :id => "gollum-editor-preview", :class => "minibutton", :title => t("layout.wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project) -- content_for :javascripts do - = javascript_include_tag 'gollum/editor/gollum.editor.js' - -- content_for :stylesheets do - = stylesheet_link_tag 'gollum/editor.css' +/ - content_for :javascripts do +/ = javascript_include_tag 'gollum/editor/gollum.editor.js' +/ +/ - content_for :stylesheets do +/ = stylesheet_link_tag 'gollum/editor.css' diff --git a/app/views/wiki/_gollum_includes.html.haml b/app/views/wiki/_gollum_includes.html.haml index 1e42e6d96..c3b2db1b7 100644 --- a/app/views/wiki/_gollum_includes.html.haml +++ b/app/views/wiki/_gollum_includes.html.haml @@ -1,5 +1,5 @@ -- content_for :javascripts do - = javascript_include_tag 'gollum/gollum.js', 'gollum/gollum.dialog.js', 'gollum/gollum.placeholder.js' - -- content_for :stylesheets do - = stylesheet_link_tag 'gollum/gollum.css', 'gollum/dialog.css', 'gollum/ie7.css', 'gollum/template.css' +/ - content_for :javascripts do +/ = javascript_include_tag 'gollum/gollum.js', 'gollum/gollum.dialog.js', 'gollum/gollum.placeholder.js' +/ +/ - content_for :stylesheets do +/ = stylesheet_link_tag 'gollum/gollum.css', 'gollum/dialog.css', 'gollum/ie7.css', 'gollum/template.css' diff --git a/config/application.rb b/config/application.rb index 22fd70342..7729c9f09 100644 --- a/config/application.rb +++ b/config/application.rb @@ -5,7 +5,12 @@ require 'rails/all' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) if defined?(Bundler) +if defined?(Bundler) + # If you precompile assets before deploying to production, use this line + Bundler.require *Rails.groups(:assets => %w(development test)) + # If you want your assets lazily compiled in production, use this line + # Bundler.require(:default, :assets, Rails.env) +end module Rosa class Application < Rails::Application @@ -42,5 +47,11 @@ module Rosa # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] + + # Enable the asset pipeline + config.assets.enabled = true + + # Version of your assets, change this if you want to expire all your assets + config.assets.version = '1.0' end end diff --git a/config/assets.yml b/config/assets.yml deleted file mode 100644 index 999046ee8..000000000 --- a/config/assets.yml +++ /dev/null @@ -1,16 +0,0 @@ -javascripts: - application: - - public/javascripts/application.js - - public/javascripts/drop_down_menu.js - -stylesheets: - application: - - public/stylesheets/web-app-theme/base.css - - public/stylesheets/web-app-theme/themes/default/style.css - - public/stylesheets/web-app-theme/override.css - - public/stylesheets/git/style.css - - sessions: - - public/stylesheets/web-app-theme/base.css - - public/stylesheets/web-app-theme/themes/default/style.css - - public/stylesheets/web-app-theme/override.css diff --git a/config/compass.rb b/config/compass.rb deleted file mode 100644 index d3fe0bb92..000000000 --- a/config/compass.rb +++ /dev/null @@ -1,16 +0,0 @@ -# -*- encoding : utf-8 -*- -# This configuration file works with both the Compass command line tool and within Rails. -# Require any additional compass plugins here. - -project_type = :rails -project_path = Compass::AppIntegration::Rails.root -environment = Compass::AppIntegration::Rails.env - -# Set this to the root of your project when deployed: -http_path = "/" -css_dir = "public/stylesheets/compiled" -sass_dir = "app/stylesheets" -javascripts_dir = "public/javascripts" - -http_stylesheets_path = "/stylesheets" -http_javascripts_path = "/javascripts" diff --git a/config/deploy.rb b/config/deploy.rb index c67c374a3..589fdc7dd 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,4 +1,5 @@ # -*- encoding : utf-8 -*- +$:.unshift File.expand_path('.') $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) set :rvm_type, :user @@ -28,9 +29,9 @@ set :scm, :git set :repository, "git@github.com:warpc/rosa-build.git" set :deploy_via, :remote_cache -require './lib/recipes/nginx' -require './lib/recipes/unicorn' -require './lib/recipes/bluepill' +require 'lib/recipes/nginx' +require 'lib/recipes/unicorn' +require 'lib/recipes/bluepill' namespace :deploy do task :stub_xml_rpc do diff --git a/config/environments/development.rb b/config/environments/development.rb index 3e4c691ae..66526d53c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -23,6 +23,18 @@ Rosa::Application.configure do # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin + + # Do not compress assets + config.assets.compress = false + + # Expands the lines which load the assets + config.assets.debug = true + + # Raise exception on mass assignment protection for Active Record models + config.active_record.mass_assignment_sanitizer = :strict + + # Log the query plan for queries taking more than this (works with SQLite, MySQL, and PostgreSQL) + config.active_record.auto_explain_threshold_in_seconds = 0.5 end require 'stub_xml_rpc' diff --git a/config/environments/production.rb b/config/environments/production.rb index fe08b9089..ae3430fbf 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -48,6 +48,15 @@ Rosa::Application.configure do # Send deprecation notices to registered listeners config.active_support.deprecation = :notify + + # Compress JavaScripts and CSS + config.assets.compress = true + + # Don't fallback to assets pipeline if a precompiled asset is missed + config.assets.compile = false + + # Generate digests for assets URLs + config.assets.digest = true end # require 'stub_xml_rpc' diff --git a/config/environments/test.rb b/config/environments/test.rb index 44f17a243..fac0c5e29 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -34,6 +34,13 @@ Rosa::Application.configure do # Print deprecation notices to the stderr config.active_support.deprecation = :stderr + + # Configure static asset server for tests with Cache-Control for performance + config.serve_static_assets = true + config.static_cache_control = "public, max-age=3600" + + # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets + config.assets.allow_debugging = true end require 'stub_xml_rpc' # TODO stub XML calls through stubbers diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 7f0e522af..8babbd620 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -1,12 +1,17 @@ en: errors: messages: + expired: "has expired, please request a new one" not_found: "not found" - already_confirmed: "was already confirmed" + already_confirmed: "was already confirmed, please try signing in" not_locked: "was not locked" + not_saved: + one: "1 error prohibited this %{resource} from being saved:" + other: "%{count} errors prohibited this %{resource} from being saved:" devise: failure: + already_authenticated: 'You are already signed in.' unauthenticated: 'You need to sign in or sign up before continuing.' unconfirmed: 'You have to confirm your account before continuing.' locked: 'Your account is locked.' @@ -20,23 +25,27 @@ en: passwords: send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.' updated: 'Your password was changed successfully. You are now signed in.' - button: 'Submit' - edit_button: 'Change my password' + updated_not_active: 'Your password was changed successfully.' + send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail" confirmations: send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' + send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.' confirmed: 'Your account was successfully confirmed. You are now signed in.' registrations: - signed_up: 'You have signed up successfully. If enabled, a confirmation was sent to your e-mail.' + signed_up: 'Welcome! You have signed up successfully.' + signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.' + signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.' + signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.' updated: 'You updated your account successfully.' + update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address." destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' - sign_up_header: 'Signup' - edit_password_description: Leave blank if you don't want to change it - current_password_description: 'We need your current password to confirm your changes' - cancel: 'Cancel my account' - cancel_confirmation: 'Are you sure?' unlocks: send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' - unlocked: 'Your account was successfully unlocked. You are now signed in.' + unlocked: 'Your account has been unlocked successfully. Please sign in to continue.' + send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.' + omniauth_callbacks: + success: 'Successfully authorized from %{kind} account.' + failure: 'Could not authorize you from %{kind} because "%{reason}".' mailer: confirmation_instructions: subject: 'Confirmation instructions' diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml index 154572a8d..3c6762372 100644 --- a/config/locales/devise.ru.yml +++ b/config/locales/devise.ru.yml @@ -1,7 +1,7 @@ ru: errors: messages: - expired: "устарела. Пожалуйста, запросите новую" + expired: "истекла, пожалуйста запросите новую" not_found: "не найдена" already_confirmed: "уже подтверждена. Пожалуйста, попробуйте войти в систему" not_locked: "не заблокирована" @@ -13,54 +13,42 @@ ru: devise: failure: - already_authenticated: "Вы уже вошли в систему." - unauthenticated: 'Вы должны войти или зарегистрироваться, прежде чем сможете продолжить.' - unconfirmed: 'Вы должны подтвердить вашу учетную запись, прежде чем сможете продолжить.' - locked: 'Ваша учетная запись заблокирована.' - invalid: 'Неверный пароль или адрес электронной почты.' - invalid_token: 'Неверный ключ аутентификации.' - timeout: 'Ваша сессия закончена. Пожалуйста, войдите еще раз, чтобы продолжить.' - inactive: 'Ваша учетная запись еще не активирована.' + already_authenticated: 'Вы уже вошли в систему.' + unauthenticated: "Вам необходимо войти в систему или зарегистрироваться." + unconfirmed: "Вы должны подтвердить вашу учётную запись." + locked: "Ваша учётная запись заблокирована." + invalid: "Неверный адрес e-mail или пароль." + invalid_token: "Неверный ключ аутентификации." + timeout: "Ваш сеанс закончился. Пожалуйста, войдите в систему снова." + inactive: "Ваша учётная запись ещё не активирована." sessions: - link: 'Войти' - signed_in: 'Вы вошли.' - signed_out: 'Вы вышли.' + signed_in: "Вход в систему выполнен." + signed_out: "Выход из системы выполнен." passwords: - link: 'Забыли пароль?' - button: 'Восстановить' - send_instructions: 'Вы получите письмо с инструкциями о том, как сбросить ваш пароль, через несколько минут.' - send_paranoid_instructions: "Если ваш адрес e-mail есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по восстановлению вашего пароля." - updated: 'Ваш пароль изменен. Теперь вы можете войти.' - edit: 'Изменение пароля' - edit_button: 'Изменить пароль' + send_instructions: "В течение нескольких минут вы получите e-mail с инструкциями по восстановлению вашего пароля." + updated: "Ваш пароль изменён. Теперь вы вошли в систему." + updated_not_active: 'Ваш пароль успешно изменён.' + send_paranoid_instructions: "Если Ваш e-mail существует, в течение нескольких минут вы получите e-mail с инструкциями по восстановлению вашего пароля." confirmations: - link: "Не получили инструкции для подтверждения учетной записи?" - send_instructions: 'Вы получите письмо с инструкциями о том, как подтвердить вашу учетную запись.' - send_paranoid_instructions: "Если ваш адрес e-mail есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи." - confirmed: 'Ваша учетная запись успешно подтверждена. Добро пожаловать.' - resend_header: 'Повторная отправка инструкций для подтверждения учетной записи' - send: "Отправить" + send_instructions: "В течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи." + send_paranoid_instructions: 'Если Ваш e-mail существует, то в течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи.' + confirmed: "Ваша учётная запись подтверждена. Теперь вы вошли в систему." + error: "Неверный код подтверждения." registrations: - link: 'Регистрация' - signed_up: 'Вы успешно зарегистрировались.' - inactive_signed_up: "Добро пожаловать! Вы успешно зарегистрировались. Но пока вы не можете войти в систему, т.к. ваша учётная запись %{reason}." - updated: 'Ваша учетная запись изменена.' - destroyed: 'До свидания! Ваша учетная запись удалена. Надеемся вскоре снова вас увидеть.' - sign_up_header: 'Регистрация' - edit: 'Редактировать' - edit_password_description: 'Оставьте пароль пустым, если не хотите его менять' - current_password_description: 'Нам нужен ваш текущий пароль для подтверждения изменения' - cancel: 'Удалить' - cancel_confirmation: 'Вы уверены, что хотите удалить учетную запись?' + signed_up: "Добро пожаловать! Вы успешно зарегистрировались." + signed_up_but_unconfirmed: 'Сообщение для подтверждения учетной записи было отправлено на Ваш email. Пожалуйста откройте ссылку из письма для активации.' + signed_up_but_inactive: "Добро пожаловать! Вы успешно зарегистрировались. Но пока вы не можете войти в систему, т.к. ваша учётная запись не активированна." + signed_up_but_locked: 'Добро пожаловать! Вы успешно зарегистрировались. Но пока вы не можете войти в систему, т.к. ваша учётная запись заблокированна.' + updated: "Ваша учётная запись изменена." + update_needs_confirmation: "Вы успешно обновили свой аккаунт, но нам необходимо проверить Ваш новый email адрес. Пожалуйста проверьте Ваш email и кликните по ссылке чтобы подтвердить Ваш новый email адрес." + destroyed: "До свидания! Ваша учётная запись удалена. Надеемся снова увидеть вас." unlocks: - link: "Не получили инструкции для разблокировки учетной записи?" - send_instructions: 'Вы получите письмо с инструкциями о том, как разблокировать вашу учетную запись, через несколько минут.' - send_paranoid_instructions: "Если ваша учётная запись существует, то в течение нескольких минут вы получите письмо с инструкциями по её разблокировке." - unlocked: 'Ваша учетная запись разблокирована. Вы вошли.' + send_instructions: "В течение нескольких минут вы получите письмо с инструкциями по разблокировке вашей учётной записи." + unlocked: "Ваша учётная запись разблокирована. Теперь вы вошли в систему." + send_paranoid_instructions: 'Если ваша учетная запись существует, в течение нескольких минут вы получите письмо с инструкциями по разблокировке вашей учётной записи.' omniauth_callbacks: - register: "Аутентификация прошла успешно, но необходимо уточнить дополнительные данные" - success: "Вход в систему выполнен с учётной записью из %{kind}." - failure: "Вы не можете войти в систему с учётной записью из %{kind}, т.к. \"%{reason}\"." + success: 'Успешная авторизация через %{kind}.' + failure: 'Не возможно авторизоваться через %{kind}, т.к. "%{reason}".' mailer: confirmation_instructions: subject: "Инструкции по подтверждению учётной записи" diff --git a/config/locales/en.yml b/config/locales/en.yml index d864d5797..cbb84b4c2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -15,6 +15,7 @@ en: filtered_label: (filtered from _MAX_) layout: + search: Search logged_in_as: You logged as logout: Logout user_list: User list @@ -42,6 +43,7 @@ en: confirm: Sure? back: Back settings: + label: Settings notifier: Notifier setting notifiers: edit_header: Notifier setting @@ -84,23 +86,6 @@ en: time: ago: ago - menu: - categories: Catalogue - containers: Containers - downloads: Statistics - event_logs: Event log - build_lists: Task monitoring - groups: Groups - platforms: Platforms - products: Products - projects: Projects - repositories: Repositories - rights: Rights - roles: Roles - users: Users - personal_repository: My repository - auto_build_lists: Automated build - sessions: sign_in_header: Sign in @@ -366,6 +351,7 @@ en: confirm: Sure? back: Back settings: + label: Settings notifier: Notifier setting notifiers: edit_header: Notifier setting @@ -405,23 +391,6 @@ en: Saturday: Saturday Sunday: Sunday - menu: - categories: Catalogue - containers: Containers - downloads: Statistics - event_logs: Event log - build_lists: Task monitoring - groups: Groups - platforms: Platforms - products: Products - projects: Projects - repositories: Repositories - rights: Rights - roles: Roles - users: Users - personal_repository: My repository - auto_build_lists: Automated build - sessions: sign_in_header: Sign in @@ -506,7 +475,7 @@ en: clone: To clone event_logs: - list:List + list: List list_header: Event log repositories: diff --git a/config/locales/menu.en.yml b/config/locales/menu.en.yml new file mode 100644 index 000000000..4ebf69581 --- /dev/null +++ b/config/locales/menu.en.yml @@ -0,0 +1,21 @@ +en: + menu: + repositories: Repositories + personal_repository: My repository + products: Products + categories: Catalogue + auto_build_lists: Automated build + downloads: Statistics + top_menu: + platforms: Platforms + projects: Projects + build_lists: Task monitoring + users: Users + groups: Groups + event_logs: Event log + bottom_menu: + copyright: ROSA Lab © 2012 + about: About company + contacts: Contacts + tos: Terms Of Service + security: Security diff --git a/config/locales/menu.ru.yml b/config/locales/menu.ru.yml new file mode 100644 index 000000000..54933bdcb --- /dev/null +++ b/config/locales/menu.ru.yml @@ -0,0 +1,21 @@ +ru: + menu: + categories: Каталог + products: Продукты + repositories: Репозитории + personal_repository: Мой репозиторий + auto_build_lists: Авто. сборки + downloads: Статистика + top_menu: + platforms: Платформы + projects: Проекты + build_lists: Мониторинг задач + users: Пользователи + groups: Группы + event_logs: Лог событий + bottom_menu: + copyright: ROSA Лаб. © 2012 + about: О компании + contacts: Контакты + tos: Условия использования + security: Безопасность diff --git a/config/locales/ru.yml b/config/locales/ru.yml index c165f173a..f7702f2d7 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1,5 +1,4 @@ ru: - will_paginate: previous_label: ‹ Предыдущая next_label: Следующая › @@ -16,6 +15,7 @@ ru: filtered_label: (отфильтровано из _MAX_) layout: + search: Поиск logged_in_as: Вы вошли как logout: Выйти user_list: Список пользователей @@ -43,12 +43,13 @@ ru: confirm: Уверены? back: Назад settings: + label: 'Настройки' notifier: Настройки оповещений notifiers: edit_header: Настройки оповещений processing: Обрабатывается... invalid_content_type: имеет неверный тип - + devise: shared_links: sign_in: Войти @@ -85,23 +86,6 @@ ru: time: ago: назад - menu: - categories: Каталог - containers: Контейнеры - downloads: Статистика - event_logs: Лог событий - build_lists: Мониторинг задач - groups: Группы - platforms: Платформы - products: Продукты - projects: Проекты - repositories: Репозитории - rights: Права - roles: Роли - users: Пользователи - personal_repository: Мой репозиторий - auto_build_lists: Авто. сборки - sessions: sign_in_header: Вход в систему diff --git a/config/routes.rb b/config/routes.rb index c26020d1e..f03dcbf0c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,9 +3,10 @@ Rosa::Application.routes.draw do # XML RPC match 'api/xmlrpc' => 'rpc#xe_index' - devise_for :users, :controllers => {:omniauth_callbacks => 'users/omniauth_callbacks'} do + devise_scope :user do get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru' end + devise_for :users, :controllers => {:omniauth_callbacks => 'users/omniauth_callbacks'} resources :users do resources :groups, :only => [:new, :create, :index] diff --git a/db/migrate/20110309144736_devise_create_users.rb b/db/migrate/20110309144736_devise_create_users.rb index f4b2997e5..baee7dd05 100644 --- a/db/migrate/20110309144736_devise_create_users.rb +++ b/db/migrate/20110309144736_devise_create_users.rb @@ -3,12 +3,18 @@ class DeviseCreateUsers < ActiveRecord::Migration def self.up create_table(:users) do |t| t.string :name - t.database_authenticatable :null => false - t.recoverable - t.rememberable + + ## Database authenticatable + t.string :email, :null => false, :default => "" + t.string :encrypted_password, :null => false, :default => "" + ## Recoverable + t.string :reset_password_token + t.datetime :reset_password_sent_at + ## Rememberable + t.datetime :remember_created_at + t.timestamps end - add_index :users, :email, :unique => true add_index :users, :reset_password_token, :unique => true end diff --git a/db/migrate/20120201181421_add_queue_to_delayed_jobs.rb b/db/migrate/20120201181421_add_queue_to_delayed_jobs.rb new file mode 100644 index 000000000..072c8d40c --- /dev/null +++ b/db/migrate/20120201181421_add_queue_to_delayed_jobs.rb @@ -0,0 +1,9 @@ +class AddQueueToDelayedJobs < ActiveRecord::Migration + def self.up + add_column :delayed_jobs, :queue, :string + end + + def self.down + remove_column :delayed_jobs, :queue + end +end diff --git a/db/migrate/20120202154114_upgrade_devise.rb b/db/migrate/20120202154114_upgrade_devise.rb new file mode 100644 index 000000000..225d601e4 --- /dev/null +++ b/db/migrate/20120202154114_upgrade_devise.rb @@ -0,0 +1,12 @@ +# -*- encoding : utf-8 -*- +class UpgradeDevise < ActiveRecord::Migration + def up + remove_column :users, :remember_token if User.column_names.include?('remember_token') + add_column :users, :reset_password_sent_at, :datetime unless User.column_names.include?('reset_password_sent_at') + end + + def down + remove_column :users, :reset_password_sent_at if User.column_names.include?('reset_password_sent_at') + add_column :users, :remember_token, :string unless User.column_names.include?('remember_token') + end +end diff --git a/db/migrate/20120206225130_change_commentable_id_to_decimal.rb b/db/migrate/20120206225130_change_commentable_id_to_decimal.rb new file mode 100644 index 000000000..799e1f8d9 --- /dev/null +++ b/db/migrate/20120206225130_change_commentable_id_to_decimal.rb @@ -0,0 +1,17 @@ +class ChangeCommentableIdToDecimal < ActiveRecord::Migration + def up + add_column :comments, :commentable_id_tmp, :decimal, :precision => 50, :scale => 0 + Comment.reset_column_information + Comment.all.each {|c| c.update_column :commentable_id_tmp, (c.commentable_type == 'Grit::Commit' ? c.commentable_id.hex : c.commentable_id.to_i)} + remove_column :comments, :commentable_id + rename_column :comments, :commentable_id_tmp, :commentable_id + end + + def down + add_column :comments, :commentable_id_tmp, :string + Comment.reset_column_information + Comment.all.each {|c| c.update_column :commentable_id_tmp, (c.commentable_type == 'Grit::Commit' ? c.commentable_id.to_s(16) : c.commentable_id.to_s)} + remove_column :comments, :commentable_id + rename_column :comments, :commentable_id_tmp, :commentable_id + end +end diff --git a/db/schema.rb b/db/schema.rb index ad2ca6d65..77c34afd6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,12 +11,12 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120131124517) do +ActiveRecord::Schema.define(:version => 20120206225130) do create_table "arches", :force => true do |t| t.string "name", :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "arches", ["name"], :name => "index_arches_on_name", :unique => true @@ -25,8 +25,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "user_id" t.string "provider" t.string "uid" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "authentications", ["provider", "uid"], :name => "index_authentications_on_provider_and_uid", :unique => true @@ -37,8 +37,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "arch_id" t.integer "pl_id" t.integer "bpl_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "build_list_items", :force => true do |t| @@ -46,8 +46,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "level" t.integer "status" t.integer "build_list_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "version" end @@ -61,8 +61,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "project_id" t.integer "arch_id" t.datetime "notified_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "is_circle", :default => false t.text "additional_repos" t.string "name" @@ -85,25 +85,25 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "name" t.string "ancestry" t.integer "projects_count", :default => 0, :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "comments", :force => true do |t| - t.string "commentable_id" t.string "commentable_type" t.integer "user_id" t.text "body" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.decimal "commentable_id", :precision => 50, :scale => 0 end create_table "containers", :force => true do |t| t.string "name", :null => false t.integer "project_id", :null => false t.integer "owner_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "delayed_jobs", :force => true do |t| @@ -115,8 +115,9 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.datetime "locked_at" t.datetime "failed_at" t.string "locked_by" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "queue" end add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" @@ -127,8 +128,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "distro" t.string "platform" t.integer "counter", :default => 0 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "event_logs", :force => true do |t| @@ -143,15 +144,15 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "controller" t.string "action" t.text "message" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "groups", :force => true do |t| t.string "name" t.integer "owner_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "uname" t.integer "own_projects_count", :default => 0, :null => false end @@ -163,8 +164,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "title" t.text "body" t.string "status", :default => "open" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "issues", ["project_id", "serial_id"], :name => "index_issues_on_project_id_and_serial_id", :unique => true @@ -173,8 +174,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "description" t.string "name" t.integer "parent_platform_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "released", :default => false t.integer "owner_id" t.string "owner_type" @@ -187,8 +188,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "platform_id" t.string "login" t.string "password" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "user_id" end @@ -196,8 +197,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "product_id" t.integer "status", :default => 2, :null => false t.datetime "notified_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "product_build_lists", ["product_id"], :name => "index_product_build_lists_on_product_id" @@ -207,8 +208,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "platform_id", :null => false t.integer "build_status", :default => 2, :null => false t.string "build_path" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.text "build_script" t.text "counter" t.text "ks" @@ -228,8 +229,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "name" t.string "version" t.datetime "file_mtime" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "platform_id" end @@ -238,14 +239,14 @@ ActiveRecord::Schema.define(:version => 20120131124517) do create_table "project_to_repositories", :force => true do |t| t.integer "project_id" t.integer "repository_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "projects", :force => true do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "owner_id" t.string "owner_type" t.string "visibility", :default => "open" @@ -268,16 +269,16 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "object_type" t.integer "target_id" t.string "target_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "role" end create_table "repositories", :force => true do |t| t.string "description", :null => false t.integer "platform_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "name", :null => false t.integer "owner_id" t.string "owner_type" @@ -287,8 +288,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "name", :null => false t.integer "arch_id", :null => false t.integer "project_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "rpms", ["project_id", "arch_id"], :name => "index_rpms_on_project_id_and_arch_id" @@ -301,8 +302,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.boolean "new_comment_reply", :default => true t.boolean "new_issue", :default => true t.boolean "issue_assign", :default => true - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "new_comment_commit_owner", :default => true t.boolean "new_comment_commit_repo_owner", :default => true t.boolean "new_comment_commit_commentor", :default => true @@ -312,27 +313,26 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "subscribeable_id" t.string "subscribeable_type" t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "status", :default => true t.integer "project_id" end create_table "users", :force => true do |t| t.string "name" - t.string "email", :default => "", :null => false - t.string "encrypted_password", :limit => 128, :default => "", :null => false - t.string "password_salt", :default => "", :null => false + t.string "email", :default => "", :null => false + t.string "encrypted_password", :default => "", :null => false t.string "reset_password_token" - t.string "remember_token" + t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.text "ssh_key" t.string "uname" t.string "role" - t.string "language", :default => "en" - t.integer "own_projects_count", :default => 0, :null => false + t.string "language", :default => "en" + t.integer "own_projects_count", :default => 0, :null => false end add_index "users", ["email"], :name => "index_users_on_email", :unique => true diff --git a/doc/design/abf-admin-build-project.html b/doc/design/abf-admin-build-project.html new file mode 100644 index 000000000..9b26449e7 --- /dev/null +++ b/doc/design/abf-admin-build-project.html @@ -0,0 +1,261 @@ + + +
+ ++ + | ++ Участники + | ++ Роли + | +||
---|---|---|---|---|
+ + | +
+ miki (Mike Shane)
+ |
+
+ читатель
+ |
+
+ писатель
+ |
+
+ администратор
+ |
+
+ + | +
+ vitko (Виталий Усупов)
+ |
+
+ читатель
+ |
+
+ писатель
+ |
+
+ администратор
+ |
+
+ + | +
+ miha (Михаил Буданов)
+ |
+
+ читатель
+ |
+
+ писатель
+ |
+
+ администратор
+ |
+
+ + | +
+ jeni (Jane Conzi)
+ |
+
+ читатель
+ |
+
+ писатель
+ |
+
+ администратор
+ |
+
Текущая ветка:
+2011 год
+Проект | +Описание проекта | +Роль в проекте | +Покинуть проект | +
---|---|---|---|
gsapronov/ROSA-Jabber |
+ Проект создан для разработки интернет-пейджера, с простым +пользовательским интерфейсом и поддержкой социальных сетей. | +Чтение | ++ |
santaux/WacomDrivers |
+ Мы пытаемся доработать драйвера для полноценной работы +дигитайзеров Wacom. | +Запись | ++ |
snigipini/Gimp-Extensions |
+ Растровому редактору не хватает большого количества +функционала и расширений, которые позволили бы ему решать... | +Запись | ++ |
pinovd/Rosa_Media_Player |
+ Под OS ROSA отсутствует нормальный простой интуитивно +понятный видеопроигрыватель. | +Администратор | ++ |
gsapronov/Inkscape-Plugins |
+ У векторного редактора ощущается острая нехватка плагинов для +работы. | +Администратор | ++ |
t |