From 6fa67051e1ea70ec51752ef90a2b337cca8a7a16 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 1 Jul 2015 22:54:07 +0800 Subject: [PATCH 01/55] =?UTF-8?q?=E6=9C=AC=E9=A1=B9=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E7=9A=84=E7=94=A8=E6=88=B7=E5=90=8D=E5=92=8C=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E5=85=8B=E9=9A=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 1 + config/configuration.yml | 3 +++ config/routes.rb | 3 +++ lib/grack | 1 + lib/trustie.rb | 1 + lib/trustie/grack/auth.rb | 55 ++++++++++++++++++++++++++++++++++++++ lib/trustie/grack/grack.rb | 18 +++++++++++++ 7 files changed, 82 insertions(+) create mode 160000 lib/grack create mode 100644 lib/trustie/grack/auth.rb create mode 100644 lib/trustie/grack/grack.rb diff --git a/Gemfile b/Gemfile index 660a7ff49..cd2607a4f 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ unless RUBY_PLATFORM =~ /w32/ gem 'iconv' end +gem 'grack', path:'./lib/grack' gem 'rest-client' gem "mysql2", "= 0.3.18" gem 'redis-rails' diff --git a/config/configuration.yml b/config/configuration.yml index 390754a87..4c786ad28 100644 --- a/config/configuration.yml +++ b/config/configuration.yml @@ -197,9 +197,12 @@ default: #max_concurrent_ajax_uploads: 2 #pic_types: "bmp,jpeg,jpg,png,gif" + repository_root_path: '/Users/guange/repository' + # specific configuration options for production environment # that overrides the default ones production: + repository_root_path: '/home/pdl/redmine-2.3.2-0/apache2/htdocs' cookie_domain: ".trustie.net" rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf email_delivery: diff --git a/config/routes.rb b/config/routes.rb index b5a244345..16d8da882 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -28,6 +28,9 @@ RedmineApp::Application.routes.draw do mount Mobile::API => '/api' + # Enable Grack support + mount Trustie::Grack.new, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post] + resources :homework_users resources :no_uses delete 'no_uses', :to => 'no_uses#delete' diff --git a/lib/grack b/lib/grack new file mode 160000 index 000000000..949be9116 --- /dev/null +++ b/lib/grack @@ -0,0 +1 @@ +Subproject commit 949be9116a76b50a6f86baf507dec4c4d7fb34c6 diff --git a/lib/trustie.rb b/lib/trustie.rb index b6cec3c86..3636efd95 100644 --- a/lib/trustie.rb +++ b/lib/trustie.rb @@ -1,2 +1,3 @@ require 'trustie/utils' require 'trustie/utils/image' +require 'trustie/grack/grack' diff --git a/lib/trustie/grack/auth.rb b/lib/trustie/grack/auth.rb new file mode 100644 index 000000000..c27477be2 --- /dev/null +++ b/lib/trustie/grack/auth.rb @@ -0,0 +1,55 @@ +require 'rack/auth/basic' +require 'rack/auth/abstract/handler' +require 'rack/auth/abstract/request' + +module Grack + class Auth < Rack::Auth::Basic + def call(env) + @env = env + @request = Rack::Request.new(env) + @auth = Request.new(env) + + if not @auth.provided? + unauthorized + elsif not @auth.basic? + bad_request + else + result = if (access = valid?(@auth) and access == true) + @env['REMOTE_USER'] = @auth.username + @app.call(env) + else + if access == '404' + render_not_found + elsif access == '403' + #render_no_access + unauthorized + else + unauthorized + end + end + result + end + end# method call + + + def render_not_found + [404, {"Content-Type" => "text/plain"}, ["Not Found"]] + end + + def valid?(auth) + match = @request.path_info.match(/(\/.+\.git)\//) + if match + rep = Repository.where("root_url like ?", "%#{match[1]}") + return "404" if rep.empty? + username, password = auth.credentials + user, last_login_on = User.try_to_login(username, password) + return '403' unless user + if user.member_of?(rep.first.project) || user.admin? + return true + end + end + false + end + end# class Auth +end# module Grack + diff --git a/lib/trustie/grack/grack.rb b/lib/trustie/grack/grack.rb new file mode 100644 index 000000000..1dc4bdc0d --- /dev/null +++ b/lib/trustie/grack/grack.rb @@ -0,0 +1,18 @@ +require_relative 'auth' + +module Trustie + module Grack + + def self.new + Rack::Builder.new do + use ::Grack::Auth + run ::Grack::Server.new( + project_root: Redmine::Configuration['repository_root_path'] || "/home/pdl/redmine-2.3.2-0/apache2/htdocs", + upload_pack: true, + receive_pack:true + ) + end + end + + end +end From acd4f33d7229732a015ea3a8ddb5b5be6fe07595 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 1 Jul 2015 22:56:04 +0800 Subject: [PATCH 02/55] =?UTF-8?q?=E6=B7=BB=E5=8A=A0grack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/grack/.travis.yml | 14 + lib/grack/CHANGELOG | 16 + lib/grack/Gemfile | 10 + lib/grack/Gemfile.lock | 37 +++ lib/grack/README.md | 95 ++++++ lib/grack/Rakefile | 27 ++ lib/grack/bin/console | 6 + lib/grack/bin/testserver | 24 ++ lib/grack/examples/111.git/HEAD | 1 + lib/grack/examples/111.git/config | 6 + lib/grack/examples/111.git/description | 1 + .../111.git/hooks/applypatch-msg.sample | 15 + .../examples/111.git/hooks/commit-msg.sample | 24 ++ .../examples/111.git/hooks/post-update.sample | 8 + .../111.git/hooks/pre-applypatch.sample | 14 + .../examples/111.git/hooks/pre-commit.sample | 49 +++ .../examples/111.git/hooks/pre-push.sample | 53 +++ .../examples/111.git/hooks/pre-rebase.sample | 169 ++++++++++ .../111.git/hooks/prepare-commit-msg.sample | 36 ++ .../examples/111.git/hooks/update.sample | 128 ++++++++ lib/grack/examples/111.git/info/exclude | 6 + lib/grack/examples/111.git/info/refs | 0 .../61/9289f137abd616d94899f2c9b6726de091ac92 | Bin 0 -> 55 bytes .../ce/013625030ba8dba906f756967f9e9ca394464a | Bin 0 -> 21 bytes .../e1/022324d23146d29075a3e7c6f637cb67f091b5 | 3 + lib/grack/examples/111.git/objects/info/packs | 1 + lib/grack/examples/111.git/refs/heads/master | 1 + lib/grack/examples/dispatch.fcgi | 9 + lib/grack/grack.gemspec | 20 ++ lib/grack/install.txt | 60 ++++ lib/grack/lib/grack.rb | 5 + lib/grack/lib/grack/auth.rb | 37 +++ lib/grack/lib/grack/bundle.rb | 19 ++ lib/grack/lib/grack/git.rb | 72 ++++ lib/grack/lib/grack/server.rb | 308 ++++++++++++++++++ lib/grack/lib/grack/version.rb | 3 + lib/grack/tests/main_test.rb | 264 +++++++++++++++ 37 files changed, 1541 insertions(+) create mode 100644 lib/grack/.travis.yml create mode 100644 lib/grack/CHANGELOG create mode 100644 lib/grack/Gemfile create mode 100644 lib/grack/Gemfile.lock create mode 100644 lib/grack/README.md create mode 100644 lib/grack/Rakefile create mode 100644 lib/grack/bin/console create mode 100644 lib/grack/bin/testserver create mode 100644 lib/grack/examples/111.git/HEAD create mode 100644 lib/grack/examples/111.git/config create mode 100644 lib/grack/examples/111.git/description create mode 100644 lib/grack/examples/111.git/hooks/applypatch-msg.sample create mode 100644 lib/grack/examples/111.git/hooks/commit-msg.sample create mode 100644 lib/grack/examples/111.git/hooks/post-update.sample create mode 100644 lib/grack/examples/111.git/hooks/pre-applypatch.sample create mode 100644 lib/grack/examples/111.git/hooks/pre-commit.sample create mode 100644 lib/grack/examples/111.git/hooks/pre-push.sample create mode 100644 lib/grack/examples/111.git/hooks/pre-rebase.sample create mode 100644 lib/grack/examples/111.git/hooks/prepare-commit-msg.sample create mode 100644 lib/grack/examples/111.git/hooks/update.sample create mode 100644 lib/grack/examples/111.git/info/exclude create mode 100644 lib/grack/examples/111.git/info/refs create mode 100644 lib/grack/examples/111.git/objects/61/9289f137abd616d94899f2c9b6726de091ac92 create mode 100644 lib/grack/examples/111.git/objects/ce/013625030ba8dba906f756967f9e9ca394464a create mode 100644 lib/grack/examples/111.git/objects/e1/022324d23146d29075a3e7c6f637cb67f091b5 create mode 100644 lib/grack/examples/111.git/objects/info/packs create mode 100644 lib/grack/examples/111.git/refs/heads/master create mode 100644 lib/grack/examples/dispatch.fcgi create mode 100644 lib/grack/grack.gemspec create mode 100644 lib/grack/install.txt create mode 100644 lib/grack/lib/grack.rb create mode 100644 lib/grack/lib/grack/auth.rb create mode 100644 lib/grack/lib/grack/bundle.rb create mode 100644 lib/grack/lib/grack/git.rb create mode 100644 lib/grack/lib/grack/server.rb create mode 100644 lib/grack/lib/grack/version.rb create mode 100644 lib/grack/tests/main_test.rb diff --git a/lib/grack/.travis.yml b/lib/grack/.travis.yml new file mode 100644 index 000000000..76e67ac43 --- /dev/null +++ b/lib/grack/.travis.yml @@ -0,0 +1,14 @@ +language: ruby +env: + - TRAVIS=true +branches: + only: + - 'master' +rvm: + - 1.9.3-p327 + - 2.0.0 +before_script: + - "bundle install" + - "git submodule init" + - "git submodule update" +script: "bundle exec rake" diff --git a/lib/grack/CHANGELOG b/lib/grack/CHANGELOG new file mode 100644 index 000000000..057db50e1 --- /dev/null +++ b/lib/grack/CHANGELOG @@ -0,0 +1,16 @@ +2.0.2 + - Revert MR that broke smart HTTP clients. + +2.0.1 + - Make sure child processes get reaped after popen, again. + +2.0.0 + - Use safer shell commands and avoid Dir.chdir + - Restrict the environment for shell commands + - Make Grack::Server thread-safe (zimbatm) + - Make sure child processes get reaped after popen + - Verify requested path is actually a Git directory (Ryan Canty) + + +1.1.0 + - Modifies service_rpc to use chunked transfer (https://github.com/gitlabhq/grack/pull/1) diff --git a/lib/grack/Gemfile b/lib/grack/Gemfile new file mode 100644 index 000000000..b7113caa8 --- /dev/null +++ b/lib/grack/Gemfile @@ -0,0 +1,10 @@ +source "http://ruby.taobao.org" + +gemspec + +group :development do + gem 'byebug' + gem 'rake' + gem 'pry' + gem 'rack-test' +end diff --git a/lib/grack/Gemfile.lock b/lib/grack/Gemfile.lock new file mode 100644 index 000000000..52d60f85d --- /dev/null +++ b/lib/grack/Gemfile.lock @@ -0,0 +1,37 @@ +PATH + remote: . + specs: + gitlab-grack (2.0.2) + rack (~> 1.5.1) + +GEM + remote: http://ruby.taobao.org/ + specs: + byebug (4.0.5) + columnize (= 0.9.0) + coderay (1.1.0) + columnize (0.9.0) + metaclass (0.0.1) + method_source (0.8.2) + mocha (0.14.0) + metaclass (~> 0.0.1) + pry (0.10.1) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) + rake (10.1.0) + slop (3.6.0) + +PLATFORMS + ruby + +DEPENDENCIES + byebug + gitlab-grack! + mocha (~> 0.11) + pry + rack-test + rake diff --git a/lib/grack/README.md b/lib/grack/README.md new file mode 100644 index 000000000..0a1acdaae --- /dev/null +++ b/lib/grack/README.md @@ -0,0 +1,95 @@ +Grack - Ruby/Rack Git Smart-HTTP Server Handler +=============================================== + +[![Build Status](https://travis-ci.org/gitlabhq/grack.png)](https://travis-ci.org/gitlabhq/grack) +[![Code Climate](https://codeclimate.com/github/gitlabhq/grack.png)](https://codeclimate.com/github/gitlabhq/grack) + +This project aims to replace the builtin git-http-backend CGI handler +distributed with C Git with a Rack application. This reason for doing this +is to allow far more webservers to be able to handle Git smart http requests. + +The default git-http-backend only runs as a CGI script, and specifically is +only targeted for Apache 2.x usage (it requires PATH_INFO to be set and +specifically formatted). So, instead of trying to get it to work with +other CGI capable webservers (Lighttpd, etc), we can get it running on nearly +every major and minor webserver out there by making it Rack capable. Rack +applications can run with the following handlers: + +* CGI +* FCGI +* Mongrel (and EventedMongrel and SwiftipliedMongrel) +* WEBrick +* SCGI +* LiteSpeed +* Thin + +These web servers include Rack handlers in their distributions: + +* Ebb +* Fuzed +* Phusion Passenger (which is mod_rack for Apache and for nginx) +* Unicorn +* Puma + +With [Warbler](http://caldersphere.rubyforge.org/warbler/classes/Warbler.html), +and JRuby, we can also generate a WAR file that can be deployed in any Java +web application server (Tomcat, Glassfish, Websphere, JBoss, etc). + +Since the git-http-backend is really just a simple wrapper for the upload-pack +and receive-pack processes with the '--stateless-rpc' option, it does not +actually re-implement very much. + +Dependencies +======================== +* Ruby - http://www.ruby-lang.org +* Rack - http://rack.rubyforge.org +* A Rack-compatible web server +* Git >= 1.7 (currently the 'pu' branch) +* Mocha (only for running the tests) + +Quick Start +======================== + $ gem install rack + $ (edit config.ru to set git project path) + $ rackup --host 127.0.0.1 -p 8080 config.ru + $ git clone http://127.0.0.1:8080/schacon/grit.git + +Contributing +======================== +If you would like to contribute to the Grack project, I prefer to get +pull-requests via GitHub. You should include tests for whatever functionality +you add. Just fork this project, push your changes to your fork and click +the 'pull request' button. To run the tests, you first need to install the +'mocha' mocking library and initialize the submodule. + + $ sudo gem install mocha + $ git submodule init + $ git submodule update + +Then you should be able to run the tests with a 'rake' command. You can also +run coverage tests with 'rake rcov' if you have rcov installed. + +License +======================== + (The MIT License) + + Copyright (c) 2009 Scott Chacon + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/grack/Rakefile b/lib/grack/Rakefile new file mode 100644 index 000000000..255246bf4 --- /dev/null +++ b/lib/grack/Rakefile @@ -0,0 +1,27 @@ +#!/usr/bin/env rake +require "bundler/gem_tasks" + +task :default => :test + +desc "Run the tests." +task :test do + Dir.glob("tests/*_test.rb").each do |f| + system "ruby #{f}" + end +end + +desc "Run test coverage." +task :rcov do + system "rcov tests/*_test.rb -i lib/git_http.rb -x rack -x Library -x tests" + system "open coverage/index.html" +end + +namespace :grack do + desc "Start Grack" + task :start do + system('./bin/testserver') + end +end + +desc "Start everything." +multitask :start => [ 'grack:start' ] diff --git a/lib/grack/bin/console b/lib/grack/bin/console new file mode 100644 index 000000000..b9297ffab --- /dev/null +++ b/lib/grack/bin/console @@ -0,0 +1,6 @@ +#! /bin/bash + +set -e + +cd $(dirname "$0")/.. +exec /usr/bin/env bundle exec pry -Ilib -r grack diff --git a/lib/grack/bin/testserver b/lib/grack/bin/testserver new file mode 100644 index 000000000..3c0db5b3f --- /dev/null +++ b/lib/grack/bin/testserver @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby +libdir = File.absolute_path( File.join( File.dirname(__FILE__), '../lib' ) ) +$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir) + +Bundler.require(:default, :development) + + +require 'grack' +require 'rack' +root = File.absolute_path( File.join( File.dirname(__FILE__), '../examples' ) ) +app = Grack::Server.new({ + project_root: root, + upload_pack: true, + receive_pack:true +}) + +app1= Rack::Builder.new do + use Grack::Auth do |username, password| + [username, password] == ['123', '455'] + end + run app +end + +Rack::Server.start app: app1, Port: 3001 diff --git a/lib/grack/examples/111.git/HEAD b/lib/grack/examples/111.git/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/lib/grack/examples/111.git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/lib/grack/examples/111.git/config b/lib/grack/examples/111.git/config new file mode 100644 index 000000000..e6da23157 --- /dev/null +++ b/lib/grack/examples/111.git/config @@ -0,0 +1,6 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true diff --git a/lib/grack/examples/111.git/description b/lib/grack/examples/111.git/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/lib/grack/examples/111.git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/lib/grack/examples/111.git/hooks/applypatch-msg.sample b/lib/grack/examples/111.git/hooks/applypatch-msg.sample new file mode 100644 index 000000000..8b2a2fe84 --- /dev/null +++ b/lib/grack/examples/111.git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} +: diff --git a/lib/grack/examples/111.git/hooks/commit-msg.sample b/lib/grack/examples/111.git/hooks/commit-msg.sample new file mode 100644 index 000000000..b58d1184a --- /dev/null +++ b/lib/grack/examples/111.git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/lib/grack/examples/111.git/hooks/post-update.sample b/lib/grack/examples/111.git/hooks/post-update.sample new file mode 100644 index 000000000..ec17ec193 --- /dev/null +++ b/lib/grack/examples/111.git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/lib/grack/examples/111.git/hooks/pre-applypatch.sample b/lib/grack/examples/111.git/hooks/pre-applypatch.sample new file mode 100644 index 000000000..b1f187c2e --- /dev/null +++ b/lib/grack/examples/111.git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} +: diff --git a/lib/grack/examples/111.git/hooks/pre-commit.sample b/lib/grack/examples/111.git/hooks/pre-commit.sample new file mode 100644 index 000000000..68d62d544 --- /dev/null +++ b/lib/grack/examples/111.git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/lib/grack/examples/111.git/hooks/pre-push.sample b/lib/grack/examples/111.git/hooks/pre-push.sample new file mode 100644 index 000000000..6187dbf43 --- /dev/null +++ b/lib/grack/examples/111.git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo >&2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/lib/grack/examples/111.git/hooks/pre-rebase.sample b/lib/grack/examples/111.git/hooks/pre-rebase.sample new file mode 100644 index 000000000..9773ed4cb --- /dev/null +++ b/lib/grack/examples/111.git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +exit 0 + +################################################################ + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". diff --git a/lib/grack/examples/111.git/hooks/prepare-commit-msg.sample b/lib/grack/examples/111.git/hooks/prepare-commit-msg.sample new file mode 100644 index 000000000..f093a02ec --- /dev/null +++ b/lib/grack/examples/111.git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/lib/grack/examples/111.git/hooks/update.sample b/lib/grack/examples/111.git/hooks/update.sample new file mode 100644 index 000000000..d84758373 --- /dev/null +++ b/lib/grack/examples/111.git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to blocks unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/lib/grack/examples/111.git/info/exclude b/lib/grack/examples/111.git/info/exclude new file mode 100644 index 000000000..a5196d1be --- /dev/null +++ b/lib/grack/examples/111.git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/lib/grack/examples/111.git/info/refs b/lib/grack/examples/111.git/info/refs new file mode 100644 index 000000000..e69de29bb diff --git a/lib/grack/examples/111.git/objects/61/9289f137abd616d94899f2c9b6726de091ac92 b/lib/grack/examples/111.git/objects/61/9289f137abd616d94899f2c9b6726de091ac92 new file mode 100644 index 0000000000000000000000000000000000000000..38a5c446396f5f3443593ccadeb180a1d23fd1a2 GIT binary patch literal 55 zcmV-70LcG%0V^p=O;s?qU@$Z=Ff%bxC`wIC$xYQOsVHGM$7rU?%)R3FO1AG|)9UBV NSv]o@gg +Yku5JM/0 \ No newline at end of file diff --git a/lib/grack/examples/111.git/objects/info/packs b/lib/grack/examples/111.git/objects/info/packs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/lib/grack/examples/111.git/objects/info/packs @@ -0,0 +1 @@ + diff --git a/lib/grack/examples/111.git/refs/heads/master b/lib/grack/examples/111.git/refs/heads/master new file mode 100644 index 000000000..864350cd1 --- /dev/null +++ b/lib/grack/examples/111.git/refs/heads/master @@ -0,0 +1 @@ +e1022324d23146d29075a3e7c6f637cb67f091b5 diff --git a/lib/grack/examples/dispatch.fcgi b/lib/grack/examples/dispatch.fcgi new file mode 100644 index 000000000..5ca764fba --- /dev/null +++ b/lib/grack/examples/dispatch.fcgi @@ -0,0 +1,9 @@ +#! /usr/bin/env ruby +$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib') +require 'lib/git_http' +config = { + :project_root => "/opt", + :upload_pack => true, + :receive_pack => false, +} +Rack::Handler::FastCGI.run(GitHttp::App.new(config)) \ No newline at end of file diff --git a/lib/grack/grack.gemspec b/lib/grack/grack.gemspec new file mode 100644 index 000000000..e743ce314 --- /dev/null +++ b/lib/grack/grack.gemspec @@ -0,0 +1,20 @@ +# -*- encoding: utf-8 -*- +require File.expand_path('../lib/grack/version', __FILE__) + +Gem::Specification.new do |gem| + gem.authors = ["Scott Chacon"] + gem.email = ["schacon@gmail.com"] + gem.description = %q{Ruby/Rack Git Smart-HTTP Server Handler} + gem.summary = %q{Ruby/Rack Git Smart-HTTP Server Handler} + gem.homepage = "https://github.com/gitlabhq/grack" + + gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } + gem.files = `git ls-files`.split("\n") + gem.test_files = `git ls-files -- tests/*`.split("\n") + gem.name = "grack" + gem.require_paths = ["lib"] + gem.version = Grack::VERSION + + gem.add_dependency("rack", "~> 1.4.5") + gem.add_development_dependency("mocha", "~> 0.11") +end diff --git a/lib/grack/install.txt b/lib/grack/install.txt new file mode 100644 index 000000000..c53e1a3e3 --- /dev/null +++ b/lib/grack/install.txt @@ -0,0 +1,60 @@ +Installation +======================== + +** This documentation is not finished yet. I haven't tested all of +these and it's obviously incomplete - these are currently just notes. + +FastCGI +--------------------------------------- +Here is an example config from lighttpd server: +---- +# main fastcgi entry +$HTTP["url"] =~ "^/myapp/.+$" { + fastcgi.server = ( "/myapp" => + ( "localhost" => + ( "bin-path" => "/var/www/localhost/cgi-bin/dispatch.fcgi", + "docroot" => "/var/www/localhost/htdocs/myapp", + "host" => "127.0.0.1", + "port" => 1026, + "check-local" => "disable" + ) + ) + ) +} # HTTP[url] +---- +You can use the examples/dispatch.fcgi file as your dispatcher. + +(Example Apache setup?) + +Installing in a Java application server +--------------------------------------- +# install Warbler +$ sudo gem install warbler +$ cd gitsmart +$ (edit config.ru) +$ warble +$ cp gitsmart.war /path/to/java/autodeploy/dir + +Unicorn +--------------------------------------- +With Unicorn (http://unicorn.bogomips.org/) you can just run 'unicorn' +in the directory with the config.ru file. + +Thin +--------------------------------------- +thin.yml +--- +pid: /home/deploy/myapp/server/thin.pid +log: /home/deploy/myapp/logs/thin.log +timeout: 30 +port: 7654 +max_conns: 1024 +chdir: /home/deploy/myapp/site_files +rackup: /home/deploy/myapp/server/config.ru +max_persistent_conns: 512 +environment: production +address: 127.0.0.1 +servers: 1 +daemonize: true + + diff --git a/lib/grack/lib/grack.rb b/lib/grack/lib/grack.rb new file mode 100644 index 000000000..2c625d227 --- /dev/null +++ b/lib/grack/lib/grack.rb @@ -0,0 +1,5 @@ +require "grack/bundle" + +module Grack + +end diff --git a/lib/grack/lib/grack/auth.rb b/lib/grack/lib/grack/auth.rb new file mode 100644 index 000000000..6a50cbd56 --- /dev/null +++ b/lib/grack/lib/grack/auth.rb @@ -0,0 +1,37 @@ +require 'rack/auth/basic' +require 'rack/auth/abstract/handler' +require 'rack/auth/abstract/request' + +module Grack + class Auth < Rack::Auth::Basic + def call(env) + @env = env + @request = Rack::Request.new(env) + @auth = Request.new(env) + + if not @auth.provided? + unauthorized + elsif not @auth.basic? + bad_request + else + result = if (access = valid?(@auth) and access == true) + @env['REMOTE_USER'] = @auth.username + @app.call(env) + else + if access == '404' + render_not_found + elsif access == '403' + render_no_access + else + unauthorized + end + end + result + end + end# method call + + # def valid? + # false + # end + end# class Auth +end# module Grack diff --git a/lib/grack/lib/grack/bundle.rb b/lib/grack/lib/grack/bundle.rb new file mode 100644 index 000000000..c6a789a4e --- /dev/null +++ b/lib/grack/lib/grack/bundle.rb @@ -0,0 +1,19 @@ +require 'rack/builder' +require 'grack/auth' +require 'grack/server' + +module Grack + module Bundle + extend self + + def new(config) + Rack::Builder.new do + use Grack::Auth do |username, password| + yield(username, password) + end + run Grack::Server.new(config) + end + end + + end +end diff --git a/lib/grack/lib/grack/git.rb b/lib/grack/lib/grack/git.rb new file mode 100644 index 000000000..84695754a --- /dev/null +++ b/lib/grack/lib/grack/git.rb @@ -0,0 +1,72 @@ +module Grack + class Git + attr_reader :repo + + def initialize(git_path, repo_path) + @git_path = git_path + @repo = repo_path + end + + def update_server_info + execute(%W(update-server-info)) + end + + def command(cmd) + [@git_path || 'git'] + cmd + end + + def capture(cmd) + # _Not_ the same as `IO.popen(...).read` + # By using a block we tell IO.popen to close (wait for) the child process + # after we are done reading its output. + IO.popen(popen_env, cmd, popen_options) { |p| p.read } + end + + def execute(cmd) + cmd = command(cmd) + if block_given? + IO.popen(popen_env, cmd, File::RDWR, popen_options) do |pipe| + yield(pipe) + end + else + capture(cmd).chomp + end + end + + def popen_options + { chdir: repo, unsetenv_others: true } + end + + def popen_env + { 'PATH' => ENV['PATH'], 'GL_ID' => ENV['GL_ID'] } + end + + def config_setting(service_name) + service_name = service_name.gsub('-', '') + setting = config("http.#{service_name}") + + if service_name == 'uploadpack' + setting != 'false' + else + setting == 'true' + end + end + + def config(config_name) + execute(%W(config #{config_name})) + end + + def valid_repo? + return false unless File.exists?(repo) && File.realpath(repo) == repo + + match = execute(%W(rev-parse --git-dir)).match(/\.$|\.git$/) + + if match.to_s == '.git' + # Since the parent could be a git repo, we want to make sure the actual repo contains a git dir. + return false unless Dir.entries(repo).include?('.git') + end + + match + end + end +end diff --git a/lib/grack/lib/grack/server.rb b/lib/grack/lib/grack/server.rb new file mode 100644 index 000000000..59e0bc271 --- /dev/null +++ b/lib/grack/lib/grack/server.rb @@ -0,0 +1,308 @@ +require 'zlib' +require 'rack/request' +require 'rack/response' +require 'rack/utils' +require 'time' + +require 'grack/git' + +module Grack + class Server + attr_reader :git + + SERVICES = [ + ["POST", 'service_rpc', "(.*?)/git-upload-pack$", 'upload-pack'], + ["POST", 'service_rpc', "(.*?)/git-receive-pack$", 'receive-pack'], + + ["GET", 'get_info_refs', "(.*?)/info/refs$"], + ["GET", 'get_text_file', "(.*?)/HEAD$"], + ["GET", 'get_text_file', "(.*?)/objects/info/alternates$"], + ["GET", 'get_text_file', "(.*?)/objects/info/http-alternates$"], + ["GET", 'get_info_packs', "(.*?)/objects/info/packs$"], + ["GET", 'get_text_file', "(.*?)/objects/info/[^/]*$"], + ["GET", 'get_loose_object', "(.*?)/objects/[0-9a-f]{2}/[0-9a-f]{38}$"], + ["GET", 'get_pack_file', "(.*?)/objects/pack/pack-[0-9a-f]{40}\\.pack$"], + ["GET", 'get_idx_file', "(.*?)/objects/pack/pack-[0-9a-f]{40}\\.idx$"], + ] + + def initialize(config = false) + set_config(config) + end + + def set_config(config) + @config = config || {} + end + + def set_config_setting(key, value) + @config[key] = value + end + + def call(env) + dup._call(env) + end + + def _call(env) + @env = env + @req = Rack::Request.new(env) + + cmd, path, @reqfile, @rpc = match_routing + + return render_method_not_allowed if cmd == 'not_allowed' + return render_not_found unless cmd + + @git = get_git(path) + return render_not_found unless git.valid_repo? + + self.method(cmd).call + end + + # --------------------------------- + # actual command handling functions + # --------------------------------- + + # Uses chunked (streaming) transfer, otherwise response + # blocks to calculate Content-Length header + # http://en.wikipedia.org/wiki/Chunked_transfer_encoding + + CRLF = "\r\n" + + def service_rpc + return render_no_access unless has_access?(@rpc, true) + + input = read_body + + @res = Rack::Response.new + @res.status = 200 + @res["Content-Type"] = "application/x-git-%s-result" % @rpc + @res["Transfer-Encoding"] = "chunked" + @res["Cache-Control"] = "no-cache" + + @res.finish do + git.execute([@rpc, '--stateless-rpc', git.repo]) do |pipe| + pipe.write(input) + pipe.close_write + + while block = pipe.read(8192) # 8KB at a time + @res.write encode_chunk(block) # stream it to the client + end + + @res.write terminating_chunk + end + end + end + + def encode_chunk(chunk) + size_in_hex = chunk.size.to_s(16) + [size_in_hex, CRLF, chunk, CRLF].join + end + + def terminating_chunk + [0, CRLF, CRLF].join + end + + def get_info_refs + service_name = get_service_type + return dumb_info_refs unless has_access?(service_name) + + refs = git.execute([service_name, '--stateless-rpc', '--advertise-refs', git.repo]) + + @res = Rack::Response.new + @res.status = 200 + @res["Content-Type"] = "application/x-git-%s-advertisement" % service_name + hdr_nocache + + @res.write(pkt_write("# service=git-#{service_name}\n")) + @res.write(pkt_flush) + @res.write(refs) + + @res.finish + end + + def dumb_info_refs + git.update_server_info + send_file(@reqfile, "text/plain; charset=utf-8") do + hdr_nocache + end + end + + def get_info_packs + # objects/info/packs + send_file(@reqfile, "text/plain; charset=utf-8") do + hdr_nocache + end + end + + def get_loose_object + send_file(@reqfile, "application/x-git-loose-object") do + hdr_cache_forever + end + end + + def get_pack_file + send_file(@reqfile, "application/x-git-packed-objects") do + hdr_cache_forever + end + end + + def get_idx_file + send_file(@reqfile, "application/x-git-packed-objects-toc") do + hdr_cache_forever + end + end + + def get_text_file + send_file(@reqfile, "text/plain") do + hdr_nocache + end + end + + # ------------------------ + # logic helping functions + # ------------------------ + + # some of this borrowed from the Rack::File implementation + def send_file(reqfile, content_type) + reqfile = File.join(git.repo, reqfile) + return render_not_found unless File.exists?(reqfile) + + return render_not_found unless reqfile == File.realpath(reqfile) + + # reqfile looks legit: no path traversal, no leading '|' + + @res = Rack::Response.new + @res.status = 200 + @res["Content-Type"] = content_type + @res["Last-Modified"] = File.mtime(reqfile).httpdate + + yield + + if size = File.size?(reqfile) + @res["Content-Length"] = size.to_s + @res.finish do + File.open(reqfile, "rb") do |file| + while part = file.read(8192) + @res.write part + end + end + end + else + body = [File.read(reqfile)] + size = Rack::Utils.bytesize(body.first) + @res["Content-Length"] = size + @res.write body + @res.finish + end + end + + def get_git(path) + root = @config[:project_root] || Dir.pwd + path = File.join(root, path) + Grack::Git.new(@config[:git_path], path) + end + + def get_service_type + service_type = @req.params['service'] + return false unless service_type + return false if service_type[0, 4] != 'git-' + service_type.gsub('git-', '') + end + + def match_routing + cmd = nil + path = nil + + SERVICES.each do |method, handler, match, rpc| + next unless m = Regexp.new(match).match(@req.path_info) + + return ['not_allowed'] unless method == @req.request_method + + cmd = handler + path = m[1] + file = @req.path_info.sub(path + '/', '') + + return [cmd, path, file, rpc] + end + + nil + end + + def has_access?(rpc, check_content_type = false) + if check_content_type + conten_type = "application/x-git-%s-request" % rpc + return false unless @req.content_type == conten_type + end + + return false unless ['upload-pack', 'receive-pack'].include?(rpc) + + if rpc == 'receive-pack' + return @config[:receive_pack] if @config.include?(:receive_pack) + end + + if rpc == 'upload-pack' + return @config[:upload_pack] if @config.include?(:upload_pack) + end + + git.config_setting(rpc) + end + + def read_body + if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/ + Zlib::GzipReader.new(@req.body).read + else + @req.body.read + end + end + + # -------------------------------------- + # HTTP error response handling functions + # -------------------------------------- + + PLAIN_TYPE = { "Content-Type" => "text/plain" } + + def render_method_not_allowed + if @env['SERVER_PROTOCOL'] == "HTTP/1.1" + [405, PLAIN_TYPE, ["Method Not Allowed"]] + else + [400, PLAIN_TYPE, ["Bad Request"]] + end + end + + def render_not_found + [404, PLAIN_TYPE, ["Not Found"]] + end + + def render_no_access + [403, PLAIN_TYPE, ["Forbidden"]] + end + + + # ------------------------------ + # packet-line handling functions + # ------------------------------ + + def pkt_flush + '0000' + end + + def pkt_write(str) + (str.size + 4).to_s(16).rjust(4, '0') + str + end + + # ------------------------ + # header writing functions + # ------------------------ + + def hdr_nocache + @res["Expires"] = "Fri, 01 Jan 1980 00:00:00 GMT" + @res["Pragma"] = "no-cache" + @res["Cache-Control"] = "no-cache, max-age=0, must-revalidate" + end + + def hdr_cache_forever + now = Time.now().to_i + @res["Date"] = now.to_s + @res["Expires"] = (now + 31536000).to_s; + @res["Cache-Control"] = "public, max-age=31536000"; + end + end +end diff --git a/lib/grack/lib/grack/version.rb b/lib/grack/lib/grack/version.rb new file mode 100644 index 000000000..66a1e1b41 --- /dev/null +++ b/lib/grack/lib/grack/version.rb @@ -0,0 +1,3 @@ +module Grack + VERSION = "2.0.2" +end diff --git a/lib/grack/tests/main_test.rb b/lib/grack/tests/main_test.rb new file mode 100644 index 000000000..cf70296ec --- /dev/null +++ b/lib/grack/tests/main_test.rb @@ -0,0 +1,264 @@ +require 'rack' +require 'rack/test' +require 'test/unit' +require 'mocha' +require 'digest/sha1' + +require_relative '../lib/grack/server.rb' +require_relative '../lib/grack/git.rb' +require 'pp' + +class GitHttpTest < Test::Unit::TestCase + include Rack::Test::Methods + + def example + File.expand_path(File.dirname(__FILE__)) + end + + def app + config = { + :project_root => example, + :upload_pack => true, + :receive_pack => true, + } + Grack::Server.new(config) + end + + def test_upload_pack_advertisement + get "/example/info/refs?service=git-upload-pack" + assert_equal 200, r.status + assert_equal "application/x-git-upload-pack-advertisement", r.headers["Content-Type"] + assert_equal "001e# service=git-upload-pack", r.body.split("\n").first + assert_match 'multi_ack_detailed', r.body + end + + def test_no_access_wrong_content_type_up + post "/example/git-upload-pack" + assert_equal 403, r.status + end + + def test_no_access_wrong_content_type_rp + post "/example/git-receive-pack" + assert_equal 403, r.status + end + + def test_no_access_wrong_method_rcp + get "/example/git-upload-pack" + assert_equal 400, r.status + end + + def test_no_access_wrong_command_rcp + post "/example/git-upload-packfile" + assert_equal 404, r.status + end + + def test_no_access_wrong_path_rcp + Grack::Git.any_instance.stubs(:valid_repo?).returns(false) + post "/example-wrong/git-upload-pack" + assert_equal 404, r.status + end + + def test_upload_pack_rpc + Grack::Git.any_instance.stubs(:valid_repo?).returns(true) + IO.stubs(:popen).returns(MockProcess.new) + post "/example/git-upload-pack", {}, {"CONTENT_TYPE" => "application/x-git-upload-pack-request"} + assert_equal 200, r.status + assert_equal "application/x-git-upload-pack-result", r.headers["Content-Type"] + end + + def test_receive_pack_advertisement + get "/example/info/refs?service=git-receive-pack" + assert_equal 200, r.status + assert_equal "application/x-git-receive-pack-advertisement", r.headers["Content-Type"] + assert_equal "001f# service=git-receive-pack", r.body.split("\n").first + assert_match 'report-status', r.body + assert_match 'delete-refs', r.body + assert_match 'ofs-delta', r.body + end + + def test_recieve_pack_rpc + Grack::Git.any_instance.stubs(:valid_repo?).returns(true) + IO.stubs(:popen).yields(MockProcess.new) + post "/example/git-receive-pack", {}, {"CONTENT_TYPE" => "application/x-git-receive-pack-request"} + assert_equal 200, r.status + assert_equal "application/x-git-receive-pack-result", r.headers["Content-Type"] + end + + def test_info_refs_dumb + get "/example/.git/info/refs" + assert_equal 200, r.status + end + + def test_info_packs + get "/example/.git/objects/info/packs" + assert_equal 200, r.status + assert_match /P pack-(.*?).pack/, r.body + end + + def test_loose_objects + path, content = write_test_objects + get "/example/.git/objects/#{path}" + assert_equal 200, r.status + assert_equal content, r.body + remove_test_objects + end + + def test_pack_file + path, content = write_test_objects + get "/example/.git/objects/pack/pack-#{content}.pack" + assert_equal 200, r.status + assert_equal content, r.body + remove_test_objects + end + + def test_index_file + path, content = write_test_objects + get "/example/.git/objects/pack/pack-#{content}.idx" + assert_equal 200, r.status + assert_equal content, r.body + remove_test_objects + end + + def test_text_file + get "/example/.git/HEAD" + assert_equal 200, r.status + assert_equal 41, r.body.size # submodules have detached head + end + + def test_no_size_avail + File.stubs('size?').returns(false) + get "/example/.git/HEAD" + assert_equal 200, r.status + assert_equal 46, r.body.size # submodules have detached head + end + + def test_config_upload_pack_off + a1 = app + a1.set_config_setting(:upload_pack, false) + session = Rack::Test::Session.new(a1) + session.get "/example/info/refs?service=git-upload-pack" + assert_equal 404, session.last_response.status + end + + def test_config_receive_pack_off + a1 = app + a1.set_config_setting(:receive_pack, false) + session = Rack::Test::Session.new(a1) + session.get "/example/info/refs?service=git-receive-pack" + assert_equal 404, session.last_response.status + end + + def test_config_bad_service + get "/example/info/refs?service=git-receive-packfile" + assert_equal 404, r.status + end + + def test_git_config_receive_pack + app1 = Grack::Server.new({:project_root => example}) + app1.instance_variable_set(:@git, Grack::Git.new('git', example )) + session = Rack::Test::Session.new(app1) + git = Grack::Git + git.any_instance.stubs(:config).with('http.receivepack').returns('') + session.get "/example/info/refs?service=git-receive-pack" + assert_equal 404, session.last_response.status + + git.any_instance.stubs(:config).with('http.receivepack').returns('true') + session.get "/example/info/refs?service=git-receive-pack" + assert_equal 200, session.last_response.status + + git.any_instance.stubs(:config).with('http.receivepack').returns('false') + session.get "/example/info/refs?service=git-receive-pack" + assert_equal 404, session.last_response.status + end + + def test_git_config_upload_pack + app1 = Grack::Server.new({:project_root => example}) + # app1.instance_variable_set(:@git, Grack::Git.new('git', example )) + session = Rack::Test::Session.new(app1) + git = Grack::Git + git.any_instance.stubs(:config).with('http.uploadpack').returns('') + session.get "/example/info/refs?service=git-upload-pack" + assert_equal 200, session.last_response.status + + git.any_instance.stubs(:config).with('http.uploadpack').returns('true') + session.get "/example/info/refs?service=git-upload-pack" + assert_equal 200, session.last_response.status + + git.any_instance.stubs(:config).with('http.uploadpack').returns('false') + session.get "/example/info/refs?service=git-upload-pack" + assert_equal 404, session.last_response.status + end + + def test_send_file + app1 = app + app1.instance_variable_set(:@git, Grack::Git.new('git', Dir.pwd)) + # Reject path traversal + assert_equal 404, app1.send_file('tests/../tests', 'text/plain').first + # Reject paths starting with '|', avoid File.read('|touch /tmp/pawned; ls /tmp') + assert_equal 404, app1.send_file('|tests', 'text/plain').first + end + + def test_get_git + # Guard against non-existent directories + git1 = Grack::Git.new('git', 'foobar') + assert_equal false, git1.valid_repo? + # Guard against path traversal + git2 = Grack::Git.new('git', '/../tests') + assert_equal false, git2.valid_repo? + end + + private + + def r + last_response + end + + def write_test_objects + content = Digest::SHA1.hexdigest('gitrocks') + base = File.join(File.expand_path(File.dirname(__FILE__)), 'example', '.git', 'objects') + obj = File.join(base, '20') + Dir.mkdir(obj) rescue nil + file = File.join(obj, content[0, 38]) + File.open(file, 'w') { |f| f.write(content) } + pack = File.join(base, 'pack', "pack-#{content}.pack") + File.open(pack, 'w') { |f| f.write(content) } + idx = File.join(base, 'pack', "pack-#{content}.idx") + File.open(idx, 'w') { |f| f.write(content) } + ["20/#{content[0,38]}", content] + end + + def remove_test_objects + content = Digest::SHA1.hexdigest('gitrocks') + base = File.join(File.expand_path(File.dirname(__FILE__)), 'example', '.git', 'objects') + obj = File.join(base, '20') + file = File.join(obj, content[0, 38]) + pack = File.join(base, 'pack', "pack-#{content}.pack") + idx = File.join(base, 'pack', "pack-#{content}.idx") + File.unlink(file) + File.unlink(pack) + File.unlink(idx) + end + +end + +class MockProcess + def initialize + @counter = 0 + end + + def write(data) + end + + def read(data = nil) + '' + end + + def eof? + @counter += 1 + @counter > 1 ? true : false + end + + def close_write + true + end +end From 88491e7e2a7c13444b30334fca7ce61c747be168 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 1 Jul 2015 22:58:46 +0800 Subject: [PATCH 03/55] =?UTF-8?q?=E6=B8=85=E9=99=A4=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/grack | 1 - 1 file changed, 1 deletion(-) delete mode 160000 lib/grack diff --git a/lib/grack b/lib/grack deleted file mode 160000 index 949be9116..000000000 --- a/lib/grack +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 949be9116a76b50a6f86baf507dec4c4d7fb34c6 From 8da9805bccbf572704790e475a12bc5e7c3a4899 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Thu, 2 Jul 2015 20:10:52 +0800 Subject: [PATCH 04/55] =?UTF-8?q?=E5=85=BC=E5=AE=B9ruby=201.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/grack/lib/grack/git.rb | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/grack/lib/grack/git.rb b/lib/grack/lib/grack/git.rb index 84695754a..cf5362c20 100644 --- a/lib/grack/lib/grack/git.rb +++ b/lib/grack/lib/grack/git.rb @@ -19,14 +19,25 @@ module Grack # _Not_ the same as `IO.popen(...).read` # By using a block we tell IO.popen to close (wait for) the child process # after we are done reading its output. - IO.popen(popen_env, cmd, popen_options) { |p| p.read } + if RUBY_VERSION.start_with?("2") + IO.popen(popen_env, cmd, popen_options) { |p| p.read } + else + IO.popen(cmd, popen_options) { |p| p.read } + end end def execute(cmd) cmd = command(cmd) if block_given? - IO.popen(popen_env, cmd, File::RDWR, popen_options) do |pipe| - yield(pipe) + + if RUBY_VERSION.start_with?("2") + IO.popen(popen_env, cmd, File::RDWR, popen_options) do |pipe| + yield(pipe) + end + else + IO.popen(cmd, File::RDWR, popen_options) do |pipe| + yield(pipe) + end end else capture(cmd).chomp @@ -61,9 +72,11 @@ module Grack match = execute(%W(rev-parse --git-dir)).match(/\.$|\.git$/) - if match.to_s == '.git' - # Since the parent could be a git repo, we want to make sure the actual repo contains a git dir. - return false unless Dir.entries(repo).include?('.git') + if RUBY_VERSION.start_with?("2") + if match.to_s == '.git' + # Since the parent could be a git repo, we want to make sure the actual repo contains a git dir. + return false unless Dir.entries(repo).include?('.git') + end end match From b762ae6bdd16f2efd83dbc0d5f44058b677e255a Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 4 Jul 2015 22:29:25 +0800 Subject: [PATCH 05/55] =?UTF-8?q?=E6=8A=A5=E5=91=8A=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E5=85=8B=E9=9A=86=EF=BC=8C=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=8C=E5=85=B6=E4=BB=96=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=85=8B=E9=9A=86=E5=92=8C=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 12 ++-- app/helpers/repositories_helper.rb | 2 +- .../settings/_new_repositories.html.erb | 16 +---- app/views/repositories/show.html.erb | 15 ++-- config/configuration.yml | 2 +- lib/grack/lib/grack/server.rb | 6 +- lib/trustie/grack/auth.rb | 72 +++++++++++++++---- 7 files changed, 80 insertions(+), 45 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 607c9b5db..e73f19143 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -127,19 +127,18 @@ update end else # 原逻辑 ##xianbo + params[:repository_scm] = "Git" @root_path=RepositoriesHelper::ROOT_PATH @repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git" @project_path=@root_path+"htdocs/"+@repository_name - @repository_tag=params[:repository][:upassword] || params[:repository][:password] + @repository_tag=params[:repository][:upassword] || params[:repository][:password] || '1234' @repo_name=User.current.login.to_s+"_"+params[:repository][:identifier] logger.info "htpasswd -mb "+@root_path+"htdocs/user.passwd "+@repo_name+": "+@repository_tag logger.info "the value of create repository"+@root_path+": "+@repository_name+": "+@project_path+": "+@repo_name attrs = pickup_extra_info - if((@repository_tag!="")&¶ms[:repository_scm]=="Git") - params[:repository][:url]=@project_path - end + params[:repository][:url]=@project_path ###xianbo - @repository = Repository.factory(params[:repository_scm]) + @repository = Repository.factory(params[:repository_scm]||"Git") @repository.safe_attributes = params[:repository] if attrs[:attrs_extra].keys.any? @repository.merge_extra_info(attrs[:attrs_extra]) @@ -270,7 +269,8 @@ update @course_tag = params[:course] project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT ip = RepositoriesHelper::REPO_IP_ADDRESS - @repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s+ + # @repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s+ + @repos_url = "http://#{Setting.host_name}/#{@repository.login.to_s}/#{@repository.identifier.to_s}.git" @repository.url.slice(project_path_cut, @repository.url.length).to_s if @course_tag == 1 render :action => 'show', :layout => 'base_courses' diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 5cbc3af5a..718085f24 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -19,7 +19,7 @@ module RepositoriesHelper if Rails.env.development? - ROOT_PATH="/tmp/" if Rails.env.development? + ROOT_PATH="/private/tmp/" else ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/" end diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index ca771a487..b626b4089 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -62,15 +62,6 @@ <%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post"} do |f| %>
    -
  • - - <%= select_tag('repository_scm', - options_for_select(["Git"],@repository.class.name.demodulize), - :data => {:remote => true, :method => 'get'})%> - <% if @repository && ! @repository.class.scm_available %> - <%= l(:text_scm_command_not_available) %> - <% end %> -
  • <% unless judge_main_repository(@project) %>
  • @@ -84,14 +75,9 @@ <%=l(:text_length_between,:min=>1,:max=>254)< <% end %>
  • -
  • - - <%= f.password_field :upassword, :label=> "", :no_label => true %> - <%= l(:label_upassword_info)%> -
<%=l(:button_save)%> <%=l(:button_cancel)%>
-<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 474ac638f..5f279f2c2 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -33,8 +33,9 @@

+

git 克隆和提交的用户名和密码为登录用户名和密码

项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。

-

通过cmd命令提示符进入代码对应文件夹的根目录,假设当前用户的登录名为user,版本库名称为demo,需要操作的版本库分支为branch。 +

通过cmd命令提示符进入代码对应文件夹的根目录, 如果是首次提交代码,执行如下命令:

@@ -45,19 +46,19 @@

git commit -m "first commit"

git remote add origin - http://user_demo@repository.trustie.net/user/demo.git + <%= @repos_url %>

git config http.postBuffer 524288000 #设置本地post缓存为500MB

-

git push -u origin branch:branch

+

git push -u origin master

已经有本地库,还没有配置远程地址,打开命令行执行如下:

-

git remote add origin http://user_demo@repository.trustie.net/user/demo.git

+

git remote add origin <%= @repos_url %>

git add .

@@ -65,14 +66,14 @@

git config http.postBuffer 524288000 #设置本地post缓存为500MB

-

git push -u origin branch:branch

+

git push -u origin master

已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:

-

git clone http://user_demo@repository.trustie.net/user/demo.git

+

git clone <%= @repos_url %>

git push

@@ -86,7 +87,7 @@

git remote add trustie - http://user_demo@repository.trustie.net/user/demo.git + <%= @repos_url %>

git add .

diff --git a/config/configuration.yml b/config/configuration.yml index 4c786ad28..ef204a31e 100644 --- a/config/configuration.yml +++ b/config/configuration.yml @@ -197,7 +197,7 @@ default: #max_concurrent_ajax_uploads: 2 #pic_types: "bmp,jpeg,jpg,png,gif" - repository_root_path: '/Users/guange/repository' + repository_root_path: '/tmp/htdocs' # specific configuration options for production environment # that overrides the default ones diff --git a/lib/grack/lib/grack/server.rb b/lib/grack/lib/grack/server.rb index 59e0bc271..6b4fe8801 100644 --- a/lib/grack/lib/grack/server.rb +++ b/lib/grack/lib/grack/server.rb @@ -50,7 +50,7 @@ module Grack return render_method_not_allowed if cmd == 'not_allowed' return render_not_found unless cmd - @git = get_git(path) + @git = get_git(env["REP_PATH"] || path) return render_not_found unless git.valid_repo? self.method(cmd).call @@ -195,8 +195,8 @@ module Grack end def get_git(path) - root = @config[:project_root] || Dir.pwd - path = File.join(root, path) + # root = @config[:project_root] || Dir.pwd + # path = File.join(root, path) Grack::Git.new(@config[:git_path], path) end diff --git a/lib/trustie/grack/auth.rb b/lib/trustie/grack/auth.rb index c27477be2..5464b18ca 100644 --- a/lib/trustie/grack/auth.rb +++ b/lib/trustie/grack/auth.rb @@ -1,9 +1,16 @@ +#coding=utf-8 +# require 'rack/auth/basic' require 'rack/auth/abstract/handler' require 'rack/auth/abstract/request' module Grack + class Auth < Rack::Auth::Basic + DOWNLOAD_COMMANDS = %w{ git-upload-pack git-upload-archive } + PUSH_COMMANDS = %w{ git-receive-pack } + + attr_accessor :user, :repository def call(env) @env = env @request = Rack::Request.new(env) @@ -16,6 +23,7 @@ module Grack else result = if (access = valid?(@auth) and access == true) @env['REMOTE_USER'] = @auth.username + env['REP_PATH'] = repository.root_url @app.call(env) else if access == '404' @@ -37,19 +45,59 @@ module Grack end def valid?(auth) - match = @request.path_info.match(/(\/.+\.git)\//) - if match - rep = Repository.where("root_url like ?", "%#{match[1]}") - return "404" if rep.empty? - username, password = auth.credentials - user, last_login_on = User.try_to_login(username, password) - return '403' unless user - if user.member_of?(rep.first.project) || user.admin? - return true - end - end - false + self.repository = auth_rep + return "404" unless repository + username, password = auth.credentials + self.user = auth_user(username, password) + return '403' unless user + access = auth_request + puts "access #{access}" + access end + + def auth_rep + rep = nil + match = @request.path_info.match(/(\/.+\.git)\//) + if match + rep = Repository.where("root_url like ?", "%#{match[1]}").first + end + rep + end + + def auth_user(username, password) + u, last_login_on = User.try_to_login(username, password) + unless u && (u.member_of?(repository.project) || u.admin?) + u = nil + end + u + end + + def auth_request + case git_cmd + when *DOWNLOAD_COMMANDS + user != nil + when *PUSH_COMMANDS + unless user + false + else + ### 只有Manager和Development才有push权限 + repository.project.members.where(user_id: user.id).first.roles.any?{|r| r.name == 'Manager' || r.name == 'Developer'} + end + else + false + end + end + + def git_cmd + if @request.get? + @request.params['service'] + elsif @request.post? + File.basename(@request.path) + else + nil + end + end + end# class Auth end# module Grack From b27944fad7dcfd32f76d8d8e4b9438cfb861eb43 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 18 Aug 2015 10:59:31 +0800 Subject: [PATCH 06/55] =?UTF-8?q?=E5=A2=9E=E5=8A=A0css=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E9=9D=99?= =?UTF-8?q?=E6=80=81=E9=A1=B5=E9=9D=A2=E3=80=81=E7=BC=BA=E5=A4=B1=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/new_base_user.html.erb | 307 + public/images/arrowList.png | Bin 0 -> 518 bytes public/images/homepage_icon.png | Bin 0 -> 5479 bytes public/stylesheets/bootstrap.css | 6800 ++++++++++++++++++++++ public/stylesheets/new_public.css | 634 ++ public/stylesheets/user_leftside.css | 68 + 6 files changed, 7809 insertions(+) create mode 100644 app/views/layouts/new_base_user.html.erb create mode 100644 public/images/arrowList.png create mode 100644 public/images/homepage_icon.png create mode 100644 public/stylesheets/bootstrap.css create mode 100644 public/stylesheets/new_public.css create mode 100644 public/stylesheets/user_leftside.css diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb new file mode 100644 index 000000000..6b4550721 --- /dev/null +++ b/app/views/layouts/new_base_user.html.erb @@ -0,0 +1,307 @@ + + + + + 课程主页 + + + + + + + + + +
+
+
+
+
Image +
+ +
+
+
jacknudt
+
+
+
+
+
+

这位童鞋很懒,什么也没有留下~! 

+
+
+
+
+ +
关注
+
+
+
+ +
粉丝
+
+
+
+ +
积分
+
+
+
+
+ + +
+
+
+
+
最新动态
+ +
+
+
用户头像
+
+ +
ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(作业名称)
+
+ +
截止时间:2015-08-20
+
+
(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
+
+
+
+
+
+
+
回复(5)
+
2015-07-31
+
点击展开更多回复
+
+
+ +
+
+
表情
+
取消
+
发送
+
+
+
+
用户头像
+
+ +
请大家说下软件工程是什么!
+
+
+
+
+
用户头像
+
+ +
软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
+
+ +
+
+
表情
+
取消
+
发送
+
+
+
+
+
+
+
用户头像
+
+ +
回答非常好!
+
+
+
+
+
+
+
+
用户头像
+
+ +
假期开心吗?(讨论区内容)
+
+
时间:2015-08-20
+
+
+
+
+
+
+
+
回复(5)
+
2015-07-31
+
点击展开更多回复
+
+
+ +
+
+
表情
+
取消
+
发送
+
+
+
+
用户头像
+
+ +
很开心!
+
+
+
+
+
用户头像
+
+ +
假期好热,没出去。
+
+
+
+
+
+
+
+
用户头像
+
+ +
上传资源未显示在项目动态中(缺陷标题)正常
+
+
指派给  苏稳
+
时间:2015-08-20
+
+
(缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
+
文件附件.zip(123KB)
+
图片附件.png(123KB)
+
+
+
+
+
+
+
回复(5)
+
2015-07-31
+
点击展开更多回复
+
+
+ +
+
+
表情
+
取消
+
发送
+
+
+
+
用户头像
+
+ +
请大家说下软件工程是什么!
+
+
+
+
+
用户头像
+
+ +
软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
+
+
+
+
+
用户头像
+
+ +
回答非常好!
+
+
+
+
+
+
+
+
+ + diff --git a/public/images/arrowList.png b/public/images/arrowList.png new file mode 100644 index 0000000000000000000000000000000000000000..99dcfc0f572cacd8984e7155be7e9e5cc4e4a5ca GIT binary patch literal 518 zcmeAS@N?(olHy`uVBq!ia0vp^sX$!8!3HE>o7i*#Db50q$YKTtZeb8+WSBKa0w}1E z>=ES4z)+>iz|hdl!0_`wkbcR)P-?)y@G60U!DPH`dQ==QbYZR0jzS=0gsVi#Oj?yFSff0S`xz+0He=P=y+8 z3}6i!O-!yZ%^FfGYn?Yl{I@nUnW=gD`@UUwKi+S>eckHs3cuCy{B{4MYImEb${dT{ zGx=5V*Im0-os+wJe8HMaKku%wtornj>8SQbkP}c$Y(jRLl1B8KJ-Zr>{M4@&mPW)n zMecw6D!87%JiKuFdJ&w0uC%*S!fT8wEzE^83O(|&G1-YYzX8sc)I$ztaD0e0swTs!L9%R literal 0 HcmV?d00001 diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ad293b7ca465bc1ac958248acdd2df53b8e435d0 GIT binary patch literal 5479 zcmaJ_2Ut^C(+<6}A}XQ~BS;kj1PCM$q$40jIx8ZPgd&mz2rWnpO^_l@qza-)uS*j| zib(I$d+(qUVX6K>*WK@bo^QYV+-L5&b7$T&=gfQOP7?H6ULx z004y%JuP|E+{F+`zHs8z%`@3FQ)wM>9h?f< z&i*FB8Er_=HL@l+Si?{}Hxxkf9&j>%BN~qcc{o1AxWGLSJU?*Zx>3TgC#|+#U&&_P$*bJN*W545CK8NB_Lwrt2m>Pc&xJ#7W?qmF6!H1 z@mLo-EDoe%2n7k6+G9{ycNd`__BuLnO^gd3iLpj&sv>yE2w;1A6kH0X29uUmm6ei~ zQjw5QlZHvc)YYI$>T0smFo?90>MvhathK8n8iW7ki~7eG_OHIDRB*(RXI4c!+qdsh4(2pg1D}JRl?BT@H=jrK6>gg;`+CfU0tpE)qeItOVEPqp9->Gw)^m)u3&BQ>z~IyYOi1Td=v)BhRp~Pd4I?bBXo1j{`kob)tgDA zwH2(GxA=AOmtrxI(Y#f8nWo$(Xj4|xRLm3GuI-+&%Dya}_hYwj6?M?MXdSk8{m7F=Ug{by4u`*qo>++$u}qG zYK;m#@0-K?Tcn$j+81XoBZnIl{O%%Sm+8!yJSL#ZlId-~9chht6+5UH%RQvX7kdcX zfckSdT#?}+CRoyV@iI%@RvWo_kd)zK#qoq{R8f*}e)6Spuxl{7MN)QO=bR@TPD0q$ z&cF_F9zwx9JNirW9`%FnE53yq57iCLsX{1}+HN!stu|N`AEe(}^r%O}NHkg7(4F>= zjJoh{OM)d^-qF~%!*v%eA^Qt@)UR0r+w68?6@6{`2#VuuQ7xg7>+K1Bz0ral8>UPB z!^c<0Hg3IO%@56Jjr{_RH)(5pUA2?P_BFKT9;;Vuw(jM0(#M9&D$(|WE^eL;p{U#D zCx7D5V6?fbLE?JM@%_)8w+3!lJwe_Fbj8}v zqOp@L`EKsSScJ0!F{!!W(nM6gvpY1tONE4f(Lgwxf#7VKv+Siyhm*g!a@ldsAu)@+*iLqS^9Q7uGE&;HNX4*FT z1d5y5I3Rt3gvq@+jV%2tH^6W>j#F05m2tvn@|qSG`)Khm{)H2S%nn>yil+}UB(IWLp2(pG|^LsM2i_ke#@Bf59q zVBP6#3D2`Pl)Lp{s?XM>s!zg8I8Mq4;4*7b?3t(MDHi08t0`D(zM&ZsN>r_`zT=F1 zQJixt0A~3TyRI*E=1`WHNgv7c|76(AspeE_F`@b9qi!Wa)b6LYj)!|i0TBldCSC^~ z7Uucvil}_{N-r)@o1|YGv<*kQ_qWdt0ZAr!BB2 zCrZ=_Jh(ar9a|5#&e~zWq2g^y?1}#oZt>ClTKLX}PtFU9qA!nIYCXr*`B0R)LH^=< z{`~0POHt1`8Io>({j(^AAL}_KgpS~UHWQQ2qB5LJ6$S2?f$3coUyiV!@p3h}$?A{a zM$`?z4v((-Qa8*1PMo6E`@%JS=dQd)c@k2}y-sMDm6X3#r6v0QAYkBY)X`Vzp8k#d z)ALh6b)vb=n@1s!I2!o0>4tX&cPcEKx}?Xgz1BFXBKk9p3oHee(|GTox+>Y)%Oz`B z(e1TcWyA*R1QGA@{o#*aCN3oFt-c5QerEF>S9{lCMGMj-OoH{Ymps|q>v;8dlVkX~ zjQKTB77M~=)gq3$O`s&!6pORVGg1G6D{cESGHqw4}tHilM6y-FVXVc@ISH93#b<&N6X>r+aSC3dvB45V@IHTkH%it zXPt+;E&9C+Nn_H!istvzMe3e-Ta+GDVcksYKi7SF{>a^I^!5SF`dW4EAYEyGkdH&r z+gIP^d3WlFTaa9-XHD?Jt(A97mvElgBwUa`DB|DvPbP2o0gZe|p z-X6!jNDt4@yPQOALnpW*?p(udYK2F!o&b-d} z*Z_hQ?0oOV{Er1Q*`)P(!P8<%?zaAx|E+Ke>!M2-V>0LF=9rw!m}+EKVm5}}U6qqN zR27+S2?>g!(s5g8&kQSYENxY3?yDU+;RU4KiqcLS3-sq-JGZ!J1r{Ty)Z@B!L_p5KQ!E4wW~h`!Z%Io=VLoDlyr6xxTgr*SLbmc z0AKH15J@Xkl-S)+{vBoYefKPDJl9b>`^xeGyw9k;4&zyFW9kR9dj~p0QFL9GX5`|? z3^P8`Ax>4nT~{tOsb!M-&IRT!O1=Js)klfhldQh?LJeoS1H3O>jk36LL!|-6J&cYr zoT1h#qxW1msAHxvoimBLBhm#rDCJ6S(2m6LbFin>$Yb6@rYW|lUPUVPF6=ORdtXY{ zTCRslN7Wc5%H2+0>;BUa{c-aF{dm?J202Ldr7Ws%l<}KS*R0{i!_hTV1Rs8#IYpLD zTEs){SIbyAqa`in`^PiA?(u8eE=v`x@`VW2{jvGTl?9bz{+P)10?GJGwezU-($tIe zWQ&Id2DOgQ6^gQ>CP`wd*MNJLv|g#q`j=#3y-r6JthIS%X}C%?_Wi<_XL+V5^bEhK z3nTve>izuooyuQ*_0R75@2vl10A$fFB{s<+?7&XQb+6q#5-;8l8WVoo%)_LRA7i zoY9S)>^2Sq{-~3f&H3yVV>2^BtOM)Dj*pCtOr~3hgrpU+%y1eQf`)!I$vAT|WxFvRVd8p;N&2{y=R)(7Y zt@&0Xm-JKpKjmEm7nf{Y*s{aO#I*P=s>y283I?yHueh*lfx%!T@?<5#4!_7N#=2*; zGkxqSZTl+vP-F)2@qrtKEFd^FO)k_pRT=jg>WTf9IyO)XFnT2xPrck+zA5|1 zu;;e&s7?OXC(ns9W;BS;BM2lkaotth&ukY0iZBL z;beS?AlSpSP|&gFwoHBG3tf#Tl~Cr5yKQ{7dfBi!*pjDgalKT?MNQvanDj_CV`l18 z%N-SF)v+f*g6yp|Vb65~_y@99mF$PFQKp2SLEqcMA*AV#O1Pfi6Zt?wR)Hl$vUPKk zGukHz++1r_fZ;J1qplu>&8km_t-ooPP51JE=Zg~EEA$08KM2*Oz%V`Unxocefem;m zyS8N+Uee>1t&s6j%rLH*Pt4)nKCf(0ON^=dTxoYrKiId^olXi+^xE*9_MKu>wC6dF z#Q7Li-Wa~7_((lEsi)71TZrm$YVZQS3_jh(w^!b5S4P~IR)1Y2vTV%T>A;8oG!p2a zdH*2Vw338`s2$u9^r#wQp=&!dDK*i}Ub)(SP;iS*nZ+zEgheUMfaoGnTP=HZmAV$_ ztS4#UseVE0SZWrCcz(#~r^XThOd#~c&fq;u6f;|1m#jGb=dZV)<6i{&@zTtl8!)sC z3JS7BZ&74(&rid$JL#;Rm9-nrJAF}PA2fKhe^0An5Zp377x~FZI-bH@Mo@M1!`Frj zGJd>|C0pky#hdPCT5LE4eo)v7H+@dCgHd~Brye!uBI#}Sv zPRG1c21zi3k2TG2;PcmZglvf&Pn~>}aY|gDP2JXEI}7;UcOJnII^jOQPT@C~4H?n~ zM!OO@T^pLymj0wpdD(KCBun5@i^^=DcbxsuveR!A?h=#rvgPMXl$vw!9zX@Sd|Si2 U3+LH)`q!tXnyzZ0vK8_F036ryaR2}S literal 0 HcmV?d00001 diff --git a/public/stylesheets/bootstrap.css b/public/stylesheets/bootstrap.css new file mode 100644 index 000000000..680e76878 --- /dev/null +++ b/public/stylesheets/bootstrap.css @@ -0,0 +1,6800 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -.5em; +} +sub { + bottom: -.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} +legend { + padding: 0; + border: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +td, +th { + padding: 0; +} +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + .navbar { + display: none; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table td, + .table th { + background-color: #fff !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); +} +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.glyphicon-asterisk:before { + content: "\2a"; +} +.glyphicon-plus:before { + content: "\2b"; +} +.glyphicon-euro:before, +.glyphicon-eur:before { + content: "\20ac"; +} +.glyphicon-minus:before { + content: "\2212"; +} +.glyphicon-cloud:before { + content: "\2601"; +} +.glyphicon-envelope:before { + content: "\2709"; +} +.glyphicon-pencil:before { + content: "\270f"; +} +.glyphicon-glass:before { + content: "\e001"; +} +.glyphicon-music:before { + content: "\e002"; +} +.glyphicon-search:before { + content: "\e003"; +} +.glyphicon-heart:before { + content: "\e005"; +} +.glyphicon-star:before { + content: "\e006"; +} +.glyphicon-star-empty:before { + content: "\e007"; +} +.glyphicon-user:before { + content: "\e008"; +} +.glyphicon-film:before { + content: "\e009"; +} +.glyphicon-th-large:before { + content: "\e010"; +} +.glyphicon-th:before { + content: "\e011"; +} +.glyphicon-th-list:before { + content: "\e012"; +} +.glyphicon-ok:before { + content: "\e013"; +} +.glyphicon-remove:before { + content: "\e014"; +} +.glyphicon-zoom-in:before { + content: "\e015"; +} +.glyphicon-zoom-out:before { + content: "\e016"; +} +.glyphicon-off:before { + content: "\e017"; +} +.glyphicon-signal:before { + content: "\e018"; +} +.glyphicon-cog:before { + content: "\e019"; +} +.glyphicon-trash:before { + content: "\e020"; +} +.glyphicon-home:before { + content: "\e021"; +} +.glyphicon-file:before { + content: "\e022"; +} +.glyphicon-time:before { + content: "\e023"; +} +.glyphicon-road:before { + content: "\e024"; +} +.glyphicon-download-alt:before { + content: "\e025"; +} +.glyphicon-download:before { + content: "\e026"; +} +.glyphicon-upload:before { + content: "\e027"; +} +.glyphicon-inbox:before { + content: "\e028"; +} +.glyphicon-play-circle:before { + content: "\e029"; +} +.glyphicon-repeat:before { + content: "\e030"; +} +.glyphicon-refresh:before { + content: "\e031"; +} +.glyphicon-list-alt:before { + content: "\e032"; +} +.glyphicon-lock:before { + content: "\e033"; +} +.glyphicon-flag:before { + content: "\e034"; +} +.glyphicon-headphones:before { + content: "\e035"; +} +.glyphicon-volume-off:before { + content: "\e036"; +} +.glyphicon-volume-down:before { + content: "\e037"; +} +.glyphicon-volume-up:before { + content: "\e038"; +} +.glyphicon-qrcode:before { + content: "\e039"; +} +.glyphicon-barcode:before { + content: "\e040"; +} +.glyphicon-tag:before { + content: "\e041"; +} +.glyphicon-tags:before { + content: "\e042"; +} +.glyphicon-book:before { + content: "\e043"; +} +.glyphicon-bookmark:before { + content: "\e044"; +} +.glyphicon-print:before { + content: "\e045"; +} +.glyphicon-camera:before { + content: "\e046"; +} +.glyphicon-font:before { + content: "\e047"; +} +.glyphicon-bold:before { + content: "\e048"; +} +.glyphicon-italic:before { + content: "\e049"; +} +.glyphicon-text-height:before { + content: "\e050"; +} +.glyphicon-text-width:before { + content: "\e051"; +} +.glyphicon-align-left:before { + content: "\e052"; +} +.glyphicon-align-center:before { + content: "\e053"; +} +.glyphicon-align-right:before { + content: "\e054"; +} +.glyphicon-align-justify:before { + content: "\e055"; +} +.glyphicon-list:before { + content: "\e056"; +} +.glyphicon-indent-left:before { + content: "\e057"; +} +.glyphicon-indent-right:before { + content: "\e058"; +} +.glyphicon-facetime-video:before { + content: "\e059"; +} +.glyphicon-picture:before { + content: "\e060"; +} +.glyphicon-map-marker:before { + content: "\e062"; +} +.glyphicon-adjust:before { + content: "\e063"; +} +.glyphicon-tint:before { + content: "\e064"; +} +.glyphicon-edit:before { + content: "\e065"; +} +.glyphicon-share:before { + content: "\e066"; +} +.glyphicon-check:before { + content: "\e067"; +} +.glyphicon-move:before { + content: "\e068"; +} +.glyphicon-step-backward:before { + content: "\e069"; +} +.glyphicon-fast-backward:before { + content: "\e070"; +} +.glyphicon-backward:before { + content: "\e071"; +} +.glyphicon-play:before { + content: "\e072"; +} +.glyphicon-pause:before { + content: "\e073"; +} +.glyphicon-stop:before { + content: "\e074"; +} +.glyphicon-forward:before { + content: "\e075"; +} +.glyphicon-fast-forward:before { + content: "\e076"; +} +.glyphicon-step-forward:before { + content: "\e077"; +} +.glyphicon-eject:before { + content: "\e078"; +} +.glyphicon-chevron-left:before { + content: "\e079"; +} +.glyphicon-chevron-right:before { + content: "\e080"; +} +.glyphicon-plus-sign:before { + content: "\e081"; +} +.glyphicon-minus-sign:before { + content: "\e082"; +} +.glyphicon-remove-sign:before { + content: "\e083"; +} +.glyphicon-ok-sign:before { + content: "\e084"; +} +.glyphicon-question-sign:before { + content: "\e085"; +} +.glyphicon-info-sign:before { + content: "\e086"; +} +.glyphicon-screenshot:before { + content: "\e087"; +} +.glyphicon-remove-circle:before { + content: "\e088"; +} +.glyphicon-ok-circle:before { + content: "\e089"; +} +.glyphicon-ban-circle:before { + content: "\e090"; +} +.glyphicon-arrow-left:before { + content: "\e091"; +} +.glyphicon-arrow-right:before { + content: "\e092"; +} +.glyphicon-arrow-up:before { + content: "\e093"; +} +.glyphicon-arrow-down:before { + content: "\e094"; +} +.glyphicon-share-alt:before { + content: "\e095"; +} +.glyphicon-resize-full:before { + content: "\e096"; +} +.glyphicon-resize-small:before { + content: "\e097"; +} +.glyphicon-exclamation-sign:before { + content: "\e101"; +} +.glyphicon-gift:before { + content: "\e102"; +} +.glyphicon-leaf:before { + content: "\e103"; +} +.glyphicon-fire:before { + content: "\e104"; +} +.glyphicon-eye-open:before { + content: "\e105"; +} +.glyphicon-eye-close:before { + content: "\e106"; +} +.glyphicon-warning-sign:before { + content: "\e107"; +} +.glyphicon-plane:before { + content: "\e108"; +} +.glyphicon-calendar:before { + content: "\e109"; +} +.glyphicon-random:before { + content: "\e110"; +} +.glyphicon-comment:before { + content: "\e111"; +} +.glyphicon-magnet:before { + content: "\e112"; +} +.glyphicon-chevron-up:before { + content: "\e113"; +} +.glyphicon-chevron-down:before { + content: "\e114"; +} +.glyphicon-retweet:before { + content: "\e115"; +} +.glyphicon-shopping-cart:before { + content: "\e116"; +} +.glyphicon-folder-close:before { + content: "\e117"; +} +.glyphicon-folder-open:before { + content: "\e118"; +} +.glyphicon-resize-vertical:before { + content: "\e119"; +} +.glyphicon-resize-horizontal:before { + content: "\e120"; +} +.glyphicon-hdd:before { + content: "\e121"; +} +.glyphicon-bullhorn:before { + content: "\e122"; +} +.glyphicon-bell:before { + content: "\e123"; +} +.glyphicon-certificate:before { + content: "\e124"; +} +.glyphicon-thumbs-up:before { + content: "\e125"; +} +.glyphicon-thumbs-down:before { + content: "\e126"; +} +.glyphicon-hand-right:before { + content: "\e127"; +} +.glyphicon-hand-left:before { + content: "\e128"; +} +.glyphicon-hand-up:before { + content: "\e129"; +} +.glyphicon-hand-down:before { + content: "\e130"; +} +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} +.glyphicon-globe:before { + content: "\e135"; +} +.glyphicon-wrench:before { + content: "\e136"; +} +.glyphicon-tasks:before { + content: "\e137"; +} +.glyphicon-filter:before { + content: "\e138"; +} +.glyphicon-briefcase:before { + content: "\e139"; +} +.glyphicon-fullscreen:before { + content: "\e140"; +} +.glyphicon-dashboard:before { + content: "\e141"; +} +.glyphicon-paperclip:before { + content: "\e142"; +} +.glyphicon-heart-empty:before { + content: "\e143"; +} +.glyphicon-link:before { + content: "\e144"; +} +.glyphicon-phone:before { + content: "\e145"; +} +.glyphicon-pushpin:before { + content: "\e146"; +} +.glyphicon-usd:before { + content: "\e148"; +} +.glyphicon-gbp:before { + content: "\e149"; +} +.glyphicon-sort:before { + content: "\e150"; +} +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} +.glyphicon-sort-by-order:before { + content: "\e153"; +} +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} +.glyphicon-unchecked:before { + content: "\e157"; +} +.glyphicon-expand:before { + content: "\e158"; +} +.glyphicon-collapse-down:before { + content: "\e159"; +} +.glyphicon-collapse-up:before { + content: "\e160"; +} +.glyphicon-log-in:before { + content: "\e161"; +} +.glyphicon-flash:before { + content: "\e162"; +} +.glyphicon-log-out:before { + content: "\e163"; +} +.glyphicon-new-window:before { + content: "\e164"; +} +.glyphicon-record:before { + content: "\e165"; +} +.glyphicon-save:before { + content: "\e166"; +} +.glyphicon-open:before { + content: "\e167"; +} +.glyphicon-saved:before { + content: "\e168"; +} +.glyphicon-import:before { + content: "\e169"; +} +.glyphicon-export:before { + content: "\e170"; +} +.glyphicon-send:before { + content: "\e171"; +} +.glyphicon-floppy-disk:before { + content: "\e172"; +} +.glyphicon-floppy-saved:before { + content: "\e173"; +} +.glyphicon-floppy-remove:before { + content: "\e174"; +} +.glyphicon-floppy-save:before { + content: "\e175"; +} +.glyphicon-floppy-open:before { + content: "\e176"; +} +.glyphicon-credit-card:before { + content: "\e177"; +} +.glyphicon-transfer:before { + content: "\e178"; +} +.glyphicon-cutlery:before { + content: "\e179"; +} +.glyphicon-header:before { + content: "\e180"; +} +.glyphicon-compressed:before { + content: "\e181"; +} +.glyphicon-earphone:before { + content: "\e182"; +} +.glyphicon-phone-alt:before { + content: "\e183"; +} +.glyphicon-tower:before { + content: "\e184"; +} +.glyphicon-stats:before { + content: "\e185"; +} +.glyphicon-sd-video:before { + content: "\e186"; +} +.glyphicon-hd-video:before { + content: "\e187"; +} +.glyphicon-subtitles:before { + content: "\e188"; +} +.glyphicon-sound-stereo:before { + content: "\e189"; +} +.glyphicon-sound-dolby:before { + content: "\e190"; +} +.glyphicon-sound-5-1:before { + content: "\e191"; +} +.glyphicon-sound-6-1:before { + content: "\e192"; +} +.glyphicon-sound-7-1:before { + content: "\e193"; +} +.glyphicon-copyright-mark:before { + content: "\e194"; +} +.glyphicon-registration-mark:before { + content: "\e195"; +} +.glyphicon-cloud-download:before { + content: "\e197"; +} +.glyphicon-cloud-upload:before { + content: "\e198"; +} +.glyphicon-tree-conifer:before { + content: "\e199"; +} +.glyphicon-tree-deciduous:before { + content: "\e200"; +} +.glyphicon-cd:before { + content: "\e201"; +} +.glyphicon-save-file:before { + content: "\e202"; +} +.glyphicon-open-file:before { + content: "\e203"; +} +.glyphicon-level-up:before { + content: "\e204"; +} +.glyphicon-copy:before { + content: "\e205"; +} +.glyphicon-paste:before { + content: "\e206"; +} +.glyphicon-alert:before { + content: "\e209"; +} +.glyphicon-equalizer:before { + content: "\e210"; +} +.glyphicon-king:before { + content: "\e211"; +} +.glyphicon-queen:before { + content: "\e212"; +} +.glyphicon-pawn:before { + content: "\e213"; +} +.glyphicon-bishop:before { + content: "\e214"; +} +.glyphicon-knight:before { + content: "\e215"; +} +.glyphicon-baby-formula:before { + content: "\e216"; +} +.glyphicon-tent:before { + content: "\26fa"; +} +.glyphicon-blackboard:before { + content: "\e218"; +} +.glyphicon-bed:before { + content: "\e219"; +} +.glyphicon-apple:before { + content: "\f8ff"; +} +.glyphicon-erase:before { + content: "\e221"; +} +.glyphicon-hourglass:before { + content: "\231b"; +} +.glyphicon-lamp:before { + content: "\e223"; +} +.glyphicon-duplicate:before { + content: "\e224"; +} +.glyphicon-piggy-bank:before { + content: "\e225"; +} +.glyphicon-scissors:before { + content: "\e226"; +} +.glyphicon-bitcoin:before { + content: "\e227"; +} +.glyphicon-btc:before { + content: "\e227"; +} +.glyphicon-xbt:before { + content: "\e227"; +} +.glyphicon-yen:before { + content: "\00a5"; +} +.glyphicon-jpy:before { + content: "\00a5"; +} +.glyphicon-ruble:before { + content: "\20bd"; +} +.glyphicon-rub:before { + content: "\20bd"; +} +.glyphicon-scale:before { + content: "\e230"; +} +.glyphicon-ice-lolly:before { + content: "\e231"; +} +.glyphicon-ice-lolly-tasted:before { + content: "\e232"; +} +.glyphicon-education:before { + content: "\e233"; +} +.glyphicon-option-horizontal:before { + content: "\e234"; +} +.glyphicon-option-vertical:before { + content: "\e235"; +} +.glyphicon-menu-hamburger:before { + content: "\e236"; +} +.glyphicon-modal-window:before { + content: "\e237"; +} +.glyphicon-oil:before { + content: "\e238"; +} +.glyphicon-grain:before { + content: "\e239"; +} +.glyphicon-sunglasses:before { + content: "\e240"; +} +.glyphicon-text-size:before { + content: "\e241"; +} +.glyphicon-text-color:before { + content: "\e242"; +} +.glyphicon-text-background:before { + content: "\e243"; +} +.glyphicon-object-align-top:before { + content: "\e244"; +} +.glyphicon-object-align-bottom:before { + content: "\e245"; +} +.glyphicon-object-align-horizontal:before { + content: "\e246"; +} +.glyphicon-object-align-left:before { + content: "\e247"; +} +.glyphicon-object-align-vertical:before { + content: "\e248"; +} +.glyphicon-object-align-right:before { + content: "\e249"; +} +.glyphicon-triangle-right:before { + content: "\e250"; +} +.glyphicon-triangle-left:before { + content: "\e251"; +} +.glyphicon-triangle-bottom:before { + content: "\e252"; +} +.glyphicon-triangle-top:before { + content: "\e253"; +} +.glyphicon-console:before { + content: "\e254"; +} +.glyphicon-superscript:before { + content: "\e255"; +} +.glyphicon-subscript:before { + content: "\e256"; +} +.glyphicon-menu-left:before { + content: "\e257"; +} +.glyphicon-menu-right:before { + content: "\e258"; +} +.glyphicon-menu-down:before { + content: "\e259"; +} +.glyphicon-menu-up:before { + content: "\e260"; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + font-size: 10px; + + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #337ab7; + text-decoration: none; +} +a:hover, +a:focus { + color: #23527c; + text-decoration: underline; +} +a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +figure { + margin: 0; +} +img { + vertical-align: middle; +} +.img-responsive, +.thumbnail > img, +.thumbnail a > img, +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + max-width: 100%; + height: auto; +} +.img-rounded { + border-radius: 6px; +} +.img-thumbnail { + display: inline-block; + max-width: 100%; + height: auto; + padding: 4px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.img-circle { + border-radius: 50%; +} +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} +[role="button"] { + cursor: pointer; +} +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small, +h1 .small, +h2 .small, +h3 .small, +h4 .small, +h5 .small, +h6 .small, +.h1 .small, +.h2 .small, +.h3 .small, +.h4 .small, +.h5 .small, +.h6 .small { + font-weight: normal; + line-height: 1; + color: #777; +} +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 20px; + margin-bottom: 10px; +} +h1 small, +.h1 small, +h2 small, +.h2 small, +h3 small, +.h3 small, +h1 .small, +.h1 .small, +h2 .small, +.h2 .small, +h3 .small, +.h3 .small { + font-size: 65%; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 10px; + margin-bottom: 10px; +} +h4 small, +.h4 small, +h5 small, +.h5 small, +h6 small, +.h6 small, +h4 .small, +.h4 .small, +h5 .small, +.h5 .small, +h6 .small, +.h6 .small { + font-size: 75%; +} +h1, +.h1 { + font-size: 36px; +} +h2, +.h2 { + font-size: 30px; +} +h3, +.h3 { + font-size: 24px; +} +h4, +.h4 { + font-size: 18px; +} +h5, +.h5 { + font-size: 14px; +} +h6, +.h6 { + font-size: 12px; +} +p { + margin: 0 0 10px; +} +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.4; +} +@media (min-width: 768px) { + .lead { + font-size: 21px; + } +} +small, +.small { + font-size: 85%; +} +mark, +.mark { + padding: .2em; + background-color: #fcf8e3; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} +.text-nowrap { + white-space: nowrap; +} +.text-lowercase { + text-transform: lowercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-capitalize { + text-transform: capitalize; +} +.text-muted { + color: #777; +} +.text-primary { + color: #337ab7; +} +a.text-primary:hover, +a.text-primary:focus { + color: #286090; +} +.text-success { + color: #3c763d; +} +a.text-success:hover, +a.text-success:focus { + color: #2b542c; +} +.text-info { + color: #31708f; +} +a.text-info:hover, +a.text-info:focus { + color: #245269; +} +.text-warning { + color: #8a6d3b; +} +a.text-warning:hover, +a.text-warning:focus { + color: #66512c; +} +.text-danger { + color: #a94442; +} +a.text-danger:hover, +a.text-danger:focus { + color: #843534; +} +.bg-primary { + color: #fff; + background-color: #337ab7; +} +a.bg-primary:hover, +a.bg-primary:focus { + background-color: #286090; +} +.bg-success { + background-color: #dff0d8; +} +a.bg-success:hover, +a.bg-success:focus { + background-color: #c1e2b3; +} +.bg-info { + background-color: #d9edf7; +} +a.bg-info:hover, +a.bg-info:focus { + background-color: #afd9ee; +} +.bg-warning { + background-color: #fcf8e3; +} +a.bg-warning:hover, +a.bg-warning:focus { + background-color: #f7ecb5; +} +.bg-danger { + background-color: #f2dede; +} +a.bg-danger:hover, +a.bg-danger:focus { + background-color: #e4b9b9; +} +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eee; +} +ul, +ol { + margin-top: 0; + margin-bottom: 10px; +} +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + margin-left: -5px; + list-style: none; +} +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} +dl { + margin-top: 0; + margin-bottom: 20px; +} +dt, +dd { + line-height: 1.42857143; +} +dt { + font-weight: bold; +} +dd { + margin-left: 0; +} +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #777; +} +.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #eee; +} +blockquote p:last-child, +blockquote ul:last-child, +blockquote ol:last-child { + margin-bottom: 0; +} +blockquote footer, +blockquote small, +blockquote .small { + display: block; + font-size: 80%; + line-height: 1.42857143; + color: #777; +} +blockquote footer:before, +blockquote small:before, +blockquote .small:before { + content: '\2014 \00A0'; +} +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + text-align: right; + border-right: 5px solid #eee; + border-left: 0; +} +.blockquote-reverse footer:before, +blockquote.pull-right footer:before, +.blockquote-reverse small:before, +blockquote.pull-right small:before, +.blockquote-reverse .small:before, +blockquote.pull-right .small:before { + content: ''; +} +.blockquote-reverse footer:after, +blockquote.pull-right footer:after, +.blockquote-reverse small:after, +blockquote.pull-right small:after, +.blockquote-reverse .small:after, +blockquote.pull-right .small:after { + content: '\00A0 \2014'; +} +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857143; +} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; +} +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); +} +kbd kbd { + padding: 0; + font-size: 100%; + font-weight: bold; + -webkit-box-shadow: none; + box-shadow: none; +} +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; +} +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 768px) { + .container { + width: 750px; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +.row { + margin-right: -15px; + margin-left: -15px; +} +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0; +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +table { + background-color: transparent; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #ddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #ddd; +} +.table .table { + background-color: #fff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #f9f9f9; +} +.table-hover > tbody > tr:hover { + background-color: #f5f5f5; +} +table col[class*="col-"] { + position: static; + display: table-column; + float: none; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + display: table-cell; + float: none; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} +.table-responsive { + min-height: .01%; + overflow-x: auto; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857143; + color: #555; +} +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); +} +.form-control::-moz-placeholder { + color: #999; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #999; +} +.form-control::-webkit-input-placeholder { + color: #999; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + background-color: #eee; + opacity: 1; +} +.form-control[disabled], +fieldset[disabled] .form-control { + cursor: not-allowed; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"].form-control, + input[type="time"].form-control, + input[type="datetime-local"].form-control, + input[type="month"].form-control { + line-height: 34px; + } + input[type="date"].input-sm, + input[type="time"].input-sm, + input[type="datetime-local"].input-sm, + input[type="month"].input-sm, + .input-group-sm input[type="date"], + .input-group-sm input[type="time"], + .input-group-sm input[type="datetime-local"], + .input-group-sm input[type="month"] { + line-height: 30px; + } + input[type="date"].input-lg, + input[type="time"].input-lg, + input[type="datetime-local"].input-lg, + input[type="month"].input-lg, + .input-group-lg input[type="date"], + .input-group-lg input[type="time"], + .input-group-lg input[type="datetime-local"], + .input-group-lg input[type="month"] { + line-height: 46px; + } +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; +} +.radio label, +.checkbox label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-top: 4px \9; + margin-left: -20px; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + position: relative; + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} +.form-control-static { + min-height: 34px; + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0; +} +.form-control-static.input-lg, +.form-control-static.input-sm { + padding-right: 0; + padding-left: 0; +} +.input-sm { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm { + height: 30px; + line-height: 30px; +} +textarea.input-sm, +select[multiple].input-sm { + height: auto; +} +.form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.form-group-sm select.form-control { + height: 30px; + line-height: 30px; +} +.form-group-sm textarea.form-control, +.form-group-sm select[multiple].form-control { + height: auto; +} +.form-group-sm .form-control-static { + height: 30px; + min-height: 32px; + padding: 6px 10px; + font-size: 12px; + line-height: 1.5; +} +.input-lg { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.input-lg { + height: 46px; + line-height: 46px; +} +textarea.input-lg, +select[multiple].input-lg { + height: auto; +} +.form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.form-group-lg select.form-control { + height: 46px; + line-height: 46px; +} +.form-group-lg textarea.form-control, +.form-group-lg select[multiple].form-control { + height: auto; +} +.form-group-lg .form-control-static { + height: 46px; + min-height: 38px; + padding: 11px 16px; + font-size: 18px; + line-height: 1.3333333; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 42.5px; +} +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; + pointer-events: none; +} +.input-lg + .form-control-feedback, +.input-group-lg + .form-control-feedback, +.form-group-lg .form-control + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px; +} +.input-sm + .form-control-feedback, +.input-group-sm + .form-control-feedback, +.form-group-sm .form-control + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #3c763d; +} +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; +} +.has-success .input-group-addon { + color: #3c763d; + background-color: #dff0d8; + border-color: #3c763d; +} +.has-success .form-control-feedback { + color: #3c763d; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #8a6d3b; +} +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; +} +.has-warning .input-group-addon { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #8a6d3b; +} +.has-warning .form-control-feedback { + color: #8a6d3b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #a94442; +} +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; +} +.has-error .input-group-addon { + color: #a94442; + background-color: #f2dede; + border-color: #a94442; +} +.has-error .form-control-feedback { + color: #a94442; +} +.has-feedback label ~ .form-control-feedback { + top: 25px; +} +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .form-control-static { + display: inline-block; + } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; + } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 27px; +} +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 7px; + margin-bottom: 0; + text-align: right; + } +} +.form-horizontal .has-feedback .form-control-feedback { + right: 15px; +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 14.333333px; + font-size: 18px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + font-size: 12px; + } +} +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus, +.btn.focus, +.btn:active.focus, +.btn.active.focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus, +.btn.focus { + color: #333; + text-decoration: none; +} +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; +} +a.btn.disabled, +fieldset[disabled] a.btn { + pointer-events: none; +} +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; +} +.btn-default:focus, +.btn-default.focus { + color: #333; + background-color: #e6e6e6; + border-color: #8c8c8c; +} +.btn-default:hover { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active:hover, +.btn-default.active:hover, +.open > .dropdown-toggle.btn-default:hover, +.btn-default:active:focus, +.btn-default.active:focus, +.open > .dropdown-toggle.btn-default:focus, +.btn-default:active.focus, +.btn-default.active.focus, +.open > .dropdown-toggle.btn-default.focus { + color: #333; + background-color: #d4d4d4; + border-color: #8c8c8c; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #fff; + border-color: #ccc; +} +.btn-default .badge { + color: #fff; + background-color: #333; +} +.btn-primary { + color: #fff; + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary:focus, +.btn-primary.focus { + color: #fff; + background-color: #286090; + border-color: #122b40; +} +.btn-primary:hover { + color: #fff; + background-color: #286090; + border-color: #204d74; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #286090; + border-color: #204d74; +} +.btn-primary:active:hover, +.btn-primary.active:hover, +.open > .dropdown-toggle.btn-primary:hover, +.btn-primary:active:focus, +.btn-primary.active:focus, +.open > .dropdown-toggle.btn-primary:focus, +.btn-primary:active.focus, +.btn-primary.active.focus, +.open > .dropdown-toggle.btn-primary.focus { + color: #fff; + background-color: #204d74; + border-color: #122b40; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary .badge { + color: #337ab7; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:focus, +.btn-success.focus { + color: #fff; + background-color: #449d44; + border-color: #255625; +} +.btn-success:hover { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active:hover, +.btn-success.active:hover, +.open > .dropdown-toggle.btn-success:hover, +.btn-success:active:focus, +.btn-success.active:focus, +.open > .dropdown-toggle.btn-success:focus, +.btn-success:active.focus, +.btn-success.active.focus, +.open > .dropdown-toggle.btn-success.focus { + color: #fff; + background-color: #398439; + border-color: #255625; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:focus, +.btn-info.focus { + color: #fff; + background-color: #31b0d5; + border-color: #1b6d85; +} +.btn-info:hover { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active:hover, +.btn-info.active:hover, +.open > .dropdown-toggle.btn-info:hover, +.btn-info:active:focus, +.btn-info.active:focus, +.open > .dropdown-toggle.btn-info:focus, +.btn-info:active.focus, +.btn-info.active.focus, +.open > .dropdown-toggle.btn-info.focus { + color: #fff; + background-color: #269abc; + border-color: #1b6d85; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:focus, +.btn-warning.focus { + color: #fff; + background-color: #ec971f; + border-color: #985f0d; +} +.btn-warning:hover { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active:hover, +.btn-warning.active:hover, +.open > .dropdown-toggle.btn-warning:hover, +.btn-warning:active:focus, +.btn-warning.active:focus, +.open > .dropdown-toggle.btn-warning:focus, +.btn-warning:active.focus, +.btn-warning.active.focus, +.open > .dropdown-toggle.btn-warning.focus { + color: #fff; + background-color: #d58512; + border-color: #985f0d; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:focus, +.btn-danger.focus { + color: #fff; + background-color: #c9302c; + border-color: #761c19; +} +.btn-danger:hover { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active:hover, +.btn-danger.active:hover, +.open > .dropdown-toggle.btn-danger:hover, +.btn-danger:active:focus, +.btn-danger.active:focus, +.open > .dropdown-toggle.btn-danger:focus, +.btn-danger:active.focus, +.btn-danger.active.focus, +.open > .dropdown-toggle.btn-danger.focus { + color: #fff; + background-color: #ac2925; + border-color: #761c19; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #fff; +} +.btn-link { + font-weight: normal; + color: #337ab7; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #23527c; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #777; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; +} +.collapse.in { + display: block; +} +tr.collapse.in { + display: table-row; +} +tbody.collapse.in { + display: table-row-group; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-transition-duration: .35s; + -o-transition-duration: .35s; + transition-duration: .35s; + -webkit-transition-property: height, visibility; + -o-transition-property: height, visibility; + transition-property: height, visibility; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px dashed; + border-top: 4px solid \9; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + background-color: #337ab7; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px dashed; + border-bottom: 4px solid \9; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn, +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-left-radius: 4px; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +.btn-group-justified > .btn-group .dropdown-menu { + left: auto; +} +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-right: 0; + padding-left: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #555; + text-align: center; + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + z-index: 2; + margin-left: -1px; +} +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav > li { + position: relative; + display: block; +} +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eee; +} +.nav > li.disabled > a { + color: #777; +} +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #777; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; +} +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eee; + border-color: #337ab7; +} +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.nav > li > a > img { + max-width: none; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857143; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eee #eee #ddd; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555; + cursor: default; + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} +.nav-tabs.nav-justified > li { + float: none; +} +.nav-tabs.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-tabs.nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs.nav-justified > .active > a, +.nav-tabs.nav-justified > .active > a:hover, +.nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs.nav-justified > .active > a, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.nav-pills > li { + float: left; +} +.nav-pills > li > a { + border-radius: 4px; +} +.nav-pills > li + li { + margin-left: 2px; +} +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #fff; + background-color: #337ab7; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} +.nav-justified { + width: 100%; +} +.nav-justified > li { + float: none; +} +.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs-justified { + border-bottom: 0; +} +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs-justified > .active > a, +.nav-tabs-justified > .active > a:hover, +.nav-tabs-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; +} +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} +.navbar-collapse { + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); +} +.navbar-collapse.in { + overflow-y: auto; +} +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-fixed-top .navbar-collapse, + .navbar-static-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + padding-right: 0; + padding-left: 0; + } +} +.navbar-fixed-top .navbar-collapse, +.navbar-fixed-bottom .navbar-collapse { + max-height: 340px; +} +@media (max-device-width: 480px) and (orientation: landscape) { + .navbar-fixed-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + max-height: 200px; + } +} +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .container > .navbar-header, + .container-fluid > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; +} +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; +} +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; +} +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; +} +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; +} +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} +.navbar-brand > img { + display: block; +} +@media (min-width: 768px) { + .navbar > .container .navbar-brand, + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } +} +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: 0; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-nav { + margin: 7.5px -15px; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; +} +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } +} +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); +} +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .navbar-form .form-control-static { + display: inline-block; + } + .navbar-form .input-group { + display: inline-table; + vertical-align: middle; + } + .navbar-form .input-group .input-group-addon, + .navbar-form .input-group .input-group-btn, + .navbar-form .input-group .form-control { + width: auto; + } + .navbar-form .input-group > .form-control { + width: 100%; + } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio label, + .navbar-form .checkbox label { + padding-left: 0; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .navbar-form .has-feedback .form-control-feedback { + top: 0; + } +} +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } + .navbar-form .form-group:last-child { + margin-bottom: 0; + } +} +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } +} +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + margin-bottom: 0; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; +} +.navbar-btn.btn-sm { + margin-top: 10px; + margin-bottom: 10px; +} +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px; +} +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; +} +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-right: 15px; + margin-left: 15px; + } +} +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + margin-right: -15px; + } + .navbar-right ~ .navbar-right { + margin-right: 0; + } +} +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} +.navbar-default .navbar-brand { + color: #777; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} +.navbar-default .navbar-text { + color: #777; +} +.navbar-default .navbar-nav > li > a { + color: #777; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333; + background-color: transparent; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555; + background-color: #e7e7e7; +} +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #ccc; + background-color: transparent; +} +.navbar-default .navbar-toggle { + border-color: #ddd; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #ddd; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #888; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e7e7e7; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555; + background-color: #e7e7e7; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #ccc; + background-color: transparent; + } +} +.navbar-default .navbar-link { + color: #777; +} +.navbar-default .navbar-link:hover { + color: #333; +} +.navbar-default .btn-link { + color: #777; +} +.navbar-default .btn-link:hover, +.navbar-default .btn-link:focus { + color: #333; +} +.navbar-default .btn-link[disabled]:hover, +fieldset[disabled] .navbar-default .btn-link:hover, +.navbar-default .btn-link[disabled]:focus, +fieldset[disabled] .navbar-default .btn-link:focus { + color: #ccc; +} +.navbar-inverse { + background-color: #222; + border-color: #080808; +} +.navbar-inverse .navbar-brand { + color: #9d9d9d; +} +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-text { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #fff; + background-color: #080808; +} +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; +} +.navbar-inverse .navbar-toggle { + border-color: #333; +} +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333; +} +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff; +} +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #fff; + background-color: #080808; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #9d9d9d; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #fff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444; + background-color: transparent; + } +} +.navbar-inverse .navbar-link { + color: #9d9d9d; +} +.navbar-inverse .navbar-link:hover { + color: #fff; +} +.navbar-inverse .btn-link { + color: #9d9d9d; +} +.navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link:focus { + color: #fff; +} +.navbar-inverse .btn-link[disabled]:hover, +fieldset[disabled] .navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link[disabled]:focus, +fieldset[disabled] .navbar-inverse .btn-link:focus { + color: #444; +} +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} +.breadcrumb > li { + display: inline-block; +} +.breadcrumb > li + li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0"; +} +.breadcrumb > .active { + color: #777; +} +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; +} +.pagination > li { + display: inline; +} +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.42857143; + color: #337ab7; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd; +} +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + z-index: 3; + color: #23527c; + background-color: #eee; + border-color: #ddd; +} +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 2; + color: #fff; + cursor: default; + background-color: #337ab7; + border-color: #337ab7; +} +.pagination > .disabled > span, +.pagination > .disabled > span:hover, +.pagination > .disabled > span:focus, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #777; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; +} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; +} +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eee; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #777; + cursor: not-allowed; + background-color: #fff; +} +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} +a.label:hover, +a.label:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.label:empty { + display: none; +} +.btn .label { + position: relative; + top: -1px; +} +.label-default { + background-color: #777; +} +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #5e5e5e; +} +.label-primary { + background-color: #337ab7; +} +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #286090; +} +.label-success { + background-color: #5cb85c; +} +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} +.label-info { + background-color: #5bc0de; +} +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} +.label-warning { + background-color: #f0ad4e; +} +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} +.label-danger { + background-color: #d9534f; +} +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: middle; + background-color: #777; + border-radius: 10px; +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge, +.btn-group-xs > .btn .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #337ab7; + background-color: #fff; +} +.list-group-item > .badge { + float: right; +} +.list-group-item > .badge + .badge { + margin-right: 5px; +} +.nav-pills > li > a > .badge { + margin-left: 3px; +} +.jumbotron { + padding-top: 30px; + padding-bottom: 30px; + margin-bottom: 30px; + color: inherit; + background-color: #eee; +} +.jumbotron h1, +.jumbotron .h1 { + color: inherit; +} +.jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; +} +.jumbotron > hr { + border-top-color: #d5d5d5; +} +.container .jumbotron, +.container-fluid .jumbotron { + border-radius: 6px; +} +.jumbotron .container { + max-width: 100%; +} +@media screen and (min-width: 768px) { + .jumbotron { + padding-top: 48px; + padding-bottom: 48px; + } + .container .jumbotron, + .container-fluid .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + .jumbotron h1, + .jumbotron .h1 { + font-size: 63px; + } +} +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: border .2s ease-in-out; + -o-transition: border .2s ease-in-out; + transition: border .2s ease-in-out; +} +.thumbnail > img, +.thumbnail a > img { + margin-right: auto; + margin-left: auto; +} +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #337ab7; +} +.thumbnail .caption { + padding: 9px; + color: #333; +} +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; +} +.alert h4 { + margin-top: 0; + color: inherit; +} +.alert .alert-link { + font-weight: bold; +} +.alert > p, +.alert > ul { + margin-bottom: 0; +} +.alert > p + p { + margin-top: 5px; +} +.alert-dismissable, +.alert-dismissible { + padding-right: 35px; +} +.alert-dismissable .close, +.alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.alert-success hr { + border-top-color: #c9e2b3; +} +.alert-success .alert-link { + color: #2b542c; +} +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.alert-info hr { + border-top-color: #a6e1ec; +} +.alert-info .alert-link { + color: #245269; +} +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.alert-warning hr { + border-top-color: #f7e1b5; +} +.alert-warning .alert-link { + color: #66512c; +} +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.alert-danger hr { + border-top-color: #e4b9c0; +} +.alert-danger .alert-link { + color: #843534; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #337ab7; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + -webkit-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease; +} +.progress-striped .progress-bar, +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .progress-bar, +.progress-bar.active { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-bar-success { + background-color: #5cb85c; +} +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-info { + background-color: #5bc0de; +} +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-warning { + background-color: #f0ad4e; +} +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-danger { + background-color: #d9534f; +} +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media, +.media-body { + overflow: hidden; + zoom: 1; +} +.media-body { + width: 10000px; +} +.media-object { + display: block; +} +.media-object.img-thumbnail { + max-width: none; +} +.media-right, +.media > .pull-right { + padding-left: 10px; +} +.media-left, +.media > .pull-left { + padding-right: 10px; +} +.media-left, +.media-right, +.media-body { + display: table-cell; + vertical-align: top; +} +.media-middle { + vertical-align: middle; +} +.media-bottom { + vertical-align: bottom; +} +.media-heading { + margin-top: 0; + margin-bottom: 5px; +} +.media-list { + padding-left: 0; + list-style: none; +} +.list-group { + padding-left: 0; + margin-bottom: 20px; +} +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd; +} +.list-group-item:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +a.list-group-item, +button.list-group-item { + color: #555; +} +a.list-group-item .list-group-item-heading, +button.list-group-item .list-group-item-heading { + color: #333; +} +a.list-group-item:hover, +button.list-group-item:hover, +a.list-group-item:focus, +button.list-group-item:focus { + color: #555; + text-decoration: none; + background-color: #f5f5f5; +} +button.list-group-item { + width: 100%; + text-align: left; +} +.list-group-item.disabled, +.list-group-item.disabled:hover, +.list-group-item.disabled:focus { + color: #777; + cursor: not-allowed; + background-color: #eee; +} +.list-group-item.disabled .list-group-item-heading, +.list-group-item.disabled:hover .list-group-item-heading, +.list-group-item.disabled:focus .list-group-item-heading { + color: inherit; +} +.list-group-item.disabled .list-group-item-text, +.list-group-item.disabled:hover .list-group-item-text, +.list-group-item.disabled:focus .list-group-item-text { + color: #777; +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + z-index: 2; + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.list-group-item.active .list-group-item-heading, +.list-group-item.active:hover .list-group-item-heading, +.list-group-item.active:focus .list-group-item-heading, +.list-group-item.active .list-group-item-heading > small, +.list-group-item.active:hover .list-group-item-heading > small, +.list-group-item.active:focus .list-group-item-heading > small, +.list-group-item.active .list-group-item-heading > .small, +.list-group-item.active:hover .list-group-item-heading > .small, +.list-group-item.active:focus .list-group-item-heading > .small { + color: inherit; +} +.list-group-item.active .list-group-item-text, +.list-group-item.active:hover .list-group-item-text, +.list-group-item.active:focus .list-group-item-text { + color: #c7ddef; +} +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; +} +a.list-group-item-success, +button.list-group-item-success { + color: #3c763d; +} +a.list-group-item-success .list-group-item-heading, +button.list-group-item-success .list-group-item-heading { + color: inherit; +} +a.list-group-item-success:hover, +button.list-group-item-success:hover, +a.list-group-item-success:focus, +button.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; +} +a.list-group-item-success.active, +button.list-group-item-success.active, +a.list-group-item-success.active:hover, +button.list-group-item-success.active:hover, +a.list-group-item-success.active:focus, +button.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; +} +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; +} +a.list-group-item-info, +button.list-group-item-info { + color: #31708f; +} +a.list-group-item-info .list-group-item-heading, +button.list-group-item-info .list-group-item-heading { + color: inherit; +} +a.list-group-item-info:hover, +button.list-group-item-info:hover, +a.list-group-item-info:focus, +button.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; +} +a.list-group-item-info.active, +button.list-group-item-info.active, +a.list-group-item-info.active:hover, +button.list-group-item-info.active:hover, +a.list-group-item-info.active:focus, +button.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; +} +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; +} +a.list-group-item-warning, +button.list-group-item-warning { + color: #8a6d3b; +} +a.list-group-item-warning .list-group-item-heading, +button.list-group-item-warning .list-group-item-heading { + color: inherit; +} +a.list-group-item-warning:hover, +button.list-group-item-warning:hover, +a.list-group-item-warning:focus, +button.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; +} +a.list-group-item-warning.active, +button.list-group-item-warning.active, +a.list-group-item-warning.active:hover, +button.list-group-item-warning.active:hover, +a.list-group-item-warning.active:focus, +button.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; +} +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; +} +a.list-group-item-danger, +button.list-group-item-danger { + color: #a94442; +} +a.list-group-item-danger .list-group-item-heading, +button.list-group-item-danger .list-group-item-heading { + color: inherit; +} +a.list-group-item-danger:hover, +button.list-group-item-danger:hover, +a.list-group-item-danger:focus, +button.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; +} +a.list-group-item-danger.active, +button.list-group-item-danger.active, +a.list-group-item-danger.active:hover, +button.list-group-item-danger.active:hover, +a.list-group-item-danger.active:focus, +button.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; +} +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; +} +.panel-title > a, +.panel-title > small, +.panel-title > .small, +.panel-title > small > a, +.panel-title > .small > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-right: 15px; + padding-left: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #ddd; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + margin-bottom: 0; + border: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid #ddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; +} +.panel-default { + border-color: #ddd; +} +.panel-default > .panel-heading { + color: #333; + background-color: #f5f5f5; + border-color: #ddd; +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd; +} +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd; +} +.panel-primary { + border-color: #337ab7; +} +.panel-primary > .panel-heading { + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #337ab7; +} +.panel-primary > .panel-heading .badge { + color: #337ab7; + background-color: #fff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #337ab7; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; +} +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden; +} +.embed-responsive .embed-responsive-item, +.embed-responsive iframe, +.embed-responsive embed, +.embed-responsive object, +.embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} +.embed-responsive-16by9 { + padding-bottom: 56.25%; +} +.embed-responsive-4by3 { + padding-bottom: 75%; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, .15); +} +.well-lg { + padding: 24px; + border-radius: 6px; +} +.well-sm { + padding: 9px; + border-radius: 3px; +} +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2; +} +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5; +} +button.close { + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; +} +.modal-open { + overflow: hidden; +} +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + display: none; + overflow: hidden; + -webkit-overflow-scrolling: touch; + outline: 0; +} +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); + transform: translate(0, -25%); +} +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); + transform: translate(0, 0); +} +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} +.modal-dialog { + position: relative; + width: auto; + margin: 10px; +} +.modal-content { + position: relative; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + outline: 0; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + box-shadow: 0 3px 9px rgba(0, 0, 0, .5); +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000; +} +.modal-backdrop.fade { + filter: alpha(opacity=0); + opacity: 0; +} +.modal-backdrop.in { + filter: alpha(opacity=50); + opacity: .5; +} +.modal-header { + min-height: 16.42857143px; + padding: 15px; + border-bottom: 1px solid #e5e5e5; +} +.modal-header .close { + margin-top: -2px; +} +.modal-title { + margin: 0; + line-height: 1.42857143; +} +.modal-body { + position: relative; + padding: 15px; +} +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto; + } + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + } + .modal-sm { + width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg { + width: 900px; + } +} +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + font-style: normal; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + filter: alpha(opacity=0); + opacity: 0; + + line-break: auto; +} +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9; +} +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + background-color: #000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-left .tooltip-arrow { + right: 5px; + bottom: 0; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + font-style: normal; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + + line-break: auto; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + content: ""; + border-width: 10px; +} +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0; +} +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0; +} +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0; +} +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25); +} +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25); +} +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff; +} +.carousel { + position: relative; +} +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + line-height: 1; +} +@media all and (transform-3d), (-webkit-transform-3d) { + .carousel-inner > .item { + -webkit-transition: -webkit-transform .6s ease-in-out; + -o-transition: -o-transform .6s ease-in-out; + transition: transform .6s ease-in-out; + + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000px; + perspective: 1000px; + } + .carousel-inner > .item.next, + .carousel-inner > .item.active.right { + left: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + .carousel-inner > .item.prev, + .carousel-inner > .item.active.left { + left: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + .carousel-inner > .item.next.left, + .carousel-inner > .item.prev.right, + .carousel-inner > .item.active { + left: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + filter: alpha(opacity=50); + opacity: .5; +} +.carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control:hover, +.carousel-control:focus { + color: #fff; + text-decoration: none; + filter: alpha(opacity=90); + outline: 0; + opacity: .9; +} +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; + margin-top: -10px; +} +.carousel-control .icon-prev, +.carousel-control .glyphicon-chevron-left { + left: 50%; + margin-left: -10px; +} +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-right { + right: 50%; + margin-right: -10px; +} +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + font-family: serif; + line-height: 1; +} +.carousel-control .icon-prev:before { + content: '\2039'; +} +.carousel-control .icon-next:before { + content: '\203a'; +} +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none; +} +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); + border: 1px solid #fff; + border-radius: 10px; +} +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff; +} +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); +} +.carousel-caption .btn { + text-shadow: none; +} +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + font-size: 30px; + } + .carousel-control .glyphicon-chevron-left, + .carousel-control .icon-prev { + margin-left: -15px; + } + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-next { + margin-right: -15px; + } + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.container-fluid:before, +.container-fluid:after, +.row:before, +.row:after, +.form-horizontal .form-group:before, +.form-horizontal .form-group:after, +.btn-toolbar:before, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after, +.nav:before, +.nav:after, +.navbar:before, +.navbar:after, +.navbar-header:before, +.navbar-header:after, +.navbar-collapse:before, +.navbar-collapse:after, +.pager:before, +.pager:after, +.panel-body:before, +.panel-body:after, +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.container-fluid:after, +.row:after, +.form-horizontal .form-group:after, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:after, +.nav:after, +.navbar:after, +.navbar-header:after, +.navbar-collapse:after, +.pager:after, +.panel-body:after, +.modal-footer:after { + clear: both; +} +.center-block { + display: block; + margin-right: auto; + margin-left: auto; +} +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +.hide { + display: none !important; +} +.show { + display: block !important; +} +.invisible { + visibility: hidden; +} +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.hidden { + display: none !important; +} +.affix { + position: fixed; +} +@-ms-viewport { + width: device-width; +} +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table !important; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table !important; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table !important; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table !important; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table !important; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +.visible-print-block { + display: none !important; +} +@media print { + .visible-print-block { + display: block !important; + } +} +.visible-print-inline { + display: none !important; +} +@media print { + .visible-print-inline { + display: inline !important; + } +} +.visible-print-inline-block { + display: none !important; +} +@media print { + .visible-print-inline-block { + display: inline-block !important; + } +} +@media print { + .hidden-print { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ diff --git a/public/stylesheets/new_public.css b/public/stylesheets/new_public.css new file mode 100644 index 000000000..b4621805d --- /dev/null +++ b/public/stylesheets/new_public.css @@ -0,0 +1,634 @@ +/* CSS Document */ +/* 2015-06-26 */ +body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} +body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5; background:#eaebec;} +div,img,tr,td,table{ border:0;} +table,tr,td{border:0;cellspacing:0; cellpadding:0;} +ol,ul,li{ list-style-type:none} +a:link,a:visited{color:#7f7f7f;text-decoration:none;} +a:hover,a:active{color:#000;} + +/*常用*/ +select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; } +.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;} +.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;} +table{ background:#fff;} +.more{ font-weight:normal; color:#999; font-size:12px;} +.no_line{ border-bottom:none;} +.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} +.no_border{ border:none;background:none;} +.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;} + +/* font & color */ +h2{ font-size:18px; color:#15bccf;} +h3{ font-size:14px; color:#e8770d;} +h4{ font-size:14px; color:#3b3b3b;} +.f12{font-size:12px; font-weight:normal;} +.f14{font-size:14px;} +.f16{font-size:16px;} +.f18{font-size:18px;} +.fb{font-weight:bold;} +.lh20{line-height:20px;} +.lh22{line-height:22px;} +.lh24{line-height:24px;} +.lh26{line-height:26px;} +.fmYh{font-family:"MicroSoft Yahei";} +.font999{ color:#999;} +.fontRed{color:#770000;} +.text_c{ text-align:center;} + +/* Float & Clear */ +.cl{ clear:both; overflow:hidden; } +.fl{float:left;display:inline;} +.fr{float:right;display:inline;} +.f_l{ float:left;} +.f_r{ float:right;} +.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} +.clearfix{clear:both;zoom:1} +.break_word{ word-break:break-all; word-wrap: break-word;} +.white_space{white-space:nowrap;} + +/* Spacing */ +.ml2{ margin-left:2px;} +.ml3{ margin-left:3px;} +.ml4{ margin-left:4px;} +.ml5{ margin-left:5px;} +.ml8{ margin-left:8px;} +.ml10{ margin-left:10px;} +.ml15{ margin-left:15px;} +.ml20{ margin-left:20px;} +.ml40{ margin-left:40px;} +.ml45{ margin-left:45px;} +.ml55{ margin-left:55px;} +.ml30{ margin-left:30px;} +.ml60{ margin-left:60px;} +.ml80{ margin-left:80px;} +.ml90{ margin-left:90px;} +.ml100{ margin-left:100px;} +.ml110{ margin-left:110px;} +.mr5{ margin-right:5px;} +.mr45 {margin-right:45px;} +.mr55{ margin-right:55px;} +.mr10{ margin-right:10px;} +.mr15 {margin-right:15px;} +.mr20{ margin-right:20px;} +.mr30{ margin-right:30px;} +.mr40{ margin-right:40px;} +.mw20{ margin: 0 20px;} +.mt3{ margin-top:3px;} +.mt5{ margin-top:5px;} +.mt8{ margin-top:8px;} +.mt10{ margin-top:10px;} +.mt15 {margin-top:15px;} +.mb4{ margin-bottom:4px;} +.mb5{ margin-bottom:5px;} +.mb8 {margin-bottom:8px;} +.mb10{ margin-bottom:10px !important;} +.mb20{ margin-bottom:20px;} +.pl15{ padding-left:15px;} +.w20{ width:20px;} +.w60{ width:60px;} +.w70{ width:70px;} +.w90{ width:90px;} +.w210{ width:210px;} +.w150{ width:150px;} +.w280{ width:280px;} +.w430{ width:470px;} +.w520{ width:520px;} +.w543{ width:543px;} +.w557{ width:557px;} +.w583{ width:583px;} +.w350{ width:350px;} +.w610{ width:610px;} +.w600{ width:600px;} +.h22{ height:22px;} +.h26{ height:26px;} +.h50{ height:50px;} +.h70{ height:70px;} +.h150{ height:150px;} + +/* Font & background Color */ +a.b_grey{ background: #F5F5F5;} +a.b_dgrey{ background: #CCC;} +a.c_orange{color:#ff5722;} +a:hover.c_orange{color: #d33503;} +a.c_lorange{color:#ff9900;} +a:hover.c_lorange{color:#fff;} +a.c_blue{ color:#15bccf;} +a.c_dblue{ color:#09658c;} +a:hover.c_dblue{ color:#15bccf;} +a.c_white{ color:#fff;} +a.c_dorange{ color:#fd6e2a;} +a.c_dark{color: #3e4040;} +a:hover.c_dark{color: #3ca5c6;} +a.b_blue{background: #64bdd9;} +a:hover.b_blue{background: #41a8c8;} +a.b_green{background:#28be6c;} +a:hover.b_green{background:#14ad5a;} +a.c_blue02{color: #3ca5c6;} +a:hover.c_blue02{color: #0781b4;} +a.c_red{ color:#F00;} +a:hover.c_red{ color: #C00;} +a.c_purple{color: #426e9a;} +a:hover.c_purple{color: #d33503;} +a.c_green{ color:#28be6c;} + +.b_grey{ background: #F5F5F5;} +.b_dgrey{ background: #CCC;} +.c_orange{color:#e8770d;} +.c_dark{ color:#2d2d2d;} +.c_lorange{ color:#ff9900;} +.c_purple{color: #6883b6;} +.c_blue{ color:#15bccf;} +.c_red{ color:#F00;} +.c_green{ color:#28be6c;} +.c_dblue{ color:#09658c;} +.b_blue{background:#64bdd9;} +.b_green{background:#28be6c;} +.b_w{ background:#fff;} + +/* commonBtn */ +.grey_btn{ background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;} +a.grey_btn{ background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;} +a:hover.grey_btn{ background:#717171; color:#fff;} +.grey_n_btn{ background:#d9d9d9; color:#656565; font-weight:normal;padding:2px 10px; text-align:center;} +a.grey_n_btn{background:#d9d9d9; color:#656565;font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.grey_n_btn{ background:#717171; color:#fff;} +.green_btn{ background:#28be6c; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;} +a.green_btn{background:#28be6c;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.green_btn{ background:#14ad5a;} +.blue_btn{ background:#64bdd9; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;} +a.blue_btn{background:#64bdd9;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.blue_btn{ background:#329cbd;} +a.orange_btn{ background:#ff5722;color:#fff; font-weight:normal; padding:2px 10px; text-align:center; } +a:hover.orange_btn{ background:#d63502;} + +.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} +a.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} +a:hover.green_u_btn{ background:#3cb761; color:#fff;} +.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} +a.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} +a:hover.orange_u_btn{background:#ff5d31; color:#fff;} +.bgreen_u_btn{border:1px solid #1abc9c; padding:2px 10px; color:#1abc9c;} +a.bgreen_u_btn{border:1px solid #1abc9c; padding:2px 10px; color:#1abc9c;} +a:hover.bgreen_u_btn{background:#1abc9c; color:#fff;} +.blue_u_btn{border:1px solid #64bdd9; padding:2px 10px; color:#64bdd9;} +a.blue_u_btn{border:1px solid #64bdd9; padding:2px 10px; color:#64bdd9;} +a:hover.blue_u_btn{background:#64bdd9; color:#fff;} +.blue_n_btn{ background:#64bdd9; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;} +a.blue_n_btn{background:#64bdd9;color:#fff;font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.blue_n_btn{ background:#329cbd;} +.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} +a.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} +a:hover.green_n_btn{ background:#14ad5a;} +.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} +a.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} +a:hover.orange_n_btn{background:#d63502;} +.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} +a.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} +a:hover.bgreen_n_btn{background:#08a384;} + +.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;} +.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;} +.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;} +.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;} +.bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;} +/* commonpic */ +.pic_date{ display:block; background:url(../images/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; } +.pic_add{ display:block; background:url(../images/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; } +.pic_sch{ display:block; background:url(../images/public_icon.png) -31px -195px no-repeat; width:16px; height:15px; } +.pic_mes{ display:block; background:url(../images/public_icon.png) 0px -376px no-repeat; width:20px; height:15px; padding-left:18px;} +.pic_img{ display:block; background:url(../images/public_icon.png) -31px -419px no-repeat; width:20px; height:15px; } +.pic_del{ display:block; background:url(../images/public_icon.png) 0px -235px no-repeat; width:20px; height:15px; } +.pic_del:hover{ background:url(../images/public_icon.png) -32px -235px no-repeat; } +.pic_stats{display:block; background:url(../images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;} +.pic_files{display:block; background:url(../images/public_icon.png) 0px -578px no-repeat; width:20px; height:15px;} +.pic_text{display:block; background:url(../images/public_icon.png) 0px -609px no-repeat; width:20px; height:18px;} +.pic_text02{display:block; background:url(../images/public_icon.png) 0px -642px no-repeat; width:20px; height:19px;} +.pic_edit{display:block; background:url(../images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px;} +.pic_edit:hover{display:block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;} + + + + + +/*框架主类容*/ +#Container{ width:1000px; margin:0 auto; } + +/*头部导航*/ +#Header{ margin:10px 0; background:#15bccf; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; position: relative;} +.logo{ margin:5px 10px; } +#TopNav{} +#TopNav ul li{ margin-top:8px;} +.topnav_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;} +.topnav_a a:hover{color: #a1ebff;;} +#userInfo {float:right; display:inline-block; width:130px; padding-top:5px;} +.userInfoRow2 {margin-top:-5px;} +.myPractice {display:inline-block;} +a.parent {background: url(../images/arrowList.png) -30px 3px no-repeat; width:95px; padding-right:50px;} +a.parent:hover {background: url(../images/arrowList.png) -30px -14px no-repeat; width:95px; padding-right:50px; color:#fe7d68;} +a.linkToOrange:hover {color:#fe7d68;} +#userInfo ul li {positon: relative;} +#userInfo ul li ul {display:none;} +#userInfo ul li:hover ul {display:block; position:absolute;} +#userInfo ul li:hover ul li ul {display:none;} +#userInfo ul li:hover ul li:hover ul {display:block; position:absolute; left:110px; top:6px; width:148px; border:1px solid #15bccf; background-color:#ffffff; padding:5px 0px;} +#userInfo ul li:hover ul li:hover ul li {max-width:148px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block; padding: 0 10px; line-height:1.5; color:#15bccf;} +#TopUser{} +#TopUser ul li{ margin-top:8px;} +.topuser_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;} +.topuser_a a:hover{color: #a1ebff;} +#TopUser02{ } +#TopUser02 li{ float: left;} +#TopUser02 li a{ margin-right:10px;color: #FFF;text-align: center;} +#TopUser02 li a:hover{color: #a1ebff;} +#TopUser02 div{ position: absolute;visibility: hidden;background:#fff;border: 1px solid #15bccf;} +#TopUser02 div a{position: relative;display: block;white-space: nowrap;text-align: left; line-height:1.9; margin-left:5px;background: #fff;color:#15bccf; font-weight:normal;} +#TopUser02 div a:hover{ color:#e8770d; font-weight: bold;} + +/*myctrip*/ +.userImage{position:absolute; right:140px; top:5px; width:30px;height:30px; background: url(../images/item.png) 2px 4px no-repeat; line-height:1.4;} +a.topnav_login_a{color:#fff; display:inline-block;} +a.topnav_login_a:hover {color:#a1ebff;} +a.topnav_login_mes{color:#fff; width:10px;height:20px; padding-left:15px; background: url(../images/item.png) -84px -145px no-repeat; display:inline-block; vertical-align:top;} +a.topnav_login_mes:hover {color:#a1ebff;} +a.topnav_login_box{ color:#fff; font-size:14px; font-weight:bold; width:90px; display:inline-block;} +.menuArrow {background:url(../images/item.png) -20px -40px no-repeat;} +li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;} +a.topnav_login_box:hover {color:#a1ebff;} +.navRow1 {margin:0; padding:0;} +.navRow2 {margin:0; padding:0;} +.topnav_login_list{ border:1px solid #15bccf; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;} +.topnav_login_list a{color:#15bccf;} +.topnav_login_list li{ } + +/*主类容*/ +#Main{ background:#fff; margin-bottom:10px;} +#content{} +#content02{ background:#fff; padding:10px; margin-bottom:10px;} +/*主类容搜索*/ +#TopBar{ height:60px; margin-bottom:10px; background:#fff;} +.topbar_info02{ margin:5px 10px;width:480px; } +.topbar_info02 p{color: #7f7f7f;} +.search{ margin-top:8px; margin-left:71px;} +.search_form{margin-top:8px;margin-left:72px;} +.topbar_info{ width:350px; color:#5c5c5c; font-size:16px; margin-right:50px; line-height:1.3; padding-left:100px;} +a.search_btn{ display:block; background:#15bccf; color:#fff; width:60px; height:24px; text-align:center; padding-top:3px;} +a:hover.search_btn{ background: #0fa9bb;} +.search_text{ border:1px solid #15bccf; background:#fff; width:220px; height:25px; padding-left:5px; } +/*主类容左右分栏*/ +#LSide{ width:240px; } +#RSide{ width:730px; margin-left:10px; background:#fff; padding:10px; margin-bottom:10px;} + + +/*资源库*/ +.resources {width:730px; background-color:#ffffff; padding:10px;} +.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;} +.bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;} +.resourcesSelect {width:30px; height:34px; float:right; position:relative; margin-top:-6px;} +.resourcesSelected {width:25px; height:20px;} +.resourcesIcon {margin-top:15px; display:block; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat; width:25px; height:20px;} +.resourcesIcon:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;} +.resourcesType {width:50px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-30px; font-size:12px; color:#888888; display:none;} +a.resourcesGrey {font-size:12px; color:#888888;} +a.resourcesGrey:hover {font-size:12px; color:#15bccf;} +.resourcesBanner ul li:hover ul.resourcesType {display:block;} +ul li:hover ul {display:block;} +.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#64bdd9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;} +.uploadIcon {background:url(images/resource_icon_list.png) -35px 10px no-repeat; float:left; display:block; width:30px; height:30px; margin-left:-3px;} +a.uploadText {color:#ffffff; font-size:14px;} +.resourcesSearchloadBox {border:1px solid #e6e6e6; width:225px; float:right; background-color:#ffffff;} +.searchResource {border:none; outline:none; background-color:#ffffff; width:184px; height:32px; padding-left:10px; display:block; float:left;} +.searchIcon{width:31px; height:32px; background-color:#ffffff; background:url(images/resource_icon_list.png) -40px -15px no-repeat; display:block; float:left;} +.resourcesSearchBanner {height:34px; margin-bottom:10px;} +.resourcesListTab {width:730px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a;} +.resourcesListCheckbox {width:40px; height:40px; line-height:40px; text-align:center; vertical-align:middle;} +.resourcesCheckbox {padding:0px; margin:0px; margin-top:14px; width:12px; height:12px;} +.resourcesListName {width:135px; height:40px; line-height:40px; text-align:left;} +.resourcesListSize {width:110px; height:40px; line-height:40px; text-align:center;} +.resourcesListType {width:150px; height:40px; line-height:40px; text-align:center;} +.resourcesListUploader {width:130px; height:40px; line-height:40px; text-align:center;} +.resourcesListTime {width:165px; height:40px; line-height:40px; text-align:center;} +.resourcesList {width:730px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px;} +a.resourcesBlack {font-size:12px; color:#4c4c4c;} +a.resourcesBlack:hover {font-size:12px; color:#000000;} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 80px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 12px; + text-align: left; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.5; + color:#616060; + white-space: nowrap; +} +.dropdown-menu > li > a:hover{ + color: #ffffff; + text-decoration: none; + background-color: #64bdd9; + outline:none; +} + +/*发送资源弹窗*/ +/*.resourceShareContainer {width:100%; height:100%; background:#666; filter:alpha(opacity=50); opacity:0.5; -moz-opacity:0.5; position:absolute; left:0; top:0; z-index:-999;}*/ +.resourceSharePopup {width:300px; height:auto; border:3px solid #15bccf; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-150px; z-index:1000;} +.sendText {font-size:16px; color:#15bccf; line-height:16px; padding-top:20px; width:140px; display:inline-block;} +.resourcePopupClose {width:20px; height:20px; display:inline-block; float:right;} +.resourceClose {background:url(images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block;} +.resourcesSearchBox {border:1px solid #e6e6e6; width:225px; height:25px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;} +.searchResourcePopup {border:none; outline:none; background-color:#ffffff; width:184px; height:25px; padding-left:10px; display:inline-block; float:left;} +.searchIconPopup{width:31px; height:25px; background-color:#ffffff; background:url(images/resource_icon_list.png) -40px -18px no-repeat; display:inline-block; float:left;} +.courseSend {width:260px; height:15px; line-height:15px; margin-bottom:10px;} +.courseSendCheckbox {padding:0px; margin:0px; width:12px; height:12px; margin-right:10px; display:inline-block; margin-top:2px;} +.sendCourseName {font-size:12px; color:#5f6060;} +.courseSendSubmit {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#64bdd9; margin-right:25px; float:left;} +.courseSendCancel {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#c1c1c1; float:left} +a.sendSourceText {font-size:14px; color:#ffffff;} + +/*上传资源弹窗*/ +.resourceUploadPopup {width:400px; height:auto; border:3px solid #15bccf; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;} +.uploadText {font-size:16px; color:#15bccf; line-height:16px; padding-top:20px; width:140px; display:inline-block;} +.uploadBoxContainer {height:33px; line-height:33px; margin-top:10px; position:relative;} +.uploadBox {width:100px; height:33px; line-height:33px; text-align:center; vertical-align:middle; background-color:#64bdd9; border-radius:3px; float:left; margin-right:12px;} +a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat; width:100px; height:33px;} +.chooseFile {color:#ffffff; display:block; margin-left:32px;} +.uploadResourceIntr {width:250px; height:33px; float:left; line-height:33px; font-size:12px;} +.uploadResourceName {width:250px; display:inline-block; line-height:15px; font-size:12px; color:#444444; margin-bottom:2px;} +.uploadResourceIntr2 {width:250px; display:inline-block; line-height:15px; font-size:12px; color:#444444;} +.uploadType {margin:10px 0; border:1px solid #e6e6e6; width:100px; height:30px; outline:none; font-size:12px; color:#888888;} +.uploadKeyword {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:280px;} + + +/*新个人主页框架css*/ +.navContainer {width:100%; margin:0 auto; background-color:#15bccf;} +.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;} +.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} +.navHomepage {width:1000px; height:54px; background-color:#15bccf; margin:0 auto;} +.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:40px;} +.navHomepageMenu {margin-right:40px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;} +.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;} +.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none; float:left; padding-left:5px;; margin:0;} +.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;} +a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;} +.navHomepageNews {width:30px; display:block; float:right; margin-top:12px; position:relative;} +.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:29px; display:block;} +.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;} +.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;} +.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;} +.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;} +.navHomepageProfile ul li ul {display:none;} +.navHomepageProfile ul li:hover ul {display:block;} +.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;} +.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;} +.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;} +.homepagePortraitImage {width:208px; height:208px; margin:15px 16px 14px 16px; position:relative;} +.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} +.homepageEditProfile {background:url(../images/homepage_icon.png) -10px -35px no-repeat; width:55px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:4px; padding-left:25px; font-size:12px;} +.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:20px; float:left;} +.homepageImageSex {float:left; top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} +.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;} +.homepageImageBlock {margin:0 26px; float:left; text-align:center; display:inline-block;} +.homepageImageNumber {font-size:12px; color:#484848;} +a.homepageImageNumber:hover {color:#15bccf;} +.homepageImageText {width:26px; font-size:12px; color:#888888;} +.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;} +.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;} +.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;} +.homepageMenuSetting {display:inline-block; margin-left:155px;} +a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} +.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;} +.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;} +.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;} +.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;} +.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;} +.homepageRightBlock {} +.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} +.homepageNewsPortrait {width:40px; display:block; margin-top:7px;} +.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} +.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} +a.homepageWhite {color:#ffffff;} +a.homepageWhite:hover {color:#a1ebff} +a.newsGrey {color:#4b4b4b;} +a.newsGrey:hover {color:#000000;} +a.replyGrey {color:#888888;} +a.replyGrey:hover {color:#000000;} +a.newsBlue {color:#15bccf;} +a.newsBlue:hover {color:#0781b4;} +a.menuGrey {color:#808080;} +a.menuGrey:hover {color:#fe7d68;} + +/*个人主页右部分*/ +.homepagePostBrief {width:710px; margin:20px auto 0px auto; position:relative;} +.homepagePostPortrait {float:left; width:90px;} +.homepagePostDes {float:left; width:600px; margin-left:20px;} +.homepagePostTo {font-size:14px; color:#484848; margin-bottom:15px;} +.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:15px;} +.homepagePostSubmitContainer {height:30px; margin-bottom:15px;} +.homepagePostSubmit {font-size:14px; color:#888888; width:80px; height:30px; text-align:center; vertical-align:middle; line-height:30px; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px;} +.homepagePostIntro {font-size:12px; color:#888888; margin-bottom:15px;} +.homepagePostDeadline {font-size:12px; color:#888888; float:left; height:30px; line-height:30px; vertical-align:middle;} +.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1;} +.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} +.borderBottomNone {border-bottom:none !important;} +.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;} +.homepagePostReplyBannerTime{width:85px; display:inline-block;} +.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;} +.homepagePostReplyInputContainer {width:670px; margin:0px auto;} +.homepagePostReplyInput {width:663px; height:45px; max-width:663px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:20px auto 10px auto;} +.homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:70px; height:24px; float:left; padding-left:30px;} +.homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#15bccf;} +.homepagePostReplyCancel {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#888888; background-color:#cecece; margin-left:8px;} +.homepagePostReplyInputContainer2 {width:595px; margin:0px auto;} +.homepagePostReplyInput2 {width:588px; height:45px; max-width:588px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:0px auto 10px auto;} +.homepagePostReplyContainer {border-bottom:1px solid #e3e3e3; width:670px; margin:0px auto; margin-top:15px; min-height:65px;} +.homepagePostSetting {position:absolute; background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px; right:0px; top:0px;} +.homepagePostReplyPortrait {float:left; width:60px;} +.homepagePostReplyDes {float:left; width:595px; margin-left:15px;} +.homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:12px;} +.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} +.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} +.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf; height:30px; line-height:30px; vertical-align:middle;} +.homepagePostFileAtt {height:18px; line-height:18px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:12px; color:#888888;} +.homepagePostImageAtt {height:18px; line-height:18px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:12px; color:#888888;} + + + +/*底部*/ +#Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;} +.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} +.footerAbout{ width:585px; margin:0 auto;height:35px; line-height:35px; border-bottom:1px solid #efefef; } +.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} +.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;} +.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} +a.f_grey {color:#666666;} +a.f_grey:hover {color:#000000;} +/*意见反馈*/ +html{ overflow-x:hidden;} +.scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } +.side_content{width:154px; height:auto; overflow:hidden; float:left; } +.side_content .side_list {width:154px;overflow:hidden;} +.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;} +.show_btn span { display:none;} +.close_btn{width:24px;height:24px;cursor:pointer;} +.side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; } +.side_title {height:35px;} +.side_bottom { height:8px;} +.side_center {font-family:Verdana, Geneva, sans-serif; padding:0px 12px; font-size:12px;} +.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;} +.close_btn span { display:none;} +.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;} +.msgserver { margin-top:5px;} +.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; } +.opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;} +a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;} +a:hover.opnionButton{background: #0fa9bb; } +/* blue skin as the default skin */ +.side_title {background-position:-195px 0;} +.side_center {background:url(../images/blue_line.png) repeat-y center; } +.side_bottom {background-position:-195px -50px;} +a.close_btn {background-position:-44px 0;} +a:hover.close_btn {background-position:-66px 0;} +.show_btn {background-position:-119px 0;} +.msgserver a {color:#15bccf; } +.msgserver a:hover { text-decoration:underline; } + + +/***** Ajax indicator ******/ +#ajax-indicator { + position: absolute; /* fixed not supported by IE */ + background-color:#eee; + border: 1px solid #bbb; + top:35%; + left:40%; + width:20%; + font-weight:bold; + text-align:center; + padding:0.6em; + z-index:100000; + opacity: 0.5; +} + +html>body #ajax-indicator { position: fixed; } + +#ajax-indicator span { + background-position: 0% 40%; + background-repeat: no-repeat; + background-image: url(../images/loading.gif); + padding-left: 26px; + vertical-align: bottom; +} + +div.modal { + border-radius: 5px; + background: #fff; + z-index: 50; + padding: 4px; +} +.ui-widget-content { + border: 1px solid #ddd; + color: #333; +} +.ui-widget { + font-family: Verdana, sans-serif; + font-size: 1.1em; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; + zoom: 1; +} +.ui-widget-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-widget-overlay { + background: #666 url(http://forge.trustie.net/stylesheets/jquery/images/xui-bg_diagonals-thick_20_666666_40x40.png.pagespeed.ic.9mfuw_R0z1.png) 50% 50% repeat; + opacity: .5; + filter: Alpha(Opacity=50); +} +/***** end Ajax indicator ******/ + +/***** Flash & error messages ****/ +#errorExplanation, div.flash, .nodata, .warning, .conflict { + padding: 4px 4px 4px 30px; + margin-bottom: 12px; + font-size: 1.1em; + border: 2px solid; +} + +div.flash {margin-top: 8px;} + +div.flash.error, #errorExplanation { + background: url(../images/exclamation.png) 8px 50% no-repeat; + background-color: #ffe3e3; + border-color: #dd0000; + color: #880000; +} + +div.flash.notice { + background: url(../images/true.png) 8px 5px no-repeat; + background-color: #dfffdf; + border-color: #9fcf9f; + color: #005f00; +} + +div.flash.warning, .conflict { + background: url(../images/warning.png) 8px 5px no-repeat; + background-color: #FFEBC1; + border-color: #FDBF3B; + color: #A6750C; + text-align: left; +} + +.nodata, .warning { + text-align: center; + background-color: #FFEBC1; + border-color: #FDBF3B; + color: #A6750C; +} + +#errorExplanation ul { font-size: 0.9em;} +#errorExplanation h2, #errorExplanation p { display: none; } + +.conflict-details {font-size:80%;} +/***** end Flash & error messages ****/ + + +/*弹出框*/ +.black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);} +.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +.white_content02{display:none;position:fixed;top:15%;left:30%;width:200px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +.newhwork_content{ display:none;position:fixed;top:15%;left:30%;width:600px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +.floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;} +a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;} +a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} diff --git a/public/stylesheets/user_leftside.css b/public/stylesheets/user_leftside.css new file mode 100644 index 000000000..e33e2c7d6 --- /dev/null +++ b/public/stylesheets/user_leftside.css @@ -0,0 +1,68 @@ +/* 2015-06-26 */ +.topbar_info02{ margin:5px 10px;width:480px; } +.topbar_info02 p{color: #7f7f7f;} +.search{ margin-top:8px; float:right; margin-right:5px;} +/*信息*/ +.project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;} +.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;} +.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;} +.pr_info_logo:hover{ border:1px solid #64bdd9; } +.pr_info_join{} +a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; } +a:hover.pr_join_a{ background:#41a8c8;} +.pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background: #CCC;} +.pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;} +.pr_info_name:hover{ color:#3ca5c6;} +.pr_info_score{ font-size:14px; color:#3e4040; } +.pr_info_score a{ color:#ff7143;} +.pr_info_score a:hover{ color:#64bdd9;} + +.img_private{ background:url(../images/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; } +.info_foot_num{ color:#3ca5c6; } +.pr_info_foot{ color:#7f7f7f; margin-top:5px; } +.info_foot_num:hover{ color:#2390b2;} +.info_box{background:#fff; padding:10px;width:220px; } +.info_box ul li{ font-size:12px; color: #3e4040; line-height:1.7;} + +/*左侧导航*/ +.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;} +.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;} +.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;} +.subNav_jiantou:hover{color:#0781b4; } +.currentDd{color:#0781b4;} +.currentDt{background-color:#fff;} +.navContent{display: none;border-bottom:solid 1px #e5e3da; } +.navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333} +.navContent li a:hover{color:#fff;background-color:#b3e0ee} +a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;} +a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;} +a:hover.subnav_green{ background:#14ad5a;} + + +/*简介*/ +.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} +.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} +.course_description_none{max-height: none;} +.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} +.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} +/****标签(和资源库的tag样式一致)***/ +.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;} +.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;} +a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} +.submit{height:21px;border:0; cursor:pointer; background:url(images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } +.isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} +.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } +.re_tag a{ color:#0d90c3;} +.tag_h{ } +.tag_h span,.tag_h a{ margin-bottom:5px;} + + + + + + From 752fe93d724334c76ec08c4100700d90219006ff Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 18 Aug 2015 11:47:22 +0800 Subject: [PATCH 07/55] =?UTF-8?q?=E5=B7=B2=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7header=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- app/views/layouts/_logined_header.html.erb | 44 + app/views/layouts/_unlogin_header.html.erb | 40 + app/views/layouts/new_base_user.html.erb | 249 +-- app/views/users/show.html.erb | 211 +- public/images/menu_setting.png | Bin 0 -> 1130 bytes public/images/nav_logo.png | Bin 0 -> 3585 bytes public/javascripts/bootstrap.js | 2363 ++++++++++++++++++++ 8 files changed, 2649 insertions(+), 260 deletions(-) create mode 100644 app/views/layouts/_logined_header.html.erb create mode 100644 app/views/layouts/_unlogin_header.html.erb create mode 100644 public/images/menu_setting.png create mode 100644 public/images/nav_logo.png create mode 100644 public/javascripts/bootstrap.js diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 969d2d366..058cf971f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -534,7 +534,7 @@ class UsersController < ApplicationController end def show - render :layout=>'base_users_new' + render :layout=>'new_base_user' end def show_old diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb new file mode 100644 index 000000000..955ab5610 --- /dev/null +++ b/app/views/layouts/_logined_header.html.erb @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/app/views/layouts/_unlogin_header.html.erb b/app/views/layouts/_unlogin_header.html.erb new file mode 100644 index 000000000..ac322f07f --- /dev/null +++ b/app/views/layouts/_unlogin_header.html.erb @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 6b4550721..e8a92a397 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -1,12 +1,19 @@ - - 课程主页 - - - - + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_public', 'user_leftside', :media => 'all' %> + <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> + <%= javascript_heads %> + <%= javascript_include_tag "bootstrap"%> + <%= heads_for_theme %> + <%= call_hook :view_layouts_base_html_head %> + <%= yield :header_tags -%> @@ -45,50 +29,112 @@
-
Image -
- +
+ <%= image_tag(url_to_avatar(User.current),width:"208", height: "208") %> + <% if User.current.logged?%> + <% if User.current == @user%> +
+ <%#= link_to "编辑资料", my_account_path, :class => "homepageEditProfile c_white"%> +
+
+ <% else %> +
+ + <%if(@user.watched_by?(User.current))%> + <%= link_to "",watch_path(:object_type=> 'user',:object_id=>@user.id,:target_id=>@user.id),:class => "homepageFollow", :method => "delete",:remote => "true", :title => "取消关注"%> + <% else %> + <%= link_to "",watch_path(:object_type=> 'user',:object_id=>@user.id,:target_id=>@user.id),:class => "homepageFollow", :method => "post",:remote => "true", :title => "添加关注"%> + <% end %> +
+ <% end %> + <% end%>
+
-
jacknudt
+
+ <%= @user.login %> +
+ <% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %> + + <% end %>
-

这位童鞋很懒,什么也没有留下~! 

+

这位童鞋很懒,什么也没有留下~  + + + +

- +
+ 85 +
关注
- +
+ 24 +
粉丝
- +
+ 91 +
积分
- - - - +
+ 动态 +
+ + +
+ 留言 +
-
标签 -
@@ -97,6 +143,7 @@ <%= yield %>
+ <%= render :partial => 'layouts/new_feedback' %>
diff --git a/public/images/signature_edit.png b/public/images/signature_edit.png new file mode 100644 index 0000000000000000000000000000000000000000..b9415589ce1bccdd718598892be6abd1d5331e5d GIT binary patch literal 1112 zcmaJ=TWHfz7!Gz$ogH2#QZMK+dzj9(NxC)L!fJ16UB%AX)~%q((&TIlGdVFiv)z1I z^}#w2Uwlws6cld^QSd=@c)@`T_8=(3`6BE=5d@ha`Y_OwxlSLfA<4P$ec%6||NqX} z&W^p+Rhz3QimHyci%Bv%?Qdlz`F9N-`ACLMIGVvJ)QfYH38|2RvJk{IsShThqzoOO zgl!b%pw)B+XA=7b8EGEL#(46YLD&@47RVctJODAs!ah~^(_bDxrGcvW>26+MEg|ox7jy+Ox3?J@EI{yppZ=XxCeaBZ z$b`V>X>`jh#{r)Aa7{j*=Nf>Q<-80_Uf#_$2|ix%HiN~7Ceci#S4fJn#aLwJr~5HB z1cu4wa-LkH2bp~g*V@`@Yk0kGf^b_yI+pTo-Ks4qh|rQv)xav!fvqTI(IEEIB-7tV z(2ONn-C8UYDHxNN42JWt_K`}!MB@KYOn=@nC1Ssw*gG?OMPm5<*BF$s3JuT+|m1`NH8QQh1h&#Kdr{#1)Y|s6icoyEU4vk5zFc=a+PwqL}JmhT!tjW*p2B{o+lYH<_b@9c> zkGi!7R?Hr1XxVU>y6p~5t(kaPc)PlIt?*-g?W64@qvr~5j^4_;9y%u~gMoQDoElqU z?!G)*7u>os>6~SE?3%7jo*c=z;&U=MLDfH5UDI=_zUy@T#%Stuam-b5k$5|_EwF6j zYi9qGGur^za-q;tU3|JO>3n@}P4SB3e)HP*&u+SIgsO_)9dnIf`uR;)1+~mcZT}V? TJs8+`(Z1{PXoq+=+;i#|9UW)k literal 0 HcmV?d00001 diff --git a/public/javascripts/user.js b/public/javascripts/user.js index c7690a015..b032221f8 100644 --- a/public/javascripts/user.js +++ b/public/javascripts/user.js @@ -258,4 +258,19 @@ $(function(){ init_list_more_div(params) }); }); + +$(function(){ + $(".newsType").mouseover(function(){ + $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"}); + }); + $(".newsType").mouseout(function(){ + $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"}); + }); + $(".resourcesSelected").mouseover(function(){ + $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"}); + }); + $(".resourcesSelected").mouseout(function(){ + $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"}); + }); +}); //个人动态 end \ No newline at end of file diff --git a/public/stylesheets/new_public.css b/public/stylesheets/new_public.css index b4621805d..add80c7f2 100644 --- a/public/stylesheets/new_public.css +++ b/public/stylesheets/new_public.css @@ -289,9 +289,9 @@ a:hover.search_btn{ background: #0fa9bb;} .resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;} .bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;} .resourcesSelect {width:30px; height:34px; float:right; position:relative; margin-top:-6px;} -.resourcesSelected {width:25px; height:20px;} -.resourcesIcon {margin-top:15px; display:block; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat; width:25px; height:20px;} -.resourcesIcon:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;} +.resourcesSelected {width:25px; height:20px; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat;} +.resourcesSelected:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;} +.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;} .resourcesType {width:50px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-30px; font-size:12px; color:#888888; display:none;} a.resourcesGrey {font-size:12px; color:#888888;} a.resourcesGrey:hover {font-size:12px; color:#15bccf;} @@ -336,19 +336,19 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;} box-shadow: 0 6px 12px rgba(0, 0, 0, .175); } .dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.5; - color:#616060; - white-space: nowrap; + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.5; + color:#616060; + white-space: nowrap; } .dropdown-menu > li > a:hover{ - color: #ffffff; - text-decoration: none; - background-color: #64bdd9; - outline:none; + color: #ffffff; + text-decoration: none; + background-color: #64bdd9; + outline:none; } /*发送资源弹窗*/ @@ -403,26 +403,37 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no- .homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;} .homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;} .homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;} -.homepagePortraitImage {width:208px; height:208px; margin:15px 16px 14px 16px; position:relative;} +.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 16px 14px 16px; position:relative; border:1px solid #cbcbcb;} +.homepagePortraitImage:hover {border:1px solid #15bccf;} .homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} -.homepageEditProfile {background:url(../images/homepage_icon.png) -10px -35px no-repeat; width:55px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:4px; padding-left:25px; font-size:12px;} +.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} +.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;} +.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;} .homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:20px; float:left;} -.homepageImageSex {float:left; top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} +.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} .homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;} -.homepageImageBlock {margin:0 26px; float:left; text-align:center; display:inline-block;} +.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;} .homepageImageNumber {font-size:12px; color:#484848;} a.homepageImageNumber:hover {color:#15bccf;} -.homepageImageText {width:26px; font-size:12px; color:#888888;} +.homepageImageText {font-size:12px; color:#888888;} .homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;} .homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;} .homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;} +.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;} +.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;} +.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;} +a.coursesLineGrey {color:#484848; display:block;} +a.coursesLineGrey:hover {color:#ffffff;} +.homepageLeftMenuMore {height:18px;} +.homepageLeftMenuMore:hover {background-color:#b3e0ee;} +.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;} .homepageMenuSetting {display:inline-block; margin-left:155px;} a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} .homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;} .homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;} .homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;} .NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;} -.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;} +.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;} .homepageRightBlock {} .homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} .homepageNewsPortrait {width:40px; display:block; margin-top:7px;} @@ -434,14 +445,24 @@ a.homepageWhite {color:#ffffff;} a.homepageWhite:hover {color:#a1ebff} a.newsGrey {color:#4b4b4b;} a.newsGrey:hover {color:#000000;} -a.replyGrey {color:#888888;} -a.replyGrey:hover {color:#000000;} +a.replyGrey {color:#888888; display:block;} +a.replyGrey:hover {color:#4b4b4b;} a.newsBlue {color:#15bccf;} a.newsBlue:hover {color:#0781b4;} a.menuGrey {color:#808080;} a.menuGrey:hover {color:#fe7d68;} /*个人主页右部分*/ +.homepagePostType {width:180px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-170px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;} +.homepagePostTypeHomework {width:100px;} +.homepagePostTypeProject {width:80px;} +a.homepagePostTypeAssignment {background:url(../images/homepage_icon.png) -93px -318px no-repeat; padding-left:23px;} +a.homepagePostTypeNotice {background:url(../images/homepage_icon.png) -87px -280px no-repeat; padding-left:23px;} +a.homepagePostTypeForum {background:url(../images/homepage_icon.png) -10px -310px no-repeat; padding-left:23px;} +a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;} +a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;} +a.postTypeGrey {color:#888888;} +a.postTypeGrey:hover {color:#15bccf;} .homepagePostBrief {width:710px; margin:20px auto 0px auto; position:relative;} .homepagePostPortrait {float:left; width:90px;} .homepagePostDes {float:left; width:600px; margin-left:20px;} @@ -449,9 +470,10 @@ a.menuGrey:hover {color:#fe7d68;} .homepagePostTitle {font-size:14px; color:#484848; margin-bottom:15px;} .homepagePostSubmitContainer {height:30px; margin-bottom:15px;} .homepagePostSubmit {font-size:14px; color:#888888; width:80px; height:30px; text-align:center; vertical-align:middle; line-height:30px; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px;} -.homepagePostIntro {font-size:12px; color:#888888; margin-bottom:15px;} +.homepagePostSubmit:hover {background-color:#d8d8d8;} +.homepagePostIntro {font-size:12px; color:#888888;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; height:30px; line-height:30px; vertical-align:middle;} -.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1;} +.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:15px;} .homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} .borderBottomNone {border-bottom:none !important;} .homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;} @@ -461,19 +483,32 @@ a.menuGrey:hover {color:#fe7d68;} .homepagePostReplyInput {width:663px; height:45px; max-width:663px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:20px auto 10px auto;} .homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:70px; height:24px; float:left; padding-left:30px;} .homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#15bccf;} +.homepagePostReplySubmit:hover {background-color:#329cbd;} +a.postReplySubmit {color:#ffffff; display:block;} .homepagePostReplyCancel {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#888888; background-color:#cecece; margin-left:8px;} +.homepagePostReplyCancel:hover {background-color:#717171;} +a.postReplyCancel {color:#888888; display:block;} +a.postReplyCancel:hover {color:#ffffff;} .homepagePostReplyInputContainer2 {width:595px; margin:0px auto;} .homepagePostReplyInput2 {width:588px; height:45px; max-width:588px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:0px auto 10px auto;} .homepagePostReplyContainer {border-bottom:1px solid #e3e3e3; width:670px; margin:0px auto; margin-top:15px; min-height:65px;} -.homepagePostSetting {position:absolute; background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px; right:0px; top:0px;} +.homepagePostSetting {position:absolute; width:20px; height:20px; right:0px; top:0px;} +.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;} +.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;} +.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;} +a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;} +a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;} .homepagePostReplyPortrait {float:left; width:60px;} .homepagePostReplyDes {float:left; width:595px; margin-left:15px;} .homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:12px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} .homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostAssignTo {float:left; font-size:14px; color:#15bccf; height:30px; line-height:30px; vertical-align:middle;} -.homepagePostFileAtt {height:18px; line-height:18px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:12px; color:#888888;} -.homepagePostImageAtt {height:18px; line-height:18px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:12px; color:#888888;} +.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;} +.homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;} +.postAttSize {color:#888888; font-size:12px;} +a.postGrey {color:#484848;} +a.postGrey:hover {color:#000000;} From b6a2be72e42c9dba008ec5e16722c514ed201562 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 19 Aug 2015 15:13:30 +0800 Subject: [PATCH 09/55] =?UTF-8?q?=E8=B0=83=E6=95=B4CSS=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=9B=BE=E7=89=87=EF=BC=8C=E5=AE=9E=E7=8E=B0=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=8A=9F=E8=83=BD=E5=8A=A8=E6=80=81=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/new_base_user.html.erb | 60 ++++++++++++++++++----- public/images/homepage_icon.png | Bin 5479 -> 6191 bytes public/stylesheets/new_public.css | 4 +- 3 files changed, 50 insertions(+), 14 deletions(-) diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 3f5e2eb25..550f6653f 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -30,12 +30,13 @@
- <%= image_tag(url_to_avatar(User.current),width:"208", height: "208") %> + <%= image_tag(url_to_avatar(@user),width:"206", height: "206") %> <% if User.current.logged?%> <% if User.current == @user%>
- <%#= link_to "编辑资料", my_account_path, :class => "homepageEditProfile c_white"%> -
+
+ +
<% else %>
@@ -49,7 +50,6 @@ <% end %> <% end%>
-
<%= @user.login %> @@ -58,35 +58,49 @@ <% end %>
+ <%= link_to "编辑资料", my_account_path, :class => "fr gz_btn mr10"%>
-

这位童鞋很懒,什么也没有留下~  - - - -

+ <% if @user.user_extensions && @user.user_extensions.brief_introduction && !@user.user_extensions.brief_introduction.empty? %> +

+ <%= @user.user_extensions.brief_introduction %>  + + + +

+ <% else%> + <% if User.current == @user%> +

+ 这位童鞋很懒,什么也没有留下~  + + + +

+ <% end%> + <% end %>
- 85 + <%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
关注
- 24 + <%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber"%>
粉丝
- 91 + <%= link_to(format("%.2f" ,get_option_number(@user,1).total_score ).to_i, + {:controller => 'users', :action => 'show_new_score', :remote => true, :id => @user.id }, :class => 'homepageImageNumber',:id => 'user_score') %>
积分
@@ -95,7 +109,7 @@
- 动态 + <%= link_to "动态",user_activities_path(@user.id),:class => "homepageMenuText"%>
课程 @@ -103,12 +117,32 @@
+ + diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png index ad293b7ca465bc1ac958248acdd2df53b8e435d0..5b61ff102ba3ed881c6627a1085056e2c7f81b19 100644 GIT binary patch delta 5589 zcmZ`-2Ut_vvJP?pk*?&RNC!azibx9(X@Z2_gLIMJ2~B|$wun+9ML167lh)R0ltfT}^|Wo2d5@5!jk ztKSyjd+g<_r>CIq;}GcO5;0c4bxlpsNdT(bf+plIqR z&_4;KAK0mqa3*0t_jNUM<$lyPsu<6CY>Z4H<`1lAo+uSvufP5p;*Ds0aP<*J>h&t= z+q>GCZfon6*%kop$!?&bp|Nl%AGkb{pmwC5l}#W$S38X}mE=%qf|@jf>dH+Rjm6D( z0Aq2}oz97l(@F+#t)Tupq1nNQ?}dV`u?ahN+U5tn9HKm5YXS*hJN(MVGP*1?hem?K zv}3;$iu$%qj;3tgk!1JHAnuf9J$xlvjy-B|g5;s09J9?cUc=x@({~`Xckze;jVhvCF4|85;M)i$nebij|~Qc0Y$p)656j1^phh<=() zZ%FxRB~33qd1z4%-M9xnb`wXZl-H0-dQo%7fxvIld>#em^wMSNMiedPzHm+8rj(womF!;X5VDMdIdc6 zVV3=2h&^U{9qQ_#Scn?uyf8QJQkqyXnLRM0j~PY+Zq>T=TS4*4@o{BMf)P6^?Det>jcj?y z>q&(G_cNn;aP8*isJzO9V9s|3p-o}h_U6^0kwKLbnbg&%=m-0!V=t>|=_$7L2gqqm zsQ%A805b1==<{_$>*c%+!@wQn1@}*zxTl3n`y*M|NsEi08_i3APFWpE8_9@-5~Gys z&!zQ@gSCUgUe^=Z8Nqaf+oD+u^aERZGN5)UN>kzbllpz$ zJ^p0m+sTD)`k0d07>Cr7aP5)2|dc2=rOb3Qcy^#txbDOyAdI6|sp75?9Ocei~8dSSUzl zXY09m?Uso`4`9l1kQ`C{LNrtFR!;>Q zjpn!1HHuAF2wZk4;4X$fA2dfM5iPW;#M}Tni2iiS=PatAOyUu`rS8EgS7_;%t^yub z5zF-a>c<2cDZ`dRsK#bLx>ifEDlmN^jXG)ZJO|8GVoDsR$(K@=&{nmk!YiVd-c~M= zEZ7@`PJ~lOU%JuTdh>DdjCby6T35g|rr{cDqB?wdQU@0rFWn)?G|&POX(=+BPV0Ke>lyIA*ds-5!p+aW{%N&e~4iV+X$9+KBW% z(P=Zuko#JJT?!(=YBzpPEOoIc@dQpirD1@(Gqz7?Zsw(uShXl`wrdzXcGyujCX9G% z3-H%7HSLvr(>IcDPWJDZx^oLP14!5jdq}R#t02KeTixFKg@``xqSP-QgpCh_Ysx_t zll}t_$8xtLdzdq10}wQvtB9T}$%NyyUhV0!LeiUwr6rFJ6C|rhBGJ@#_|ZN0iSidx zLp!ig?+|kRQXryGY`^Yy_13B6mEaJAQ;iTps0pixQUtXjeA{!+fIOlN42N!&lM5t0 zv(wvr>PO-$9i;SNDj4-mLc4iH{8@=Xncq};;!^XM5L2ZPmj%*Go9yP|EqX;^+*Yqn z7GGj?a&haEkyMZR``>*v`#Pm-A!6}YQbWQz)#T1XeLQQ=XtH6iLq3$(Z@u1GN&~k_ zep$OytPq{d^|d7+#H(5!@Hh7DpW!HLa8XFlkPEtC&K;Ub_*pZ(J*Lya)NRVmZDJLu zgpmt>CZK=&U}XsC6mJ>!S&}_Ty&Fc}PM_!DF%vUET(p{98?lrPR+qJelq+|in^Q{|$xB9j4Ol&Ob6?m3raK{Ek<-bckSL`i@32%3%cObz+qiNn3f z7JCN5V2uQcxHYKH6MBMEmXD#L-y0#A5k3BH{$sZ_~C)Hm%;NVsaF8Cc_)ttTIZi4L(uCuf_X zvk%6U16q4%LDHkkYAN_aNuY6%=8}Gzv`F6vhw$STK+{A(RR zWX;6g1D=3Z#t}OA$+MS!ImBOdcSoJn?{m(!RJN>bYATA}yf&=@;3q82URz1&B{5jwe{wC8eHK&F4C0sk2reh(C` z&wmatIp@{alN$ib#)3{1JWO@Zes}?rFx(XKqrgjcRFlAz^O_ zLwqU{%xUoP!9Cef)}y7cX%-i!HMd{mIACxC~-j$X?}IgNSs8hxTz;nY`CLf4mmb z@Xpcr9?QjaVBYNA@k!3}_Tct(`{ggMNLOIj_j{`}S)^xnQy z*pZ&}D67cLSIY{0;g;jNo+y;d_+q!b%Am<+7DHr7>NUyM(b3Uqo!>rem?IE1ktVfk z=3FFf|NUf7OzNUK2V+M3qt@LFC;GlkOZ?ci5Nz)$aKgt-EG9C3eOQl$UOiq;0HZvc zYIrk8ekoJ%6#dq9nhPkq+G_`5)6Furk5{;l{XU*WN|zHGv*uuvAk_o}bO3Z?qNA%s zsmdRF<}Cw7ZO2+NYKBr@jF2NP5z$&@Q3`rMLB71cHMH5luWI{(z+aK zHaLk5vy(JHPIidA0@Nrj_i8o#S<)iojdi2dbeGgPG<_0Da)>z^XU3U=*yW1F3@6}i$Ea_=HWf%3fL4_4B5?ZX-#H-~o+ zMmEO$2%qy4{KNB1*p4Qfl@Zoi0~iS-{Nv_u@X7|%$%^jnWwWa@PaO2G?e1z1#f!H$ z5O?VJ-Tb<2HjZFU1)c zI781_D=k#ytafaK8eo9fxp3k|{fk^;;brtZwnNvq72ivKj}jI-;MD(Ek12nyC;eOg zSp$xtVspXoLrrFT38DV__ZxC9^>b=JZUzS(0=kk)UA0pOigcdW!@`L-G-|E{7{2F#;!s&TOmsynEP zG{4iKG6i8~w?+y>Y(3|!xUe5H(3kSj)HMEbq7Qukz5Ty$bB;`FF((N8J1l@d!0|Uo z{yI|rOOmA3#RGri!h>1sl=Hv(zYq9t-26F{6HM_bIuMb)(;Dx}>#rpxEw>a9;%mY) z$xfVldwHLd{9B2y0@Xz2gX_6zb=v33O=HE>-XMcwxhJQHJ*F55`{u5SpI8x5?{Bzg z&W?=_D~Yxe19SC|SdK+opyz-*)99E?TCa5N3QStq`n*nUNEEhWu~YpVELu@fUT)3h zo-`qA)wef^0B<$-C@^U)Z#!PIST$$qODQpArAvam^oYI%P_7xye*|6l&lvXiRmA@* zk<39kFjth8LWYSjJfB9LU6cA|60stjnhuftFj|l)?0!^1-TfCHV8z9W?_zjx5{aYW z%0-FzXG=NwWOOcC@8;u$wR8B{W8kKpSl>=cam1{w+Bq+Q>6Z&ieQ~zw)#!Yob{fmD z-21M%Ep}Tg(vFF-hZNwmKu@Z?Z%-3+v}tJ;%VR*=$(@-pk>Q5p%gZO zYDn~kZ_TMFoyzr-nZqXH14wI%r?14@tuQiS!RqZb*Mj5arAhb45$UVDx1uYd498n^ zY}8Z{Hw5Cl)*D_1_=v(_5zQbu|{>sj2zEJPLJc!TQlJ`0e9C{A(cu+Bd{ zx!|0~P#C8B-7~$&E20xHjBVe%JMf4crsD+9>SGg$^eWpqnqlK*z`E3bQ2Mn!4Iujj1|1&YEZU%49!z zw@3qzQmE!2cjCRbFrW0Yn22DGsSnSfl1uZ?Xm0b9#XPU@7+Dd4v0X}aN>u;i&{CVG z#>qg$=8k1rPmfj8-ZzPRg*WB8zN}NIQ_SLUcc&#LNpmvN!~UpQY#Q}BYao4>6k1C!aRDOHA+ce z$50cn4J+ib(~JB;seq1k<%2qhLqvn1WQn+gS|x$$L$SxQ$E6;PF!Q9$$I()i;pfWD zFgo=Nzji%KtN6$n{BXc@n2sE~&7ta_?jh$o=~RF#*s^x&m61p|xszF5HI2T64}=c~ zY`uZnX1O^Q#IZ0x`-tGZ$?F=^C3SFndLQMQ6Zb-D8W2>Ap}TN_ot}^fg%69H75?yW z9*|9UA9$8R%Su-ajixrGB%2UsK4vf-tH`%eT1yES&xIVS0(bX=57aq-{XUhXLx74F aRDJ%iQTC-cY%$llEP8 zql>2-06=C!OMNkF@1+Z?y2(dwB?Z-hO3SIsNl8noNl0i&LnWb_8Zs)H8gkN5h_s42 zH&GED%0c}iPd#l&xNE0Zqi%E;9So5&FLE9jS8*&@-5*{#{vBwA4_ zNpH?*C9e6r=22NdQ%5nbp{koeG3e^I+1V@cb*2Op93nK`c96U%Qj~A{x}QP$Va{l?hxjZizW)9dH%$16L@># z(bV}q#fKR?ds}EFPi21P_eyb*iIR0i*|y>~nYMzq*~C{)y}SLB^@9a^=`mg2-ETx; zaj4>0TqU+l}FrP><{|t27o2e$z6llG$Cqo$8DSR=TK} zDm)`A6@LcZk_lmTxgpDqPO+v6?JPGE6B|=XSenJu4`-Urvek~)uYe;0d)-z3GONvM`m99Ijqw6@U%H!;N%YH3z zDCv$lmyB9{OYsAxZd9HCR+yEa=K!013NdoO@mm9T@n{{y4l5W?xo7#PDohFROw>HA+u<( z40d|18$u5W9rXJ0ebxci%q6FjKTbA1b%dN*3@G!N!n&U9W0aAOg8|A@%<=fBxJ^RJ z;6Q?4_m=s}(Ae3{$*p_ufTdA6otW=3$!1-x`3?Ie%zIHyHo!nkp+0*ysRPHZmf$St z>En-!a=34K{s#gs2DkJ!O5IFEo<087b8q;L?JK*7b~CmmYD-5P2QS@>R$FxAp=4rQ zY@@S|&eT+sT;s+Lpt_=@fDMY1t9^5*u3}>~U6!Lkn`ly%G$LRPR_e;gT96b#Qfe`CXdwO@ zui%(Dl7)y%E7^*5hT$Wb*2Ja8BzC)>VP}b^JHZH7+we*a!VCWVTBQ#hhPgZV+R@%T zKZ_{Hjb4n?JluT-U+UwF#=xGtpwrsRu2098KKGSL?o}hf-{Ar-rv>6374)o<_t(7d z!hGDeL%ypno}nwRitq`(^!p}V@24QEH(-PmaNfDeqP?nQC5@YckOPEfsiQHyOROzs zf}Ww!oObFi+7z<8x(G0BiiDX>vsQs&gAZUV2EisL?oB@(Jj1KQ0h*{BPaSxSX7Oxb z3|UpbA0GPD!hVVBaa2I0xK|=USB0!QaEcQ12+AD z)1_3Y+ur=d7Wb~Q=w2w)I@f*EQ0UT$96FCSj{E;$H1U_^7wRy;`4;2vr9w0wXLe4- z1jd75$1Y}p$YVb%%TkcCLn){}kb|pB5*6PX%y43zda}AyRFH1*LyU^%$>mLlR0z-Q zXNHcYn7Lb$qjaYFd`qby<(gP;v{Ia%RHSIHBU@u&P+MV}E#FX= z{(F>>$w^^LR43@Nh&?D-)2i}jhwGIkpkCX1QW7|JSDyWW|a7P&aB z21LS|#OC+qgcarH8a|2#_=sP7Ih=W3Dy%iqe#Tn(V0-p{a&fA=yOPKI>xz}1CZ&;| z-+dstL=gr$=PKu{+|SQdC{wr*&2)NBem*_eG1O?~F1h=8$SGp^#o|WH{#J0&JF<%J zFY#FaDNQ~Ha{cg-+lL|i@PX^`Z`tV5?(Y3jk-_ioKPv=}<$ps=EM-y~OQ(nz>n1`C zuH9aZbtVRSo81M5cUobId(_q^MP!W+&y_EHnlrmF_g? zh<-i}9o~yS-IMMg+Il>U7xnBo)g=f?E1$ocEk+;>9G9SuTTgf5QD>W#$7 z?K~K$5OM7eQ|#9|?ER+q40(Vz99T-bNQAQG<7|=US3y?Q#|`d2<}KfvzrKCpYcX;E z7;4Ykh#jG+E)5TMsrdN*ry|dOGkOP7EcK>MzIIKaZaA+}+ z*Rmum(i9b$+}h@ITp~TU5cIJ_6ql#DxRh}mST;;y4{-~yerqr92 z$?NJV4lprO$MUc=gPtQGH3oq{<_p;%DzezJ?cC}q1cdyi%L zDXux}$X2|ypk)W8hvpp75*`85JlVT!=D*u*On9MI<(G{8`UqSzTagnRd3cs;x)VeA z)XDfn+GD)1r+)o_ECXp--ldk!kjxe`Z)9~MUNQ{>%RUG+_q`=G^SR5(|8(ow_*to& zZ^))t5R#4S>I9?yQuz+Og}7OLQ%hH%QoUBEap{Q?L4)W(vJj_l*qXDV-qEvgVpM-R z#c2Kh=Vort?fXfuTJ(nIi~)DO(b-+AvLx@mnQ1A`0Tl21`CG?}M(}1>eKWY>rCU1} zoT_9BPLxu#>^lbal=LKHLIb3rR|l?@c9andk)+K3{7%tiCd$eZYn68sEf?uBf}FZ^n8{GdC_IA)tzeXgV^zN9zfQ;c-^eYun_)@ zE6ax_KG>qux}Ptc$sKMb|7g@X;?sk<1S643=IfOl&cbB9$GkPz-?e<+6Et6g<+sgR z7BM|;vbS;Z}Vs_|>%L`JVTmn3y1UwwtlH2e(ZLl(wfa)Y6i^%tpyGeD$GlrfUn z7aGKJGv4aX9W@-3a||ADOr+GQq4i%nZf2x1UoeY*DALPyT+NY=(~WcEX9Z<6DY|`x z%#rO-ypK~ESlXu#3c8-Iv)Tfcj&CwaRk)wN(f5Zjykq+*?Nq@BIt56=^#Y0?)Lw6--uiR3D!a2Yiz^c0E_>fQscX;L+q_+}e^_ zC4XYvW|?I2b?l-;c6H`8+6#|oWky)nw@MX-@iQcGbzbnHHFaPnqv3Tq=zzy*9S~bm zlZB|)03DU*Ugn-9Gcf+HDGd8(5B#eW{=$E$Z64&GlYeLauPT5nKgqzPxkNuDA}Szr z1LGC~-6zHjwg#LVulM;%rrDqe$|Bh_=r#^`^S(k-Tq`xjtV^j+3Tk-30beBWnpzng z)O$>`g!L_Gy(K2*^F_D1rUqsSRL1BXiCg4^pXA)NPO_x&i-df&M0T{!#@CdF&AweT zxgmSmOgiE;@z4$4q1B~+6=!dTU$463``lzgG!F7;TvsE^%? zt#aVKcGAm$-5l3|dFc;0O(5^wnMjlZIGgj*PfG?o=Pcvh1$}W`gQKbpHA z_F>gN^v9BX;%UH-rAwd6ELt73vqOuHJ*8oIhEcr+AA40ZeJ`6)U4t(r;|>Y7gP{=r zF5QZZPLsQ;V0ScCnhM<-&&>p_i7PYoE=5{t-5i$CD!5ZdCq&(N42Q_%(wWra&K074bw26HhQ>g&h!YiYdZU6%_Mz;HKUA)TlY+UT?&oMuc zvln&N+}$E??Y_P`iht{POY@PfvG)Jc%O!s@Fm!rJI)H_vslJmVd;z*>2lH zymQ?Wpcg|09l@+bUw8bAlT2aRMx%Wvr2i2lvz(ERgsrW`D}f& z&Bbkx;7e4kZdD6;Y8YAylU~T>5NE&QAF45`PreEl1a&q=zts=rA1+u|aUSC(&xpAM zw>d<>q-js9INsWbd?DF2h)G5k>KCQw5T*k-IW`&qW0O#NeFHMb_26zNWQcjMW8dnq z|GO&v8?ShPV<(`jddz?OV9NY}c?OVaP2laT33;uxZxPu%6x5szFrKG9rr zp}MbWNDSHIOCtrS$T$9^`>@g>!T$SCfgPati2FYvxyoteW!lAYJ&pzK(~5sSGSPIMm{ptU7p~nT z9GBgrQDw5oieysBGD3R_U>oI5Z&G5x&kZDv{54s0&ZOqSu(u~{C=I4ia7sWwhUn#A zrJRS)uUhl??+?4b#{Vj!Kd;UL^2)HWb$EEVHGGGxkaKYkTG&Hl`=*9qyy)>=88l+_ z;>bn^HzJ0gTZsE=BArZTDJ!Tx@nsLkB8%dADcQM5e!J~ap4FB|*cYXp81uIQ{vguo Date: Wed, 19 Aug 2015 15:18:12 +0800 Subject: [PATCH 10/55] =?UTF-8?q?=E7=94=A8=E6=88=B7show=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/new_base_user.html.erb | 1 + app/views/users/show.html.erb | 143 ++++++++++++++--------- 2 files changed, 87 insertions(+), 57 deletions(-) diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 550f6653f..fd9ac678f 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -119,6 +119,7 @@
+ <% end %> + <% if ufm.forge_message_type == "News" %> + + <% end %> + <% if ufm.forge_message_type == "Comment" %> +
    +
  • <%= image_tag(url_to_avatar(ufm.forge_message.author), :width => "30", :height => "30") %>
  • +
  • <%=link_to ufm.forge_message.author, user_path(ufm.forge_message.author), :class => "newsBlue" %>
  • +
  • 回复了新闻
  • +
  • + <%= link_to "#{ufm.forge_message.comments.html_safe}", + {:controller => 'news', :action => 'show', :id => ufm.forge_message.commented.id },:class =>"#{ufm.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ufm.forge_message.comments.html_safe}"%>
  • +
  • <%= time_tag(ufm.forge_message.created_on).html_safe %>
  • +
+ <% end %> <% end %> <% end %> - <% end %> - <%# 公共贴吧 %> - <% unless @user_memo_messages.nil? %> - <% @user_memo_messages.each do |urm| %> - <% if urm.memo_type == "Memo" %> - + <%# 公共贴吧 %> + <% unless @user_memo_messages.nil? %> + <% @user_memo_messages.each do |urm| %> + <% if urm.memo_type == "Memo" %> + + <% end %> <% end %> <% end %> - <% end %> - <%# 用户留言消息 %> - <% unless @user_feedback_messages.nil? %> - <% @user_feedback_messages.each do |ufm| %> - <% if ufm.journals_for_message_type == "JournalsForMessage" %> - + <% end %> <% end %> <% end %> + <% else %> +
暂无消息!
<% end %> -<% else %> -
暂无消息!
-<% end %> -
+
+
+
-
+ + + + + + + + + + + diff --git a/public/stylesheets/new_public.css b/public/stylesheets/new_public.css index 17b17f59f..651c760d5 100644 --- a/public/stylesheets/new_public.css +++ b/public/stylesheets/new_public.css @@ -679,4 +679,18 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} .uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;} .showpicBox{width:133px; height:250px; background:#f2f2f5; float:left; margin-left:20px; text-align:center; padding-top:15px; color:#666;} .mr15{ margin-right:15px;} -.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;} \ No newline at end of file +.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;} + +/*消息*/ +.newsReadSetting{ + width: 700px; + background-color: #F6F6F6; + border-bottom: 1px solid #EEE; + margin: 10px auto; + height: 39px; + line-height: 39px; + vertical-align: middle; + font-size: 14px; + color: #7A7A7A; + padding-left: 10px; +} \ No newline at end of file From 3919f1580669e1ce2865c0ef0a222df76f1afdfa Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 24 Aug 2015 14:52:23 +0800 Subject: [PATCH 36/55] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A0=B7=E5=BC=8F=E5=8F=8A=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_logined_header.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 94597eff3..5c1ec89a8 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -38,10 +38,9 @@
\ No newline at end of file From 12b89e2c8130991509f82927ddb457d0e13f8b7d Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 24 Aug 2015 14:53:30 +0800 Subject: [PATCH 37/55] =?UTF-8?q?=E5=8F=AF=E6=8B=96=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E6=A1=86=E6=9A=82=E6=97=B6=E5=81=9A=E4=B8=8D=E4=BA=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_resource.html.erb | 48 ++++++++++++++++++++++++++ public/stylesheets/new_public.css | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb index 254afb79f..c36fdc293 100644 --- a/app/views/users/user_resource.html.erb +++ b/app/views/users/user_resource.html.erb @@ -447,6 +447,54 @@ $(".resourcesList").click(function(e) { lastSendType = sendType; } +// var iWidth = document.documentElement.clientWidth; +// var iHeight = document.documentElement.clientHeight; +// var moveX = 0; +// var moveY = 0; +// var moveTop = 0; +// var moveLeft = 0; +// var moveable = false; +// var docMouseMoveEvent = document.onmousemove; +// var docMouseUpEvent = document.onmouseup; +// $("#upload_box").mousedown(function() { +// var evt = getEvent(); +// moveable = true; +// moveX = evt.clientX; +// moveY = evt.clientY; +// +// moveTop = parseInt($("#upload_box").css('top')); +// moveLeft = parseInt($("#upload_box").css('left')); +// +// $(document).mousemove( function() { +// if (moveable) { +// var evt = getEvent(); +// var x = moveLeft + evt.clientX - moveX; +// var y = moveTop + evt.clientY - moveY; +// if ( x > 0 &&( x + 322 < iWidth) && y > 0 && (y + 257 < iHeight) ) { +// $("#upload_box").css('left', x + "px"); +// $("#upload_box").css('top', y + "px"); +// console.log( moveX) +// console.log( moveY) +// } +// } +// }); +// $(document).mouseup (function () { +// if (moveable) { +// document.onmousemove = docMouseMoveEvent; +// document.onmouseup = docMouseUpEvent; +// moveable = false; +// moveX = 0; +// moveY = 0; +// moveTop = 0; +// moveLeft = 0; +// } +// }); +// }); +// +// // 获得事件Event对象,用于兼容IE和FireFox +// function getEvent() { +// return window.event || arguments.callee.caller.arguments[0]; +// } diff --git a/public/stylesheets/new_public.css b/public/stylesheets/new_public.css index 87e9be920..40b049b7e 100644 --- a/public/stylesheets/new_public.css +++ b/public/stylesheets/new_public.css @@ -515,7 +515,7 @@ a.sendSourceText {font-size:14px; color:#ffffff;} input.sendSourceText {font-size:14px;color:#ffffff;background-color:#64bdd9;} .resourcesSendTo {float:left; height:20px; margin-top:15px;} .resourcesSendType {border:1px solid #e6e6e6; width:60px; height:24px; outline:none; font-size:14px; color:#888888;} -.courseReferContainer {float:left; max-height:120px;margin-right:16px; overflow:scroll; overflow-x:hidden;} +.courseReferContainer {float:left; max-height:120px;margin-right:16px;margin-bottom:10px; overflow:scroll; overflow-x:hidden;} /*新个人主页框架css*/ From 4d0abbc4d38965473934434b166fc0802499b563 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 24 Aug 2015 15:03:45 +0800 Subject: [PATCH 38/55] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=80=BB=E6=95=B0=E5=92=8C=E6=9C=AA=E8=AF=BB=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 48d0d8472..5ca43fbdc 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -29,9 +29,11 @@
+ <% if params[:type] == nil? %>
有 8 封未读全部设为已读
+ <% end %>
<% if @new_message_count >0 %> <%# 课程消息 %> From bf596d7b4b514fcea443d7ec9b2dcaa9bcb8b2a9 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 24 Aug 2015 17:44:13 +0800 Subject: [PATCH 39/55] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=B0=E9=97=BBviewe?= =?UTF-8?q?d=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/news_controller.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 1a8e75b54..35bbb82a7 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -99,6 +99,18 @@ class NewsController < ApplicationController end def show + query_forge_news = @news.forge_messages + query_forge_news.each do |query| + if User.current.id == query.user_id + query.update_attributes(:viewed => true) + end + end + query_course_news = @news.course_messages + query_course_news.each do |query| + if User.current.id == query.user_id + query.update_attributes(:viewed => true) + end + end cs = CoursesService.new result = cs.show_course_news params,User.current @news = result[:news] From f0483b6de8c5e524b215c20015bf55474ad7fc51 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 24 Aug 2015 17:45:00 +0800 Subject: [PATCH 40/55] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=B0=E9=97=BBviewe?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 12 ++++++------ db/schema.rb | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7b0f23923..ca30bbcd6 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -113,12 +113,12 @@ class UsersController < ApplicationController forge_querys = @user.forge_messages user_querys = @user.user_feedback_messages forum_querys = @user.memo_messages - if User.current.id == @user.id - course_querys.update_all(:viewed => true) - forge_querys.update_all(:viewed => true) - user_querys.update_all(:viewed => true) - forum_querys.update_all(:viewed => true) - end + # if User.current.id == @user.id + # course_querys.update_all(:viewed => true) + # forge_querys.update_all(:viewed => true) + # user_querys.update_all(:viewed => true) + # forum_querys.update_all(:viewed => true) + # end @new_message_count = @user.forge_messages.count + @user.memo_messages.count + @user.course_messages.count + @user.user_feedback_messages.count case params[:type] when nil diff --git a/db/schema.rb b/db/schema.rb index 1c77ff04b..d21f421ec 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150820025358) do +ActiveRecord::Schema.define(:version => 20150820022416) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -572,6 +572,16 @@ ActiveRecord::Schema.define(:version => 20150820025358) do t.datetime "updated_at", :null => false end + create_table "forum_messages", :force => true do |t| + t.integer "user_id" + t.integer "forum_id" + t.integer "memo_message_id" + t.string "memo_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "forums", :force => true do |t| t.string "name", :null => false t.text "description" @@ -1307,7 +1317,6 @@ ActiveRecord::Schema.define(:version => 20150820025358) do t.datetime "updated_at", :null => false t.integer "late_penalty", :default => 0 t.integer "absence_penalty", :default => 0 - t.integer "system_score" end create_table "student_works_evaluation_distributions", :force => true do |t| @@ -1525,6 +1534,7 @@ ActiveRecord::Schema.define(:version => 20150820025358) do t.string "identity_url" t.string "mail_notification", :default => "", :null => false t.string "salt", :limit => 64 + t.integer "gid" end add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" From d575ce5e5f07122b91056acf4b6ac3fbeeb1a30c Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 24 Aug 2015 17:51:19 +0800 Subject: [PATCH 41/55] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/forge_message.rb | 16 ++++++++++++++++ app/models/message_all.rb | 7 +++++++ app/views/users/user_messages.html.erb | 6 +++--- db/migrate/20150824092300_create_message_alls.rb | 12 ++++++++++++ spec/factories/message_alls.rb | 9 +++++++++ spec/models/message_all_spec.rb | 5 +++++ 6 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 app/models/message_all.rb create mode 100644 db/migrate/20150824092300_create_message_alls.rb create mode 100644 spec/factories/message_alls.rb create mode 100644 spec/models/message_all_spec.rb diff --git a/app/models/forge_message.rb b/app/models/forge_message.rb index 1543fab58..3f83383e9 100644 --- a/app/models/forge_message.rb +++ b/app/models/forge_message.rb @@ -13,8 +13,24 @@ class ForgeMessage < ActiveRecord::Base belongs_to :forge_message ,:polymorphic => true belongs_to :project belongs_to :user + has_many :message_alls, :class_name => 'MessageAll',:as =>:message validates :user_id,presence: true validates :project_id,presence: true validates :forge_message_id,presence: true validates :forge_message_type, presence: true + after_save :add_user_activity + + def add_user_activity + message_all = MessageAll.where("message_type = '#{self.class.to_s}' and message_id = '#{self.id}'").first + if message_all + message_all.save + else + message_all = MessageAll.new + message_all.message_id = self.id + message_all.message_type = self.class.to_s + message_all.container_type = "Project" + message_all.container_id = self.project_id + message_all.save + end + end end diff --git a/app/models/message_all.rb b/app/models/message_all.rb new file mode 100644 index 000000000..28982d004 --- /dev/null +++ b/app/models/message_all.rb @@ -0,0 +1,7 @@ +class MessageAll < ActiveRecord::Base + attr_accessible :container_id, :container_type, :message_id, :message_type + # 虚拟关联---项目消息表/课程消息表/用户留言消息表/贴吧消息表 + belongs_to :message ,:polymorphic => true + # 虚拟关联---项目/课程 + belongs_to :container ,:polymorphic => true +end diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 5ca43fbdc..e8bfac941 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -29,7 +29,7 @@
- <% if params[:type] == nil? %> + <% if params[:type].nil? %>
有 8 封未读全部设为已读
@@ -219,7 +219,7 @@
  • <%=link_to urm.memo.author, user_path(urm.memo.author), :class => "newsBlue" %>
  • -
  • 新建贴吧帖子
  • +
  • <%= urm.memo.parent_id.nil? ? "新建贴吧帖子" : "回复贴吧帖子" %>
  • <%= link_to urm.memo.content.html_safe, forum_memo_path(urm.memo.forum_id, urm.memo.parent_id ? urm.memo.parent_id: urm.memo.id),:class => "newsGrey" , :title => "#{urm.memo.content.html_safe}" %>
  • @@ -241,7 +241,7 @@
  • <%= ufm.journals_for_message.reply_id == 0 ? "给你留言了" : "回复了你的留言" %>
  • - <%= link_to ufm.journals_for_message.notes.html_safe, feedback_path(ufm.journals_for_message.jour_id), :class => "newsGrey", :title => "#{ufm.journals_for_message.notes.html_safe}" %> + <%= link_to ufm.journals_for_message.notes.html_safe, feedback_path(ufm.journals_for_message.jour_id), :class => "newsGrey", :title => "#{ufm.journals_for_message.notes}".html_safe %>
  • <%= time_tag(ufm.journals_for_message.created_on).html_safe %>
  • diff --git a/db/migrate/20150824092300_create_message_alls.rb b/db/migrate/20150824092300_create_message_alls.rb new file mode 100644 index 000000000..0a1d51a78 --- /dev/null +++ b/db/migrate/20150824092300_create_message_alls.rb @@ -0,0 +1,12 @@ +class CreateMessageAlls < ActiveRecord::Migration + def change + create_table :message_alls do |t| + t.string :message_type + t.integer :message_id + t.string :container_type + t.integer :container_id + + t.timestamps + end + end +end diff --git a/spec/factories/message_alls.rb b/spec/factories/message_alls.rb new file mode 100644 index 000000000..4805f0de3 --- /dev/null +++ b/spec/factories/message_alls.rb @@ -0,0 +1,9 @@ +FactoryGirl.define do + factory :message_all do + message_type "MyString" +message_id 1 +container_type "MyString" +container_id 1 + end + +end diff --git a/spec/models/message_all_spec.rb b/spec/models/message_all_spec.rb new file mode 100644 index 000000000..33ac896e2 --- /dev/null +++ b/spec/models/message_all_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe MessageAll, :type => :model do + pending "add some examples to (or delete) #{__FILE__}" +end From 2d05d1f7d00625a5843be37effd32bcac07eb535 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 24 Aug 2015 17:51:44 +0800 Subject: [PATCH 42/55] 0 --- db/schema.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 1c77ff04b..8c87a6db7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150820025358) do +ActiveRecord::Schema.define(:version => 20150824092300) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -874,6 +874,15 @@ ActiveRecord::Schema.define(:version => 20150820025358) do t.integer "viewed_count", :default => 0 end + create_table "message_alls", :force => true do |t| + t.string "message_type" + t.integer "message_id" + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "messages", :force => true do |t| t.integer "board_id", :null => false t.integer "parent_id" @@ -1307,7 +1316,6 @@ ActiveRecord::Schema.define(:version => 20150820025358) do t.datetime "updated_at", :null => false t.integer "late_penalty", :default => 0 t.integer "absence_penalty", :default => 0 - t.integer "system_score" end create_table "student_works_evaluation_distributions", :force => true do |t| @@ -1525,6 +1533,7 @@ ActiveRecord::Schema.define(:version => 20150820025358) do t.string "identity_url" t.string "mail_notification", :default => "", :null => false t.string "salt", :limit => 64 + t.integer "gid" end add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" From 7961e3db6fedc16b5d28051a533a48ae90ade000 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 24 Aug 2015 22:47:48 +0800 Subject: [PATCH 43/55] =?UTF-8?q?=E5=BB=BA=E7=AB=8B=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course_message.rb | 7 ++++ app/models/forge_message.rb | 19 +++------ app/models/memo.rb | 2 +- app/models/memo_message.rb | 6 +++ app/models/message_all.rb | 7 ---- app/models/user_feedback_message.rb | 6 +++ ... => 20150824133916_create_message_alls.rb} | 5 +-- db/schema.rb | 41 ++++++++----------- spec/factories/message_alls.rb | 9 ---- spec/models/message_all_spec.rb | 5 --- 10 files changed, 45 insertions(+), 62 deletions(-) delete mode 100644 app/models/message_all.rb rename db/migrate/{20150824092300_create_message_alls.rb => 20150824133916_create_message_alls.rb} (76%) delete mode 100644 spec/factories/message_alls.rb delete mode 100644 spec/models/message_all_spec.rb diff --git a/app/models/course_message.rb b/app/models/course_message.rb index 59089829d..c15c2fc65 100644 --- a/app/models/course_message.rb +++ b/app/models/course_message.rb @@ -5,8 +5,15 @@ class CourseMessage < ActiveRecord::Base belongs_to :course_message ,:polymorphic => true belongs_to :course belongs_to :user + has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy + validates :user_id,presence: true validates :course_id,presence: true validates :course_message_id,presence: true validates :course_message_type, presence: true + after_create :add_user_message + + def add_user_message + self.message_alls << MessageAll.new(:user_id => self.user_id) + end end diff --git a/app/models/forge_message.rb b/app/models/forge_message.rb index 3f83383e9..2d05972ab 100644 --- a/app/models/forge_message.rb +++ b/app/models/forge_message.rb @@ -13,24 +13,15 @@ class ForgeMessage < ActiveRecord::Base belongs_to :forge_message ,:polymorphic => true belongs_to :project belongs_to :user - has_many :message_alls, :class_name => 'MessageAll',:as =>:message + has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy + validates :user_id,presence: true validates :project_id,presence: true validates :forge_message_id,presence: true validates :forge_message_type, presence: true - after_save :add_user_activity + after_create :add_user_message - def add_user_activity - message_all = MessageAll.where("message_type = '#{self.class.to_s}' and message_id = '#{self.id}'").first - if message_all - message_all.save - else - message_all = MessageAll.new - message_all.message_id = self.id - message_all.message_type = self.class.to_s - message_all.container_type = "Project" - message_all.container_id = self.project_id - message_all.save - end + def add_user_message + self.message_alls << MessageAll.new(:user_id => self.user_id) end end diff --git a/app/models/memo.rb b/app/models/memo.rb index f1f9029c1..c30616558 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -79,7 +79,7 @@ class Memo < ActiveRecord::Base receivers << self.forum.creator end # 添加发帖人 - if self.forum.creator_id != self.parent.author_id + if self.author_id != self.parent.author_id receivers << self.parent.author end end diff --git a/app/models/memo_message.rb b/app/models/memo_message.rb index 051fac317..9be00ce14 100644 --- a/app/models/memo_message.rb +++ b/app/models/memo_message.rb @@ -3,9 +3,15 @@ class MemoMessage < ActiveRecord::Base belongs_to :memo belongs_to :user + has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy validates :user_id,presence: true validates :forum_id,presence: true validates :memo_id,presence: true validates :memo_type, presence: true + after_create :add_user_message + + def add_user_message + self.message_alls << MessageAll.new(:user_id => self.user_id) + end end diff --git a/app/models/message_all.rb b/app/models/message_all.rb deleted file mode 100644 index 28982d004..000000000 --- a/app/models/message_all.rb +++ /dev/null @@ -1,7 +0,0 @@ -class MessageAll < ActiveRecord::Base - attr_accessible :container_id, :container_type, :message_id, :message_type - # 虚拟关联---项目消息表/课程消息表/用户留言消息表/贴吧消息表 - belongs_to :message ,:polymorphic => true - # 虚拟关联---项目/课程 - belongs_to :container ,:polymorphic => true -end diff --git a/app/models/user_feedback_message.rb b/app/models/user_feedback_message.rb index 98b53e973..1dda157d6 100644 --- a/app/models/user_feedback_message.rb +++ b/app/models/user_feedback_message.rb @@ -3,8 +3,14 @@ class UserFeedbackMessage < ActiveRecord::Base belongs_to :journals_for_message belongs_to :user + has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy validates :user_id,presence: true validates :journals_for_message_id,presence: true validates :journals_for_message_type, presence: true + after_create :add_user_message + + def add_user_message + self.message_alls << MessageAll.new(:user_id => self.user_id) + end end diff --git a/db/migrate/20150824092300_create_message_alls.rb b/db/migrate/20150824133916_create_message_alls.rb similarity index 76% rename from db/migrate/20150824092300_create_message_alls.rb rename to db/migrate/20150824133916_create_message_alls.rb index 0a1d51a78..aa4a986a8 100644 --- a/db/migrate/20150824092300_create_message_alls.rb +++ b/db/migrate/20150824133916_create_message_alls.rb @@ -1,10 +1,9 @@ class CreateMessageAlls < ActiveRecord::Migration def change create_table :message_alls do |t| - t.string :message_type + t.integer :user_id t.integer :message_id - t.string :container_type - t.integer :container_id + t.string :message_type t.timestamps end diff --git a/db/schema.rb b/db/schema.rb index 6301249d5..0bd96d52d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,15 +11,14 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150824092300) do +ActiveRecord::Schema.define(:version => 20150824133916) do create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" end add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" @@ -572,16 +571,6 @@ ActiveRecord::Schema.define(:version => 20150824092300) do t.datetime "updated_at", :null => false end - create_table "forum_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_message_id" - t.string "memo_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "forums", :force => true do |t| t.string "name", :null => false t.text "description" @@ -885,12 +874,19 @@ ActiveRecord::Schema.define(:version => 20150824092300) do end create_table "message_alls", :force => true do |t| - t.string "message_type" + t.integer "user_id" t.integer "message_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "message_publics", :force => true do |t| + t.integer "message_id" + t.string "massage_type" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "messages", :force => true do |t| @@ -1543,7 +1539,6 @@ ActiveRecord::Schema.define(:version => 20150824092300) do t.string "identity_url" t.string "mail_notification", :default => "", :null => false t.string "salt", :limit => 64 - t.integer "gid" end add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" diff --git a/spec/factories/message_alls.rb b/spec/factories/message_alls.rb deleted file mode 100644 index 4805f0de3..000000000 --- a/spec/factories/message_alls.rb +++ /dev/null @@ -1,9 +0,0 @@ -FactoryGirl.define do - factory :message_all do - message_type "MyString" -message_id 1 -container_type "MyString" -container_id 1 - end - -end diff --git a/spec/models/message_all_spec.rb b/spec/models/message_all_spec.rb deleted file mode 100644 index 33ac896e2..000000000 --- a/spec/models/message_all_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -RSpec.describe MessageAll, :type => :model do - pending "add some examples to (or delete) #{__FILE__}" -end From 5306d7e2a4628ee9fb2a767e721df922ac6bda09 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 24 Aug 2015 23:53:28 +0800 Subject: [PATCH 44/55] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=EF=BC=88=E6=9C=AA=E5=AE=8C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 77 ++++++- app/models/message_all.rb | 5 + app/views/users/user_messages_new.html.erb | 233 +++++++++++++++++++++ config/routes.rb | 3 + spec/factories/message_alls.rb | 8 + spec/models/message_all_spec.rb | 5 + 6 files changed, 329 insertions(+), 2 deletions(-) create mode 100644 app/models/message_all.rb create mode 100644 app/views/users/user_messages_new.html.erb create mode 100644 spec/factories/message_alls.rb create mode 100644 spec/models/message_all_spec.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 989727825..f677bc4d4 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -45,14 +45,14 @@ class UsersController < ApplicationController :activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities,:user_projects_index, :user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist, :user_resource,:user_resource_create,:user_resource_delete,:rename_resource,:search_user_course,:add_exist_file_to_course, - :search_user_project,:resource_preview,:resource_search,:add_exist_file_to_project,:user_messages] + :search_user_project,:resource_preview,:resource_search,:add_exist_file_to_project,:user_messages, :user_messages_new] #edit has been deleted by huang, 2013-9-23 before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses, :user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments, :watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index, :activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index, :activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource, - :user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction] + :user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction, :user_messages_new] before_filter :auth_user_extension, only: :show #before_filter :rest_user_score, only: :show #before_filter :select_entry, only: :user_projects @@ -122,6 +122,7 @@ class UsersController < ApplicationController @new_message_count = @user.forge_messages.count + @user.memo_messages.count + @user.course_messages.count + @user.user_feedback_messages.count case params[:type] when nil + @all_message = MessageAll.where("user_id =?",@user).order("created_at desc") @user_course_messages = CourseMessage.where("user_id =?",@user).order("created_at desc") @user_forge_messages = ForgeMessage.where("user_id =?",@user).order("created_at desc") @user_memo_messages = MemoMessage.where("user_id =?",@user).order("created_at desc") @@ -181,6 +182,78 @@ class UsersController < ApplicationController end end + def user_messages_new + unless User.current.logged? + render_403 + return + end + # 当前用户查看消息,则设置消息为已读 + course_querys = @user.course_messages + forge_querys = @user.forge_messages + user_querys = @user.user_feedback_messages + forum_querys = @user.memo_messages + # if User.current.id == @user.id + # course_querys.update_all(:viewed => true) + # forge_querys.update_all(:viewed => true) + # user_querys.update_all(:viewed => true) + # forum_querys.update_all(:viewed => true) + # end + @new_message_count = @user.forge_messages.count + @user.memo_messages.count + @user.course_messages.count + @user.user_feedback_messages.count + case params[:type] + when nil + @user_message_all = MessageAll.where("user_id =?", @user).order("created_at desc") + @user_message_all_count = @user_message_all.count + when 'homework' + @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc") + @user_course_messages_count = @user_course_messages.count + when 'course_message' + @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc") + @user_course_messages_count = @user_course_messages.count + when 'forge_message' + @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc") + @user_forge_messages_count = @user_forge_messages.count + when 'course_news' + @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc") + @user_course_messages_count = @user_course_messages.count + when 'forge_news' + @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc") + @user_forge_messages_count = @user_forge_messages.count + when 'course_news_reply' + @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc") + @user_course_messages_count = @user_course_messages.count + when 'forge_news_reply' + @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc") + @user_forge_messagess_count = @user_forge_messages.count + when 'poll' + @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc") + @user_course_messages_count = @user_course_messages.count + when 'works_reviewers' + @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc") + @user_course_messages_count = @user_course_messages.count + when 'works_reply' + @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") + @user_course_messages_count = @user_course_messages.count + when 'issue' + @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc") + @user_forge_messages_count = @user_forge_messages.count + when 'issue_update' # 缺陷状态更新、留言 + @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc") + @user_forge_messages_count = @user_forge_messages.count + when 'forum' + @user_memo_messages = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc") + @user_memo_messages_count = @user_memo_messages.count + when 'user_feedback' + @user_feedback_messages = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") + @user_feedback_messages_count = @user_feedback_messages.count + else + render_404 + return + end + respond_to do |format| + format.html{render :layout=>'new_base_user'} + end + end + def user_projects_index if User.current.admin? memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}").first diff --git a/app/models/message_all.rb b/app/models/message_all.rb new file mode 100644 index 000000000..6e0276875 --- /dev/null +++ b/app/models/message_all.rb @@ -0,0 +1,5 @@ +class MessageAll < ActiveRecord::Base + attr_accessible :message_id, :message_type, :user_id + # 虚拟关联---项目消息表/课程消息表/用户留言消息表/贴吧消息表 + belongs_to :message ,:polymorphic => true +end diff --git a/app/views/users/user_messages_new.html.erb b/app/views/users/user_messages_new.html.erb new file mode 100644 index 000000000..d861f867d --- /dev/null +++ b/app/views/users/user_messages_new.html.erb @@ -0,0 +1,233 @@ +
    +
    +
    +
    消息
    + +
    +<% if params[:type].nil? %> +
    + 有 8 封未读全部设为已读 +
    +<% end %> +
    +<% if @new_message_count >0 %> + <%# 课程消息 %> + <% unless @user_message_all.nil? %> + <% @user_message_all.each do |uma| %> + <% if uma.message.course_message_type == "News" %> +
      +
    • <%= image_tag(url_to_avatar(uma.message.course_message.author), :width => "30", :height => "30") %>
    • +
    • <%=link_to uma.message.course_message.author, user_path(uma.message.course_message.author), :class => "newsBlue" %>
    • +
    • ">发布通知
    • +
    • + <%= link_to uma.message.course_message.title, {:controller => 'news', :action => 'show', :id => uma.message.course_message.id }, + :class =>"#{uma.message.viewed == 0 ? "newsBlack" : "newsGrey"}", + :title => "#{uma.message.course_message.title}" %>
    • +
    • <%= time_tag(uma.message.course_message.created_on).html_safe %>
    • +
    + <% end %> + <% if uma.message.course_message_type == "Comment" %> +
      +
    • <%= image_tag(url_to_avatar(uma.message.course_message.author), :width => "30", :height => "30") %>
    • +
    • <%=link_to uma.message.course_message.author, user_path(uma.message.course_message.author), :class => "newsBlue" %>
    • +
    • ">回复了通知
    • +
    • + <%= link_to uma.message.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => uma.message.course_message.commented.id }, + :class =>"#{uma.message.viewed == 0 ? "newsBlack" : "newsGrey"}", + :title => "#{uma.message.course_message.comments.html_safe}" %>
    • +
    • <%= time_tag(uma.message.course_message.created_on).html_safe %>
    • +
    + <% end %> + <% if uma.message.course_message_type == "HomeworkCommon" %> + + <% end %> + <% if uma.message.course_message_type == "Poll" %> + + <% end %> + <% if uma.message.course_message_type == "Message" %> + + <% end %> + <% if uma.message.course_message_type == "StudentWorksScore" %> + + <% end %> + <% if uma.message.course_message_type == "JournalsForMessage" %> + + <% end %> + + + <% if uma.message.forge_message_type == "Issue" %> + + <% end %> + <% if uma.message.forge_message_type == "Journal" %> + + <% end %> + <% if uma.message.forge_message_type == "Message" %> + + <% end %> + <% if uma.message.forge_message_type == "News" %> + + <% end %> + <% if uma.message.forge_message_type == "Comment" %> +
      +
    • <%= image_tag(url_to_avatar(uma.message.forge_message.author), :width => "30", :height => "30") %>
    • +
    • <%=link_to uma.message.forge_message.author, user_path(uma.message.forge_message.author), :class => "newsBlue" %>
    • +
    • 回复了新闻
    • +
    • + <%= link_to "#{uma.message.forge_message.comments.html_safe}", + {:controller => 'news', :action => 'show', :id => uma.message.forge_message.commented.id },:class =>"#{uma.message.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{uma.message.forge_message.comments.html_safe}"%>
    • +
    • <%= time_tag(uma.message.forge_message.created_on).html_safe %>
    • +
    + <% end %> + + + <% end %> + <% end %> + + + <%# 公共贴吧 %> + + <%# 用户留言消息 %> + +<% else %> +
    暂无消息!
    +<% end %> +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/config/routes.rb b/config/routes.rb index 61bac37cb..7ba09a83a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -364,7 +364,10 @@ RedmineApp::Application.routes.draw do end match 'users/:id/user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "feedback" match 'users/:id/user_projects', :to => 'users#user_projects', :via => :get + #消息 match 'users/:id/user_messages', :to => 'users#user_messages', :via => :get, :as => "user_message" + match 'users/:id/user_messages_new', :to => 'users#user_messages_new', :via => :get, :as => "user_messages_new" + #match 'users/:id/user_messages/:homework', :to => 'users#user_messages_homework', :via => :get, :as => "user_message_homewrok" diff --git a/spec/factories/message_alls.rb b/spec/factories/message_alls.rb new file mode 100644 index 000000000..c14c153cf --- /dev/null +++ b/spec/factories/message_alls.rb @@ -0,0 +1,8 @@ +FactoryGirl.define do + factory :message_all do + user_id 1 +message_id 1 +message_type "MyString" + end + +end diff --git a/spec/models/message_all_spec.rb b/spec/models/message_all_spec.rb new file mode 100644 index 000000000..33ac896e2 --- /dev/null +++ b/spec/models/message_all_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe MessageAll, :type => :model do + pending "add some examples to (or delete) #{__FILE__}" +end From d83ed09617828631b2e6d0ecb4999357236d227d Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 25 Aug 2015 10:19:47 +0800 Subject: [PATCH 45/55] =?UTF-8?q?=E6=9B=B4=E6=96=B0viewed=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/news_controller.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 35bbb82a7..d445fc77c 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -99,18 +99,31 @@ class NewsController < ApplicationController end def show + #更新news对应的forge_messages的viewed字段 query_forge_news = @news.forge_messages query_forge_news.each do |query| if User.current.id == query.user_id query.update_attributes(:viewed => true) end end + #更新news对应的course_messages的viewed字段 query_course_news = @news.course_messages query_course_news.each do |query| if User.current.id == query.user_id query.update_attributes(:viewed => true) end end + #更新项目新闻的评阅的viewed字段 + current_forge_comments = @news.comments + current_forge_comments.each do |current_forge_comment| + query_forge_comment = current_forge_comment.forge_messages + query_forge_comment.each do |query| + if User.current.id == query.user_id + query.update_attributes(:viewed => true) + end + end + end + cs = CoursesService.new result = cs.show_course_news params,User.current @news = result[:news] From 365e6ae67891555a17576365b852e45dae432f2d Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 25 Aug 2015 10:25:49 +0800 Subject: [PATCH 46/55] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/new_public.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/stylesheets/new_public.css b/public/stylesheets/new_public.css index 9a1fb11e0..3b748cda9 100644 --- a/public/stylesheets/new_public.css +++ b/public/stylesheets/new_public.css @@ -833,3 +833,5 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} color: #7A7A7A; padding-left: 10px; } +.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} +.homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;} From 0da75afc884054e61cbeccf86976525aea81bc6c Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 25 Aug 2015 11:10:08 +0800 Subject: [PATCH 47/55] =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=EF=BC=88=E5=85=AC=E5=85=B1=E8=A1=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 151 ++++---- app/views/users/user_messages.html.erb | 404 ++++++++++----------- app/views/users/user_messages_new.html.erb | 358 +++++++++--------- db/schema.rb | 20 +- 4 files changed, 487 insertions(+), 446 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f677bc4d4..22aab5435 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -122,57 +122,62 @@ class UsersController < ApplicationController @new_message_count = @user.forge_messages.count + @user.memo_messages.count + @user.course_messages.count + @user.user_feedback_messages.count case params[:type] when nil - @all_message = MessageAll.where("user_id =?",@user).order("created_at desc") - @user_course_messages = CourseMessage.where("user_id =?",@user).order("created_at desc") - @user_forge_messages = ForgeMessage.where("user_id =?",@user).order("created_at desc") - @user_memo_messages = MemoMessage.where("user_id =?",@user).order("created_at desc") - @user_feedback_messages = UserFeedbackMessage.where("user_id =?",@user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count - @user_forge_messages_count = @user_forge_messages.count - @user_memo_messages_count = @user_memo_messages.count - @user_feedback_messages_count = @user_feedback_messages.count + @message_alls = [] + messages = MessageAll.where("user_id =?",@user).order("created_at desc") + messages.each do |message_all| + @message_alls << message_all.message + end + + # @user_course_messages = MessageAll.where("user_id =? and message_type=?",@user,"CourseMessage").order("created_at desc") + # @user_forge_messages = MessageAll.where("user_id =? and message_type=?",@user,"ForgeMessage").order("created_at desc") + # @user_memo_messages = MessageAll.where("user_id =? and message_type=?",@user,"MemoMessage").order("created_at desc") + # @user_feedback_messages = MessageAll.where("user_id =? and message_type=?",@user,"UserFeedbackMessage").order("created_at desc") + # @user_course_messages_count = @user_course_messages.count + # @user_forge_messages_count = @user_forge_messages.count + # @user_memo_messages_count = @user_memo_messages.count + # @user_feedback_messages_count = @user_feedback_messages.count when 'homework' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'course_message' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'forge_message' - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc") - @user_forge_messages_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc") + #@user_forge_messages_count = @user_forge_messages.count when 'course_news' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'forge_news' - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc") - @user_forge_messages_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc") + #@user_forge_messages_count = @user_forge_messages.count when 'course_news_reply' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'forge_news_reply' - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc") - @user_forge_messagess_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc") + #@user_forge_messagess_count = @user_forge_messages.count when 'poll' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'works_reviewers' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'works_reply' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'issue' - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc") - @user_forge_messages_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc") + #@user_forge_messages_count = @user_forge_messages.count when 'issue_update' # 缺陷状态更新、留言 - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc") - @user_forge_messages_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc") + #@user_forge_messages_count = @user_forge_messages.count when 'forum' - @user_memo_messages = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc") - @user_memo_messages_count = @user_memo_messages.count + @message_alls = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc") + #@user_memo_messages_count = @user_memo_messages.count when 'user_feedback' - @user_feedback_messages = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") - @user_feedback_messages_count = @user_feedback_messages.count + @message_alls = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") + #@user_feedback_messages_count = @user_feedback_messages.count else render_404 return @@ -201,50 +206,62 @@ class UsersController < ApplicationController @new_message_count = @user.forge_messages.count + @user.memo_messages.count + @user.course_messages.count + @user.user_feedback_messages.count case params[:type] when nil - @user_message_all = MessageAll.where("user_id =?", @user).order("created_at desc") - @user_message_all_count = @user_message_all.count + @message_alls = [] + messages = MessageAll.where("user_id =?",@user).order("created_at desc") + messages.each do |message_all| + @message_alls << message_all.message + end + + # @user_course_messages = MessageAll.where("user_id =? and message_type=?",@user,"CourseMessage").order("created_at desc") + # @user_forge_messages = MessageAll.where("user_id =? and message_type=?",@user,"ForgeMessage").order("created_at desc") + # @user_memo_messages = MessageAll.where("user_id =? and message_type=?",@user,"MemoMessage").order("created_at desc") + # @user_feedback_messages = MessageAll.where("user_id =? and message_type=?",@user,"UserFeedbackMessage").order("created_at desc") + # @user_course_messages_count = @user_course_messages.count + # @user_forge_messages_count = @user_forge_messages.count + # @user_memo_messages_count = @user_memo_messages.count + # @user_feedback_messages_count = @user_feedback_messages.count when 'homework' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'course_message' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'forge_message' - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc") - @user_forge_messages_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc") + #@user_forge_messages_count = @user_forge_messages.count when 'course_news' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'forge_news' - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc") - @user_forge_messages_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc") + #@user_forge_messages_count = @user_forge_messages.count when 'course_news_reply' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'forge_news_reply' - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc") - @user_forge_messagess_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc") + #@user_forge_messagess_count = @user_forge_messages.count when 'poll' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'works_reviewers' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'works_reply' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") - @user_course_messages_count = @user_course_messages.count + @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") + #@user_course_messages_count = @user_course_messages.count when 'issue' - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc") - @user_forge_messages_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc") + #@user_forge_messages_count = @user_forge_messages.count when 'issue_update' # 缺陷状态更新、留言 - @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc") - @user_forge_messages_count = @user_forge_messages.count + @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc") + #@user_forge_messages_count = @user_forge_messages.count when 'forum' - @user_memo_messages = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc") - @user_memo_messages_count = @user_memo_messages.count + @message_alls = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc") + #@user_memo_messages_count = @user_memo_messages.count when 'user_feedback' - @user_feedback_messages = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") - @user_feedback_messages_count = @user_feedback_messages.count + @message_alls = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") + #@user_feedback_messages_count = @user_feedback_messages.count else render_404 return diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index e8bfac941..16a1bdf4b 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -37,217 +37,213 @@
    <% if @new_message_count >0 %> <%# 课程消息 %> - <% unless @user_course_messages.nil? %> - <% @user_course_messages.each do |ucm| %> - <% if ucm.course_message_type == "News" %> -
      -
    • <%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %>
    • -
    • <%=link_to ucm.course_message.author, user_path(ucm.course_message.author), :class => "newsBlue" %>
    • -
    • ">发布通知
    • -
    • - <%= link_to ucm.course_message.title, {:controller => 'news', :action => 'show', :id => ucm.course_message.id }, - :class =>"#{ucm.viewed == 0 ? "newsBlack" : "newsGrey"}", - :title => "#{ucm.course_message.title}" %>
    • -
    • <%= time_tag(ucm.course_message.created_on).html_safe %>
    • -
    - <% end %> - <% if ucm.course_message_type == "Comment" %> -
      -
    • <%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %>
    • -
    • <%=link_to ucm.course_message.author, user_path(ucm.course_message.author), :class => "newsBlue" %>
    • -
    • ">回复了通知
    • -
    • - <%= link_to ucm.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ucm.course_message.commented.id }, - :class =>"#{ucm.viewed == 0 ? "newsBlack" : "newsGrey"}", - :title => "#{ucm.course_message.comments.html_safe}" %>
    • -
    • <%= time_tag(ucm.course_message.created_on).html_safe %>
    • -
    - <% end %> - <% if ucm.course_message_type == "HomeworkCommon" %> - - <% end %> - <% if ucm.course_message_type == "Poll" %> - - <% end %> - <% if ucm.course_message_type == "Message" %> - + <% end %> + <% if ma.course_message_type == "Message" %> + + <% end %> + <% if ma.course_message_type == "StudentWorksScore" %> + + <% end %> + <% if ma.course_message_type == "JournalsForMessage" %> + + <% end %> <% end %> + + <% if ma.class == ForgeMessage %> + <% if ma.forge_message_type == "Issue" %> + + <% end %> + <% if ma.forge_message_type == "Journal" %> + + <% end %> + <% if ma.forge_message_type == "Message" %> + + <% end %> + <% if ma.forge_message_type == "News" %> + + <% end %> + <% if ma.forge_message_type == "Comment" %> +
      +
    • <%= image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30") %>
    • +
    • <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %>
    • +
    • 回复了新闻
    • +
    • + <%= link_to "#{ma.forge_message.comments.html_safe}", + {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.comments.html_safe}"%>
    • +
    • <%= time_tag(ma.forge_message.created_on).html_safe %>
    • +
    + <% end %> + <% end %> + + <% if ma.class == MemoMessage %> + <% if ma.memo_type == "Memo" %> + + <% end %> + <% end %> + + <% if ma.class == UserFeedbackMessage %> + <% if ma.journals_for_message_type == "JournalsForMessage" %> + + <% end %> + <% end %> <% end %> <% end %> - <% unless @user_forge_messages.nil? %> - <% @user_forge_messages.each do |ufm| %> - <% if ufm.forge_message_type == "Issue" %> - - <% end %> - <% if ufm.forge_message_type == "Journal" %> - - <% end %> - <% if ufm.forge_message_type == "Message" %> - - <% end %> - <% if ufm.forge_message_type == "News" %> - - <% end %> - <% if ufm.forge_message_type == "Comment" %> -
      -
    • <%= image_tag(url_to_avatar(ufm.forge_message.author), :width => "30", :height => "30") %>
    • -
    • <%=link_to ufm.forge_message.author, user_path(ufm.forge_message.author), :class => "newsBlue" %>
    • -
    • 回复了新闻
    • -
    • - <%= link_to "#{ufm.forge_message.comments.html_safe}", - {:controller => 'news', :action => 'show', :id => ufm.forge_message.commented.id },:class =>"#{ufm.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ufm.forge_message.comments.html_safe}"%>
    • -
    • <%= time_tag(ufm.forge_message.created_on).html_safe %>
    • -
    - <% end %> - <% end %> - <% end %> - <%# 公共贴吧 %> - <% unless @user_memo_messages.nil? %> - <% @user_memo_messages.each do |urm| %> - <% if urm.memo_type == "Memo" %> - - <% end %> - <% end %> - <% end %> - <%# 用户留言消息 %> - <% unless @user_feedback_messages.nil? %> - <% @user_feedback_messages.each do |ufm| %> - <% if ufm.journals_for_message_type == "JournalsForMessage" %> - - <% end %> - <% end %> - <% end %> <% else %>
    暂无消息!
    <% end %> diff --git a/app/views/users/user_messages_new.html.erb b/app/views/users/user_messages_new.html.erb index d861f867d..4f612b8b6 100644 --- a/app/views/users/user_messages_new.html.erb +++ b/app/views/users/user_messages_new.html.erb @@ -37,180 +37,214 @@
    <% if @new_message_count >0 %> <%# 课程消息 %> - <% unless @user_message_all.nil? %> - <% @user_message_all.each do |uma| %> - <% if uma.message.course_message_type == "News" %> -
      -
    • <%= image_tag(url_to_avatar(uma.message.course_message.author), :width => "30", :height => "30") %>
    • -
    • <%=link_to uma.message.course_message.author, user_path(uma.message.course_message.author), :class => "newsBlue" %>
    • -
    • ">发布通知
    • -
    • - <%= link_to uma.message.course_message.title, {:controller => 'news', :action => 'show', :id => uma.message.course_message.id }, - :class =>"#{uma.message.viewed == 0 ? "newsBlack" : "newsGrey"}", - :title => "#{uma.message.course_message.title}" %>
    • -
    • <%= time_tag(uma.message.course_message.created_on).html_safe %>
    • -
    - <% end %> - <% if uma.message.course_message_type == "Comment" %> -
      -
    • <%= image_tag(url_to_avatar(uma.message.course_message.author), :width => "30", :height => "30") %>
    • -
    • <%=link_to uma.message.course_message.author, user_path(uma.message.course_message.author), :class => "newsBlue" %>
    • -
    • ">回复了通知
    • -
    • - <%= link_to uma.message.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => uma.message.course_message.commented.id }, - :class =>"#{uma.message.viewed == 0 ? "newsBlack" : "newsGrey"}", - :title => "#{uma.message.course_message.comments.html_safe}" %>
    • -
    • <%= time_tag(uma.message.course_message.created_on).html_safe %>
    • -
    - <% end %> - <% if uma.message.course_message_type == "HomeworkCommon" %> - - <% end %> - <% if uma.message.course_message_type == "Poll" %> - - <% end %> - <% if uma.message.course_message_type == "Message" %> - + <% end %> + <% if ma.course_message_type == "Message" %> + + <% end %> + <% if ma.course_message_type == "StudentWorksScore" %> + + <% end %> + <% if ma.course_message_type == "JournalsForMessage" %> + + <% end %> <% end %> + + <% if ma.class == ForgeMessage %> + <% if ma.forge_message_type == "Issue" %> + + <% end %> + <% if ma.forge_message_type == "Journal" %> + + <% end %> + <% if ma.forge_message_type == "Message" %> + + <% end %> + <% if ma.forge_message_type == "News" %> + + <% end %> + <% if ma.forge_message_type == "Comment" %> +
      +
    • <%= image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30") %>
    • +
    • <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %>
    • +
    • 回复了新闻
    • +
    • + <%= link_to "#{ma.forge_message.comments.html_safe}", + {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.comments.html_safe}"%>
    • +
    • <%= time_tag(ma.forge_message.created_on).html_safe %>
    • +
    + <% end %> <% end %> - <% if uma.message.forge_message_type == "Journal" %> - + + <% if ma.class == MemoMessage %> + <% if ma.memo_type == "Memo" %> + + <% end %> <% end %> - <% if uma.message.forge_message_type == "Message" %> - + + <% if ma.class == UserFeedbackMessage %> + <% if ma.journals_for_message_type == "JournalsForMessage" %> + + <% end %> <% end %> - <% if uma.message.forge_message_type == "News" %> - - <% end %> - <% if uma.message.forge_message_type == "Comment" %> -
      -
    • <%= image_tag(url_to_avatar(uma.message.forge_message.author), :width => "30", :height => "30") %>
    • -
    • <%=link_to uma.message.forge_message.author, user_path(uma.message.forge_message.author), :class => "newsBlue" %>
    • -
    • 回复了新闻
    • -
    • - <%= link_to "#{uma.message.forge_message.comments.html_safe}", - {:controller => 'news', :action => 'show', :id => uma.message.forge_message.commented.id },:class =>"#{uma.message.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{uma.message.forge_message.comments.html_safe}"%>
    • -
    • <%= time_tag(uma.message.forge_message.created_on).html_safe %>
    • -
    - <% end %> - - <% end %> <% end %> - <%# 公共贴吧 %> - - <%# 用户留言消息 %> <% else %>
    暂无消息!
    diff --git a/db/schema.rb b/db/schema.rb index 0bd96d52d..791c5b14d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -14,11 +14,12 @@ ActiveRecord::Schema.define(:version => 20150824133916) do create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" + t.datetime "created_at" end add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" @@ -881,14 +882,6 @@ ActiveRecord::Schema.define(:version => 20150824133916) do t.datetime "updated_at", :null => false end - create_table "message_publics", :force => true do |t| - t.integer "message_id" - t.string "massage_type" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "messages", :force => true do |t| t.integer "board_id", :null => false t.integer "parent_id" @@ -1539,6 +1532,7 @@ ActiveRecord::Schema.define(:version => 20150824133916) do t.string "identity_url" t.string "mail_notification", :default => "", :null => false t.string "salt", :limit => 64 + t.integer "gid" end add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" From 12c3f5a723b650bb5205a48bb0f48bafbbe776b0 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 25 Aug 2015 11:17:37 +0800 Subject: [PATCH 48/55] =?UTF-8?q?=E6=B6=88=E6=81=AF=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BAviewed=E5=AD=97=E6=AE=B5=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/boards_controller.rb | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 6ff4d2f97..72301754d 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -67,7 +67,29 @@ class BoardsController < ApplicationController end - def show + def show + #¶Ӧforge_messagesviewedֶ + if @project + query_forge_messages = @board.messages + query_forge_messages.each do |query_forge_message| + query = query_forge_message.forge_messages + query.each do |forge_message| + if User.current.id == forge_message.user_id + forge_message.update_attributes(:viewed => true) + end + end + end + elsif @course + query_course_messages = @board.messages + query_course_messages.each do |query_course_message| + query = query_course_message.course_messages + query.each do |course_message| + if User.current.id == course_message.user_id + course_message.update_attributes(:viewed => true) + end + end + end + end respond_to do |format| format.js format.html { From 3ecdb2940ba9dd6e98790f81c50ae783295ab343 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 25 Aug 2015 12:43:27 +0800 Subject: [PATCH 49/55] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 13 +++++++++++++ app/views/users/user_messages.html.erb | 6 ------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 22aab5435..8fd36ee7f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -138,45 +138,58 @@ class UsersController < ApplicationController # @user_feedback_messages_count = @user_feedback_messages.count when 'homework' @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_course_messages_count = @user_course_messages.count when 'course_message' @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_course_messages_count = @user_course_messages.count when 'forge_message' @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_forge_messages_count = @user_forge_messages.count when 'course_news' @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_course_messages_count = @user_course_messages.count when 'forge_news' @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_forge_messages_count = @user_forge_messages.count when 'course_news_reply' @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc") #@user_course_messages_count = @user_course_messages.count when 'forge_news_reply' @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_forge_messagess_count = @user_forge_messages.count when 'poll' @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_course_messages_count = @user_course_messages.count when 'works_reviewers' @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_course_messages_count = @user_course_messages.count when 'works_reply' @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_course_messages_count = @user_course_messages.count when 'issue' @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_forge_messages_count = @user_forge_messages.count when 'issue_update' # 缺陷状态更新、留言 @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_forge_messages_count = @user_forge_messages.count when 'forum' @message_alls = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_memo_messages_count = @user_memo_messages.count when 'user_feedback' @message_alls = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc") + @message_alls_count = @message_alls.count #@user_feedback_messages_count = @user_feedback_messages.count else render_404 diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 16a1bdf4b..3f5549273 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -29,11 +29,6 @@
    - <% if params[:type].nil? %> -
    - 有 8 封未读全部设为已读 -
    - <% end %>
    <% if @new_message_count >0 %> <%# 课程消息 %> @@ -175,7 +170,6 @@ :topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}", :title => "#{ma.forge_message.subject.html_safe}" %>
  • <%= time_tag(ma.forge_message.created_on).html_safe %>
  • - <% end %> <% if ma.forge_message_type == "News" %> From b1ed9deba1fae8e0a79600e3e96de903132ac962 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 25 Aug 2015 12:46:57 +0800 Subject: [PATCH 50/55] =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=A1=86=E5=AF=B9?= =?UTF-8?q?=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 3f5549273..f5ae4797f 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -1,4 +1,4 @@ -
    +
    消息
    @@ -244,7 +244,6 @@
    -
    From 4c974266b857a696ac32f5f3afab71e2f84de32b Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 25 Aug 2015 13:04:25 +0800 Subject: [PATCH 51/55] =?UTF-8?q?=E6=B2=A1=E6=B6=88=E6=81=AF=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 12 ++++++------ app/views/users/user_messages.html.erb | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 8fd36ee7f..50496fbf8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -113,12 +113,12 @@ class UsersController < ApplicationController forge_querys = @user.forge_messages user_querys = @user.user_feedback_messages forum_querys = @user.memo_messages - # if User.current.id == @user.id - # course_querys.update_all(:viewed => true) - # forge_querys.update_all(:viewed => true) - # user_querys.update_all(:viewed => true) - # forum_querys.update_all(:viewed => true) - # end + if User.current.id == @user.id + course_querys.update_all(:viewed => true) + forge_querys.update_all(:viewed => true) + user_querys.update_all(:viewed => true) + forum_querys.update_all(:viewed => true) + end @new_message_count = @user.forge_messages.count + @user.memo_messages.count + @user.course_messages.count + @user.user_feedback_messages.count case params[:type] when nil diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index f5ae4797f..eacac3c5f 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -135,9 +135,9 @@
  • ">指派问题给我
  • - <%= link_to ma.forge_message.subject.html_safe, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.forge_message.subject.html_safe}" %> + <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.forge_message.subject}" %>
  • -
  • <%= time_tag(ma.forge_message.created_on).html_safe %>
  • +
  • <%= time_tag(ma.forge_message.updated_on).html_safe %>
  • <% end %> <% if ma.forge_message_type == "Journal" %> From d7de5fc48025df1124d8cc4d169013acbb7b84c7 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 25 Aug 2015 13:04:46 +0800 Subject: [PATCH 52/55] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 14 +++++++------- db/schema.rb | 10 ++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 16a1bdf4b..231403575 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -68,7 +68,7 @@