Commit bfe0906f2ff7a79064c1866c0278cd0c9440b246
Exists in
master
and in
4 other branches
Merge remote-tracking branch 'upstream/master'
Showing
319 changed files
with
6876 additions
and
5123 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 319 files displayed.
.gitignore
.rbenv-version
| @@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
| 1 | -1.9.2-p290 |
.travis.yml
| @@ -4,6 +4,8 @@ branches: | @@ -4,6 +4,8 @@ branches: | ||
| 4 | - 'master' | 4 | - 'master' |
| 5 | rvm: 1.9.2 | 5 | rvm: 1.9.2 |
| 6 | before_script: | 6 | before_script: |
| 7 | + - "cp config/database.yml.example config/database.yml" | ||
| 8 | + - "cp config/gitlab.yml.example config/gitlab.yml" | ||
| 7 | - "bundle exec rake db:create RAILS_ENV=test" | 9 | - "bundle exec rake db:create RAILS_ENV=test" |
| 8 | - "bundle exec rake db:migrate RAILS_ENV=test" | 10 | - "bundle exec rake db:migrate RAILS_ENV=test" |
| 9 | - "bundle exec rake db:seed_fu RAILS_ENV=test" | 11 | - "bundle exec rake db:seed_fu RAILS_ENV=test" |
Gemfile
| 1 | source "http://rubygems.org" | 1 | source "http://rubygems.org" |
| 2 | 2 | ||
| 3 | -gem "rails", "3.1.1" | 3 | +gem "rails", "3.2.1" |
| 4 | 4 | ||
| 5 | gem "sqlite3" | 5 | gem "sqlite3" |
| 6 | -gem "rake", "0.9.2.2" | ||
| 7 | -gem "devise", "1.5.0" | 6 | +gem "rake" |
| 7 | +gem "devise" | ||
| 8 | gem "stamp" | 8 | gem "stamp" |
| 9 | gem "kaminari" | 9 | gem "kaminari" |
| 10 | gem "haml", "3.1.4" | 10 | gem "haml", "3.1.4" |
| @@ -16,7 +16,7 @@ gem "carrierwave" | @@ -16,7 +16,7 @@ gem "carrierwave" | ||
| 16 | gem "six" | 16 | gem "six" |
| 17 | gem "therubyracer" | 17 | gem "therubyracer" |
| 18 | gem "faker" | 18 | gem "faker" |
| 19 | -gem "seed-fu", "~> 2.1.0" | 19 | +gem "seed-fu" |
| 20 | gem "pygments.rb", "0.2.4" | 20 | gem "pygments.rb", "0.2.4" |
| 21 | gem "thin" | 21 | gem "thin" |
| 22 | gem "git" | 22 | gem "git" |
| @@ -24,20 +24,23 @@ gem "acts_as_list" | @@ -24,20 +24,23 @@ gem "acts_as_list" | ||
| 24 | gem "rdiscount" | 24 | gem "rdiscount" |
| 25 | gem "acts-as-taggable-on", "~> 2.1.0" | 25 | gem "acts-as-taggable-on", "~> 2.1.0" |
| 26 | gem "drapper" | 26 | gem "drapper" |
| 27 | -gem "resque" | 27 | +gem "resque", "~> 1.20.0" |
| 28 | gem "httparty" | 28 | gem "httparty" |
| 29 | gem "charlock_holmes" | 29 | gem "charlock_holmes" |
| 30 | gem "foreman" | 30 | gem "foreman" |
| 31 | +gem "omniauth-ldap" | ||
| 32 | +gem 'bootstrap-sass', "1.4.4" | ||
| 33 | +gem "colored" | ||
| 31 | 34 | ||
| 32 | group :assets do | 35 | group :assets do |
| 33 | - gem "sass-rails", "~> 3.1.0" | ||
| 34 | - gem "coffee-rails", "~> 3.1.0" | ||
| 35 | - gem "uglifier" | 36 | + gem "sass-rails", "3.2.3" |
| 37 | + gem "coffee-rails", "3.2.1" | ||
| 38 | + gem "uglifier", "1.0.3" | ||
| 36 | end | 39 | end |
| 37 | 40 | ||
| 38 | group :development do | 41 | group :development do |
| 39 | gem "letter_opener" | 42 | gem "letter_opener" |
| 40 | - gem "rails-footnotes", "~> 3.7.5" | 43 | + gem "rails-footnotes" |
| 41 | gem "annotate", :git => "https://github.com/ctran/annotate_models.git" | 44 | gem "annotate", :git => "https://github.com/ctran/annotate_models.git" |
| 42 | end | 45 | end |
| 43 | 46 | ||
| @@ -46,9 +49,7 @@ group :development, :test do | @@ -46,9 +49,7 @@ group :development, :test do | ||
| 46 | gem "capybara" | 49 | gem "capybara" |
| 47 | gem "autotest" | 50 | gem "autotest" |
| 48 | gem "autotest-rails" | 51 | gem "autotest-rails" |
| 49 | - unless ENV["CI"] | ||
| 50 | - gem "ruby-debug19", :require => "ruby-debug" | ||
| 51 | - end | 52 | + gem "pry" |
| 52 | gem "awesome_print" | 53 | gem "awesome_print" |
| 53 | gem "database_cleaner" | 54 | gem "database_cleaner" |
| 54 | gem "launchy" | 55 | gem "launchy" |
| @@ -58,5 +59,5 @@ end | @@ -58,5 +59,5 @@ end | ||
| 58 | group :test do | 59 | group :test do |
| 59 | gem "turn", :require => false | 60 | gem "turn", :require => false |
| 60 | gem "simplecov", :require => false | 61 | gem "simplecov", :require => false |
| 61 | - gem "shoulda", "~> 3.0.0.beta2" | 62 | + gem "shoulda", "3.0.0" |
| 62 | end | 63 | end |
Gemfile.lock
| 1 | GIT | 1 | GIT |
| 2 | remote: https://github.com/ctran/annotate_models.git | 2 | remote: https://github.com/ctran/annotate_models.git |
| 3 | - revision: fb73329243056a6d9a64878e5c543aba9b6417de | 3 | + revision: a43c08f0eb4d69a48c6830630ebb60e35ccb2d2d |
| 4 | specs: | 4 | specs: |
| 5 | annotate (2.4.1.beta1) | 5 | annotate (2.4.1.beta1) |
| 6 | 6 | ||
| @@ -25,48 +25,48 @@ GEM | @@ -25,48 +25,48 @@ GEM | ||
| 25 | remote: http://rubygems.org/ | 25 | remote: http://rubygems.org/ |
| 26 | specs: | 26 | specs: |
| 27 | ZenTest (4.5.0) | 27 | ZenTest (4.5.0) |
| 28 | - actionmailer (3.1.1) | ||
| 29 | - actionpack (= 3.1.1) | ||
| 30 | - mail (~> 2.3.0) | ||
| 31 | - actionpack (3.1.1) | ||
| 32 | - activemodel (= 3.1.1) | ||
| 33 | - activesupport (= 3.1.1) | 28 | + actionmailer (3.2.1) |
| 29 | + actionpack (= 3.2.1) | ||
| 30 | + mail (~> 2.4.0) | ||
| 31 | + actionpack (3.2.1) | ||
| 32 | + activemodel (= 3.2.1) | ||
| 33 | + activesupport (= 3.2.1) | ||
| 34 | builder (~> 3.0.0) | 34 | builder (~> 3.0.0) |
| 35 | erubis (~> 2.7.0) | 35 | erubis (~> 2.7.0) |
| 36 | - i18n (~> 0.6) | ||
| 37 | - rack (~> 1.3.2) | 36 | + journey (~> 1.0.1) |
| 37 | + rack (~> 1.4.0) | ||
| 38 | rack-cache (~> 1.1) | 38 | rack-cache (~> 1.1) |
| 39 | - rack-mount (~> 0.8.2) | ||
| 40 | rack-test (~> 0.6.1) | 39 | rack-test (~> 0.6.1) |
| 41 | - sprockets (~> 2.0.2) | ||
| 42 | - activemodel (3.1.1) | ||
| 43 | - activesupport (= 3.1.1) | 40 | + sprockets (~> 2.1.2) |
| 41 | + activemodel (3.2.1) | ||
| 42 | + activesupport (= 3.2.1) | ||
| 44 | builder (~> 3.0.0) | 43 | builder (~> 3.0.0) |
| 45 | - i18n (~> 0.6) | ||
| 46 | - activerecord (3.1.1) | ||
| 47 | - activemodel (= 3.1.1) | ||
| 48 | - activesupport (= 3.1.1) | ||
| 49 | - arel (~> 2.2.1) | 44 | + activerecord (3.2.1) |
| 45 | + activemodel (= 3.2.1) | ||
| 46 | + activesupport (= 3.2.1) | ||
| 47 | + arel (~> 3.0.0) | ||
| 50 | tzinfo (~> 0.3.29) | 48 | tzinfo (~> 0.3.29) |
| 51 | - activeresource (3.1.1) | ||
| 52 | - activemodel (= 3.1.1) | ||
| 53 | - activesupport (= 3.1.1) | ||
| 54 | - activesupport (3.1.1) | 49 | + activeresource (3.2.1) |
| 50 | + activemodel (= 3.2.1) | ||
| 51 | + activesupport (= 3.2.1) | ||
| 52 | + activesupport (3.2.1) | ||
| 53 | + i18n (~> 0.6) | ||
| 55 | multi_json (~> 1.0) | 54 | multi_json (~> 1.0) |
| 56 | acts-as-taggable-on (2.1.1) | 55 | acts-as-taggable-on (2.1.1) |
| 57 | rails | 56 | rails |
| 58 | acts_as_list (0.1.4) | 57 | acts_as_list (0.1.4) |
| 59 | addressable (2.2.6) | 58 | addressable (2.2.6) |
| 60 | - ansi (1.4.1) | ||
| 61 | - archive-tar-minitar (0.5.2) | ||
| 62 | - arel (2.2.1) | 59 | + ansi (1.4.2) |
| 60 | + arel (3.0.0) | ||
| 63 | autotest (4.4.6) | 61 | autotest (4.4.6) |
| 64 | ZenTest (>= 4.4.1) | 62 | ZenTest (>= 4.4.1) |
| 65 | autotest-rails (4.1.1) | 63 | autotest-rails (4.1.1) |
| 66 | ZenTest (= 4.5) | 64 | ZenTest (= 4.5) |
| 67 | - awesome_print (0.4.0) | 65 | + awesome_print (1.0.2) |
| 68 | bcrypt-ruby (3.0.1) | 66 | bcrypt-ruby (3.0.1) |
| 69 | blankslate (2.1.2.4) | 67 | blankslate (2.1.2.4) |
| 68 | + bootstrap-sass (1.4.4) | ||
| 69 | + sass-rails (~> 3.1) | ||
| 70 | builder (3.0.0) | 70 | builder (3.0.0) |
| 71 | capybara (1.1.2) | 71 | capybara (1.1.2) |
| 72 | mime-types (>= 1.16) | 72 | mime-types (>= 1.16) |
| @@ -78,19 +78,20 @@ GEM | @@ -78,19 +78,20 @@ GEM | ||
| 78 | carrierwave (0.5.8) | 78 | carrierwave (0.5.8) |
| 79 | activesupport (~> 3.0) | 79 | activesupport (~> 3.0) |
| 80 | charlock_holmes (0.6.8) | 80 | charlock_holmes (0.6.8) |
| 81 | - childprocess (0.2.2) | 81 | + childprocess (0.3.1) |
| 82 | ffi (~> 1.0.6) | 82 | ffi (~> 1.0.6) |
| 83 | - coffee-rails (3.1.1) | 83 | + coderay (1.0.5) |
| 84 | + coffee-rails (3.2.1) | ||
| 84 | coffee-script (>= 2.2.0) | 85 | coffee-script (>= 2.2.0) |
| 85 | - railties (~> 3.1.0) | 86 | + railties (~> 3.2.0.beta) |
| 86 | coffee-script (2.2.0) | 87 | coffee-script (2.2.0) |
| 87 | coffee-script-source | 88 | coffee-script-source |
| 88 | execjs | 89 | execjs |
| 89 | - coffee-script-source (1.1.3) | ||
| 90 | - columnize (0.3.4) | 90 | + coffee-script-source (1.2.0) |
| 91 | + colored (1.2) | ||
| 91 | crack (0.3.1) | 92 | crack (0.3.1) |
| 92 | - daemons (1.1.4) | ||
| 93 | - database_cleaner (0.7.0) | 93 | + daemons (1.1.8) |
| 94 | + database_cleaner (0.7.1) | ||
| 94 | devise (1.5.0) | 95 | devise (1.5.0) |
| 95 | bcrypt-ruby (~> 3.0) | 96 | bcrypt-ruby (~> 3.0) |
| 96 | orm_adapter (~> 0.0.3) | 97 | orm_adapter (~> 0.0.3) |
| @@ -99,13 +100,13 @@ GEM | @@ -99,13 +100,13 @@ GEM | ||
| 99 | drapper (0.8.4) | 100 | drapper (0.8.4) |
| 100 | erubis (2.7.0) | 101 | erubis (2.7.0) |
| 101 | eventmachine (0.12.10) | 102 | eventmachine (0.12.10) |
| 102 | - execjs (1.2.9) | 103 | + execjs (1.3.0) |
| 103 | multi_json (~> 1.0) | 104 | multi_json (~> 1.0) |
| 104 | faker (1.0.1) | 105 | faker (1.0.1) |
| 105 | i18n (~> 0.4) | 106 | i18n (~> 0.4) |
| 106 | ffi (1.0.11) | 107 | ffi (1.0.11) |
| 107 | - foreman (0.27.0) | ||
| 108 | - term-ansicolor (~> 1.0.5) | 108 | + foreman (0.39.0) |
| 109 | + term-ansicolor (~> 1.0.7) | ||
| 109 | thor (>= 0.13.6) | 110 | thor (>= 0.13.6) |
| 110 | git (1.2.5) | 111 | git (1.2.5) |
| 111 | haml (3.1.4) | 112 | haml (3.1.4) |
| @@ -115,139 +116,143 @@ GEM | @@ -115,139 +116,143 @@ GEM | ||
| 115 | haml (~> 3.0) | 116 | haml (~> 3.0) |
| 116 | railties (~> 3.0) | 117 | railties (~> 3.0) |
| 117 | hashery (1.4.0) | 118 | hashery (1.4.0) |
| 119 | + hashie (1.2.0) | ||
| 118 | hike (1.2.1) | 120 | hike (1.2.1) |
| 119 | httparty (0.8.1) | 121 | httparty (0.8.1) |
| 120 | multi_json | 122 | multi_json |
| 121 | multi_xml | 123 | multi_xml |
| 122 | i18n (0.6.0) | 124 | i18n (0.6.0) |
| 123 | - jquery-rails (1.0.17) | ||
| 124 | - railties (~> 3.0) | 125 | + journey (1.0.1) |
| 126 | + jquery-rails (2.0.0) | ||
| 127 | + railties (>= 3.2.0.beta, < 5.0) | ||
| 125 | thor (~> 0.14) | 128 | thor (~> 0.14) |
| 126 | - json (1.6.1) | ||
| 127 | - json_pure (1.6.1) | ||
| 128 | - kaminari (0.12.4) | ||
| 129 | - rails (>= 3.0.0) | 129 | + json (1.6.5) |
| 130 | + kaminari (0.13.0) | ||
| 131 | + actionpack (>= 3.0.0) | ||
| 132 | + activesupport (>= 3.0.0) | ||
| 133 | + railties (>= 3.0.0) | ||
| 130 | launchy (2.0.5) | 134 | launchy (2.0.5) |
| 131 | addressable (~> 2.2.6) | 135 | addressable (~> 2.2.6) |
| 132 | letter_opener (0.0.2) | 136 | letter_opener (0.0.2) |
| 133 | launchy | 137 | launchy |
| 134 | libv8 (3.3.10.4) | 138 | libv8 (3.3.10.4) |
| 135 | - linecache19 (0.5.12) | ||
| 136 | - ruby_core_source (>= 0.1.4) | ||
| 137 | - mail (2.3.0) | 139 | + mail (2.4.1) |
| 138 | i18n (>= 0.4.0) | 140 | i18n (>= 0.4.0) |
| 139 | mime-types (~> 1.16) | 141 | mime-types (~> 1.16) |
| 140 | treetop (~> 1.4.8) | 142 | treetop (~> 1.4.8) |
| 143 | + method_source (0.7.0) | ||
| 141 | mime-types (1.17.2) | 144 | mime-types (1.17.2) |
| 142 | - multi_json (1.0.3) | 145 | + multi_json (1.0.4) |
| 143 | multi_xml (0.4.1) | 146 | multi_xml (0.4.1) |
| 147 | + net-ldap (0.2.2) | ||
| 144 | nokogiri (1.5.0) | 148 | nokogiri (1.5.0) |
| 145 | - orm_adapter (0.0.5) | 149 | + omniauth (1.0.2) |
| 150 | + hashie (~> 1.2) | ||
| 151 | + rack | ||
| 152 | + omniauth-ldap (1.0.2) | ||
| 153 | + net-ldap (~> 0.2.2) | ||
| 154 | + omniauth (~> 1.0) | ||
| 155 | + pyu-ruby-sasl (~> 0.0.3.1) | ||
| 156 | + rubyntlm (~> 0.1.1) | ||
| 157 | + orm_adapter (0.0.6) | ||
| 146 | polyglot (0.3.3) | 158 | polyglot (0.3.3) |
| 147 | posix-spawn (0.3.6) | 159 | posix-spawn (0.3.6) |
| 160 | + pry (0.9.8.2) | ||
| 161 | + coderay (~> 1.0.5) | ||
| 162 | + method_source (~> 0.7) | ||
| 163 | + slop (>= 2.4.4, < 3) | ||
| 148 | pygments.rb (0.2.4) | 164 | pygments.rb (0.2.4) |
| 149 | rubypython (~> 0.5.3) | 165 | rubypython (~> 0.5.3) |
| 150 | - rack (1.3.5) | 166 | + pyu-ruby-sasl (0.0.3.3) |
| 167 | + rack (1.4.1) | ||
| 151 | rack-cache (1.1) | 168 | rack-cache (1.1) |
| 152 | rack (>= 0.4) | 169 | rack (>= 0.4) |
| 153 | - rack-mount (0.8.3) | ||
| 154 | - rack (>= 1.0.0) | ||
| 155 | - rack-protection (1.1.4) | 170 | + rack-protection (1.2.0) |
| 156 | rack | 171 | rack |
| 157 | rack-ssl (1.3.2) | 172 | rack-ssl (1.3.2) |
| 158 | rack | 173 | rack |
| 159 | rack-test (0.6.1) | 174 | rack-test (0.6.1) |
| 160 | rack (>= 1.0) | 175 | rack (>= 1.0) |
| 161 | - rails (3.1.1) | ||
| 162 | - actionmailer (= 3.1.1) | ||
| 163 | - actionpack (= 3.1.1) | ||
| 164 | - activerecord (= 3.1.1) | ||
| 165 | - activeresource (= 3.1.1) | ||
| 166 | - activesupport (= 3.1.1) | 176 | + rails (3.2.1) |
| 177 | + actionmailer (= 3.2.1) | ||
| 178 | + actionpack (= 3.2.1) | ||
| 179 | + activerecord (= 3.2.1) | ||
| 180 | + activeresource (= 3.2.1) | ||
| 181 | + activesupport (= 3.2.1) | ||
| 167 | bundler (~> 1.0) | 182 | bundler (~> 1.0) |
| 168 | - railties (= 3.1.1) | 183 | + railties (= 3.2.1) |
| 169 | rails-footnotes (3.7.5) | 184 | rails-footnotes (3.7.5) |
| 170 | rails (>= 3.0.0) | 185 | rails (>= 3.0.0) |
| 171 | - railties (3.1.1) | ||
| 172 | - actionpack (= 3.1.1) | ||
| 173 | - activesupport (= 3.1.1) | 186 | + railties (3.2.1) |
| 187 | + actionpack (= 3.2.1) | ||
| 188 | + activesupport (= 3.2.1) | ||
| 174 | rack-ssl (~> 1.3.2) | 189 | rack-ssl (~> 1.3.2) |
| 175 | rake (>= 0.8.7) | 190 | rake (>= 0.8.7) |
| 176 | rdoc (~> 3.4) | 191 | rdoc (~> 3.4) |
| 177 | thor (~> 0.14.6) | 192 | thor (~> 0.14.6) |
| 178 | rake (0.9.2.2) | 193 | rake (0.9.2.2) |
| 179 | rdiscount (1.6.8) | 194 | rdiscount (1.6.8) |
| 180 | - rdoc (3.11) | 195 | + rdoc (3.12) |
| 181 | json (~> 1.4) | 196 | json (~> 1.4) |
| 182 | redis (2.2.2) | 197 | redis (2.2.2) |
| 183 | redis-namespace (1.0.3) | 198 | redis-namespace (1.0.3) |
| 184 | redis (< 3.0.0) | 199 | redis (< 3.0.0) |
| 185 | - resque (1.19.0) | 200 | + resque (1.20.0) |
| 186 | multi_json (~> 1.0) | 201 | multi_json (~> 1.0) |
| 187 | redis-namespace (~> 1.0.2) | 202 | redis-namespace (~> 1.0.2) |
| 188 | sinatra (>= 0.9.2) | 203 | sinatra (>= 0.9.2) |
| 189 | vegas (~> 0.1.2) | 204 | vegas (~> 0.1.2) |
| 190 | - rspec (2.7.0) | ||
| 191 | - rspec-core (~> 2.7.0) | ||
| 192 | - rspec-expectations (~> 2.7.0) | ||
| 193 | - rspec-mocks (~> 2.7.0) | ||
| 194 | - rspec-core (2.7.1) | ||
| 195 | - rspec-expectations (2.7.0) | 205 | + rspec (2.8.0) |
| 206 | + rspec-core (~> 2.8.0) | ||
| 207 | + rspec-expectations (~> 2.8.0) | ||
| 208 | + rspec-mocks (~> 2.8.0) | ||
| 209 | + rspec-core (2.8.0) | ||
| 210 | + rspec-expectations (2.8.0) | ||
| 196 | diff-lcs (~> 1.1.2) | 211 | diff-lcs (~> 1.1.2) |
| 197 | - rspec-mocks (2.7.0) | ||
| 198 | - rspec-rails (2.7.0) | ||
| 199 | - actionpack (~> 3.0) | ||
| 200 | - activesupport (~> 3.0) | ||
| 201 | - railties (~> 3.0) | ||
| 202 | - rspec (~> 2.7.0) | ||
| 203 | - ruby-debug-base19 (0.11.25) | ||
| 204 | - columnize (>= 0.3.1) | ||
| 205 | - linecache19 (>= 0.5.11) | ||
| 206 | - ruby_core_source (>= 0.1.4) | ||
| 207 | - ruby-debug19 (0.11.6) | ||
| 208 | - columnize (>= 0.3.1) | ||
| 209 | - linecache19 (>= 0.5.11) | ||
| 210 | - ruby-debug-base19 (>= 0.11.19) | ||
| 211 | - ruby_core_source (0.1.5) | ||
| 212 | - archive-tar-minitar (>= 0.5.2) | 212 | + rspec-mocks (2.8.0) |
| 213 | + rspec-rails (2.8.1) | ||
| 214 | + actionpack (>= 3.0) | ||
| 215 | + activesupport (>= 3.0) | ||
| 216 | + railties (>= 3.0) | ||
| 217 | + rspec (~> 2.8.0) | ||
| 218 | + rubyntlm (0.1.1) | ||
| 213 | rubypython (0.5.3) | 219 | rubypython (0.5.3) |
| 214 | blankslate (>= 2.1.2.3) | 220 | blankslate (>= 2.1.2.3) |
| 215 | ffi (~> 1.0.7) | 221 | ffi (~> 1.0.7) |
| 216 | - rubyzip (0.9.4) | ||
| 217 | - sass (3.1.10) | ||
| 218 | - sass-rails (3.1.4) | ||
| 219 | - actionpack (~> 3.1.0) | ||
| 220 | - railties (~> 3.1.0) | ||
| 221 | - sass (>= 3.1.4) | ||
| 222 | - sprockets (~> 2.0.0) | ||
| 223 | - tilt (~> 1.3.2) | ||
| 224 | - seed-fu (2.1.0) | ||
| 225 | - activerecord (~> 3.1.0) | ||
| 226 | - activesupport (~> 3.1.0) | ||
| 227 | - selenium-webdriver (2.12.2) | ||
| 228 | - childprocess (>= 0.2.1) | 222 | + rubyzip (0.9.6.1) |
| 223 | + sass (3.1.15) | ||
| 224 | + sass-rails (3.2.3) | ||
| 225 | + railties (~> 3.2.0.beta) | ||
| 226 | + sass (>= 3.1.10) | ||
| 227 | + tilt (~> 1.3) | ||
| 228 | + seed-fu (2.2.0) | ||
| 229 | + activerecord (~> 3.1) | ||
| 230 | + activesupport (~> 3.1) | ||
| 231 | + selenium-webdriver (2.19.0) | ||
| 232 | + childprocess (>= 0.2.5) | ||
| 229 | ffi (~> 1.0.9) | 233 | ffi (~> 1.0.9) |
| 230 | - json_pure | 234 | + multi_json (~> 1.0.4) |
| 231 | rubyzip | 235 | rubyzip |
| 232 | - shoulda (3.0.0.beta2) | ||
| 233 | - shoulda-context (~> 1.0.0.beta1) | ||
| 234 | - shoulda-matchers (~> 1.0.0.beta1) | 236 | + shoulda (3.0.0) |
| 237 | + shoulda-context (~> 1.0.0) | ||
| 238 | + shoulda-matchers (~> 1.0.0) | ||
| 235 | shoulda-context (1.0.0) | 239 | shoulda-context (1.0.0) |
| 236 | shoulda-matchers (1.0.0) | 240 | shoulda-matchers (1.0.0) |
| 237 | simplecov (0.5.4) | 241 | simplecov (0.5.4) |
| 238 | multi_json (~> 1.0.3) | 242 | multi_json (~> 1.0.3) |
| 239 | simplecov-html (~> 0.5.3) | 243 | simplecov-html (~> 0.5.3) |
| 240 | simplecov-html (0.5.3) | 244 | simplecov-html (0.5.3) |
| 241 | - sinatra (1.3.1) | ||
| 242 | - rack (~> 1.3, >= 1.3.4) | ||
| 243 | - rack-protection (~> 1.1, >= 1.1.2) | 245 | + sinatra (1.3.2) |
| 246 | + rack (~> 1.3, >= 1.3.6) | ||
| 247 | + rack-protection (~> 1.2) | ||
| 244 | tilt (~> 1.3, >= 1.3.3) | 248 | tilt (~> 1.3, >= 1.3.3) |
| 245 | six (0.2.0) | 249 | six (0.2.0) |
| 246 | - sprockets (2.0.3) | 250 | + slop (2.4.4) |
| 251 | + sprockets (2.1.2) | ||
| 247 | hike (~> 1.2) | 252 | hike (~> 1.2) |
| 248 | rack (~> 1.0) | 253 | rack (~> 1.0) |
| 249 | tilt (~> 1.1, != 1.3.0) | 254 | tilt (~> 1.1, != 1.3.0) |
| 250 | - sqlite3 (1.3.4) | 255 | + sqlite3 (1.3.5) |
| 251 | stamp (0.1.6) | 256 | stamp (0.1.6) |
| 252 | term-ansicolor (1.0.7) | 257 | term-ansicolor (1.0.7) |
| 253 | therubyracer (0.9.9) | 258 | therubyracer (0.9.9) |
| @@ -261,17 +266,17 @@ GEM | @@ -261,17 +266,17 @@ GEM | ||
| 261 | treetop (1.4.10) | 266 | treetop (1.4.10) |
| 262 | polyglot | 267 | polyglot |
| 263 | polyglot (>= 0.3.1) | 268 | polyglot (>= 0.3.1) |
| 264 | - turn (0.8.3) | 269 | + turn (0.9.2) |
| 265 | ansi | 270 | ansi |
| 266 | tzinfo (0.3.31) | 271 | tzinfo (0.3.31) |
| 267 | - uglifier (1.1.0) | 272 | + uglifier (1.0.3) |
| 268 | execjs (>= 0.3.0) | 273 | execjs (>= 0.3.0) |
| 269 | multi_json (>= 1.0.2) | 274 | multi_json (>= 1.0.2) |
| 270 | - vegas (0.1.8) | 275 | + vegas (0.1.11) |
| 271 | rack (>= 1.0.0) | 276 | rack (>= 1.0.0) |
| 272 | warden (1.1.0) | 277 | warden (1.1.0) |
| 273 | rack (>= 1.0) | 278 | rack (>= 1.0) |
| 274 | - webmock (1.7.8) | 279 | + webmock (1.7.10) |
| 275 | addressable (~> 2.2, > 2.2.5) | 280 | addressable (~> 2.2, > 2.2.5) |
| 276 | crack (>= 0.1.7) | 281 | crack (>= 0.1.7) |
| 277 | xpath (0.1.4) | 282 | xpath (0.1.4) |
| @@ -287,12 +292,14 @@ DEPENDENCIES | @@ -287,12 +292,14 @@ DEPENDENCIES | ||
| 287 | autotest | 292 | autotest |
| 288 | autotest-rails | 293 | autotest-rails |
| 289 | awesome_print | 294 | awesome_print |
| 295 | + bootstrap-sass (= 1.4.4) | ||
| 290 | capybara | 296 | capybara |
| 291 | carrierwave | 297 | carrierwave |
| 292 | charlock_holmes | 298 | charlock_holmes |
| 293 | - coffee-rails (~> 3.1.0) | 299 | + coffee-rails (= 3.2.1) |
| 300 | + colored | ||
| 294 | database_cleaner | 301 | database_cleaner |
| 295 | - devise (= 1.5.0) | 302 | + devise |
| 296 | drapper | 303 | drapper |
| 297 | faker | 304 | faker |
| 298 | foreman | 305 | foreman |
| @@ -306,17 +313,18 @@ DEPENDENCIES | @@ -306,17 +313,18 @@ DEPENDENCIES | ||
| 306 | kaminari | 313 | kaminari |
| 307 | launchy | 314 | launchy |
| 308 | letter_opener | 315 | letter_opener |
| 316 | + omniauth-ldap | ||
| 317 | + pry | ||
| 309 | pygments.rb (= 0.2.4) | 318 | pygments.rb (= 0.2.4) |
| 310 | - rails (= 3.1.1) | ||
| 311 | - rails-footnotes (~> 3.7.5) | ||
| 312 | - rake (= 0.9.2.2) | 319 | + rails (= 3.2.1) |
| 320 | + rails-footnotes | ||
| 321 | + rake | ||
| 313 | rdiscount | 322 | rdiscount |
| 314 | - resque | 323 | + resque (~> 1.20.0) |
| 315 | rspec-rails | 324 | rspec-rails |
| 316 | - ruby-debug19 | ||
| 317 | - sass-rails (~> 3.1.0) | ||
| 318 | - seed-fu (~> 2.1.0) | ||
| 319 | - shoulda (~> 3.0.0.beta2) | 325 | + sass-rails (= 3.2.3) |
| 326 | + seed-fu | ||
| 327 | + shoulda (= 3.0.0) | ||
| 320 | simplecov | 328 | simplecov |
| 321 | six | 329 | six |
| 322 | sqlite3 | 330 | sqlite3 |
| @@ -324,5 +332,5 @@ DEPENDENCIES | @@ -324,5 +332,5 @@ DEPENDENCIES | ||
| 324 | therubyracer | 332 | therubyracer |
| 325 | thin | 333 | thin |
| 326 | turn | 334 | turn |
| 327 | - uglifier | 335 | + uglifier (= 1.0.3) |
| 328 | webmock | 336 | webmock |
Procfile.production
VERSION
app/assets/images/Gear-UI.PNG
940 Bytes
app/assets/images/Home-UI.PNG
782 Bytes
app/assets/images/Info-UI.PNG
556 Bytes
app/assets/images/blueprint_add.png
app/assets/images/blueprint_delete.png
1.16 KB
app/assets/images/help_commit.png
95.7 KB
app/assets/images/help_merge_request.png
54.5 KB
596 Bytes
7.71 KB
641 Bytes
app/assets/javascripts/application.js
| @@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
| 10 | //= require jquery.ui.selectmenu | 10 | //= require jquery.ui.selectmenu |
| 11 | //= require jquery.tagify | 11 | //= require jquery.tagify |
| 12 | //= require jquery.cookie | 12 | //= require jquery.cookie |
| 13 | +//= require jquery.endless-scroll | ||
| 14 | +//= require bootstrap-modal | ||
| 13 | //= require modernizr | 15 | //= require modernizr |
| 14 | //= require chosen | 16 | //= require chosen |
| 15 | //= require raphael | 17 | //= require raphael |
| @@ -21,9 +23,6 @@ $(document).ready(function(){ | @@ -21,9 +23,6 @@ $(document).ready(function(){ | ||
| 21 | $(this).select(); | 23 | $(this).select(); |
| 22 | }); | 24 | }); |
| 23 | 25 | ||
| 24 | - $('select#branch').selectmenu({style:'popup', width:200}); | ||
| 25 | - $('select#tag').selectmenu({style:'popup', width:200}); | ||
| 26 | - | ||
| 27 | $(".account-box").mouseenter(showMenu); | 26 | $(".account-box").mouseenter(showMenu); |
| 28 | $(".account-box").mouseleave(resetMenu); | 27 | $(".account-box").mouseleave(resetMenu); |
| 29 | 28 | ||
| @@ -43,6 +42,9 @@ $(document).ready(function(){ | @@ -43,6 +42,9 @@ $(document).ready(function(){ | ||
| 43 | } | 42 | } |
| 44 | }); | 43 | }); |
| 45 | 44 | ||
| 45 | + /** | ||
| 46 | + * Focus search field by pressing 's' key | ||
| 47 | + */ | ||
| 46 | $(document).keypress(function(e) { | 48 | $(document).keypress(function(e) { |
| 47 | if( $(e.target).is(":input") ) return; | 49 | if( $(e.target).is(":input") ) return; |
| 48 | switch(e.which) { | 50 | switch(e.which) { |
| @@ -50,27 +52,12 @@ $(document).ready(function(){ | @@ -50,27 +52,12 @@ $(document).ready(function(){ | ||
| 50 | e.preventDefault(); | 52 | e.preventDefault(); |
| 51 | } | 53 | } |
| 52 | }); | 54 | }); |
| 53 | - | ||
| 54 | }); | 55 | }); |
| 55 | 56 | ||
| 56 | function focusSearch() { | 57 | function focusSearch() { |
| 57 | $("#search").focus(); | 58 | $("#search").focus(); |
| 58 | } | 59 | } |
| 59 | 60 | ||
| 60 | -function taggifyForm(){ | ||
| 61 | - var tag_field = $('#tag_field').tagify(); | ||
| 62 | - | ||
| 63 | - tag_field.tagify('inputField').autocomplete({ | ||
| 64 | - source: '/tags.json' | ||
| 65 | - }); | ||
| 66 | - | ||
| 67 | - $('form').submit( function() { | ||
| 68 | - var tag_field = $('#tag_field') | ||
| 69 | - tag_field.val( tag_field.tagify('serialize') ); | ||
| 70 | - return true; | ||
| 71 | - }); | ||
| 72 | -} | ||
| 73 | - | ||
| 74 | function updatePage(data){ | 61 | function updatePage(data){ |
| 75 | $.ajax({type: "GET", url: location.href, data: data, dataType: "script"}); | 62 | $.ajax({type: "GET", url: location.href, data: data, dataType: "script"}); |
| 76 | } | 63 | } |
| @@ -82,5 +69,3 @@ function showMenu() { | @@ -82,5 +69,3 @@ function showMenu() { | ||
| 82 | function resetMenu() { | 69 | function resetMenu() { |
| 83 | $(this).removeClass("hover"); | 70 | $(this).removeClass("hover"); |
| 84 | } | 71 | } |
| 85 | - | ||
| 86 | - |
app/assets/javascripts/commits.js
| @@ -2,6 +2,7 @@ var CommitsList = { | @@ -2,6 +2,7 @@ var CommitsList = { | ||
| 2 | ref:null, | 2 | ref:null, |
| 3 | limit:0, | 3 | limit:0, |
| 4 | offset:0, | 4 | offset:0, |
| 5 | + disable:false, | ||
| 5 | 6 | ||
| 6 | init: | 7 | init: |
| 7 | function(ref, limit) { | 8 | function(ref, limit) { |
| @@ -36,15 +37,21 @@ var CommitsList = { | @@ -36,15 +37,21 @@ var CommitsList = { | ||
| 36 | $("#commits_list").append(html); | 37 | $("#commits_list").append(html); |
| 37 | if(count > 0) { | 38 | if(count > 0) { |
| 38 | this.offset += count; | 39 | this.offset += count; |
| 39 | - this.initLoadMore(); | 40 | + } else { |
| 41 | + this.disable = true; | ||
| 40 | } | 42 | } |
| 41 | }, | 43 | }, |
| 42 | 44 | ||
| 43 | initLoadMore: | 45 | initLoadMore: |
| 44 | function() { | 46 | function() { |
| 45 | - $(window).bind('scroll', function(){ | ||
| 46 | - if($(window).scrollTop() == $(document).height() - $(window).height()){ | ||
| 47 | - $(window).unbind('scroll'); | 47 | + $(document).endlessScroll({ |
| 48 | + bottomPixels: 400, | ||
| 49 | + fireDelay: 1000, | ||
| 50 | + fireOnce:true, | ||
| 51 | + ceaseFire: function() { | ||
| 52 | + return CommitsList.disable; | ||
| 53 | + }, | ||
| 54 | + callback: function(i) { | ||
| 48 | CommitsList.getOld(); | 55 | CommitsList.getOld(); |
| 49 | } | 56 | } |
| 50 | }); | 57 | }); |
app/assets/javascripts/issues.js
| 1 | function switchToNewIssue(form){ | 1 | function switchToNewIssue(form){ |
| 2 | - $("#issues-table-holder").hide("slide", { direction: "left" }, 150, function(){ | ||
| 3 | - $(".project-content").append(form); | 2 | + $(".issues_content").hide("fade", { direction: "left" }, 150, function(){ |
| 3 | + $(".issues_content").after(form); | ||
| 4 | $('select#issue_assignee_id').chosen(); | 4 | $('select#issue_assignee_id').chosen(); |
| 5 | - $("#new_issue_dialog").show("slide", { direction: "right" }, 150); | 5 | + $("#new_issue_dialog").show("fade", { direction: "right" }, 150); |
| 6 | + $('.top-tabs .add_new').hide(); | ||
| 6 | }); | 7 | }); |
| 7 | } | 8 | } |
| 8 | 9 | ||
| 9 | function switchToEditIssue(form){ | 10 | function switchToEditIssue(form){ |
| 10 | - $("#issues-table-holder").hide("slide", { direction: "left" }, 150, function(){ | ||
| 11 | - $(".project-content").append(form); | 11 | + $(".issues_content").hide("fade", { direction: "left" }, 150, function(){ |
| 12 | + $(".issues_content").after(form); | ||
| 12 | $('select#issue_assignee_id').chosen(); | 13 | $('select#issue_assignee_id').chosen(); |
| 13 | - $("#edit_issue_dialog").show("slide", { direction: "right" }, 150); | 14 | + $("#edit_issue_dialog").show("fade", { direction: "right" }, 150); |
| 15 | + $('.add_new').hide(); | ||
| 14 | }); | 16 | }); |
| 15 | } | 17 | } |
| 16 | 18 | ||
| @@ -23,10 +25,11 @@ function switchFromEditIssue(){ | @@ -23,10 +25,11 @@ function switchFromEditIssue(){ | ||
| 23 | } | 25 | } |
| 24 | 26 | ||
| 25 | function backToIssues(){ | 27 | function backToIssues(){ |
| 26 | - $("#edit_issue_dialog, #new_issue_dialog").hide("slide", { direction: "right" }, 150, function(){ | ||
| 27 | - $("#issues-table-holder").show("slide", { direction: "left" }, 150, function() { | 28 | + $("#edit_issue_dialog, #new_issue_dialog").hide("fade", { direction: "right" }, 150, function(){ |
| 29 | + $(".issues_content").show("fade", { direction: "left" }, 150, function() { | ||
| 28 | $("#edit_issue_dialog").remove(); | 30 | $("#edit_issue_dialog").remove(); |
| 29 | $("#new_issue_dialog").remove(); | 31 | $("#new_issue_dialog").remove(); |
| 32 | + $('.add_new').show(); | ||
| 30 | }); | 33 | }); |
| 31 | }); | 34 | }); |
| 32 | } | 35 | } |
app/assets/javascripts/merge_requests.js
| @@ -4,46 +4,27 @@ var MergeRequest = { | @@ -4,46 +4,27 @@ var MergeRequest = { | ||
| 4 | 4 | ||
| 5 | init: | 5 | init: |
| 6 | function() { | 6 | function() { |
| 7 | - $(".merge-tabs a").live("click", function() { | ||
| 8 | - $(".merge-tabs a").removeClass("active"); | ||
| 9 | - $(this).addClass("active"); | 7 | + $(".tabs a").live("click", function() { |
| 8 | + $(".tabs a").parent().removeClass("active"); | ||
| 9 | + $(this).parent().addClass("active"); | ||
| 10 | }); | 10 | }); |
| 11 | 11 | ||
| 12 | - $(".merge-tabs a.merge-notes-tab").live("click", function() { | ||
| 13 | - $(".merge-request-commits, .merge-request-diffs").hide(); | 12 | + $(".tabs a.merge-notes-tab").live("click", function(e) { |
| 13 | + $(".merge-request-diffs").hide(); | ||
| 14 | $(".merge-request-notes").show(); | 14 | $(".merge-request-notes").show(); |
| 15 | + e.preventDefault(); | ||
| 15 | }); | 16 | }); |
| 16 | 17 | ||
| 17 | - $(".merge-tabs a.merge-commits-tab").live("click", function() { | ||
| 18 | - if(!MergeRequest.commits_loaded) { | ||
| 19 | - MergeRequest.loadCommits(); | ||
| 20 | - } | ||
| 21 | - $(".merge-request-notes, .merge-request-diffs").hide(); | ||
| 22 | - $(".merge-request-commits").show(); | ||
| 23 | - }); | ||
| 24 | - | ||
| 25 | - $(".merge-tabs a.merge-diffs-tab").live("click", function() { | 18 | + $(".tabs a.merge-diffs-tab").live("click", function(e) { |
| 26 | if(!MergeRequest.diffs_loaded) { | 19 | if(!MergeRequest.diffs_loaded) { |
| 27 | MergeRequest.loadDiff(); | 20 | MergeRequest.loadDiff(); |
| 28 | } | 21 | } |
| 29 | - $(".merge-request-notes, .merge-request-commits").hide(); | 22 | + $(".merge-request-notes").hide(); |
| 30 | $(".merge-request-diffs").show(); | 23 | $(".merge-request-diffs").show(); |
| 24 | + e.preventDefault(); | ||
| 31 | }); | 25 | }); |
| 32 | }, | 26 | }, |
| 33 | 27 | ||
| 34 | - loadCommits: | ||
| 35 | - function() { | ||
| 36 | - $(".dashboard-loader").show(); | ||
| 37 | - $.ajax({ | ||
| 38 | - type: "GET", | ||
| 39 | - url: $(".merge-commits-tab").attr("data-url"), | ||
| 40 | - complete: function(){ | ||
| 41 | - MergeRequest.commits_loaded = true; | ||
| 42 | - $(".merge-request-notes, .merge-request-diffs").hide(); | ||
| 43 | - $(".dashboard-loader").hide()}, | ||
| 44 | - dataType: "script"}); | ||
| 45 | - }, | ||
| 46 | - | ||
| 47 | loadDiff: | 28 | loadDiff: |
| 48 | function() { | 29 | function() { |
| 49 | $(".dashboard-loader").show(); | 30 | $(".dashboard-loader").show(); |
| @@ -52,7 +33,7 @@ var MergeRequest = { | @@ -52,7 +33,7 @@ var MergeRequest = { | ||
| 52 | url: $(".merge-diffs-tab").attr("data-url"), | 33 | url: $(".merge-diffs-tab").attr("data-url"), |
| 53 | complete: function(){ | 34 | complete: function(){ |
| 54 | MergeRequest.diffs_loaded = true; | 35 | MergeRequest.diffs_loaded = true; |
| 55 | - $(".merge-request-notes, .merge-request-commits").hide(); | 36 | + $(".merge-request-notes").hide(); |
| 56 | $(".dashboard-loader").hide()}, | 37 | $(".dashboard-loader").hide()}, |
| 57 | dataType: "script"}); | 38 | dataType: "script"}); |
| 58 | } | 39 | } |
app/assets/javascripts/note.js
| 1 | var NoteList = { | 1 | var NoteList = { |
| 2 | 2 | ||
| 3 | +notes_path: null, | ||
| 4 | +target_params: null, | ||
| 5 | +target_id: 0, | ||
| 6 | +target_type: null, | ||
| 3 | first_id: 0, | 7 | first_id: 0, |
| 4 | last_id: 0, | 8 | last_id: 0, |
| 5 | -resource_name: null, | 9 | +disable:false, |
| 6 | 10 | ||
| 7 | init: | 11 | init: |
| 8 | - function(resource_name, first_id, last_id) { | ||
| 9 | - this.resource_name = resource_name; | ||
| 10 | - this.first_id = first_id; | ||
| 11 | - this.last_id = last_id; | 12 | + function(tid, tt, path) { |
| 13 | + this.notes_path = path + ".js"; | ||
| 14 | + this.target_id = tid; | ||
| 15 | + this.target_type = tt; | ||
| 16 | + this.target_params = "&target_type=" + this.target_type + "&target_id=" + this.target_id; | ||
| 17 | + | ||
| 18 | + // get notes | ||
| 19 | + this.getContent(); | ||
| 20 | + | ||
| 21 | + // get new notes every n seconds | ||
| 12 | this.initRefresh(); | 22 | this.initRefresh(); |
| 13 | - this.initLoadMore(); | ||
| 14 | - }, | ||
| 15 | 23 | ||
| 16 | -getOld: | ||
| 17 | - function() { | ||
| 18 | - $('.loading').show(); | ||
| 19 | - $.ajax({ | ||
| 20 | - type: "GET", | ||
| 21 | - url: location.href, | ||
| 22 | - data: "first_id=" + this.first_id, | ||
| 23 | - complete: function(){ $('.loading').hide()}, | ||
| 24 | - dataType: "script"}); | 24 | + $('.delete-note').live('ajax:success', function() { |
| 25 | + $(this).closest('li').fadeOut(); }); | ||
| 26 | + | ||
| 27 | + $("#new_note").live("ajax:before", function(){ | ||
| 28 | + $("#submit_note").attr("disabled", "disabled"); | ||
| 29 | + }) | ||
| 30 | + | ||
| 31 | + $("#new_note").live("ajax:complete", function(){ | ||
| 32 | + $("#submit_note").removeAttr("disabled"); | ||
| 33 | + }) | ||
| 34 | + | ||
| 35 | + $("#note_note").live("click", function(){ | ||
| 36 | + $(this).css("height", "100px"); | ||
| 37 | + $('.attach_holder').show(); | ||
| 38 | + }); | ||
| 39 | + | ||
| 25 | }, | 40 | }, |
| 26 | 41 | ||
| 27 | -append: | ||
| 28 | - function(id, html) { | ||
| 29 | - this.first_id = id; | ||
| 30 | - $("#notes-list").append(html); | ||
| 31 | - this.initLoadMore(); | 42 | + |
| 43 | +/** | ||
| 44 | + * Load new notes to fresh list called 'new_notes_list': | ||
| 45 | + * - Replace 'new_notes_list' with new list every n seconds | ||
| 46 | + * - Append new notes to this list after submit | ||
| 47 | + */ | ||
| 48 | + | ||
| 49 | +initRefresh: | ||
| 50 | + function() { | ||
| 51 | + // init timer | ||
| 52 | + var intNew = setInterval("NoteList.getNew()", 10000); | ||
| 32 | }, | 53 | }, |
| 33 | 54 | ||
| 34 | replace: | 55 | replace: |
| 35 | - function(fid, lid, html) { | ||
| 36 | - this.first_id = fid; | ||
| 37 | - this.last_id = lid; | ||
| 38 | - $("#notes-list").html(html); | ||
| 39 | - this.initLoadMore(); | 56 | + function(html) { |
| 57 | + $("#new_notes_list").html(html); | ||
| 40 | }, | 58 | }, |
| 41 | 59 | ||
| 42 | prepend: | 60 | prepend: |
| 43 | function(id, html) { | 61 | function(id, html) { |
| 44 | if(id != this.last_id) { | 62 | if(id != this.last_id) { |
| 45 | - this.last_id = id; | ||
| 46 | - $("#notes-list").prepend(html); | 63 | + $("#new_notes_list").prepend(html); |
| 47 | } | 64 | } |
| 48 | }, | 65 | }, |
| 49 | 66 | ||
| @@ -52,8 +69,8 @@ getNew: | @@ -52,8 +69,8 @@ getNew: | ||
| 52 | // refersh notes list | 69 | // refersh notes list |
| 53 | $.ajax({ | 70 | $.ajax({ |
| 54 | type: "GET", | 71 | type: "GET", |
| 55 | - url: location.href, | ||
| 56 | - data: "last_id=" + this.last_id, | 72 | + url: this.notes_path, |
| 73 | + data: "last_id=" + this.last_id + this.target_params, | ||
| 57 | dataType: "script"}); | 74 | dataType: "script"}); |
| 58 | }, | 75 | }, |
| 59 | 76 | ||
| @@ -62,25 +79,85 @@ refresh: | @@ -62,25 +79,85 @@ refresh: | ||
| 62 | // refersh notes list | 79 | // refersh notes list |
| 63 | $.ajax({ | 80 | $.ajax({ |
| 64 | type: "GET", | 81 | type: "GET", |
| 65 | - url: location.href, | ||
| 66 | - data: "first_id=" + this.first_id + "&last_id=" + this.last_id, | 82 | + url: this.notes_path, |
| 83 | + data: "first_id=" + this.first_id + "&last_id=" + this.last_id + this.target_params, | ||
| 67 | dataType: "script"}); | 84 | dataType: "script"}); |
| 68 | }, | 85 | }, |
| 69 | 86 | ||
| 70 | -initRefresh: | 87 | + |
| 88 | +/** | ||
| 89 | + * Init load of notes: | ||
| 90 | + * 1. Get content with ajax call | ||
| 91 | + * 2. Set content of notes list with loaded one | ||
| 92 | + */ | ||
| 93 | + | ||
| 94 | + | ||
| 95 | +getContent: | ||
| 96 | + function() { | ||
| 97 | + $.ajax({ | ||
| 98 | + type: "GET", | ||
| 99 | + url: this.notes_path, | ||
| 100 | + data: "?" + this.target_params, | ||
| 101 | + complete: function(){ $('.status').removeClass("loading")}, | ||
| 102 | + beforeSend: function() { $('.status').addClass("loading") }, | ||
| 103 | + dataType: "script"}); | ||
| 104 | + }, | ||
| 105 | + | ||
| 106 | +setContent: | ||
| 107 | + function(fid, lid, html) { | ||
| 108 | + this.last_id = lid; | ||
| 109 | + this.first_id = fid; | ||
| 110 | + $("#notes-list").html(html); | ||
| 111 | + | ||
| 112 | + // Init infinite scrolling | ||
| 113 | + this.initLoadMore(); | ||
| 114 | + }, | ||
| 115 | + | ||
| 116 | + | ||
| 117 | +/** | ||
| 118 | + * Paging for old notes when scroll to bottom: | ||
| 119 | + * 1. Init scroll events with 'initLoadMore' | ||
| 120 | + * 2. Load onlder notes with 'getOld' method | ||
| 121 | + * 3. append old notes to bottom of list with 'append' | ||
| 122 | + * | ||
| 123 | + */ | ||
| 124 | + | ||
| 125 | + | ||
| 126 | +getOld: | ||
| 71 | function() { | 127 | function() { |
| 72 | - // init timer | ||
| 73 | - var intNew = setInterval("NoteList.getNew()", 15000); | ||
| 74 | - var intRefresh = setInterval("NoteList.refresh()", 90000); | 128 | + $('.loading').show(); |
| 129 | + $.ajax({ | ||
| 130 | + type: "GET", | ||
| 131 | + url: this.notes_path, | ||
| 132 | + data: "first_id=" + this.first_id + this.target_params, | ||
| 133 | + complete: function(){ $('.status').removeClass("loading")}, | ||
| 134 | + beforeSend: function() { $('.status').addClass("loading") }, | ||
| 135 | + dataType: "script"}); | ||
| 136 | + }, | ||
| 137 | + | ||
| 138 | +append: | ||
| 139 | + function(id, html) { | ||
| 140 | + if(this.first_id == id) { | ||
| 141 | + this.disable = true; | ||
| 142 | + } else { | ||
| 143 | + this.first_id = id; | ||
| 144 | + $("#notes-list").append(html); | ||
| 145 | + } | ||
| 75 | }, | 146 | }, |
| 76 | 147 | ||
| 148 | + | ||
| 77 | initLoadMore: | 149 | initLoadMore: |
| 78 | function() { | 150 | function() { |
| 79 | - $(window).bind('scroll', function(){ | ||
| 80 | - if($(window).scrollTop() == $(document).height() - $(window).height()){ | ||
| 81 | - $(window).unbind('scroll'); | 151 | + $(document).endlessScroll({ |
| 152 | + bottomPixels: 400, | ||
| 153 | + fireDelay: 1000, | ||
| 154 | + fireOnce:true, | ||
| 155 | + ceaseFire: function() { | ||
| 156 | + return NoteList.disable; | ||
| 157 | + }, | ||
| 158 | + callback: function(i) { | ||
| 82 | NoteList.getOld(); | 159 | NoteList.getOld(); |
| 83 | } | 160 | } |
| 84 | - }); | 161 | + }); |
| 85 | } | 162 | } |
| 86 | } | 163 | } |
| @@ -0,0 +1,50 @@ | @@ -0,0 +1,50 @@ | ||
| 1 | +var Pager = { | ||
| 2 | + limit:0, | ||
| 3 | + offset:0, | ||
| 4 | + disable:false, | ||
| 5 | + | ||
| 6 | + init: | ||
| 7 | + function(limit) { | ||
| 8 | + this.limit=limit; | ||
| 9 | + this.offset=limit; | ||
| 10 | + this.initLoadMore(); | ||
| 11 | + $('.loading').show(); | ||
| 12 | + }, | ||
| 13 | + | ||
| 14 | + getOld: | ||
| 15 | + function() { | ||
| 16 | + $('.loading').show(); | ||
| 17 | + $.ajax({ | ||
| 18 | + type: "GET", | ||
| 19 | + url: location.href, | ||
| 20 | + data: "limit=" + this.limit + "&offset=" + this.offset, | ||
| 21 | + complete: function(){ $('.loading').hide()}, | ||
| 22 | + dataType: "script"}); | ||
| 23 | + }, | ||
| 24 | + | ||
| 25 | + append: | ||
| 26 | + function(count, html) { | ||
| 27 | + $(".content_list").append(html); | ||
| 28 | + if(count > 0) { | ||
| 29 | + this.offset += count; | ||
| 30 | + } else { | ||
| 31 | + this.disable = true; | ||
| 32 | + } | ||
| 33 | + }, | ||
| 34 | + | ||
| 35 | + initLoadMore: | ||
| 36 | + function() { | ||
| 37 | + $(document).endlessScroll({ | ||
| 38 | + bottomPixels: 400, | ||
| 39 | + fireDelay: 1000, | ||
| 40 | + fireOnce:true, | ||
| 41 | + ceaseFire: function() { | ||
| 42 | + return Pager.disable; | ||
| 43 | + }, | ||
| 44 | + callback: function(i) { | ||
| 45 | + $('.loading').show(); | ||
| 46 | + Pager.getOld(); | ||
| 47 | + } | ||
| 48 | + }); | ||
| 49 | + } | ||
| 50 | +} |
app/assets/javascripts/projects.js
| @@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
| 1 | -var ProjectsList = { | ||
| 2 | - limit:0, | ||
| 3 | - offset:0, | ||
| 4 | - | ||
| 5 | - init: | ||
| 6 | - function(limit) { | ||
| 7 | - this.limit=limit; | ||
| 8 | - this.offset=limit; | ||
| 9 | - this.initLoadMore(); | ||
| 10 | - }, | ||
| 11 | - | ||
| 12 | - getOld: | ||
| 13 | - function() { | ||
| 14 | - $('.loading').show(); | ||
| 15 | - $.ajax({ | ||
| 16 | - type: "GET", | ||
| 17 | - url: location.href, | ||
| 18 | - data: "limit=" + this.limit + "&offset=" + this.offset, | ||
| 19 | - complete: function(){ $('.loading').hide()}, | ||
| 20 | - dataType: "script"}); | ||
| 21 | - }, | ||
| 22 | - | ||
| 23 | - append: | ||
| 24 | - function(count, html) { | ||
| 25 | - $(".tile").append(html); | ||
| 26 | - if(count > 0) { | ||
| 27 | - this.offset += count; | ||
| 28 | - this.initLoadMore(); | ||
| 29 | - } | ||
| 30 | - }, | ||
| 31 | - | ||
| 32 | - initLoadMore: | ||
| 33 | - function() { | ||
| 34 | - $(window).bind('scroll', function(){ | ||
| 35 | - if($(window).scrollTop() == $(document).height() - $(window).height()){ | ||
| 36 | - $(window).unbind('scroll'); | ||
| 37 | - $('.loading').show(); | ||
| 38 | - ProjectsList.getOld(); | ||
| 39 | - } | ||
| 40 | - }); | ||
| 41 | - } | ||
| 42 | -} |
app/assets/javascripts/team.js
| 1 | function backToMembers(){ | 1 | function backToMembers(){ |
| 2 | - $("#team_member_new").hide("slide", { direction: "right" }, 150, function(){ | 2 | + $("#new_team_member").hide("slide", { direction: "right" }, 150, function(){ |
| 3 | $("#team-table").show("slide", { direction: "left" }, 150, function() { | 3 | $("#team-table").show("slide", { direction: "left" }, 150, function() { |
| 4 | - $("#team_member_new").remove(); | 4 | + $("#new_team_member").remove(); |
| 5 | $(".add_new").show(); | 5 | $(".add_new").show(); |
| 6 | }); | 6 | }); |
| 7 | }); | 7 | }); |
app/assets/javascripts/tree.js
| @@ -5,21 +5,24 @@ | @@ -5,21 +5,24 @@ | ||
| 5 | var Tree = { | 5 | var Tree = { |
| 6 | init: | 6 | init: |
| 7 | function() { | 7 | function() { |
| 8 | - (new Image).src = "ajax-loader-facebook.gif"; | ||
| 9 | - | ||
| 10 | - $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() { | ||
| 11 | - history.pushState({ path: this.path }, '', this.href) | 8 | + $('#tree-slider .tree-item-file-name a, .breadcrumb li > a').live("click", function() { |
| 12 | $("#tree-content-holder").hide("slide", { direction: "left" }, 150) | 9 | $("#tree-content-holder").hide("slide", { direction: "left" }, 150) |
| 13 | }) | 10 | }) |
| 14 | 11 | ||
| 15 | - $("#tree-slider tr.tree-item").live('click', function(e){ | 12 | + $('.project-refs-form').live({ |
| 13 | + "ajax:beforeSend": function() { | ||
| 14 | + $("#tree-content-holder").hide("slide", { direction: "left" }, 150); | ||
| 15 | + } | ||
| 16 | + }) | ||
| 17 | + | ||
| 18 | + $("#tree-slider .tree-item").live('click', function(e){ | ||
| 16 | if(e.target.nodeName != "A") { | 19 | if(e.target.nodeName != "A") { |
| 17 | - link = $(this).find("td.tree-item-file-name a"); | 20 | + link = $(this).find(".tree-item-file-name a"); |
| 18 | link.trigger("click"); | 21 | link.trigger("click"); |
| 19 | } | 22 | } |
| 20 | }); | 23 | }); |
| 21 | 24 | ||
| 22 | - $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live({ | 25 | + $('#tree-slider .tree-item-file-name a, .breadcrumb a, .project-refs-form').live({ |
| 23 | "ajax:beforeSend": function() { $('.tree_progress').addClass("loading"); }, | 26 | "ajax:beforeSend": function() { $('.tree_progress').addClass("loading"); }, |
| 24 | "ajax:complete": function() { $('.tree_progress').removeClass("loading"); } | 27 | "ajax:complete": function() { $('.tree_progress').removeClass("loading"); } |
| 25 | }); | 28 | }); |
app/assets/stylesheets/application.css
app/assets/stylesheets/commits.css.scss
| @@ -1,191 +0,0 @@ | @@ -1,191 +0,0 @@ | ||
| 1 | -/* Commit Page */ | ||
| 2 | -body.project-page.commits-page .commit-info{float: right;} | ||
| 3 | -body.project-page.commits-page .commit-info data{ | ||
| 4 | - padding: 4px 10px; | ||
| 5 | - font-size: 11px; | ||
| 6 | -} | ||
| 7 | -body.project-page.commits-page .commit-info data.commit-button{ | ||
| 8 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4)); | ||
| 9 | - background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 10 | - background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 11 | - background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 12 | - box-shadow: 0 -1px 0 white inset; | ||
| 13 | - display: block; | ||
| 14 | - border: 1px solid #eee; | ||
| 15 | - border-radius: 5px; | ||
| 16 | - margin-bottom: 2px; | ||
| 17 | - position: relative; | ||
| 18 | - padding-right: 20px; | ||
| 19 | -} | ||
| 20 | - | ||
| 21 | -body.project-page.commits-page .commit-button i{ | ||
| 22 | - background: url('images.png') no-repeat -138px -27px; | ||
| 23 | - width: 6px; | ||
| 24 | - height: 9px; | ||
| 25 | - float: right; | ||
| 26 | - position: absolute; | ||
| 27 | - top: 6px; | ||
| 28 | - right: 5px; | ||
| 29 | -} | ||
| 30 | -body.project-page.commits-page .commits-date {display: block; width: 100%; margin-bottom: 20px} | ||
| 31 | -body.project-page.commits-page .commits-date .data {padding: 0} | ||
| 32 | -body.project-page.commits-page a.commit{padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | ||
| 33 | -body.project-page.commits-page .commits-date a.commit {padding: 10px; border-bottom: none; overflow: hidden; display: block;} | ||
| 34 | -body.project-page.commits-page .commits-date a.commit:last-child{border-bottom: 0} | ||
| 35 | -body.project-page.commits-page .commits-date a.commit img{float: left; margin-right: 10px;} | ||
| 36 | -body.project-page.commits-page .commits-date a.commit span.commit-title{display: block;} | ||
| 37 | -body.project-page.commits-page .commits-date a.commit span.commit-title{margin-bottom: 10px} | ||
| 38 | -body.project-page.commits-page .commits-date a.commit span.commit-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 39 | -body.project-page.commits-page .commits-date a.commit span.commit-author strong{font-weight: bold; font-style: normal;} | ||
| 40 | - | ||
| 41 | -/* eo Commit Page */ | ||
| 42 | -/** Commit diff view **/ | ||
| 43 | -.diff_file { | ||
| 44 | - border:1px solid #CCC; | ||
| 45 | - margin-bottom:1em; | ||
| 46 | - | ||
| 47 | - .diff_file_header { | ||
| 48 | - padding:5px 5px; | ||
| 49 | - border-bottom:1px solid #CCC; | ||
| 50 | - background: #eee; | ||
| 51 | - } | ||
| 52 | - .diff_file_content { | ||
| 53 | - overflow:auto; | ||
| 54 | - overflow-y:hidden; | ||
| 55 | - background:#fff; | ||
| 56 | - color:#333; | ||
| 57 | - font-size: 12px; | ||
| 58 | - font-family: 'Courier New', 'andale mono','lucida console',monospace; | ||
| 59 | - } | ||
| 60 | - .diff_file_content_image { | ||
| 61 | - background:#eee; | ||
| 62 | - text-align:center; | ||
| 63 | - img { | ||
| 64 | - padding:100px; | ||
| 65 | - max-width:300px; | ||
| 66 | - } | ||
| 67 | - } | ||
| 68 | -} | ||
| 69 | - | ||
| 70 | -.diff_file_content{ | ||
| 71 | - table { | ||
| 72 | - border:none; | ||
| 73 | - margin:0px; | ||
| 74 | - padding:0px; | ||
| 75 | - } | ||
| 76 | - .old_line, .new_line { | ||
| 77 | - margin:0px; | ||
| 78 | - padding:0px; | ||
| 79 | - border:none; | ||
| 80 | - background:#F7F7F7; | ||
| 81 | - color:#aaa; | ||
| 82 | - padding: 0px 5px; | ||
| 83 | - border-right: 1px solid #ccc; | ||
| 84 | - text-align:right; | ||
| 85 | - min-width:35px; | ||
| 86 | - max-width:35px; | ||
| 87 | - width:35px; | ||
| 88 | - a { | ||
| 89 | - float:left; | ||
| 90 | - width:35px; | ||
| 91 | - font-weight:normal; | ||
| 92 | - color:#aaa; | ||
| 93 | - &:hover { | ||
| 94 | - text-decoration:underline; | ||
| 95 | - } | ||
| 96 | - } | ||
| 97 | - } | ||
| 98 | - .line_content { | ||
| 99 | - white-space:pre; | ||
| 100 | - height:14px; | ||
| 101 | - margin:0px; | ||
| 102 | - padding:0px; | ||
| 103 | - border:none; | ||
| 104 | - &.new { | ||
| 105 | - background: #DFD; | ||
| 106 | - } | ||
| 107 | - &.old { | ||
| 108 | - background: #FDD; | ||
| 109 | - } | ||
| 110 | - } | ||
| 111 | -} | ||
| 112 | - | ||
| 113 | -pre.commit_message { | ||
| 114 | - white-space: pre-wrap; | ||
| 115 | - font-family: "Helvetica", sans-serif; | ||
| 116 | - color: #555; | ||
| 117 | - font-weight:bold; | ||
| 118 | - font-size:15px; | ||
| 119 | -} | ||
| 120 | - | ||
| 121 | -/** COMMIT BLOCK **/ | ||
| 122 | -.commit-title{display: block;} | ||
| 123 | -.commit-title{margin-bottom: 10px} | ||
| 124 | -.commit-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 125 | -.commit-author strong{font-weight: bold; font-style: normal;} | ||
| 126 | - | ||
| 127 | -/** bordered list **/ | ||
| 128 | -ul.bordered-list { | ||
| 129 | - margin:5px 0px; | ||
| 130 | - padding:0px; | ||
| 131 | - li { | ||
| 132 | - padding: 5px 0; | ||
| 133 | - border-bottom: 1px solid #EEE; | ||
| 134 | - overflow: hidden; | ||
| 135 | - display: block; | ||
| 136 | - margin:0px; | ||
| 137 | - } | ||
| 138 | -} | ||
| 139 | - | ||
| 140 | -ul.bordered-list li:last-child { border:none } | ||
| 141 | - | ||
| 142 | -.line_holder { | ||
| 143 | - &:hover { | ||
| 144 | - td { | ||
| 145 | - background: #FFFFCF !important; | ||
| 146 | - } | ||
| 147 | - } | ||
| 148 | -} | ||
| 149 | - | ||
| 150 | -.per_line_form { | ||
| 151 | - font-family: "Helvetica", sans-serif; | ||
| 152 | - background: #2FA0BB; | ||
| 153 | - | ||
| 154 | - td { | ||
| 155 | - padding:0; | ||
| 156 | - } | ||
| 157 | - | ||
| 158 | - form { | ||
| 159 | - margin:5px; | ||
| 160 | - width: 756px; | ||
| 161 | - border: 1px solid #CCC; | ||
| 162 | - padding: 20px; | ||
| 163 | - background: white; | ||
| 164 | - } | ||
| 165 | -} | ||
| 166 | - | ||
| 167 | - | ||
| 168 | -tr.line_notes_row { | ||
| 169 | - font-family: "Helvetica", sans-serif; | ||
| 170 | - &:hover { | ||
| 171 | - background:none; | ||
| 172 | - } | ||
| 173 | - td { | ||
| 174 | - margin:0px; | ||
| 175 | - padding:0px; | ||
| 176 | - border-bottom:1px solid #DEE2E3; | ||
| 177 | - | ||
| 178 | - | ||
| 179 | - ul { | ||
| 180 | - display:block; | ||
| 181 | - list-style:none; | ||
| 182 | - margin:0px; | ||
| 183 | - padding:0px; | ||
| 184 | - | ||
| 185 | - li { | ||
| 186 | - border-top:1px solid #DEE2E3; | ||
| 187 | - padding:10px; | ||
| 188 | - } | ||
| 189 | - } | ||
| 190 | - } | ||
| 191 | -} |
app/assets/stylesheets/common.scss
| 1 | -$text_color:#222; | ||
| 2 | -$lite_text_color: #666; | ||
| 3 | -$link_color:#111; | ||
| 4 | -$active_link_color:#2FA0BB; | ||
| 5 | -$active_bg_color:#79C3E0; | ||
| 6 | -$active_bd_color: #2FA0BB; | ||
| 7 | -$border_color:#CCC; | ||
| 8 | -$lite_border_color:#EEE; | ||
| 9 | -$app_width:980px; | ||
| 10 | -$app_padding:20px; | ||
| 11 | -$bg_color: #FFF; | ||
| 12 | -$styled_border_color: #2FA0BB; | ||
| 13 | - | ||
| 14 | -/** MIXINS **/ | ||
| 15 | -@mixin round-borders-bottom($radius) { | ||
| 16 | - border-top: 1px solid #eaeaea; | ||
| 17 | - -moz-border-radius-bottomright: $radius; | ||
| 18 | - -moz-border-radius-bottomleft: $radius; | ||
| 19 | - border-bottom-right-radius: $radius; | ||
| 20 | - border-bottom-left-radius: $radius; | ||
| 21 | - -webkit-border-bottom-left-radius: $radius; | ||
| 22 | - -webkit-border-bottom-right-radius: $radius; | ||
| 23 | -} | ||
| 24 | - | ||
| 25 | -@mixin round-borders-top($radius) { | ||
| 26 | - border-top: 1px solid #eaeaea; | ||
| 27 | - -moz-border-radius-topright: $radius; | ||
| 28 | - -moz-border-radius-topleft: $radius; | ||
| 29 | - border-top-right-radius: $radius; | ||
| 30 | - border-top-left-radius: $radius; | ||
| 31 | - -webkit-border-top-left-radius: $radius; | ||
| 32 | - -webkit-border-top-right-radius: $radius; | ||
| 33 | -} | ||
| 34 | - | ||
| 35 | -@mixin round-borders-all($radius) { | ||
| 36 | - border: 1px solid #eaeaea; | ||
| 37 | - -moz-border-radius: $radius; | ||
| 38 | - -webkit-border-radius: $radius; | ||
| 39 | - border-radius: $radius; | 1 | +a { |
| 2 | + color: $link_color; | ||
| 3 | + &:hover { | ||
| 4 | + text-decoration:none; | ||
| 5 | + color: $style_color; | ||
| 6 | + } | ||
| 7 | + | ||
| 8 | + &.btn { | ||
| 9 | + color: $style_color; | ||
| 10 | + } | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +.vlink { | ||
| 14 | + color: $link_color !important; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +.pills a:hover { | ||
| 18 | + background-color:#ccc; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +.pills .active a { | ||
| 22 | + background-color: #aaa; | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +.label { | ||
| 26 | + background-color: #474D57; | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +.tabs > li > a, .pills > li > a { | ||
| 30 | + color:$style_color; | ||
| 31 | +} | ||
| 32 | + | ||
| 33 | +.diff_file_header a, | ||
| 34 | +.file_stats a { | ||
| 35 | + color:$style_color; | ||
| 40 | } | 36 | } |
| 41 | 37 | ||
| 42 | /** COLORS **/ | 38 | /** COLORS **/ |
| 43 | .cgray { color:gray; } | 39 | .cgray { color:gray; } |
| 44 | .cred { color:#D12F19; } | 40 | .cred { color:#D12F19; } |
| 45 | .cgreen { color:#44aa22; } | 41 | .cgreen { color:#44aa22; } |
| 42 | +.cblack { color:#111; } | ||
| 43 | +.cwhite { color:#fff !important } | ||
| 46 | 44 | ||
| 47 | /** COMMON STYLES **/ | 45 | /** COMMON STYLES **/ |
| 48 | .left { | 46 | .left { |
| 49 | float:left; | 47 | float:left; |
| 50 | } | 48 | } |
| 51 | .right { | 49 | .right { |
| 52 | - float:right; | 50 | + float:right !important; |
| 53 | } | 51 | } |
| 54 | .width-50p{ | 52 | .width-50p{ |
| 55 | width:50%; | 53 | width:50%; |
| @@ -78,38 +76,559 @@ $styled_border_color: #2FA0BB; | @@ -78,38 +76,559 @@ $styled_border_color: #2FA0BB; | ||
| 78 | .no-borders { | 76 | .no-borders { |
| 79 | border:none; | 77 | border:none; |
| 80 | } | 78 | } |
| 79 | +table.no-borders { | ||
| 80 | + border:none; | ||
| 81 | + tr, td { border:none } | ||
| 82 | +} | ||
| 81 | .no-padding { | 83 | .no-padding { |
| 82 | padding:0 !important; | 84 | padding:0 !important; |
| 83 | } | 85 | } |
| 86 | +.underlined { | ||
| 87 | + border-bottom: 1px solid $border_color; | ||
| 88 | +} | ||
| 84 | 89 | ||
| 85 | -/* General */ | 90 | +/** LAYOUT **/ |
| 86 | 91 | ||
| 87 | -body.collapsed { | ||
| 88 | - background-color: $bg_color; | 92 | +.container { |
| 93 | + width:$min_app_width; | ||
| 94 | + padding-top:0; | ||
| 95 | + z-index:5; | ||
| 96 | +} | ||
| 89 | 97 | ||
| 90 | - #container{ | ||
| 91 | - margin: auto; | ||
| 92 | - margin-top:51px; | ||
| 93 | - width: $app_width; | ||
| 94 | - border-top: 0; | ||
| 95 | - background-color: $bg_color; | 98 | +.container .content { |
| 99 | + margin:0 $app_padding; | ||
| 100 | +} | ||
| 101 | + | ||
| 102 | +.container .sidebar { | ||
| 103 | + width: 200px; | ||
| 104 | + height:100%; | ||
| 105 | + min-height:450px; | ||
| 106 | + float:right; | ||
| 107 | +} | ||
| 108 | + | ||
| 109 | +img.avatar { | ||
| 110 | + float:left; | ||
| 111 | + margin-right:15px; | ||
| 112 | + width:40px; | ||
| 113 | + -webkit-border-radius: 4px; | ||
| 114 | + -moz-border-radius: 4px; | ||
| 115 | + border-radius: 4px; | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +img.lil_av { | ||
| 119 | + padding-left: 5px; | ||
| 120 | + position: relative; | ||
| 121 | + top: 3px; | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +.media-grid { | ||
| 125 | + h3, h2 , h4 { | ||
| 126 | + &.media_h { | ||
| 127 | + padding-left:10px; | ||
| 128 | + float:left; | ||
| 129 | + } | ||
| 96 | } | 130 | } |
| 97 | } | 131 | } |
| 98 | 132 | ||
| 99 | -a { | 133 | +.wll { |
| 134 | + background-color: #FFF; | ||
| 135 | + padding: 10px 5px; | ||
| 136 | + min-height: 20px; | ||
| 137 | + border-bottom: 1px solid #eee; | ||
| 138 | + border-bottom: 1px solid rgba(0, 0, 0, 0.05); | ||
| 139 | + cursor:pointer; | ||
| 140 | + &:hover { | ||
| 141 | + background:$hover; | ||
| 142 | + } | ||
| 143 | + &:last-child { border:none } | ||
| 144 | + p { padding-top:5px; margin:0; color:$style_color;} | ||
| 145 | + .author { color: #999; } | ||
| 146 | + p { | ||
| 147 | + color:#222; | ||
| 148 | + margin-bottom: 0; | ||
| 149 | + img { | ||
| 150 | + position:relative; | ||
| 151 | + top:3px; | ||
| 152 | + } | ||
| 153 | + } | ||
| 154 | +} | ||
| 155 | + | ||
| 156 | +.visible_link, | ||
| 157 | +.author_link { | ||
| 100 | color: $link_color; | 158 | color: $link_color; |
| 101 | } | 159 | } |
| 160 | +.entry { | ||
| 161 | + position: relative; | ||
| 162 | + padding: 7px 15px; | ||
| 163 | + margin-bottom: 18px; | ||
| 164 | + color: #404040; | ||
| 165 | + filter:none; | ||
| 166 | + | ||
| 167 | + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); | ||
| 168 | + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); | ||
| 169 | + | ||
| 170 | + -webkit-border-radius: 4px; | ||
| 171 | + -moz-border-radius: 4px; | ||
| 172 | + border-radius: 4px; | ||
| 173 | + | ||
| 174 | + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); | ||
| 175 | + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); | ||
| 176 | + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); | ||
| 177 | + | ||
| 178 | + background:#F1F1F1; | ||
| 179 | + border: 1px solid #ccc; | ||
| 180 | + | ||
| 181 | + | ||
| 182 | + p { | ||
| 183 | + color:$style_color; | ||
| 184 | + margin-bottom: 0; | ||
| 185 | + img { | ||
| 186 | + position:relative; | ||
| 187 | + top:3px; | ||
| 188 | + } | ||
| 189 | + } | ||
| 190 | +} | ||
| 191 | + | ||
| 192 | +.widget { | ||
| 193 | + @include shade; | ||
| 194 | + padding:20px; | ||
| 195 | + margin-bottom:20px; | ||
| 196 | + border: 1px solid #DDD; | ||
| 197 | + border-radius: 5px; | ||
| 198 | + background:#fafafa; | ||
| 199 | + | ||
| 200 | + .link_holder { | ||
| 201 | + background:#eee; | ||
| 202 | + position:relative; | ||
| 203 | + left:-20px; | ||
| 204 | + top:20px; | ||
| 205 | + padding:10px 20px; | ||
| 206 | + width:100%; | ||
| 207 | + border-top:1px solid #ccc; | ||
| 208 | + | ||
| 209 | + a { | ||
| 210 | + font-size:14px; | ||
| 211 | + color:#666; | ||
| 212 | + } | ||
| 213 | + } | ||
| 214 | +} | ||
| 215 | + | ||
| 216 | + | ||
| 217 | +.ui-box { | ||
| 218 | + margin-bottom: 40px; | ||
| 219 | + @include round-borders-all(4px); | ||
| 220 | + @include shade; | ||
| 221 | + border-color:#ddd; | ||
| 222 | + | ||
| 223 | + ul { | ||
| 224 | + margin:0; | ||
| 225 | + } | ||
| 226 | + | ||
| 227 | + h5, .title { | ||
| 228 | + padding: 0 10px; | ||
| 229 | + background:#f5f5f5; | ||
| 230 | + border-bottom: 1px solid #eee; | ||
| 231 | + @include round-borders-top(4px); | ||
| 232 | + border-top:none; | ||
| 233 | + | ||
| 234 | + form { | ||
| 235 | + padding-top:16px; | ||
| 236 | + } | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + .row_title { | ||
| 240 | + font-weight:bold; | ||
| 241 | + color:#444; | ||
| 242 | + &:hover { | ||
| 243 | + text-decoration:underline; | ||
| 244 | + } | ||
| 245 | + } | ||
| 246 | + | ||
| 247 | + li, .wll { | ||
| 248 | + padding:10px; | ||
| 249 | + &:first-child { | ||
| 250 | + @include round-borders-top(4px); | ||
| 251 | + border-top:none; | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + &:last-child { | ||
| 255 | + @include round-borders-bottom(4px); | ||
| 256 | + border:none; | ||
| 257 | + } | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | +} | ||
| 261 | + | ||
| 262 | +.help li { color:#111 } | ||
| 263 | + | ||
| 264 | +.back_link { | ||
| 265 | + text-decoration:underline; | ||
| 266 | + font-size:14px; | ||
| 267 | + font-weight:bold; | ||
| 268 | + padding:10px 0; | ||
| 269 | + padding-bottom:0; | ||
| 270 | +} | ||
| 271 | + | ||
| 272 | +.info_link { | ||
| 273 | + margin-right:5px; | ||
| 274 | + float:left; | ||
| 275 | + | ||
| 276 | + img { | ||
| 277 | + width:20px; | ||
| 278 | + } | ||
| 279 | +} | ||
| 280 | + | ||
| 281 | +.borders { | ||
| 282 | + border: 1px solid #ccc; | ||
| 283 | + @include shade; | ||
| 284 | +} | ||
| 285 | + | ||
| 286 | +.download_repo_link { | ||
| 287 | + background: url("images.png") no-repeat 0 -48px; | ||
| 288 | + padding-left:20px; | ||
| 289 | +} | ||
| 290 | + | ||
| 291 | +.number { | ||
| 292 | + border-radius: 4px; | ||
| 293 | + text-shadow: none; | ||
| 294 | + background: rgba(0,0,0,.12); | ||
| 295 | + text-align: center; | ||
| 296 | + padding: 2px 4px; | ||
| 297 | + line-height:20px; | ||
| 298 | + margin-left:2px; | ||
| 299 | +} | ||
| 300 | + | ||
| 301 | +table a code { | ||
| 302 | + position: relative; | ||
| 303 | + top: -2px; | ||
| 304 | + margin-right: 3px; | ||
| 305 | +} | ||
| 306 | + | ||
| 307 | +.span12 hr{ | ||
| 308 | + margin-top: 5px; | ||
| 309 | +} | ||
| 310 | + | ||
| 311 | +.btn.padded { | ||
| 312 | + margin-right:3px; | ||
| 313 | +} | ||
| 102 | 314 | ||
| 103 | -@import "style.scss"; | ||
| 104 | -@import "projects.css.scss"; | ||
| 105 | -@import "commits.css.scss"; | ||
| 106 | -@import "notes.css.scss"; | ||
| 107 | -@import "merge_requests.css.scss"; | ||
| 108 | -@import "highlight.css.scss"; | ||
| 109 | -@import "highlight.black.css.scss"; | ||
| 110 | -@import "issues.css.scss"; | ||
| 111 | -@import "commits.css.scss"; | 315 | +.loading { |
| 316 | + margin:20px auto; | ||
| 317 | + background: url(ajax-loader-facebook.gif) no-repeat center center; | ||
| 318 | + width:40px; | ||
| 319 | + height:40px; | ||
| 320 | +} | ||
| 321 | + | ||
| 322 | +/** FLASH message **/ | ||
| 323 | +#flash_container { | ||
| 324 | + height:45px; | ||
| 325 | + position:fixed; | ||
| 326 | + z-index:10001; | ||
| 327 | + top:0px; | ||
| 328 | + width:100%; | ||
| 329 | + margin-bottom:15px; | ||
| 330 | + overflow:hidden; | ||
| 331 | + background:white; | ||
| 332 | + cursor:pointer; | ||
| 333 | + border-bottom:1px solid #777; | ||
| 334 | + | ||
| 335 | + h4 { | ||
| 336 | + color:#444; | ||
| 337 | + font-size:22px; | ||
| 338 | + padding-top:5px; | ||
| 339 | + margin:2px; | ||
| 340 | + } | ||
| 341 | +} | ||
| 342 | + | ||
| 343 | +.git_url_wrapper { | ||
| 344 | + margin-right:50px | ||
| 345 | +} | ||
| 346 | +.file_stats { | ||
| 347 | + span { | ||
| 348 | + img { | ||
| 349 | + width:14px; | ||
| 350 | + float:left; | ||
| 351 | + margin-right:6px; | ||
| 352 | + padding:2px 0; | ||
| 353 | + } | ||
| 354 | + } | ||
| 355 | +} | ||
| 356 | + | ||
| 357 | +.handle:hover { | ||
| 358 | + cursor:move; | ||
| 359 | +} | ||
| 360 | + | ||
| 361 | +span.update-author { | ||
| 362 | + display:block; | ||
| 363 | +} | ||
| 364 | +span.update-author { | ||
| 365 | + color:#999; | ||
| 366 | + font-weight:normal; | ||
| 367 | + font-style:italic; | ||
| 368 | +} | ||
| 369 | +span.update-author strong { | ||
| 370 | + font-weight:bold; | ||
| 371 | + font-style: normal; | ||
| 372 | +} | ||
| 373 | + | ||
| 374 | +/** UPDATE ITEM **/ | ||
| 375 | +span.update-author { | ||
| 376 | + display:block; | ||
| 377 | +} | ||
| 378 | +/** END UPDATE ITEM **/ | ||
| 379 | +.ajax-tab-loading { | ||
| 380 | + padding:40px; | ||
| 381 | + display:none; | ||
| 382 | +} | ||
| 383 | +.dashboard-loader { | ||
| 384 | + float:left; | ||
| 385 | + margin:10px; | ||
| 386 | + display:none; | ||
| 387 | +} | ||
| 388 | +.user-mention { | ||
| 389 | + color:#2FA0BB; | ||
| 390 | + font-weight:bold; | ||
| 391 | +} | ||
| 112 | 392 | ||
| 113 | -@import "top_panel.scss"; | ||
| 114 | -@import "dashboard.scss"; | ||
| 115 | -@import "tree.scss"; | 393 | +a.project-update.titled { |
| 394 | + position:relative; | ||
| 395 | + padding-left:35% !important; | ||
| 396 | + .title-block { | ||
| 397 | + padding:10px; | ||
| 398 | + width:35%; | ||
| 399 | + position:absolute; | ||
| 400 | + left:0; | ||
| 401 | + top:0; | ||
| 402 | + } | ||
| 403 | +} | ||
| 404 | +/** | ||
| 405 | + * Project graph | ||
| 406 | + */ | ||
| 407 | +#holder { | ||
| 408 | + cursor: move; | ||
| 409 | + height: 70%; | ||
| 410 | + overflow: hidden; | ||
| 411 | +} | ||
| 412 | + | ||
| 413 | + | ||
| 414 | + | ||
| 415 | +input.git_clone_url { | ||
| 416 | + width:475px; | ||
| 417 | +} | ||
| 418 | + | ||
| 419 | +.team_member_row { | ||
| 420 | + img { | ||
| 421 | + width:60px; | ||
| 422 | + } | ||
| 423 | +} | ||
| 424 | + | ||
| 425 | +.merge-request-form-holder { | ||
| 426 | + select { | ||
| 427 | + width:300px; | ||
| 428 | + } | ||
| 429 | +} | ||
| 430 | + | ||
| 431 | +/** Issues **/ | ||
| 432 | +#issue_assignee_id { | ||
| 433 | + width:300px; | ||
| 434 | +} | ||
| 435 | + | ||
| 436 | +#new_issue_dialog textarea{ | ||
| 437 | + height: 100px; | ||
| 438 | +} | ||
| 439 | + | ||
| 440 | +.project_list_url { | ||
| 441 | + width:250px; | ||
| 442 | + background:#fff !important; | ||
| 443 | +} | ||
| 444 | + | ||
| 445 | +.project_tile { | ||
| 446 | + @include shade; | ||
| 447 | + @include round-borders-all(4px); | ||
| 448 | + margin-bottom:20px; | ||
| 449 | + width:298px; | ||
| 450 | + float:left; | ||
| 451 | + margin-left:20px; | ||
| 452 | + border: 1px solid #DDD; | ||
| 453 | + padding-bottom:20px; | ||
| 454 | + | ||
| 455 | + .title { | ||
| 456 | + background:#f5f5f5; | ||
| 457 | + padding: 5px 10px 2px 20px; | ||
| 458 | + border-bottom: 1px solid #DDD; | ||
| 459 | + margin-bottom: 15px; | ||
| 460 | + | ||
| 461 | + h3 { | ||
| 462 | + &:hover { | ||
| 463 | + text-decoration: underline; | ||
| 464 | + } | ||
| 465 | + } | ||
| 466 | + } | ||
| 467 | + .data { | ||
| 468 | + margin: 0 20px; | ||
| 469 | + } | ||
| 470 | + .buttons { | ||
| 471 | + margin: 0 20px; | ||
| 472 | + } | ||
| 473 | +} | ||
| 474 | + | ||
| 475 | +/** | ||
| 476 | + * | ||
| 477 | + * COMMIT SHOw | ||
| 478 | + * | ||
| 479 | + */ | ||
| 480 | +.diff_file { | ||
| 481 | + border:1px solid #CCC; | ||
| 482 | + margin-bottom:1em; | ||
| 483 | + | ||
| 484 | + .diff_file_header { | ||
| 485 | + padding:5px 5px; | ||
| 486 | + border-bottom:1px solid #CCC; | ||
| 487 | + background: #eee; | ||
| 488 | + } | ||
| 489 | + .diff_file_content { | ||
| 490 | + overflow:auto; | ||
| 491 | + overflow-y:hidden; | ||
| 492 | + background:#fff; | ||
| 493 | + color:#333; | ||
| 494 | + font-size: 12px; | ||
| 495 | + font-family: 'Menlo', 'Courier New', 'andale mono','lucida console',monospace; | ||
| 496 | + } | ||
| 497 | + .diff_file_content_image { | ||
| 498 | + background:#eee; | ||
| 499 | + text-align:center; | ||
| 500 | + img { | ||
| 501 | + padding:100px; | ||
| 502 | + max-width:300px; | ||
| 503 | + } | ||
| 504 | + } | ||
| 505 | +} | ||
| 506 | + | ||
| 507 | +.diff_file_content{ | ||
| 508 | + table { | ||
| 509 | + border:none; | ||
| 510 | + margin:0px; | ||
| 511 | + padding:0px; | ||
| 512 | + tr { | ||
| 513 | + td { | ||
| 514 | + font-size:12px; | ||
| 515 | + } | ||
| 516 | + } | ||
| 517 | + } | ||
| 518 | + .old_line, .new_line { | ||
| 519 | + margin:0px; | ||
| 520 | + padding:0px; | ||
| 521 | + border:none; | ||
| 522 | + background:#F7F7F7; | ||
| 523 | + color:#aaa; | ||
| 524 | + padding: 0px 5px; | ||
| 525 | + border-right: 1px solid #ccc; | ||
| 526 | + text-align:right; | ||
| 527 | + min-width:35px; | ||
| 528 | + max-width:35px; | ||
| 529 | + width:35px; | ||
| 530 | + moz-user-select: none; | ||
| 531 | + -khtml-user-select: none; | ||
| 532 | + user-select: none; | ||
| 533 | + a { | ||
| 534 | + float:left; | ||
| 535 | + width:35px; | ||
| 536 | + font-weight:normal; | ||
| 537 | + color:#aaa; | ||
| 538 | + &:hover { | ||
| 539 | + text-decoration:underline; | ||
| 540 | + } | ||
| 541 | + } | ||
| 542 | + } | ||
| 543 | + .line_content { | ||
| 544 | + white-space:pre; | ||
| 545 | + height:14px; | ||
| 546 | + margin:0px; | ||
| 547 | + padding:0px; | ||
| 548 | + border:none; | ||
| 549 | + &.new { | ||
| 550 | + background: #CFD; | ||
| 551 | + } | ||
| 552 | + &.old { | ||
| 553 | + background: #FDD; | ||
| 554 | + } | ||
| 555 | + &.matched { | ||
| 556 | + color:#ccc; | ||
| 557 | + background:#fafafa; | ||
| 558 | + } | ||
| 559 | + } | ||
| 560 | +} | ||
| 561 | + | ||
| 562 | +/** COMMIT BLOCK **/ | ||
| 563 | +.commit-title{display: block;} | ||
| 564 | +.commit-title{margin-bottom: 10px} | ||
| 565 | +.commit-author, .commit-committer{display: block;color: #999; font-weight: normal; font-style: italic;} | ||
| 566 | +.commit-author strong, .commit-committer strong{font-weight: bold; font-style: normal;} | ||
| 567 | + | ||
| 568 | +/** bordered list **/ | ||
| 569 | +ul.bordered-list { | ||
| 570 | + margin:5px 0px; | ||
| 571 | + padding:0px; | ||
| 572 | + li { | ||
| 573 | + padding: 5px 0; | ||
| 574 | + border-bottom: 1px solid #EEE; | ||
| 575 | + overflow: hidden; | ||
| 576 | + display: block; | ||
| 577 | + margin:0px; | ||
| 578 | + } | ||
| 579 | +} | ||
| 580 | + | ||
| 581 | +ul.bordered-list li:last-child { border:none } | ||
| 582 | + | ||
| 583 | +.line_holder { | ||
| 584 | + &:hover { | ||
| 585 | + td { | ||
| 586 | + background: #FFFFCF !important; | ||
| 587 | + } | ||
| 588 | + } | ||
| 589 | +} | ||
| 590 | + | ||
| 591 | +li.commit { | ||
| 592 | + .avatar { | ||
| 593 | + width:24px; | ||
| 594 | + top:-3px; | ||
| 595 | + margin-right:10px; | ||
| 596 | + margin-left:10px; | ||
| 597 | + } | ||
| 598 | + | ||
| 599 | + code { | ||
| 600 | + padding:4px; | ||
| 601 | + } | ||
| 602 | +} | ||
| 603 | +p.time { | ||
| 604 | + color: #999; | ||
| 605 | + font-size: 90%; | ||
| 606 | + margin: 30px 3px 3px 2px; | ||
| 607 | +} | ||
| 608 | + | ||
| 609 | + | ||
| 610 | +.dashboard_category { | ||
| 611 | + margin-bottom:30px; | ||
| 612 | + | ||
| 613 | + .dashboard_block { | ||
| 614 | + width:700px; | ||
| 615 | + margin:auto; | ||
| 616 | + | ||
| 617 | + .wll { | ||
| 618 | + border:none; | ||
| 619 | + &:hover { | ||
| 620 | + background:none; | ||
| 621 | + } | ||
| 622 | + | ||
| 623 | + h4 { | ||
| 624 | + color:#666; | ||
| 625 | + } | ||
| 626 | + } | ||
| 627 | + } | ||
| 628 | +} | ||
| 629 | + | ||
| 630 | +.event_feed { | ||
| 631 | + ul { | ||
| 632 | + margin-left:50px; | ||
| 633 | + } | ||
| 634 | +} |
app/assets/stylesheets/dashboard.scss
| @@ -1,30 +0,0 @@ | @@ -1,30 +0,0 @@ | ||
| 1 | -body.dashboard-page h2.icon span{ background-position: 9px -69px; } | ||
| 2 | -body.dashboard-page header{margin-bottom: 0} | ||
| 3 | -body.dashboard-page .news-feed{margin-left: 285px; min-height: 600px; margin-top: 20px; margin-right:2px; padding:20px;} | ||
| 4 | -body.dashboard-page .dashboard-content{ position: relative; float: left; width: 100%; height: 100%; } | ||
| 5 | -body.dashboard-page .news-feed h2{float: left;} | ||
| 6 | - | ||
| 7 | -body.dashboard-page aside{ | ||
| 8 | - min-height: 820px; position: relative; top: 0; bottom: 0; right: 0; width: 260px; float: left; border-right: 1px solid $border_color; padding:20px; padding-right:0; | ||
| 9 | - h4{margin: 0; border-bottom: 1px solid #ccc; padding: 20px 20px 20px 0px; font-size: 11px; font-weight: bold; text-transform: uppercase;} | ||
| 10 | - h4 a.button-small{float: right; text-transform: none; border-radius: 4px; margin-right: 2%; margin-top: -4px; display: block;} | ||
| 11 | - .project-list {list-style: none; margin: 0; padding: 0;} | ||
| 12 | - .project-list li a {background: white; color: #{$blue_link}; display: block; border-bottom: 1px solid $lite_border_color; padding: 14px 6% 14px 0px;} | ||
| 13 | - .project-list li a span.project-name{font-size: 14px; display: block; margin-bottom: 8px} | ||
| 14 | - .project-list li a span.time{color: #666; font-weight: normal; font-size: 11px} | ||
| 15 | - .project-list li a span.arrow{float: right; background: #E3E5EA; padding: 10px; border-radius: 5px; margin-top: 2px; text-shadow: none; color: #999} | ||
| 16 | -} | ||
| 17 | - | ||
| 18 | -body.dashboard-page .news-feed .project-updates { | ||
| 19 | - margin-bottom: 20px; display: block; width: 100%; | ||
| 20 | - .data{ padding: 0} | ||
| 21 | - a.project-update {padding: 10px; overflow: hidden; display: block;} | ||
| 22 | - a.project-update:last-child{border-bottom: 0} | ||
| 23 | - a.project-update img{float: left; margin-right: 10px;} | ||
| 24 | - a.project-update span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;} | ||
| 25 | - a.project-update span.update-title{margin-bottom: 10px} | ||
| 26 | - a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 27 | - a.project-update span.update-author strong{font-weight: bold; font-style: normal;} | ||
| 28 | -} | ||
| 29 | -/* eo Dashboard Page */ | ||
| 30 | - |
app/assets/stylesheets/highlight.black.css.scss
| @@ -1,67 +0,0 @@ | @@ -1,67 +0,0 @@ | ||
| 1 | -.black .highlighttable { | ||
| 2 | - background: #333; | ||
| 3 | - pre { color: #eee } | ||
| 4 | - .highlight { background: #333; border-left:1px solid #555; } | ||
| 5 | - | ||
| 6 | - .hll { background-color: #ffffff } | ||
| 7 | - .c { color: #888888; font-style: italic } /* Comment */ | ||
| 8 | - .err { color: #a61717; background-color: #e3d2d2 } /* Error */ | ||
| 9 | - .k { color: #CDA869; font-weight: bold } /* Keyword */ | ||
| 10 | - .kp { color: #CDA869; font-weight: bold } /* Keyword */ | ||
| 11 | - .cm { color: #888888 } /* Comment.Multiline */ | ||
| 12 | - .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ | ||
| 13 | - .c1 { color: #888888 } /* Comment.Single */ | ||
| 14 | - .cs { color: #cc0000; font-weight: bold; background-color: transparent } /* Comment.Special */ | ||
| 15 | - .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ | ||
| 16 | - .ge { font-style: italic } /* Generic.Emph */ | ||
| 17 | - .gr { color: #aa0000 } /* Generic.Error */ | ||
| 18 | - .gh { color: #303030 } /* Generic.Heading */ | ||
| 19 | - .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ | ||
| 20 | - .go { color: #888888 } /* Generic.Output */ | ||
| 21 | - .gp { color: #555555 } /* Generic.Prompt */ | ||
| 22 | - .gs { font-weight: bold } /* Generic.Strong */ | ||
| 23 | - .gu { color: #606060 } /* Generic.Subheading */ | ||
| 24 | - .gt { color: #aa0000 } /* Generic.Traceback */ | ||
| 25 | - .highlight .kc{font-weight:bold;} /* Keyword.Constant */ | ||
| 26 | - .highlight .kd{font-weight:bold;} /* Keyword.Declaration */ | ||
| 27 | - .highlight .kn{font-weight:bold;} /* Keyword.Namespace */ | ||
| 28 | - .highlight .kp{font-weight:bold;} /* Keyword.Pseudo */ | ||
| 29 | - .highlight .kr{font-weight:bold;} /* Keyword.Reserved */ | ||
| 30 | - .highlight .kt{color:#458;font-weight:bold;} /* Keyword.Type */ | ||
| 31 | - .m { color: #0000DD; font-weight: bold } /* Literal.Number */ | ||
| 32 | - .p { color: #eee; } | ||
| 33 | - .s { color: #dd2200; background-color: transparent } /* Literal.String */ | ||
| 34 | - .highlight .na{color:#008080;} /* Name.Attribute */ | ||
| 35 | - .highlight .nb{color:#0086B3;} /* Name.Builtin */ | ||
| 36 | - .highlight .nc{color:#ccc;font-weight:bold;} /* Name.Class */ | ||
| 37 | - .highlight .no{color:turquoise;} /* Name.Constant */ | ||
| 38 | - .highlight .ni{color:#800080;} | ||
| 39 | - .highlight .ne{color:#900;font-weight:bold;} /* Name.Exception */ | ||
| 40 | - .highlight .nf{color:#ccc;font-weight:bold;} /* Name.Function */ | ||
| 41 | - .highlight .nn{color:#79C3E0;font-weight:bold;} /* Name.Namespace */ | ||
| 42 | - .highlight .nt{color:#fc5;} /* Name.Tag */ | ||
| 43 | - .highlight .nv{color:#008080;} /* Name.Variable */ | ||
| 44 | - .py { color: #336699; font-weight: bold } /* Name.Property */ | ||
| 45 | - .ow { color: #008800 } /* Operator.Word */ | ||
| 46 | - .w { color: #bbbbbb } /* Text.Whitespace */ | ||
| 47 | - .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ | ||
| 48 | - .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ | ||
| 49 | - .highlight .mi {color:#099;} /* Literal.Number.Integer */ | ||
| 50 | - .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ | ||
| 51 | - .sb { color: #dd2200; background-color: transparent; } /* Literal.String.Backtick */ | ||
| 52 | - .highlight .sc{color:#d14;} /* Literal.String.Char */ | ||
| 53 | - .sd { color: #dd2200; background-color: transparent; } /* Literal.String.Doc */ | ||
| 54 | - .highlight .s2{color:orange;} /* Literal.String.Double */ | ||
| 55 | - .highlight .se{color:orange;} /* Literal.String.Escape */ | ||
| 56 | - .highlight .sh{color:orange;} /* Literal.String.Heredoc */ | ||
| 57 | - .highlight .si{color:orange;} /* Literal.String.Interpol */ | ||
| 58 | - .highlight .sx{color:orange;} /* Literal.String.Other */ | ||
| 59 | - .highlight .sr{color:orange;} /* Literal.String.Regex */ | ||
| 60 | - .highlight .s1{color:orange;} /* Literal.String.Single */ | ||
| 61 | - .highlight .ss{color:orange;} /* Literal.String.Symbol */ | ||
| 62 | - .bp { color: #003388 } /* Name.Builtin.Pseudo */ | ||
| 63 | - .vc { color: #336699 } /* Name.Variable.Class */ | ||
| 64 | - .vg { color: #dd7700 } /* Name.Variable.Global */ | ||
| 65 | - .vi { color: cyan } | ||
| 66 | -} | ||
| 67 | - |
| @@ -0,0 +1,68 @@ | @@ -0,0 +1,68 @@ | ||
| 1 | +.black .highlighttable { | ||
| 2 | + background: #333; | ||
| 3 | + td.linenos { border:none; } | ||
| 4 | + pre { color: #eee } | ||
| 5 | + .highlight { background: #333; border-left:1px solid #555; } | ||
| 6 | + | ||
| 7 | + .hll { background-color: #ffffff } | ||
| 8 | + .c { color: #888888; font-style: italic } /* Comment */ | ||
| 9 | + .err { color: #a61717; background-color: #e3d2d2 } /* Error */ | ||
| 10 | + .k { color: #CDA869; font-weight: bold } /* Keyword */ | ||
| 11 | + .kp { color: #CDA869; font-weight: bold } /* Keyword */ | ||
| 12 | + .cm { color: #888888 } /* Comment.Multiline */ | ||
| 13 | + .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ | ||
| 14 | + .c1 { color: #888888 } /* Comment.Single */ | ||
| 15 | + .cs { color: #cc0000; font-weight: bold; background-color: transparent } /* Comment.Special */ | ||
| 16 | + .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ | ||
| 17 | + .ge { font-style: italic } /* Generic.Emph */ | ||
| 18 | + .gr { color: #aa0000 } /* Generic.Error */ | ||
| 19 | + .gh { color: #303030 } /* Generic.Heading */ | ||
| 20 | + .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ | ||
| 21 | + .go { color: #888888 } /* Generic.Output */ | ||
| 22 | + .gp { color: #555555 } /* Generic.Prompt */ | ||
| 23 | + .gs { font-weight: bold } /* Generic.Strong */ | ||
| 24 | + .gu { color: #606060 } /* Generic.Subheading */ | ||
| 25 | + .gt { color: #aa0000 } /* Generic.Traceback */ | ||
| 26 | + .highlight .kc{font-weight:bold;} /* Keyword.Constant */ | ||
| 27 | + .highlight .kd{font-weight:bold;} /* Keyword.Declaration */ | ||
| 28 | + .highlight .kn{font-weight:bold;} /* Keyword.Namespace */ | ||
| 29 | + .highlight .kp{font-weight:bold;} /* Keyword.Pseudo */ | ||
| 30 | + .highlight .kr{font-weight:bold;} /* Keyword.Reserved */ | ||
| 31 | + .highlight .kt{color:#458;font-weight:bold;} /* Keyword.Type */ | ||
| 32 | + .m { color: #0000DD; font-weight: bold } /* Literal.Number */ | ||
| 33 | + .p { color: #eee; } | ||
| 34 | + .s { color: #dd2200; background-color: transparent } /* Literal.String */ | ||
| 35 | + .highlight .na{color:#008080;} /* Name.Attribute */ | ||
| 36 | + .highlight .nb{color:#0086B3;} /* Name.Builtin */ | ||
| 37 | + .highlight .nc{color:#ccc;font-weight:bold;} /* Name.Class */ | ||
| 38 | + .highlight .no{color:turquoise;} /* Name.Constant */ | ||
| 39 | + .highlight .ni{color:#800080;} | ||
| 40 | + .highlight .ne{color:#900;font-weight:bold;} /* Name.Exception */ | ||
| 41 | + .highlight .nf{color:#ccc;font-weight:bold;} /* Name.Function */ | ||
| 42 | + .highlight .nn{color:#79C3E0;font-weight:bold;} /* Name.Namespace */ | ||
| 43 | + .highlight .nt{color:#fc5;} /* Name.Tag */ | ||
| 44 | + .highlight .nv{color:#008080;} /* Name.Variable */ | ||
| 45 | + .py { color: #336699; font-weight: bold } /* Name.Property */ | ||
| 46 | + .ow { color: #008800 } /* Operator.Word */ | ||
| 47 | + .w { color: #bbbbbb } /* Text.Whitespace */ | ||
| 48 | + .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ | ||
| 49 | + .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ | ||
| 50 | + .highlight .mi {color:#099;} /* Literal.Number.Integer */ | ||
| 51 | + .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ | ||
| 52 | + .sb { color: #dd2200; background-color: transparent; } /* Literal.String.Backtick */ | ||
| 53 | + .highlight .sc{color:#d14;} /* Literal.String.Char */ | ||
| 54 | + .sd { color: #dd2200; background-color: transparent; } /* Literal.String.Doc */ | ||
| 55 | + .highlight .s2{color:orange;} /* Literal.String.Double */ | ||
| 56 | + .highlight .se{color:orange;} /* Literal.String.Escape */ | ||
| 57 | + .highlight .sh{color:orange;} /* Literal.String.Heredoc */ | ||
| 58 | + .highlight .si{color:orange;} /* Literal.String.Interpol */ | ||
| 59 | + .highlight .sx{color:orange;} /* Literal.String.Other */ | ||
| 60 | + .highlight .sr{color:orange;} /* Literal.String.Regex */ | ||
| 61 | + .highlight .s1{color:orange;} /* Literal.String.Single */ | ||
| 62 | + .highlight .ss{color:orange;} /* Literal.String.Symbol */ | ||
| 63 | + .bp { color: #003388 } /* Name.Builtin.Pseudo */ | ||
| 64 | + .vc { color: #336699 } /* Name.Variable.Class */ | ||
| 65 | + .vg { color: #dd7700 } /* Name.Variable.Global */ | ||
| 66 | + .vi { color: cyan } | ||
| 67 | +} | ||
| 68 | + |
app/assets/stylesheets/highlight.css.scss
| @@ -1,133 +0,0 @@ | @@ -1,133 +0,0 @@ | ||
| 1 | -@mixin round-borders-all($radius) { | ||
| 2 | - border: 1px solid #eaeaea; | ||
| 3 | - -moz-border-radius: $radius; | ||
| 4 | - -webkit-border-radius: $radius; | ||
| 5 | - border-radius: $radius; | ||
| 6 | -} | ||
| 7 | - | ||
| 8 | -table.highlighttable | ||
| 9 | -{ | ||
| 10 | - margin:0px; | ||
| 11 | - padding:0px; | ||
| 12 | - font-size:12px; | ||
| 13 | - table-layout:fixed | ||
| 14 | -} | ||
| 15 | - | ||
| 16 | -td.code, | ||
| 17 | -td.linenos{ | ||
| 18 | - padding:0; | ||
| 19 | - margin:0; | ||
| 20 | - vertical-align:top; | ||
| 21 | -} | ||
| 22 | - | ||
| 23 | -.highlight{ | ||
| 24 | - background:none; | ||
| 25 | - padding:10px 0px 0px 10px; | ||
| 26 | - margin-left:0px; | ||
| 27 | -} | ||
| 28 | -.highlight pre{ | ||
| 29 | -} | ||
| 30 | - | ||
| 31 | -.linenodiv pre { | ||
| 32 | - white-space:pre-line; | ||
| 33 | -} | ||
| 34 | - | ||
| 35 | -td.linenos { | ||
| 36 | - /*background:#F7F7F7;*/ | ||
| 37 | - color:#777; | ||
| 38 | - padding:10px 0px 0px 10px; | ||
| 39 | - float:left; | ||
| 40 | - width:45px; | ||
| 41 | - border-right: 1px solid #ccc; | ||
| 42 | - | ||
| 43 | -} | ||
| 44 | - | ||
| 45 | -td.code .highlight { | ||
| 46 | - overflow: auto; | ||
| 47 | -} | ||
| 48 | -table.highlighttable pre{ | ||
| 49 | - padding:0; | ||
| 50 | - margin:0; | ||
| 51 | - font-family: 'Courier New', 'andale mono','lucida console',monospace; | ||
| 52 | - color: #333; | ||
| 53 | - text-align:left; | ||
| 54 | -} | ||
| 55 | - | ||
| 56 | -.git-empty .highlight { | ||
| 57 | - @include round-borders-all(4px); | ||
| 58 | - background:#eee; | ||
| 59 | - padding:5px; | ||
| 60 | - //overflow-x:scroll; | ||
| 61 | - pre{ | ||
| 62 | - padding:0; | ||
| 63 | - line-height:2.0; | ||
| 64 | - margin:0; | ||
| 65 | - font-family: 'Courier New', 'andale mono','lucida console',monospace; | ||
| 66 | - color: #333; | ||
| 67 | - text-align:left;} | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | -.shadow{ | ||
| 71 | - -webkit-box-shadow:0 5px 15px #000; | ||
| 72 | - -moz-box-shadow:0 5px 15px #000; | ||
| 73 | - box-shadow:0 5px 15px #000; | ||
| 74 | -} | ||
| 75 | - | ||
| 76 | -.hll { background-color: #ffffff } | ||
| 77 | -.c { color: #888888; font-style: italic } /* Comment */ | ||
| 78 | -.err { color: #a61717; background-color: #e3d2d2 } /* Error */ | ||
| 79 | -.k { color: #000000; font-weight: bold } /* Keyword */ | ||
| 80 | -.cm { color: #888888 } /* Comment.Multiline */ | ||
| 81 | -.cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ | ||
| 82 | -.c1 { color: #888888 } /* Comment.Single */ | ||
| 83 | -.cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ | ||
| 84 | -.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ | ||
| 85 | -.ge { font-style: italic } /* Generic.Emph */ | ||
| 86 | -.gr { color: #aa0000 } /* Generic.Error */ | ||
| 87 | -.gh { color: #303030 } /* Generic.Heading */ | ||
| 88 | -.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ | ||
| 89 | -.go { color: #888888 } /* Generic.Output */ | ||
| 90 | -.gp { color: #555555 } /* Generic.Prompt */ | ||
| 91 | -.gs { font-weight: bold } /* Generic.Strong */ | ||
| 92 | -.gu { color: #606060 } /* Generic.Subheading */ | ||
| 93 | -.gt { color: #aa0000 } /* Generic.Traceback */ | ||
| 94 | -.highlight .kc{font-weight:bold;} /* Keyword.Constant */ | ||
| 95 | -.highlight .kd{font-weight:bold;} /* Keyword.Declaration */ | ||
| 96 | -.highlight .kn{font-weight:bold;} /* Keyword.Namespace */ | ||
| 97 | -.highlight .kp{font-weight:bold;} /* Keyword.Pseudo */ | ||
| 98 | -.highlight .kr{font-weight:bold;} /* Keyword.Reserved */ | ||
| 99 | -.highlight .kt{color:#458;font-weight:bold;} /* Keyword.Type */ | ||
| 100 | -.m { color: #0000DD; font-weight: bold } /* Literal.Number */ | ||
| 101 | -.s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ | ||
| 102 | -.highlight .na{color:#008080;} /* Name.Attribute */ | ||
| 103 | -.highlight .nb{color:#0086B3;} /* Name.Builtin */ | ||
| 104 | -.highlight .nc{color:#458;font-weight:bold;} /* Name.Class */ | ||
| 105 | -.highlight .no{color:#008080;} /* Name.Constant */ | ||
| 106 | -.highlight .ni{color:#800080;} | ||
| 107 | -.highlight .ne{color:#900;font-weight:bold;} /* Name.Exception */ | ||
| 108 | -.highlight .nf{color:#900;font-weight:bold;} /* Name.Function */ | ||
| 109 | -.highlight .nn{color:#005;font-weight:bold;} /* Name.Namespace */ | ||
| 110 | -.highlight .nt{color:#000080;} /* Name.Tag */ | ||
| 111 | -.highlight .nv{color:#008080;} /* Name.Variable */ | ||
| 112 | -.py { color: #336699; font-weight: bold } /* Name.Property */ | ||
| 113 | -.ow { color: #008800 } /* Operator.Word */ | ||
| 114 | -.w { color: #bbbbbb } /* Text.Whitespace */ | ||
| 115 | -.mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ | ||
| 116 | -.mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ | ||
| 117 | -.highlight .mi {color:#099;} /* Literal.Number.Integer */ | ||
| 118 | -.mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ | ||
| 119 | -.sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ | ||
| 120 | -.highlight .sc{color:#d14;} /* Literal.String.Char */ | ||
| 121 | -.sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ | ||
| 122 | -.highlight .s2{color:#d14;} /* Literal.String.Double */ | ||
| 123 | -.highlight .se{color:#d14;} /* Literal.String.Escape */ | ||
| 124 | -.highlight .sh{color:#d14;} /* Literal.String.Heredoc */ | ||
| 125 | -.highlight .si{color:#d14;} /* Literal.String.Interpol */ | ||
| 126 | -.highlight .sx{color:#d14;} /* Literal.String.Other */ | ||
| 127 | -.highlight .sr{color:#d14;} /* Literal.String.Regex */ | ||
| 128 | -.highlight .s1{color:#d14;} /* Literal.String.Single */ | ||
| 129 | -.highlight .ss{color:#d14;} /* Literal.String.Symbol */ | ||
| 130 | -.bp { color: #003388 } /* Name.Builtin.Pseudo */ | ||
| 131 | -.vc { color: #336699 } /* Name.Variable.Class */ | ||
| 132 | -.vg { color: #dd7700 } /* Name.Variable.Global */ | ||
| 133 | -.vi { color: #3333bb } |
| @@ -0,0 +1,143 @@ | @@ -0,0 +1,143 @@ | ||
| 1 | +@mixin round-borders-all($radius) { | ||
| 2 | + border: 1px solid #eaeaea; | ||
| 3 | + -moz-border-radius: $radius; | ||
| 4 | + -webkit-border-radius: $radius; | ||
| 5 | + border-radius: $radius; | ||
| 6 | +} | ||
| 7 | + | ||
| 8 | +table.highlighttable | ||
| 9 | +{ | ||
| 10 | + margin:0px; | ||
| 11 | + padding:0px; | ||
| 12 | + font-size:12px; | ||
| 13 | + table-layout:fixed; | ||
| 14 | + background: #F7F7F7; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +td.code, | ||
| 18 | +td.linenos{ | ||
| 19 | + padding:0; | ||
| 20 | + margin:0; | ||
| 21 | + border-top:0; | ||
| 22 | + vertical-align:top; | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +.highlight{ | ||
| 26 | + background:none; | ||
| 27 | + padding:10px 0px 0px 10px; | ||
| 28 | + margin-left:0px; | ||
| 29 | + border-left: 1px solid #DEE2E3; | ||
| 30 | + background: white; | ||
| 31 | +} | ||
| 32 | + | ||
| 33 | +.linenodiv pre, | ||
| 34 | +.highlight pre{ | ||
| 35 | + margin:0; | ||
| 36 | + padding:0; | ||
| 37 | + background:none; | ||
| 38 | + border:none; | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +.linenodiv pre { | ||
| 42 | + white-space:pre-line; | ||
| 43 | +} | ||
| 44 | + | ||
| 45 | +td.linenos { | ||
| 46 | + /*background:#F7F7F7;*/ | ||
| 47 | + color:#777; | ||
| 48 | + padding:10px 0px 0px 10px; | ||
| 49 | + float:left; | ||
| 50 | + width:45px; | ||
| 51 | + border-right: 1px solid #ccc; | ||
| 52 | + | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | +td.code .highlight { | ||
| 56 | + overflow: auto; | ||
| 57 | +} | ||
| 58 | +table.highlighttable pre{ | ||
| 59 | + padding:0; | ||
| 60 | + margin:0; | ||
| 61 | + font-family: 'Menlo', 'Courier New', 'andale mono','lucida console',monospace; | ||
| 62 | + color: #333; | ||
| 63 | + text-align:left; | ||
| 64 | +} | ||
| 65 | + | ||
| 66 | +.git-empty .highlight { | ||
| 67 | + @include round-borders-all(4px); | ||
| 68 | + background:#eee; | ||
| 69 | + padding:5px; | ||
| 70 | + //overflow-x:scroll; | ||
| 71 | + pre{ | ||
| 72 | + padding:0; | ||
| 73 | + line-height:2.0; | ||
| 74 | + margin:0; | ||
| 75 | + font-family: 'Menlo', 'Courier New', 'andale mono','lucida console',monospace; | ||
| 76 | + color: #333; | ||
| 77 | + text-align:left;} | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | +.shadow{ | ||
| 81 | + -webkit-box-shadow:0 5px 15px #000; | ||
| 82 | + -moz-box-shadow:0 5px 15px #000; | ||
| 83 | + box-shadow:0 5px 15px #000; | ||
| 84 | +} | ||
| 85 | + | ||
| 86 | +.hll { background-color: #ffffff } | ||
| 87 | +.c { color: #888888; font-style: italic } /* Comment */ | ||
| 88 | +.err { color: #a61717; background-color: #e3d2d2 } /* Error */ | ||
| 89 | +.k { color: #000000; font-weight: bold } /* Keyword */ | ||
| 90 | +.cm { color: #888888 } /* Comment.Multiline */ | ||
| 91 | +.cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ | ||
| 92 | +.c1 { color: #888888 } /* Comment.Single */ | ||
| 93 | +.cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ | ||
| 94 | +.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ | ||
| 95 | +.ge { font-style: italic } /* Generic.Emph */ | ||
| 96 | +.gr { color: #aa0000 } /* Generic.Error */ | ||
| 97 | +.gh { color: #303030 } /* Generic.Heading */ | ||
| 98 | +.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ | ||
| 99 | +.go { color: #888888 } /* Generic.Output */ | ||
| 100 | +.gp { color: #555555 } /* Generic.Prompt */ | ||
| 101 | +.gs { font-weight: bold } /* Generic.Strong */ | ||
| 102 | +.gu { color: #606060 } /* Generic.Subheading */ | ||
| 103 | +.gt { color: #aa0000 } /* Generic.Traceback */ | ||
| 104 | +.highlight .kc{font-weight:bold;} /* Keyword.Constant */ | ||
| 105 | +.highlight .kd{font-weight:bold;} /* Keyword.Declaration */ | ||
| 106 | +.highlight .kn{font-weight:bold;} /* Keyword.Namespace */ | ||
| 107 | +.highlight .kp{font-weight:bold;} /* Keyword.Pseudo */ | ||
| 108 | +.highlight .kr{font-weight:bold;} /* Keyword.Reserved */ | ||
| 109 | +.highlight .kt{color:#458;font-weight:bold;} /* Keyword.Type */ | ||
| 110 | +.m { color: #0000DD; font-weight: bold } /* Literal.Number */ | ||
| 111 | +.s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ | ||
| 112 | +.highlight .na{color:#008080;} /* Name.Attribute */ | ||
| 113 | +.highlight .nb{color:#0086B3;} /* Name.Builtin */ | ||
| 114 | +.highlight .nc{color:#458;font-weight:bold;} /* Name.Class */ | ||
| 115 | +.highlight .no{color:#008080;} /* Name.Constant */ | ||
| 116 | +.highlight .ni{color:#800080;} | ||
| 117 | +.highlight .ne{color:#900;font-weight:bold;} /* Name.Exception */ | ||
| 118 | +.highlight .nf{color:#900;font-weight:bold;} /* Name.Function */ | ||
| 119 | +.highlight .nn{color:#005;font-weight:bold;} /* Name.Namespace */ | ||
| 120 | +.highlight .nt{color:#000080;} /* Name.Tag */ | ||
| 121 | +.highlight .nv{color:#008080;} /* Name.Variable */ | ||
| 122 | +.py { color: #336699; font-weight: bold } /* Name.Property */ | ||
| 123 | +.ow { color: #008800 } /* Operator.Word */ | ||
| 124 | +.w { color: #bbbbbb } /* Text.Whitespace */ | ||
| 125 | +.mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ | ||
| 126 | +.mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ | ||
| 127 | +.highlight .mi {color:#099;} /* Literal.Number.Integer */ | ||
| 128 | +.mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ | ||
| 129 | +.sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ | ||
| 130 | +.highlight .sc{color:#d14;} /* Literal.String.Char */ | ||
| 131 | +.sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ | ||
| 132 | +.highlight .s2{color:#d14;} /* Literal.String.Double */ | ||
| 133 | +.highlight .se{color:#d14;} /* Literal.String.Escape */ | ||
| 134 | +.highlight .sh{color:#d14;} /* Literal.String.Heredoc */ | ||
| 135 | +.highlight .si{color:#d14;} /* Literal.String.Interpol */ | ||
| 136 | +.highlight .sx{color:#d14;} /* Literal.String.Other */ | ||
| 137 | +.highlight .sr{color:#d14;} /* Literal.String.Regex */ | ||
| 138 | +.highlight .s1{color:#d14;} /* Literal.String.Single */ | ||
| 139 | +.highlight .ss{color:#d14;} /* Literal.String.Symbol */ | ||
| 140 | +.bp { color: #003388 } /* Name.Builtin.Pseudo */ | ||
| 141 | +.vc { color: #336699 } /* Name.Variable.Class */ | ||
| 142 | +.vg { color: #dd7700 } /* Name.Variable.Global */ | ||
| 143 | +.vi { color: #3333bb } |
app/assets/stylesheets/issues.css.scss
| @@ -1,84 +0,0 @@ | @@ -1,84 +0,0 @@ | ||
| 1 | -.issue-number { | ||
| 2 | - float: left; | ||
| 3 | - border-radius: 5px; | ||
| 4 | - text-shadow: none; | ||
| 5 | - background: rgba(0, 0, 0, 0.12); | ||
| 6 | - text-align: center; | ||
| 7 | - padding: 14px 8px; | ||
| 8 | - width: 40px; | ||
| 9 | - margin-right: 10px; | ||
| 10 | - color: #444; | ||
| 11 | -} | ||
| 12 | - | ||
| 13 | -.issues_filter { | ||
| 14 | - margin:10px 0; | ||
| 15 | - .left { | ||
| 16 | - margin-right:15px; | ||
| 17 | - } | ||
| 18 | -} | ||
| 19 | - | ||
| 20 | -.top_panel_issues{ | ||
| 21 | - #issue_search_form { | ||
| 22 | - margin:5px 0; | ||
| 23 | - input { | ||
| 24 | - border:1px solid #D3D3D3; | ||
| 25 | - padding: 3px; | ||
| 26 | - height: 28px; | ||
| 27 | - width: 250px; | ||
| 28 | - -webkit-appearance:none; | ||
| 29 | - box-sizing: border-box; | ||
| 30 | - -moz-box-sizing: border-box; | ||
| 31 | - | ||
| 32 | - &:focus { | ||
| 33 | - border-color:#c2e1ef; | ||
| 34 | - } | ||
| 35 | - } | ||
| 36 | - } | ||
| 37 | -} | ||
| 38 | - | ||
| 39 | -/** ISSUES LIST **/ | ||
| 40 | -.issue .action-links { | ||
| 41 | - display:none; | ||
| 42 | - a { | ||
| 43 | - margin-left:10px; | ||
| 44 | - } | ||
| 45 | -} | ||
| 46 | -.issue:hover .action-links { display:block; } | ||
| 47 | -.issue-show-holder { | ||
| 48 | - width:100%; | ||
| 49 | - .data p { font-size:16px } | ||
| 50 | -} | ||
| 51 | - | ||
| 52 | -#issue_assignee_id { | ||
| 53 | - width:300px; | ||
| 54 | -} | ||
| 55 | - | ||
| 56 | -.issue-form-holder .ui-box .data { | ||
| 57 | - margin: 0; | ||
| 58 | - padding: 0; | ||
| 59 | -} | ||
| 60 | - | ||
| 61 | -body.project-page .merge-request-form-holder table.no-borders tr, | ||
| 62 | -body.project-page .merge-request-form-holder table.no-borders td, | ||
| 63 | -body.project-page .issue-form-holder table.no-borders tr, | ||
| 64 | -body.project-page .issue-form-holder table.no-borders td, | ||
| 65 | -body.project-page .new_snippet table tr, | ||
| 66 | -body.project-page .new_snippet table td, | ||
| 67 | -body.project-page .edit_snippet table tr, | ||
| 68 | -body.project-page .edit_snippet table td | ||
| 69 | -{ | ||
| 70 | - &:hover { | ||
| 71 | - background:none; | ||
| 72 | - } | ||
| 73 | -} | ||
| 74 | - | ||
| 75 | - | ||
| 76 | -#issues-table { | ||
| 77 | - tr { | ||
| 78 | - border-top: 1px solid $lite_border_color; | ||
| 79 | - &:first-child { | ||
| 80 | - border:none; | ||
| 81 | - } | ||
| 82 | - } | ||
| 83 | - | ||
| 84 | -} |
| @@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
| 1 | +/* Login Page */ | ||
| 2 | +body.login-page{ | ||
| 3 | + padding-top: 10%; | ||
| 4 | + background:#f1f1f1; | ||
| 5 | +} | ||
| 6 | + | ||
| 7 | +.login-box{ | ||
| 8 | + width: 304px; | ||
| 9 | + position: relative; | ||
| 10 | + border-radius: 5px; | ||
| 11 | + margin: auto; | ||
| 12 | + padding: 20px; | ||
| 13 | + background: white; | ||
| 14 | +} | ||
| 15 | + | ||
| 16 | +.login-box .login-logo{ | ||
| 17 | + margin: 10px 0 30px 0; | ||
| 18 | + display: block; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +.login-box input.text{background-color: #f1f1f1; font-size: 16px; border-radius: 0; padding: 14px 10px; width: 280px} | ||
| 22 | + | ||
| 23 | +.login-box input.text.top{ | ||
| 24 | + -webkit-border-top-left-radius: 5px; | ||
| 25 | + -webkit-border-top-right-radius: 5px; | ||
| 26 | + -moz-border-radius-topleft: 5px; | ||
| 27 | + -moz-border-radius-topright: 5px; | ||
| 28 | + border-top-left-radius: 5px; | ||
| 29 | + border-top-right-radius: 5px; | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +.login-box input.text.bottom{ | ||
| 33 | + -webkit-border-bottom-right-radius: 5px; | ||
| 34 | + -webkit-border-bottom-left-radius: 5px; | ||
| 35 | + -moz-border-radius-bottomright: 5px; | ||
| 36 | + -moz-border-radius-bottomleft: 5px; | ||
| 37 | + border-bottom-right-radius: 5px; | ||
| 38 | + border-bottom-left-radius: 5px; | ||
| 39 | + border-top: 0; | ||
| 40 | + margin-bottom: 20px; | ||
| 41 | +} | ||
| 42 | + | ||
| 43 | +.login-box a.forgot{float: right; padding-top: 6px} | ||
| 44 | + |
| @@ -0,0 +1,118 @@ | @@ -0,0 +1,118 @@ | ||
| 1 | +@import "bootstrap"; | ||
| 2 | + | ||
| 3 | +/** GITLAB colors **/ | ||
| 4 | +$text_color:#222; | ||
| 5 | +$lite_text_color: #666; | ||
| 6 | +$link_color:#2A79A3; | ||
| 7 | +$active_link_color:#2FA0BB; | ||
| 8 | +$active_bg_color:#79C3E0; | ||
| 9 | +$active_bd_color: #2FA0BB; | ||
| 10 | +$border_color:#CCC; | ||
| 11 | +$lite_border_color:#EEE; | ||
| 12 | +$min_app_width:980px; | ||
| 13 | +$max_app_width:980px; | ||
| 14 | +$app_padding:20px; | ||
| 15 | +$bg_color: #FFF; | ||
| 16 | +$styled_border_color: #2FA0BB; | ||
| 17 | +$color: "#4BB8D2"; | ||
| 18 | +$blue_link: "#2fa0bb"; | ||
| 19 | + | ||
| 20 | + | ||
| 21 | +/** Style colors **/ | ||
| 22 | +$style_color: #474D57; | ||
| 23 | +$hover: #FDF5D9; | ||
| 24 | + | ||
| 25 | + | ||
| 26 | +/** MIXINS **/ | ||
| 27 | +@mixin shade { | ||
| 28 | + -moz-box-shadow: 0 0 3px #ddd; | ||
| 29 | + -webkit-box-shadow: 0 0 3px #ddd; | ||
| 30 | + box-shadow: 0 0 3px #ddd; | ||
| 31 | +} | ||
| 32 | + | ||
| 33 | + | ||
| 34 | +@mixin round-borders-bottom($radius) { | ||
| 35 | + border-top: 1px solid #eaeaea; | ||
| 36 | + -moz-border-radius-bottomright: $radius; | ||
| 37 | + -moz-border-radius-bottomleft: $radius; | ||
| 38 | + border-bottom-right-radius: $radius; | ||
| 39 | + border-bottom-left-radius: $radius; | ||
| 40 | + -webkit-border-bottom-left-radius: $radius; | ||
| 41 | + -webkit-border-bottom-right-radius: $radius; | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +@mixin round-borders-top($radius) { | ||
| 45 | + border-top: 1px solid #eaeaea; | ||
| 46 | + -moz-border-radius-topright: $radius; | ||
| 47 | + -moz-border-radius-topleft: $radius; | ||
| 48 | + border-top-right-radius: $radius; | ||
| 49 | + border-top-left-radius: $radius; | ||
| 50 | + -webkit-border-top-left-radius: $radius; | ||
| 51 | + -webkit-border-top-right-radius: $radius; | ||
| 52 | +} | ||
| 53 | + | ||
| 54 | +@mixin round-borders-all($radius) { | ||
| 55 | + border: 1px solid #eaeaea; | ||
| 56 | + -moz-border-radius: $radius; | ||
| 57 | + -webkit-border-radius: $radius; | ||
| 58 | + border-radius: $radius; | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +/** | ||
| 62 | + * This file represent some UI that can be changed | ||
| 63 | + * during web app restyle or theme select. | ||
| 64 | + * | ||
| 65 | + * Next items should be placed there | ||
| 66 | + * - link colors | ||
| 67 | + * - header styles | ||
| 68 | + * - main menu styles | ||
| 69 | + * | ||
| 70 | + */ | ||
| 71 | +@import "ui_basic.scss"; | ||
| 72 | + | ||
| 73 | +/** | ||
| 74 | + * UI mars theme | ||
| 75 | + */ | ||
| 76 | +@import "ui_mars.scss"; | ||
| 77 | + | ||
| 78 | +/** | ||
| 79 | + * Most of application styles placed here. | ||
| 80 | + * This file represent common UI that should not be changed between themes | ||
| 81 | + * or project restyling like form width or user avatar class or commit title | ||
| 82 | + * | ||
| 83 | + * TODO: clean it | ||
| 84 | + */ | ||
| 85 | +@import "common.scss"; | ||
| 86 | + | ||
| 87 | +/** | ||
| 88 | + * This scss file redefine chozen selectbox styles for | ||
| 89 | + * project Branch/Tag select element | ||
| 90 | + */ | ||
| 91 | +@import "ref_select.scss"; | ||
| 92 | + | ||
| 93 | +/** | ||
| 94 | + * Code (files list) styles. Browsing project files there | ||
| 95 | + */ | ||
| 96 | +@import "tree.scss"; | ||
| 97 | + | ||
| 98 | +/** | ||
| 99 | + * This file represent notes(comments) styles | ||
| 100 | + */ | ||
| 101 | +@import "notes.scss"; | ||
| 102 | + | ||
| 103 | +/** | ||
| 104 | + * Devise styles | ||
| 105 | + */ | ||
| 106 | +@import "login.scss"; | ||
| 107 | + | ||
| 108 | +/** | ||
| 109 | + * CODE HIGHTLIGHT BASE | ||
| 110 | + * | ||
| 111 | + */ | ||
| 112 | +@import "highlight.scss"; | ||
| 113 | + | ||
| 114 | +/** | ||
| 115 | + * CODE HIGHTLIGHT DARK schema | ||
| 116 | + * | ||
| 117 | + */ | ||
| 118 | +@import "highlight.black.scss"; |
app/assets/stylesheets/merge_requests.css.scss
| @@ -1,10 +0,0 @@ | @@ -1,10 +0,0 @@ | ||
| 1 | -// Place all the styles related to the MergeRequests controller here. | ||
| 2 | -// They will automatically be included in application.css. | ||
| 3 | -// You can use Sass (SCSS) here: http://sass-lang.com/ | ||
| 4 | - | ||
| 5 | - | ||
| 6 | -.merge-request-form-holder { | ||
| 7 | - select { | ||
| 8 | - width:300px; | ||
| 9 | - } | ||
| 10 | -} |
app/assets/stylesheets/notes.css.scss
| @@ -1,52 +0,0 @@ | @@ -1,52 +0,0 @@ | ||
| 1 | -/** Notes **/ | ||
| 2 | - | ||
| 3 | -#notes-list { | ||
| 4 | - display:block; | ||
| 5 | - list-style:none; | ||
| 6 | - margin:0px; | ||
| 7 | - padding:0px; | ||
| 8 | -} | ||
| 9 | - | ||
| 10 | -.issue_notes { | ||
| 11 | - .note_content { | ||
| 12 | - float:left; | ||
| 13 | - width:400px; | ||
| 14 | - } | ||
| 15 | -} | ||
| 16 | - | ||
| 17 | -/* Note textare */ | ||
| 18 | -#note_note { | ||
| 19 | - height:100px; | ||
| 20 | - width:97%; | ||
| 21 | - font-size:14px; | ||
| 22 | -} | ||
| 23 | - | ||
| 24 | -#new_note { | ||
| 25 | - #note_note { | ||
| 26 | - height:25px; | ||
| 27 | - } | ||
| 28 | - .attach_holder { | ||
| 29 | - display:none; | ||
| 30 | - } | ||
| 31 | -} | ||
| 32 | - | ||
| 33 | -#notes-list .note .delete-note { display:none; } | ||
| 34 | -#notes-list .note:hover .delete-note { display:block; } | ||
| 35 | - | ||
| 36 | -body.project-page #notes-list .note {padding: 10px 0; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | ||
| 37 | -body.project-page #notes-list .note img{float: left; margin-right: 10px;} | ||
| 38 | -body.project-page #notes-list .note span.note-title{display: block;} | ||
| 39 | -body.project-page #notes-list .note span.note-title{margin-bottom: 10px} | ||
| 40 | -body.project-page #notes-list .note span.note-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 41 | -body.project-page #notes-list .note span.note-author strong{font-weight: bold; font-style: normal;} | ||
| 42 | - | ||
| 43 | - | ||
| 44 | -.note .note-title { margin-left:55px; } | ||
| 45 | - | ||
| 46 | -p.notify_controls input{ | ||
| 47 | - margin: 5px; | ||
| 48 | -} | ||
| 49 | - | ||
| 50 | -p.notify_controls span{ | ||
| 51 | - font-weight: 700; | ||
| 52 | -} |
| @@ -0,0 +1,121 @@ | @@ -0,0 +1,121 @@ | ||
| 1 | +/** | ||
| 2 | + * Notes | ||
| 3 | + * | ||
| 4 | + */ | ||
| 5 | +#notes-list, | ||
| 6 | +#new_notes_list { | ||
| 7 | + display:block; | ||
| 8 | + list-style:none; | ||
| 9 | + margin:0px; | ||
| 10 | + padding:0px; | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +#new_notes_list li:last-child{ | ||
| 14 | + border-bottom:1px solid #aaa; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +.issue_notes { | ||
| 18 | + .note_content { | ||
| 19 | + float:left; | ||
| 20 | + width:400px; | ||
| 21 | + } | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | +/* Note textare */ | ||
| 25 | +#note_note { | ||
| 26 | + height:100px; | ||
| 27 | + width:97%; | ||
| 28 | + font-size:14px; | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | +#new_note { | ||
| 32 | + #note_note { | ||
| 33 | + height:25px; | ||
| 34 | + } | ||
| 35 | + .attach_holder { | ||
| 36 | + display:none; | ||
| 37 | + } | ||
| 38 | +} | ||
| 39 | + | ||
| 40 | +.note .delete-note { | ||
| 41 | + display:none; | ||
| 42 | + float:right; | ||
| 43 | +} | ||
| 44 | +.note:hover .delete-note { display:block; } | ||
| 45 | +.note {padding: 10px 0; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | ||
| 46 | +.note img{float: left; margin-right: 10px;} | ||
| 47 | +.note span.note-title{display: block;} | ||
| 48 | +.note span.note-title{margin-bottom: 10px} | ||
| 49 | +.note span.note-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 50 | +.note span.note-author strong{font-weight: bold; font-style: normal;} | ||
| 51 | +.note p { color:$style_color; } | ||
| 52 | +.note .note-author { color: $style_color;} | ||
| 53 | + | ||
| 54 | +.note .note-title { margin-left:55px; } | ||
| 55 | + | ||
| 56 | +p.notify_controls input{ | ||
| 57 | + margin: 5px; | ||
| 58 | +} | ||
| 59 | + | ||
| 60 | +p.notify_controls span{ | ||
| 61 | + font-weight: 700; | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +tr.line_notes_row { | ||
| 65 | + border-bottom:1px solid #DDD; | ||
| 66 | + &.reply { | ||
| 67 | + background:#eee; | ||
| 68 | + | ||
| 69 | + td { | ||
| 70 | + padding:7px 10px; | ||
| 71 | + } | ||
| 72 | + a.line_note_reply_link { | ||
| 73 | + @include round-borders-all(4px); | ||
| 74 | + border-color:#aaa; | ||
| 75 | + background: #bbb; | ||
| 76 | + padding: 3px 20px; | ||
| 77 | + color: white; | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + ul { | ||
| 81 | + margin:0; | ||
| 82 | + li { | ||
| 83 | + padding:0; | ||
| 84 | + border:none; | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +.line_notes_row, .per_line_form { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } | ||
| 90 | + | ||
| 91 | +.per_line_form { | ||
| 92 | + background:#f5f5f5; | ||
| 93 | + form { margin: 0; } | ||
| 94 | + td { | ||
| 95 | + border-bottom:1px solid #ddd; | ||
| 96 | + } | ||
| 97 | +} | ||
| 98 | + | ||
| 99 | +td .line_note_link { | ||
| 100 | + position:absolute; | ||
| 101 | + margin-left:-70px; | ||
| 102 | + margin-top:-10px; | ||
| 103 | + z-index:10; | ||
| 104 | + background: url("comment_add.png") no-repeat left 0; | ||
| 105 | + width:32px; | ||
| 106 | + height:32px; | ||
| 107 | + | ||
| 108 | + opacity: 0.0; | ||
| 109 | + filter: alpha(opacity=0); | ||
| 110 | + | ||
| 111 | + &:hover { | ||
| 112 | + opacity: 1.0; | ||
| 113 | + filter: alpha(opacity=100); | ||
| 114 | + } | ||
| 115 | +} | ||
| 116 | + | ||
| 117 | +.diff_file_content tr.line_holder:hover > td { background: $hover !important; } | ||
| 118 | +.diff_file_content tr.line_holder:hover > td .line_note_link { | ||
| 119 | + opacity: 1.0; | ||
| 120 | + filter: alpha(opacity=100); | ||
| 121 | +} |
app/assets/stylesheets/projects.css.scss
| @@ -1,572 +0,0 @@ | @@ -1,572 +0,0 @@ | ||
| 1 | -body.project-page h2.icon .project-name, body.project-page h2.icon d{border: 1px solid #eee; padding: 5px 30px 5px 10px; border-radius: 5px; position: relative;} | ||
| 2 | -body.project-page h2.icon .project-name i.arrow{float: right; | ||
| 3 | - position: absolute; | ||
| 4 | - right: 10px; | ||
| 5 | - top: 13px; | ||
| 6 | - display: block; | ||
| 7 | - background: url('images.png') no-repeat -97px -29px; | ||
| 8 | - width: 4px; | ||
| 9 | - height: 5px; | ||
| 10 | -} | ||
| 11 | - | ||
| 12 | -body.project-page h2.icon span{ background-position: -78px -68px; } | ||
| 13 | -body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; padding-bottom: 10px;} | ||
| 14 | -body.project-page .page-title{margin-bottom: 0} | ||
| 15 | - | ||
| 16 | -body.project-page .project-sidebar { | ||
| 17 | - width: 110px; | ||
| 18 | - left: 0; | ||
| 19 | - top: 0; | ||
| 20 | - height: 100%; | ||
| 21 | - bottom: 0; | ||
| 22 | - position: absolute; | ||
| 23 | - float: left; | ||
| 24 | - display: inline-block; | ||
| 25 | - background: #FFF; | ||
| 26 | - padding: $app_padding; | ||
| 27 | - padding-right:0px; | ||
| 28 | - margin: 0; | ||
| 29 | - border-right: 1px solid $border_color; | ||
| 30 | -} | ||
| 31 | - | ||
| 32 | -body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 0 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px; width: 136px} | ||
| 33 | -body.projects-page input.text.git-url {margin:10px 0 0 } | ||
| 34 | -.git_url_wrapper { margin-right:50px } | ||
| 35 | - | ||
| 36 | -.projects_selector:hover > .project-box{ -moz-box-shadow:0px 0px 10px rgba(0, 0, 0, .1); -webkit-box-shadow:0px 0px 10px rgba(0, 0, 0, .1); box-shadow:0px 0px 10px rgba(0, 0, 0, .1); } | ||
| 37 | - | ||
| 38 | - | ||
| 39 | -/* New project Page */ | ||
| 40 | -.new-project-page .container table{background: white} | ||
| 41 | -body.project-page .project-sidebar aside{width: 109px} | ||
| 42 | -body.project-page .project-sidebar aside a{ | ||
| 43 | - display: block; | ||
| 44 | - position: relative; | ||
| 45 | - padding: 15px 10px; | ||
| 46 | - margin: 10px 0 0 0; | ||
| 47 | - | ||
| 48 | - | ||
| 49 | -} | ||
| 50 | -body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px} | ||
| 51 | -body.project-page .project-sidebar aside a.current { | ||
| 52 | - color: white; | ||
| 53 | - background: $active_bg_color; | ||
| 54 | - border: 1px solid $active_bd_color; | ||
| 55 | - border-radius:5px; | ||
| 56 | - | ||
| 57 | - | ||
| 58 | - -webkit-border-top-right-radius: 0; | ||
| 59 | - -webkit-border-bottom-right-radius: 0; | ||
| 60 | - -moz-border-radius-topright: 0px; | ||
| 61 | - -moz-border-radius-bottomright: 0px; | ||
| 62 | - border-top-right-radius: 0; | ||
| 63 | - border-bottom-right-radius: 0; | ||
| 64 | - margin-right: -1px; | ||
| 65 | -} | ||
| 66 | -body.project-page .project-content{ padding: $app_padding; display: block; margin-left: 130px; min-height: 600px} | ||
| 67 | -body.project-page .project-content h2{ margin-top: 6px} | ||
| 68 | -body.project-page .project-content .button.right{margin-left: 20px} | ||
| 69 | -body.project-page table .commit a{color: #{$blue_link}} | ||
| 70 | -body.project-page table th, body.project-page table td{ border-bottom: 1px solid #DEE2E3;} | ||
| 71 | -body.project-page .fixed{position: fixed; } | ||
| 72 | - | ||
| 73 | - | ||
| 74 | - | ||
| 75 | - | ||
| 76 | -/** File stat **/ | ||
| 77 | -.file_stats { | ||
| 78 | - span { | ||
| 79 | - img { | ||
| 80 | - width:14px; | ||
| 81 | - float:left; | ||
| 82 | - margin-right: 6px; | ||
| 83 | - padding:2px 0; | ||
| 84 | - } | ||
| 85 | - } | ||
| 86 | -} | ||
| 87 | - | ||
| 88 | -.round-borders { | ||
| 89 | - @include round-borders-all(4px); | ||
| 90 | - padding: 4px 0px; | ||
| 91 | -} | ||
| 92 | - | ||
| 93 | -table.round-borders { | ||
| 94 | - float:left; | ||
| 95 | - text-align: left; | ||
| 96 | -} | ||
| 97 | - | ||
| 98 | - | ||
| 99 | - | ||
| 100 | -/** PROJECTS **/ | ||
| 101 | -input.ssh_project_url { | ||
| 102 | - padding:5px; | ||
| 103 | - margin:0px; | ||
| 104 | - float:right; | ||
| 105 | - width:400px; | ||
| 106 | - text-align:center; | ||
| 107 | -} | ||
| 108 | - | ||
| 109 | -#projects-list .project { | ||
| 110 | - height:50px; | ||
| 111 | -} | ||
| 112 | - | ||
| 113 | -#tree-slider .tree-item, | ||
| 114 | -#projects-list .project, | ||
| 115 | -#snippets-table .snippet, | ||
| 116 | -#issues-table .issue{ | ||
| 117 | - cursor:pointer; | ||
| 118 | -} | ||
| 119 | - | ||
| 120 | -.clear { | ||
| 121 | - clear: both; | ||
| 122 | -} | ||
| 123 | - | ||
| 124 | - | ||
| 125 | -/** Buttons **/ | ||
| 126 | -.lbutton, | ||
| 127 | -.lite_button { | ||
| 128 | - display:block; | ||
| 129 | - float:left; | ||
| 130 | - margin: 0px 5px 0px 0px; | ||
| 131 | - padding:5px 10px; | ||
| 132 | - | ||
| 133 | - font-family:"Helvetica Neue", Arial, Helvetica, sans-serif; | ||
| 134 | - border:1px solid #D3D3D3; | ||
| 135 | - background:white; | ||
| 136 | - font-size:12px !important; | ||
| 137 | - line-height:130%; | ||
| 138 | - text-decoration:none; | ||
| 139 | - font-weight:bold; | ||
| 140 | - color:#565656; | ||
| 141 | - cursor:pointer; | ||
| 142 | - | ||
| 143 | - &:hover { | ||
| 144 | - border:1px solid #C2E1EF; | ||
| 145 | - color: #0099FF; | ||
| 146 | - } | ||
| 147 | - | ||
| 148 | - &.hm { | ||
| 149 | - margin: 0px 0px; | ||
| 150 | - } | ||
| 151 | - | ||
| 152 | - &.vm { | ||
| 153 | - margin: 5px 0px; | ||
| 154 | - } | ||
| 155 | -} | ||
| 156 | - | ||
| 157 | -#user_projects_limit{ | ||
| 158 | - width: 60px; | ||
| 159 | -} | ||
| 160 | - | ||
| 161 | -.handle:hover{ | ||
| 162 | - cursor: move; | ||
| 163 | -} | ||
| 164 | - | ||
| 165 | -.project-refs-form { | ||
| 166 | - span { | ||
| 167 | - background: none !important; | ||
| 168 | - position:static !important; | ||
| 169 | - width:auto !important; | ||
| 170 | - height: auto !important; | ||
| 171 | - } | ||
| 172 | -} | ||
| 173 | - | ||
| 174 | -.project-refs-select { | ||
| 175 | - width:200px; | ||
| 176 | -} | ||
| 177 | - | ||
| 178 | -.filter .left { margin-right:15px; } | ||
| 179 | - | ||
| 180 | -body.project-page table .commit { | ||
| 181 | - a.tree-commit-link { | ||
| 182 | - color:#444; | ||
| 183 | - &:hover { | ||
| 184 | - text-decoration:underline; | ||
| 185 | - } | ||
| 186 | - } | ||
| 187 | -} | ||
| 188 | - | ||
| 189 | -/** NEW PROJECT **/ | ||
| 190 | -.new-project-hodler { | ||
| 191 | - .icon span { background-position: -31px -70px; } | ||
| 192 | - td { border-bottom: 1px solid #DEE2E3; } | ||
| 193 | -} | ||
| 194 | - | ||
| 195 | -/** Feed entry **/ | ||
| 196 | -.commit, | ||
| 197 | -.snippet, | ||
| 198 | -.message { | ||
| 199 | - .title { | ||
| 200 | - color:#666; | ||
| 201 | - a { color:#666 !important; } | ||
| 202 | - p { margin-top:0px; } | ||
| 203 | - } | ||
| 204 | - .author { color: #999 } | ||
| 205 | -} | ||
| 206 | - | ||
| 207 | -/** JQuery UI **/ | ||
| 208 | -.ui-autocomplete { @include round-borders-all(5px); } | ||
| 209 | -.ui-menu-item { cursor: pointer } | ||
| 210 | -.ui-selectmenu{ | ||
| 211 | - @include round-borders-all(4px); | ||
| 212 | - margin-right:10px; | ||
| 213 | - font-size:1.5em; | ||
| 214 | - height:auto; | ||
| 215 | - font-weight:bold; | ||
| 216 | - .ui-selectmenu-status { | ||
| 217 | - padding:3px 10px; | ||
| 218 | - } | ||
| 219 | -} | ||
| 220 | - | ||
| 221 | -/** Snippets **/ | ||
| 222 | -.new_snippet textarea, | ||
| 223 | -.edit_snippet textarea { | ||
| 224 | - height:300px; | ||
| 225 | - padding: 8px; | ||
| 226 | - width: 95%; | ||
| 227 | -} | ||
| 228 | -.snippet .action-links { | ||
| 229 | - display:none; | ||
| 230 | - a { | ||
| 231 | - margin-left:10px; | ||
| 232 | - } | ||
| 233 | -} | ||
| 234 | -.snippet:hover .action-links { display:block; } | ||
| 235 | - | ||
| 236 | -/** ISSUES TAGS **/ | ||
| 237 | -.tag { | ||
| 238 | - @include round-borders-all(4px); | ||
| 239 | - padding:2px 4px; | ||
| 240 | - border:none; | ||
| 241 | - text-shadow:none; | ||
| 242 | - | ||
| 243 | - &.inline { | ||
| 244 | - display:inline; | ||
| 245 | - } | ||
| 246 | - | ||
| 247 | - &.high, &.closed { | ||
| 248 | - background: #D12F19; | ||
| 249 | - color:white; | ||
| 250 | - } | ||
| 251 | - | ||
| 252 | - &.today, &.open { | ||
| 253 | - background: #44aa22; | ||
| 254 | - color:white; | ||
| 255 | - } | ||
| 256 | - | ||
| 257 | - &.yours { | ||
| 258 | - background: #4466cc; | ||
| 259 | - color:white; | ||
| 260 | - } | ||
| 261 | - &.normal { | ||
| 262 | - background: #2c5ca6; | ||
| 263 | - color:white; | ||
| 264 | - } | ||
| 265 | - &.notes { | ||
| 266 | - background: #2c5c66; | ||
| 267 | - color:white; | ||
| 268 | - } | ||
| 269 | - &.note { | ||
| 270 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); | ||
| 271 | - background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 272 | - background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 273 | - background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 274 | - color: #777; | ||
| 275 | - border: 1px solid #DEDFE1; | ||
| 276 | - } | ||
| 277 | - &.issue { | ||
| 278 | - background: #D12F19; | ||
| 279 | - color:white; | ||
| 280 | - } | ||
| 281 | - &.commit { | ||
| 282 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); | ||
| 283 | - background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 284 | - background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 285 | - background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 286 | - color: #777; | ||
| 287 | - border: 1px solid #DEDFE1; | ||
| 288 | - } | ||
| 289 | -} | ||
| 290 | - | ||
| 291 | -#holder { | ||
| 292 | - background:#FAFAFA; | ||
| 293 | - border: 1px solid #EEE; | ||
| 294 | - cursor: move; | ||
| 295 | - height: 70%; | ||
| 296 | - overflow: hidden; | ||
| 297 | -} | ||
| 298 | - | ||
| 299 | -/* Project Dashboard Page */ | ||
| 300 | -html, body { height: 100%; } | ||
| 301 | - | ||
| 302 | -body.dashboard.project-page .news-feed h2{float: left;} | ||
| 303 | -body.dashboard.project-page .news-feed .project-updates {margin-bottom: 20px; display: block; width: 100%;} | ||
| 304 | -body.dashboard.project-page .news-feed .project-updates .data{ padding: 0} | ||
| 305 | -body.dashboard.project-page .news-feed .project-updates a.project-update {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | ||
| 306 | -body.dashboard.project-page .news-feed .project-updates a.project-update:last-child{border-bottom: 0} | ||
| 307 | -body.dashboard.project-page .news-feed .project-updates a.project-update img{float: left; margin-right: 10px;} | ||
| 308 | -body.dashboard.project-page .news-feed .project-updates a.project-update span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;} | ||
| 309 | -body.dashboard.project-page .news-feed .project-updates a.project-update span.update-title{margin-bottom: 10px} | ||
| 310 | -body.dashboard.project-page .news-feed .project-updates a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 311 | -body.dashboard.project-page .news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;} | ||
| 312 | -/* eo Dashboard Page */ | ||
| 313 | - | ||
| 314 | - | ||
| 315 | -/** Merge requests */ | ||
| 316 | -body.project-page .merge-request-commits {margin-bottom: 20px; display: block; width: 100%;} | ||
| 317 | -body.project-page .merge-request-commits .data{ padding: 0} | ||
| 318 | -body.project-page .merge-request-commits a.commit {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | ||
| 319 | -body.project-page .merge-request-commits a.commit:last-child{border-bottom: 0} | ||
| 320 | -body.project-page .merge-request-commits a.commit img{float: left; margin-right: 10px;} | ||
| 321 | -body.project-page .merge-request-commits a.commit span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;} | ||
| 322 | -body.project-page .merge-request-commits a.commit span.update-title{margin-bottom: 10px} | ||
| 323 | -body.project-page .merge-request-commits a.commit span.update-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 324 | -body.project-page .merge-request-commits a.commit span.update-author strong{font-weight: bold; font-style: normal;} | ||
| 325 | - | ||
| 326 | - | ||
| 327 | -/** Update entry **/ | ||
| 328 | -.update-data { padding: 0 } | ||
| 329 | -.update-data { width:100%; } | ||
| 330 | -.update-data.ui-box .data { padding:0; } | ||
| 331 | -a.update-item {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | ||
| 332 | -a.update-item:last-child{border-bottom: 0} | ||
| 333 | -a.update-item img{float: left; margin-right: 10px;} | ||
| 334 | -a.update-item span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;} | ||
| 335 | -a.update-item span.update-title{margin-bottom: 10px} | ||
| 336 | -a.update-item span.update-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 337 | -a.update-item span.update-author strong{font-weight: bold; font-style: normal;} | ||
| 338 | - | ||
| 339 | - | ||
| 340 | -body.project-page .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; } | ||
| 341 | - | ||
| 342 | -body.projects-page input.text.git-url.project_list_url { width:165px; } | ||
| 343 | - | ||
| 344 | - | ||
| 345 | -body.project-page table.no-borders th { | ||
| 346 | - background:none; | ||
| 347 | - border-bottom:1px solid #CCC; | ||
| 348 | - color:#333; | ||
| 349 | -} | ||
| 350 | - | ||
| 351 | -body.project-page table.no-borders tr, | ||
| 352 | -body.project-page table.no-borders td{ | ||
| 353 | - border:none; | ||
| 354 | -} | ||
| 355 | - | ||
| 356 | -.ajax-tab-loading { | ||
| 357 | - padding:40px; | ||
| 358 | - display:none; | ||
| 359 | -} | ||
| 360 | - | ||
| 361 | -#tree-content-holder { float:left; width:100%; } | ||
| 362 | - | ||
| 363 | -#tree-readme-holder { | ||
| 364 | - float:left; | ||
| 365 | - width:100%; | ||
| 366 | - | ||
| 367 | - .readme { | ||
| 368 | - @include round-borders-all(4px); | ||
| 369 | - padding: 4px 15px; | ||
| 370 | - background:#F7F7F7; | ||
| 371 | - } | ||
| 372 | -} | ||
| 373 | - | ||
| 374 | - | ||
| 375 | - | ||
| 376 | -/* Commit Page */ | ||
| 377 | -.entity-info {float: right;} | ||
| 378 | -.entity-button{ | ||
| 379 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4)); | ||
| 380 | - background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 381 | - background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 382 | - background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 383 | - box-shadow: 0 -1px 0 white inset; | ||
| 384 | - display: block; | ||
| 385 | - border: 1px solid #eee; | ||
| 386 | - border-radius: 5px; | ||
| 387 | - margin-bottom: 2px; | ||
| 388 | - position: relative; | ||
| 389 | - padding: 4px 10px; | ||
| 390 | - font-size: 11px; | ||
| 391 | - padding-right: 20px; | ||
| 392 | -} | ||
| 393 | - | ||
| 394 | -.entity-button i{ | ||
| 395 | - background: url('images.png') no-repeat -138px -27px; | ||
| 396 | - width: 6px; | ||
| 397 | - height: 9px; | ||
| 398 | - float: right; | ||
| 399 | - position: absolute; | ||
| 400 | - top: 6px; | ||
| 401 | - right: 5px; | ||
| 402 | -} | ||
| 403 | -.box-arrow{float: right; background: #E3E5EA; padding: 10px; border-radius: 5px; margin-top: 2px; text-shadow: none; color: #999; margin: 1.5em 0;} | ||
| 404 | - | ||
| 405 | -h4.dash-tabs { | ||
| 406 | - margin: 0; | ||
| 407 | - border-bottom: 1px solid #ccc; | ||
| 408 | - padding: 10px 10px; | ||
| 409 | - font-size: 11px; | ||
| 410 | - padding-left:20px; | ||
| 411 | - font-weight: bold; text-transform: uppercase; | ||
| 412 | - background: #F7F7F7; | ||
| 413 | - margin-bottom:20px; | ||
| 414 | - height:13px; | ||
| 415 | - | ||
| 416 | -} | ||
| 417 | - | ||
| 418 | -.dash-button { | ||
| 419 | - border-right: 1px solid #ddd; | ||
| 420 | - background:none; | ||
| 421 | - padding: 10px 15px; | ||
| 422 | - float:left; | ||
| 423 | - position:relative; | ||
| 424 | - top:-10px; | ||
| 425 | - left:0px; | ||
| 426 | - height:13px; | ||
| 427 | - | ||
| 428 | - &:first-child { | ||
| 429 | - border-left: 1px solid #ddd; | ||
| 430 | - } | ||
| 431 | - &.active { | ||
| 432 | - background: #eaeaea; | ||
| 433 | - } | ||
| 434 | -} | ||
| 435 | - | ||
| 436 | - | ||
| 437 | -.dashboard-loader { | ||
| 438 | - float:right; | ||
| 439 | - margin-right:30px; | ||
| 440 | - display:none; | ||
| 441 | -} | ||
| 442 | - | ||
| 443 | - | ||
| 444 | -.merge-tabs { | ||
| 445 | - margin: 0; | ||
| 446 | - border: 1px solid #ccc; | ||
| 447 | - padding: 5px; | ||
| 448 | - font-size: 12px; | ||
| 449 | - background: #F7F7F7; | ||
| 450 | - margin-bottom:20px; | ||
| 451 | - height:26px; | ||
| 452 | - | ||
| 453 | - -moz-border-radius: 4px; | ||
| 454 | - -webkit-border-radius: 4px; | ||
| 455 | - border-radius: 4px; | ||
| 456 | - | ||
| 457 | - .tab { | ||
| 458 | - font-weight: bold; | ||
| 459 | - border-right: 1px solid #ddd; | ||
| 460 | - background:none; | ||
| 461 | - padding: 10px; | ||
| 462 | - min-width:60px; | ||
| 463 | - float:left; | ||
| 464 | - position:relative; | ||
| 465 | - top:-5px; | ||
| 466 | - left:-5px; | ||
| 467 | - height:16px; | ||
| 468 | - padding-left:34px; | ||
| 469 | - | ||
| 470 | - span { | ||
| 471 | - width: 20px; | ||
| 472 | - height: 20px; | ||
| 473 | - display: inline-block; | ||
| 474 | - position: absolute; | ||
| 475 | - left: 8px; | ||
| 476 | - top: 8px; | ||
| 477 | - } | ||
| 478 | - | ||
| 479 | - &.active { | ||
| 480 | - background: #eaeaea; | ||
| 481 | - } | ||
| 482 | - } | ||
| 483 | -} | ||
| 484 | -.merge-tabs.repository .tab span{ background: url("images.png") no-repeat -38px -77px; } | ||
| 485 | -.activities-tab span { background: url("images.png") no-repeat -161px -1px; } | ||
| 486 | -.stat-tab span, | ||
| 487 | -.team-tab span, | ||
| 488 | -.snippets-tab span { background: url("images.png") no-repeat -38px -77px; } | ||
| 489 | -.files-tab span { background: url("images.png") no-repeat -112px -23px; } | ||
| 490 | - | ||
| 491 | -.merge-notes-tab span { background: url("images.png") no-repeat -161px -1px; } | ||
| 492 | -.merge-commits-tab span { background: url("images.png") no-repeat -86px 1px; } | ||
| 493 | -.merge-diffs-tab span { background: url("images.png") no-repeat -118px 1px; } | ||
| 494 | -.merge-tabs .dashboard-loader { padding:8px; } | ||
| 495 | - | ||
| 496 | -.user-mention { | ||
| 497 | - color: #2FA0BB; | ||
| 498 | - font-weight: bold; | ||
| 499 | -} | ||
| 500 | - | ||
| 501 | -.author { | ||
| 502 | - color: #999; | ||
| 503 | -} | ||
| 504 | - | ||
| 505 | - | ||
| 506 | -.red-button{ | ||
| 507 | - border-radius: 5px; | ||
| 508 | - font-size: 12px; | ||
| 509 | - font-weight: bold; | ||
| 510 | - padding: 5px 17px; | ||
| 511 | - border: 1px solid #999; | ||
| 512 | - color: #666; | ||
| 513 | - display: inline-block; | ||
| 514 | - box-shadow: 0 1px 2px rgba(0,0,0,.3); | ||
| 515 | - background: #D12F19; | ||
| 516 | - color: white; | ||
| 517 | -} | ||
| 518 | - | ||
| 519 | -.positive-button{ | ||
| 520 | - border-radius: 5px; | ||
| 521 | - font-size: 12px; | ||
| 522 | - font-weight: bold; | ||
| 523 | - padding: 5px 17px; | ||
| 524 | - border: 1px solid #999; | ||
| 525 | - color: #666; | ||
| 526 | - display: inline-block; | ||
| 527 | - box-shadow: 0 1px 2px rgba(0,0,0,.3); | ||
| 528 | - background: #4A2; | ||
| 529 | - color: white; | ||
| 530 | -} | ||
| 531 | - | ||
| 532 | - | ||
| 533 | -.dark_scheme_box { | ||
| 534 | - padding:20px 0; | ||
| 535 | - | ||
| 536 | - label { | ||
| 537 | - float:left; | ||
| 538 | - box-shadow: 0 0px 5px rgba(0,0,0,.3); | ||
| 539 | - | ||
| 540 | - img { | ||
| 541 | - } | ||
| 542 | - } | ||
| 543 | -} | ||
| 544 | - | ||
| 545 | -a.project-update.titled { | ||
| 546 | - position: relative; | ||
| 547 | - padding-left: 235px !important; | ||
| 548 | - | ||
| 549 | - .title-block { | ||
| 550 | - padding: 10px; | ||
| 551 | - width: 205px; | ||
| 552 | - position: absolute; | ||
| 553 | - left: 0; | ||
| 554 | - top: 0; | ||
| 555 | - } | ||
| 556 | -} | ||
| 557 | - | ||
| 558 | -.add_new { | ||
| 559 | - float: right; | ||
| 560 | - background: #A6B807; | ||
| 561 | - color: white; | ||
| 562 | - padding: 4px 10px; | ||
| 563 | - @include round-borders-all(4px); | ||
| 564 | - font-size:11px; | ||
| 565 | - margin: 10px 0; | ||
| 566 | -} | ||
| 567 | - | ||
| 568 | - | ||
| 569 | - | ||
| 570 | -.new-project-hodler { | ||
| 571 | - padding:20px; | ||
| 572 | -} |
| @@ -0,0 +1,385 @@ | @@ -0,0 +1,385 @@ | ||
| 1 | +.git_url_wrapper { margin-right:50px } | ||
| 2 | + | ||
| 3 | +.sidebar aside a{ | ||
| 4 | + display: block; | ||
| 5 | + position: relative; | ||
| 6 | + padding: 15px 10px; | ||
| 7 | + margin: 10px 0 0 0; | ||
| 8 | + | ||
| 9 | + font-size:13px; | ||
| 10 | + font-weight:bold; | ||
| 11 | + color:#333; | ||
| 12 | + | ||
| 13 | + &.current { | ||
| 14 | + color: white; | ||
| 15 | + background: $active_bg_color; | ||
| 16 | + border: 1px solid $active_bd_color; | ||
| 17 | + border-radius:5px; | ||
| 18 | + | ||
| 19 | + -webkit-border-top-right-radius: 0; | ||
| 20 | + -webkit-border-bottom-right-radius: 0; | ||
| 21 | + -moz-border-radius-topright: 0px; | ||
| 22 | + -moz-border-radius-bottomright: 0px; | ||
| 23 | + border-top-right-radius: 0; | ||
| 24 | + border-bottom-right-radius: 0; | ||
| 25 | + margin-right: -1px; | ||
| 26 | + } | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +body table .commit a{color: #{$blue_link}} | ||
| 30 | +body table th, body table td{ border-bottom: 1px solid #DEE2E3;} | ||
| 31 | +body .fixed{position: fixed; } | ||
| 32 | + | ||
| 33 | +/** File stat **/ | ||
| 34 | +.file_stats { | ||
| 35 | + span { | ||
| 36 | + img { | ||
| 37 | + width:14px; | ||
| 38 | + float:left; | ||
| 39 | + margin-right: 6px; | ||
| 40 | + padding:2px 0; | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | +} | ||
| 44 | + | ||
| 45 | +.round-borders { | ||
| 46 | + @include round-borders-all(4px); | ||
| 47 | + padding: 4px 0px; | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | +table.round-borders { | ||
| 51 | + float:left; | ||
| 52 | + text-align: left; | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | + | ||
| 56 | + | ||
| 57 | +/** PROJECTS **/ | ||
| 58 | +input.ssh_project_url { | ||
| 59 | + padding:5px; | ||
| 60 | + margin:0px; | ||
| 61 | + float:right; | ||
| 62 | + width:400px; | ||
| 63 | + text-align:center; | ||
| 64 | +} | ||
| 65 | + | ||
| 66 | +#projects-list .project { | ||
| 67 | + height:50px; | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | +#tree-slider .tree-item, | ||
| 71 | +#projects-list .project, | ||
| 72 | +#snippets-table .snippet, | ||
| 73 | +#issues-table .issue{ | ||
| 74 | + cursor:pointer; | ||
| 75 | +} | ||
| 76 | + | ||
| 77 | +.clear { | ||
| 78 | + clear: both; | ||
| 79 | +} | ||
| 80 | + | ||
| 81 | + | ||
| 82 | + | ||
| 83 | +#user_projects_limit{ | ||
| 84 | + width: 60px; | ||
| 85 | +} | ||
| 86 | + | ||
| 87 | +.handle:hover{ | ||
| 88 | + cursor: move; | ||
| 89 | +} | ||
| 90 | + | ||
| 91 | +.project-refs-form { | ||
| 92 | + span { | ||
| 93 | + background: none !important; | ||
| 94 | + position:static !important; | ||
| 95 | + width:auto !important; | ||
| 96 | + height: auto !important; | ||
| 97 | + } | ||
| 98 | +} | ||
| 99 | + | ||
| 100 | +.project-refs-select { | ||
| 101 | + width:200px; | ||
| 102 | +} | ||
| 103 | + | ||
| 104 | +.filter .left { margin-right:15px; } | ||
| 105 | + | ||
| 106 | +body table .commit { | ||
| 107 | + a.tree-commit-link { | ||
| 108 | + color:#444; | ||
| 109 | + &:hover { | ||
| 110 | + text-decoration:underline; | ||
| 111 | + } | ||
| 112 | + } | ||
| 113 | +} | ||
| 114 | + | ||
| 115 | +/** NEW PROJECT **/ | ||
| 116 | +.new-project-hodler { | ||
| 117 | + .icon span { background-position: -31px -70px; } | ||
| 118 | + td { border-bottom: 1px solid #DEE2E3; } | ||
| 119 | +} | ||
| 120 | + | ||
| 121 | +/** Feed entry **/ | ||
| 122 | +.commit, | ||
| 123 | +.snippet, | ||
| 124 | +.message { | ||
| 125 | + .title { | ||
| 126 | + color:#666; | ||
| 127 | + a { color:#666 !important; } | ||
| 128 | + p { margin-top:0px; } | ||
| 129 | + } | ||
| 130 | + .author { color: #999 } | ||
| 131 | +} | ||
| 132 | + | ||
| 133 | +/** JQuery UI **/ | ||
| 134 | +.ui-autocomplete { @include round-borders-all(5px); } | ||
| 135 | +.ui-menu-item { cursor: pointer } | ||
| 136 | +.ui-selectmenu{ | ||
| 137 | + @include round-borders-all(4px); | ||
| 138 | + margin-right:10px; | ||
| 139 | + font-size:1.5em; | ||
| 140 | + height:auto; | ||
| 141 | + font-weight:bold; | ||
| 142 | + .ui-selectmenu-status { | ||
| 143 | + padding:3px 10px; | ||
| 144 | + } | ||
| 145 | +} | ||
| 146 | + | ||
| 147 | +#holder { | ||
| 148 | + background:#FAFAFA; | ||
| 149 | + border: 1px solid #EEE; | ||
| 150 | + cursor: move; | ||
| 151 | + height: 70%; | ||
| 152 | + overflow: hidden; | ||
| 153 | +} | ||
| 154 | + | ||
| 155 | +/* Project Dashboard Page */ | ||
| 156 | +html, body { height: 100%; } | ||
| 157 | + | ||
| 158 | +.news-feed h2{float: left;} | ||
| 159 | +.news-feed .project-updates {margin-bottom: 20px; display: block; width: 100%;} | ||
| 160 | +.news-feed .project-updates .data{ padding: 0} | ||
| 161 | +.news-feed .project-updates a.project-update {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | ||
| 162 | +.news-feed .project-updates a.project-update:last-child{border-bottom: 0} | ||
| 163 | +.news-feed .project-updates a.project-update img{float: left; margin-right: 10px;} | ||
| 164 | +.news-feed .project-updates a.project-update span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;} | ||
| 165 | +.news-feed .project-updates a.project-update span.update-title{margin-bottom: 10px} | ||
| 166 | +.news-feed .project-updates a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 167 | +.news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;} | ||
| 168 | +/* eo Dashboard Page */ | ||
| 169 | + | ||
| 170 | + | ||
| 171 | +/** Update entry **/ | ||
| 172 | +.update-data { padding: 0 } | ||
| 173 | +.update-data { width:100%; } | ||
| 174 | +.update-data.ui-box .data { padding:0; } | ||
| 175 | +a.update-item {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | ||
| 176 | +a.update-item:last-child{border-bottom: 0} | ||
| 177 | +a.update-item img{float: left; margin-right: 10px;} | ||
| 178 | +a.update-item span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;} | ||
| 179 | +a.update-item span.update-title{margin-bottom: 10px} | ||
| 180 | +a.update-item span.update-author{color: #999; font-weight: normal; font-style: italic;} | ||
| 181 | +a.update-item span.update-author strong{font-weight: bold; font-style: normal;} | ||
| 182 | + | ||
| 183 | + | ||
| 184 | +body .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; } | ||
| 185 | + | ||
| 186 | +body.projects-page input.text.git-url.project_list_url { width:165px; } | ||
| 187 | + | ||
| 188 | + | ||
| 189 | +body table.no-borders th { | ||
| 190 | + background:none; | ||
| 191 | + border-bottom:1px solid #CCC; | ||
| 192 | + color:#333; | ||
| 193 | +} | ||
| 194 | + | ||
| 195 | +body table.no-borders tr, | ||
| 196 | +body table.no-borders td{ | ||
| 197 | + border:none; | ||
| 198 | +} | ||
| 199 | + | ||
| 200 | +.ajax-tab-loading { | ||
| 201 | + padding:40px; | ||
| 202 | + display:none; | ||
| 203 | +} | ||
| 204 | + | ||
| 205 | +#tree-content-holder { float:left; width:100%; } | ||
| 206 | + | ||
| 207 | +#tree-readme-holder { | ||
| 208 | + float:left; | ||
| 209 | + width:100%; | ||
| 210 | + | ||
| 211 | + .readme { | ||
| 212 | + @include round-borders-all(4px); | ||
| 213 | + padding: 4px 15px; | ||
| 214 | + background:#F7F7F7; | ||
| 215 | + } | ||
| 216 | +} | ||
| 217 | + | ||
| 218 | + | ||
| 219 | + | ||
| 220 | +/* Commit Page */ | ||
| 221 | +.entity-info {float: right;} | ||
| 222 | +.entity-button{ | ||
| 223 | + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4)); | ||
| 224 | + background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 225 | + background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 226 | + background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4); | ||
| 227 | + box-shadow: 0 -1px 0 white inset; | ||
| 228 | + display: block; | ||
| 229 | + border: 1px solid #eee; | ||
| 230 | + border-radius: 5px; | ||
| 231 | + margin-bottom: 2px; | ||
| 232 | + position: relative; | ||
| 233 | + padding: 4px 10px; | ||
| 234 | + font-size: 11px; | ||
| 235 | + padding-right: 20px; | ||
| 236 | +} | ||
| 237 | + | ||
| 238 | +.entity-button i{ | ||
| 239 | + background: url('images.png') no-repeat -138px -27px; | ||
| 240 | + width: 6px; | ||
| 241 | + height: 9px; | ||
| 242 | + float: right; | ||
| 243 | + position: absolute; | ||
| 244 | + top: 6px; | ||
| 245 | + right: 5px; | ||
| 246 | +} | ||
| 247 | +.box-arrow{float: right; background: #E3E5EA; padding: 10px; border-radius: 5px; margin-top: 2px; text-shadow: none; color: #999; margin: 1.5em 0;} | ||
| 248 | + | ||
| 249 | +h4.dash-tabs { | ||
| 250 | + margin: 0; | ||
| 251 | + border-bottom: 1px solid #ccc; | ||
| 252 | + padding: 10px 10px; | ||
| 253 | + font-size: 11px; | ||
| 254 | + padding-left:20px; | ||
| 255 | + font-weight: bold; text-transform: uppercase; | ||
| 256 | + background: #F7F7F7; | ||
| 257 | + margin-bottom:20px; | ||
| 258 | + height:13px; | ||
| 259 | + | ||
| 260 | +} | ||
| 261 | + | ||
| 262 | +.dash-button { | ||
| 263 | + border-right: 1px solid #ddd; | ||
| 264 | + background:none; | ||
| 265 | + padding: 10px 15px; | ||
| 266 | + float:left; | ||
| 267 | + position:relative; | ||
| 268 | + top:-10px; | ||
| 269 | + left:0px; | ||
| 270 | + height:13px; | ||
| 271 | + | ||
| 272 | + &:first-child { | ||
| 273 | + border-left: 1px solid #ddd; | ||
| 274 | + } | ||
| 275 | + &.active { | ||
| 276 | + background: #eaeaea; | ||
| 277 | + } | ||
| 278 | +} | ||
| 279 | + | ||
| 280 | + | ||
| 281 | +.dashboard-loader { | ||
| 282 | + float:right; | ||
| 283 | + margin-right:30px; | ||
| 284 | + display:none; | ||
| 285 | +} | ||
| 286 | + | ||
| 287 | + | ||
| 288 | +.merge-tabs { | ||
| 289 | + margin: 0; | ||
| 290 | + border: 1px solid #ccc; | ||
| 291 | + padding: 5px; | ||
| 292 | + font-size: 12px; | ||
| 293 | + background: #F7F7F7; | ||
| 294 | + margin-bottom:20px; | ||
| 295 | + height:26px; | ||
| 296 | + | ||
| 297 | + -moz-border-radius: 4px; | ||
| 298 | + -webkit-border-radius: 4px; | ||
| 299 | + border-radius: 4px; | ||
| 300 | + | ||
| 301 | + .tab { | ||
| 302 | + font-weight: bold; | ||
| 303 | + border-right: 1px solid #ddd; | ||
| 304 | + background:none; | ||
| 305 | + padding: 10px; | ||
| 306 | + min-width:60px; | ||
| 307 | + float:left; | ||
| 308 | + position:relative; | ||
| 309 | + top:-5px; | ||
| 310 | + left:-5px; | ||
| 311 | + height:16px; | ||
| 312 | + padding-left:34px; | ||
| 313 | + | ||
| 314 | + span { | ||
| 315 | + width: 20px; | ||
| 316 | + height: 20px; | ||
| 317 | + display: inline-block; | ||
| 318 | + position: absolute; | ||
| 319 | + left: 8px; | ||
| 320 | + top: 8px; | ||
| 321 | + } | ||
| 322 | + | ||
| 323 | + &.active { | ||
| 324 | + background: #eaeaea; | ||
| 325 | + } | ||
| 326 | + } | ||
| 327 | +} | ||
| 328 | +.merge-tabs.repository .tab span{ background: url("images.png") no-repeat -38px -77px; } | ||
| 329 | +.activities-tab span { background: url("images.png") no-repeat -161px -1px; } | ||
| 330 | +.stat-tab span, | ||
| 331 | +.team-tab span, | ||
| 332 | +.snippets-tab span { background: url("images.png") no-repeat -38px -77px; } | ||
| 333 | +.files-tab span { background: url("images.png") no-repeat -112px -23px; } | ||
| 334 | + | ||
| 335 | +.merge-notes-tab span { background: url("images.png") no-repeat -161px -1px; } | ||
| 336 | +.merge-commits-tab span { background: url("images.png") no-repeat -86px 1px; } | ||
| 337 | +.merge-diffs-tab span { background: url("images.png") no-repeat -118px 1px; } | ||
| 338 | +.merge-tabs .dashboard-loader { padding:8px; } | ||
| 339 | + | ||
| 340 | +.user-mention { | ||
| 341 | + color: #2FA0BB; | ||
| 342 | + font-weight: bold; | ||
| 343 | +} | ||
| 344 | + | ||
| 345 | +.author { | ||
| 346 | + color: #999; | ||
| 347 | +} | ||
| 348 | + | ||
| 349 | + | ||
| 350 | + | ||
| 351 | + | ||
| 352 | +.dark_scheme_box { | ||
| 353 | + padding:20px 0; | ||
| 354 | + | ||
| 355 | + label { | ||
| 356 | + float:left; | ||
| 357 | + box-shadow: 0 0px 5px rgba(0,0,0,.3); | ||
| 358 | + | ||
| 359 | + img { | ||
| 360 | + } | ||
| 361 | + } | ||
| 362 | +} | ||
| 363 | + | ||
| 364 | +a.project-update.titled { | ||
| 365 | + position: relative; | ||
| 366 | + padding-left: 235px !important; | ||
| 367 | + | ||
| 368 | + .title-block { | ||
| 369 | + padding: 10px; | ||
| 370 | + width: 205px; | ||
| 371 | + position: absolute; | ||
| 372 | + left: 0; | ||
| 373 | + top: 0; | ||
| 374 | + } | ||
| 375 | +} | ||
| 376 | + | ||
| 377 | +.add_new { | ||
| 378 | + float: right; | ||
| 379 | + background: #A6B807; | ||
| 380 | + color: white; | ||
| 381 | + padding: 4px 10px; | ||
| 382 | + @include round-borders-all(4px); | ||
| 383 | + font-size:11px; | ||
| 384 | + margin: 10px 0; | ||
| 385 | +} |
| @@ -0,0 +1,50 @@ | @@ -0,0 +1,50 @@ | ||
| 1 | +/** Branch/tag selector **/ | ||
| 2 | +.project-refs-form { | ||
| 3 | + margin:0; | ||
| 4 | + span { | ||
| 5 | + background:none !important; | ||
| 6 | + position:static !important; | ||
| 7 | + width:auto !important; | ||
| 8 | + height:auto !important; | ||
| 9 | + } | ||
| 10 | +} | ||
| 11 | +.project-refs-select { | ||
| 12 | + width:120px; | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +.project-refs-form .chzn-container { | ||
| 16 | + position: relative; | ||
| 17 | + top: 0; | ||
| 18 | + left: 0; | ||
| 19 | + margin-right: 10px; | ||
| 20 | + | ||
| 21 | + .chzn-drop { | ||
| 22 | + margin:7px 0; | ||
| 23 | + border: 1px solid #CCC; | ||
| 24 | + min-width: 300px; | ||
| 25 | + | ||
| 26 | + .chzn-results { | ||
| 27 | + max-height:300px; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + .chzn-search input { | ||
| 31 | + min-width:200px; | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + .chzn-single { | ||
| 36 | + background:#ddd; | ||
| 37 | + //border:none; | ||
| 38 | + //box-shadow:none; | ||
| 39 | + | ||
| 40 | + div { | ||
| 41 | + background:transparent; | ||
| 42 | + border-left:none; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + span { | ||
| 46 | + font-weight: normal; | ||
| 47 | + } | ||
| 48 | + } | ||
| 49 | +} | ||
| 50 | + |
app/assets/stylesheets/style.scss
| @@ -1,802 +0,0 @@ | @@ -1,802 +0,0 @@ | ||
| 1 | -/* HTML5 ✰ Boilerplate | ||
| 2 | - * ==|== normalize ========================================================== | ||
| 3 | - */ | ||
| 4 | - | ||
| 5 | -article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } | ||
| 6 | -audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } | ||
| 7 | -audio:not([controls]) { display: none; } | ||
| 8 | -[hidden] { display: none; } | ||
| 9 | - | ||
| 10 | -html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } | ||
| 11 | -body { margin: 0; font-size: 13px; line-height: 1.231; } | ||
| 12 | -body, button, input, select, textarea { | ||
| 13 | - font-family: "helvetica", "arial", "freesans", "clean", sans-serif; | ||
| 14 | -color: #222; } | ||
| 15 | - | ||
| 16 | -::-moz-selection { background: #79c3e0; color: #fff; text-shadow: none; } | ||
| 17 | -::selection { background: #79c3e0; color: #fff; text-shadow: none; } | ||
| 18 | - | ||
| 19 | -a { color: #00e; } | ||
| 20 | -a:hover { color: #06e; } | ||
| 21 | -a:focus { outline: thin dotted; } | ||
| 22 | -a:hover, a:active { outline: 0; } | ||
| 23 | - | ||
| 24 | -abbr[title] { border-bottom: 1px dotted; } | ||
| 25 | -b, strong { font-weight: bold; } | ||
| 26 | -blockquote { margin: 1em 40px; } | ||
| 27 | -dfn { font-style: italic; } | ||
| 28 | -hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } | ||
| 29 | -ins { background: #ff9; color: #000; text-decoration: none; } | ||
| 30 | -mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } | ||
| 31 | -pre, code, kbd, samp { font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 1em; } | ||
| 32 | -pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } | ||
| 33 | -q { quotes: none; } | ||
| 34 | -q:before, q:after { content: ""; content: none; } | ||
| 35 | -small { font-size: 85%; } | ||
| 36 | -sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } | ||
| 37 | -sup { top: -0.5em; } | ||
| 38 | -sub { bottom: -0.25em; } | ||
| 39 | -ul, ol { margin: 1em 0; padding: 0 0 0 40px; } | ||
| 40 | -dd { margin: 0 0 0 40px; } | ||
| 41 | -nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; } | ||
| 42 | -img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } | ||
| 43 | -svg:not(:root) { overflow: hidden; } | ||
| 44 | -figure { margin: 0; } | ||
| 45 | - | ||
| 46 | -form { margin: 0; } | ||
| 47 | -fieldset { border: 0; margin: 0; padding: 0; } | ||
| 48 | -label { cursor: pointer; } | ||
| 49 | -legend { border: 0; *margin-left: -7px; padding: 0; } | ||
| 50 | -button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; } | ||
| 51 | -button, input { line-height: normal; *overflow: visible; } | ||
| 52 | -table button, table input { *overflow: auto; } | ||
| 53 | -button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } | ||
| 54 | -input[type="checkbox"], input[type="radio"] { box-sizing: border-box; } | ||
| 55 | -input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } | ||
| 56 | -input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } | ||
| 57 | -button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } | ||
| 58 | -textarea { overflow: auto; vertical-align: top; resize: vertical; } | ||
| 59 | -input:valid, textarea:valid { } | ||
| 60 | -input:invalid, textarea:invalid { background-color: #f0dddd; } | ||
| 61 | - | ||
| 62 | -table { border-collapse: collapse; border-spacing: 0; } | ||
| 63 | -td { vertical-align: top; } | ||
| 64 | - | ||
| 65 | -/* ==|== primary styles ===================================================== | ||
| 66 | - Author: Ricardo Rauch | ||
| 67 | - ========================================================================== */ | ||
| 68 | - | ||
| 69 | -/* 960gs */ | ||
| 70 | -.container_4{width:98%;margin-left:1%;margin-right:1%}.grid_1,.grid_2,.grid_3,.grid_4{display:inline;float:left;position:relative;margin-left:1%;margin-right:1%}.alpha{margin-left:0}.omega{margin-right:0}.container_4 .grid_1{width:23.0%}.container_4 .grid_2{width:48.0%}.container_4 .grid_3{width:73.0%}.container_4 .grid_4{width:98.0%}.container_4 .prefix_1{padding-left:25.0%}.container_4 .prefix_2{padding-left:50.0%}.container_4 .prefix_3{padding-left:75.0%}.container_4 .suffix_1{padding-right:25.0%}.container_4 .suffix_2{padding-right:50.0%}.container_4 .suffix_3{padding-right:75.0%}.container_4 .push_1{left:25.0%}.container_4 .push_2{left:50.0%}.container_4 .push_3{left:75.0%}.container_4 .pull_1{left:-25.0%}.container_4 .pull_2{left:-50.0%}.container_4 .pull_3{left:-75.0%}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block} | ||
| 71 | -/* eo 960gs*/ | ||
| 72 | - | ||
| 73 | -/* Vars */ | ||
| 74 | -$color: "#4BB8D2"; | ||
| 75 | -$blue_link: "#2fa0bb"; | ||
| 76 | -/* eo Vars */ | ||
| 77 | - | ||
| 78 | -html{ -webkit-font-smoothing:antialiased; } | ||
| 79 | -body { | ||
| 80 | - font-size: 12px; | ||
| 81 | - background-color: #FFFFFF; | ||
| 82 | -} | ||
| 83 | -a{text-decoration: none; font-weight: bold; color: #444} | ||
| 84 | -a:hover{color: #555} | ||
| 85 | -/* Typography */ | ||
| 86 | -h1,h2,h3,h4,h5{font-weight: normal; color: #666} | ||
| 87 | -h2{margin: 1.5em 0} | ||
| 88 | -/* eo Typography */ | ||
| 89 | - | ||
| 90 | -/* Forms */ | ||
| 91 | -input[type="text"]:focus, input[type="password"]:focus { outline: none; } | ||
| 92 | -input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: 10px} | ||
| 93 | - | ||
| 94 | -.form-row{ | ||
| 95 | - padding: 0px 0px 10px 0px; | ||
| 96 | -} | ||
| 97 | - | ||
| 98 | -.form-row label{ | ||
| 99 | - font-weight:bold; | ||
| 100 | - display: inline-block; | ||
| 101 | - padding: 0px 0px 5px 0px; | ||
| 102 | -} | ||
| 103 | - | ||
| 104 | -/* eo Forms */ | ||
| 105 | - | ||
| 106 | -/* Tables */ | ||
| 107 | -table {width:100%; border: 1px solid #DEE2E3; margin-bottom: 20px} | ||
| 108 | -table thead{ | ||
| 109 | - -webkit-border-top-left-radius: 5px; | ||
| 110 | - -webkit-border-top-right-radius: 5px; | ||
| 111 | - -moz-border-radius-topleft: 5px; | ||
| 112 | - -moz-border-radius-topright: 5px; | ||
| 113 | - border-top-left-radius: 5px; | ||
| 114 | - border-top-right-radius: 5px; | ||
| 115 | -} | ||
| 116 | -table thead th{ | ||
| 117 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); | ||
| 118 | - background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 119 | - background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 120 | - background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 121 | - margin: 0; | ||
| 122 | - font-weight: normal; | ||
| 123 | - font-weight: bold; | ||
| 124 | - text-align: left; | ||
| 125 | - color: #97A0A5; | ||
| 126 | -} | ||
| 127 | -td, th{ padding: .9em 1em; vertical-align: middle; } | ||
| 128 | - | ||
| 129 | -table thead .image{width:100px} | ||
| 130 | -.listed_items tr.odd:hover{background-color:#FFFFCF} | ||
| 131 | -/* eo Tables */ | ||
| 132 | - | ||
| 133 | -/* Buttons */ | ||
| 134 | -.grey-button{ | ||
| 135 | - border-radius: 5px; | ||
| 136 | - font-size: 12px; | ||
| 137 | - font-weight: bold; | ||
| 138 | - padding: 5px 17px; | ||
| 139 | - border: 1px solid #999; | ||
| 140 | - color: #666; | ||
| 141 | - display: inline-block; | ||
| 142 | - box-shadow: 0 1px 2px rgba(0,0,0,.3); | ||
| 143 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #f7f7f7), to(#d5d5d5)); | ||
| 144 | - background-image: -webkit-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | ||
| 145 | - background-image: -moz-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | ||
| 146 | - background-image: -o-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | ||
| 147 | -} | ||
| 148 | - | ||
| 149 | -a.button, input.button { | ||
| 150 | - font-weight: bold; | ||
| 151 | - padding: 10px 20px; | ||
| 152 | - text-align: center; | ||
| 153 | - display: inline-block; | ||
| 154 | - border-radius: 5px; | ||
| 155 | - color: #578E91; | ||
| 156 | - font-size: 12px; | ||
| 157 | - text-transform: uppercase; | ||
| 158 | - border: 1px solid #8CE2E6; | ||
| 159 | - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbf5f6), to(#c5eef0)); | ||
| 160 | - background-image: -webkit-linear-gradient(#dbf5f6 79.4%, #c5eef0); | ||
| 161 | - background-image: -moz-linear-gradient(#dbf5f6 79.4%, #c5eef0); | ||
| 162 | - background-image: -o-linear-gradient(#dbf5f6 79.4%, #c5eef0); | ||
| 163 | -} | ||
| 164 | - | ||
| 165 | -input.button{margin-bottom: 1.5em} | ||
| 166 | - | ||
| 167 | -.button:hover {color: rgba(0,0,0,.8)} | ||
| 168 | - | ||
| 169 | -.button.green {margin-right: 0; } | ||
| 170 | - | ||
| 171 | -.button.yellow{ | ||
| 172 | - color: #908054; | ||
| 173 | - border-color: #DDCDA1; | ||
| 174 | - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #FFEFC3), to(#F3E3B7)); | ||
| 175 | - background-image: -webkit-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | ||
| 176 | - background-image: -moz-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | ||
| 177 | - background-image: -o-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | ||
| 178 | -} | ||
| 179 | - | ||
| 180 | -.button.blue{ | ||
| 181 | - color: #417E97; | ||
| 182 | - border-color: #b2cdec; | ||
| 183 | - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbe8f6), to(#c7daf1)); | ||
| 184 | - background-image: -webkit-linear-gradient(#dbe8f6 79.4%, #c7daf1); | ||
| 185 | - background-image: -moz-linear-gradient(#dbe8f6 79.4%, #c7daf1); | ||
| 186 | - background-image: -o-linear-gradient(#dbe8f6 79.4%, #c7daf1); | ||
| 187 | -} | ||
| 188 | - | ||
| 189 | -.button-small{ text-shadow: none; padding: 4px 10px; } | ||
| 190 | -.button-green{background: #A6B807; color: white} | ||
| 191 | - | ||
| 192 | -/* eo Buttons */ | ||
| 193 | - | ||
| 194 | -/* UI Box */ | ||
| 195 | -//.ui-box{border: 1px solid #DEDFE1; float: left; border-radius: 5px} | ||
| 196 | -.ui-box{float: left;} | ||
| 197 | -.ui-box h3{ | ||
| 198 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); | ||
| 199 | - background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 200 | - background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 201 | - background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 202 | - background:none; | ||
| 203 | - margin: 0; | ||
| 204 | - padding: 1em; | ||
| 205 | - font-size: 12px; | ||
| 206 | - font-weight: normal; | ||
| 207 | - font-weight: bold; | ||
| 208 | - font-size: 16px; | ||
| 209 | - border-bottom: 1px solid #DEDFE1; | ||
| 210 | - -webkit-border-top-left-radius: 5px; | ||
| 211 | - -webkit-border-top-right-radius: 5px; | ||
| 212 | - -moz-border-radius-topleft: 5px; | ||
| 213 | - -moz-border-radius-topright: 5px; | ||
| 214 | - border-top-left-radius: 5px; | ||
| 215 | - border-top-right-radius: 5px; | ||
| 216 | -} | ||
| 217 | - | ||
| 218 | -.ui-box.ui-box-small h3{ | ||
| 219 | - padding: 8px 10px; | ||
| 220 | - font-size: 12px; | ||
| 221 | -} | ||
| 222 | - | ||
| 223 | -.ui-box .data{padding: .5em 1em} | ||
| 224 | - | ||
| 225 | -.ui-box .buttons{ | ||
| 226 | - padding: 1em; | ||
| 227 | - border-top:1px solid $lite_border_color; | ||
| 228 | -} | ||
| 229 | - | ||
| 230 | -.ui-box .buttons .button{padding: 8px 9px; font-size: 11px} | ||
| 231 | - | ||
| 232 | -.ui-box.hover:hover{box-shadow: 0 0 10px rgba(0,0,0,.1); border: 1px solid #ccc; | ||
| 233 | - | ||
| 234 | - -webkit-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
| 235 | - -moz-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
| 236 | - -o-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
| 237 | - transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
| 238 | -} | ||
| 239 | - | ||
| 240 | -/* eo UI Box */ | ||
| 241 | - | ||
| 242 | -/* Login Page */ | ||
| 243 | -body.login-page{background-color: #f1f1f1; padding-top: 10%} | ||
| 244 | - | ||
| 245 | -.login-box{ | ||
| 246 | - width: 304px; | ||
| 247 | - position: relative; | ||
| 248 | - border-radius: 5px; | ||
| 249 | - margin: auto; | ||
| 250 | - padding: 20px; | ||
| 251 | - background: white; | ||
| 252 | - box-shadow: rgba(0, 0, 0, 0.07) 0 1px 0,white 0 2px 0,rgba(0, 0, 0, 0.07) 0 3px 0,white 0 4px 0, rgba(0, 0, 0, 0.07) 0 5px 0; | ||
| 253 | -} | ||
| 254 | - | ||
| 255 | -.login-box .login-logo{ | ||
| 256 | - margin: 10px 0 30px 0; | ||
| 257 | - display: block; | ||
| 258 | -} | ||
| 259 | - | ||
| 260 | -.login-box input.text{background-color: #f1f1f1; font-size: 16px; border-radius: 0; padding: 14px 10px; width: 280px} | ||
| 261 | - | ||
| 262 | -.login-box input.text.top{ | ||
| 263 | - -webkit-border-top-left-radius: 5px; | ||
| 264 | - -webkit-border-top-right-radius: 5px; | ||
| 265 | - -moz-border-radius-topleft: 5px; | ||
| 266 | - -moz-border-radius-topright: 5px; | ||
| 267 | - border-top-left-radius: 5px; | ||
| 268 | - border-top-right-radius: 5px; | ||
| 269 | -} | ||
| 270 | - | ||
| 271 | -.login-box input.text.bottom{ | ||
| 272 | - -webkit-border-bottom-right-radius: 5px; | ||
| 273 | - -webkit-border-bottom-left-radius: 5px; | ||
| 274 | - -moz-border-radius-bottomright: 5px; | ||
| 275 | - -moz-border-radius-bottomleft: 5px; | ||
| 276 | - border-bottom-right-radius: 5px; | ||
| 277 | - border-bottom-left-radius: 5px; | ||
| 278 | - border-top: 0; | ||
| 279 | - margin-bottom: 20px; | ||
| 280 | -} | ||
| 281 | - | ||
| 282 | -.login-box a.forgot{float: right; padding-top: 6px} | ||
| 283 | - | ||
| 284 | -/* Icons */ | ||
| 285 | -.directory, .file{ | ||
| 286 | - display: inline-block; | ||
| 287 | - margin-right: 10px; | ||
| 288 | - width: 14px; | ||
| 289 | -} | ||
| 290 | - | ||
| 291 | -.directory{ | ||
| 292 | - background: url('images.png') no-repeat -73px -26px; | ||
| 293 | - height: 11px; | ||
| 294 | - margin-bottom: -1px; | ||
| 295 | -} | ||
| 296 | - | ||
| 297 | -.file{ | ||
| 298 | - background: url('images.png') no-repeat -114px -24px; | ||
| 299 | - height: 16px; | ||
| 300 | - margin-bottom: -3px; | ||
| 301 | -} | ||
| 302 | - | ||
| 303 | -/* eo Icons*/ | ||
| 304 | - | ||
| 305 | -/* Errors */ | ||
| 306 | -#error_explanation{background: #ffe5eb; padding: 20px; margin-bottom: 20px; border-radius: 5px} | ||
| 307 | -#error_explanation h2{margin: 0; margin-bottom: 20px; color: red} | ||
| 308 | -#error_explanation ul li{margin-bottom: 10px} | ||
| 309 | -#error_explanation ul li:last-child{margin-bottom: 0} | ||
| 310 | -.field_with_errors { | ||
| 311 | - input[type="text"], | ||
| 312 | - input[type="password"], | ||
| 313 | - textarea | ||
| 314 | - { | ||
| 315 | - border: 1px solid #D30 !important; | ||
| 316 | - } | ||
| 317 | -} | ||
| 318 | -/* eo Errors */ | ||
| 319 | - | ||
| 320 | -/* Notices */ | ||
| 321 | -#notice{background: #dfffe1; padding: 20px; margin-bottom: 20px; border-radius: 5px; color: green; font-size: 1.3em;} | ||
| 322 | -/* eo Notices */ | ||
| 323 | - | ||
| 324 | -/* InfoBlock */ | ||
| 325 | -#infoblock{ | ||
| 326 | - background: #eeeeee; | ||
| 327 | - padding: 20px; | ||
| 328 | - margin-bottom: 20px; | ||
| 329 | - border-radius: 5px; | ||
| 330 | -} | ||
| 331 | -/* eo InfoBlock */ | ||
| 332 | - | ||
| 333 | -/* Header */ | ||
| 334 | -header{ | ||
| 335 | - background: #474D57 url('bg-header.png') repeat-x bottom; | ||
| 336 | - z-index: 10000; | ||
| 337 | - height: 44px; | ||
| 338 | - padding: 10px 2% 6px 2%; | ||
| 339 | -} | ||
| 340 | -header a:hover{color: #f1f1f1} | ||
| 341 | -header h1{ | ||
| 342 | - width: 65px; | ||
| 343 | -} | ||
| 344 | -header h1.logo{margin: 0; padding: 0} | ||
| 345 | -header h1.logo a{ | ||
| 346 | - background: url('images.png') no-repeat -3px -7px; | ||
| 347 | - width: 65px; | ||
| 348 | - height: 26px; | ||
| 349 | - margin: 5px 0; | ||
| 350 | - padding: 0; | ||
| 351 | - display: block; | ||
| 352 | - float: left; | ||
| 353 | - text-indent: -1000em; | ||
| 354 | -} | ||
| 355 | - | ||
| 356 | -header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 294px; margin: auto; | ||
| 357 | - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#31363e)); | ||
| 358 | - background-image: -webkit-linear-gradient(#595d63 6.6%, #31363e); | ||
| 359 | - background-image: -moz-linear-gradient(#595d63 6.6%, #31363e); | ||
| 360 | - background-image: -o-linear-gradient(#595d63 6.6%, #31363e); | ||
| 361 | - margin-top: 2px; | ||
| 362 | - height:30px | ||
| 363 | -} | ||
| 364 | -header nav.shorter_nav{ | ||
| 365 | - width: 207px; | ||
| 366 | -} | ||
| 367 | -header nav a{padding: 8px 12px 8px 34px; display: inline-block; color: #D6DADF; border-right: 1px solid #31363E; position: relative; box-shadow: 1px 0 0 rgba(255,255,255,.1); margin: 0} | ||
| 368 | -header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} | ||
| 369 | -header nav a:last-child {border: 0; box-shadow: none} | ||
| 370 | -header nav a:hover, header nav a.current{ | ||
| 371 | - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#2c2f35)); | ||
| 372 | - background-image: -webkit-linear-gradient(#595d63 6.6%, #2c2f35); | ||
| 373 | - background-image: -moz-linear-gradient(#595d63 6.6%, #202227); | ||
| 374 | - background-image: -o-linear-gradient(#595d63 6.6%, #202227); | ||
| 375 | -} | ||
| 376 | - | ||
| 377 | -header nav a:active{ | ||
| 378 | - box-shadow: 0 1px 4px rgba(0,0,0,.8) inset; | ||
| 379 | -} | ||
| 380 | - | ||
| 381 | -header nav a.dashboard { | ||
| 382 | - -webkit-border-top-left-radius: 4px; | ||
| 383 | - -webkit-border-bottom-left-radius: 4px; | ||
| 384 | - -moz-border-radius-topleft: 4px; | ||
| 385 | - -moz-border-radius-bottomleft: 4px; | ||
| 386 | - border-top-left-radius: 4px; | ||
| 387 | - border-bottom-left-radius: 4px; | ||
| 388 | -} | ||
| 389 | - | ||
| 390 | -header nav a.last_elem{ | ||
| 391 | - -webkit-border-top-right-radius: 4px; | ||
| 392 | - -webkit-border-bottom-right-radius: 4px; | ||
| 393 | - -moz-border-radius-topright: 4px; | ||
| 394 | - -moz-border-radius-bottomright: 4px; | ||
| 395 | - border-top-right-radius: 4px; | ||
| 396 | - border-bottom-right-radius: 4px; | ||
| 397 | -} | ||
| 398 | - | ||
| 399 | -header .search{ display: inline-block; float: right; margin-right: 90px} | ||
| 400 | - | ||
| 401 | -header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} | ||
| 402 | - | ||
| 403 | -header nav a.dashboard span{background: url('images.png') no-repeat -161px 0;} | ||
| 404 | -header nav a.admin span{background: url('images.png') no-repeat -184px 0;} | ||
| 405 | -header nav a.project span{background: url('images.png') no-repeat -209px -1px; top: 7px} | ||
| 406 | -header nav a.issues span{background: url('images.png') no-repeat -209px -1px; top: 7px} | ||
| 407 | - | ||
| 408 | -header .login-top{float: right; width: 180px; | ||
| 409 | - background-image: -webkit-gradient(linear, 0 0, 0 62, color-stop(0.032, #464c56), to(#363c45)); | ||
| 410 | - background-image: -webkit-linear-gradient(#464c56 3.2%, #363c45); | ||
| 411 | - background-image: -moz-linear-gradient(#464c56 3.2%, #363c45); | ||
| 412 | - background-image: -o-linear-gradient(#464c56 3.2%, #363c45); | ||
| 413 | - padding: 0 10px; | ||
| 414 | - height: 44px; | ||
| 415 | -} | ||
| 416 | -header .login-top a{display: block;} | ||
| 417 | -header .login-top a.pic{float: left; margin-right: 10px; | ||
| 418 | - img{ height: 36px; width: 36px; border: 1px solid black} | ||
| 419 | -} | ||
| 420 | -header .login-top a.username{margin-bottom: 5px} | ||
| 421 | -header .login-top a.logout{color: #ccc} | ||
| 422 | -header{margin-bottom: 0; clear: both; position:relative;} | ||
| 423 | - | ||
| 424 | -.page-title{background-color: #f1f1f1;display: block; float: left; clear: both; width: 98%; padding: 1% 1%; border-bottom: 1px solid #ccc; box-shadow: 0 -1px 0 white inset; margin-bottom: 1.5em} | ||
| 425 | -.page-title h1{font-size: 20px; width: 400px; margin: 0; padding-top: 8px } | ||
| 426 | -.page-title a.grey-button{float: right;} | ||
| 427 | -.right{float: right;} | ||
| 428 | - | ||
| 429 | -/* Account box */ | ||
| 430 | -header .account-box{ | ||
| 431 | - position: absolute; | ||
| 432 | - right: 0; | ||
| 433 | - top: 8px; | ||
| 434 | - z-index: 10000; | ||
| 435 | - width: 128px; | ||
| 436 | - font-size: 11px; | ||
| 437 | - float: right; | ||
| 438 | - display: block; | ||
| 439 | - cursor: pointer;} | ||
| 440 | -header .account-box img{ | ||
| 441 | - border-radius: 4px; | ||
| 442 | - right: 20px; | ||
| 443 | - position: absolute; | ||
| 444 | - width: 33px; height: 33px; | ||
| 445 | - display: block; top:0;} | ||
| 446 | -header .account-box img:after{ | ||
| 447 | - content: " "; | ||
| 448 | - display: block; | ||
| 449 | - position: absolute; | ||
| 450 | - top: 0; | ||
| 451 | - right: 0; | ||
| 452 | -left: 0; | ||
| 453 | - bottom: 0; | ||
| 454 | -float: right; | ||
| 455 | - border-radius: 5px; | ||
| 456 | - border: 1px solid rgba(255, 255, 255, .1); | ||
| 457 | - border-bottom: 0; | ||
| 458 | - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, .15)), to(rgba(0, 0, 0, .25))), -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, .1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0))); | ||
| 459 | - background: -moz-linear-gradient(top, rgba(255, 255, 255, .15), rgba(0, 0, 0, .25)), -moz-linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0)); | ||
| 460 | - background: linear-gradient(top, rgba(255, 255, 255, .15), rgba(0, 0, 0, .25)), linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0)); | ||
| 461 | - -webkit-background-origin: border-box; | ||
| 462 | - -moz-background-origin: border; | ||
| 463 | - background-origin: border-box; | ||
| 464 | -} | ||
| 465 | - | ||
| 466 | -.account-box.hover{height: 138px;} | ||
| 467 | - | ||
| 468 | -.account-box:hover > .account-links{display: block;} | ||
| 469 | -header .account-links{ | ||
| 470 | - background: #79C3E0; display: none; border-radius: 5px; width: 100px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); position:relative;} | ||
| 471 | -header .account-links:before { | ||
| 472 | - content: "."; | ||
| 473 | - width:0; | ||
| 474 | - height:0; | ||
| 475 | - position:absolute; | ||
| 476 | - border:5px solid transparent; | ||
| 477 | - border-color:rgba(255,255,255,0); | ||
| 478 | - border-bottom-color:#fafafa; | ||
| 479 | - text-indent:-9999px; | ||
| 480 | - top:-10px; | ||
| 481 | - line-height:0; | ||
| 482 | - right:10px; | ||
| 483 | - z-index:10; | ||
| 484 | -} | ||
| 485 | - | ||
| 486 | -/* Inspired by http://maxvoltar.com/temp/nowplaying/ */ | ||
| 487 | -header .account-links{background: white; display: none; z-index: 100000; border-radius: 5px; width: 100px; position: absolute; right: 20px; top: 46px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); } | ||
| 488 | -header .account-links a{color: #666; padding: 6px 10px; display: block; text-shadow: none; border-bottom: 1px solid #eee} | ||
| 489 | -header .account-links a:hover{ | ||
| 490 | - background: #3aacec; | ||
| 491 | - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#39acec), to(#279ada), color-stop(.05, #4cbefe)); | ||
| 492 | - background: -moz-linear-gradient(top, #39acec, #4cbefe 5%, #279ada); | ||
| 493 | - background: linear-gradient(top, #39acec, #4cbefe 5%, #279ada); | ||
| 494 | - color: #fff; | ||
| 495 | - text-shadow: #1488c8 0 -1px 0; | ||
| 496 | -} | ||
| 497 | -.account-box.hover .arrow-up{top: 41px; right: 6px; position: absolute} | ||
| 498 | -header .account-links a:first-child{ | ||
| 499 | - -webkit-border-top-left-radius: 5px; | ||
| 500 | - -webkit-border-top-right-radius: 5px; | ||
| 501 | - -moz-border-radius-topleft: 5px; | ||
| 502 | - -moz-border-radius-topright: 5px; | ||
| 503 | - border-top-left-radius: 5px; | ||
| 504 | - border-top-right-radius: 5px; | ||
| 505 | -} | ||
| 506 | - | ||
| 507 | -header .account-links a:last-child{ | ||
| 508 | - -webkit-border-bottom-right-radius: 5px; | ||
| 509 | - -webkit-border-bottom-left-radius: 5px; | ||
| 510 | - -moz-border-radius-bottomright: 5px; | ||
| 511 | - -moz-border-radius-bottomleft: 5px; | ||
| 512 | - border-bottom-right-radius: 5px; | ||
| 513 | - border-bottom-left-radius: 5px; | ||
| 514 | - border-bottom: 0; | ||
| 515 | -} | ||
| 516 | - | ||
| 517 | -.big-message{ | ||
| 518 | - background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.041, #eccb40), to(#ffee4d)); | ||
| 519 | - background-image: -webkit-linear-gradient(90deg, #eccb40 4.1%, #ffee4d); | ||
| 520 | - background-image: -moz-linear-gradient(90deg, #eccb40 4.1%, #ffee4d); | ||
| 521 | - background-image: -o-linear-gradient(90deg, #eccb40 4.1%, #ffee4d); | ||
| 522 | - text-align: center; | ||
| 523 | - font-weight: bold; | ||
| 524 | - padding: 10px 20px; | ||
| 525 | - text-shadow: 0 1px 0 rgba(255,255,255,.3); | ||
| 526 | - color: #333; | ||
| 527 | - color: rgba(0,0,0,.7); | ||
| 528 | - font-size: 14px; | ||
| 529 | - box-shadow: 0 1px 2px rgba(0,0,0,.7); | ||
| 530 | - z-index: 100000; | ||
| 531 | - margin-bottom: 2px; | ||
| 532 | -} | ||
| 533 | - | ||
| 534 | -.big-message a{color: #000; text-decoration: underline;} | ||
| 535 | - | ||
| 536 | -.big-message.error{ | ||
| 537 | - background-color: #722523; | ||
| 538 | - background-image: -webkit-gradient(linear, 0 49, 0 0, color-stop(0.04, #722523), to(#ad4846)); | ||
| 539 | - background-image: -webkit-linear-gradient(90deg, #9b403f 4%, #c16765); | ||
| 540 | - background-image: -moz-linear-gradient(90deg, #722523 4%, #ad4846); | ||
| 541 | - background-image: -o-linear-gradient(90deg, #722523 4%, #ad4846); | ||
| 542 | - color: #2E0D0C; | ||
| 543 | -} | ||
| 544 | - | ||
| 545 | -.big-message.success{ | ||
| 546 | - background-color: #7a9339; | ||
| 547 | - background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.062, #7a9339), to(#93ae46)); | ||
| 548 | - background-image: -webkit-linear-gradient(90deg, #7a9339 6.2%, #93ae46); | ||
| 549 | - background-image: -moz-linear-gradient(90deg, #7a9339 6.2%, #93ae46); | ||
| 550 | - background-image: -o-linear-gradient(90deg, #7a9339 6.2%, #93ae46) | ||
| 551 | -} | ||
| 552 | - | ||
| 553 | -.big-message.success{ | ||
| 554 | - background-color: #7a9339; | ||
| 555 | - background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.062, #7a9339), to(#93ae46)); | ||
| 556 | - background-image: -webkit-linear-gradient(90deg, #7a9339 6.2%, #93ae46); | ||
| 557 | - background-image: -moz-linear-gradient(90deg, #7a9339 6.2%, #93ae46); | ||
| 558 | - background-image: -o-linear-gradient(90deg, #7a9339 6.2%, #93ae46) | ||
| 559 | -} | ||
| 560 | - | ||
| 561 | -.big-message.notice{ | ||
| 562 | - background-image: -webkit-gradient(linear, 0 49, 0 0, color-stop(0.061, #447790), color-stop(0.897, #5da2bf)); | ||
| 563 | - background-image: -webkit-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%); | ||
| 564 | - background-image: -moz-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%); | ||
| 565 | - background-image: -o-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%) | ||
| 566 | -} | ||
| 567 | - | ||
| 568 | -/* eo Account Box */ | ||
| 569 | -input.search-input{ | ||
| 570 | - float: left; | ||
| 571 | - text-shadow: none; | ||
| 572 | - width: 116px; | ||
| 573 | - background-image: url('icon-search.png') ; | ||
| 574 | - background-repeat: no-repeat; | ||
| 575 | - background-position: 10px; | ||
| 576 | - border-radius: 4px; | ||
| 577 | - border: 1px solid #AAA; | ||
| 578 | - background-color: #FFF; | ||
| 579 | - padding: 5px; | ||
| 580 | - padding-left: 26px; | ||
| 581 | - margin-top: 2px; | ||
| 582 | - margin-right: 10px; | ||
| 583 | -} | ||
| 584 | -/*input.search-input:focus{ background-color: white; width: 216px;}*/ | ||
| 585 | -input.search-input::-webkit-input-placeholder {color: #666} | ||
| 586 | -/* eo Header */ | ||
| 587 | - | ||
| 588 | -h2.icon{position: relative; padding-left: 40px; float: left; } | ||
| 589 | -/*h2 a{font-weight: normal;}*/ | ||
| 590 | -h2.icon span{background: #E3E5EA url('images.png'); height: 32px; width: 32px; left: 0; top: -5px; border-radius: 4px; display: inline-block; position: absolute} | ||
| 591 | - | ||
| 592 | -/* Dashboard Page */ | ||
| 593 | -html, body { height: 100%; } | ||
| 594 | - | ||
| 595 | - | ||
| 596 | - | ||
| 597 | - | ||
| 598 | -.grey-button.right{margin-top: 20px} | ||
| 599 | - | ||
| 600 | -/* Project Page */ | ||
| 601 | -/* eo New Project Page */ | ||
| 602 | - | ||
| 603 | - | ||
| 604 | -/* eo Project Page */ | ||
| 605 | - | ||
| 606 | -/* Projects Page */ | ||
| 607 | -body.projects-page h2.icon span{background-position: -31px -70px;} | ||
| 608 | -body.projects-page .project-box.ui-box .data .repository {margin-bottom: 20px} | ||
| 609 | -body.projects-page .project-box.ui-box .data .title span{ font-weight: bold;} | ||
| 610 | -body.projects-page .project-box{width: 100%; margin-bottom: 3em} | ||
| 611 | -body.projects-page .browse-code{margin-right: 10px} | ||
| 612 | -/* eo Projects Page */ | ||
| 613 | - | ||
| 614 | -/* ==|== non-semantic helper classes ======================================== */ | ||
| 615 | -.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; } | ||
| 616 | -.ir br { display: none; } | ||
| 617 | -.hidden { display: none !important; visibility: hidden; } | ||
| 618 | -.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } | ||
| 619 | -.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } | ||
| 620 | -.invisible { visibility: hidden; } | ||
| 621 | -.clearfix:before, .clearfix:after { content: ""; display: table; } | ||
| 622 | -.clearfix:after { clear: both; } | ||
| 623 | -.clearfix { zoom: 1; } | ||
| 624 | - | ||
| 625 | -/* ==|== media queries ====================================================== */ | ||
| 626 | - | ||
| 627 | -@media only screen and (min-width: 480px) { | ||
| 628 | - | ||
| 629 | -} | ||
| 630 | - | ||
| 631 | -@media only screen and (min-width: 768px) { | ||
| 632 | - | ||
| 633 | -} | ||
| 634 | - | ||
| 635 | -/* ==|== print styles ======================================================= */ | ||
| 636 | - | ||
| 637 | -@media print { | ||
| 638 | - * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } | ||
| 639 | - a, a:visited { text-decoration: underline; } | ||
| 640 | - a[href]:after { content: " (" attr(href) ")"; } | ||
| 641 | - abbr[title]:after { content: " (" attr(title) ")"; } | ||
| 642 | - .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } | ||
| 643 | - pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } | ||
| 644 | - thead { display: table-header-group; } | ||
| 645 | - tr, img { page-break-inside: avoid; } | ||
| 646 | - img { max-width: 100% !important; } | ||
| 647 | - @page { margin: 0.5cm; } | ||
| 648 | - p, h2, h3 { orphans: 3; widows: 3; } | ||
| 649 | - h2, h3 { page-break-after: avoid; } | ||
| 650 | -} | ||
| 651 | - | ||
| 652 | -body, button, input, select, textarea { | ||
| 653 | - font-family: "helvetica", "arial", "freesans", "clean", sans-serif; | ||
| 654 | -} | ||
| 655 | - | ||
| 656 | -/** FORM INPUTS **/ | ||
| 657 | -.new_merge_request, | ||
| 658 | -.edit_merge_request, | ||
| 659 | -.user_new, | ||
| 660 | -.new_key, | ||
| 661 | -.new_issue, | ||
| 662 | -.new_note, | ||
| 663 | -.edit_user, | ||
| 664 | -.edit_issue, | ||
| 665 | -.new_project, | ||
| 666 | -.new_snippet, | ||
| 667 | -.edit_snippet, | ||
| 668 | -.edit_project { | ||
| 669 | - input[type='text'], | ||
| 670 | - input[type='email'], | ||
| 671 | - input[type='password'], | ||
| 672 | - textarea { | ||
| 673 | - width:400px; | ||
| 674 | - padding:8px; | ||
| 675 | - font-size:14px; | ||
| 676 | - @include round-borders-all(4px); | ||
| 677 | - } | ||
| 678 | -} | ||
| 679 | - | ||
| 680 | -.text_field { | ||
| 681 | - width:400px; | ||
| 682 | - padding:8px; | ||
| 683 | - font-size:14px; | ||
| 684 | - @include round-borders-all(4px); | ||
| 685 | -} | ||
| 686 | - | ||
| 687 | -.input_button { | ||
| 688 | - padding:8px; | ||
| 689 | - font-size:14px; | ||
| 690 | - cursor:pointer; | ||
| 691 | - background-color: #F5F5F5; | ||
| 692 | - border-color: #EEEEEE #DEDEDE #DEDEDE #EEEEEE; | ||
| 693 | - border-right: 1px solid #DEDEDE; | ||
| 694 | - border-style: solid; | ||
| 695 | - border-width: 1px; | ||
| 696 | -} | ||
| 697 | - | ||
| 698 | -/** FLASH **/ | ||
| 699 | -#flash_container { | ||
| 700 | - height:45px; | ||
| 701 | - position:fixed; | ||
| 702 | - z-index:10001; | ||
| 703 | - top:0px; | ||
| 704 | - width:100%; | ||
| 705 | - margin-bottom:15px; | ||
| 706 | - overflow:hidden; | ||
| 707 | - background:white; | ||
| 708 | - cursor:pointer; | ||
| 709 | - border-bottom:1px solid #777; | ||
| 710 | - | ||
| 711 | - h4 { | ||
| 712 | - color:#444; | ||
| 713 | - font-size:22px; | ||
| 714 | - padding-top:5px; | ||
| 715 | - margin:2px; | ||
| 716 | - } | ||
| 717 | -} | ||
| 718 | - | ||
| 719 | - | ||
| 720 | -.errors_holder { | ||
| 721 | - background:#D30; | ||
| 722 | - color:#fff; | ||
| 723 | - @include round-borders-all(4px); | ||
| 724 | - border:1px solid #a30; | ||
| 725 | - padding:5px; | ||
| 726 | - list-style:none; | ||
| 727 | - font-weight: bold; | ||
| 728 | - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); | ||
| 729 | - | ||
| 730 | - li { | ||
| 731 | - padding:10px; | ||
| 732 | - } | ||
| 733 | -} | ||
| 734 | - | ||
| 735 | -.notice_holder { | ||
| 736 | - background:#DDF4FB; | ||
| 737 | - color:#444; | ||
| 738 | - border:1px solid #C6EDF9; | ||
| 739 | - @include round-borders-all(4px); | ||
| 740 | - padding:5px; | ||
| 741 | - list-style:none; | ||
| 742 | - font-weight: bold; | ||
| 743 | - text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25); | ||
| 744 | - | ||
| 745 | - li { | ||
| 746 | - padding:10px; | ||
| 747 | - } | ||
| 748 | -} | ||
| 749 | - | ||
| 750 | -.alert_holder { | ||
| 751 | - background:#FDF5D9; | ||
| 752 | - color:#444; | ||
| 753 | - border:1px solid #FCEEC1; | ||
| 754 | - @include round-borders-all(4px); | ||
| 755 | - padding:5px; | ||
| 756 | - list-style:none; | ||
| 757 | - font-weight: bold; | ||
| 758 | - text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25); | ||
| 759 | - | ||
| 760 | - li { | ||
| 761 | - padding:10px; | ||
| 762 | - } | ||
| 763 | -} | ||
| 764 | - | ||
| 765 | -.help_content { | ||
| 766 | - margin:20px; | ||
| 767 | - margin-top:71px; | ||
| 768 | - | ||
| 769 | - h2 { | ||
| 770 | - margin:0; | ||
| 771 | - padding:0; | ||
| 772 | - } | ||
| 773 | - | ||
| 774 | - .menu { | ||
| 775 | - float:left; | ||
| 776 | - width:20%; | ||
| 777 | - | ||
| 778 | - .active { | ||
| 779 | - color: $active_bd_color; | ||
| 780 | - } | ||
| 781 | - } | ||
| 782 | - | ||
| 783 | - .content { | ||
| 784 | - float:right; | ||
| 785 | - width:78%; | ||
| 786 | - } | ||
| 787 | - | ||
| 788 | - .bash { | ||
| 789 | - @include round-borders-all(4px); | ||
| 790 | - background:#eee; | ||
| 791 | - padding:5px; | ||
| 792 | - //overflow-x:scroll; | ||
| 793 | - pre{ | ||
| 794 | - padding:0; | ||
| 795 | - line-height:2.0; | ||
| 796 | - margin:0; | ||
| 797 | - font-family: 'Courier New', 'andale mono','lucida console',monospace; | ||
| 798 | - color: #333; | ||
| 799 | - text-align:left; | ||
| 800 | - } | ||
| 801 | - } | ||
| 802 | -} |
app/assets/stylesheets/tags.css.css
| @@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
| 1 | -.tags-list { | ||
| 2 | - padding : 0px 10px 10px 10px; | ||
| 3 | - | ||
| 4 | -} | ||
| 5 | - | ||
| 6 | -.tags-list a { | ||
| 7 | - display: inline-block; | ||
| 8 | - padding: 8px 11px 8px 11px; | ||
| 9 | - margin: 1px 5px 0px 0px; | ||
| 10 | - border-radius: 4px; | ||
| 11 | - border: 1px solid #72bbdf; | ||
| 12 | - background-color: #72bbdf; | ||
| 13 | - color: #0f326d; | ||
| 14 | - font-weight: bold; | ||
| 15 | - font-size: 14px; | ||
| 16 | -} | ||
| 17 | - | ||
| 18 | -.small-tags a{ | ||
| 19 | - font-size: 9px; | ||
| 20 | - | ||
| 21 | - display: inline-block; | ||
| 22 | - padding: 2px 3px 1px 3px; | ||
| 23 | - margin: 0px 3px 0px 0px; | ||
| 24 | - border-radius: 2px; | ||
| 25 | - background-color: #72bbdf; | ||
| 26 | - color: #FFF; | ||
| 27 | - text-shadow: none; | ||
| 28 | - font-weight: bold; | ||
| 29 | -} | ||
| 30 | - | ||
| 31 | -.medium-tags a{ | ||
| 32 | - font-size: 12px; | ||
| 33 | - | ||
| 34 | - display: inline-block; | ||
| 35 | - padding: 3px 4px 2px 4px; | ||
| 36 | - margin: 0px 7px 8px 0px; | ||
| 37 | - border-radius: 3px; | ||
| 38 | - background-color: #72bbdf; | ||
| 39 | - color: #FFF; | ||
| 40 | - text-shadow: none; | ||
| 41 | - font-weight: bold; | ||
| 42 | -} |
app/assets/stylesheets/top_panel.scss
| @@ -1,146 +0,0 @@ | @@ -1,146 +0,0 @@ | ||
| 1 | -.main_links { | ||
| 2 | - width:130px; | ||
| 3 | - float:left; | ||
| 4 | - | ||
| 5 | - a { | ||
| 6 | - float:left; | ||
| 7 | - } | ||
| 8 | -} | ||
| 9 | - | ||
| 10 | -.dashboard_links { | ||
| 11 | - padding:7px; | ||
| 12 | - float:left; | ||
| 13 | - a { | ||
| 14 | - margin: 0 14px; | ||
| 15 | - float: left; | ||
| 16 | - font-size: 14px; | ||
| 17 | - | ||
| 18 | - &.active { | ||
| 19 | - color:$active_link_color; | ||
| 20 | - } | ||
| 21 | - &:hover { | ||
| 22 | - color:$active_link_color; | ||
| 23 | - } | ||
| 24 | - } | ||
| 25 | -} | ||
| 26 | - | ||
| 27 | -.top-tabs { | ||
| 28 | - margin: 0; | ||
| 29 | - padding: 5px; | ||
| 30 | - font-size: 14px; | ||
| 31 | - padding-bottom:10px; | ||
| 32 | - margin-bottom:20px; | ||
| 33 | - height:26px; | ||
| 34 | - border-bottom:1px solid #ccc; | ||
| 35 | - | ||
| 36 | - .tab { | ||
| 37 | - font-weight: bold; | ||
| 38 | - background:none; | ||
| 39 | - padding: 10px; | ||
| 40 | - float:left; | ||
| 41 | - padding-left:0px; | ||
| 42 | - padding-right:40px; | ||
| 43 | - | ||
| 44 | - &.active { | ||
| 45 | - color: $active_link_color; | ||
| 46 | - } | ||
| 47 | - } | ||
| 48 | -} | ||
| 49 | - | ||
| 50 | -body header { | ||
| 51 | - position:absolute; | ||
| 52 | - width:100%; | ||
| 53 | - padding:0; | ||
| 54 | - margin:0; | ||
| 55 | - top:0; | ||
| 56 | - left:0; | ||
| 57 | - background: #999; /* for non-css3 browsers */ | ||
| 58 | - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#EAEAEA'); /* for IE */ | ||
| 59 | - background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#EAEAEA)); /* for webkit browsers */ | ||
| 60 | - background: -moz-linear-gradient(top, #FFFFFF, #EAEAEA); /* for firefox 3.6+ */ | ||
| 61 | - background: -o-linear-gradient(top, #FFFFFF, #EAEAEA); /* for firefox 3.6+ */ | ||
| 62 | - border-bottom: 1px solid #ccc; | ||
| 63 | - | ||
| 64 | - height:50px; | ||
| 65 | - | ||
| 66 | - .wrapper { | ||
| 67 | - margin:auto; | ||
| 68 | - width:$app_width; | ||
| 69 | - position:relative; | ||
| 70 | - | ||
| 71 | - .top_panel_content { | ||
| 72 | - padding:10px $app_padding; | ||
| 73 | - } | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | - .project_name { | ||
| 77 | - float:left; | ||
| 78 | - width:235px; | ||
| 79 | - margin-right:30px; | ||
| 80 | - font-size:16px; | ||
| 81 | - font-weight:bold; | ||
| 82 | - padding:8px; | ||
| 83 | - color:#333; | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - .git_url_wrapper { | ||
| 87 | - padding:0px; | ||
| 88 | - margin:0px; | ||
| 89 | - float:left; | ||
| 90 | - | ||
| 91 | - .git-url { | ||
| 92 | - padding:0px; | ||
| 93 | - margin:0px; | ||
| 94 | - font-size: 12px; | ||
| 95 | - | ||
| 96 | - margin-right:10px; | ||
| 97 | - border-radius: 4px; | ||
| 98 | - -moz-border-radius: 4px; | ||
| 99 | - | ||
| 100 | - | ||
| 101 | - color: #666; | ||
| 102 | - border: 1px solid #AAA; | ||
| 103 | - padding: 0 10px 0 30px; | ||
| 104 | - background: transparent url('images.png') no-repeat 8px -42px; | ||
| 105 | - width: 160px; | ||
| 106 | - height:26px; | ||
| 107 | - } | ||
| 108 | - } | ||
| 109 | -} | ||
| 110 | - | ||
| 111 | -.top_panel_holder .chzn-container { | ||
| 112 | - position:relative; | ||
| 113 | - | ||
| 114 | - .chzn-drop { | ||
| 115 | - margin:7px 0; | ||
| 116 | - border: 1px solid #CCC; | ||
| 117 | - min-width: 300px; | ||
| 118 | - | ||
| 119 | - .chzn-results { | ||
| 120 | - max-height:300px; | ||
| 121 | - } | ||
| 122 | - } | ||
| 123 | - | ||
| 124 | - .chzn-single { | ||
| 125 | - background:transparent; | ||
| 126 | - -moz-border-radius: 4px; | ||
| 127 | - border-radius: 4px; | ||
| 128 | - | ||
| 129 | - div { | ||
| 130 | - background:transparent; | ||
| 131 | - border-left:none; | ||
| 132 | - } | ||
| 133 | - | ||
| 134 | - span { | ||
| 135 | - font-weight: normal; | ||
| 136 | - } | ||
| 137 | - } | ||
| 138 | -} | ||
| 139 | - | ||
| 140 | -.rss-icon { | ||
| 141 | - margin:0 15px; | ||
| 142 | - padding:3px; | ||
| 143 | - border:1px solid #AAA; | ||
| 144 | - border-radius:3px; | ||
| 145 | - float:left; | ||
| 146 | -} |
app/assets/stylesheets/tree.scss
| 1 | -#tree-breadcrumbs { | ||
| 2 | - div { | ||
| 3 | - margin:0; | ||
| 4 | - margin-bottom:20px; | 1 | +#tree-holder { |
| 2 | + #tree-content-holder { | ||
| 5 | float:left; | 3 | float:left; |
| 6 | - font-size:14px; | 4 | + width:100%; |
| 5 | + } | ||
| 6 | + #tree-readme-holder { | ||
| 7 | + float:left; | ||
| 8 | + width:100%; | ||
| 9 | + .readme { | ||
| 10 | + @include round-borders-all(4px); | ||
| 11 | + padding:4px 15px; | ||
| 12 | + background: #F7F7F7; | ||
| 13 | + } | ||
| 7 | } | 14 | } |
| 8 | -} | ||
| 9 | 15 | ||
| 10 | -.tree_progress { | ||
| 11 | - float:left; | ||
| 12 | - width:16px; | ||
| 13 | - height:16px; | ||
| 14 | - margin:2px 6px; | ||
| 15 | - &.loading { | ||
| 16 | - background-position: 0px 0px; | ||
| 17 | - background: url("ajax-loader-facebook.gif") no-repeat; | 16 | + .tree_progress { |
| 17 | + display:none; | ||
| 18 | + margin:20px; | ||
| 19 | + &.loading { | ||
| 20 | + display:block; | ||
| 21 | + } | ||
| 18 | } | 22 | } |
| 19 | -} | ||
| 20 | 23 | ||
| 21 | 24 | ||
| 22 | -/** FILE CONTENT VIEW **/ | ||
| 23 | -.view_file_content{ | ||
| 24 | - .old_line, .new_line { | ||
| 25 | - background:#ECECEC; | ||
| 26 | - color:#777; | ||
| 27 | - width:15px; | ||
| 28 | - float:left; | ||
| 29 | - padding: 0px 10px; | ||
| 30 | - border-right: 1px solid #ccc; | ||
| 31 | - } | ||
| 32 | - .old_line{ | ||
| 33 | - display:none; | 25 | + /** FILE CONTENT VIEW **/ |
| 26 | + .view_file_content{ | ||
| 27 | + .old_line, .new_line { | ||
| 28 | + background:#ECECEC; | ||
| 29 | + color:#777; | ||
| 30 | + width:15px; | ||
| 31 | + float:left; | ||
| 32 | + padding: 0px 10px; | ||
| 33 | + border-right: 1px solid #ccc; | ||
| 34 | + } | ||
| 35 | + .old_line{ | ||
| 36 | + display:none; | ||
| 37 | + } | ||
| 34 | } | 38 | } |
| 35 | -} | ||
| 36 | 39 | ||
| 37 | -.view_file .view_file_header, | ||
| 38 | -.diff_file .diff_file_header { | ||
| 39 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); | ||
| 40 | - background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 41 | - background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
| 42 | - background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | 40 | + .view_file .view_file_header, |
| 41 | + .diff_file .diff_file_header { | ||
| 42 | + background:#f5f5f5; | ||
| 43 | margin: 0; | 43 | margin: 0; |
| 44 | font-weight: normal; | 44 | font-weight: normal; |
| 45 | font-weight: bold; | 45 | font-weight: bold; |
| 46 | text-align: left; | 46 | text-align: left; |
| 47 | color: #666; | 47 | color: #666; |
| 48 | - border-bottom: 1px solid #DEE2E3; | 48 | + border-bottom: 1px solid #ccc; |
| 49 | padding: 7px 10px; | 49 | padding: 7px 10px; |
| 50 | 50 | ||
| 51 | .mode_text, | 51 | .mode_text, |
| 52 | .file_icon { | 52 | .file_icon { |
| 53 | - margin-right:15px; | ||
| 54 | - padding-right:15px; | ||
| 55 | - border-right:1px solid $lite_border_color; | ||
| 56 | - float:left; | ||
| 57 | color:#aaa; | 53 | color:#aaa; |
| 58 | } | 54 | } |
| 55 | + } | ||
| 59 | 56 | ||
| 60 | - .file_icon { | ||
| 61 | - padding-left:15px; | 57 | + .view_file { |
| 58 | + border:1px solid #CCC; | ||
| 59 | + margin-bottom:1em; | ||
| 60 | + | ||
| 61 | + .view_file_content { | ||
| 62 | + background:#fff; | ||
| 63 | + color:#514721; | ||
| 64 | + font-size: 11px; | ||
| 62 | } | 65 | } |
| 63 | -} | 66 | + .view_file_content_image { |
| 67 | + background:#eee; | ||
| 68 | + text-align:center; | ||
| 69 | + img { | ||
| 70 | + padding:100px; | ||
| 71 | + max-width:300px; | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + } | ||
| 64 | 75 | ||
| 65 | -.view_file { | ||
| 66 | - border:1px solid #CCC; | ||
| 67 | - margin-bottom:1em; | ||
| 68 | - | ||
| 69 | - .view_file_content { | ||
| 70 | - background:#fff; | ||
| 71 | - color:#514721; | ||
| 72 | - font-size: 11px; | ||
| 73 | - } | ||
| 74 | - .view_file_content_image { | ||
| 75 | - background:#eee; | ||
| 76 | - text-align:center; | ||
| 77 | - img { | ||
| 78 | - padding:100px; | ||
| 79 | - max-width:300px; | 76 | + td.code { |
| 77 | + width: 100%; | ||
| 78 | + .highlight { | ||
| 79 | + margin-left: 55px; | ||
| 80 | + overflow:auto; | ||
| 81 | + overflow-y:hidden; | ||
| 80 | } | 82 | } |
| 81 | } | 83 | } |
| 82 | -} | 84 | + .highlight pre { |
| 85 | + white-space: pre; | ||
| 86 | + word-wrap:normal; | ||
| 87 | + } | ||
| 83 | 88 | ||
| 84 | -td.code { | ||
| 85 | - width: 100%; | ||
| 86 | - .highlight { | ||
| 87 | - margin-left: 55px; | ||
| 88 | - overflow:auto; | ||
| 89 | - overflow-y:hidden; | ||
| 90 | - border-left: 1px solid #DEE2E3; | ||
| 91 | - background: white; | 89 | + table.highlighttable { |
| 90 | + border: none; | ||
| 92 | } | 91 | } |
| 93 | -} | ||
| 94 | -.highlight pre { | ||
| 95 | - white-space: pre; | ||
| 96 | - word-wrap:normal; | ||
| 97 | -} | 92 | + body.project-page table.highlighttable td { border: none } |
| 93 | + table.highlighttable tr:hover { background:none;} | ||
| 98 | 94 | ||
| 99 | -table.highlighttable { | ||
| 100 | - border: none; | ||
| 101 | - background: #F7F7F7; | ||
| 102 | -} | ||
| 103 | -body.project-page table.highlighttable td { border: none } | ||
| 104 | -table.highlighttable tr:hover { background:none;} | 95 | + table.highlighttable pre{ |
| 96 | + line-height:16px !important; | ||
| 97 | + font-size:12px !important; | ||
| 98 | + } | ||
| 105 | 99 | ||
| 106 | -table.highlighttable pre{ | ||
| 107 | - line-height:16px !important; | ||
| 108 | - font-size:12px !important; | ||
| 109 | -} | 100 | + table.highlighttable .linenodiv pre { |
| 101 | + text-align: right; | ||
| 102 | + padding-right: 4px; | ||
| 103 | + color:#888; | ||
| 104 | + } | ||
| 110 | 105 | ||
| 111 | -table.highlighttable .linenodiv pre { | ||
| 112 | - text-align: right; | ||
| 113 | - padding-right: 4px; | ||
| 114 | - color:#888; | ||
| 115 | -} | 106 | + .tree-item { |
| 107 | + &:hover { | ||
| 108 | + background: $hover; | ||
| 109 | + cursor:pointer; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + | ||
| 113 | + .tree-item-file-name { | ||
| 114 | + font-weight:bold; | ||
| 115 | + a { | ||
| 116 | + color:$style_color; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + img { | ||
| 120 | + position: relative; | ||
| 121 | + top: 2px; | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + ul.breadcrumb { | ||
| 127 | + background:white; | ||
| 128 | + border:none; | ||
| 129 | + | ||
| 130 | + a { | ||
| 131 | + color:#666; | ||
| 132 | + font-weight:bold; | ||
| 133 | + font-size:14px; | ||
| 134 | + } | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + #tree-slider { | ||
| 138 | + @include shade; | ||
| 139 | + | ||
| 140 | + td { | ||
| 141 | + padding:7px; | ||
| 142 | + border-color:#f1f1f1; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + th { | ||
| 146 | + background:#f5f5f5; | ||
| 147 | + } | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + .tree-commit-link { | ||
| 151 | + color:#333; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + #tree-content-holder .view_file{ | ||
| 155 | + @include shade; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + #tree-readme-holder .readme { | ||
| 159 | + @include shade; | ||
| 160 | + margin-bottom:20px; | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + a.tree-commit-link { | ||
| 164 | + color: #666; | ||
| 165 | + &:hover { | ||
| 166 | + text-decoration: underline; | ||
| 167 | + } | ||
| 168 | + } | ||
| 116 | 169 | ||
| 117 | -.tree-item { | ||
| 118 | - &:hover { | ||
| 119 | - background: #FFFFCF; | 170 | + .arrow { |
| 171 | + background: url("images.png") no-repeat -85px -77px; | ||
| 172 | + width: 19px; | ||
| 173 | + height: 16px; | ||
| 174 | + float: left; | ||
| 175 | + position: relative; | ||
| 176 | + left: -10px; | ||
| 120 | } | 177 | } |
| 121 | } | 178 | } |
| @@ -0,0 +1,309 @@ | @@ -0,0 +1,309 @@ | ||
| 1 | +/** | ||
| 2 | + * This file represent some UI that can be changed | ||
| 3 | + * during web app restyle or theme select. | ||
| 4 | + * | ||
| 5 | + * Next items should be placed there | ||
| 6 | + * - link colors | ||
| 7 | + * - header styles | ||
| 8 | + * - main menu styles | ||
| 9 | + * | ||
| 10 | + */ | ||
| 11 | +.ui_basic { | ||
| 12 | + /* | ||
| 13 | + * Common styles | ||
| 14 | + * | ||
| 15 | + */ | ||
| 16 | + a { | ||
| 17 | + color: $link_color; | ||
| 18 | + &:hover { | ||
| 19 | + text-decoration:none; | ||
| 20 | + color: $style_color; | ||
| 21 | + } | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + /* | ||
| 26 | + * Application Header | ||
| 27 | + * | ||
| 28 | + */ | ||
| 29 | + header { | ||
| 30 | + width:100%; | ||
| 31 | + padding:0; | ||
| 32 | + margin:0; | ||
| 33 | + top:1px; | ||
| 34 | + left:0; | ||
| 35 | + background: #F1F1F1; /* for non-css3 browsers */ | ||
| 36 | + border-bottom: 1px solid #ccc; | ||
| 37 | + box-shadow: 0 -1px 0 white inset; | ||
| 38 | + -moz-box-shadow: 0 -1px 0 white inset; | ||
| 39 | + -webkit-box-shadow: 0 -1px 0 white inset; | ||
| 40 | + z-index:10; | ||
| 41 | + height:60px; | ||
| 42 | + | ||
| 43 | + .app_logo { | ||
| 44 | + width:230px; | ||
| 45 | + float:left; | ||
| 46 | + | ||
| 47 | + a { | ||
| 48 | + float:left; | ||
| 49 | + | ||
| 50 | + h1 { | ||
| 51 | + float:left; | ||
| 52 | + margin-left:5px; | ||
| 53 | + font-size:20px; | ||
| 54 | + line-height:34px; | ||
| 55 | + font-weight:bold; | ||
| 56 | + color:#aaa; | ||
| 57 | + text-shadow: 0 1px 1px #FFF; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + &.home { | ||
| 61 | + img { | ||
| 62 | + float: left; | ||
| 63 | + position: relative; | ||
| 64 | + top: -9px; | ||
| 65 | + width:46px; | ||
| 66 | + | ||
| 67 | + } | ||
| 68 | + } | ||
| 69 | + &.admin_link { | ||
| 70 | + width:16px; | ||
| 71 | + height:16px; | ||
| 72 | + padding: 5px; | ||
| 73 | + border: 1px solid #ccc; | ||
| 74 | + border-radius: 4px; | ||
| 75 | + margin: 0px; | ||
| 76 | + background: #eee; | ||
| 77 | + margin-left:20px; | ||
| 78 | + &:hover { | ||
| 79 | + background:#f7f7f7; | ||
| 80 | + } | ||
| 81 | + img { | ||
| 82 | + width:16px; | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + .wrapper { | ||
| 88 | + margin:auto; | ||
| 89 | + min-width:$min_app_width; | ||
| 90 | + max-width:$max_app_width; | ||
| 91 | + position:relative; | ||
| 92 | + padding:15px 0; | ||
| 93 | + | ||
| 94 | + .top_panel_content { | ||
| 95 | + margin:0 $app_padding; | ||
| 96 | + } | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + .project_name { | ||
| 100 | + float:left; | ||
| 101 | + width:400px; | ||
| 102 | + margin:0; | ||
| 103 | + margin-right:30px; | ||
| 104 | + font-size:20px; | ||
| 105 | + line-height:34px; | ||
| 106 | + font-weight:bold; | ||
| 107 | + color:$style_color; | ||
| 108 | + text-shadow: 0 1px 1px #FFF; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + .git_url_wrapper { | ||
| 112 | + padding:0px; | ||
| 113 | + margin:0px; | ||
| 114 | + float:left; | ||
| 115 | + | ||
| 116 | + .git-url { | ||
| 117 | + padding:0px; | ||
| 118 | + margin:0px; | ||
| 119 | + font-size: 12px; | ||
| 120 | + margin-right:10px; | ||
| 121 | + border-radius: 4px; | ||
| 122 | + -moz-border-radius: 4px; | ||
| 123 | + color: #666; | ||
| 124 | + border: 1px solid #AAA; | ||
| 125 | + padding: 0 10px 0 30px; | ||
| 126 | + background: transparent url('images.png') no-repeat 8px -42px; | ||
| 127 | + width: 260px; | ||
| 128 | + height:26px; | ||
| 129 | + } | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + /* Account box */ | ||
| 133 | + .account-box { | ||
| 134 | + position: absolute; | ||
| 135 | + right: 0; | ||
| 136 | + top: 13px; | ||
| 137 | + z-index: 10000; | ||
| 138 | + width: 128px; | ||
| 139 | + font-size: 11px; | ||
| 140 | + float: right; | ||
| 141 | + display: block; | ||
| 142 | + cursor: pointer; | ||
| 143 | + img { | ||
| 144 | + border-radius: 4px; | ||
| 145 | + right: 20px; | ||
| 146 | + position: absolute; | ||
| 147 | + width: 33px; | ||
| 148 | + height: 33px; | ||
| 149 | + display: block; | ||
| 150 | + top: 0; | ||
| 151 | + &:after { | ||
| 152 | + content: " "; | ||
| 153 | + display: block; | ||
| 154 | + position: absolute; | ||
| 155 | + top: 0; | ||
| 156 | + right: 0; | ||
| 157 | + left: 0; | ||
| 158 | + bottom: 0; | ||
| 159 | + float: right; | ||
| 160 | + border-radius: 5px; | ||
| 161 | + border: 1px solid rgba(255, 255, 255, 0.1); | ||
| 162 | + border-bottom: 0; | ||
| 163 | + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.15)), to(rgba(0, 0, 0, 0.25))), -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, 0.1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0))); | ||
| 164 | + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)), -moz-linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0)); | ||
| 165 | + background: linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)), linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0)); | ||
| 166 | + -webkit-background-origin: border-box; | ||
| 167 | + -moz-background-origin: border; | ||
| 168 | + background-origin: border-box; } } } | ||
| 169 | + | ||
| 170 | + .account-box { | ||
| 171 | + &.hover { | ||
| 172 | + height: 138px; } | ||
| 173 | + &:hover > .account-links { | ||
| 174 | + display: block; } } | ||
| 175 | + | ||
| 176 | + .account-links { | ||
| 177 | + background: #79C3E0; | ||
| 178 | + display: none; | ||
| 179 | + border-radius: 5px; | ||
| 180 | + width: 100px; | ||
| 181 | + margin-top: 0; | ||
| 182 | + float: right; | ||
| 183 | + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); | ||
| 184 | + position: relative; | ||
| 185 | + &:before { | ||
| 186 | + content: "."; | ||
| 187 | + width: 0; | ||
| 188 | + height: 0; | ||
| 189 | + position: absolute; | ||
| 190 | + border: 5px solid transparent; | ||
| 191 | + border-color: rgba(255, 255, 255, 0); | ||
| 192 | + border-bottom-color: #333; | ||
| 193 | + text-indent: -9999px; | ||
| 194 | + top: -10px; | ||
| 195 | + line-height: 0; | ||
| 196 | + right: 10px; | ||
| 197 | + z-index: 10; } | ||
| 198 | + background: #333; | ||
| 199 | + display: none; | ||
| 200 | + z-index: 100000; | ||
| 201 | + border-radius: 5px; | ||
| 202 | + width: 100px; | ||
| 203 | + position: absolute; | ||
| 204 | + right: 20px; | ||
| 205 | + top: 46px; | ||
| 206 | + margin-top: 0; | ||
| 207 | + float: right; | ||
| 208 | + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); | ||
| 209 | + a { | ||
| 210 | + color: #EEE; | ||
| 211 | + padding: 6px 10px; | ||
| 212 | + display: block; | ||
| 213 | + text-shadow: none; | ||
| 214 | + border-bottom: 1px solid #555; | ||
| 215 | + &:hover { | ||
| 216 | + background: #444; } } } | ||
| 217 | + | ||
| 218 | + .account-box.hover .arrow-up { | ||
| 219 | + top: 41px; | ||
| 220 | + right: 6px; | ||
| 221 | + position: absolute; } | ||
| 222 | + | ||
| 223 | + .account-links a { | ||
| 224 | + &:first-child { | ||
| 225 | + -webkit-border-top-left-radius: 5px; | ||
| 226 | + -webkit-border-top-right-radius: 5px; | ||
| 227 | + -moz-border-radius-topleft: 5px; | ||
| 228 | + -moz-border-radius-topright: 5px; | ||
| 229 | + border-top-left-radius: 5px; | ||
| 230 | + border-top-right-radius: 5px; } | ||
| 231 | + &:last-child { | ||
| 232 | + -webkit-border-bottom-right-radius: 5px; | ||
| 233 | + -webkit-border-bottom-left-radius: 5px; | ||
| 234 | + -moz-border-radius-bottomright: 5px; | ||
| 235 | + -moz-border-radius-bottomleft: 5px; | ||
| 236 | + border-bottom-right-radius: 5px; | ||
| 237 | + border-bottom-left-radius: 5px; | ||
| 238 | + border-bottom: 0; } } | ||
| 239 | + | ||
| 240 | + } | ||
| 241 | + /* | ||
| 242 | + * End of Application Header | ||
| 243 | + * | ||
| 244 | + */ | ||
| 245 | + | ||
| 246 | + /* | ||
| 247 | + * Main Menu of Application | ||
| 248 | + * | ||
| 249 | + */ | ||
| 250 | + nav.main_menu { | ||
| 251 | + overflow:hidden; | ||
| 252 | + border-radius: 4px; | ||
| 253 | + margin: auto; | ||
| 254 | + margin:30px $app_padding; | ||
| 255 | + background:#eee; | ||
| 256 | + border:1px solid #ccc; | ||
| 257 | + height:38px; | ||
| 258 | + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf)); | ||
| 259 | + background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 260 | + background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 261 | + background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 262 | + @include shade; | ||
| 263 | + .count { | ||
| 264 | + color:#aaa; | ||
| 265 | + margin-left:3px; | ||
| 266 | + } | ||
| 267 | + .label { | ||
| 268 | + background:$hover; | ||
| 269 | + text-shadow:none; | ||
| 270 | + color:$style_color; | ||
| 271 | + } | ||
| 272 | + a { | ||
| 273 | + font-weight:bold; | ||
| 274 | + &:first-child{ | ||
| 275 | + -webkit-border-top-left-radius: 4px; | ||
| 276 | + -webkit-border-bottom-left-radius: 4px; | ||
| 277 | + -moz-border-radius-topleft: 4px; | ||
| 278 | + -moz-border-radius-bottomleft: 4px; | ||
| 279 | + border-top-left-radius: 4px; | ||
| 280 | + border-bottom-left-radius: 4px; | ||
| 281 | + } | ||
| 282 | + padding: 10px 25px; | ||
| 283 | + display: inline-block; | ||
| 284 | + color: $style_color; | ||
| 285 | + border-right: 1px solid #d5d5d5; | ||
| 286 | + position: relative; | ||
| 287 | + box-shadow: 1px 0 0 rgba(255, 255, 255, 0.1); | ||
| 288 | + margin: 0; | ||
| 289 | + float:left; | ||
| 290 | + text-shadow:0 1px 1px white; | ||
| 291 | + &.home { | ||
| 292 | + background: url(home_icon.PNG) no-repeat center center; | ||
| 293 | + text-indent:-9999px; | ||
| 294 | + min-width:40px; | ||
| 295 | + img { | ||
| 296 | + position:relative; | ||
| 297 | + top:4px; | ||
| 298 | + } | ||
| 299 | + } | ||
| 300 | + &.current { | ||
| 301 | + background-color:#DDD; | ||
| 302 | + } | ||
| 303 | + } | ||
| 304 | + } | ||
| 305 | + /* | ||
| 306 | + * End of Main Menu | ||
| 307 | + * | ||
| 308 | + */ | ||
| 309 | +} |
| @@ -0,0 +1,337 @@ | @@ -0,0 +1,337 @@ | ||
| 1 | +/** | ||
| 2 | + * This file represent some UI that can be changed | ||
| 3 | + * during web app restyle or theme select. | ||
| 4 | + * | ||
| 5 | + * Next items should be placed there | ||
| 6 | + * - link colors | ||
| 7 | + * - header styles | ||
| 8 | + * - main menu styles | ||
| 9 | + * | ||
| 10 | + */ | ||
| 11 | +.ui_mars { | ||
| 12 | + | ||
| 13 | + /* | ||
| 14 | + * Common styles | ||
| 15 | + * | ||
| 16 | + */ | ||
| 17 | + a { | ||
| 18 | + color: $link_color; | ||
| 19 | + &:hover { | ||
| 20 | + text-decoration:none; | ||
| 21 | + color: $style_color; | ||
| 22 | + } | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + /* | ||
| 27 | + * Application Header | ||
| 28 | + * | ||
| 29 | + */ | ||
| 30 | + header { | ||
| 31 | + width:100%; | ||
| 32 | + padding:0; | ||
| 33 | + margin:0; | ||
| 34 | + top:1px; | ||
| 35 | + left:0; | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + background: #474D57 url('bg-header.png') repeat-x bottom; | ||
| 39 | + | ||
| 40 | + z-index:10; | ||
| 41 | + height:60px; | ||
| 42 | + | ||
| 43 | + .search-input { | ||
| 44 | + background-image:url("icon-search.png"); | ||
| 45 | + float: right; | ||
| 46 | + text-shadow: none; | ||
| 47 | + width: 116px; | ||
| 48 | + background-image: url("icon-search.png"); | ||
| 49 | + background-repeat: no-repeat; | ||
| 50 | + background-position: 10px; | ||
| 51 | + border-radius: 100px; | ||
| 52 | + border: 1px solid rgba(0, 0, 0, 0.7); | ||
| 53 | + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 2px rgba(0, 0, 0, 0.4) inset; | ||
| 54 | + background-color: #D2D5DA; | ||
| 55 | + background-color: rgba(255, 255, 255, 0.5); | ||
| 56 | + padding: 5px; | ||
| 57 | + padding-left: 26px; | ||
| 58 | + margin-right: 50px; | ||
| 59 | + | ||
| 60 | + &:focus { | ||
| 61 | + background-color: white; | ||
| 62 | + width: 166px; | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + .search-input::-webkit-input-placeholder { | ||
| 66 | + color: #666; | ||
| 67 | + } | ||
| 68 | + .app_logo { | ||
| 69 | + width:230px; | ||
| 70 | + float:left; | ||
| 71 | + position:relative; | ||
| 72 | + top:-4px; | ||
| 73 | + | ||
| 74 | + a { | ||
| 75 | + float:left; | ||
| 76 | + | ||
| 77 | + h1 { | ||
| 78 | + | ||
| 79 | + background: url('images.png') no-repeat -3px -7px; | ||
| 80 | + width: 65px; | ||
| 81 | + height: 26px; | ||
| 82 | + margin: 5px 0; | ||
| 83 | + padding: 0; | ||
| 84 | + display: block; | ||
| 85 | + float: left; | ||
| 86 | + text-indent: -1000em; | ||
| 87 | + | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + &.home { | ||
| 91 | + img { | ||
| 92 | + display:none | ||
| 93 | + | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + &.admin_link { | ||
| 97 | + width:16px; | ||
| 98 | + height:16px; | ||
| 99 | + padding: 5px; | ||
| 100 | + border: 1px solid #888; | ||
| 101 | + border-radius: 4px; | ||
| 102 | + margin: 0px; | ||
| 103 | + background:#474D57 ; | ||
| 104 | + margin-left:20px; | ||
| 105 | + margin-top:4px; | ||
| 106 | + &:hover { | ||
| 107 | + background:#f7f7f7; | ||
| 108 | + } | ||
| 109 | + img { | ||
| 110 | + width:16px; | ||
| 111 | + } | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | + .wrapper { | ||
| 116 | + margin:auto; | ||
| 117 | + min-width:$min_app_width; | ||
| 118 | + max-width:$max_app_width; | ||
| 119 | + position:relative; | ||
| 120 | + padding:15px 0; | ||
| 121 | + | ||
| 122 | + .top_panel_content { | ||
| 123 | + margin:0 $app_padding; | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + .project_name { | ||
| 128 | + float:left; | ||
| 129 | + width:400px; | ||
| 130 | + margin:0; | ||
| 131 | + margin-right:30px; | ||
| 132 | + font-size:20px; | ||
| 133 | + line-height:34px; | ||
| 134 | + font-weight:bold; | ||
| 135 | + color:#fff; | ||
| 136 | + text-shadow: 0 1px 1px #111; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + .git_url_wrapper { | ||
| 140 | + padding:0px; | ||
| 141 | + margin:0px; | ||
| 142 | + float:left; | ||
| 143 | + | ||
| 144 | + .git-url { | ||
| 145 | + padding:0px; | ||
| 146 | + margin:0px; | ||
| 147 | + font-size: 12px; | ||
| 148 | + margin-right:10px; | ||
| 149 | + border-radius: 4px; | ||
| 150 | + -moz-border-radius: 4px; | ||
| 151 | + color: #666; | ||
| 152 | + border: 1px solid #AAA; | ||
| 153 | + padding: 0 10px 0 30px; | ||
| 154 | + background: transparent url('images.png') no-repeat 8px -42px; | ||
| 155 | + width: 260px; | ||
| 156 | + height:26px; | ||
| 157 | + } | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + /* Account box */ | ||
| 161 | + .account-box { | ||
| 162 | + position: absolute; | ||
| 163 | + right: 0; | ||
| 164 | + top: 13px; | ||
| 165 | + z-index: 10000; | ||
| 166 | + width: 128px; | ||
| 167 | + font-size: 11px; | ||
| 168 | + float: right; | ||
| 169 | + display: block; | ||
| 170 | + cursor: pointer; | ||
| 171 | + img { | ||
| 172 | + border-radius: 4px; | ||
| 173 | + right: 20px; | ||
| 174 | + position: absolute; | ||
| 175 | + width: 33px; | ||
| 176 | + height: 33px; | ||
| 177 | + display: block; | ||
| 178 | + top: 0; | ||
| 179 | + &:after { | ||
| 180 | + content: " "; | ||
| 181 | + display: block; | ||
| 182 | + position: absolute; | ||
| 183 | + top: 0; | ||
| 184 | + right: 0; | ||
| 185 | + left: 0; | ||
| 186 | + bottom: 0; | ||
| 187 | + float: right; | ||
| 188 | + border-radius: 5px; | ||
| 189 | + border: 1px solid rgba(255, 255, 255, 0.1); | ||
| 190 | + border-bottom: 0; | ||
| 191 | + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.15)), to(rgba(0, 0, 0, 0.25))), -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, 0.1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0))); | ||
| 192 | + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)), -moz-linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0)); | ||
| 193 | + background: linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)), linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0)); | ||
| 194 | + -webkit-background-origin: border-box; | ||
| 195 | + -moz-background-origin: border; | ||
| 196 | + background-origin: border-box; } } } | ||
| 197 | + | ||
| 198 | + .account-box { | ||
| 199 | + &.hover { | ||
| 200 | + height: 138px; } | ||
| 201 | + &:hover > .account-links { | ||
| 202 | + display: block; } } | ||
| 203 | + | ||
| 204 | + .account-links { | ||
| 205 | + background: #79C3E0; | ||
| 206 | + display: none; | ||
| 207 | + border-radius: 5px; | ||
| 208 | + width: 100px; | ||
| 209 | + margin-top: 0; | ||
| 210 | + float: right; | ||
| 211 | + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); | ||
| 212 | + position: relative; | ||
| 213 | + &:before { | ||
| 214 | + content: "."; | ||
| 215 | + width: 0; | ||
| 216 | + height: 0; | ||
| 217 | + position: absolute; | ||
| 218 | + border: 5px solid transparent; | ||
| 219 | + border-color: rgba(255, 255, 255, 0); | ||
| 220 | + border-bottom-color: #333; | ||
| 221 | + text-indent: -9999px; | ||
| 222 | + top: -10px; | ||
| 223 | + line-height: 0; | ||
| 224 | + right: 10px; | ||
| 225 | + z-index: 10; } | ||
| 226 | + background: #333; | ||
| 227 | + display: none; | ||
| 228 | + z-index: 100000; | ||
| 229 | + border-radius: 5px; | ||
| 230 | + width: 100px; | ||
| 231 | + position: absolute; | ||
| 232 | + right: 20px; | ||
| 233 | + top: 46px; | ||
| 234 | + margin-top: 0; | ||
| 235 | + float: right; | ||
| 236 | + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); | ||
| 237 | + a { | ||
| 238 | + color: #EEE; | ||
| 239 | + padding: 6px 10px; | ||
| 240 | + display: block; | ||
| 241 | + text-shadow: none; | ||
| 242 | + border-bottom: 1px solid #555; | ||
| 243 | + &:hover { | ||
| 244 | + background: #444; } } } | ||
| 245 | + | ||
| 246 | + .account-box.hover .arrow-up { | ||
| 247 | + top: 41px; | ||
| 248 | + right: 6px; | ||
| 249 | + position: absolute; } | ||
| 250 | + | ||
| 251 | + .account-links a { | ||
| 252 | + &:first-child { | ||
| 253 | + -webkit-border-top-left-radius: 5px; | ||
| 254 | + -webkit-border-top-right-radius: 5px; | ||
| 255 | + -moz-border-radius-topleft: 5px; | ||
| 256 | + -moz-border-radius-topright: 5px; | ||
| 257 | + border-top-left-radius: 5px; | ||
| 258 | + border-top-right-radius: 5px; } | ||
| 259 | + &:last-child { | ||
| 260 | + -webkit-border-bottom-right-radius: 5px; | ||
| 261 | + -webkit-border-bottom-left-radius: 5px; | ||
| 262 | + -moz-border-radius-bottomright: 5px; | ||
| 263 | + -moz-border-radius-bottomleft: 5px; | ||
| 264 | + border-bottom-right-radius: 5px; | ||
| 265 | + border-bottom-left-radius: 5px; | ||
| 266 | + border-bottom: 0; } } | ||
| 267 | + | ||
| 268 | + } | ||
| 269 | + /* | ||
| 270 | + * End of Application Header | ||
| 271 | + * | ||
| 272 | + */ | ||
| 273 | + | ||
| 274 | + /* | ||
| 275 | + * Main Menu of Application | ||
| 276 | + * | ||
| 277 | + */ | ||
| 278 | + nav.main_menu { | ||
| 279 | + overflow:hidden; | ||
| 280 | + border-radius: 4px; | ||
| 281 | + margin: auto; | ||
| 282 | + margin:30px $app_padding; | ||
| 283 | + background:#eee; | ||
| 284 | + border:1px solid #ccc; | ||
| 285 | + height:38px; | ||
| 286 | + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf)); | ||
| 287 | + background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 288 | + background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 289 | + background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 290 | + @include shade; | ||
| 291 | + .count { | ||
| 292 | + color:#aaa; | ||
| 293 | + margin-left:3px; | ||
| 294 | + } | ||
| 295 | + .label { | ||
| 296 | + background:$hover; | ||
| 297 | + text-shadow:none; | ||
| 298 | + color:$style_color; | ||
| 299 | + } | ||
| 300 | + a { | ||
| 301 | + font-weight:bold; | ||
| 302 | + &:first-child{ | ||
| 303 | + -webkit-border-top-left-radius: 4px; | ||
| 304 | + -webkit-border-bottom-left-radius: 4px; | ||
| 305 | + -moz-border-radius-topleft: 4px; | ||
| 306 | + -moz-border-radius-bottomleft: 4px; | ||
| 307 | + border-top-left-radius: 4px; | ||
| 308 | + border-bottom-left-radius: 4px; | ||
| 309 | + } | ||
| 310 | + padding: 10px 25px; | ||
| 311 | + display: inline-block; | ||
| 312 | + color: $style_color; | ||
| 313 | + border-right: 1px solid #d5d5d5; | ||
| 314 | + position: relative; | ||
| 315 | + box-shadow: 1px 0 0 rgba(255, 255, 255, 0.1); | ||
| 316 | + margin: 0; | ||
| 317 | + float:left; | ||
| 318 | + text-shadow:0 1px 1px white; | ||
| 319 | + &.home { | ||
| 320 | + background: url(home_icon.PNG) no-repeat center center; | ||
| 321 | + text-indent:-9999px; | ||
| 322 | + min-width:40px; | ||
| 323 | + img { | ||
| 324 | + position:relative; | ||
| 325 | + top:4px; | ||
| 326 | + } | ||
| 327 | + } | ||
| 328 | + &.current { | ||
| 329 | + background-color:#DDD; | ||
| 330 | + } | ||
| 331 | + } | ||
| 332 | + } | ||
| 333 | + /* | ||
| 334 | + * End of Main Menu | ||
| 335 | + * | ||
| 336 | + */ | ||
| 337 | +} |
app/controllers/admin/projects_controller.rb
| @@ -52,6 +52,12 @@ class Admin::ProjectsController < ApplicationController | @@ -52,6 +52,12 @@ class Admin::ProjectsController < ApplicationController | ||
| 52 | def update | 52 | def update |
| 53 | @admin_project = Project.find_by_code(params[:id]) | 53 | @admin_project = Project.find_by_code(params[:id]) |
| 54 | 54 | ||
| 55 | + owner_id = params[:project].delete(:owner_id) | ||
| 56 | + | ||
| 57 | + if owner_id | ||
| 58 | + @admin_project.owner = User.find(owner_id) | ||
| 59 | + end | ||
| 60 | + | ||
| 55 | if @admin_project.update_attributes(params[:project]) | 61 | if @admin_project.update_attributes(params[:project]) |
| 56 | redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.' | 62 | redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.' |
| 57 | else | 63 | else |
app/controllers/admin/team_members_controller.rb
| @@ -3,39 +3,15 @@ class Admin::TeamMembersController < ApplicationController | @@ -3,39 +3,15 @@ class Admin::TeamMembersController < ApplicationController | ||
| 3 | before_filter :authenticate_user! | 3 | before_filter :authenticate_user! |
| 4 | before_filter :authenticate_admin! | 4 | before_filter :authenticate_admin! |
| 5 | 5 | ||
| 6 | - def index | ||
| 7 | - @admin_team_members = UsersProject.page(params[:page]).per(100).order("project_id DESC") | ||
| 8 | - end | ||
| 9 | - | ||
| 10 | - def show | ||
| 11 | - @admin_team_member = UsersProject.find(params[:id]) | ||
| 12 | - end | ||
| 13 | - | ||
| 14 | - def new | ||
| 15 | - @admin_team_member = UsersProject.new(params[:team_member]) | ||
| 16 | - end | ||
| 17 | - | ||
| 18 | def edit | 6 | def edit |
| 19 | @admin_team_member = UsersProject.find(params[:id]) | 7 | @admin_team_member = UsersProject.find(params[:id]) |
| 20 | end | 8 | end |
| 21 | 9 | ||
| 22 | - def create | ||
| 23 | - @admin_team_member = UsersProject.new(params[:team_member]) | ||
| 24 | - @admin_team_member.project_id = params[:team_member][:project_id] | ||
| 25 | - | ||
| 26 | - if @admin_team_member.save | ||
| 27 | - redirect_to admin_team_member_path(@admin_team_member), notice: 'UsersProject was successfully created.' | ||
| 28 | - else | ||
| 29 | - render action: "new" | ||
| 30 | - end | ||
| 31 | - end | ||
| 32 | - | ||
| 33 | def update | 10 | def update |
| 34 | @admin_team_member = UsersProject.find(params[:id]) | 11 | @admin_team_member = UsersProject.find(params[:id]) |
| 35 | - @admin_team_member.project_id = params[:team_member][:project_id] | ||
| 36 | 12 | ||
| 37 | if @admin_team_member.update_attributes(params[:team_member]) | 13 | if @admin_team_member.update_attributes(params[:team_member]) |
| 38 | - redirect_to admin_team_member_path(@admin_team_member), notice: 'UsersProject was successfully updated.' | 14 | + redirect_to [:admin, @admin_team_member.project], notice: 'Project Access was successfully updated.' |
| 39 | else | 15 | else |
| 40 | render action: "edit" | 16 | render action: "edit" |
| 41 | end | 17 | end |
| @@ -45,6 +21,6 @@ class Admin::TeamMembersController < ApplicationController | @@ -45,6 +21,6 @@ class Admin::TeamMembersController < ApplicationController | ||
| 45 | @admin_team_member = UsersProject.find(params[:id]) | 21 | @admin_team_member = UsersProject.find(params[:id]) |
| 46 | @admin_team_member.destroy | 22 | @admin_team_member.destroy |
| 47 | 23 | ||
| 48 | - redirect_to admin_team_members_url | 24 | + redirect_to :back |
| 49 | end | 25 | end |
| 50 | end | 26 | end |
app/controllers/admin/users_controller.rb
| @@ -9,8 +9,28 @@ class Admin::UsersController < ApplicationController | @@ -9,8 +9,28 @@ class Admin::UsersController < ApplicationController | ||
| 9 | 9 | ||
| 10 | def show | 10 | def show |
| 11 | @admin_user = User.find(params[:id]) | 11 | @admin_user = User.find(params[:id]) |
| 12 | + | ||
| 13 | + @projects = if @admin_user.projects.empty? | ||
| 14 | + Project | ||
| 15 | + else | ||
| 16 | + Project.without_user(@admin_user) | ||
| 17 | + end.all | ||
| 12 | end | 18 | end |
| 13 | 19 | ||
| 20 | + def team_update | ||
| 21 | + @admin_user = User.find(params[:id]) | ||
| 22 | + | ||
| 23 | + UsersProject.user_bulk_import( | ||
| 24 | + @admin_user, | ||
| 25 | + params[:project_ids], | ||
| 26 | + params[:project_access], | ||
| 27 | + params[:repo_access] | ||
| 28 | + ) | ||
| 29 | + | ||
| 30 | + redirect_to [:admin, @admin_user], notice: 'Teams were successfully updated.' | ||
| 31 | + end | ||
| 32 | + | ||
| 33 | + | ||
| 14 | def new | 34 | def new |
| 15 | @admin_user = User.new(:projects_limit => 10) | 35 | @admin_user = User.new(:projects_limit => 10) |
| 16 | end | 36 | end |
app/controllers/application_controller.rb
| @@ -5,7 +5,11 @@ class ApplicationController < ActionController::Base | @@ -5,7 +5,11 @@ class ApplicationController < ActionController::Base | ||
| 5 | helper_method :abilities, :can? | 5 | helper_method :abilities, :can? |
| 6 | 6 | ||
| 7 | rescue_from Gitlabhq::Gitolite::AccessDenied do |exception| | 7 | rescue_from Gitlabhq::Gitolite::AccessDenied do |exception| |
| 8 | - render :file => File.join(Rails.root, "public", "githost_error"), :layout => false | 8 | + render "errors/gitolite", :layout => "error" |
| 9 | + end | ||
| 10 | + | ||
| 11 | + rescue_from ActiveRecord::RecordNotFound do |exception| | ||
| 12 | + render "errors/not_found", :layout => "error", :status => 404 | ||
| 9 | end | 13 | end |
| 10 | 14 | ||
| 11 | layout :layout_by_resource | 15 | layout :layout_by_resource |
| @@ -33,7 +37,8 @@ class ApplicationController < ActionController::Base | @@ -33,7 +37,8 @@ class ApplicationController < ActionController::Base | ||
| 33 | end | 37 | end |
| 34 | 38 | ||
| 35 | def project | 39 | def project |
| 36 | - @project ||= Project.find_by_code(params[:project_id]) | 40 | + @project ||= current_user.projects.find_by_code(params[:project_id]) |
| 41 | + @project || render_404 | ||
| 37 | end | 42 | end |
| 38 | 43 | ||
| 39 | def add_project_abilities | 44 | def add_project_abilities |
| @@ -45,11 +50,23 @@ class ApplicationController < ActionController::Base | @@ -45,11 +50,23 @@ class ApplicationController < ActionController::Base | ||
| 45 | end | 50 | end |
| 46 | 51 | ||
| 47 | def authorize_project!(action) | 52 | def authorize_project!(action) |
| 48 | - return render_404 unless can?(current_user, action, project) | 53 | + return access_denied! unless can?(current_user, action, project) |
| 54 | + end | ||
| 55 | + | ||
| 56 | + def authorize_code_access! | ||
| 57 | + return access_denied! unless can?(current_user, :download_code, project) | ||
| 49 | end | 58 | end |
| 50 | 59 | ||
| 51 | def access_denied! | 60 | def access_denied! |
| 52 | - render_404 | 61 | + render "errors/access_denied", :layout => "error", :status => 404 |
| 62 | + end | ||
| 63 | + | ||
| 64 | + def not_found! | ||
| 65 | + render "errors/not_found", :layout => "error", :status => 404 | ||
| 66 | + end | ||
| 67 | + | ||
| 68 | + def git_not_found! | ||
| 69 | + render "errors/git_not_found", :layout => "error", :status => 404 | ||
| 53 | end | 70 | end |
| 54 | 71 | ||
| 55 | def method_missing(method_sym, *arguments, &block) | 72 | def method_missing(method_sym, *arguments, &block) |
| @@ -78,21 +95,13 @@ class ApplicationController < ActionController::Base | @@ -78,21 +95,13 @@ class ApplicationController < ActionController::Base | ||
| 78 | redirect_to @project unless @project.repo_exists? && @project.has_commits? | 95 | redirect_to @project unless @project.repo_exists? && @project.has_commits? |
| 79 | end | 96 | end |
| 80 | 97 | ||
| 81 | - def respond_with_notes | ||
| 82 | - if params[:last_id] && params[:first_id] | ||
| 83 | - @notes = @notes.where("id >= ?", params[:first_id]) | ||
| 84 | - elsif params[:last_id] | ||
| 85 | - @notes = @notes.where("id > ?", params[:last_id]) | ||
| 86 | - elsif params[:first_id] | ||
| 87 | - @notes = @notes.where("id < ?", params[:first_id]) | ||
| 88 | - else | ||
| 89 | - nil | ||
| 90 | - end | ||
| 91 | - end | ||
| 92 | - | ||
| 93 | def no_cache_headers | 98 | def no_cache_headers |
| 94 | response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate" | 99 | response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate" |
| 95 | response.headers["Pragma"] = "no-cache" | 100 | response.headers["Pragma"] = "no-cache" |
| 96 | response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT" | 101 | response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT" |
| 97 | end | 102 | end |
| 103 | + | ||
| 104 | + def render_full_content | ||
| 105 | + @full_content = true | ||
| 106 | + end | ||
| 98 | end | 107 | end |
app/controllers/commits_controller.rb
| @@ -7,12 +7,14 @@ class CommitsController < ApplicationController | @@ -7,12 +7,14 @@ class CommitsController < ApplicationController | ||
| 7 | # Authorize | 7 | # Authorize |
| 8 | before_filter :add_project_abilities | 8 | before_filter :add_project_abilities |
| 9 | before_filter :authorize_read_project! | 9 | before_filter :authorize_read_project! |
| 10 | + before_filter :authorize_code_access! | ||
| 10 | before_filter :require_non_empty_project | 11 | before_filter :require_non_empty_project |
| 11 | before_filter :load_refs, :only => :index # load @branch, @tag & @ref | 12 | before_filter :load_refs, :only => :index # load @branch, @tag & @ref |
| 13 | + before_filter :render_full_content | ||
| 12 | 14 | ||
| 13 | def index | 15 | def index |
| 14 | @repo = project.repo | 16 | @repo = project.repo |
| 15 | - @limit, @offset = (params[:limit] || 20), (params[:offset] || 0) | 17 | + @limit, @offset = (params[:limit] || 40), (params[:offset] || 0) |
| 16 | @commits = @project.commits(@ref, params[:path], @limit, @offset) | 18 | @commits = @project.commits(@ref, params[:path], @limit, @offset) |
| 17 | 19 | ||
| 18 | respond_to do |format| | 20 | respond_to do |format| |
| @@ -24,14 +26,31 @@ class CommitsController < ApplicationController | @@ -24,14 +26,31 @@ class CommitsController < ApplicationController | ||
| 24 | 26 | ||
| 25 | def show | 27 | def show |
| 26 | @commit = project.commit(params[:id]) | 28 | @commit = project.commit(params[:id]) |
| 27 | - @notes = project.commit_notes(@commit).fresh.limit(20) | ||
| 28 | - @note = @project.build_commit_note(@commit) | ||
| 29 | 29 | ||
| 30 | + git_not_found! and return unless @commit | ||
| 31 | + | ||
| 32 | + @note = @project.build_commit_note(@commit) | ||
| 33 | + @comments_allowed = true | ||
| 30 | @line_notes = project.commit_line_notes(@commit) | 34 | @line_notes = project.commit_line_notes(@commit) |
| 35 | + end | ||
| 31 | 36 | ||
| 32 | - respond_to do |format| | ||
| 33 | - format.html | ||
| 34 | - format.js { respond_with_notes } | 37 | + def compare |
| 38 | + first = project.commit(params[:to]) | ||
| 39 | + last = project.commit(params[:from]) | ||
| 40 | + | ||
| 41 | + @diffs = [] | ||
| 42 | + @commits = [] | ||
| 43 | + @line_notes = [] | ||
| 44 | + | ||
| 45 | + if first && last | ||
| 46 | + commits = [first, last].sort_by(&:created_at) | ||
| 47 | + younger = commits.first | ||
| 48 | + older = commits.last | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + @commits = project.repo.commits_between(younger.id, older.id).map {|c| Commit.new(c)} | ||
| 52 | + @diffs = project.repo.diff(younger.id, older.id) rescue [] | ||
| 53 | + @commit = Commit.new(older) | ||
| 35 | end | 54 | end |
| 36 | end | 55 | end |
| 37 | end | 56 | end |
app/controllers/dashboard_controller.rb
| @@ -3,7 +3,16 @@ class DashboardController < ApplicationController | @@ -3,7 +3,16 @@ class DashboardController < ApplicationController | ||
| 3 | 3 | ||
| 4 | def index | 4 | def index |
| 5 | @projects = current_user.projects.all | 5 | @projects = current_user.projects.all |
| 6 | + | ||
| 6 | @active_projects = @projects.select(&:repo_exists?).select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse | 7 | @active_projects = @projects.select(&:repo_exists?).select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse |
| 8 | + | ||
| 9 | + @merge_requests = MergeRequest.where("author_id = :id or assignee_id = :id", :id => current_user.id).opened.order("created_at DESC").limit(10) | ||
| 10 | + | ||
| 11 | + @user = current_user | ||
| 12 | + @issues = current_user.assigned_issues.opened.order("created_at DESC").limit(10) | ||
| 13 | + @issues = @issues.includes(:author, :project) | ||
| 14 | + | ||
| 15 | + @events = Event.where(:project_id => @projects.map(&:id)).recent.limit(20) | ||
| 7 | end | 16 | end |
| 8 | 17 | ||
| 9 | # Get authored or assigned open merge requests | 18 | # Get authored or assigned open merge requests |
app/controllers/errors_controller.rb
app/controllers/issues_controller.rb
| 1 | class IssuesController < ApplicationController | 1 | class IssuesController < ApplicationController |
| 2 | before_filter :authenticate_user! | 2 | before_filter :authenticate_user! |
| 3 | before_filter :project | 3 | before_filter :project |
| 4 | + before_filter :module_enabled | ||
| 4 | before_filter :issue, :only => [:edit, :update, :destroy, :show] | 5 | before_filter :issue, :only => [:edit, :update, :destroy, :show] |
| 5 | layout "project" | 6 | layout "project" |
| 6 | 7 | ||
| @@ -48,7 +49,6 @@ class IssuesController < ApplicationController | @@ -48,7 +49,6 @@ class IssuesController < ApplicationController | ||
| 48 | end | 49 | end |
| 49 | 50 | ||
| 50 | def show | 51 | def show |
| 51 | - @notes = @issue.notes.inc_author.order("created_at DESC").limit(20) | ||
| 52 | @note = @project.notes.new(:noteable => @issue) | 52 | @note = @project.notes.new(:noteable => @issue) |
| 53 | 53 | ||
| 54 | @commits = if @issue.branch_name && @project.repo.heads.map(&:name).include?(@issue.branch_name) | 54 | @commits = if @issue.branch_name && @project.repo.heads.map(&:name).include?(@issue.branch_name) |
| @@ -60,7 +60,7 @@ class IssuesController < ApplicationController | @@ -60,7 +60,7 @@ class IssuesController < ApplicationController | ||
| 60 | 60 | ||
| 61 | respond_to do |format| | 61 | respond_to do |format| |
| 62 | format.html | 62 | format.html |
| 63 | - format.js { respond_with_notes } | 63 | + format.js |
| 64 | end | 64 | end |
| 65 | end | 65 | end |
| 66 | 66 | ||
| @@ -69,7 +69,10 @@ class IssuesController < ApplicationController | @@ -69,7 +69,10 @@ class IssuesController < ApplicationController | ||
| 69 | @issue.author = current_user | 69 | @issue.author = current_user |
| 70 | @issue.save | 70 | @issue.save |
| 71 | 71 | ||
| 72 | - respond_with(@issue) | 72 | + respond_to do |format| |
| 73 | + format.html { redirect_to project_issue_path(@project, @issue) } | ||
| 74 | + format.js | ||
| 75 | + end | ||
| 73 | end | 76 | end |
| 74 | 77 | ||
| 75 | def update | 78 | def update |
| @@ -125,11 +128,14 @@ class IssuesController < ApplicationController | @@ -125,11 +128,14 @@ class IssuesController < ApplicationController | ||
| 125 | end | 128 | end |
| 126 | 129 | ||
| 127 | def authorize_modify_issue! | 130 | def authorize_modify_issue! |
| 128 | - can?(current_user, :modify_issue, @issue) || | ||
| 129 | - @issue.assignee == current_user | 131 | + return render_404 unless can?(current_user, :modify_issue, @issue) |
| 130 | end | 132 | end |
| 131 | 133 | ||
| 132 | def authorize_admin_issue! | 134 | def authorize_admin_issue! |
| 133 | - can?(current_user, :admin_issue, @issue) | 135 | + return render_404 unless can?(current_user, :admin_issue, @issue) |
| 136 | + end | ||
| 137 | + | ||
| 138 | + def module_enabled | ||
| 139 | + return render_404 unless @project.issues_enabled | ||
| 134 | end | 140 | end |
| 135 | end | 141 | end |
app/controllers/keys_controller.rb
app/controllers/merge_requests_controller.rb
| 1 | class MergeRequestsController < ApplicationController | 1 | class MergeRequestsController < ApplicationController |
| 2 | before_filter :authenticate_user! | 2 | before_filter :authenticate_user! |
| 3 | before_filter :project | 3 | before_filter :project |
| 4 | + before_filter :module_enabled | ||
| 4 | before_filter :merge_request, :only => [:edit, :update, :destroy, :show, :commits, :diffs] | 5 | before_filter :merge_request, :only => [:edit, :update, :destroy, :show, :commits, :diffs] |
| 5 | layout "project" | 6 | layout "project" |
| 6 | 7 | ||
| @@ -23,7 +24,9 @@ class MergeRequestsController < ApplicationController | @@ -23,7 +24,9 @@ class MergeRequestsController < ApplicationController | ||
| 23 | @merge_requests = @project.merge_requests | 24 | @merge_requests = @project.merge_requests |
| 24 | 25 | ||
| 25 | @merge_requests = case params[:f].to_i | 26 | @merge_requests = case params[:f].to_i |
| 27 | + when 1 then @merge_requests | ||
| 26 | when 2 then @merge_requests.closed | 28 | when 2 then @merge_requests.closed |
| 29 | + when 2 then @merge_requests.opened.assigned(current_user) | ||
| 27 | else @merge_requests.opened | 30 | else @merge_requests.opened |
| 28 | end | 31 | end |
| 29 | 32 | ||
| @@ -33,26 +36,31 @@ class MergeRequestsController < ApplicationController | @@ -33,26 +36,31 @@ class MergeRequestsController < ApplicationController | ||
| 33 | def show | 36 | def show |
| 34 | unless @project.repo.heads.map(&:name).include?(@merge_request.target_branch) && | 37 | unless @project.repo.heads.map(&:name).include?(@merge_request.target_branch) && |
| 35 | @project.repo.heads.map(&:name).include?(@merge_request.source_branch) | 38 | @project.repo.heads.map(&:name).include?(@merge_request.source_branch) |
| 36 | - head(404)and return | 39 | + git_not_found! and return |
| 37 | end | 40 | end |
| 38 | 41 | ||
| 39 | - @notes = @merge_request.notes.inc_author.order("created_at DESC").limit(20) | ||
| 40 | @note = @project.notes.new(:noteable => @merge_request) | 42 | @note = @project.notes.new(:noteable => @merge_request) |
| 41 | 43 | ||
| 44 | + @commits = @project.repo. | ||
| 45 | + commits_between(@merge_request.target_branch, @merge_request.source_branch). | ||
| 46 | + map {|c| Commit.new(c)}. | ||
| 47 | + sort_by(&:created_at). | ||
| 48 | + reverse | ||
| 49 | + | ||
| 50 | + render_full_content | ||
| 51 | + | ||
| 42 | respond_to do |format| | 52 | respond_to do |format| |
| 43 | format.html | 53 | format.html |
| 44 | - format.js { respond_with_notes } | 54 | + format.js |
| 45 | end | 55 | end |
| 46 | end | 56 | end |
| 47 | 57 | ||
| 48 | - def commits | ||
| 49 | - @commits = @project.repo.commits_between(@merge_request.target_branch, @merge_request.source_branch).map {|c| Commit.new(c)} | ||
| 50 | - end | ||
| 51 | - | ||
| 52 | def diffs | 58 | def diffs |
| 53 | @diffs = @merge_request.diffs | 59 | @diffs = @merge_request.diffs |
| 54 | @commit = @merge_request.last_commit | 60 | @commit = @merge_request.last_commit |
| 55 | - @line_notes = [] | 61 | + |
| 62 | + @comments_allowed = true | ||
| 63 | + @line_notes = @merge_request.notes.where("line_code is not null") | ||
| 56 | end | 64 | end |
| 57 | 65 | ||
| 58 | def new | 66 | def new |
| @@ -105,11 +113,14 @@ class MergeRequestsController < ApplicationController | @@ -105,11 +113,14 @@ class MergeRequestsController < ApplicationController | ||
| 105 | end | 113 | end |
| 106 | 114 | ||
| 107 | def authorize_modify_merge_request! | 115 | def authorize_modify_merge_request! |
| 108 | - can?(current_user, :modify_merge_request, @merge_request) || | ||
| 109 | - @merge_request.assignee == current_user | 116 | + return render_404 unless can?(current_user, :modify_merge_request, @merge_request) |
| 110 | end | 117 | end |
| 111 | 118 | ||
| 112 | def authorize_admin_merge_request! | 119 | def authorize_admin_merge_request! |
| 113 | - can?(current_user, :admin_merge_request, @merge_request) | 120 | + return render_404 unless can?(current_user, :admin_merge_request, @merge_request) |
| 121 | + end | ||
| 122 | + | ||
| 123 | + def module_enabled | ||
| 124 | + return render_404 unless @project.merge_requests_enabled | ||
| 114 | end | 125 | end |
| 115 | end | 126 | end |
app/controllers/notes_controller.rb
| @@ -9,6 +9,11 @@ class NotesController < ApplicationController | @@ -9,6 +9,11 @@ class NotesController < ApplicationController | ||
| 9 | 9 | ||
| 10 | respond_to :js | 10 | respond_to :js |
| 11 | 11 | ||
| 12 | + def index | ||
| 13 | + notes | ||
| 14 | + respond_with(@notes) | ||
| 15 | + end | ||
| 16 | + | ||
| 12 | def create | 17 | def create |
| 13 | @note = @project.notes.new(params[:note]) | 18 | @note = @project.notes.new(params[:note]) |
| 14 | @note.author = current_user | 19 | @note.author = current_user |
| @@ -24,9 +29,7 @@ class NotesController < ApplicationController | @@ -24,9 +29,7 @@ class NotesController < ApplicationController | ||
| 24 | 29 | ||
| 25 | def destroy | 30 | def destroy |
| 26 | @note = @project.notes.find(params[:id]) | 31 | @note = @project.notes.find(params[:id]) |
| 27 | - | ||
| 28 | return access_denied! unless can?(current_user, :admin_note, @note) | 32 | return access_denied! unless can?(current_user, :admin_note, @note) |
| 29 | - | ||
| 30 | @note.destroy | 33 | @note.destroy |
| 31 | 34 | ||
| 32 | respond_to do |format| | 35 | respond_to do |format| |
| @@ -34,4 +37,28 @@ class NotesController < ApplicationController | @@ -34,4 +37,28 @@ class NotesController < ApplicationController | ||
| 34 | end | 37 | end |
| 35 | end | 38 | end |
| 36 | 39 | ||
| 40 | + protected | ||
| 41 | + | ||
| 42 | + def notes | ||
| 43 | + @notes = case params[:target_type] | ||
| 44 | + when "commit" | ||
| 45 | + then project.commit_notes(project.commit((params[:target_id]))).fresh.limit(20) | ||
| 46 | + when "snippet" | ||
| 47 | + then project.snippets.find(params[:target_id]).notes | ||
| 48 | + when "wall" | ||
| 49 | + then project.common_notes.order("created_at DESC").fresh.limit(50) | ||
| 50 | + when "issue" | ||
| 51 | + then project.issues.find(params[:target_id]).notes.inc_author.order("created_at DESC").limit(20) | ||
| 52 | + when "merge_request" | ||
| 53 | + then project.merge_requests.find(params[:target_id]).notes.inc_author.order("created_at DESC").limit(20) | ||
| 54 | + end | ||
| 55 | + | ||
| 56 | + @notes = if params[:last_id] | ||
| 57 | + @notes.where("id > ?", params[:last_id]) | ||
| 58 | + elsif params[:first_id] | ||
| 59 | + @notes.where("id < ?", params[:first_id]) | ||
| 60 | + else | ||
| 61 | + @notes | ||
| 62 | + end | ||
| 63 | + end | ||
| 37 | end | 64 | end |
| @@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
| 1 | +class OmniauthCallbacksController < Devise::OmniauthCallbacksController | ||
| 2 | + | ||
| 3 | + def ldap | ||
| 4 | + # We only find ourselves here if the authentication to LDAP was successful. | ||
| 5 | + info = request.env["omniauth.auth"]["info"] | ||
| 6 | + @user = User.find_for_ldap_auth(info) | ||
| 7 | + if @user.persisted? | ||
| 8 | + @user.remember_me = true | ||
| 9 | + end | ||
| 10 | + sign_in_and_redirect @user | ||
| 11 | + end | ||
| 12 | + | ||
| 13 | +end |
app/controllers/projects_controller.rb
| @@ -28,7 +28,7 @@ class ProjectsController < ApplicationController | @@ -28,7 +28,7 @@ class ProjectsController < ApplicationController | ||
| 28 | 28 | ||
| 29 | Project.transaction do | 29 | Project.transaction do |
| 30 | @project.save! | 30 | @project.save! |
| 31 | - @project.users_projects.create!(:repo_access => Repository::REPO_RW , :project_access => Project::PROJECT_RWA, :user => current_user) | 31 | + @project.users_projects.create!(:project_access => UsersProject::MASTER, :user => current_user) |
| 32 | 32 | ||
| 33 | # when project saved no team member exist so | 33 | # when project saved no team member exist so |
| 34 | # project repository should be updated after first user add | 34 | # project repository should be updated after first user add |
| @@ -57,7 +57,7 @@ class ProjectsController < ApplicationController | @@ -57,7 +57,7 @@ class ProjectsController < ApplicationController | ||
| 57 | def update | 57 | def update |
| 58 | respond_to do |format| | 58 | respond_to do |format| |
| 59 | if project.update_attributes(params[:project]) | 59 | if project.update_attributes(params[:project]) |
| 60 | - format.html { redirect_to info_project_path(project), :notice => 'Project was successfully updated.' } | 60 | + format.html { redirect_to edit_project_path(project), :notice => 'Project was successfully updated.' } |
| 61 | format.js | 61 | format.js |
| 62 | else | 62 | else |
| 63 | format.html { render action: "edit" } | 63 | format.html { render action: "edit" } |
| @@ -68,33 +68,29 @@ class ProjectsController < ApplicationController | @@ -68,33 +68,29 @@ class ProjectsController < ApplicationController | ||
| 68 | 68 | ||
| 69 | def show | 69 | def show |
| 70 | return render "projects/empty" unless @project.repo_exists? && @project.has_commits? | 70 | return render "projects/empty" unless @project.repo_exists? && @project.has_commits? |
| 71 | - limit = (params[:limit] || 20).to_i | ||
| 72 | - @activities = @project.activities(limit)#updates_wo_repo(limit) | 71 | + limit = (params[:limit] || 10).to_i |
| 72 | + @activities = @project.activities(limit) | ||
| 73 | end | 73 | end |
| 74 | 74 | ||
| 75 | def files | 75 | def files |
| 76 | @notes = @project.notes.where("attachment != 'NULL'").order("created_at DESC").limit(100) | 76 | @notes = @project.notes.where("attachment != 'NULL'").order("created_at DESC").limit(100) |
| 77 | end | 77 | end |
| 78 | 78 | ||
| 79 | - def info | ||
| 80 | - end | ||
| 81 | - | ||
| 82 | # | 79 | # |
| 83 | # Wall | 80 | # Wall |
| 84 | # | 81 | # |
| 85 | 82 | ||
| 86 | def wall | 83 | def wall |
| 84 | + return render_404 unless @project.wall_enabled | ||
| 87 | @note = Note.new | 85 | @note = Note.new |
| 88 | - @notes = @project.common_notes.order("created_at DESC") | ||
| 89 | - @notes = @notes.fresh.limit(20) | ||
| 90 | 86 | ||
| 91 | respond_to do |format| | 87 | respond_to do |format| |
| 92 | format.html | 88 | format.html |
| 93 | - format.js { respond_with_notes } | ||
| 94 | end | 89 | end |
| 95 | end | 90 | end |
| 96 | 91 | ||
| 97 | def graph | 92 | def graph |
| 93 | + render_full_content | ||
| 98 | @days_json, @commits_json = GraphCommit.to_graph(project) | 94 | @days_json, @commits_json = GraphCommit.to_graph(project) |
| 99 | end | 95 | end |
| 100 | 96 | ||
| @@ -114,6 +110,7 @@ class ProjectsController < ApplicationController | @@ -114,6 +110,7 @@ class ProjectsController < ApplicationController | ||
| 114 | 110 | ||
| 115 | def project | 111 | def project |
| 116 | @project ||= Project.find_by_code(params[:id]) | 112 | @project ||= Project.find_by_code(params[:id]) |
| 113 | + @project || render_404 | ||
| 117 | end | 114 | end |
| 118 | 115 | ||
| 119 | def determine_layout | 116 | def determine_layout |
| @@ -0,0 +1,32 @@ | @@ -0,0 +1,32 @@ | ||
| 1 | +class ProtectedBranchesController < ApplicationController | ||
| 2 | + before_filter :project | ||
| 3 | + | ||
| 4 | + # Authorize | ||
| 5 | + before_filter :add_project_abilities | ||
| 6 | + before_filter :authorize_read_project! | ||
| 7 | + before_filter :require_non_empty_project | ||
| 8 | + | ||
| 9 | + before_filter :authorize_admin_project!, :only => [:destroy, :create] | ||
| 10 | + before_filter :render_full_content | ||
| 11 | + | ||
| 12 | + layout "project" | ||
| 13 | + | ||
| 14 | + def index | ||
| 15 | + @branches = @project.protected_branches.all | ||
| 16 | + @protected_branch = @project.protected_branches.new | ||
| 17 | + end | ||
| 18 | + | ||
| 19 | + def create | ||
| 20 | + @project.protected_branches.create(params[:protected_branch]) | ||
| 21 | + redirect_to project_protected_branches_path(@project) | ||
| 22 | + end | ||
| 23 | + | ||
| 24 | + def destroy | ||
| 25 | + @project.protected_branches.find(params[:id]).destroy | ||
| 26 | + | ||
| 27 | + respond_to do |format| | ||
| 28 | + format.html { redirect_to project_protected_branches_path } | ||
| 29 | + format.js { render :nothing => true } | ||
| 30 | + end | ||
| 31 | + end | ||
| 32 | +end |
app/controllers/refs_controller.rb
| @@ -4,20 +4,32 @@ class RefsController < ApplicationController | @@ -4,20 +4,32 @@ class RefsController < ApplicationController | ||
| 4 | # Authorize | 4 | # Authorize |
| 5 | before_filter :add_project_abilities | 5 | before_filter :add_project_abilities |
| 6 | before_filter :authorize_read_project! | 6 | before_filter :authorize_read_project! |
| 7 | + before_filter :authorize_code_access! | ||
| 7 | before_filter :require_non_empty_project | 8 | before_filter :require_non_empty_project |
| 8 | 9 | ||
| 9 | before_filter :ref | 10 | before_filter :ref |
| 10 | before_filter :define_tree_vars, :only => [:tree, :blob] | 11 | before_filter :define_tree_vars, :only => [:tree, :blob] |
| 12 | + before_filter :render_full_content | ||
| 13 | + | ||
| 11 | layout "project" | 14 | layout "project" |
| 12 | 15 | ||
| 13 | def switch | 16 | def switch |
| 14 | - new_path = if params[:destination] == "tree" | ||
| 15 | - tree_project_ref_path(@project, params[:ref]) | ||
| 16 | - else | ||
| 17 | - project_commits_path(@project, :ref => params[:ref]) | ||
| 18 | - end | 17 | + respond_to do |format| |
| 18 | + format.html do | ||
| 19 | + new_path = if params[:destination] == "tree" | ||
| 20 | + tree_project_ref_path(@project, params[:ref]) | ||
| 21 | + else | ||
| 22 | + project_commits_path(@project, :ref => params[:ref]) | ||
| 23 | + end | ||
| 19 | 24 | ||
| 20 | - redirect_to new_path | 25 | + redirect_to new_path |
| 26 | + end | ||
| 27 | + format.js do | ||
| 28 | + @ref = params[:ref] | ||
| 29 | + define_tree_vars | ||
| 30 | + render "tree" | ||
| 31 | + end | ||
| 32 | + end | ||
| 21 | end | 33 | end |
| 22 | 34 | ||
| 23 | # | 35 | # |
| @@ -37,7 +49,12 @@ class RefsController < ApplicationController | @@ -37,7 +49,12 @@ class RefsController < ApplicationController | ||
| 37 | 49 | ||
| 38 | def blob | 50 | def blob |
| 39 | if @tree.is_blob? | 51 | if @tree.is_blob? |
| 40 | - send_data(@tree.data, :type => @tree.mime_type, :disposition => 'inline', :filename => @tree.name) | 52 | + send_data( |
| 53 | + @tree.data, | ||
| 54 | + :type => @tree.text? ? "text/plain" : @tree.mime_type, | ||
| 55 | + :disposition => 'inline', | ||
| 56 | + :filename => @tree.name | ||
| 57 | + ) | ||
| 41 | else | 58 | else |
| 42 | head(404) | 59 | head(404) |
| 43 | end | 60 | end |
| @@ -48,6 +65,8 @@ class RefsController < ApplicationController | @@ -48,6 +65,8 @@ class RefsController < ApplicationController | ||
| 48 | protected | 65 | protected |
| 49 | 66 | ||
| 50 | def define_tree_vars | 67 | def define_tree_vars |
| 68 | + params[:path] = nil if params[:path].blank? | ||
| 69 | + | ||
| 51 | @repo = project.repo | 70 | @repo = project.repo |
| 52 | @commit = project.commit(@ref) | 71 | @commit = project.commit(@ref) |
| 53 | @tree = Tree.new(@commit.tree, project, @ref, params[:path]) | 72 | @tree = Tree.new(@commit.tree, project, @ref, params[:path]) |
app/controllers/repositories_controller.rb
| @@ -4,7 +4,9 @@ class RepositoriesController < ApplicationController | @@ -4,7 +4,9 @@ class RepositoriesController < ApplicationController | ||
| 4 | # Authorize | 4 | # Authorize |
| 5 | before_filter :add_project_abilities | 5 | before_filter :add_project_abilities |
| 6 | before_filter :authorize_read_project! | 6 | before_filter :authorize_read_project! |
| 7 | + before_filter :authorize_code_access! | ||
| 7 | before_filter :require_non_empty_project | 8 | before_filter :require_non_empty_project |
| 9 | + before_filter :render_full_content | ||
| 8 | 10 | ||
| 9 | layout "project" | 11 | layout "project" |
| 10 | 12 | ||
| @@ -19,4 +21,28 @@ class RepositoriesController < ApplicationController | @@ -19,4 +21,28 @@ class RepositoriesController < ApplicationController | ||
| 19 | def tags | 21 | def tags |
| 20 | @tags = @project.repo.tags.sort_by(&:name).reverse | 22 | @tags = @project.repo.tags.sort_by(&:name).reverse |
| 21 | end | 23 | end |
| 24 | + | ||
| 25 | + def archive | ||
| 26 | + unless can?(current_user, :download_code, @project) | ||
| 27 | + render_404 and return | ||
| 28 | + end | ||
| 29 | + | ||
| 30 | + ref = params[:ref] || @project.root_ref | ||
| 31 | + commit = @project.commit(ref) | ||
| 32 | + render_404 and return unless commit | ||
| 33 | + | ||
| 34 | + # Build file path | ||
| 35 | + file_name = @project.code + "-" + commit.id.to_s + ".tar.gz" | ||
| 36 | + storage_path = File.join(Rails.root, "tmp", "repositories", @project.code) | ||
| 37 | + file_path = File.join(storage_path, file_name) | ||
| 38 | + | ||
| 39 | + # Create file if not exists | ||
| 40 | + unless File.exists?(file_path) | ||
| 41 | + FileUtils.mkdir_p storage_path | ||
| 42 | + file = @project.repo.archive_to_file(ref, nil, file_path) | ||
| 43 | + end | ||
| 44 | + | ||
| 45 | + # Send file to user | ||
| 46 | + send_file file_path | ||
| 47 | + end | ||
| 22 | end | 48 | end |
app/controllers/snippets_controller.rb
| 1 | class SnippetsController < ApplicationController | 1 | class SnippetsController < ApplicationController |
| 2 | before_filter :authenticate_user! | 2 | before_filter :authenticate_user! |
| 3 | before_filter :project | 3 | before_filter :project |
| 4 | + before_filter :snippet, :only => [:show, :edit, :destroy, :update] | ||
| 4 | layout "project" | 5 | layout "project" |
| 5 | 6 | ||
| 6 | # Authorize | 7 | # Authorize |
| @@ -41,11 +42,9 @@ class SnippetsController < ApplicationController | @@ -41,11 +42,9 @@ class SnippetsController < ApplicationController | ||
| 41 | end | 42 | end |
| 42 | 43 | ||
| 43 | def edit | 44 | def edit |
| 44 | - @snippet = @project.snippets.find(params[:id]) | ||
| 45 | end | 45 | end |
| 46 | 46 | ||
| 47 | def update | 47 | def update |
| 48 | - @snippet = @project.snippets.find(params[:id]) | ||
| 49 | @snippet.update_attributes(params[:snippet]) | 48 | @snippet.update_attributes(params[:snippet]) |
| 50 | 49 | ||
| 51 | if @snippet.valid? | 50 | if @snippet.valid? |
| @@ -56,14 +55,11 @@ class SnippetsController < ApplicationController | @@ -56,14 +55,11 @@ class SnippetsController < ApplicationController | ||
| 56 | end | 55 | end |
| 57 | 56 | ||
| 58 | def show | 57 | def show |
| 59 | - @snippet = @project.snippets.find(params[:id]) | ||
| 60 | - @notes = @snippet.notes | ||
| 61 | @note = @project.notes.new(:noteable => @snippet) | 58 | @note = @project.notes.new(:noteable => @snippet) |
| 59 | + render_full_content | ||
| 62 | end | 60 | end |
| 63 | 61 | ||
| 64 | def destroy | 62 | def destroy |
| 65 | - @snippet = @project.snippets.find(params[:id]) | ||
| 66 | - | ||
| 67 | return access_denied! unless can?(current_user, :admin_snippet, @snippet) | 63 | return access_denied! unless can?(current_user, :admin_snippet, @snippet) |
| 68 | 64 | ||
| 69 | @snippet.destroy | 65 | @snippet.destroy |
| @@ -72,12 +68,15 @@ class SnippetsController < ApplicationController | @@ -72,12 +68,15 @@ class SnippetsController < ApplicationController | ||
| 72 | end | 68 | end |
| 73 | 69 | ||
| 74 | protected | 70 | protected |
| 71 | + def snippet | ||
| 72 | + @snippet ||= @project.snippets.find(params[:id]) | ||
| 73 | + end | ||
| 75 | 74 | ||
| 76 | def authorize_modify_snippet! | 75 | def authorize_modify_snippet! |
| 77 | - can?(current_user, :modify_snippet, @snippet) | 76 | + return render_404 unless can?(current_user, :modify_snippet, @snippet) |
| 78 | end | 77 | end |
| 79 | 78 | ||
| 80 | def authorize_admin_snippet! | 79 | def authorize_admin_snippet! |
| 81 | - can?(current_user, :admin_snippet, @snippet) | 80 | + return render_404 unless can?(current_user, :admin_snippet, @snippet) |
| 82 | end | 81 | end |
| 83 | end | 82 | end |
app/controllers/tags_controller.rb
| @@ -1,11 +0,0 @@ | @@ -1,11 +0,0 @@ | ||
| 1 | -class TagsController < ApplicationController | ||
| 2 | - def index | ||
| 3 | - @tags = Project.tag_counts.order('count DESC') | ||
| 4 | - @tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank? | ||
| 5 | - | ||
| 6 | - respond_to do |format| | ||
| 7 | - format.html | ||
| 8 | - format.json { render json: @tags.limit(8).map {|t| t.name}} | ||
| 9 | - end | ||
| 10 | - end | ||
| 11 | -end |
app/controllers/team_members_controller.rb
| @@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController | @@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController | ||
| 40 | @team_member.destroy | 40 | @team_member.destroy |
| 41 | 41 | ||
| 42 | respond_to do |format| | 42 | respond_to do |format| |
| 43 | - format.html { redirect_to root_path } | 43 | + format.html { redirect_to team_project_path(@project) } |
| 44 | format.js { render :nothing => true } | 44 | format.js { render :nothing => true } |
| 45 | end | 45 | end |
| 46 | end | 46 | end |
| @@ -0,0 +1,59 @@ | @@ -0,0 +1,59 @@ | ||
| 1 | +class WikisController < ApplicationController | ||
| 2 | + before_filter :project | ||
| 3 | + before_filter :add_project_abilities | ||
| 4 | + before_filter :authorize_read_wiki! | ||
| 5 | + before_filter :authorize_write_wiki!, :only => [:edit, :create, :history] | ||
| 6 | + before_filter :authorize_admin_wiki!, :only => :destroy | ||
| 7 | + layout "project" | ||
| 8 | + | ||
| 9 | + def show | ||
| 10 | + if params[:old_page_id] | ||
| 11 | + @wiki = @project.wikis.find(params[:old_page_id]) | ||
| 12 | + else | ||
| 13 | + @wiki = @project.wikis.where(:slug => params[:id]).order("created_at").last | ||
| 14 | + end | ||
| 15 | + | ||
| 16 | + unless @wiki | ||
| 17 | + return render_404 unless can?(current_user, :write_wiki, @project) | ||
| 18 | + end | ||
| 19 | + | ||
| 20 | + respond_to do |format| | ||
| 21 | + if @wiki | ||
| 22 | + format.html | ||
| 23 | + else | ||
| 24 | + @wiki = @project.wikis.new(:slug => params[:id]) | ||
| 25 | + format.html { render "edit" } | ||
| 26 | + end | ||
| 27 | + end | ||
| 28 | + end | ||
| 29 | + | ||
| 30 | + def edit | ||
| 31 | + @wiki = @project.wikis.where(:slug => params[:id]).order("created_at").last | ||
| 32 | + @wiki = Wiki.regenerate_from @wiki | ||
| 33 | + end | ||
| 34 | + | ||
| 35 | + def create | ||
| 36 | + @wiki = @project.wikis.new(params[:wiki]) | ||
| 37 | + @wiki.user = current_user | ||
| 38 | + | ||
| 39 | + respond_to do |format| | ||
| 40 | + if @wiki.save | ||
| 41 | + format.html { redirect_to [@project, @wiki], notice: 'Wiki was successfully updated.' } | ||
| 42 | + else | ||
| 43 | + format.html { render action: "edit" } | ||
| 44 | + end | ||
| 45 | + end | ||
| 46 | + end | ||
| 47 | + | ||
| 48 | + def history | ||
| 49 | + @wikis = @project.wikis.where(:slug => params[:id]).order("created_at") | ||
| 50 | + end | ||
| 51 | + | ||
| 52 | + def destroy | ||
| 53 | + @wikis = @project.wikis.where(:slug => params[:id]).delete_all | ||
| 54 | + | ||
| 55 | + respond_to do |format| | ||
| 56 | + format.html { redirect_to project_wiki_path(@project, :index), notice: "Page was successfully deleted" } | ||
| 57 | + end | ||
| 58 | + end | ||
| 59 | +end |
app/helpers/application_helper.rb
| @@ -3,7 +3,8 @@ module ApplicationHelper | @@ -3,7 +3,8 @@ module ApplicationHelper | ||
| 3 | 3 | ||
| 4 | def gravatar_icon(user_email, size = 40) | 4 | def gravatar_icon(user_email, size = 40) |
| 5 | gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" | 5 | gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" |
| 6 | - "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email)}?s=#{size}&d=identicon" | 6 | + user_email.strip! |
| 7 | + "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon" | ||
| 7 | end | 8 | end |
| 8 | 9 | ||
| 9 | def fixed_mode? | 10 | def fixed_mode? |
| @@ -52,6 +53,13 @@ module ApplicationHelper | @@ -52,6 +53,13 @@ module ApplicationHelper | ||
| 52 | [ "Tag", @project.tags ] | 53 | [ "Tag", @project.tags ] |
| 53 | ] | 54 | ] |
| 54 | 55 | ||
| 56 | + # If reference is commit id - | ||
| 57 | + # we should add it to branch/tag selectbox | ||
| 58 | + if(@ref && !options.flatten.include?(@ref) && | ||
| 59 | + @ref =~ /^[0-9a-zA-Z]{6,52}$/) | ||
| 60 | + options << ["Commit", [@ref]] | ||
| 61 | + end | ||
| 62 | + | ||
| 55 | grouped_options_for_select(options, @ref || @project.default_branch) | 63 | grouped_options_for_select(options, @ref || @project.default_branch) |
| 56 | end | 64 | end |
| 57 | 65 | ||
| @@ -71,11 +79,11 @@ module ApplicationHelper | @@ -71,11 +79,11 @@ module ApplicationHelper | ||
| 71 | 79 | ||
| 72 | if @project && !@project.new_record? | 80 | if @project && !@project.new_record? |
| 73 | project_nav = [ | 81 | project_nav = [ |
| 74 | - { :label => "#{@project.code} / Issues", :url => project_issues_path(@project) }, | ||
| 75 | - { :label => "#{@project.code} / Wall", :url => wall_project_path(@project) }, | ||
| 76 | - { :label => "#{@project.code} / Tree", :url => tree_project_ref_path(@project, @project.root_ref) }, | ||
| 77 | - { :label => "#{@project.code} / Commits", :url => project_commits_path(@project) }, | ||
| 78 | - { :label => "#{@project.code} / Team", :url => team_project_path(@project) } | 82 | + { :label => "#{@project.name} / Issues", :url => project_issues_path(@project) }, |
| 83 | + { :label => "#{@project.name} / Wall", :url => wall_project_path(@project) }, | ||
| 84 | + { :label => "#{@project.name} / Tree", :url => tree_project_ref_path(@project, @project.root_ref) }, | ||
| 85 | + { :label => "#{@project.name} / Commits", :url => project_commits_path(@project) }, | ||
| 86 | + { :label => "#{@project.name} / Team", :url => team_project_path(@project) } | ||
| 79 | ] | 87 | ] |
| 80 | end | 88 | end |
| 81 | 89 | ||
| @@ -83,14 +91,26 @@ module ApplicationHelper | @@ -83,14 +91,26 @@ module ApplicationHelper | ||
| 83 | end | 91 | end |
| 84 | 92 | ||
| 85 | def project_layout | 93 | def project_layout |
| 86 | - @project && !@project.new_record? | 94 | + layout == "project" |
| 95 | + end | ||
| 96 | + | ||
| 97 | + def admin_layout | ||
| 98 | + layout == "admin" | ||
| 87 | end | 99 | end |
| 88 | 100 | ||
| 89 | def profile_layout | 101 | def profile_layout |
| 90 | - controller.controller_name == "dashboard" || current_page?(projects_path) || controller.controller_name == "profile" || controller.controller_name == "keys" | 102 | + layout == "profile" |
| 91 | end | 103 | end |
| 92 | 104 | ||
| 93 | def help_layout | 105 | def help_layout |
| 94 | controller.controller_name == "help" | 106 | controller.controller_name == "help" |
| 95 | end | 107 | end |
| 108 | + | ||
| 109 | + def ldap_enable? | ||
| 110 | + Devise.omniauth_providers.include?(:ldap) | ||
| 111 | + end | ||
| 112 | + | ||
| 113 | + def layout | ||
| 114 | + controller.send :_layout | ||
| 115 | + end | ||
| 96 | end | 116 | end |
app/helpers/commits_helper.rb
| @@ -7,16 +7,6 @@ module CommitsHelper | @@ -7,16 +7,6 @@ module CommitsHelper | ||
| 7 | 7 | ||
| 8 | end | 8 | end |
| 9 | 9 | ||
| 10 | - def diff_line_class(line) | ||
| 11 | - if line[0] == "+" | ||
| 12 | - "new" | ||
| 13 | - elsif line[0] == "-" | ||
| 14 | - "old" | ||
| 15 | - else | ||
| 16 | - nil | ||
| 17 | - end | ||
| 18 | - end | ||
| 19 | - | ||
| 20 | def more_commits_link | 10 | def more_commits_link |
| 21 | offset = params[:offset] || 0 | 11 | offset = params[:offset] || 0 |
| 22 | limit = params[:limit] || 100 | 12 | limit = params[:limit] || 100 |
| @@ -42,11 +32,58 @@ module CommitsHelper | @@ -42,11 +32,58 @@ module CommitsHelper | ||
| 42 | preserve out | 32 | preserve out |
| 43 | end | 33 | end |
| 44 | 34 | ||
| 45 | - def build_line_code(line, index, line_new, line_old) | ||
| 46 | - if diff_line_class(line) == "new" | ||
| 47 | - "NEW_#{index}_#{line_new}" | 35 | + def diff_line_class(line) |
| 36 | + if line[0] == "+" | ||
| 37 | + "new" | ||
| 38 | + elsif line[0] == "-" | ||
| 39 | + "old" | ||
| 48 | else | 40 | else |
| 49 | - "OLD_#{index}_#{line_old}" | 41 | + nil |
| 42 | + end | ||
| 43 | + end | ||
| 44 | + | ||
| 45 | + def build_line_code(line, index, line_new, line_old) | ||
| 46 | + "#{index}_#{line_old}_#{line_new}" | ||
| 47 | + end | ||
| 48 | + | ||
| 49 | + def each_diff_line(diff_arr, index) | ||
| 50 | + line_old = 1 | ||
| 51 | + line_new = 1 | ||
| 52 | + type = nil | ||
| 53 | + | ||
| 54 | + lines_arr = diff_arr | ||
| 55 | + lines_arr.each do |line| | ||
| 56 | + next if line.match(/^\-\-\- \/dev\/null/) | ||
| 57 | + next if line.match(/^\+\+\+ \/dev\/null/) | ||
| 58 | + next if line.match(/^\-\-\- a/) | ||
| 59 | + next if line.match(/^\+\+\+ b/) | ||
| 60 | + | ||
| 61 | + full_line = html_escape(line.gsub(/\n/, '')).force_encoding("UTF-8") | ||
| 62 | + | ||
| 63 | + if line.match(/^@@ -/) | ||
| 64 | + type = "match" | ||
| 65 | + | ||
| 66 | + line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0 | ||
| 67 | + line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0 | ||
| 68 | + | ||
| 69 | + next if line_old == 1 && line_new == 1 | ||
| 70 | + yield(line, type, nil, nil, nil) | ||
| 71 | + next | ||
| 72 | + else | ||
| 73 | + type = diff_line_class(line) | ||
| 74 | + line_code = build_line_code(line, index, line_new, line_old) | ||
| 75 | + yield(full_line, type, line_code, line_new, line_old) | ||
| 76 | + end | ||
| 77 | + | ||
| 78 | + | ||
| 79 | + if line[0] == "+" | ||
| 80 | + line_new += 1 | ||
| 81 | + elsif line[0] == "-" | ||
| 82 | + line_old += 1 | ||
| 83 | + else | ||
| 84 | + line_new += 1 | ||
| 85 | + line_old += 1 | ||
| 86 | + end | ||
| 50 | end | 87 | end |
| 51 | end | 88 | end |
| 52 | end | 89 | end |
app/helpers/dashboard_helper.rb
| @@ -3,6 +3,7 @@ module DashboardHelper | @@ -3,6 +3,7 @@ module DashboardHelper | ||
| 3 | case object.class.name.to_s | 3 | case object.class.name.to_s |
| 4 | when "Issue" then project_issue_path(project, project.issues.find(object.id)) | 4 | when "Issue" then project_issue_path(project, project.issues.find(object.id)) |
| 5 | when "Commit" then project_commit_path(project, project.repo.commits(object.id).first) | 5 | when "Commit" then project_commit_path(project, project.repo.commits(object.id).first) |
| 6 | + when "MergeRequest" then project_merge_request_path(project, object.id) | ||
| 6 | when "Note" | 7 | when "Note" |
| 7 | then | 8 | then |
| 8 | note = object | 9 | note = object |
| @@ -26,6 +27,7 @@ module DashboardHelper | @@ -26,6 +27,7 @@ module DashboardHelper | ||
| 26 | when "Note" then markdown(object.note) | 27 | when "Note" then markdown(object.note) |
| 27 | when "Issue" then object.title | 28 | when "Issue" then object.title |
| 28 | when "Commit" then object.safe_message | 29 | when "Commit" then object.safe_message |
| 30 | + when "MergeRequest" then object.title | ||
| 29 | else return "Project Wall" | 31 | else return "Project Wall" |
| 30 | end | 32 | end |
| 31 | 33 |
app/helpers/issues_helper.rb
| @@ -9,4 +9,26 @@ module IssuesHelper | @@ -9,4 +9,26 @@ module IssuesHelper | ||
| 9 | params[:f] ||= cookies['issue_filter'] | 9 | params[:f] ||= cookies['issue_filter'] |
| 10 | project_issues_path project, params | 10 | project_issues_path project, params |
| 11 | end | 11 | end |
| 12 | + | ||
| 13 | + def link_to_issue_assignee(issue) | ||
| 14 | + project = issue.project | ||
| 15 | + | ||
| 16 | + tm = project.team_member_by_id(issue.assignee_id) | ||
| 17 | + if tm | ||
| 18 | + link_to issue.assignee_name, project_team_member_path(project, tm), :class => "author_link" | ||
| 19 | + else | ||
| 20 | + issue.assignee_name | ||
| 21 | + end | ||
| 22 | + end | ||
| 23 | + | ||
| 24 | + def link_to_issue_author(issue) | ||
| 25 | + project = issue.project | ||
| 26 | + | ||
| 27 | + tm = project.team_member_by_id(issue.author_id) | ||
| 28 | + if tm | ||
| 29 | + link_to issue.author_name, project_team_member_path(project, tm), :class => "author_link" | ||
| 30 | + else | ||
| 31 | + issue.author_name | ||
| 32 | + end | ||
| 33 | + end | ||
| 12 | end | 34 | end |
app/helpers/merge_requests_helper.rb
| 1 | module MergeRequestsHelper | 1 | module MergeRequestsHelper |
| 2 | + def link_to_merge_request_assignee(merge_request) | ||
| 3 | + project = merge_request.project | ||
| 4 | + | ||
| 5 | + tm = project.team_member_by_id(merge_request.assignee_id) | ||
| 6 | + if tm | ||
| 7 | + link_to merge_request.assignee_name, project_team_member_path(project, tm), :class => "author_link" | ||
| 8 | + else | ||
| 9 | + merge_request.assignee_name | ||
| 10 | + end | ||
| 11 | + end | ||
| 12 | + | ||
| 13 | + def link_to_merge_request_author(merge_request) | ||
| 14 | + project = merge_request.project | ||
| 15 | + | ||
| 16 | + tm = project.team_member_by_id(merge_request.author_id) | ||
| 17 | + if tm | ||
| 18 | + link_to merge_request.author_name, project_team_member_path(project, tm), :class => "author_link" | ||
| 19 | + else | ||
| 20 | + merge_request.author_name | ||
| 21 | + end | ||
| 22 | + end | ||
| 2 | end | 23 | end |
app/helpers/projects_helper.rb
| @@ -17,11 +17,13 @@ module ProjectsHelper | @@ -17,11 +17,13 @@ module ProjectsHelper | ||
| 17 | end | 17 | end |
| 18 | 18 | ||
| 19 | def project_tab_class | 19 | def project_tab_class |
| 20 | - [:show, :files, :team, :edit, :update, :info].each do |action| | 20 | + [:show, :files, :team, :edit, :update].each do |action| |
| 21 | return "current" if current_page?(:controller => "projects", :action => action, :id => @project) | 21 | return "current" if current_page?(:controller => "projects", :action => action, :id => @project) |
| 22 | end | 22 | end |
| 23 | 23 | ||
| 24 | if controller.controller_name == "snippets" || | 24 | if controller.controller_name == "snippets" || |
| 25 | + controller.controller_name == "hooks" || | ||
| 26 | + controller.controller_name == "deploy_keys" || | ||
| 25 | controller.controller_name == "team_members" | 27 | controller.controller_name == "team_members" |
| 26 | "current" | 28 | "current" |
| 27 | end | 29 | end |
| @@ -33,9 +35,26 @@ module ProjectsHelper | @@ -33,9 +35,26 @@ module ProjectsHelper | ||
| 33 | end | 35 | end |
| 34 | 36 | ||
| 35 | def repository_tab_class | 37 | def repository_tab_class |
| 36 | - if controller.controller_name == "repositories" || | ||
| 37 | - controller.controller_name == "hooks" | ||
| 38 | - "current" | 38 | + #if controller.controller_name == "repositories" || |
| 39 | + #controller.controller_name == "hooks" || | ||
| 40 | + #controller.controller_name == "deploy_keys" | ||
| 41 | + #"current" | ||
| 42 | + #end | ||
| 43 | + end | ||
| 44 | + | ||
| 45 | + def commit_tab_class | ||
| 46 | + if controller.controller_name == "commits" || | ||
| 47 | + controller.controller_name == "repositories" || | ||
| 48 | + controller.controller_name == "protected_branches" | ||
| 49 | + "current" | ||
| 50 | + end | ||
| 51 | + end | ||
| 52 | + | ||
| 53 | + def branches_tab_class | ||
| 54 | + if current_page?(branches_project_repository_path(@project)) || | ||
| 55 | + controller.controller_name == "protected_branches" || | ||
| 56 | + current_page?(project_repository_path(@project)) | ||
| 57 | + 'active' | ||
| 39 | end | 58 | end |
| 40 | end | 59 | end |
| 41 | end | 60 | end |
app/mailers/notify.rb
| @@ -27,8 +27,7 @@ class Notify < ActionMailer::Base | @@ -27,8 +27,7 @@ class Notify < ActionMailer::Base | ||
| 27 | @user = user | 27 | @user = user |
| 28 | @note = note | 28 | @note = note |
| 29 | @project = note.project | 29 | @project = note.project |
| 30 | - @commit = @project.repo.commits(note.noteable_id).first | ||
| 31 | - return unless ( note.notify or ( note.notify_author and @commit.author.email == @user.email ) ) | 30 | + @commit = @note.target |
| 32 | mail(:to => @user.email, :subject => "gitlab | note for commit | #{@note.project.name} ") | 31 | mail(:to => @user.email, :subject => "gitlab | note for commit | #{@note.project.name} ") |
| 33 | end | 32 | end |
| 34 | 33 |
app/models/ability.rb
| @@ -5,6 +5,7 @@ class Ability | @@ -5,6 +5,7 @@ class Ability | ||
| 5 | when "Issue" then issue_abilities(object, subject) | 5 | when "Issue" then issue_abilities(object, subject) |
| 6 | when "Note" then note_abilities(object, subject) | 6 | when "Note" then note_abilities(object, subject) |
| 7 | when "Snippet" then snippet_abilities(object, subject) | 7 | when "Snippet" then snippet_abilities(object, subject) |
| 8 | + when "MergeRequest" then merge_request_abilities(object, subject) | ||
| 8 | else [] | 9 | else [] |
| 9 | end | 10 | end |
| 10 | end | 11 | end |
| @@ -14,31 +15,40 @@ class Ability | @@ -14,31 +15,40 @@ class Ability | ||
| 14 | 15 | ||
| 15 | rules << [ | 16 | rules << [ |
| 16 | :read_project, | 17 | :read_project, |
| 18 | + :read_wiki, | ||
| 17 | :read_issue, | 19 | :read_issue, |
| 18 | :read_snippet, | 20 | :read_snippet, |
| 19 | :read_team_member, | 21 | :read_team_member, |
| 20 | :read_merge_request, | 22 | :read_merge_request, |
| 21 | - :read_note | ||
| 22 | - ] if project.allow_read_for?(user) | ||
| 23 | - | ||
| 24 | - rules << [ | 23 | + :read_note, |
| 25 | :write_project, | 24 | :write_project, |
| 26 | :write_issue, | 25 | :write_issue, |
| 27 | - :write_snippet, | ||
| 28 | - :write_merge_request, | ||
| 29 | :write_note | 26 | :write_note |
| 30 | - ] if project.allow_write_for?(user) | 27 | + ] if project.guest_access_for?(user) |
| 28 | + | ||
| 29 | + rules << [ | ||
| 30 | + :download_code, | ||
| 31 | + :write_merge_request, | ||
| 32 | + :write_snippet | ||
| 33 | + ] if project.report_access_for?(user) | ||
| 34 | + | ||
| 35 | + rules << [ | ||
| 36 | + :write_wiki | ||
| 37 | + ] if project.dev_access_for?(user) | ||
| 31 | 38 | ||
| 32 | rules << [ | 39 | rules << [ |
| 33 | :modify_issue, | 40 | :modify_issue, |
| 34 | :modify_snippet, | 41 | :modify_snippet, |
| 42 | + :modify_merge_request, | ||
| 35 | :admin_project, | 43 | :admin_project, |
| 36 | :admin_issue, | 44 | :admin_issue, |
| 37 | :admin_snippet, | 45 | :admin_snippet, |
| 38 | :admin_team_member, | 46 | :admin_team_member, |
| 39 | :admin_merge_request, | 47 | :admin_merge_request, |
| 40 | - :admin_note | ||
| 41 | - ] if project.allow_admin_for?(user) | 48 | + :admin_note, |
| 49 | + :admin_wiki | ||
| 50 | + ] if project.master_access_for?(user) || project.owner == user | ||
| 51 | + | ||
| 42 | 52 | ||
| 43 | rules.flatten | 53 | rules.flatten |
| 44 | end | 54 | end |
| @@ -53,6 +63,12 @@ class Ability | @@ -53,6 +63,12 @@ class Ability | ||
| 53 | :"modify_#{name}", | 63 | :"modify_#{name}", |
| 54 | :"admin_#{name}" | 64 | :"admin_#{name}" |
| 55 | ] | 65 | ] |
| 66 | + elsif subject.respond_to?(:assignee) && subject.assignee == user | ||
| 67 | + [ | ||
| 68 | + :"read_#{name}", | ||
| 69 | + :"write_#{name}", | ||
| 70 | + :"modify_#{name}", | ||
| 71 | + ] | ||
| 56 | else | 72 | else |
| 57 | subject.respond_to?(:project) ? | 73 | subject.respond_to?(:project) ? |
| 58 | project_abilities(user, subject.project) : [] | 74 | project_abilities(user, subject.project) : [] |
| @@ -0,0 +1,12 @@ | @@ -0,0 +1,12 @@ | ||
| 1 | +class ActivityObserver < ActiveRecord::Observer | ||
| 2 | + observe :issue, :merge_request, :note | ||
| 3 | + | ||
| 4 | + def after_create(record) | ||
| 5 | + Event.create( | ||
| 6 | + :project => record.project, | ||
| 7 | + :target_id => record.id, | ||
| 8 | + :target_type => record.class.name, | ||
| 9 | + :action => Event.determine_action(record) | ||
| 10 | + ) | ||
| 11 | + end | ||
| 12 | +end |
app/models/commit.rb
| 1 | class Commit | 1 | class Commit |
| 2 | + include ActiveModel::Conversion | ||
| 3 | + extend ActiveModel::Naming | ||
| 2 | 4 | ||
| 3 | attr_accessor :commit | 5 | attr_accessor :commit |
| 4 | attr_accessor :head | 6 | attr_accessor :head |
| 5 | attr_accessor :refs | 7 | attr_accessor :refs |
| 6 | 8 | ||
| 7 | delegate :message, | 9 | delegate :message, |
| 10 | + :authored_date, | ||
| 8 | :committed_date, | 11 | :committed_date, |
| 9 | :parents, | 12 | :parents, |
| 10 | :sha, | 13 | :sha, |
| 11 | :date, | 14 | :date, |
| 15 | + :committer, | ||
| 12 | :author, | 16 | :author, |
| 13 | :message, | 17 | :message, |
| 14 | :diffs, | 18 | :diffs, |
| @@ -16,6 +20,10 @@ class Commit | @@ -16,6 +20,10 @@ class Commit | ||
| 16 | :id, | 20 | :id, |
| 17 | :to => :commit | 21 | :to => :commit |
| 18 | 22 | ||
| 23 | + def persisted? | ||
| 24 | + false | ||
| 25 | + end | ||
| 26 | + | ||
| 19 | def initialize(raw_commit, head = nil) | 27 | def initialize(raw_commit, head = nil) |
| 20 | @commit = raw_commit | 28 | @commit = raw_commit |
| 21 | @head = head | 29 | @head = head |
| @@ -34,10 +42,22 @@ class Commit | @@ -34,10 +42,22 @@ class Commit | ||
| 34 | end | 42 | end |
| 35 | 43 | ||
| 36 | def author_name | 44 | def author_name |
| 37 | - author.name | 45 | + author.name.force_encoding("UTF-8") |
| 46 | + end | ||
| 47 | + | ||
| 48 | + def committer_name | ||
| 49 | + committer.name | ||
| 50 | + end | ||
| 51 | + | ||
| 52 | + def committer_email | ||
| 53 | + committer.email | ||
| 38 | end | 54 | end |
| 39 | 55 | ||
| 40 | def prev_commit | 56 | def prev_commit |
| 41 | parents.first | 57 | parents.first |
| 42 | end | 58 | end |
| 59 | + | ||
| 60 | + def prev_commit_id | ||
| 61 | + prev_commit.id | ||
| 62 | + end | ||
| 43 | end | 63 | end |
| @@ -0,0 +1,70 @@ | @@ -0,0 +1,70 @@ | ||
| 1 | +class Event < ActiveRecord::Base | ||
| 2 | + Created = 1 | ||
| 3 | + Updated = 2 | ||
| 4 | + Closed = 3 | ||
| 5 | + Reopened = 4 | ||
| 6 | + Pushed = 5 | ||
| 7 | + Commented = 6 | ||
| 8 | + | ||
| 9 | + belongs_to :project | ||
| 10 | + belongs_to :target, :polymorphic => true | ||
| 11 | + | ||
| 12 | + serialize :data | ||
| 13 | + | ||
| 14 | + scope :recent, order("created_at DESC") | ||
| 15 | + | ||
| 16 | + def self.determine_action(record) | ||
| 17 | + if [Issue, MergeRequest].include? record.class | ||
| 18 | + Event::Created | ||
| 19 | + elsif record.kind_of? Note | ||
| 20 | + Event::Commented | ||
| 21 | + end | ||
| 22 | + end | ||
| 23 | + | ||
| 24 | + def push? | ||
| 25 | + action == self.class::Pushed | ||
| 26 | + end | ||
| 27 | + | ||
| 28 | + def new_branch? | ||
| 29 | + data[:before] =~ /^00000/ | ||
| 30 | + end | ||
| 31 | + | ||
| 32 | + def commit_from | ||
| 33 | + data[:before] | ||
| 34 | + end | ||
| 35 | + | ||
| 36 | + def commit_to | ||
| 37 | + data[:after] | ||
| 38 | + end | ||
| 39 | + | ||
| 40 | + def branch_name | ||
| 41 | + @branch_name ||= data[:ref].gsub("refs/heads/", "") | ||
| 42 | + end | ||
| 43 | + | ||
| 44 | + def pusher | ||
| 45 | + User.find_by_id(data[:user_id]) | ||
| 46 | + end | ||
| 47 | + | ||
| 48 | + def commits | ||
| 49 | + @commits ||= data[:commits].map do |commit| | ||
| 50 | + project.commit(commit[:id]) | ||
| 51 | + end | ||
| 52 | + end | ||
| 53 | + | ||
| 54 | + delegate :id, :name, :email, :to => :pusher, :prefix => true, :allow_nil => true | ||
| 55 | +end | ||
| 56 | +# == Schema Information | ||
| 57 | +# | ||
| 58 | +# Table name: events | ||
| 59 | +# | ||
| 60 | +# id :integer not null, primary key | ||
| 61 | +# target_type :string(255) | ||
| 62 | +# target_id :integer | ||
| 63 | +# title :string(255) | ||
| 64 | +# data :text | ||
| 65 | +# project_id :integer | ||
| 66 | +# created_at :datetime not null | ||
| 67 | +# updated_at :datetime not null | ||
| 68 | +# action :integer | ||
| 69 | +# | ||
| 70 | + |
app/models/key.rb
| @@ -14,6 +14,7 @@ class Key < ActiveRecord::Base | @@ -14,6 +14,7 @@ class Key < ActiveRecord::Base | ||
| 14 | before_save :set_identifier | 14 | before_save :set_identifier |
| 15 | after_save :update_repository | 15 | after_save :update_repository |
| 16 | after_destroy :repository_delete_key | 16 | after_destroy :repository_delete_key |
| 17 | + delegate :name, :email, :to => :user, :prefix => true | ||
| 17 | 18 | ||
| 18 | def set_identifier | 19 | def set_identifier |
| 19 | if is_deploy_key | 20 | if is_deploy_key |
app/models/mailer_observer.rb
| @@ -27,20 +27,25 @@ class MailerObserver < ActiveRecord::Observer | @@ -27,20 +27,25 @@ class MailerObserver < ActiveRecord::Observer | ||
| 27 | end | 27 | end |
| 28 | 28 | ||
| 29 | def new_note(note) | 29 | def new_note(note) |
| 30 | - return unless note.notify or note.notify_author | ||
| 31 | - note.project.users.reject { |u| u.id == current_user.id } .each do |u| | ||
| 32 | - case note.noteable_type | ||
| 33 | - when "Commit" then | ||
| 34 | - Notify.note_commit_email(u, note).deliver | ||
| 35 | - when "Issue" then | ||
| 36 | - Notify.note_issue_email(u, note).deliver | ||
| 37 | - when "MergeRequest" then | ||
| 38 | - Notify.note_merge_request_email(u, note).deliver | ||
| 39 | - when "Snippet" | ||
| 40 | - true | ||
| 41 | - else | ||
| 42 | - Notify.note_wall_email(u, note).deliver | 30 | + # Notify whole team except author of note |
| 31 | + if note.notify | ||
| 32 | + note.project.users.reject { |u| u.id == current_user.id } .each do |u| | ||
| 33 | + case note.noteable_type | ||
| 34 | + when "Commit" then | ||
| 35 | + Notify.note_commit_email(u, note).deliver | ||
| 36 | + when "Issue" then | ||
| 37 | + Notify.note_issue_email(u, note).deliver | ||
| 38 | + when "MergeRequest" then | ||
| 39 | + Notify.note_merge_request_email(u, note).deliver | ||
| 40 | + when "Snippet" | ||
| 41 | + true | ||
| 42 | + else | ||
| 43 | + Notify.note_wall_email(u, note).deliver | ||
| 44 | + end | ||
| 43 | end | 45 | end |
| 46 | + # Notify only author of resource | ||
| 47 | + elsif note.notify_author | ||
| 48 | + Notify.note_commit_email(note.commit_author, note).deliver | ||
| 44 | end | 49 | end |
| 45 | end | 50 | end |
| 46 | 51 |
app/models/note.rb
| @@ -58,21 +58,34 @@ class Note < ActiveRecord::Base | @@ -58,21 +58,34 @@ class Note < ActiveRecord::Base | ||
| 58 | nil | 58 | nil |
| 59 | end | 59 | end |
| 60 | 60 | ||
| 61 | - def line_file_id | ||
| 62 | - @line_file_id ||= line_code.split("_")[1].to_i if line_code | 61 | + # Check if we can notify commit author |
| 62 | + # with email about our comment | ||
| 63 | + # | ||
| 64 | + # If commit author email exist in project | ||
| 65 | + # and commit author is not passed user we can | ||
| 66 | + # send email to him | ||
| 67 | + # | ||
| 68 | + # params: | ||
| 69 | + # user - current user | ||
| 70 | + # | ||
| 71 | + # return: | ||
| 72 | + # Boolean | ||
| 73 | + # | ||
| 74 | + def notify_only_author?(user) | ||
| 75 | + commit? && commit_author && | ||
| 76 | + commit_author.email != user.email | ||
| 63 | end | 77 | end |
| 64 | 78 | ||
| 65 | - def line_type_id | ||
| 66 | - @line_type_id ||= line_code.split("_").first if line_code | 79 | + def commit? |
| 80 | + noteable_type == "Commit" | ||
| 67 | end | 81 | end |
| 68 | 82 | ||
| 69 | - def line_number | ||
| 70 | - @line_number ||= line_code.split("_").last.to_i if line_code | ||
| 71 | - end | ||
| 72 | - | ||
| 73 | - def for_line?(file_id, old_line, new_line) | ||
| 74 | - line_file_id == file_id && | ||
| 75 | - ((line_type_id == "NEW" && line_number == new_line) || (line_type_id == "OLD" && line_number == old_line )) | 83 | + def commit_author |
| 84 | + @commit_author ||= | ||
| 85 | + project.users.find_by_email(target.author_email) || | ||
| 86 | + project.users.find_by_name(target.author_name) | ||
| 87 | + rescue | ||
| 88 | + nil | ||
| 76 | end | 89 | end |
| 77 | end | 90 | end |
| 78 | # == Schema Information | 91 | # == Schema Information |
app/models/project.rb
| 1 | require "grit" | 1 | require "grit" |
| 2 | 2 | ||
| 3 | class Project < ActiveRecord::Base | 3 | class Project < ActiveRecord::Base |
| 4 | - PROJECT_N = 0 | ||
| 5 | - PROJECT_R = 1 | ||
| 6 | - PROJECT_RW = 2 | ||
| 7 | - PROJECT_RWA = 3 | ||
| 8 | - | ||
| 9 | belongs_to :owner, :class_name => "User" | 4 | belongs_to :owner, :class_name => "User" |
| 10 | 5 | ||
| 6 | + has_many :events, :dependent => :destroy | ||
| 11 | has_many :merge_requests, :dependent => :destroy | 7 | has_many :merge_requests, :dependent => :destroy |
| 12 | has_many :issues, :dependent => :destroy, :order => "position" | 8 | has_many :issues, :dependent => :destroy, :order => "position" |
| 13 | has_many :users_projects, :dependent => :destroy | 9 | has_many :users_projects, :dependent => :destroy |
| @@ -16,6 +12,8 @@ class Project < ActiveRecord::Base | @@ -16,6 +12,8 @@ class Project < ActiveRecord::Base | ||
| 16 | has_many :snippets, :dependent => :destroy | 12 | has_many :snippets, :dependent => :destroy |
| 17 | has_many :deploy_keys, :dependent => :destroy, :foreign_key => "project_id", :class_name => "Key" | 13 | has_many :deploy_keys, :dependent => :destroy, :foreign_key => "project_id", :class_name => "Key" |
| 18 | has_many :web_hooks, :dependent => :destroy | 14 | has_many :web_hooks, :dependent => :destroy |
| 15 | + has_many :protected_branches, :dependent => :destroy | ||
| 16 | + has_many :wikis, :dependent => :destroy | ||
| 19 | 17 | ||
| 20 | acts_as_taggable | 18 | acts_as_taggable |
| 21 | 19 | ||
| @@ -53,18 +51,14 @@ class Project < ActiveRecord::Base | @@ -53,18 +51,14 @@ class Project < ActiveRecord::Base | ||
| 53 | attr_protected :private_flag, :owner_id | 51 | attr_protected :private_flag, :owner_id |
| 54 | 52 | ||
| 55 | scope :public_only, where(:private_flag => false) | 53 | scope :public_only, where(:private_flag => false) |
| 54 | + scope :without_user, lambda { |user| where("id not in (:ids)", :ids => user.projects.map(&:id) ) } | ||
| 56 | 55 | ||
| 57 | def self.active | 56 | def self.active |
| 58 | joins(:issues, :notes, :merge_requests).order("issues.created_at, notes.created_at, merge_requests.created_at DESC") | 57 | joins(:issues, :notes, :merge_requests).order("issues.created_at, notes.created_at, merge_requests.created_at DESC") |
| 59 | end | 58 | end |
| 60 | 59 | ||
| 61 | def self.access_options | 60 | def self.access_options |
| 62 | - { | ||
| 63 | - "Denied" => PROJECT_N, | ||
| 64 | - "Read" => PROJECT_R, | ||
| 65 | - "Report" => PROJECT_RW, | ||
| 66 | - "Admin" => PROJECT_RWA | ||
| 67 | - } | 61 | + UsersProject.access_roles |
| 68 | end | 62 | end |
| 69 | 63 | ||
| 70 | def repository | 64 | def repository |
| @@ -96,21 +90,35 @@ class Project < ActiveRecord::Base | @@ -96,21 +90,35 @@ class Project < ActiveRecord::Base | ||
| 96 | [GIT_HOST['host'], code].join("/") | 90 | [GIT_HOST['host'], code].join("/") |
| 97 | end | 91 | end |
| 98 | 92 | ||
| 99 | - def execute_web_hooks(oldrev, newrev, ref) | 93 | + def observe_push(oldrev, newrev, ref, author_key_id) |
| 94 | + data = web_hook_data(oldrev, newrev, ref, author_key_id) | ||
| 95 | + | ||
| 96 | + Event.create( | ||
| 97 | + :project => self, | ||
| 98 | + :action => Event::Pushed, | ||
| 99 | + :data => data | ||
| 100 | + ) | ||
| 101 | + end | ||
| 102 | + | ||
| 103 | + def execute_web_hooks(oldrev, newrev, ref, author_key_id) | ||
| 100 | ref_parts = ref.split('/') | 104 | ref_parts = ref.split('/') |
| 101 | 105 | ||
| 102 | # Return if this is not a push to a branch (e.g. new commits) | 106 | # Return if this is not a push to a branch (e.g. new commits) |
| 103 | return if ref_parts[1] !~ /heads/ || oldrev == "00000000000000000000000000000000" | 107 | return if ref_parts[1] !~ /heads/ || oldrev == "00000000000000000000000000000000" |
| 104 | 108 | ||
| 105 | - data = web_hook_data(oldrev, newrev, ref) | 109 | + data = web_hook_data(oldrev, newrev, ref, author_key_id) |
| 110 | + | ||
| 106 | web_hooks.each { |web_hook| web_hook.execute(data) } | 111 | web_hooks.each { |web_hook| web_hook.execute(data) } |
| 107 | end | 112 | end |
| 108 | 113 | ||
| 109 | - def web_hook_data(oldrev, newrev, ref) | 114 | + def web_hook_data(oldrev, newrev, ref, author_key_id) |
| 115 | + key = Key.find_by_identifier(author_key_id) | ||
| 110 | data = { | 116 | data = { |
| 111 | before: oldrev, | 117 | before: oldrev, |
| 112 | after: newrev, | 118 | after: newrev, |
| 113 | ref: ref, | 119 | ref: ref, |
| 120 | + user_id: key.user.id, | ||
| 121 | + user_name: key.user_name, | ||
| 114 | repository: { | 122 | repository: { |
| 115 | name: name, | 123 | name: name, |
| 116 | url: web_url, | 124 | url: web_url, |
| @@ -137,6 +145,15 @@ class Project < ActiveRecord::Base | @@ -137,6 +145,15 @@ class Project < ActiveRecord::Base | ||
| 137 | data | 145 | data |
| 138 | end | 146 | end |
| 139 | 147 | ||
| 148 | + def open_branches | ||
| 149 | + if protected_branches.empty? | ||
| 150 | + self.repo.heads | ||
| 151 | + else | ||
| 152 | + pnames = protected_branches.map(&:name) | ||
| 153 | + self.repo.heads.reject { |h| pnames.include?(h.name) } | ||
| 154 | + end.sort_by(&:name) | ||
| 155 | + end | ||
| 156 | + | ||
| 140 | def team_member_by_name_or_email(email = nil, name = nil) | 157 | def team_member_by_name_or_email(email = nil, name = nil) |
| 141 | user = users.where("email like ? or name like ?", email, name).first | 158 | user = users.where("email like ? or name like ?", email, name).first |
| 142 | users_projects.find_by_user_id(user.id) if user | 159 | users_projects.find_by_user_id(user.id) if user |
| @@ -182,11 +199,11 @@ class Project < ActiveRecord::Base | @@ -182,11 +199,11 @@ class Project < ActiveRecord::Base | ||
| 182 | # Should be rewrited for new access rights | 199 | # Should be rewrited for new access rights |
| 183 | def add_access(user, *access) | 200 | def add_access(user, *access) |
| 184 | access = if access.include?(:admin) | 201 | access = if access.include?(:admin) |
| 185 | - { :project_access => PROJECT_RWA } | 202 | + { :project_access => UsersProject::MASTER } |
| 186 | elsif access.include?(:write) | 203 | elsif access.include?(:write) |
| 187 | - { :project_access => PROJECT_RW } | 204 | + { :project_access => UsersProject::DEVELOPER } |
| 188 | else | 205 | else |
| 189 | - { :project_access => PROJECT_R } | 206 | + { :project_access => UsersProject::REPORTER } |
| 190 | end | 207 | end |
| 191 | opts = { :user => user } | 208 | opts = { :user => user } |
| 192 | opts.merge!(access) | 209 | opts.merge!(access) |
| @@ -199,38 +216,52 @@ class Project < ActiveRecord::Base | @@ -199,38 +216,52 @@ class Project < ActiveRecord::Base | ||
| 199 | 216 | ||
| 200 | def repository_readers | 217 | def repository_readers |
| 201 | keys = Key.joins({:user => :users_projects}). | 218 | keys = Key.joins({:user => :users_projects}). |
| 202 | - where("users_projects.project_id = ? AND users_projects.repo_access = ?", id, Repository::REPO_R) | 219 | + where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::REPORTER) |
| 203 | keys.map(&:identifier) + deploy_keys.map(&:identifier) | 220 | keys.map(&:identifier) + deploy_keys.map(&:identifier) |
| 204 | end | 221 | end |
| 205 | 222 | ||
| 206 | def repository_writers | 223 | def repository_writers |
| 207 | keys = Key.joins({:user => :users_projects}). | 224 | keys = Key.joins({:user => :users_projects}). |
| 208 | - where("users_projects.project_id = ? AND users_projects.repo_access = ?", id, Repository::REPO_RW) | 225 | + where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::DEVELOPER) |
| 226 | + keys.map(&:identifier) | ||
| 227 | + end | ||
| 228 | + | ||
| 229 | + def repository_masters | ||
| 230 | + keys = Key.joins({:user => :users_projects}). | ||
| 231 | + where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::MASTER) | ||
| 209 | keys.map(&:identifier) | 232 | keys.map(&:identifier) |
| 210 | end | 233 | end |
| 211 | 234 | ||
| 212 | def readers | 235 | def readers |
| 213 | - @readers ||= users_projects.includes(:user).where(:project_access => [PROJECT_R, PROJECT_RW, PROJECT_RWA]).map(&:user) | 236 | + @readers ||= users_projects.includes(:user).map(&:user) |
| 214 | end | 237 | end |
| 215 | 238 | ||
| 216 | def writers | 239 | def writers |
| 217 | - @writers ||= users_projects.includes(:user).where(:project_access => [PROJECT_RW, PROJECT_RWA]).map(&:user) | 240 | + @writers ||= users_projects.includes(:user).map(&:user) |
| 218 | end | 241 | end |
| 219 | 242 | ||
| 220 | def admins | 243 | def admins |
| 221 | - @admins ||= users_projects.includes(:user).where(:project_access => PROJECT_RWA).map(&:user) | 244 | + @admins ||= users_projects.includes(:user).where(:project_access => UsersProject::MASTER).map(&:user) |
| 222 | end | 245 | end |
| 223 | 246 | ||
| 224 | def allow_read_for?(user) | 247 | def allow_read_for?(user) |
| 225 | - !users_projects.where(:user_id => user.id, :project_access => [PROJECT_R, PROJECT_RW, PROJECT_RWA]).empty? | 248 | + !users_projects.where(:user_id => user.id).empty? |
| 249 | + end | ||
| 250 | + | ||
| 251 | + def guest_access_for?(user) | ||
| 252 | + !users_projects.where(:user_id => user.id).empty? | ||
| 253 | + end | ||
| 254 | + | ||
| 255 | + def report_access_for?(user) | ||
| 256 | + !users_projects.where(:user_id => user.id, :project_access => [UsersProject::REPORTER, UsersProject::DEVELOPER, UsersProject::MASTER]).empty? | ||
| 226 | end | 257 | end |
| 227 | 258 | ||
| 228 | - def allow_write_for?(user) | ||
| 229 | - !users_projects.where(:user_id => user.id, :project_access => [PROJECT_RW, PROJECT_RWA]).empty? | 259 | + def dev_access_for?(user) |
| 260 | + !users_projects.where(:user_id => user.id, :project_access => [UsersProject::DEVELOPER, UsersProject::MASTER]).empty? | ||
| 230 | end | 261 | end |
| 231 | 262 | ||
| 232 | - def allow_admin_for?(user) | ||
| 233 | - !users_projects.where(:user_id => user.id, :project_access => [PROJECT_RWA]).empty? || owner_id == user.id | 263 | + def master_access_for?(user) |
| 264 | + !users_projects.where(:user_id => user.id, :project_access => [UsersProject::MASTER]).empty? || owner_id == user.id | ||
| 234 | end | 265 | end |
| 235 | 266 | ||
| 236 | def root_ref | 267 | def root_ref |
| @@ -335,15 +366,19 @@ end | @@ -335,15 +366,19 @@ end | ||
| 335 | # | 366 | # |
| 336 | # Table name: projects | 367 | # Table name: projects |
| 337 | # | 368 | # |
| 338 | -# id :integer not null, primary key | ||
| 339 | -# name :string(255) | ||
| 340 | -# path :string(255) | ||
| 341 | -# description :text | ||
| 342 | -# created_at :datetime | ||
| 343 | -# updated_at :datetime | ||
| 344 | -# private_flag :boolean default(TRUE), not null | ||
| 345 | -# code :string(255) | ||
| 346 | -# owner_id :integer | ||
| 347 | -# default_branch :string(255) default("master"), not null | 369 | +# id :integer not null, primary key |
| 370 | +# name :string(255) | ||
| 371 | +# path :string(255) | ||
| 372 | +# description :text | ||
| 373 | +# created_at :datetime | ||
| 374 | +# updated_at :datetime | ||
| 375 | +# private_flag :boolean default(TRUE), not null | ||
| 376 | +# code :string(255) | ||
| 377 | +# owner_id :integer | ||
| 378 | +# default_branch :string(255) default("master"), not null | ||
| 379 | +# issues_enabled :boolean default(TRUE), not null | ||
| 380 | +# wall_enabled :boolean default(TRUE), not null | ||
| 381 | +# merge_requests_enabled :boolean default(TRUE), not null | ||
| 382 | +# wiki_enabled :boolean default(TRUE), not null | ||
| 348 | # | 383 | # |
| 349 | 384 |
| @@ -0,0 +1,29 @@ | @@ -0,0 +1,29 @@ | ||
| 1 | +class ProtectedBranch < ActiveRecord::Base | ||
| 2 | + belongs_to :project | ||
| 3 | + validates_presence_of :project_id | ||
| 4 | + validates_presence_of :name | ||
| 5 | + | ||
| 6 | + after_save :update_repository | ||
| 7 | + after_destroy :update_repository | ||
| 8 | + | ||
| 9 | + def update_repository | ||
| 10 | + Gitlabhq::GitHost.system.new.configure do |c| | ||
| 11 | + c.update_project(project.path, project) | ||
| 12 | + end | ||
| 13 | + end | ||
| 14 | + | ||
| 15 | + def commit | ||
| 16 | + project.commit(self.name) | ||
| 17 | + end | ||
| 18 | +end | ||
| 19 | +# == Schema Information | ||
| 20 | +# | ||
| 21 | +# Table name: protected_branches | ||
| 22 | +# | ||
| 23 | +# id :integer not null, primary key | ||
| 24 | +# project_id :integer not null | ||
| 25 | +# name :string(255) not null | ||
| 26 | +# created_at :datetime not null | ||
| 27 | +# updated_at :datetime not null | ||
| 28 | +# | ||
| 29 | + |
app/models/repository.rb
| 1 | require File.join(Rails.root, "lib", "gitlabhq", "git_host") | 1 | require File.join(Rails.root, "lib", "gitlabhq", "git_host") |
| 2 | 2 | ||
| 3 | class Repository | 3 | class Repository |
| 4 | - REPO_N = 0 | ||
| 5 | - REPO_R = 1 | ||
| 6 | - REPO_RW = 2 | ||
| 7 | - | ||
| 8 | attr_accessor :project | 4 | attr_accessor :project |
| 9 | 5 | ||
| 10 | def self.default_ref | 6 | def self.default_ref |
| @@ -12,11 +8,7 @@ class Repository | @@ -12,11 +8,7 @@ class Repository | ||
| 12 | end | 8 | end |
| 13 | 9 | ||
| 14 | def self.access_options | 10 | def self.access_options |
| 15 | - { | ||
| 16 | - "Denied" => REPO_N, | ||
| 17 | - "Pull" => REPO_R, | ||
| 18 | - "Pull & Push" => REPO_RW | ||
| 19 | - } | 11 | + {} |
| 20 | end | 12 | end |
| 21 | 13 | ||
| 22 | def initialize(project) | 14 | def initialize(project) |
| @@ -56,7 +48,7 @@ class Repository | @@ -56,7 +48,7 @@ class Repository | ||
| 56 | end | 48 | end |
| 57 | 49 | ||
| 58 | def path_to_repo | 50 | def path_to_repo |
| 59 | - GIT_HOST["base_path"] + path + ".git" | 51 | + File.join(GIT_HOST["base_path"], "#{path}.git") |
| 60 | end | 52 | end |
| 61 | 53 | ||
| 62 | def update_repository | 54 | def update_repository |
app/models/user.rb
| @@ -2,7 +2,7 @@ class User < ActiveRecord::Base | @@ -2,7 +2,7 @@ class User < ActiveRecord::Base | ||
| 2 | # Include default devise modules. Others available are: | 2 | # Include default devise modules. Others available are: |
| 3 | # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable | 3 | # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable |
| 4 | devise :database_authenticatable, :token_authenticatable, | 4 | devise :database_authenticatable, :token_authenticatable, |
| 5 | - :recoverable, :rememberable, :trackable, :validatable | 5 | + :recoverable, :rememberable, :trackable, :validatable, :omniauthable |
| 6 | 6 | ||
| 7 | # Setup accessible (or protected) attributes for your model | 7 | # Setup accessible (or protected) attributes for your model |
| 8 | attr_accessible :email, :password, :password_confirmation, :remember_me, | 8 | attr_accessible :email, :password, :password_confirmation, :remember_me, |
| @@ -62,6 +62,30 @@ class User < ActiveRecord::Base | @@ -62,6 +62,30 @@ class User < ActiveRecord::Base | ||
| 62 | def last_activity_project | 62 | def last_activity_project |
| 63 | projects.first | 63 | projects.first |
| 64 | end | 64 | end |
| 65 | + | ||
| 66 | + def self.generate_random_password | ||
| 67 | + (0...8).map{ ('a'..'z').to_a[rand(26)] }.join | ||
| 68 | + end | ||
| 69 | + | ||
| 70 | + def first_name | ||
| 71 | + name.split(" ").first unless name.blank? | ||
| 72 | + end | ||
| 73 | + | ||
| 74 | + def self.find_for_ldap_auth(omniauth_info) | ||
| 75 | + name = omniauth_info.name | ||
| 76 | + email = omniauth_info.email | ||
| 77 | + | ||
| 78 | + if @user = User.find_by_email(email) | ||
| 79 | + @user | ||
| 80 | + else | ||
| 81 | + password = generate_random_password | ||
| 82 | + @user = User.create(:name => name, | ||
| 83 | + :email => email, | ||
| 84 | + :password => password, | ||
| 85 | + :password_confirmation => password | ||
| 86 | + ) | ||
| 87 | + end | ||
| 88 | + end | ||
| 65 | end | 89 | end |
| 66 | # == Schema Information | 90 | # == Schema Information |
| 67 | # | 91 | # |
app/models/users_project.rb
| 1 | class UsersProject < ActiveRecord::Base | 1 | class UsersProject < ActiveRecord::Base |
| 2 | + GUEST = 10 | ||
| 3 | + REPORTER = 20 | ||
| 4 | + DEVELOPER = 30 | ||
| 5 | + MASTER = 40 | ||
| 6 | + | ||
| 2 | belongs_to :user | 7 | belongs_to :user |
| 3 | belongs_to :project | 8 | belongs_to :project |
| 4 | 9 | ||
| @@ -17,7 +22,6 @@ class UsersProject < ActiveRecord::Base | @@ -17,7 +22,6 @@ class UsersProject < ActiveRecord::Base | ||
| 17 | UsersProject.transaction do | 22 | UsersProject.transaction do |
| 18 | user_ids.each do |user_id| | 23 | user_ids.each do |user_id| |
| 19 | users_project = UsersProject.new( | 24 | users_project = UsersProject.new( |
| 20 | - :repo_access => repo_access, | ||
| 21 | :project_access => project_access, | 25 | :project_access => project_access, |
| 22 | :user_id => user_id | 26 | :user_id => user_id |
| 23 | ) | 27 | ) |
| @@ -27,11 +31,45 @@ class UsersProject < ActiveRecord::Base | @@ -27,11 +31,45 @@ class UsersProject < ActiveRecord::Base | ||
| 27 | end | 31 | end |
| 28 | end | 32 | end |
| 29 | 33 | ||
| 34 | + def self.user_bulk_import(user, project_ids, project_access, repo_access) | ||
| 35 | + UsersProject.transaction do | ||
| 36 | + project_ids.each do |project_id| | ||
| 37 | + users_project = UsersProject.new( | ||
| 38 | + :project_access => project_access, | ||
| 39 | + ) | ||
| 40 | + users_project.project_id = project_id | ||
| 41 | + users_project.user_id = user.id | ||
| 42 | + users_project.save | ||
| 43 | + end | ||
| 44 | + end | ||
| 45 | + end | ||
| 46 | + | ||
| 47 | + def self.access_roles | ||
| 48 | + { | ||
| 49 | + "Guest" => GUEST, | ||
| 50 | + "Reporter" => REPORTER, | ||
| 51 | + "Developer" => DEVELOPER, | ||
| 52 | + "Master" => MASTER | ||
| 53 | + } | ||
| 54 | + end | ||
| 55 | + | ||
| 56 | + def role_access | ||
| 57 | + project_access | ||
| 58 | + end | ||
| 59 | + | ||
| 30 | def update_repository | 60 | def update_repository |
| 31 | Gitlabhq::GitHost.system.new.configure do |c| | 61 | Gitlabhq::GitHost.system.new.configure do |c| |
| 32 | c.update_project(project.path, project) | 62 | c.update_project(project.path, project) |
| 33 | end | 63 | end |
| 34 | end | 64 | end |
| 65 | + | ||
| 66 | + def project_access_human | ||
| 67 | + Project.access_options.key(self.project_access) | ||
| 68 | + end | ||
| 69 | + | ||
| 70 | + def repo_access_human | ||
| 71 | + "" | ||
| 72 | + end | ||
| 35 | end | 73 | end |
| 36 | # == Schema Information | 74 | # == Schema Information |
| 37 | # | 75 | # |
| @@ -42,7 +80,6 @@ end | @@ -42,7 +80,6 @@ end | ||
| 42 | # project_id :integer not null | 80 | # project_id :integer not null |
| 43 | # created_at :datetime | 81 | # created_at :datetime |
| 44 | # updated_at :datetime | 82 | # updated_at :datetime |
| 45 | -# repo_access :integer default(0), not null | ||
| 46 | # project_access :integer default(0), not null | 83 | # project_access :integer default(0), not null |
| 47 | # | 84 | # |
| 48 | 85 |
| @@ -0,0 +1,47 @@ | @@ -0,0 +1,47 @@ | ||
| 1 | +class Wiki < ActiveRecord::Base | ||
| 2 | + belongs_to :project | ||
| 3 | + belongs_to :user | ||
| 4 | + | ||
| 5 | + validates :content, :title, :user_id, :presence => true | ||
| 6 | + validates :title, :length => 1..250 | ||
| 7 | + | ||
| 8 | + before_update :set_slug | ||
| 9 | + | ||
| 10 | + | ||
| 11 | + def to_param | ||
| 12 | + slug | ||
| 13 | + end | ||
| 14 | + | ||
| 15 | + protected | ||
| 16 | + | ||
| 17 | + def set_slug | ||
| 18 | + self.slug = self.title.parameterize | ||
| 19 | + end | ||
| 20 | + | ||
| 21 | + class << self | ||
| 22 | + def regenerate_from wiki | ||
| 23 | + regenerated_field = [:slug, :content, :title] | ||
| 24 | + | ||
| 25 | + new_wiki = Wiki.new | ||
| 26 | + regenerated_field.each do |field| | ||
| 27 | + new_wiki.send("#{field}=", wiki.send(field)) | ||
| 28 | + end | ||
| 29 | + new_wiki | ||
| 30 | + end | ||
| 31 | + | ||
| 32 | + end | ||
| 33 | +end | ||
| 34 | +# == Schema Information | ||
| 35 | +# | ||
| 36 | +# Table name: wikis | ||
| 37 | +# | ||
| 38 | +# id :integer not null, primary key | ||
| 39 | +# title :string(255) | ||
| 40 | +# content :text | ||
| 41 | +# project_id :integer | ||
| 42 | +# created_at :datetime not null | ||
| 43 | +# updated_at :datetime not null | ||
| 44 | +# slug :string(255) | ||
| 45 | +# user_id :integer | ||
| 46 | +# | ||
| 47 | + |
app/views/admin/projects/_form.html.haml
| 1 | = form_for [:admin, @admin_project] do |f| | 1 | = form_for [:admin, @admin_project] do |f| |
| 2 | -if @admin_project.errors.any? | 2 | -if @admin_project.errors.any? |
| 3 | - #error_explanation | ||
| 4 | - %h2= "#{pluralize(@admin_project.errors.count, "error")} prohibited this admin_project from being saved:" | 3 | + .alert-message.block-message.error |
| 5 | %ul | 4 | %ul |
| 6 | - @admin_project.errors.full_messages.each do |msg| | 5 | - @admin_project.errors.full_messages.each do |msg| |
| 7 | %li= msg | 6 | %li= msg |
| 8 | 7 | ||
| 9 | - .form-row | 8 | + .clearfix |
| 10 | = f.label :name | 9 | = f.label :name |
| 11 | - %br | ||
| 12 | - = f.text_field :name | ||
| 13 | - .form-row | ||
| 14 | - = f.label :code | ||
| 15 | - %br | ||
| 16 | - = f.text_field :code | ||
| 17 | - .form-row | ||
| 18 | - = f.label :path | ||
| 19 | - %br | ||
| 20 | - = f.text_field :path | ||
| 21 | - | ||
| 22 | - .form-row | ||
| 23 | - = f.label :tag_list | ||
| 24 | - %br | ||
| 25 | - = f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field | ||
| 26 | - | ||
| 27 | - .form-row | 10 | + .input= f.text_field :name |
| 11 | + .clearfix | ||
| 12 | + = f.label :path do | ||
| 13 | + Path | ||
| 14 | + .input | ||
| 15 | + .input-prepend | ||
| 16 | + %span.add-on= "git@#{GIT_HOST["host"]}:" | ||
| 17 | + = f.text_field :path, :placeholder => "example_project", :disabled => !@admin_project.new_record? | ||
| 18 | + .clearfix | ||
| 19 | + = f.label :code do | ||
| 20 | + Code | ||
| 21 | + .input | ||
| 22 | + .input-prepend | ||
| 23 | + %span.add-on= "http://#{GIT_HOST["host"]}/" | ||
| 24 | + = f.text_field :code, :placeholder => "example" | ||
| 25 | + | ||
| 26 | + - unless @admin_project.new_record? | ||
| 27 | + .clearfix | ||
| 28 | + = f.label :owner_id | ||
| 29 | + .input= f.select :owner_id, User.all.map { |user| [user.name, user.id] } | ||
| 30 | + | ||
| 31 | + - unless @admin_project.heads.empty? | ||
| 32 | + .clearfix | ||
| 33 | + = f.label :default_branch, "Default Branch" | ||
| 34 | + .input= f.select(:default_branch, @admin_project.heads.map(&:name), {}, :style => "width:210px;") | ||
| 35 | + | ||
| 36 | + .well | ||
| 37 | + %h5 Features | ||
| 38 | + | ||
| 39 | + .clearfix | ||
| 40 | + = f.label :issues_enabled, "Issues" | ||
| 41 | + .input= f.check_box :issues_enabled | ||
| 42 | + | ||
| 43 | + .clearfix | ||
| 44 | + = f.label :merge_requests_enabled, "Merge Requests" | ||
| 45 | + .input= f.check_box :merge_requests_enabled | ||
| 46 | + | ||
| 47 | + .clearfix | ||
| 48 | + = f.label :wall_enabled, "Wall" | ||
| 49 | + .input= f.check_box :wall_enabled | ||
| 50 | + | ||
| 51 | + .clearfix | ||
| 28 | = f.label :description | 52 | = f.label :description |
| 29 | - %br | ||
| 30 | - = f.text_area :description | 53 | + .input= f.text_area :description, :class => "xxlarge" |
| 31 | .clear | 54 | .clear |
| 32 | %br | 55 | %br |
| 33 | .actions | 56 | .actions |
| 34 | - = f.submit 'Save', :class => "grey-button" | 57 | + = f.submit 'Save', :class => "btn primary" |
| 58 | + = link_to 'Cancel', [:admin, @admin_project], :class => "btn" | ||
| 59 | + = link_to 'Destroy', [:admin, @admin_project], :confirm => 'Are you sure?', :method => :delete, :class => "btn danger right" | ||
| 35 | 60 | ||
| 36 | :javascript | 61 | :javascript |
| 37 | $(function(){ | 62 | $(function(){ |
| 38 | taggifyForm(); | 63 | taggifyForm(); |
| 64 | + $('#project_owner_id').chosen(); | ||
| 65 | + $('#project_default_branch').chosen(); | ||
| 39 | }) | 66 | }) |
app/views/admin/projects/edit.html.haml
app/views/admin/projects/index.html.haml
| 1 | -%table | 1 | +%h3 |
| 2 | + Projects | ||
| 3 | + = link_to 'New Project', new_admin_project_path, :class => "btn small right" | ||
| 4 | +%hr | ||
| 5 | +%table.zebra-striped | ||
| 2 | %thead | 6 | %thead |
| 3 | %th Name | 7 | %th Name |
| 4 | - %th Code | ||
| 5 | %th Path | 8 | %th Path |
| 6 | %th Team Members | 9 | %th Team Members |
| 7 | %th Last Commit | 10 | %th Last Commit |
| @@ -11,12 +14,9 @@ | @@ -11,12 +14,9 @@ | ||
| 11 | - @admin_projects.each do |project| | 14 | - @admin_projects.each do |project| |
| 12 | %tr | 15 | %tr |
| 13 | %td= link_to project.name, [:admin, project] | 16 | %td= link_to project.name, [:admin, project] |
| 14 | - %td= project.code | ||
| 15 | %td= project.path | 17 | %td= project.path |
| 16 | %td= project.users_projects.count | 18 | %td= project.users_projects.count |
| 17 | %td= last_commit(project) | 19 | %td= last_commit(project) |
| 18 | - %td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}" | ||
| 19 | - %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete | ||
| 20 | - | 20 | + %td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small" |
| 21 | + %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger" | ||
| 21 | = paginate @admin_projects | 22 | = paginate @admin_projects |
| 22 | -= link_to 'New Project', new_admin_project_path, :class => "grey-button" |
app/views/admin/projects/show.html.haml
| 1 | -- unless notice.nil? | ||
| 2 | - %p#notice= notice | 1 | +%h3 |
| 2 | + = @admin_project.name | ||
| 3 | + = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "btn right small" | ||
| 3 | 4 | ||
| 5 | +%hr | ||
| 4 | 6 | ||
| 5 | -%h2= @admin_project.name | ||
| 6 | - | ||
| 7 | -%table.round-borders | 7 | +%table.zebra-striped |
| 8 | %tr | 8 | %tr |
| 9 | %td | 9 | %td |
| 10 | %b | 10 | %b |
| @@ -29,14 +29,32 @@ | @@ -29,14 +29,32 @@ | ||
| 29 | Description: | 29 | Description: |
| 30 | %td | 30 | %td |
| 31 | = @admin_project.description | 31 | = @admin_project.description |
| 32 | - %tr | ||
| 33 | - %td{:colspan => 2} | ||
| 34 | - = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "grey-button" | ||
| 35 | 32 | ||
| 36 | 33 | ||
| 37 | .span-14 | 34 | .span-14 |
| 38 | 35 | ||
| 39 | - %h2 Team | 36 | + %h3 |
| 37 | + Team | ||
| 38 | + %small | ||
| 39 | + ( #{@admin_project.users_projects.count} ) | ||
| 40 | + | ||
| 41 | + %hr | ||
| 42 | + | ||
| 43 | + %table.zebra-striped | ||
| 44 | + %thead | ||
| 45 | + %tr | ||
| 46 | + %th Name | ||
| 47 | + %th Project Access | ||
| 48 | + %th Repository Access | ||
| 49 | + %th | ||
| 50 | + | ||
| 51 | + - @admin_project.users_projects.each do |tm| | ||
| 52 | + %tr | ||
| 53 | + %td | ||
| 54 | + = link_to tm.user_name, admin_users_path(tm.user) | ||
| 55 | + %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "medium project-access-select", :disabled => :disabled | ||
| 56 | + %td= link_to 'Edit Access', edit_admin_team_member_path(tm), :class => "btn small" | ||
| 57 | + %td= link_to 'Remove from team', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete, :class => "btn danger small" | ||
| 40 | 58 | ||
| 41 | = form_tag team_update_admin_project_path(@admin_project), :class => "bulk_import", :method => :put do | 59 | = form_tag team_update_admin_project_path(@admin_project), :class => "bulk_import", :method => :put do |
| 42 | %table | 60 | %table |
| @@ -49,29 +67,9 @@ | @@ -49,29 +67,9 @@ | ||
| 49 | %tr | 67 | %tr |
| 50 | %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), :multiple => true | 68 | %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), :multiple => true |
| 51 | %td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select" | 69 | %td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select" |
| 52 | - %td= select_tag :repo_access, options_for_select(Repository.access_options), :class => "repo-access-select" | ||
| 53 | - | ||
| 54 | - %tr | ||
| 55 | - %td{ :colspan => 3 } | ||
| 56 | - = submit_tag 'Add', :class => "positive-button" | ||
| 57 | 70 | ||
| 58 | - %table.round-borders | ||
| 59 | - %thead | ||
| 60 | - %tr | ||
| 61 | - %th Name | ||
| 62 | - %th Added | ||
| 63 | - %th Project Access | ||
| 64 | - %th Repository Access | ||
| 65 | - %th | ||
| 66 | - | ||
| 67 | - - @admin_project.users_projects.each do |tm| | ||
| 68 | - %tr | ||
| 69 | - %td | ||
| 70 | - = link_to tm.user_name, admin_team_member_path(tm) | ||
| 71 | - %td= time_ago_in_words(tm.updated_at) + " ago" | ||
| 72 | - %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "project-access-select", :disabled => :disabled | ||
| 73 | - %td= select_tag :tm_repo_access, options_for_select(Repository.access_options, tm.repo_access), :class => "repo-access-select", :disabled => :disabled | ||
| 74 | - %td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete | 71 | + .actions |
| 72 | + = submit_tag 'Add', :class => "btn primary" | ||
| 75 | 73 | ||
| 76 | :css | 74 | :css |
| 77 | form select { | 75 | form select { |
app/views/admin/team_members/_form.html.haml
| 1 | -= form_for @admin_team_member, :as => :team_member, :url => @admin_team_member.new_record? ? admin_team_members_path(@admin_team_member) : admin_team_member_path(@admin_team_member) do |f| | 1 | += form_for @admin_team_member, :as => :team_member, :url => admin_team_member_path(@admin_team_member) do |f| |
| 2 | -if @admin_team_member.errors.any? | 2 | -if @admin_team_member.errors.any? |
| 3 | - #error_explanation | ||
| 4 | - %h2= "#{pluralize(@admin_team_member.errors.count, "error")} prohibited this admin_project from being saved:" | 3 | + .alert-message.block-message.error |
| 5 | %ul | 4 | %ul |
| 6 | - @admin_team_member.errors.full_messages.each do |msg| | 5 | - @admin_team_member.errors.full_messages.each do |msg| |
| 7 | %li= msg | 6 | %li= msg |
| 8 | 7 | ||
| 9 | - - if @admin_team_member.new_record? | ||
| 10 | - .span-6 | ||
| 11 | - = f.label :user_id | ||
| 12 | - .span-6 | ||
| 13 | - = f.select :user_id, User.all.map { |user| [user.name, user.id] } | ||
| 14 | - .span-6 | ||
| 15 | - = f.label :project_id | ||
| 16 | - .span-6 | ||
| 17 | - = f.select :project_id, Project.all.map { |user| [user.name, user.id] } | 8 | + .clearfix |
| 9 | + %label Project Access: | ||
| 10 | + .input | ||
| 11 | + = f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, :class => "project-access-select" | ||
| 18 | 12 | ||
| 19 | - .span-6 | ||
| 20 | - %b Project Access: | ||
| 21 | - .span-6 | ||
| 22 | - = f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, :class => "project-access-select" | ||
| 23 | - | ||
| 24 | - .span-6 | ||
| 25 | - %b Repository Access: | ||
| 26 | - .span-6 | ||
| 27 | - = f.select :repo_access, options_for_select(Repository.access_options, @admin_team_member.repo_access), {}, :class => "repo-access-select" | ||
| 28 | %br | 13 | %br |
| 29 | .actions | 14 | .actions |
| 30 | - = f.submit 'Save', :class => "grey-button" | 15 | + = f.submit 'Save', :class => "btn primary" |
| 16 | + = link_to 'Cancel', :back, :class => "btn" | ||
| 31 | 17 | ||
| 32 | :css | 18 | :css |
| 33 | form select { | 19 | form select { |
app/views/admin/team_members/edit.html.haml
| 1 | -= render 'form' | 1 | +%h3 |
| 2 | + Edit access | ||
| 3 | + %small | ||
| 4 | + = @admin_team_member.project.name | ||
| 5 | + – | ||
| 6 | + = @admin_team_member.user_name | ||
| 2 | 7 | ||
| 3 | -%br | ||
| 4 | -= link_to 'Show', admin_team_member_path(@admin_team_member) | ||
| 5 | -\| | ||
| 6 | -= link_to 'Back', admin_team_members_path | 8 | +%hr |
| 9 | +%table.zebra-striped | ||
| 10 | + %tr | ||
| 11 | + %td User: | ||
| 12 | + %td= @admin_team_member.user_name | ||
| 13 | + %tr | ||
| 14 | + %td Project: | ||
| 15 | + %td= @admin_team_member.project.name | ||
| 16 | + %tr | ||
| 17 | + %td Since: | ||
| 18 | + %td= @admin_team_member.updated_at.stamp("Nov 11, 2010") | ||
| 19 | += render 'form' |
app/views/admin/team_members/index.html.haml
| @@ -1,28 +0,0 @@ | @@ -1,28 +0,0 @@ | ||
| 1 | -- @admin_team_members.group_by(&:project).sort.each do |project, members| | ||
| 2 | - %h3= link_to project.name, [:admin, project] | ||
| 3 | - %table | ||
| 4 | - %thead | ||
| 5 | - %th Name | ||
| 6 | - %th Project Access | ||
| 7 | - %th Repo Access | ||
| 8 | - %th Added | ||
| 9 | - %th | ||
| 10 | - %th | ||
| 11 | - - members.each do |tm| | ||
| 12 | - - user = tm.user | ||
| 13 | - %tr | ||
| 14 | - %td.span-6 | ||
| 15 | - = link_to tm.user_name, admin_team_member_path(tm) | ||
| 16 | - %br | ||
| 17 | - %br | ||
| 18 | - = tm.user_email | ||
| 19 | - %td.span-3= select_tag :project_access, options_for_select(Project.access_options, tm.project_access), :class => "project-access-select", :disabled => :disabled | ||
| 20 | - %td.span-3= select_tag :repo_access, options_for_select(Repository.access_options, tm.repo_access), :class => "repo-access-select", :disabled => :disabled | ||
| 21 | - %td.span-3= time_ago_in_words(tm.updated_at) + " ago" | ||
| 22 | - %td= link_to 'Edit', edit_admin_team_member_path(tm), :id => "edit_#{dom_id(tm)}" | ||
| 23 | - %td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete | ||
| 24 | - | ||
| 25 | -%br | ||
| 26 | - | ||
| 27 | -= paginate @admin_team_members | ||
| 28 | -= link_to 'New Team Member', new_admin_team_member_path, :class => "grey-button" |