mirror of
https://github.com/wahyd4/ocelots.git
synced 2026-08-09 13:06:25 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4df0903ae4 | ||
|
|
60ddc673bc | ||
|
|
aaa56385da | ||
|
|
70cec97aee | ||
|
|
837762975d | ||
|
|
fe56839528 | ||
|
|
7df18c049f | ||
|
|
3e40ad643d | ||
|
|
c4502d8035 | ||
|
|
0fbc1744af | ||
|
|
c9e7dde516 | ||
|
|
5e76ffe879 | ||
|
|
7a1241c218 | ||
|
|
de6a8445bc | ||
|
|
b5d5da0c7c | ||
|
|
8891d66c22 | ||
|
|
9f2fd47e0f | ||
|
|
a6bfd8bd59 | ||
|
|
0fb83bf919 | ||
|
|
61626c118b | ||
|
|
7ee206ea87 | ||
|
|
ad2fbe8b43 | ||
|
|
324bb3a186 | ||
|
|
120abe5666 |
@@ -4,6 +4,8 @@
|
|||||||
# or operating system, you probably want to add a global ignore instead:
|
# or operating system, you probably want to add a global ignore instead:
|
||||||
# git config --global core.excludesfile ~/.gitignore_global
|
# git config --global core.excludesfile ~/.gitignore_global
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
# Ignore bundler config
|
# Ignore bundler config
|
||||||
/.bundle
|
/.bundle
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '3.2.9'
|
gem 'rails', '3.2.11'
|
||||||
gem 'slim'
|
gem 'slim'
|
||||||
gem 'paperclip'
|
gem 'paperclip'
|
||||||
gem 'aws-sdk'
|
gem 'aws-sdk'
|
||||||
@@ -24,11 +24,11 @@ group :assets do
|
|||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
|
gem 'rspec-rails'
|
||||||
gem 'github'
|
gem 'github'
|
||||||
gem 'tddium'
|
gem 'tddium'
|
||||||
gem "rails_best_practices", "~> 1.11.1"
|
gem "rails_best_practices", "~> 1.11.1"
|
||||||
gem "flay"
|
gem "flay"
|
||||||
gem 'rspec-rails'
|
|
||||||
gem 'simplecov'
|
gem 'simplecov'
|
||||||
gem 'machinist'
|
gem 'machinist'
|
||||||
gem 'cucumber-rails' , :require => false
|
gem 'cucumber-rails' , :require => false
|
||||||
|
|||||||
+30
-30
@@ -1,12 +1,12 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actionmailer (3.2.9)
|
actionmailer (3.2.11)
|
||||||
actionpack (= 3.2.9)
|
actionpack (= 3.2.11)
|
||||||
mail (~> 2.4.4)
|
mail (~> 2.4.4)
|
||||||
actionpack (3.2.9)
|
actionpack (3.2.11)
|
||||||
activemodel (= 3.2.9)
|
activemodel (= 3.2.11)
|
||||||
activesupport (= 3.2.9)
|
activesupport (= 3.2.11)
|
||||||
builder (~> 3.0.0)
|
builder (~> 3.0.0)
|
||||||
erubis (~> 2.7.0)
|
erubis (~> 2.7.0)
|
||||||
journey (~> 1.0.4)
|
journey (~> 1.0.4)
|
||||||
@@ -14,18 +14,18 @@ GEM
|
|||||||
rack-cache (~> 1.2)
|
rack-cache (~> 1.2)
|
||||||
rack-test (~> 0.6.1)
|
rack-test (~> 0.6.1)
|
||||||
sprockets (~> 2.2.1)
|
sprockets (~> 2.2.1)
|
||||||
activemodel (3.2.9)
|
activemodel (3.2.11)
|
||||||
activesupport (= 3.2.9)
|
activesupport (= 3.2.11)
|
||||||
builder (~> 3.0.0)
|
builder (~> 3.0.0)
|
||||||
activerecord (3.2.9)
|
activerecord (3.2.11)
|
||||||
activemodel (= 3.2.9)
|
activemodel (= 3.2.11)
|
||||||
activesupport (= 3.2.9)
|
activesupport (= 3.2.11)
|
||||||
arel (~> 3.0.2)
|
arel (~> 3.0.2)
|
||||||
tzinfo (~> 0.3.29)
|
tzinfo (~> 0.3.29)
|
||||||
activeresource (3.2.9)
|
activeresource (3.2.11)
|
||||||
activemodel (= 3.2.9)
|
activemodel (= 3.2.11)
|
||||||
activesupport (= 3.2.9)
|
activesupport (= 3.2.11)
|
||||||
activesupport (3.2.9)
|
activesupport (3.2.11)
|
||||||
i18n (~> 0.6)
|
i18n (~> 0.6)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
addressable (2.3.2)
|
addressable (2.3.2)
|
||||||
@@ -111,7 +111,7 @@ GEM
|
|||||||
jquery-rails (2.1.1)
|
jquery-rails (2.1.1)
|
||||||
railties (>= 3.1.0, < 5.0)
|
railties (>= 3.1.0, < 5.0)
|
||||||
thor (~> 0.14)
|
thor (~> 0.14)
|
||||||
json (1.7.5)
|
json (1.7.6)
|
||||||
jwt (0.1.5)
|
jwt (0.1.5)
|
||||||
multi_json (>= 1.0)
|
multi_json (>= 1.0)
|
||||||
launchy (2.1.2)
|
launchy (2.1.2)
|
||||||
@@ -125,7 +125,7 @@ GEM
|
|||||||
mime-types (~> 1.16)
|
mime-types (~> 1.16)
|
||||||
treetop (~> 1.4.8)
|
treetop (~> 1.4.8)
|
||||||
mime-types (1.19)
|
mime-types (1.19)
|
||||||
multi_json (1.3.7)
|
multi_json (1.5.0)
|
||||||
multi_xml (0.5.1)
|
multi_xml (0.5.1)
|
||||||
multipart-post (1.1.5)
|
multipart-post (1.1.5)
|
||||||
nokogiri (1.5.5)
|
nokogiri (1.5.5)
|
||||||
@@ -141,21 +141,21 @@ GEM
|
|||||||
pusher (0.11.1)
|
pusher (0.11.1)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
signature (~> 0.1.6)
|
signature (~> 0.1.6)
|
||||||
rack (1.4.1)
|
rack (1.4.3)
|
||||||
rack-cache (1.2)
|
rack-cache (1.2)
|
||||||
rack (>= 0.4)
|
rack (>= 0.4)
|
||||||
rack-ssl (1.3.2)
|
rack-ssl (1.3.2)
|
||||||
rack
|
rack
|
||||||
rack-test (0.6.2)
|
rack-test (0.6.2)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (3.2.9)
|
rails (3.2.11)
|
||||||
actionmailer (= 3.2.9)
|
actionmailer (= 3.2.11)
|
||||||
actionpack (= 3.2.9)
|
actionpack (= 3.2.11)
|
||||||
activerecord (= 3.2.9)
|
activerecord (= 3.2.11)
|
||||||
activeresource (= 3.2.9)
|
activeresource (= 3.2.11)
|
||||||
activesupport (= 3.2.9)
|
activesupport (= 3.2.11)
|
||||||
bundler (~> 1.0)
|
bundler (~> 1.0)
|
||||||
railties (= 3.2.9)
|
railties (= 3.2.11)
|
||||||
rails_best_practices (1.11.1)
|
rails_best_practices (1.11.1)
|
||||||
activesupport
|
activesupport
|
||||||
awesome_print
|
awesome_print
|
||||||
@@ -164,14 +164,14 @@ GEM
|
|||||||
erubis
|
erubis
|
||||||
i18n
|
i18n
|
||||||
progressbar
|
progressbar
|
||||||
railties (3.2.9)
|
railties (3.2.11)
|
||||||
actionpack (= 3.2.9)
|
actionpack (= 3.2.11)
|
||||||
activesupport (= 3.2.9)
|
activesupport (= 3.2.11)
|
||||||
rack-ssl (~> 1.3.2)
|
rack-ssl (~> 1.3.2)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
rdoc (~> 3.4)
|
rdoc (~> 3.4)
|
||||||
thor (>= 0.14.6, < 2.0)
|
thor (>= 0.14.6, < 2.0)
|
||||||
rake (10.0.2)
|
rake (10.0.3)
|
||||||
rdiscount (1.6.8)
|
rdiscount (1.6.8)
|
||||||
rdoc (3.12)
|
rdoc (3.12)
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
@@ -215,7 +215,7 @@ GEM
|
|||||||
slim (1.3.0)
|
slim (1.3.0)
|
||||||
temple (~> 0.4.1)
|
temple (~> 0.4.1)
|
||||||
tilt (~> 1.3.3)
|
tilt (~> 1.3.3)
|
||||||
sprockets (2.2.1)
|
sprockets (2.2.2)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
rack (~> 1.0)
|
rack (~> 1.0)
|
||||||
@@ -270,7 +270,7 @@ DEPENDENCIES
|
|||||||
paperclip
|
paperclip
|
||||||
pg
|
pg
|
||||||
pusher
|
pusher
|
||||||
rails (= 3.2.9)
|
rails (= 3.2.11)
|
||||||
rails_best_practices (~> 1.11.1)
|
rails_best_practices (~> 1.11.1)
|
||||||
rdiscount
|
rdiscount
|
||||||
rspec-rails
|
rspec-rails
|
||||||
|
|||||||
@@ -2,13 +2,36 @@
|
|||||||
[](https://travis-ci.org/wahyd4/ocelots)
|
[](https://travis-ci.org/wahyd4/ocelots)
|
||||||
[](https://codeclimate.com/github/wahyd4/ocelots)
|
[](https://codeclimate.com/github/wahyd4/ocelots)
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|

|
||||||
|
|
||||||
This is an application to allow members of a team to get to know each other.
|
This is an application to allow members of a team to get to know each other.
|
||||||
|
You can log in using a mozilla persona or Google account id (linked to your email address) and then you'll be presented with the list of groups you belong to (which will be none initially).You can now create a team and invite new members to join by entering their email address (including yourself - you can administer a team without being a member).
|
||||||
|
|
||||||
You log in using a mozilla persona id (linked to your email address) and then you'll be presented with the list of groups you belong to (which will be none initially).
|
In Ocelots every team is private,and it's only accessible by the people who belong to the same organisation with team creator.Once someone in the team invite someone else to join in,the team will be accessible to the organisation which the invitee belongs to.
|
||||||
|
If invitee doesn't belong to any organisation,the team's viewable people will only add invitee himself.
|
||||||
|
In Ocelots we have a important defination is "Organisation". Organisation should be created by manually in 'script/create_default_organisations.rb'.
|
||||||
|
|
||||||
You can now create a team and invite new members to join by entering their email address (including yourself - you can administer a team without being a member).
|
You can modify it and run it by 'rails runner script/create_default_organisations.rb' at any time.
|
||||||
|
|
||||||
Everyone can try it [iocelots.com][1]
|
eg:
|
||||||
|
Organisation.create!(:name => 'ThoughtWorks', :domains => 'thoughtworks.com')
|
||||||
|
so if anyone use xx@thoughtworks.com will automatically belongs to Thoughtworks.
|
||||||
|
|
||||||
|
Everyone can try it through <http://iocelots.com>
|
||||||
|
|
||||||
|
# Install and run Ocelots
|
||||||
|
|
||||||
|
## Install Ocelots on your computer
|
||||||
|
|
||||||
|
* At first you need apply for Google oauth token and Pusher API key ,then put them into /install_ocelots.sh
|
||||||
|
* Next, run 'chmod +x install_ocelots.sh' to make this script executable.
|
||||||
|
* Then, modify 'script/create_default_organisations.rb' and run it to create Organisation.
|
||||||
|
* Finally,run 'rails server' to run the server.
|
||||||
|
|
||||||
|
*Notice: you may need to run the install script when you closed the terminal every time if you need to use login page and Pusher.*
|
||||||
|
|
||||||
|
## Install Ocelots on heroku
|
||||||
|
|
||||||
To setup your own instance on heroku:
|
To setup your own instance on heroku:
|
||||||
|
|
||||||
@@ -56,11 +79,13 @@ To use Pusher to auto-fresh messages,you need to add Pusher addon on heroku,and
|
|||||||
heroku config:add PUSHER_KEY='your_pusher_key'
|
heroku config:add PUSHER_KEY='your_pusher_key'
|
||||||
heroku config:add PUSHER_SECRET='your_pusher_secret'
|
heroku config:add PUSHER_SECRET='your_pusher_secret'
|
||||||
|
|
||||||
To use it in local you need config it like following:
|
### Google OAuth API Config
|
||||||
|
You should apply for the API token from [Google API console][2],then set it.
|
||||||
|
|
||||||
|
heroku config:add GOOGLE_OAUTH_CLIENT_ID=yourid --app ocelots
|
||||||
|
heroku config:add GOOGLE_OAUTH_CLIENT_SECRET=yourSecret
|
||||||
|
heroku config:add GOOGLE_OAUTH_REDIRECT=http://replace to your domain/home/verify_g_callback
|
||||||
|
|
||||||
export PUSHER_APP_ID=your_pusher_app_id
|
|
||||||
export PUSHER_KEY='your_pusher_key'
|
|
||||||
export PUSHER_SECRET='your_pusher_secret'
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
@@ -71,18 +96,6 @@ First, set a couple of environment variables:
|
|||||||
export OCELOTS_URL=http://localhost:3000
|
export OCELOTS_URL=http://localhost:3000
|
||||||
export OCELOTS_AUTH_TOKEN=f1ac4214-5426-4597-9b74-ea63167f4750
|
export OCELOTS_AUTH_TOKEN=f1ac4214-5426-4597-9b74-ea63167f4750
|
||||||
|
|
||||||
### Google OAuth API Config
|
|
||||||
You should apply for the API token from [Google API console][2],then set it.
|
|
||||||
|
|
||||||
heroku config:add GOOGLE_OAUTH_CLIENT_ID=yourid --app ocelots
|
|
||||||
heroku config:add GOOGLE_OAUTH_CLIENT_SECRET=yourSecret
|
|
||||||
heroku config:add GOOGLE_OAUTH_REDIRECT=http://replace to your domain/home/verify_g_callback
|
|
||||||
|
|
||||||
To use it in local, you need export variables:
|
|
||||||
export GOOGLE_OAUTH_CLIENT_ID=yourid --app ocelots
|
|
||||||
export GOOGLE_OAUTH_CLIENT_SECRET=yourSecret
|
|
||||||
export GOOGLE_OAUTH_REDIRECT=http://replace to your domain/home/verify_g_callback
|
|
||||||
|
|
||||||
### Membership Details
|
### Membership Details
|
||||||
|
|
||||||
To request information on all the teams you are a member of:
|
To request information on all the teams you are a member of:
|
||||||
@@ -116,5 +129,4 @@ To add a new message:
|
|||||||
export TEAM_SLUG=ateam
|
export TEAM_SLUG=ateam
|
||||||
curl -H 'Content-Type: application/json' -d '{"content":"message"}' "$OCELOTS_URL/api/antechamber/$TEAM_SLUG?auth_token=$OCELOTS_AUTH_TOKEN"
|
curl -H 'Content-Type: application/json' -d '{"content":"message"}' "$OCELOTS_URL/api/antechamber/$TEAM_SLUG?auth_token=$OCELOTS_AUTH_TOKEN"
|
||||||
|
|
||||||
[1]: http://iocelots.com 'iocelots'
|
|
||||||
[2]: https://code.google.com/apis/console#access "Google API console"
|
[2]: https://code.google.com/apis/console#access "Google API console"
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
$ ->
|
||||||
|
$('#view_map').each ->
|
||||||
|
lat = $(this).data('lat')
|
||||||
|
lng = $(this).data('lng')
|
||||||
|
|
||||||
|
map_options = {
|
||||||
|
center: new google.maps.LatLng(lat, lng),
|
||||||
|
zoom: 8,
|
||||||
|
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||||
|
}
|
||||||
|
|
||||||
|
map = new google.maps.Map(this, map_options)
|
||||||
|
|
||||||
|
marker_options = {
|
||||||
|
position: new google.maps.LatLng(lat, lng),
|
||||||
|
map: map
|
||||||
|
}
|
||||||
|
marker = new google.maps.Marker(marker_options)
|
||||||
@@ -111,5 +111,36 @@ body {
|
|||||||
margin-right:8px;
|
margin-right:8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.panel{
|
||||||
|
background: #f2f2f2;
|
||||||
|
border: solid 1px #e6e6e6;
|
||||||
|
margin: 0 0 22px 0;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.avatar-hover{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
display: none;
|
||||||
|
border-radius: 150px;
|
||||||
|
text-align: center;
|
||||||
|
background: rgba(14, 238, 112, 0.61);
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.avatar-info:hover + .avatar-hover{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.con4avatar{
|
||||||
|
width: 330px;
|
||||||
|
position: relative;
|
||||||
|
float: left;
|
||||||
|
margin-left: 2em;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ class HomeController < ApplicationController
|
|||||||
session[:initial_url] = nil
|
session[:initial_url] = nil
|
||||||
redirect_to redirect_url
|
redirect_to redirect_url
|
||||||
else
|
else
|
||||||
@people = Person.find(:all, :conditions => ["show_avatar=true"], :order => "RANDOM()", :limit => 4)
|
#@people = Person.find(:all, :conditions => ["show_avatar=true"], :order => "RANDOM()", :limit => 4)
|
||||||
|
@people = Person.where(show_avatar:true).order("RANDOM()").limit(4)
|
||||||
@google_login = google_oauth_url
|
@google_login = google_oauth_url
|
||||||
render layout: 'landing'
|
render layout: 'landing'
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,13 +6,14 @@ class TeamsController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
@memberships = current_person.memberships.select { |membership| membership.ended==nil }.sort_by {|mem| mem.team_name.downcase}
|
@memberships = current_person.memberships.select { |membership| membership.ended==nil }.sort_by {|mem| mem.team_name.downcase}
|
||||||
|
@view_membership = current_person.viewable_teams.sort_by {|team| team.name.downcase}
|
||||||
if params[:sortby]== 'CreateDate'
|
if params[:sortby]== 'CreateDate'
|
||||||
@memberships = @memberships.sort_by {|mem| mem.id}
|
@memberships = @memberships.sort_by {|mem| mem.id}
|
||||||
|
@view_membership = @view_membership.sort_by {|team| team.id}
|
||||||
@sortby = params[:sortby]
|
@sortby = params[:sortby]
|
||||||
end
|
end
|
||||||
@team = Team.new
|
@team = Team.new
|
||||||
@organisations = Organisation.find(:all)
|
@organisations = Organisation.find(:all)
|
||||||
@view_membership = current_person.viewable_teams
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ module ApplicationHelper
|
|||||||
image_tag person.photo? ? person.photo.url(:square) : person.gravatar_url ,class:'avatar-image'
|
image_tag person.photo? ? person.photo.url(:square) : person.gravatar_url ,class:'avatar-image'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def image_for_without_radius person
|
||||||
|
image_tag person.photo? ? person.photo.url(:square) : person.gravatar_url
|
||||||
|
end
|
||||||
|
|
||||||
def phone_link_to phone
|
def phone_link_to phone
|
||||||
phone.blank? ? '' : link_to(phone,"tel://#{phone.gsub(/\D/,'')}")
|
phone.blank? ? '' : link_to(phone,"tel://#{phone.gsub(/\D/,'')}")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ class Person < ActiveRecord::Base
|
|||||||
extend UuidGenerator
|
extend UuidGenerator
|
||||||
include Gravtastic ,UuidGenerator
|
include Gravtastic ,UuidGenerator
|
||||||
gravtastic :secure => false,
|
gravtastic :secure => false,
|
||||||
:size => 300
|
:size => 300,
|
||||||
|
:default=> "retro"
|
||||||
|
|
||||||
attr_accessible :email, :persona_id, :account, :auth_token
|
attr_accessible :email, :persona_id, :account, :auth_token
|
||||||
attr_accessible :full_name, :chinese_name, :pinyin_name, :preferred_name
|
attr_accessible :full_name, :chinese_name, :pinyin_name, :preferred_name
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ footer
|
|||||||
li
|
li
|
||||||
a href="https://github.com/ocelots/ocelots/graphs/contributors" Development Team
|
a href="https://github.com/ocelots/ocelots/graphs/contributors" Development Team
|
||||||
p.copyright
|
p.copyright
|
||||||
span © 2012
|
span © 2013
|
||||||
span style="font-family: Trebuchet MS, sans-serif;"
|
span style="font-family: Trebuchet MS, sans-serif;"
|
||||||
strong Thought
|
strong Thought
|
||||||
span Works
|
span Works
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
- content_for :javascript_includes do
|
- content_for :javascript_includes do
|
||||||
= javascript_include_tag "http://maps.googleapis.com/maps/api/js?key=#{ENV['GOOGLE_API']}&sensor=false"
|
= javascript_include_tag "http://maps.googleapis.com/maps/api/js?key=#{ENV['GOOGLE_API']}&sensor=false"
|
||||||
|
= javascript_include_tag "profiles"
|
||||||
div.hero-unit.sexy-bg
|
div.hero-unit.sexy-bg
|
||||||
div.row.person
|
div.row.person
|
||||||
div.span4
|
div.span4
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
div.hero-unit.highlight.sexy-bg class="#{membership.status}"
|
div.highlight.con4avatar class="#{membership.status}"
|
||||||
div.row
|
div.avatar-info
|
||||||
div.span4
|
=image_for membership.person
|
||||||
a href="/profiles/#{membership.account}"
|
div.avatar-hover
|
||||||
=image_for membership.person
|
a href="/profiles/#{membership.account}"
|
||||||
div.span4
|
h1 style="margin-top:3.5em" = membership.person.full_name
|
||||||
= render partial: 'shared/person', locals: {person: membership.person}
|
|
||||||
= render partial: 'shared/membership', locals: {membership: membership}
|
|
||||||
-if membership.person == @current_person
|
-if membership.person == @current_person
|
||||||
= link_to 'edit membership', '#add_sc', class: 'fancybox btn btn-primary'
|
= link_to 'edit membership', '#add_sc', class: 'fancybox btn btn-primary'
|
||||||
div id="add_sc" style="display:none;"
|
div id="add_sc" style="display:none;"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
div.hero-unit.pending.hidden.sexy-bg
|
div.con4avatar.pending.hidden
|
||||||
div.row.person
|
div.avatar-info
|
||||||
div.span4
|
img.avatar-image src="/assets/silhouette.png" width=300
|
||||||
img src="/assets/silhouette.png" width=300
|
div.avatar-hover
|
||||||
div.span4
|
h3 style="margin-top:4em" = membership.email
|
||||||
p = membership.email
|
i (membership pending)
|
||||||
i (membership pending)
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
- @team.people.each do |person|
|
- @team.people.each do |person|
|
||||||
div.avatar
|
div.avatar
|
||||||
a href="/profiles/#{person.account}" target="_blank"
|
a href="/profiles/#{person.account}" target="_blank"
|
||||||
=image_for person
|
=image_for_without_radius person
|
||||||
h2 #{person.full_name}
|
h2 #{person.full_name}
|
||||||
- if person.job_title
|
- if person.job_title
|
||||||
i #{person.job_title}
|
i #{person.job_title}
|
||||||
@@ -42,9 +42,9 @@ div.team-content
|
|||||||
input.span2.search-query id="show-filter" type="text" placeholder="search" style="float:right;margin-bottom: 10px;margin-right: 10px;"
|
input.span2.search-query id="show-filter" type="text" placeholder="search" style="float:right;margin-bottom: 10px;margin-right: 10px;"
|
||||||
|
|
||||||
div.clear
|
div.clear
|
||||||
|
div.row-fluid
|
||||||
- @team.memberships.each do |membership|
|
- @team.memberships.each do |membership|
|
||||||
= render partial: membership_partial(membership), locals: {membership: membership, current_person: @current_person}
|
= render partial: membership_partial(membership), locals: {membership: membership, current_person: @current_person}
|
||||||
|
|
||||||
div#new-content style="display:none;"
|
div#new-content style="display:none;"
|
||||||
p.lead Add new team members
|
p.lead Add new team members
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ Ocelots::Application.configure do
|
|||||||
# Expands the lines which load the assets
|
# Expands the lines which load the assets
|
||||||
config.assets.debug = true
|
config.assets.debug = true
|
||||||
|
|
||||||
#config.threadsafe! enables allow_concurrency, cache_classes, dependency_loading and preload_frameworks to make the application threadsafe.
|
|
||||||
config.threadsafe!
|
|
||||||
|
|
||||||
# paperclip will save to public/system/[object] when running local
|
# paperclip will save to public/system/[object] when running local
|
||||||
if(ENV['S3_BUCKET'].nil?)
|
if(ENV['S3_BUCKET'].nil?)
|
||||||
config.paperclip_storage_options = {}
|
config.paperclip_storage_options = {}
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ Ocelots::Application.configure do
|
|||||||
# Generate digests for assets URLs
|
# Generate digests for assets URLs
|
||||||
config.assets.digest = true
|
config.assets.digest = true
|
||||||
|
|
||||||
|
|
||||||
|
#config.static_cache_control = "public, max-age=3600"
|
||||||
|
|
||||||
# Defaults to nil and saved in location specified by config.assets.prefix
|
# Defaults to nil and saved in location specified by config.assets.prefix
|
||||||
# config.assets.manifest = YOUR_PATH
|
# config.assets.manifest = YOUR_PATH
|
||||||
|
|
||||||
@@ -62,9 +65,6 @@ Ocelots::Application.configure do
|
|||||||
# Send deprecation notices to registered listeners
|
# Send deprecation notices to registered listeners
|
||||||
config.active_support.deprecation = :notify
|
config.active_support.deprecation = :notify
|
||||||
|
|
||||||
#config.threadsafe! enables allow_concurrency, cache_classes, dependency_loading and preload_frameworks to make the application threadsafe.
|
|
||||||
config.threadsafe!
|
|
||||||
|
|
||||||
# Log the query plan for queries taking more than this (works
|
# Log the query plan for queries taking more than this (works
|
||||||
# with SQLite, MySQL, and PostgreSQL)
|
# with SQLite, MySQL, and PostgreSQL)
|
||||||
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
||||||
|
|||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# export google oauth variables
|
||||||
|
# sign up keys from: https://code.google.com/apis/console#access
|
||||||
|
|
||||||
|
export GOOGLE_OAUTH_CLIENT_ID="replace_it"
|
||||||
|
export GOOGLE_OAUTH_CLIENT_SECRET="replace_it"
|
||||||
|
export GOOGLE_OAUTH_REDIRECT="replace_it"
|
||||||
|
|
||||||
|
# export Pusher variables
|
||||||
|
# at fisrt you need add pusher addon in heroku,and then get the access variables from pusher config page on heroku
|
||||||
|
|
||||||
|
export PUSHER_APP_ID= replace_it
|
||||||
|
export PUSHER_KEY='replace_it'
|
||||||
|
export PUSHER_SECRET='replace_it'
|
||||||
|
|
||||||
|
echo 'Install done,now please run rails server'
|
||||||
|
|
||||||
|
exec $SHELL -i
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
module TeamFilter
|
module TeamFilter
|
||||||
def with_team
|
def with_team
|
||||||
@team = Team.find_by_slug params[:slug]
|
@team = Team.find_by_slug params[:slug]
|
||||||
unless current_person.allowed_to_view_team?(@team)
|
unless current_person.allowed_to_view_team?(@team)
|
||||||
@team = nil
|
@team = nil
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ describe TeamsController do
|
|||||||
assigns(:memberships).should_not be_nil
|
assigns(:memberships).should_not be_nil
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'not create team with null name' do
|
it 'not create team with null slug' do
|
||||||
lambda do
|
lambda do
|
||||||
post :create, team: {name: 'CDI', slug: nil}, org_ids: [@organisation.id.to_s]
|
post :create, team: {name: 'CDI', slug: nil}, org_ids: [@organisation.id.to_s]
|
||||||
end.should_not change(Team, :count)
|
end.should_not change(Team, :count)
|
||||||
|
|||||||
Reference in New Issue
Block a user