[refs #128] Merge 3.2-master into 128-account-activation

This commit is contained in:
konstantin.grabar 2012-03-26 13:55:45 +04:00
commit a3d334f0c2
1147 changed files with 71901 additions and 16025 deletions

3
.gitignore vendored
View File

@ -7,11 +7,10 @@ tmp/
config/database.yml
.idea
config/application.yml
public/stylesheets/compiled/*
public/assets/*
config/initializers/local.rb
public/system/*
public/downloads/*
.rvmrc
*.swp
*.tmproj
.sass-cache/

View File

@ -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

115
Gemfile
View File

@ -1,87 +1,78 @@
source 'http://rubygems.org'
gem 'rails', '3.0.11' #, :git => 'git://github.com/rails/rails.git'
gem 'rails', '3.2.2' #, :git => 'git://github.com/rails/rails.git'
gem 'pg', '~> 0.11.0'
gem 'silent-postgres', '~> 0.1.1'
gem 'pg', '~> 0.13.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', '~> 2.0.0' #'~> 1.5.2'
gem 'omniauth', '~> 1.0.1'
gem 'devise', '~> 2.0.4'
gem 'omniauth', '~> 1.0.3'
gem 'omniauth-openid', '~> 1.0.1'
gem 'cancan', '~> 1.6.7'
#gem 'bitmask_attributes'
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.5'
gem 'paperclip', '~> 2.7.0'
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 'ancestry', '~> 1.2.4'
gem 'paperclip', "~> 2.3"
gem "will_paginate", "~> 3.0.2"
gem 'meta-tags', '~> 1.2.4', :require => 'meta_tags'
gem "russian"
# gem 'ghoul_grack', '~> 0.0.1'
# gem 'rugged', '~> 0.16.0'
gem 'grack', :git => 'git://github.com/rdblue/grack.git', :require => 'git_http'
gem "grit"
gem 'whenever', :require => false
gem 'delayed_job'
gem 'highline', '~> 1.6.8'
gem "grit", :git => 'git://github.com/chipiga/grit.git'
gem 'charlock_holmes', '~> 0.6.8' #, :git => 'git://github.com/brianmario/charlock_holmes.git', :branch => 'bundle-icu'
# XML-RPC support
# gem 'actionwebservice' #, :git => 'git://github.com/ywen/actionwebservice.git'
gem "rails-xmlrpc", '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.git'
# Wiki
gem "gollum", "1.3.1"
gem "redcarpet", "1.17.2"
gem 'creole'
gem 'rdiscount'
# gem 'org-ruby'
gem 'RedCloth'
gem 'wikicloth'
# gem 'passenger', '~> 3.0.11'
gem 'unicorn', '~> 4.1.1'
gem 'unicorn', '~> 4.2.0', :platforms => [:mri, :rbx]
gem 'trinidad', '~> 1.0.2', :platforms => :jruby
gem 'newrelic_rpm', '~> 3.3.2', :platforms => [:mri, :rbx]
gem 'whenever', '~> 0.7.3', :require => false
gem 'rails3-jquery-autocomplete', '~> 1.0.6'
gem 'will_paginate', '~> 3.0.3'
gem 'meta-tags', '~> 1.2.5', :require => 'meta_tags'
gem "haml-rails", '~> 0.3.4'
gem 'jquery-rails', '~> 2.0.1'
group :assets do
gem 'sass-rails', '~> 3.2.5'
gem 'coffee-rails', '~> 3.2.2'
gem 'compass-rails', '~> 1.0.1'
gem 'uglifier', '~> 1.2.1'
gem 'therubyracer', '~> 0.9.10', :platforms => [:mri, :rbx]
gem 'therubyrhino', '~> 1.73.1', :platforms => :jruby
end
group :production do
gem "airbrake", '~> 3.0.5'
# gem 'newrelic_rpm', '~> 3.1.1'
gem 'bluepill', :require => false
gem "airbrake", '~> 3.0.9'
gem 'bluepill', '~> 0.0.60', :require => false
gem 'daemons', '1.1.6' # for DJ
end
group :development do
# gem 'letter_opener'
gem 'mailcatcher' # 'letter_opener'
gem 'rails3-generators'
gem 'web-app-theme'
gem 'hpricot'
gem 'ruby_parser'
# debug
gem 'ruby-debug'
# gem 'looksee'
# gem 'awesome_print'
# gem 'wirble'
gem 'hirb'
# gem 'rails-footnotes', '>= 3.7.5.rc4' # this shit is very buggy don't forget to switch it off back
gem 'shotgun'
# deploy
gem 'capistrano', :require => false
gem 'capistrano-ext', :require => false
gem 'cape', :require => false
# gem 'capistrano-exts', :require => false #, :git => 'git://github.com/chipiga/capistrano-exts.git'
# gem 'capistrano-recipes', :require => false
gem 'capistrano_colors', :require => false
end
group :development, :test do
gem 'mysql2', '<= 0.2.9'
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.7.0'
gem 'rr', '~> 1.0.4'
gem 'shoulda'
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

View File

@ -1,3 +1,20 @@
GIT
remote: git://github.com/chipiga/grit.git
revision: 696b0967cb7e6bac044569d898e5acef431d4f97
specs:
grit (2.4.1)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
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/rdblue/grack.git
revision: 020be3fef3fb308b9d214252522aa5945bf6584a
@ -7,79 +24,112 @@ GIT
GEM
remote: http://rubygems.org/
specs:
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)
airbrake (3.0.5)
RedCloth (4.2.9)
RedCloth (4.2.9-java)
actionmailer (3.2.2)
actionpack (= 3.2.2)
mail (~> 2.4.0)
actionpack (3.2.2)
activemodel (= 3.2.2)
activesupport (= 3.2.2)
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.2)
activesupport (= 3.2.2)
builder (~> 3.0.0)
activerecord (3.2.2)
activemodel (= 3.2.2)
activesupport (= 3.2.2)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.2)
activemodel (= 3.2.2)
activesupport (= 3.2.2)
activesupport (3.2.2)
i18n (~> 0.6)
multi_json (~> 1.0)
airbrake (3.0.9)
activesupport
builder
ancestry (1.2.4)
albino (1.3.3)
posix-spawn (>= 0.3.6)
ancestry (1.2.5)
activerecord (>= 2.2.2)
arel (2.0.10)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bluepill (0.0.51)
bcrypt-ruby (3.0.1-java)
bluepill (0.0.60)
activesupport (>= 3.0.0)
daemons (~> 1.1.0)
daemons (~> 1.1.4, <= 1.1.6)
i18n (>= 0.5.0)
state_machine (~> 0.9.4)
builder (2.1.2)
state_machine (~> 1.1.0)
builder (3.0.0)
cancan (1.6.7)
cape (1.0.1)
capistrano (2.9.0)
cape (1.4.0)
capistrano (2.11.2)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capistrano-ext (1.2.1)
capistrano (>= 1.0.0)
capistrano_colors (0.5.5)
chronic (0.6.6)
cocaine (0.2.0)
columnize (0.3.5)
daemons (1.1.4)
delayed_job (2.1.4)
charlock_holmes (0.6.8)
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.1)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
compass-rails (1.0.1)
compass (~> 0.12.0)
creole (0.4.2)
daemons (1.1.6)
delayed_job (3.0.1)
activesupport (~> 3.0)
daemons
devise (1.5.2)
delayed_job_active_record (0.3.2)
activerecord (> 2.1.0)
delayed_job (~> 3.0.0)
devise (2.0.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.1)
railties (~> 3.1)
warden (~> 1.1.1)
diff-lcs (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
factory_girl (2.3.2)
activesupport
factory_girl_rails (1.4.0)
factory_girl (~> 2.3.0)
erubis (2.7.0)
eventmachine (0.12.10)
eventmachine (0.12.10-java)
execjs (1.3.0)
multi_json (~> 1.0)
expression_parser (0.9.0)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
factory_girl (~> 2.6.0)
railties (>= 3.0.0)
grit (2.4.1)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
fssm (0.2.8.1)
github-markup (0.7.1)
gollum (1.3.1)
albino (~> 1.3.2)
github-markup (>= 0.4.0, < 1.0.0)
grit (~> 2.4.1)
mustache (>= 0.11.2, < 1.0.0)
nokogiri (~> 1.4)
redcarpet
sanitize (~> 2.0.0)
sinatra (~> 1.0)
haml (3.1.4)
haml-rails (0.3.4)
actionpack (~> 3.0)
@ -87,163 +137,231 @@ GEM
haml (~> 3.0)
railties (~> 3.0)
hashie (1.2.0)
highline (1.6.8)
hirb (0.6.0)
hpricot (0.8.5)
i18n (0.5.0)
jammit (0.6.5)
yui-compressor (>= 0.9.3)
json (1.6.3)
kgio (2.6.0)
linecache (0.46)
rbx-require-relative (> 0.0.4)
mail (2.2.19)
activesupport (>= 2.3.6)
highline (1.6.11)
hike (1.2.1)
hirb (0.6.2)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.1)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
jruby-rack (1.1.4)
json (1.6.5)
json (1.6.5-java)
kgio (2.7.3)
libv8 (3.3.10.4)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
meta-tags (1.2.4)
mailcatcher (0.5.5)
activesupport (~> 3.0)
eventmachine (~> 0.12)
haml (~> 3.1)
mail (~> 2.3)
sinatra (~> 1.2)
skinny (~> 0.2)
sqlite3 (~> 1.3)
thin (~> 1.2)
meta-tags (1.2.6)
actionpack
mime-types (1.17.2)
mysql2 (0.2.9)
mime-types (1.18)
multi_json (1.1.0)
mustache (0.99.4)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.2.1)
net-ssh (2.3.0)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
omniauth (1.0.1)
newrelic_rpm (3.3.2.1)
nokogiri (1.5.2)
nokogiri (1.5.2-java)
omniauth (1.0.3)
hashie (~> 1.2)
rack
omniauth-openid (1.0.1)
omniauth (~> 1.0)
rack-openid (~> 1.3.1)
orm_adapter (0.0.5)
paperclip (2.4.5)
orm_adapter (0.0.6)
paperclip (2.7.0)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
cocaine (>= 0.0.2)
mime-types
pg (0.11.0)
pg (0.13.2)
polyglot (0.3.3)
rack (1.2.4)
rack-mount (0.6.14)
rack (>= 1.0.0)
posix-spawn (0.3.6)
rack (1.4.1)
rack-cache (1.2)
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.2)
actionmailer (= 3.2.2)
actionpack (= 3.2.2)
activerecord (= 3.2.2)
activeresource (= 3.2.2)
activesupport (= 3.2.2)
bundler (~> 1.0)
railties (= 3.0.11)
railties (= 3.2.2)
rails-xmlrpc (0.3.6)
rails3-generators (0.17.4)
railties (>= 3.0.0)
rails3-jquery-autocomplete (1.0.4)
rails3-jquery-autocomplete (1.0.6)
rails (~> 3.0)
railties (3.0.11)
actionpack (= 3.0.11)
activesupport (= 3.0.11)
railties (3.2.2)
actionpack (= 3.2.2)
activesupport (= 3.2.2)
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)
rbx-require-relative (0.0.5)
rdoc (3.11)
rdiscount (1.6.8)
rdoc (3.12)
json (~> 1.4)
redcarpet (1.17.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)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
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)
sexp_processor (3.0.8)
silent-postgres (0.1.1)
state_machine (0.9.4)
sanitize (2.0.3)
nokogiri (>= 1.4.4, < 1.6)
sass (3.1.15)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
shotgun (0.9)
rack (>= 1.0)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.0)
shoulda-matchers (1.0.0)
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
skinny (0.2.0)
eventmachine (~> 0.12)
thin (~> 1.2)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
state_machine (1.1.2)
therubyracer (0.9.10)
libv8 (~> 3.3.10)
therubyrhino (1.73.1)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
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)
trinidad (1.0.5)
jruby-rack (>= 1.0.2)
trinidad_jars (>= 0.3.0)
trinidad_jars (1.0.2)
tzinfo (0.3.32)
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
unicorn (4.2.0)
kgio (~> 2.6)
rack
raindrops (~> 0.6)
warden (1.1.0)
raindrops (~> 0.7)
warden (1.1.1)
rack (>= 1.0)
web-app-theme (0.7.0)
whenever (0.7.0)
whenever (0.7.3)
activesupport (>= 2.3.4)
chronic (~> 0.6.3)
will_paginate (3.0.2)
yui-compressor (0.9.5)
wikicloth (0.7.1)
builder
expression_parser
will_paginate (3.0.3)
PLATFORMS
java
ruby
DEPENDENCIES
airbrake (~> 3.0.5)
ancestry (~> 1.2.4)
bluepill
RedCloth
airbrake (~> 3.0.9)
ancestry (~> 1.2.5)
bluepill (~> 0.0.60)
cancan (~> 1.6.7)
cape
capistrano
capistrano-ext
capistrano_colors
delayed_job
devise (~> 1.5.2)
factory_girl_rails (~> 1.4.0)
charlock_holmes (~> 0.6.8)
coffee-rails (~> 3.2.2)
compass-rails (~> 1.0.1)
creole
daemons (= 1.1.6)
delayed_job_active_record (~> 0.3.2)
devise (~> 2.0.4)
factory_girl_rails (~> 1.7.0)
gollum (= 1.3.1)
grack!
grit
grit!
haml-rails (~> 0.3.4)
highline (~> 1.6.8)
highline (~> 1.6.11)
hirb
hpricot
jammit
meta-tags (~> 1.2.4)
mysql2 (<= 0.2.9)
omniauth (~> 1.0.1)
jquery-rails (~> 2.0.1)
mailcatcher
meta-tags (~> 1.2.5)
newrelic_rpm (~> 3.3.2)
omniauth (~> 1.0.3)
omniauth-openid (~> 1.0.1)
paperclip (~> 2.3)
pg (~> 0.11.0)
rails (= 3.0.11)
paperclip (~> 2.7.0)
pg (~> 0.13.2)
rails (= 3.2.2)
rails-xmlrpc (~> 0.3.6)
rails3-generators
rails3-jquery-autocomplete
rr
rspec-rails (~> 2.7.0)
ruby-debug
ruby_parser
russian
silent-postgres (~> 0.1.1)
unicorn (~> 4.1.1)
web-app-theme
whenever
will_paginate (~> 3.0.2)
yui-compressor (= 0.9.5)
rails3-jquery-autocomplete (~> 1.0.6)
rdiscount
redcarpet (= 1.17.2)
redhillonrails_core!
rr (~> 1.0.4)
rspec-rails (~> 2.8.1)
russian (~> 0.6.0)
sass-rails (~> 3.2.5)
shotgun
shoulda
therubyracer (~> 0.9.10)
therubyrhino (~> 1.73.1)
trinidad (~> 1.0.2)
uglifier (~> 1.2.1)
unicorn (~> 4.2.0)
whenever (~> 0.7.3)
wikicloth
will_paginate (~> 3.0.3)

BIN
app/assets/images/404.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
app/assets/images/ava.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
app/assets/images/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

BIN
app/assets/images/code.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
app/assets/images/flag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
app/assets/images/git.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
app/assets/images/gplus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
app/assets/images/lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
app/assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
app/assets/images/open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
app/assets/images/radio.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
app/assets/images/round.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
app/assets/images/x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,52 @@
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require autocomplete-rails
//= require vendor
//= require jquery.dataTables_ext
//= require_tree ./design
//= require_tree ./extra
//= 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() {
$('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));
});
$('div.information > div.profile > a').live('click', function(e) {
e.preventDefault();
});
$('.more_activities').live('click', function(){
var button = $(this);
$.ajax({
type: 'GET',
url: button.attr("href"),
success: function(data){
button.fadeOut('slow').after(data);
button.remove();
}
});
return false;
});
});

View File

@ -0,0 +1,44 @@
$(document).ready(function() {
var dropbox = $("#droplist");
function loadMessages() {
$("#messages-new").fadeOut("slow");
$("#new-messages").delay(700).fadeIn("slow");
}
function loadOldMessages() {
$("#old-messages").fadeIn("slow");
}
$(document).click(function() {
var dl = dropbox.css("height");
var dl2 = dropbox.css("display");
if ((dl2 == "block")&&(dl == "91px")) {
dropbox.slideUp("slow");
}
});
$('.data-expander').live('click', function(e) {
var $button = $(e.target);
var id = "#content-" + $button.attr('id');
var $slider = $(id);
$slider.slideToggle("slow", function(){
$button.toggleClass('expanded collapsed');
});
});
function showActivity(elem) {
$("#activity-bottom"+elem).slideToggle("slow");
var img = document.getElementById("expand" + elem).className;
if (img == "expand-gray-down") {
document.getElementById("expand" + elem).className = "expand-gray-up";
} else {
document.getElementById("expand" + elem).className = "expand-gray-down";
}
}
$('div.information > div.user').live('click', function() {
dropbox.slideToggle("slow");
});
});

View File

@ -0,0 +1,32 @@
function changeCheck(el) {
var el = el, input = el.find('input[type="checkbox"]');
if(input.attr("checked")) {
el.css('backgroundPosition', '0 0');
input.removeAttr('checked');
} else {
el.css('backgroundPosition', '0 -18px');
input.attr('checked', true);
}
return true;
}
function startChangeCheck(el) {
var el = el, input = el.find('input[type="checkbox"]');
if(input.attr('checked')) {
el.css('backgroundPosition', '0 -18px');
}
return true;
}
$(document).ready(function(){
$('.niceCheck-main').each(function(i,el) {
startChangeCheck($(el));
});
$('.niceCheck-main').click(function() {
changeCheck($(this));
});
});

View File

@ -0,0 +1,37 @@
/*function changeCheck(el)
{
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)
{
var el = el,
input = el.getElementsByTagName("input")[0];
if(input.checked)
{
el.style.backgroundPosition="0 -17px";
}
return true;
}
function startCheck()
{
startChangeCheck(document.getElementById("niceCheckbox1"));
}*/

View File

@ -0,0 +1,11 @@
jQuery(document).ready(function(){
var params = {
changedEl: ".lineForm select.cusel",
visRows: 999999,
scrollArrows: false
}
cuSel(params);
});

View File

@ -0,0 +1,16 @@
$(document).ready(function() {
// $("#myTable").tablesorter({
// headers: {
// 1: {
// sorter: false
// },
// 3: {
// sorter: false
// }
// }
// });
});
function deleteRow(num) {
// $("#Row"+num).fadeOut("slow");
}

View File

@ -0,0 +1,20 @@
$(document).ready(function() {
// $("#myTable").tablesorter({
// headers: {
// 2: {
// sorter: false
// }
// }
//
// });
});
$(document).ready(function() {
// $("a.files-see").click(function() {
// $("#file1").fadeOut(0);
// $("#file2").fadeIn("slow");
// $("#file-name1").fadeOut(0);
// $("#file-name2").fadeIn("slow");
// $("#fork-and-edit").fadeIn("slow");
// });
});

View File

@ -0,0 +1,97 @@
$(document).ready(function(){
$(".niceRadio").each(function() {
changeRadioStart($(this));
});
});
function changeRadio(el) {
var el = el, input = el.find("input").eq(0);
var nm = input.attr("name");
$(".niceRadio input").each(
function() {
if($(this).attr("name")==nm) {
$(this).parent().removeClass("radioChecked");
}
});
if(el.attr("class").indexOf("niceRadioDisabled")==-1) {
el.addClass("radioChecked");
input.attr("checked", true);
}
return true;
}
function changeVisualRadio(input) {
var wrapInput = input.parent();
var nm=input.attr("name");
$(".niceRadio input").each(function() {
if($(this).attr("name")==nm)
{
$(this).parent().removeClass("radioChecked");
}
});
if(input.attr("checked"))
{
wrapInput.addClass("radioChecked");
}
}
function changeRadioStart(el) {
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("<span class='niceRadio radioChecked'>"+
"<input type='radio'"+
"name='"+radioName+"'"+
"id='"+radioId+"'"+
"checked='"+radioChecked+"'"+
"tabindex='"+radioTab+"'"+
"value='"+radioValue+"' /></span>");
} else {
el.after("<span class='niceRadio'>"+
"<input type='radio'"+
"name='"+radioName+"'"+
"id='"+radioId+"'"+
"tabindex='"+radioTab+"'"+
"value='"+radioValue+"' /></span>");
}
if(radioDisabled) {
el.next().addClass("niceRadioDisabled");
el.next().find("input").eq(0).attr("disabled","disabled");
}
el.next().bind("mousedown", function(e) {
changeRadio($(this));
$(this).find("input:radio").change();
});
if($.browser.msie) {
el.next().find("input").eq(0).bind("click", function(e) {
changeVisualRadio($(this))
});
} else {
el.next().find("input").eq(0).bind("change", function(e) {
changeVisualRadio($(this))
});
}
el.remove();
}
catch(e) { }
return true;
}

View File

@ -0,0 +1,26 @@
/*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");
}
}*/
function saveAdminMember() {
$('#_method').attr('value', 'post');
$('form#members_form').submit();
}
function deleteAdminMember() {
$('#_method').attr('value', 'delete');
var delete_url = $('form#members_form').attr('delete_url');
$('form#members_form').attr('action', delete_url);
$('form#members_form').submit();
}

View File

@ -0,0 +1,14 @@
(function($) {
$.BlobEditor = function() {
$.BlobEditor.Placeholder.add($('#gollum-editor-edit-summary input'));
$('#gollum-editor form[name="blob-editor"]').submit(function( e ) {
e.preventDefault();
$.BlobEditor.Placeholder.clearAll();
//debug('submitting');
$(this).unbind('submit');
$(this).submit();
});
};
$.BlobEditor.Placeholder = $.GollumPlaceholder;
})(jQuery);

View File

@ -0,0 +1,48 @@
$(document).ready(function() {
$('#build_list_pl_id').change(function() {
var platform_id = $(this).val();
var base_platforms = $('.all_platforms input[type=checkbox].build_bpl_ids');
//$('#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');
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('disabled');
if ($(this).parent().find('.offset25 label').text() == 'main') {
$(this).parent().find('.offset25 input[type="checkbox"]').attr('checked', 'checked');
}
} else {
$(this).removeAttr('checked');
$(this).attr('disabled', 'disabled');
$(this).parent().find('.offset25 input[type="checkbox"]').attr('disabled', 'disabled');
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('checked');
}
//$('.additional_pl').parent().find('.offset25 input[type="checkbox"]').attr('disabled', 'disabled');
} else {
$(this).removeAttr('disabled');
$(this).removeAttr('checked');
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('disabled');
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('checked');
//$('.additional_pl').parent().find('.offset25 input[type="checkbox"]').removeAttr('disabled');
}
});
});
$('#build_list_pl_id').trigger('change');
$('.offset25 label').click(function() {
setPlChecked($(this).prev()[0], !$(this).prev().attr('checked'));
});
$('.offset25 input[type="checkbox"]').click(function() {
setPlChecked(this, $(this).attr('checked'));
});
});
function setPlChecked(pointer, checked) {
pl_cbx = $(pointer).parent().parent().parent().find('input[type="checkbox"].build_bpl_ids');
if (checked && !$(pointer).attr('disabled')) {
pl_cbx.attr('checked', 'checked');
}
}

View File

@ -0,0 +1,295 @@
$(document).ready(function() {
$("#closed-switcher").live('click', function() {
if ($("#blue-switch-select").css("margin-left") != "130px") {
$("#blue-switch-select").animate({"margin-left": "+=130px"}, "fast");
$("#table1").fadeOut(0);
$("#table2").fadeIn("slow");
$('#issues_status').val('closed');
}
else {
$("#blue-switch-select").animate({"margin-left": "-=130px"}, "fast");
$("#table2").fadeOut(0);
$("#table1").fadeIn("slow");
$('#issues_status').val('open');
}
return send_index_tracker_request('GET');
});
$("#manage-labels").live('click', function () {
var toggled = $(this).data('toggled');
$(this).data('toggled', !toggled);
if (!toggled) {
$("#labels-stock").fadeOut(0);
$("#labels-edit").fadeIn("slow");
}
else {
$("#labels-edit").fadeOut(0);
$("#labels-stock").fadeIn("slow");
}
});
$("div.div-tracker-labels").live('click', function() {
var flag = this.id;
flag = flag.replace("label-","flag-");
var bg = $("#"+flag).css("background-color");
var checkbox = $(this).find(':checkbox');
if ($(this).css("background-color") != bg) {
$(this).css("background-color",bg);
$(this).css("color","#FFFFFF");
checkbox.attr('checked', 'checked');
} else {
$(this).css("background-color","rgb(247, 247, 247)");
$(this).css("color","#565657");
checkbox.removeAttr('checked');
}
return send_index_tracker_request('GET');
});
$("#filter_issues #myradio1").live('change', function(event) {
return send_index_tracker_request('GET');
});
$('#search_issue').live('submit', function() {
return send_index_tracker_request('GET', $(this).attr("action"), $(this).serialize());
});
$('#add_label').live('click', function() {
return send_index_tracker_request('POST', $(this).attr("href"), $('#new_label').serialize());
});
$('.righter #update_label').live('click', function() {
return send_index_tracker_request('POST', $(this).attr("href"), $(this).parents('#update_label').serialize());
});
$('.colors .choose').live('click', function() {
var parent = $(this).parents('.colors');
parent.find('.choose.selected').removeClass('selected');
$(this).addClass('selected');
parent.siblings('.lefter').find('#label_color').val($(this).attr('value'));
return false;
});
$('.custom_color').live('click', function() {
$(this).siblings('#label_color').toggle();
return false;
});
$('article a.edit_label').live('click', function() {
$(this).parents('.label.edit').siblings('.label.edit').find('.edit_label_form').hide();
$(this).parents('.label.edit').find('.edit_label_form').toggle();
return false;
});
$('.delete_label').live('click', function() {
return send_index_tracker_request('POST', $(this).attr('href'));
});
function send_index_tracker_request(type_request, url, data) {
data = data || '';
var filter_form = $('#filter_issues');
url = url || filter_form.attr("action");
var label_form = $('#filter_labels');
var status = 'status=' + $('#issues_status').attr('value');
$.ajax({
type: type_request,
url: url,
data: filter_form.serialize() + '&' + label_form.serialize() + '&' + status + '&' + data,
success: function(data){
$('article').html(data);
$(".niceRadio").each(function() { changeRadioStart(jQuery(this)) });
},
error: function(data){
alert('error') // TODO remove
}
});
return false;
};
$('#search_user').live('submit', function() {
var id = $(this).attr('id');
if(id.indexOf('user') != -1) { // FIXME
var which = 'users';
}
else if (id.indexOf('labels') != -1) {
var which = 'labels';
}
$.ajax({
type: 'GET',
url: $(this).attr("action"),
data: $(this).serialize(),
success: function(data){
$('#manage_issue_'+ which +'_list').html(data);
},
error: function(data){
alert('error') // TODO remove
}
});
return false;
});
function remExecutor(form) {
var el = form.find('.people.selected.remove_executor');
var id = el.attr('id');
$('#manage_issue_users_list .add_executor.people.selected').removeClass('select');
el.remove();
}
$('.add_executor.people.selected').live('click', function() {
var form_new = $('form.issue');
var form_edit = $('form.edit_form.issue');
form_new.find('#people-span').fadeOut(0);
remExecutor(form_new);
var clone = $(this).clone().removeClass('add_executor').addClass('remove_executor');
form_new.find('#issue_executor').html(clone);
$('.current_executor').html(clone.removeClass('select'));
$(this).addClass('select');
});
$('.remove_executor.people.selected').live('click', function() {
var form = $('form.issue, form.edit_form issue');
form.find('#people-span').fadeIn(0);
remExecutor(form);
});
function remLabel(form, id) {
var el = form.find('.label.remove_label'+'#'+id);
var label = $('#'+id+'.remove_label.label.selected');
label.find('.flag').fadeIn(0);
label.find('.labeltext.selected').removeClass('selected').attr('style', '');
label.fadeIn('slow');
el.fadeOut('slow').remove();
}
$('.add_label.label').live('click', function() {
$(this).addClass('selected').removeClass('add_label').addClass('remove_label');
$(this).find('.labeltext').addClass('selected');
var style = $(this).find('.flag').attr('style');
$(this).find('.flag').fadeOut(0);
$(this).find('.labeltext.selected').attr('style', style);
var form_new = $('form.form.issue');
var clone = $(this).clone();
form_new.find('#flag-span').fadeOut(0);
form_new.find('#issue_labels').append(clone);
var labels = $('.manage_labels');
labels.append($(this).find('#'+$(this).attr('id')));
});
$('.remove_label.label.selected').live('click', function() {
var id = $(this).attr('id');
$('.manage_labels, #active_labels').find('#'+id+'.label.selected.remove_label').remove();
var form = $('.form.issue');
if(form.find('.remove_label.label.selected').length == 1) {
form.find('#flag-span').fadeIn(0);
}
var str = '.label.remove_label'+'#'+id;
form.find(str).remove();
var label = $(str);
label.removeClass('selected').addClass('add_label').removeClass('remove_label');
label.find('.labeltext.selected').attr('style', '').removeClass('selected');
label.find('.flag').fadeIn(0);
$('.manage_labels').find('#'+$(this).attr('id')).remove();
});
$('.issue_status.switch_issue_status').live('click', function () {
var button = $(this);
var status = (button.hasClass('switcher')) ? 'closed' : 'open';
var form = $('#update_issue_status');
form.find('#issue_status').attr('value', status);
$.ajax({
type: 'POST',
url: form.attr("action"),
data: form.serialize(),
success: function(data){
if (status == "open") { button.addClass('switcher').removeClass("switcher-off"); }
else { button.removeClass('switcher').addClass("switcher-off"); }
$('#closed_issue_text').html(data);
},
error: function(data){
alert('error') // TODO remove
}
});
return false;
});
$('#edit_issue_content').live('click', function() {
$('.edit_form.issue').fadeIn('fast');
$(this).fadeOut('fast');
});
$('#cancel_edit_issue_content').live('click', function() {
$('.edit_form.issue').fadeOut('fast');
$('#edit_issue_content').fadeIn('fast');
});
$('.edit_form.issue').live('submit', function() {
var form = $(this);
$.ajax({
type: 'POST',
url: form.attr("action"),
data: form.serialize(),
success: function(data){
form.fadeOut('slow');
$('#edit_issue_content').fadeIn('slow');
$('h3.issue_title').html(form.find('#issue_title').attr('value'));
$('.fulltext.view.issue_body').html(form.find('#issue_body').attr('value'));
},
error: function(data){
alert('error'); // TODO remove
}
});
return false;
});
$('.button.manage_executor').live('click', function() {
$('form#search_user, .button.update_executor').fadeIn(0);
$('.current_executor .people').addClass('remove_executor selected').removeClass('nopointer');
$(this).fadeOut(0);
});
$('.button.manage_labels').live('click', function() {
$('.button.update_labels').fadeIn(0);
$('.current_labels .label .labeltext.selected').parent().addClass('remove_label selected').removeClass('nopointer');
$('.current_labels .label .labeltext:not(.selected)').parent().addClass('add_label').removeClass('nopointer');
$(this).fadeOut(0);
});
$('.button.update_executor').live('click', function() {
var form = $('form.edit_executor.issue');
$.ajax({
type: 'POST',
url: form.attr("action"),
data: form.serialize(),
success: function(data){
$('.current_executor .people').removeClass('remove_executor selected').addClass('nopointer');
$('form#search_user, .button.update_executor').fadeOut(0);
$('.button.manage_executor').fadeIn(0);
$('#manage_issue_users_list').html('');
},
error: function(data){
alert('error'); // TODO remove
}
});
return false;
});
$('.button.update_labels').live('click', function() {
var form = $('form.edit_labels.issue');
$.ajax({
type: 'POST',
url: form.attr("action"),
data: form.serialize(),
success: function(data){
$('.current_labels .label').removeClass('remove_label selected').addClass('nopointer');
$('.button.update_labels').fadeOut(0);
$('.button.manage_labels').fadeIn(0);
$('#manage_issue_labels_list').html('');
},
error: function(data){
alert('error'); // TODO remove
}
});
return false;
});
});

View File

@ -0,0 +1,139 @@
(function($, window, document, undefined) {
$.extend( $.fn.DataTable.ext.oPagination, {
"will_paginate_like": {
/*
* Function: oPagination.full_numbers.fnInit
* Purpose: Initialise dom elements required for pagination with a list of the pages
* Returns: -
* Inputs: object:oSettings - dataTables settings object
* node:nPaging - the DIV which contains this pagination control
* function:fnCallbackDraw - draw function which must be called on update
*/
"fnInit": function ( oSettings, nPaging, fnCallbackDraw ) {
var oLang = oSettings.oLanguage.oPaginate;
var oClasses = oSettings.oClasses;
var fnClickHandler = function ( e ) {
if ( oSettings.oApi._fnPageChange( oSettings, e.data.action ) )
{
fnCallbackDraw( oSettings );
}
};
$(nPaging).append(
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPagePrevious+'">'+oLang.sPrevious+'</a>'+
'<span></span>'+
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPageNext+'">'+oLang.sNext+'</a>'
);
var els = $('a', nPaging);
var nPrev = els[0],
nNext = els[1]
oSettings.oApi._fnBindAction( nPrev, {action: "previous"}, fnClickHandler );
oSettings.oApi._fnBindAction( nNext, {action: "next"}, fnClickHandler );
/* ID the first elements only */
if ( !oSettings.aanFeatures.p )
{
nPaging.id = oSettings.sTableId+'_paginate';
nPrev.id =oSettings.sTableId+'_previous';
nNext.id =oSettings.sTableId+'_next';
}
},
/*
* Function: oPagination.full_numbers.fnUpdate
* Purpose: Update the list of page buttons shows
* Returns: -
* Inputs: object:oSettings - dataTables settings object
* function:fnCallbackDraw - draw function to call on page change
*/
"fnUpdate": function ( oSettings, fnCallbackDraw ) {
if ( !oSettings.aanFeatures.p )
{
return;
}
var iPageCount = $.fn.DataTable.ext.oPagination.iFullNumbersShowPages;
var iPageCountHalf = Math.floor(iPageCount / 2);
var iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength);
var iCurrentPage = Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength) + 1;
var sList = "";
var iStartButton, iEndButton, i, iLen;
var oClasses = oSettings.oClasses;
var anButtons, anStatic, nPaginateList;
var an = oSettings.aanFeatures.p;
var fnBind = function (j) {
oSettings.oApi._fnBindAction( this, {"page": j+iStartButton-1}, function(e) {
/* Use the information in the element to jump to the required page */
oSettings.oApi._fnPageChange( oSettings, e.data.page );
fnCallbackDraw( oSettings );
e.preventDefault();
} );
};
/* Pages calculation */
if (iPages < iPageCount)
{
iStartButton = 1;
iEndButton = iPages;
}
else if (iCurrentPage <= iPageCountHalf)
{
iStartButton = 1;
iEndButton = iPageCount;
}
else if (iCurrentPage >= (iPages - iPageCountHalf))
{
iStartButton = iPages - iPageCount + 1;
iEndButton = iPages;
}
else
{
iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1;
iEndButton = iStartButton + iPageCount - 1;
}
/* Build the dynamic list */
for ( i=iStartButton ; i<=iEndButton ; i++ )
{
sList += (iCurrentPage !== i) ?
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+'">'+oSettings.fnFormatNumber(i)+'</a>' :
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButtonActive+'">'+oSettings.fnFormatNumber(i)+'</a>';
}
/* Loop over each instance of the pager */
for ( i=0, iLen=an.length ; i<iLen ; i++ )
{
if ( an[i].childNodes.length === 0 )
{
continue;
}
/* Build up the dynamic list forst - html and listeners */
$('span:eq(0)', an[i])
.html( sList )
.children('a').each( fnBind );
/* Update the premanent botton's classes */
anButtons = an[i].getElementsByTagName('a');
anStatic = [
anButtons[0], anButtons[anButtons.length-1]
];
$(anStatic).removeClass( oClasses.sPageButton+" "+oClasses.sPageButtonActive+" "+oClasses.sPageButtonStaticDisabled );
$([anStatic[0]]).addClass(
(iCurrentPage==1) ?
oClasses.sPageButtonStaticDisabled :
oClasses.sPageButton
);
$([anStatic[1]]).addClass(
(iPages===0 || iCurrentPage===iPages || oSettings._iDisplayLength===-1) ?
oClasses.sPageButtonStaticDisabled :
oClasses.sPageButton
);
}
}
}
} );
}(jQuery, window, document, undefined));

View File

@ -0,0 +1,35 @@
//= require jquery
$(document).ready(function() {
var login_default = $('#login_default').val();
var pass_default = $('#password_default').val();
$('.registartion-input').live('keydown', function() {
var id = $(this).attr('id');
if(id == 'user_login' || id == 'user_password') { id = 'login_error'}
$('.error.'+id).fadeOut('slow');
}).live('focus', function() {
var id = $(this).attr('id');
if(id == 'user_login' && $(this).val() == login_default) { $(this).val('')}
else if(id == 'user_password' && $(this).val() == pass_default) { $(this).val('')}
$(this).addClass('registartion-input-focus').removeClass('registartion-input-error');
}).live('blur', function() {
var id = $(this).attr('id');
if(id == 'user_login' && $(this).val() == '') { $(this).val(login_default)}
else if(id == 'user_password' && $(this).val() == '') { $(this).val(pass_default)}
$(this).addClass('registartion-input-no-focus').removeClass('registartion-input-focus');
});
$('#niceCheckbox1').click(function() {
var el = $(this),
input = el.find('input[type="checkbox"]');
if(input.attr("checked")) {
el.css('backgroundPosition', '0 0');
input.removeAttr('checked');
} else {
el.css('backgroundPosition', '0 -18px');
input.attr('checked', true);
}
return true;
});
});

View File

@ -0,0 +1,5 @@
@import "vendor";
@import "design/main";
@import "design/git";
@import "design/common";
@import "design/custom";

View File

@ -0,0 +1,27 @@
@import 'compass/utilities/tables';
table.info {
width: 100%;
border-spacing: 0;
td {padding: 5px;}
}
table.columns2 {
@include inner-table-borders;
th.first, td.first {width: 30%;}
}
table.columns3 {
@include alternating-rows-and-columns(#eee, #ccc, #000);
th.first, td.first, th.last, td.last {width: 30%;}
}
@import 'blueprint/interaction';
.flash {
.notice {
@include success;
}
.warning {
@include notice;
}
.error, .alert {
@include error;
}
}

View File

@ -0,0 +1,623 @@
// PUT custom styles here ONLY
span.error {
display: none;
}
a#manage-labels {
margin-bottom: 10px;
}
article a.edit_label {
color: #FFF;
}
header div.information div.user {
float: left;
margin-left: 5px;
}
header div.user div.avatar {
padding: 6px 10px 10px 10px;
}
header menu ul li a {
padding: 15px 8px 15px 8px;
}
div.description-top input.name {
width: 350px;
padding: 0;
}
div.description-top div.name input {
width: 100%;
height: 100%;
}
article div.activity {
border: 1px solid #D6D6D6;
border-radius: 5px 5px 5px 5px;
color: #333333;
margin-top: 15px;
padding: 6px;
}
article div.messages div.activity {
margin-top: 0;
margin-bottom: 10px;
}
article div.activity .top div.image {
//position: absolute; // TODO broken issue page
float: left;
width: 40px;
height: 40px;
margin-left: 2px;
margin-top: 2px;
}
article div.activity .top .buttons {
display: block;
position: relative;
float: right;
}
article div.activity .top div.text {
float: left;
font-size: 12px;
padding-left: 10px;
}
article div.activity .top .imaged {
margin-left: 44px;
}
article div.activity .top div.text .name {
font-weight: 700;
display: block;
float: left;
}
article div.activity .top div.text .date {
font-size: 11px;
float: left;
}
article div.activity div.fulltext {
font-size: 12px;
padding-top: 10px;
display: block;
}
article div.activity div.fulltext.alone {
padding-top: 0px;
}
article div.activity .fulltext.hidden {
display: none;
}
div.activity .data-expander {
margin-left: 10px;
display: inline-block;
width: 12px;
}
div.activity .data-expander.collapsed {
background: #FFF image-url('expand-gray.png') no-repeat;
background-position: 0 2px;
}
div.activity .data-expander.expanded {
background: #FFF image-url('expand-gray2.png') no-repeat;
background-position: 0 2px;
}
div.activity .fulltext p {
margin: 5px;
line-height: 1.3em;
}
table.blob td.lines pre {
background-color: #ECECEC;
border-right: 1px solid #DDDDDD;
color: #AAAAAA;
padding: 10px;
text-align: right;
}
textarea#code {
width: 845px;
resize: none;
height: 30em;
}
article div.date-block {
margin-bottom: 30px;
}
article div.year {
margin-top: 0;
}
article h3 {
margin-bottom: 10px;
}
article div.date-block div.date {
height: 52px;
}
.date_select {
select {margin:3px 0px; padding:0px;}
}
article div#repo-wrapper div.hr {
width: 100%;
}
article table.commit_stats {
line-height: 1.4em;
margin-top: 12px;
width: 100%;
border-spacing: 0;
border-top: 1px solid #DDDDDD;
margin: 10px 0;
padding: 0;
font-size: 90%;
border-collapse: collapse;
}
article table.commit_stats td {
border-bottom: 1px solid #DDDDDD;
padding: 0.4em 5px;
}
article table.commit_stats .diffstat {
text-align: right;
white-space: nowrap;
padding-right: 0;
width: 1%;
}
article div.file div.diff_data {
overflow-x: auto;
}
article div.file table {
border-spacing: 0;
border-collapse: collapse;
}
#repo-wrapper table.diff td.line_numbers {
-moz-user-select: none;
font-size: 12px;
padding: 0 0.5em;
background-color: #ECECEC;
border-right: 1px solid #DDDDDD;
color: #999999;
text-align: right;
}
#repo-wrapper table.diff td.line_numbers,
#repo-wrapper table.diff td.header,
#repo-wrapper table.diff td.code {
font-family: 'Bitstream Vera Sans Mono','Courier',monospace;
}
#repo-wrapper table.diff td.header {
background-color: #ECECEC;
color: #999999;
width: 100%;
line-height: 1.4em;
font-size: 90%;
}
#repo-wrapper table.diff td.code, #repo-wrapper table.diff td.header {
padding-left: 10px;
}
#repo-wrapper table.diff pre {
padding: 0;
margin: 0;
}
#repo-wrapper table.diff .diff-content {
padding: 0;
margin: 0;
}
#repo-wrapper table.diff tr td.code.del {
background-color: #FFDDDD;
}
#repo-wrapper table.diff tr td.code.del .idiff {
background-color: #F2ACAD;
}
#repo-wrapper table.diff tr td.code.ins {
background-color: #DDFFDD;
}
#repo-wrapper table.diff tr td.code.ins .idiff {
background-color: #BAFBAD;
}
#repo-wrapper div.comment {
background: none repeat scroll 0 0 #DCECFA;
border: 1px solid #B3CCE0;
border-radius: 4px 4px 4px 4px;
margin-bottom: 10px;
margin-top: 15px;
padding: 6px;
text-align: left;
}
#repo-wrapper div.view {
display: block;
}
#repo-wrapper div.comment div.wrapper {
border: 1px solid #DEDEDE;
border-radius: 4px 4px 4px 4px;
color: #575756;
background: #FFFFFF;
font-size: 12px;
height: 110px;
margin: 10px 0;
padding: 5px;
}
#repo-wrapper div.comment div.wrapper textarea {
border: none;
color: #575756;
font-family: Tahoma,Geneva,Helvetica,sans-serif;
width: 100%;
height: 100%;
resize: none;
}
div.comment div.comment-left {
float: left;
font-size: 12px;
margin-top: 4px;
}
div.comment div.comment-right {
float: right;
}
div.comment textarea { resize: none }
#repo-wrapper div.file div.data .formatted {
overflow-x: auto;
overflow-y: none;
}
table.tablesorter tbody td a .issue_title {
color: #58595B;
}
.syntaxhighlighter {
padding: 11px;
}
#output.formatted {
width: auto;
font-family: "Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace;
color: #000000;
padding: 10px 5px 0px;
margin-left: 45px;
}
#output.formatted pre {
font-family: "Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace;
padding: 0;
margin: 0;
}
div.gutter {
border-right: 1px solid #CCCCCC !important;
}
table.tablesorter tr td.centered {
text-align: center;
}
/* TODO change this */
header div.user div.avatar img {
border: 1px solid #DDDDDD;
}
div.blame_data {
font-size: 80%;
}
div.blame_data tr.firstrow {
border-top: 1px solid #DDDDDD;
}
div.blame_data tr td.commit_info {
padding: 0.5em !important;
vertical-align: top;
width: 210px;
border-right: 1px solid #DDDDDD;
}
div.blame_data tr td.commit_info .date {
display: block;
float: left;
color: #666666;
}
div.blame_data tr td.commit_info .message {
width: 210px;
display: block;
float: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 12px;
}
div.blame_data tr td.lines {
padding: 0 0.5em !important;
width: 1%;
font-size: 12px;
line-height: 1.4em;
}
div.blame_data tr td.code {
padding: 0 10px !important;
font-size: 12px;
}
div.blame_data tr td.code pre {
padding: 0;
margin: 0;
}
// Search
p.block { margin-bottom: 10px; clear: both; }
table.tablesorter.bmargin5 {
th { padding: 5px; }
td p.block {margin-bottom: 0px;}
}
div#gollum-searchbar-fauxtext {
padding-left: 10px;
}
div#gollum-searchbar-fauxtext input#search-query {
display: inline-block;
float: left;
width: 145px;
border: 1px solid #D3D3D3;
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
font-size: 12px;
height: 24px;
margin: 0;
padding: 0 4px;
vertical-align: middle;
white-space: nowrap;
}
a#search-submit {
-moz-box-sizing: content-box;
border-left: medium none;
border-radius: 0 3px 3px 0;
height: 24px;
margin-left: 0;
padding: 0;
position: relative;
vertical-align: middle;
display: inline-block;
float: left;
}
a#search-submit span {
background: image-url("gollum/icon-sprite.png") no-repeat scroll 50% 4px transparent;
background-position: -430px -2px;
height: 24px;
text-indent: -9999px;
width: 16px;
display: block;
height: 21px;
line-height: 21px;
padding: 0 9px 0 7px;
}
a#search-submit:hover span {
background-position: -430px -29px;
}
table.wiki .history .td2 .name span.username {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 164px;
}
table.tablesorter.platforms .th1 {
width: 290px;
}
table.tablesorter.platforms .th2 {
width: 280px;
}
table.tablesorter tr td.buttons {
text-align: center;
}
table.tablesorter tr td.buttons a span.delete {
background: image-url('x.png') no-repeat 0 0 transparent;
width: 12px;
display: inline-block;
}
#fork-and-edit {display:block;}
.notify.blue div.success {
border: 1px solid #bad099;
background: #d7e599;
float: left;
}
div.notify.blue div.error {
float: left;
border: 1px solid #ddd;
background-color: #FBE3E4;
border-color: #FBC2C4;
}
div.notify.blue div.nocolor {
float: left;
border: 1px solid #a9c6dd;
}
div.notify.blue div.red {
float: left;
border: 1px solid #ddd;
background-color: #FBE3E4;
border-color: #FBC2C4;
}
a.button.left_floated {
display: inline-block;
float: left;
margin-right: 5px;
}
div.buttons_block {
margin-top: 20px;
}
table.tablesorter.unbordered {
border: none;
}
table.tablesorter.unbordered tr td {
border: none;
padding: 3px;
}
table.tablesorter.repo-projects th.th1 {
width: 250px;
}
table.tablesorter.repo-projects th.th3,
table.tablesorter th.buttons {
width: 60px;
text-align: center;
}
table.tablesorter.repo-projects td.td2,
.table-sort-right {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
div.dataTables_filter {
margin-bottom: 15px;
}
div.dataTables_paginate {
float: left;
}
div.dataTables_info {
float: right;
}
div.dataTables_info,
div.dataTables_paginate.paging_will_paginate_like {
margin-top: 15px;
}
div.dataTables_paginate.paging_will_paginate_like a.paginate_button,
div.dataTables_paginate.paging_will_paginate_like a.paginate_active {
background: none repeat scroll 0 0 #EDEDED;
color: #4C90D0 !important;
border: 1px solid #DDDDDD;
border-radius: 1px 1px 1px 1px;
padding: 3px 7px;
margin-right: 3px;
cursor: pointer;
}
div.dataTables_paginate.paging_will_paginate_like a.paginate_button_disabled,
div.dataTables_paginate.paging_will_paginate_like a.paginate_active {
color: #565657 !important;
cursor: default;
}
div.dataTables_paginate.paging_will_paginate_like a.paginate_button_disabled:hover,
div.dataTables_paginate.paging_will_paginate_like a.paginate_active:hover {
text-decoration: none;
}
div.dataTables_paginate.paging_will_paginate_like a.previous {
margin-left: 0px;
margin-right: 4px;
}
div.dataTables_paginate.paging_will_paginate_like a.next {
margin-left: 1px;
margin-right: 0px;
}
div.dataTables_paginate.paging_will_paginate_like a.paginate_active {
background: none repeat scroll 0 0 #D5E7F9;
border: 1px solid #C1DAED;
}
div.dataTables_processing {
z-index: 999;
}
div.rightlist textarea {
resize: none;
}
div#crontab_generator .leftlist,
div#crontab_generator .rightlist {
width: 50%;
}
div#crontab_generator .leftlist select,
div#crontab_generator .rightlist select {
margin-top: 10px;
}
table.dataTable tr.odd td.sorting_1 {
background-color: #F0F0F6;
}
table.dataTable tr.even td.sorting_1 {
background-color: #FFFFFF;
}
div.right.bigpadding div.command_select div.rightlist {
width: 245px;
}
div.right.bigpadding div.command_select div.rightlist select {
width: 240px;
height: 23px;
}
div.right.bigpadding div.command_select div.rightlist textarea {
width: 430px;
height: 50px;
}
div.rightlist textarea.resizable {
resize: both;
}

View File

@ -37,7 +37,7 @@ li.commit .message {
li.commit .trees {
padding-left: 5px;
width: 180px;
width: 200px;
}
li.commit .message a {
@ -111,6 +111,7 @@ table.blob td.blob pre {
background-color: #EAEAEA;
border-bottom: 1px solid #DDDDDD;
font-family: Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
font-size: 1.2em;
padding: 5px;
margin-top: 20px;
}
@ -143,6 +144,7 @@ table.commit_stats tr {
table.diff {
line-height: 1.4em;
font-size: 1.2em;
font-family: 'Bitstream Vera Sans Mono','Courier',monospace;
border-top: 1px solid #EAEAEA;
border-bottom: 1px solid #EAEAEA;
@ -153,8 +155,7 @@ table.diff tr td.line_numbers {
background-color: #ECECEC;
border-right: 1px solid #DDDDDD;
color: #AAAAAA;
padding-left: 10px;
padding-right: 10px;
padding: 0 0.5em;
text-align: right;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,326 @@
html, body {
margin: 0;
padding: 0;
font-family: Tahoma, Geneva, Helvetica, sans-serif;
color: #565667;
background: #1f60a1 image-url("bg.png") repeat-x;
min-width: 940px;
min-height: 300px;
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;
min-height: 95%;
}
.both {
clear: both;
}
/* Header */
header div.logo {
background: image-url("logo.png") no-repeat 50% 100%;
height: 89px;
width: 233px;
margin: 0 auto;
text-align: center;
padding-top: 12%;
}
header div.text {
color: #FFF;
font-size: 28px;
width: 800px;
text-align: left;
margin-left: 90px;
margin-top: 50px;
font-family: Arial;
text-shadow: 0px 1px 1px #000000;
filter: dropshadow(color=#000000, offx=0, offy=1);
padding-left: 0px;
}
.niceCheck {
width: 17px;
height: 17px;
display: inline-block;
cursor: pointer;
background: image-url("checkbox.png");
}
.niceCheck input {
display: none;
}
/* Content */
article {
width: 257px;
height: 227px;
background: #1c394c image-url("bg-signup.png") repeat-x;
border-radius: 5px;
border: 1px solid #38658c;
margin: 0 auto;
text-align: center;
margin-top: 75px;
-webkit-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
}
a.button, input.button {
background: #125687;
background: image-url("button-green-normal.png");
border-radius: 3px;
color: #FFF;
font-family: Tahoma;
font-size: 12px;
-webkit-font-smoothing: antialiased;
font-weight: normal;
padding: 5px 25px;
text-align: center;
border: none;
height: 25px;
width: 106px;
text-decoration: none;
}
input.button {
padding: 3px 27px 8px 27px;
height: 25px;
width: auto;
}
a.button:hover, input.button:hover {
background: #1874b6;
background: image-url("button-green-hover.png");
cursor: pointer;
}
a.button:active, input.button:active{
background: image-url("button-green-press.png");
}
a.button:disabled, a.button.disabled, input.button:disabled, input.button.disabled {
background: #125687;
background: image-url("button-green-disabled.png");
cursor: default;
}
article h1 {
color: #FFF;
font-size: 18px;
font-weight: normal;
font-family: Tahoma;
margin-bottom: 5px;
}
.registartion-input, .registartion-input-focus, .registartion-input-error, .registartion-input-no-focus {
height: 24px;
width: 217px;
border: 1px solid #8199a9;
border-radius: 2px;
color: #cfcfcf;
font-family: Tahoma;
font-size: 12px;
padding-left: 10px;
margin-top: 10px;
}
.registartion-input-focus, .registartion-input-focus-signup {
color: #575756;
-webkit-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
-moz-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
}
.registartion-input-no-focus, .registartion-input-no-focus-signup {
color: #575756;
}
.registartion-input-error, .registartion-input-error-signup {
border: 1px solid #bd4d40;
outline:1px solid #bd4d40;
outline-offset:-2px;
}
div.registration div.remember{
color: #FFF;
font-size: 12px;
float: left;
padding-left: 15px;
padding-top: 5px;
}
div.registration div.remember div.check {
float: left;
margin-top: 15px;
margin-right: 4px;
}
div.registration div.remember div.text {
float: left;
margin-top: 15px;
}
div.registration div.in {
float: right;
padding-right: 15px;
padding-top: 15px;
}
div.hr {
margin-top: 10px;
height: 1px;
width: 100%;
border-bottom: 1px solid #264862;
border-top: 1px solid #264862;
}
article div.other div.left{
float: left;
font-size: 12px;
color: #FFFFFF;
margin-top: 6px;
margin-left: 15px;
}
article div.other div.right {
float: right;
margin-right: 15px;
margin-top: 13px;
}
div.forgot {
width: 257px;
text-align: center;
margin: 0 auto;
}
div.password {
float: right;
padding-top: 4px;
}
div.password p {
margin: 0;
padding: 0;
}
div.password a {
color: #FFF;
font-size: 12px;
text-decoration: none;
}
div.password a:hover {
text-decoration: underline;
}
nav {
width: 96px;
height: 47px;
background: image-url("registration.png") no-repeat;
float: right;
cursor: pointer;
}
nav p {
font-size: 14px;
color: #FFF;
margin: 0;
padding: 0;
padding-top: 10px;
}
div.error {
width: auto;
height: auto;
font-size: 12px;
position: absolute;
margin-top: -159px;
margin-left: 582px;
display: none;
}
div.error div.img {
background: image-url("error-arrow.png") 0% 5px no-repeat;
width: 19px;
height: 35px;
float: left;
}
div.error div.msg {
background: #ededed;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
width: auto;
height: auto;
float: left;
-webkit-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
padding: 5px 20px 5px;
}
div.error p{
margin:0;
padding: 0;
text-align: center;
}
/* Footer */
footer {
height: 32px;
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: center;
}
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;
}

View File

@ -0,0 +1,285 @@
html, body {
margin: 0;
padding: 0;
font-family: Tahoma, Geneva, Helvetica, sans-serif;
color: #565667;
background: #1f60a1 image-url("bg.png") repeat-x;
min-width: 940px;
min-height: 300px;
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;
min-height: 95%;
}
.both {
clear: both;
}
/* Header */
header div.logo {
background: image-url("logo.png") no-repeat 50% 100%;
height: 89px;
width: 233px;
margin: 0 auto;
text-align: center;
padding-top: 12%;
}
header div.text {
color: #FFF;
font-size: 28px;
width: 800px;
text-align: left;
margin-left: 90px;
margin-top: 50px;
font-family: Arial;
text-shadow: 0px 1px 1px #000000;
filter: dropshadow(color=#000000, offx=0, offy=1);
padding-left: 0px;
}
.niceCheck {
width: 17px;
height: 17px;
display: inline-block;
cursor: pointer;
background: image-url("checkbox.png");
}
.niceCheck input {
display: none;
}
/* Content */
article {
width: 380px;
height: 254px;
background: #1c394c image-url("bg-signup.png") repeat-x;
border-radius: 5px;
border: 1px solid #38658c;
margin: 0 auto;
text-align: center;
margin-top: 75px;
-webkit-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
}
a.button, input.button {
background: #125687;
background: image-url("button-green-normal.png");
border-radius: 3px;
color: #FFF;
font-family: Tahoma;
font-size: 12px;
-webkit-font-smoothing: antialiased;
font-weight: normal;
padding: 5px 25px;
text-align: center;
border: none;
height: 25px;
width: 106px;
text-decoration: none;
}
article div.left {
float: left;
font-size: 12px;
color: #FFF;
margin-left: 15px;
margin-top: 16px;
}
article div.right {
float: right;
margin-right: 15px;
padding-bottom: 2px;
}
.first {
padding-top: 5px;
}
input.button {
padding: 3px 27px 8px 27px;
height: 25px;
width: auto;
}
a.button:hover, input.button:hover {
background: #1874b6;
background: image-url("button-green-hover.png");
cursor: pointer;
}
a.button:active, input.button:active{
background: image-url("button-green-press.png");
}
a.button:disabled, a.button.disabled, input.button:disabled, input.button.disabled{
background: #125687;
background: image-url("button-green-disabled.png");
cursor: default;
}
article h1 {
color: #FFF;
font-size: 18px;
font-weight: normal;
font-family: Tahoma;
margin-bottom: 5px;
}
.registartion-input, .registartion-input-focus, .registartion-input-error, .registartion-input-no-focus {
height: 24px;
width: 217px;
border: 1px solid #8199a9;
border-radius: 2px;
color: #cfcfcf;
font-family: Tahoma;
font-size: 12px;
padding-left: 10px;
margin-top: 10px;
}
.registartion-input-focus, .registartion-input-focus-signup {
color: #575756;
-webkit-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
-moz-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
}
.registartion-input-no-focus, .registartion-input-no-focus-signup {
color: #575756;
}
.registartion-input-error, .registartion-input-error-signup {
border: 1px solid #bd4d40;
outline:1px solid #bd4d40;
outline-offset:-2px;
}
div.in {
float: right;
margin-right: 15px;
margin-top: 12px;
}
/* Footer */
footer {
height: 32px;
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: center;
}
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;
}
div.error {
width: auto;
height: auto;
font-size: 12px;
position: absolute;
margin-top: -159px;
margin-left: 582px;
display: none;
text-align: left;
}
div.error div.img {
background: image-url("error-arrow.png") 0% 5px no-repeat;
width: 19px;
height: 35px;
float: left;
}
div.error div.msg {
background: #ededed;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
width: auto;
height: auto;
float: left;
-webkit-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
padding: 5px 20px 5px;
}
div.error p{
margin:0;
padding: 0;
text-align: center;
}
div.error.login {
margin-top: -242px;
margin-left: 650px;
}
div.error.name {
margin-top: -202px;
margin-left: 650px;
}
div.error.email {
margin-top: -161px;
margin-left: 650px;
}
div.error.password {
margin-top: -101px;
margin-left: 650px;
}

View File

@ -0,0 +1,3 @@
@import 'devise/login';
nav a { text-decoration: none;}

View File

@ -0,0 +1,23 @@
@import "devise/registration";
nav {
width: 96px;
height: 47px;
background: image-url("registration.png") no-repeat;
float: right;
cursor: pointer;
a {
font-size: 14px;
color: #FFF;
margin: 0;
padding: 0;
padding-top: 10px;
text-decoration: none;} }
div.error.forgot {
margin-top: 8px;
margin-left: 308px; }
div.error.reset {
margin-top: -141px;
margin-left: 645px; }

View File

@ -2,6 +2,14 @@ class ActivityFeedsController < ApplicationController
before_filter :authenticate_user!
def index
@filter = t('feed_menu').has_key?(params[:filter].try(:to_sym)) ? params[:filter].to_sym : :all
@activity_feeds = current_user.activity_feeds
@activity_feeds = @activity_feeds.where(:kind => "ActivityFeed::#{@filter.upcase}".constantize) unless @filter == :all
@activity_feeds = @activity_feeds.paginate :page => params[:page]
if request.format == '*/*'
render '_list', :layout => false
else
render 'index'
end
end
end

View File

@ -1,4 +1,4 @@
# coding: UTF-8
# -*- encoding : utf-8 -*-
class ApplicationController < ActionController::Base
protect_from_forgery
@ -45,7 +45,7 @@ class ApplicationController < ActionController::Base
end
def layout_by_resource
if devise_controller?
if devise_controller? && !(params[:controller] == 'devise/registrations' && ['edit', 'update'].include?(params[:action]))
"sessions"
else
"application"

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class AutoBuildListsController < ApplicationController
before_filter :authenticate_user!, :except => :auto_build
before_filter :find_auto_build_list, :only => :destroy

View File

@ -1,6 +1,7 @@
# -*- encoding : utf-8 -*-
class BuildListsController < ApplicationController
CALLBACK_ACTIONS = [:publish_build, :status_build, :pre_build, :post_build, :circle_build, :new_bbdt]
NESTED_ACTIONS = [:index, :new, :create]
NESTED_ACTIONS = [:search, :index, :new, :create]
before_filter :authenticate_user!, :except => CALLBACK_ACTIONS
before_filter :authenticate_build_service!, :only => CALLBACK_ACTIONS
@ -12,16 +13,18 @@ class BuildListsController < ApplicationController
load_and_authorize_resource :build_list, :through => :project, :only => NESTED_ACTIONS, :shallow => true
load_and_authorize_resource :except => CALLBACK_ACTIONS.concat(NESTED_ACTIONS)
def index
filter_params = params[:filter] || {}
if @project
@action_url = project_build_lists_path(@project)
else
@action_url = build_lists_path
def search
new_params = {:filter => {}}
params[:filter].each do |k,v|
new_params[:filter][k] = v unless v.empty?
end
redirect_to @project ? project_build_lists_path(@project, new_params) : build_lists_path(new_params)
end
@filter = BuildList::Filter.new(@project, filter_params)
@build_lists = @filter.find.accessible_by(current_ability).recent.paginate :page => params[:page]
def index
@action_url = @project ? search_project_build_lists_path(@project) : search_build_lists_path
@filter = BuildList::Filter.new(@project, current_user, params[:filter] || {})
@build_lists = @filter.find.recent.paginate :page => params[:page]
@build_server_status = begin
BuildServer.get_status
@ -39,8 +42,9 @@ class BuildListsController < ApplicationController
Arch.where(:id => params[:arches]).each do |arch|
Platform.main.where(:id => params[:bpls]).each do |bpl|
@build_list = @project.build_lists.build(params[:build_list])
@build_list.commit_hash = @project.git_repository.commits(@build_list.project_version.match(/(.+)_latest$/).to_a.last || @build_list.project_version).first.id
@build_list.commit_hash = @project.git_repository.commits(@build_list.project_version.match(/^latest_(.+)/).to_a.last || @build_list.project_version).first.id if @build_list.project_version
@build_list.bpl = bpl; @build_list.arch = arch; @build_list.user = current_user
@build_list.include_repos = @build_list.include_repos.select { |ir| @build_list.bpl.repository_ids.include? ir.to_i }
flash_options = {:project_version => @build_list.project_version, :arch => arch.name, :bpl => bpl.name, :pl => @build_list.pl}
if @build_list.save
notices << t("flash.build_list.saved", flash_options)
@ -120,9 +124,9 @@ class BuildListsController < ApplicationController
@build_list.notified_at = Time.current
@build_list.save
@build_list.delay.publish if @build_list.auto_publish # && @build_list.can_publish?
render :nothing => true, :status => 200
@build_list.delay.publish if @build_list.auto_publish # && @build_list.can_publish?
end
def circle_build

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class CategoriesController < ApplicationController
before_filter :authenticate_user!
before_filter :find_category, :only => [:show, :edit, :update, :destroy]
@ -18,10 +19,10 @@ class CategoriesController < ApplicationController
if @platform
@categories = Category.select('categories.id, categories.name, categories.ancestry, count(projects.id) projects_count').
joins(:projects => :repositories).where('repositories.platform_id = ?', @platform.id).
having('count(projects.id) > 0').group('categories.id, categories.name, categories.ancestry, projects_count').default_order
having('count(projects.id) > 0').group('categories.id, categories.name, categories.ancestry, projects_count')
render 'index2'
else
@categories = Category.default_order.paginate(:page => params[:page])
@categories = Category.paginate(:page => params[:page])
end
end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class CollaboratorsController < ApplicationController
before_filter :authenticate_user!
@ -5,7 +6,8 @@ class CollaboratorsController < ApplicationController
before_filter :find_users
before_filter :find_groups
load_and_authorize_resource :project
load_resource :project
before_filter :authorize_collaborators
def index
redirect_to edit_project_collaborators_path(@project)
@ -28,57 +30,57 @@ class CollaboratorsController < ApplicationController
end
def update
all_user_ids = []
all_groups_ids = []
Relation::ROLES.each { |r|
all_user_ids = all_user_ids | params['user'][r.to_sym].keys if params['user'] && params['user'][r.to_sym]
all_groups_ids = all_groups_ids | params['group'][r.to_sym].keys if params['group'] && params['group'][r.to_sym]
}
params['user'].keys.each { |user_id|
role = params['user'][user_id]
# Remove relations
users_for_removing = @project.collaborators.select do |u|
!all_user_ids.map{|k| k.to_i}.include? u.id and @project.owner != u
end
users_for_removing.each do |u|
Relation.by_object(u).by_target(@project).each {|r| r.destroy}
end
groups_for_removing = @project.groups.select do |u|
!all_groups_ids.map{|k| k.to_i}.include? u.id and @project.owner != u
end
groups_for_removing.each do |u|
Relation.by_object(u).by_target(@project).each {|r| r.destroy}
end
# Create relations
Relation::ROLES.each { |r|
#users_for_creating = users_for_creating params[:user].keys.map{|p| p.to_i} - @project.collaborators.map(&:id)
params['user'][r.to_sym].keys.each { |u|
if relation = @project.relations.find_by_object_id_and_object_type(u, 'User')
relation.update_attribute(:role, r)
if relation = @project.relations.find_by_object_id_and_object_type(user_id, 'User')
relation.update_attribute(:role, role)
else
relation = @project.relations.build(:object_id => u, :object_type => 'User', :role => r)
relation = @project.relations.build(:object_id => user_id, :object_type => 'User', :role => role)
relation.save!
end
} if params['user'] && params['user'][r.to_sym]
params['group'][r.to_sym].keys.each { |u|
if relation = @project.relations.find_by_object_id_and_object_type(u, 'Group')
relation.update_attribute(:role, r)
} if params['user']
params['group'].keys.each { |group_id|
role = params['group'][group_id]
if relation = @project.relations.find_by_object_id_and_object_type(group_id, 'Group')
relation.update_attribute(:role, role)
else
relation = @project.relations.build(:object_id => u, :object_type => 'Group', :role => r)
relation = @project.relations.build(:object_id => user_id, :object_type => 'Group', :role => role)
relation.save!
end
} if params['group'] && params['group'][r.to_sym]
}
} if params['group']
if @project.save
flash[:notice] = t("flash.collaborators.successfully_changed")
else
flash[:error] = t("flash.collaborators.error_in_changing")
end
redirect_to project_path(@project)
redirect_to edit_project_collaborators_path(@project)
end
def destroy
def remove
all_user_ids = []
all_groups_ids = []
params['user_remove'].keys.each { |user_id|
all_user_ids << user_id if params['user_remove'][user_id] == ["1"]
} if params['user_remove']
params['group_remove'].keys.each { |group_id|
all_group_ids << group_id if params['group_remove'][group_id] == ["1"]
} if params['group_remove']
all_user_ids.each do |user_id|
u = User.find(user_id)
Relation.by_object(u).by_target(@project).each {|r| r.destroy}
end
all_groups_ids.each do |group_id|
g = Group.find(group_id)
Relation.by_object(g).by_target(@project).each {|r| r.destroy}
end
redirect_to edit_project_collaborators_path(@project)
end
def add
@ -94,7 +96,7 @@ class CollaboratorsController < ApplicationController
flash[:warning] << [t('flash.collaborators.member_already_added'), mem.uname]
end
unless @project.relations.exists?(:object_id => mem.id, :object_type => mem.class.to_s)
rel = @project.relations.build(:role => 'reader')
rel = @project.relations.build(:role => params[:role])
rel.object = mem
if rel.save
flash[:notice] << [t('flash.collaborators.successfully_added'), mem.uname]
@ -108,10 +110,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
@ -129,4 +130,8 @@ class CollaboratorsController < ApplicationController
def find_groups
@groups = @project.groups#Group.all
end
def authorize_collaborators
authorize! :update, @project
end
end

View File

@ -1,11 +1,11 @@
# -*- encoding : utf-8 -*-
class CommentsController < ApplicationController
before_filter :authenticate_user!
before_filter :set_commentable, :only => [:index, :edit, :create, :update, :destroy]
#before_filter :find_project, :only => [:index, :edit]
before_filter :find_comment, :only => [:edit, :update, :destroy]
authorize_resource :only => [:show, :edit, :update, :destroy]
authorize_resource :project, :only => [:index]
load_resource :project
before_filter :set_commentable
before_filter :find_comment, :only => [:edit, :update, :destroy]
authorize_resource
def index
@comments = @commentable.comments
@ -13,8 +13,11 @@ 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)) if @commentable.class == Grit::Commit
@comment.user = current_user
if @commentable.class == Grit::Commit
@comment = Comment.new(params[:comment].merge(:commentable_id => @commentable.id.hex, :commentable_type => @commentable.class.name))
end
@comment.project = @project
@comment.user_id = current_user.id
if @comment.save
flash[:notice] = I18n.t("flash.comment.saved")
redirect_to commentable_path
@ -53,36 +56,22 @@ class CommentsController < ApplicationController
private
def find_commentable
#params.each do |name, value|
# if name =~ /(.+)_id$/
# return $1.classify.constantize.find(value)
# end
#end
#nil
if params[:issue_id].present?
return Issue.find_by_serial_id_and_project_id(params[:issue_id], params[:project_id])
elsif params[:commit_id].present?
return @project.git_repository.commit(params[:commit_id])
end
end
def set_commentable
find_project
@commentable = find_commentable
@commentable = if params[:issue_id].present?
@project.issues.find_by_serial_id params[:issue_id]
elsif params[:commit_id].present?
@project.git_repository.commit params[:commit_id]
end
end
def find_comment
@comment = Comment.find(params[:id])
@comment.project = @project if @comment.commentable_type == 'Grit::Commit'
if @comment.commit_comment?
@comment.project = @project
@comment.helper
end
def find_project
@project = Project.find(params[:project_id])
end
protected
def commentable_path
@commentable.class == Issue ? [@project, @commentable] : commit_path(@project, @commentable.id)
end

View File

@ -0,0 +1,32 @@
# -*- encoding : utf-8 -*-
class CommitSubscribesController < ApplicationController
before_filter :authenticate_user!
load_and_authorize_resource :project
before_filter :find_commit
def create
if Subscribe.subscribe_to_commit(@options)
flash[:notice] = I18n.t("flash.subscribe.commit.saved")
# TODO js
redirect_to commit_path(@project, @commit)
else
flash[:error] = I18n.t("flash.subscribe.saved_error")
redirect_to commit_path(@project, @commit)
end
end
def destroy
Subscribe.unsubscribe_from_commit(@options)
flash[:notice] = t("flash.subscribe.commit.destroyed")
redirect_to commit_path(@project, @commit)
end
protected
def find_commit
@commit = @project.git_repository.commit(params[:commit_id])
@options = {:project_id => @project.id, :subscribeable_id => @commit.id.hex, :subscribeable_type => @commit.class.name, :user_id => current_user.id}
end
end

View File

@ -1,2 +1,3 @@
# -*- encoding : utf-8 -*-
class ContainersController < ApplicationController
end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class DownloadsController < ApplicationController
before_filter :authenticate_user!
load_and_authorize_resource

View File

@ -1,4 +1,4 @@
# coding: UTF-8
# -*- encoding : utf-8 -*-
class EventLogsController < ApplicationController
before_filter :authenticate_user!
load_and_authorize_resource

View File

@ -1,7 +1,8 @@
# -*- encoding : utf-8 -*-
class Git::BaseController < ApplicationController
before_filter :authenticate_user!
load_and_authorize_resource :project
before_filter :find_project
before_filter :find_git_repository
before_filter :find_tags
before_filter :find_branches
@ -9,13 +10,7 @@ class Git::BaseController < ApplicationController
before_filter :set_current_tag
before_filter :set_current_branch
load_and_authorize_resource :project
protected
def find_project
@project = Project.find(params[:project_id])
end
def find_git_repository
@git_repository = @project.git_repository
end
@ -29,7 +24,7 @@ class Git::BaseController < ApplicationController
end
def set_treeish
@treeish = params[:treeish].present? ? params[:treeish] : "master"
@treeish = params[:treeish].presence || @project.default_branch
end
def set_current_tag

View File

@ -1,55 +1,64 @@
# -*- encoding : utf-8 -*-
class Git::BlobsController < Git::BaseController
before_filter :set_path
before_filter :set_commit_hash
before_filter :find_tree
before_filter :find_branch
before_filter :set_path_blob
def show
@blob = @tree / @path
redirect_to project_path(@project) and return unless @blob.present?
if params[:raw]
image_url = Rails.root.to_s + "/" + @path
response.headers['Cache-Control'] = "public, max-age=#{12.hours.to_i}"
response.headers['Content-Type'] = @blob.mime_type
response.headers['Content-Disposition'] = 'inline'
render(:text => open(image_url).read) and return
render(:text => @blob.data) and return
end
end
def edit
redirect_to project_path(@project) and return unless @blob.present?
authorize! :write, @project
end
def update
redirect_to project_path(@project) and return unless @blob.present?
authorize! :write, @project
# Here might be callbacks for notification purposes:
# @git_repository.after_update_file do |repo, sha|
# end
res = @git_repository.update_file(params[:path], params[:content].gsub("\r", ''),
:message => params[:message].gsub("\r", ''), :actor => current_user, :head => @treeish)
if res
flash[:notice] = t("flash.blob.successfully_updated", :name => params[:path])
else
flash[:notice] = t("flash.blob.updating_error", :name => params[:path])
end
redirect_to :action => :show
end
def blame
@blob = @tree / @path
@blame = Grit::Blob.blame(@git_repository.repo, @commit.try(:id), @path)
end
def raw
@blob = @tree / @path
redirect_to project_path(@project) and return unless @blob.present?
headers["Content-Disposition"] = %[attachment;filename="#{@blob.name}"]
render :text => @blob.data, :content_type => @blob.mime_type
end
protected
def set_path
@path = params[:path]
def find_branch
@branch = @project.branch(@treeish)
end
def set_commit_hash
@commit_hash = params[:commit_hash].present? ? params[:commit_hash] : nil
def set_path_blob
@path = params[:path]
@blob = @tree / @path
end
def find_tree
if @commit_hash
puts "1"
@tree = @git_repository.tree(@commit_hash)
@commit = @git_repository.commits(@treeish, 1).first
else
puts "2"
@tree = @git_repository.tree(@treeish)
puts @tree.name.inspect
@commit = @git_repository.log(@treeish, @path).first # TODO WTF nil ?
end
@commit = @git_repository.log(@treeish, @path, :max_count => 1).first # TODO WTF nil ?
end
end

View File

@ -1,7 +1,10 @@
# -*- encoding : utf-8 -*-
class Git::CommitsController < Git::BaseController
helper_method :split_commits_by_date
def index
@branch_name = (params[:branch] ? params[:branch] : "master")
@branch_name = params[:treeish] || @project.default_branch
@branch = @project.branch(@branch_name)
@path = params[:path]
if @path.present?
@ -18,9 +21,22 @@ class Git::CommitsController < Git::BaseController
respond_to do |format|
format.html
format.diff { render :text => (@commit.diffs.map{|d| d.diff}.join("\n") rescue ''), :content_type => "text/plain" }
format.diff { render :text => (@commit.diffs.map(&:diff).join("\n") rescue ''), :content_type => "text/plain" }
format.patch { render :text => (@commit.to_patch rescue ''), :content_type => "text/plain" }
end
end
protected
def split_commits_by_date(commits)
res = commits.sort{|x, y| y.authored_date <=> x.authored_date}.inject({}) do |h, commit|
dt = commit.authored_date
h[dt.year] ||= {}
h[dt.year][dt.month] ||= {}
h[dt.year][dt.month][dt.day] ||= []
h[dt.year][dt.month][dt.day] << commit
h
end
return res
end
end

View File

@ -1,10 +0,0 @@
class Git::RepositoriesController < Git::BaseController
def show
@commit = @git_repository.master
@tree = @commit ? @commit.tree : nil
render :template => "git/repositories/empty" unless @tree
end
end

View File

@ -1,16 +1,18 @@
# -*- encoding : utf-8 -*-
class Git::TreesController < Git::BaseController
def show
@path = params[:path]
redirect_to project_path(@project) and return if params[:treeish] == @project.default_branch and params[:path].blank?
@path = params[:path]
@tree = @git_repository.tree(@treeish)
@branch = @project.branch(@treeish)
# @commit = @git_repository.commits(@treeish, 1).first
# Raises Grit::Git::GitTimeout
@commit = @git_repository.log(@treeish, @path).first
@commit = @branch.present? ? @branch.commit() : @git_repository.log(@treeish, @path, :max_count => 1).first
render :template => "git/trees/empty" and return unless @commit
@tree = @tree / @path if @path
render :template => "git/repositories/show"
render :template => "git/trees/show"
end
end

View File

@ -1,4 +1,4 @@
# coding: UTF-8
# -*- encoding : utf-8 -*-
class GroupsController < ApplicationController
is_related_controller!
@ -7,16 +7,12 @@ class GroupsController < ApplicationController
before_filter :authenticate_user!
before_filter :find_group, :only => [:show, :edit, :update, :destroy]
load_and_authorize_resource
load_and_authorize_resource :except => :create
authorize_resource :only => :create
autocomplete :group, :uname
def index
puts parent.inspect
@groups = if parent? and !parent.nil?
parent.groups
else
Group
end.accessible_by(current_ability)
@groups = current_user.groups#accessible_by(current_ability)
@groups = if params[:query]
@groups.where(["name LIKE ?", "%#{params[:query]}%"])
@ -39,19 +35,16 @@ class GroupsController < ApplicationController
end
def create
@group = Group.new params[:group]
@group.owner = if parent? and parent.is_a? User
parent
else
current_user
end
@group = Group.new(:description => params[:group][:description])
@group.owner = current_user
@group.uname = params[:group][:uname]
if @group.save
flash[:notice] = t('flash.group.saved')
redirect_to group_path(@group)
else
flash[:error] = t('flash.group.save_error')
flash[:warning] = @group.errors[:base]
flash[:warning] = @group.errors.full_messages.join('. ')
render :action => :new
end
end

Some files were not shown because too many files have changed in this diff Show More