Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CalCentral-Rails start

- All client-side assets from Eggshell.
- User status is the only API endpoint (and its path is due to change ASAP).
- Eggshell's Canvas integration code will be brought over as the API is developed.
  • Loading branch information...
commit 63c1a0f48d192196c09a8ad76abfa3e09900fdf7 1 parent 163af04
@raydavis raydavis authored
Showing with 5,919 additions and 2 deletions.
  1. +10 −0 .editorconfig
  2. +32 −0 .gitignore
  3. +1 −0  .rspec
  4. +15 −0 .rvmrc
  5. +5 −0 .travis.yml
  6. +106 −0 Gemfile
  7. +279 −0 Gemfile.lock
  8. +10 −0 Guardfile
  9. +3 −0  Procfile
  10. +190 −2 README.md
  11. +7 −0 Rakefile
  12. BIN  app/assets/images/calcentral_branding_strip.png
  13. BIN  app/assets/images/calcentral_homepage_collage.png
  14. BIN  app/assets/images/calcentral_logo_big.png
  15. BIN  app/assets/images/calcentral_masthead_landing.png
  16. BIN  app/assets/images/calcentral_masthead_logo.png
  17. BIN  app/assets/images/classpages_map_not_available.png
  18. BIN  app/assets/images/dummy_cal1card.png
  19. BIN  app/assets/images/dummy_graph_awards_and_bill.png
  20. BIN  app/assets/images/dummy_graph_awards_and_bill_history.png
  21. BIN  app/assets/images/dummy_planning_budget.png
  22. BIN  app/assets/images/dummy_task_slider.png
  23. BIN  app/assets/images/favicon.ico
  24. BIN  app/assets/images/favicon.png
  25. BIN  app/assets/images/icon_academics_24x24.png
  26. BIN  app/assets/images/icon_alert_16x16.png
  27. BIN  app/assets/images/icon_alert_24x24.png
  28. BIN  app/assets/images/icon_arrow_right_16x16.png
  29. BIN  app/assets/images/icon_arrow_right_brown_16x16.png
  30. BIN  app/assets/images/icon_block_24x24.png
  31. BIN  app/assets/images/icon_bspace_16x16.png
  32. BIN  app/assets/images/icon_calendar_16x16.png
  33. BIN  app/assets/images/icon_campus_academicplan_150x150.png
  34. BIN  app/assets/images/icon_campus_advising_150x150.png
  35. BIN  app/assets/images/icon_campus_campusdepartments_150x150.png
  36. BIN  app/assets/images/icon_campus_career_150x150.png
  37. BIN  app/assets/images/icon_campus_finances_150x150.png
  38. BIN  app/assets/images/icon_campus_foodhousing_150x150.png
  39. BIN  app/assets/images/icon_campus_gettingaround_150x150.png
  40. BIN  app/assets/images/icon_campus_healthsafety_150x150.png
  41. BIN  app/assets/images/icon_campus_newtocampus_150x150.png
  42. BIN  app/assets/images/icon_campus_researchstudying_150x150.png
  43. BIN  app/assets/images/icon_campus_socialrecreation_150x150.png
  44. BIN  app/assets/images/icon_campus_studentgroups_150x150.png
  45. BIN  app/assets/images/icon_canvas_16x16.png
  46. BIN  app/assets/images/icon_checkmark_16x16.png
  47. BIN  app/assets/images/icon_classes_24x24.png
  48. BIN  app/assets/images/icon_close_16x16.png
  49. BIN  app/assets/images/icon_completed_24x24.png
  50. BIN  app/assets/images/icon_drive_16x16.png
  51. BIN  app/assets/images/icon_enrollment_24x24.png
  52. BIN  app/assets/images/icon_finances_24x24.png
  53. BIN  app/assets/images/icon_flag_16x16.png
  54. BIN  app/assets/images/icon_handshake_38x33.png
  55. BIN  app/assets/images/icon_info_16x16.png
  56. BIN  app/assets/images/icon_inprogress_24x24.png
  57. BIN  app/assets/images/icon_magnifying_glass_16x16.png
  58. BIN  app/assets/images/icon_mail_16x16.png
  59. BIN  app/assets/images/icon_message_16x16.png
  60. BIN  app/assets/images/icon_need_help_113x61.png
  61. BIN  app/assets/images/icon_note_16x16.png
  62. BIN  app/assets/images/icon_overdue_24x24.png
  63. BIN  app/assets/images/icon_page_white_16x16.png
  64. BIN  app/assets/images/icon_right_angle_blue_12x19.png
  65. BIN  app/assets/images/icon_right_arrow_15x22.png
  66. BIN  app/assets/images/icon_speech_bubble_12x13.png
  67. BIN  app/assets/images/icon_user_default_100x100.png
  68. BIN  app/assets/images/ucb_footer_logo.png
  69. +41 −0 app/assets/javascripts/angular/calcentral.js
  70. +14 −0 app/assets/javascripts/angular/controllers/dashboardController.js
  71. +12 −0 app/assets/javascripts/angular/controllers/errorController.js
  72. +18 −0 app/assets/javascripts/angular/controllers/notificationsController.js
  73. +13 −0 app/assets/javascripts/angular/controllers/profileController.js
  74. +12 −0 app/assets/javascripts/angular/controllers/splashController.js
  75. +26 −0 app/assets/javascripts/angular/controllers/userController.js
  76. 0  app/assets/javascripts/angular/filters/.gitkeep
  77. 0  app/assets/javascripts/angular/services/.gitkeep
  78. +14 −0 app/assets/javascripts/application.js
  79. +14 −0 app/assets/stylesheets/application.scss
  80. +8 −0 app/assets/stylesheets/dashboard.css
  81. +252 −0 app/assets/stylesheets/foundation_and_overrides.scss
  82. +60 −0 app/assets/stylesheets/mycalendar.css
  83. +8 −0 app/assets/stylesheets/notifications.css
  84. +63 −0 app/assets/stylesheets/splash.scss.css.erb
  85. +336 −0 app/assets/stylesheets/style.scss.css.erb
  86. +25 −0 app/assets/stylesheets/tasks.css
  87. +8 −0 app/controllers/application_controller.rb
  88. +8 −0 app/controllers/bootstrap_controller.rb
  89. +23 −0 app/controllers/sessions_controller.rb
  90. +37 −0 app/controllers/user_api_controller.rb
  91. +2 −0  app/helpers/application_helper.rb
  92. +43 −0 app/models/user_api.rb
  93. +3 −0  app/models/user_data.rb
  94. +1 −0  app/views/bootstrap/index.html.erb
  95. +52 −0 app/views/layouts/application.html.erb
  96. +4 −0 app/views/templates/_all.html.erb
  97. +286 −0 app/views/templates/_dashboard.html
  98. +3 −0  app/views/templates/_error_404.html
  99. +14 −0 app/views/templates/_launcher.html
  100. +4 −0 app/views/templates/_profile.html
  101. +25 −0 app/views/templates/_splash.html
  102. +4 −0 config.ru
  103. +68 −0 config/application.rb
  104. +6 −0 config/boot.rb
  105. +46 −0 config/database.yml
  106. +7 −0 config/environment.rb
  107. +45 −0 config/environments/development.rb
  108. +69 −0 config/environments/production.rb
  109. +42 −0 config/environments/test.rb
  110. +40 −0 config/environments/testext.rb
  111. +7 −0 config/initializers/backtrace_silencers.rb
  112. +7 −0 config/initializers/in_memory_database.rb
  113. +15 −0 config/initializers/inflections.rb
  114. +5 −0 config/initializers/mime_types.rb
  115. +3 −0  config/initializers/omniauth.rb
  116. +1,009 −0 config/initializers/populate_campus_h2.rb
  117. +3 −0  config/initializers/rails_config.rb
  118. +7 −0 config/initializers/secret_token.rb
  119. +8 −0 config/initializers/session_store.rb
  120. +14 −0 config/initializers/wrap_parameters.rb
  121. +74 −0 config/routes.rb
  122. +20 −0 config/settings.yml
  123. 0  config/settings/development.yml
  124. +8 −0 config/settings/production.yml
  125. +4 −0 config/settings/test.yml
  126. +8 −0 config/settings/testext.yml
  127. +25 −0 db/schema.rb
  128. +7 −0 db/seeds.rb
  129. +1 −0  fixtures/fakeable_proxy_data/canvas/mycourses.json
  130. 0  lib/assets/.gitkeep
  131. +15 −0 lib/campus_data.rb
  132. +10 −0 lib/tasks/travis.rake
  133. +26 −0 public/404.html
  134. +26 −0 public/422.html
  135. +25 −0 public/500.html
  136. +107 −0 public/dummy/notifications.json
  137. 0  public/favicon.ico
  138. +5 −0 public/robots.txt
  139. +6 −0 script/rails
  140. +20 −0 spec/controllers/user_api_controller_spec.rb
  141. +68 −0 spec/javascripts/calcentral/controllersSpec.js
  142. 0  spec/javascripts/helpers/.gitkeep
  143. +13 −0 spec/javascripts/helpers/specHelper.js
  144. +1,741 −0 spec/javascripts/lib/angular-mocks.js
  145. +78 −0 spec/javascripts/support/jasmine.yml
  146. +8 −0 spec/lib/campus_data_spec.rb
  147. +34 −0 spec/models/user_api_spec.rb
  148. +10 −0 spec/requests/authentication_spec.rb
  149. +58 −0 spec/spec_helper.rb
  150. +30 −0 spec/support/integration_spec_helper.rb
View
10 .editorconfig
@@ -0,0 +1,10 @@
+; editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
View
32 .gitignore
@@ -0,0 +1,32 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+log/
+*.log
+/tmp
+
+# Ignore RailsConfig local settings.
+*.local.yml
+
+# Ignore IDE settings.
+.idea/
+*.iml
+
+# Ignore the SASS cache
+.sass-cache
+
+# Ignore compiled CSS files (these will be auto-generated on server start)
+app/assets/stylesheets/application.css
+
+# Ignore the coverage directory (for checking in, otherwise useful)
+/coverage
View
1  .rspec
@@ -0,0 +1 @@
+--color
View
15 .rvmrc
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Uncomment the following lines if you want to verify rvm version per project
+# rvmrc_rvm_version="1.16.16 (stable)" # 1.10.1 seams as a safe start
+# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
+# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
+# return 1
+# }
+
+# Uncomment following line if you want options to be set only for given project.
+# PROJECT_JRUBY_OPTS=( --1.9 )
+# The variable PROJECT_JRUBY_OPTS requires the following to be run in shell:
+# chmod +x ${rvm_path}/hooks/after_use_jruby_opts
+
+rvm --create use jruby-1.7.0@calcentral
View
5 .travis.yml
@@ -0,0 +1,5 @@
+bundler_args: --without development testext production
+rvm:
+ - "jruby-19mode"
+env:
+ - JRUBY_OPTS="-Xcext.enabled=true -J-client -X-C"
View
106 Gemfile
@@ -0,0 +1,106 @@
+source "https://rubygems.org"
+
+# The core framework
+# https://github.com/rails/rails
+gem "rails", "3.2.8"
+
+# Postgresql adapter
+gem "activerecord-jdbcpostgresql-adapter", "~> 1.2.2.1"
+
+# Oracle adapter
+# Purposely excluding this for test environments since folks have to install ojdbc6
+group :development, :testext, :production do
+ gem "activerecord-oracle_enhanced-adapter", "~> 1.4.1"
+end
+
+# H2 adapter
+gem "activerecord-jdbch2-adapter", "~> 1.2.2.1"
+
+# A JSON implementation as a Ruby extension in C
+# http://flori.github.com/json/
+gem "json", "~> 1.7.5"
+
+# Keep env blue/clean
+# https://rubygems.org/gems/rails_config
+gem "rails_config", "~> 0.3.1"
+
+# CAS Strategy for OmniAuth
+# https://rubygems.org/gems/omniauth-cas
+gem "omniauth-cas", "~> 0.0.7"
+
+# Rest-Client: barebones rest-client proxy
+# https://rubygems.org/gems/rest-client
+gem "rest-client", "~> 1.6.7"
+
+# for VCR http recording tool
+gem "vcr", "~> 2.3.0"
+gem "fakeweb", "~> 1.3.0"
+gem "jruby-openssl", "~> 0.7.7"
+
+# for memcached connection
+gem "dalli", "~> 2.5.0"
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+
+ # This library adds angularjs support to Rails applications
+ # https://github.com/ludicast/angular-rails
+ gem "angular-rails", "~> 0.0.12"
+
+ # CSS Framework - also includes Compass and SASS
+ # https://github.com/zurb/foundation
+ gem "sass-rails", "~> 3.2.3"
+ gem "coffee-rails", "~> 3.2.1"
+ gem "compass-rails", "~> 1.0.3"
+ gem "zurb-foundation", "~> 3.2.0"
+
+ # Ruby wrapper for UglifyJS JavaScript compressor
+ # https://github.com/lautis/uglifier
+ gem "uglifier", "~> 1.3.0"
+end
+
+group :development, :test , :testext do
+ gem "rspec-rails", "~> 2.0"
+ gem "minitest-reporters"
+
+ # Test our JavaScript code.
+ # https://github.com/pivotal/jasmine-gem
+ gem "jasmine", "~> 1.2.1"
+ gem "therubyrhino", "~> 2.0.1"
+
+ # Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites
+ # https://rubygems.org/gems/simplecov
+ gem "simplecov", "~> 0.7.1", :require => false
+
+ # Capybara is an integration testing tool for rack based web applications.
+ # It simulates how a user would interact with a website
+ # https://rubygems.org/gems/capybara
+ gem "capybara", "~> 1.1.3"
+end
+
+group :development do
+ # Automatically reloads your browser when "view" files are modified.
+ # https://github.com/guard/guard-livereload
+ gem "guard-livereload", "~> 1.1.0"
+ gem "rack-livereload", "~> 0.3.8"
+
+ # Polling is evil:
+ # https://github.com/guard/guard#readme
+ gem "rb-inotify", "~> 0.8.8", :require => false
+ gem "rb-fsevent", "~> 0.9.2", :require => false
+ gem "rb-fchange", "~> 0.0.6", :require => false
+
+ # Start/stop rails + guard all at once
+ # http://stackoverflow.com/questions/8293747/need-a-less-repetitve-way-to-start-rails-on-mac-for-noob
+ # https://github.com/ddollar/foreman
+ gem "foreman", "~> 0.60.2"
+
+ # C-Extension dependency of foreman
+ # https://github.com/rtomayko/posix-spawn
+ gem "posix-spawn", "~> 0.3.6"
+end
+
+group :test do
+ gem "activerecord-jdbcsqlite3-adapter", "~> 1.2.2.1"
+end
View
279 Gemfile.lock
@@ -0,0 +1,279 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
+ mail (~> 2.4.4)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activerecord-jdbc-adapter (1.2.2.1)
+ activerecord-jdbch2-adapter (1.2.2.1)
+ activerecord-jdbc-adapter (~> 1.2.2.1)
+ jdbc-h2 (~> 1.3.0)
+ activerecord-jdbcpostgresql-adapter (1.2.2.1)
+ activerecord-jdbc-adapter (~> 1.2.2.1)
+ jdbc-postgres (>= 9.0, < 9.2)
+ activerecord-jdbcsqlite3-adapter (1.2.2.1)
+ activerecord-jdbc-adapter (~> 1.2.2.1)
+ jdbc-sqlite3 (~> 3.7.2)
+ activerecord-oracle_enhanced-adapter (1.4.1)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ addressable (2.3.2)
+ angular-rails (0.0.12)
+ coffee-script (~> 2.2.0)
+ rails
+ ansi (1.4.3)
+ arel (3.0.2)
+ bouncy-castle-java (1.5.0146.1)
+ builder (3.0.4)
+ capybara (1.1.3)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.3.6)
+ ffi (~> 1.0, >= 1.0.6)
+ chunky_png (1.2.6)
+ coderay (1.0.8)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.4.0)
+ compass (0.12.2)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ compass-rails (1.0.3)
+ compass (>= 0.12.2, < 0.14)
+ dalli (2.5.0)
+ diff-lcs (1.1.3)
+ em-websocket (0.3.8)
+ addressable (>= 2.1.1)
+ eventmachine (>= 0.12.9)
+ erubis (2.7.0)
+ eventmachine (1.0.0-java)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ fakeweb (1.3.0)
+ ffi (1.1.5-java)
+ foreman (0.60.2)
+ thor (>= 0.13.6)
+ fssm (0.2.9)
+ guard (1.5.3)
+ listen (>= 0.4.2)
+ lumberjack (>= 1.0.2)
+ pry (>= 0.9.10)
+ thor (>= 0.14.6)
+ guard-livereload (1.1.0)
+ em-websocket (>= 0.2.0)
+ guard (>= 1.5.0)
+ multi_json (~> 1.0)
+ hashie (1.2.0)
+ hike (1.2.1)
+ i18n (0.6.1)
+ jasmine (1.2.1)
+ jasmine-core (>= 1.2.0)
+ rack (~> 1.0)
+ rspec (>= 1.3.1)
+ selenium-webdriver (>= 0.1.3)
+ jasmine-core (1.2.0)
+ jdbc-h2 (1.3.154)
+ jdbc-postgres (9.1.901)
+ jdbc-sqlite3 (3.7.2)
+ journey (1.0.4)
+ jruby-openssl (0.7.7)
+ bouncy-castle-java (>= 1.5.0146.1)
+ json (1.7.5-java)
+ libwebsocket (0.1.5)
+ addressable
+ listen (0.5.3)
+ lumberjack (1.0.2)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ method_source (0.8.1)
+ mime-types (1.19)
+ minitest (4.2.0)
+ minitest-reporters (0.12.1)
+ ansi
+ builder
+ minitest (>= 2.12, < 5.0)
+ powerbar
+ modular-scale (1.0.2)
+ compass (>= 0.11.5)
+ sassy-math (>= 1.2)
+ multi_json (1.3.7)
+ nokogiri (1.5.5-java)
+ omniauth (1.1.1)
+ hashie (~> 1.2)
+ rack
+ omniauth-cas (0.0.7)
+ addressable (~> 2.2)
+ nokogiri (~> 1.5)
+ omniauth (~> 1.1.0)
+ polyglot (0.3.3)
+ posix-spawn (0.3.6)
+ powerbar (1.0.11)
+ ansi (~> 1.4.0)
+ hashie (>= 1.1.0)
+ pry (0.9.10-java)
+ coderay (~> 1.0.5)
+ method_source (~> 0.8)
+ slop (~> 3.3.1)
+ spoon (~> 0.0)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-livereload (0.3.8)
+ rack
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
+ bundler (~> 1.0)
+ railties (= 3.2.8)
+ rails_config (0.3.1)
+ activesupport (>= 3.0)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ rake (0.9.2.2)
+ rb-fchange (0.0.6)
+ ffi
+ rb-fsevent (0.9.2)
+ rb-inotify (0.8.8)
+ ffi (>= 0.5.0)
+ rdoc (3.12)
+ json (~> 1.4)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.3)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.3)
+ rspec-rails (2.11.4)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.11.0)
+ rubyzip (0.9.9)
+ sass (3.2.2)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ sassy-math (1.2)
+ compass (~> 0.11)
+ selenium-webdriver (2.26.0)
+ childprocess (>= 0.2.5)
+ libwebsocket (~> 0.1.3)
+ multi_json (~> 1.0)
+ rubyzip
+ simplecov (0.7.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.7.1)
+ simplecov-html (0.7.1)
+ slop (3.3.3)
+ spoon (0.0.1)
+ sprockets (2.1.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ therubyrhino (2.0.1)
+ therubyrhino_jar (>= 1.7.3)
+ therubyrhino_jar (1.7.4)
+ thor (0.16.0)
+ tilt (1.3.3)
+ treetop (1.4.12)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.35)
+ uglifier (1.3.0)
+ execjs (>= 0.3.0)
+ multi_json (~> 1.0, >= 1.0.2)
+ vcr (2.3.0)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+ zurb-foundation (3.2.0)
+ compass (>= 0.12.2)
+ modular-scale (>= 1.0.2)
+ rake
+ sass (>= 3.2.0)
+
+PLATFORMS
+ java
+
+DEPENDENCIES
+ activerecord-jdbch2-adapter (~> 1.2.2.1)
+ activerecord-jdbcpostgresql-adapter (~> 1.2.2.1)
+ activerecord-jdbcsqlite3-adapter (~> 1.2.2.1)
+ activerecord-oracle_enhanced-adapter (~> 1.4.1)
+ angular-rails (~> 0.0.12)
+ capybara (~> 1.1.3)
+ coffee-rails (~> 3.2.1)
+ compass-rails (~> 1.0.3)
+ dalli (~> 2.5.0)
+ fakeweb (~> 1.3.0)
+ foreman (~> 0.60.2)
+ guard-livereload (~> 1.1.0)
+ jasmine (~> 1.2.1)
+ jruby-openssl (~> 0.7.7)
+ json (~> 1.7.5)
+ minitest-reporters
+ omniauth-cas (~> 0.0.7)
+ posix-spawn (~> 0.3.6)
+ rack-livereload (~> 0.3.8)
+ rails (= 3.2.8)
+ rails_config (~> 0.3.1)
+ rb-fchange (~> 0.0.6)
+ rb-fsevent (~> 0.9.2)
+ rb-inotify (~> 0.8.8)
+ rest-client (~> 1.6.7)
+ rspec-rails (~> 2.0)
+ sass-rails (~> 3.2.3)
+ simplecov (~> 0.7.1)
+ therubyrhino (~> 2.0.1)
+ uglifier (~> 1.3.0)
+ vcr (~> 2.3.0)
+ zurb-foundation (~> 3.2.0)
View
10 Guardfile
@@ -0,0 +1,10 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'livereload' do
+ watch(%r{app/views/.+\.(erb|haml|slim)$})
+ watch(%r{app/helpers/.+\.rb})
+ watch(%r{public/.+\.(css|js|html)})
+ # Rails Assets Pipeline
+ watch(%r{app/assets/\w+/(.+\.(css|js|html)).*}) { |m| "/assets/#{m[2]}" }
+end
View
3  Procfile
@@ -0,0 +1,3 @@
+rails: rails server
+guard: bundle exec guard
+jasmine: rake jasmine
View
192 README.md
@@ -1,2 +1,190 @@
-calcentral
-==========
+#CalCentral
+
+Home of CalCentral. [![Build status for calcentral](https://secure.travis-ci.org/ets-berkeley-edu/calcentral.png)](http://travis-ci.org/ets-berkeley-edu/calcentral)
+
+## Dependencies
+
+* [Bundler](http://gembundler.com/rails3.html)
+* [Git](https://help.github.com/articles/set-up-git)
+* [JDBC Oracle driver](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html)
+* [JRuby 1.7.0](http://jruby.org/)
+* [PostgreSQL](http://www.postgresql.org/)
+* [Rails 3.2.8](http://rubyonrails.org/download)
+* [Rubygems](http://rubyforge.org/frs/?group_id=126)
+* [Rvm](https://rvm.io/rvm/install/) - Ruby version managers
+
+## Installation
+
+1. Install postgres
+```bash
+brew update
+brew install postgresql
+initdb /usr/local/var/postgres
+```
+
+2. Start postgres, add the user and create the necessary databases
+```bash
+pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
+psql postgres
+create database calcentral_development;
+create user calcentral_development with password 'secret';
+grant all privileges on database calcentral_development to calcentral_development;
+create database calcentral;
+create user calcentral with password 'secret';
+grant all privileges on database calcentral to calcentral;
+```
+
+3. Fork this repository, then:
+```bash
+git clone git@github.com:[your_github_acct]/calcentral.git
+```
+
+4. Go inside the `calcentral` repository
+```bash
+cd calcentral
+# Answer "yes" if it asks you to trust a new .rvmrc file.
+```
+
+5. Install jruby
+```bash
+rvm get head
+rvm install jruby-1.7.0
+cd ..
+cd calcentral
+# Answer "yes" again if it asks you to trust a new .rvmrc file.
+```
+
+6. (Optional for development) Make JRuby faster & enable C extensions by running this or put in your .bashrc:
+```bash
+export JRUBY_OPTS="-Xcext.enabled=true -J-d32 -J-client -X-C"
+```
+ * __WARNING__: Do switch between 32-bit and 64-bit JRuby after your gemset has been initialized (your bundle library will have serious issues). If you do need to change settings, make sure to reinitialize your gemset:
+ * ```rvm gemset delete calcentral```
+ * (set your JRUBY_OPTS)
+ * ```bundle install```
+
+7. Download the appropriate gems with [Bundler](http://gembundler.com/rails3.html)
+```bash
+bundle install
+```
+
+8. Copy and update the settings
+```
+cp config/settings.yml config/settings.local.yml
+cp config/settings/testext.yml config/settings/testext.local.yml
+cp config/settings/development.yml config/development/testext.local.yml
+```
+and update the settings in the `.local.yml` files.
+These won't be committed to the repository.
+
+9. Install JDBC driver (for Oracle connection)
+You may already have an Oracle driver from MyBerkeley-OAE development, in which case you just need to copy it to your local JRuby installation:
+```cp ~/.m2/repository/com/oracle/ojdbc6/11.2.0.3/ojdbc6-11.2.0.3.jar ~/.rvm/rubies/jruby-1.7.0/lib/```
+ * Otherwise, download [ojdbc6.jar](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html)
+ * Copy ojdbc6.jar to your local JRuby installation; e.g. ```~/.rvm/rubies/jruby-1.7.0/lib/```
+
+10. Initialize PostgreSQL database tables
+```bash
+rake db:schema:load
+```
+
+11. Start the server
+```bash
+rails s
+```
+
+## LiveReload & Testing
+
+See code changes happening live in the browser and look at the testing
+
+Run `foreman start` in the terminal, it will:
+* Start the rails server
+* Expose the [jasmine](http://pivotal.github.com/jasmine/) tests at http://localhost:8888
+* Start [Guard](https://github.com/guard/guard) for livereload.
+
+## Debugging
+
+### Emulating production mode locally
+
+1. Precompile the assets: [(more info)](http://stackoverflow.com/questions/7275636/rails-3-1-0-actionviewtemplateerrror-application-css-isnt-precompiled)
+```bash
+bundle exec rake assets:precompile
+```
+
+2. Serve static assets through rails
+```
+config.serve_static_assets = true
+```
+
+3. Start the server in production mode
+```bash
+rails s -e production
+```
+
+4. After testing, remove the static assets and generated pages
+```bash
+bundle exec rake assets:clean
+rm public/index.html
+# remove other pages ...
+```
+
+### Test connection
+
+Make sure you are on the Berkeley network or connected through [preconfigured VPN](https://kb.berkeley.edu/jivekb/entry.jspa?externalID=2665) for the Oracle connection.
+If you use VPN, use group #1 (1-Campus_VPN)
+
+### Tips
+
+1. On Mac OS X, to get RubyMine to pick up the necessary environment variables, open a new shell, set the environment variables, and:
+```bash
+/Applications/RubyMine.app/Contents/MacOS/rubymine &
+```
+
+2. If you want to explore the Oracle database on Mac OS X, use [SQL Developer](http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html)
+
+### Styleguide
+
+* Use an editor that supports [.editorconfig](http://editorconfig.org/#overview). Feel free to have a look at the [editor plug-ins](http://editorconfig.org/#download)
+* Use `data-ng-` instead of `ng-` or `ng:`
+
+:-1:
+```html
+<ng:view>
+<span ng-bind="name"></span>
+```
+:+1:
+```html
+<div data-ng-view></div>
+<span data-ng-bind="name"></span>
+```
+
+## API Endpoints:
+
+Projected endpoints:
+
+* ``` /api/user/:uid/status ```
+* ``` /api/user/:uid/course_sites ```
+* ``` /api/user/:uid/group_sites ```
+* ``` /api/user/:uid/upcoming_events ```
+* ``` /api/user/:uid/assignments_tasks ```
+
+To bootstrap the project, we currently have one static endpoint. It should be replaced soon.
+
+```
+/api/user/my/status :
+ is_logged_in: <boolean>
+ preferred_name: <string if exists else "">
+ uid: <string uid if logged in>
+ widget_data: <object>
+```
+
+## Freshening fake data feeds
+
+Make sure your test.local.yml file has real connections to real external services that are fakeable (Canvas, Google, etc).
+Now do:
+
+```bash
+rake spec freshen_vcr=true
+git add fixtures/fakeable_proxy_data
+git commit -a -m "Helpful commit message"
+```
View
7 Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Calcentral::Application.load_tasks
View
BIN  app/assets/images/calcentral_branding_strip.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/calcentral_homepage_collage.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/calcentral_logo_big.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/calcentral_masthead_landing.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/calcentral_masthead_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/classpages_map_not_available.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/dummy_cal1card.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/dummy_graph_awards_and_bill.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/dummy_graph_awards_and_bill_history.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/dummy_planning_budget.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/dummy_task_slider.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/favicon.ico
Binary file not shown
View
BIN  app/assets/images/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_academics_24x24.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_alert_16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_alert_24x24.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_arrow_right_16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_arrow_right_brown_16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_block_24x24.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_bspace_16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_calendar_16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_campus_academicplan_150x150.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_campus_advising_150x150.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_campus_campusdepartments_150x150.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_campus_career_150x150.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_campus_finances_150x150.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/icon_campus_foodhousing_150x150.png
Diff not rendered
View
BIN  app/assets/images/icon_campus_gettingaround_150x150.png
Diff not rendered
View
BIN  app/assets/images/icon_campus_healthsafety_150x150.png
Diff not rendered
View
BIN  app/assets/images/icon_campus_newtocampus_150x150.png
Diff not rendered
View
BIN  app/assets/images/icon_campus_researchstudying_150x150.png
Diff not rendered
View
BIN  app/assets/images/icon_campus_socialrecreation_150x150.png
Diff not rendered
View
BIN  app/assets/images/icon_campus_studentgroups_150x150.png
Diff not rendered
View
BIN  app/assets/images/icon_canvas_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_checkmark_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_classes_24x24.png
Diff not rendered
View
BIN  app/assets/images/icon_close_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_completed_24x24.png
Diff not rendered
View
BIN  app/assets/images/icon_drive_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_enrollment_24x24.png
Diff not rendered
View
BIN  app/assets/images/icon_finances_24x24.png
Diff not rendered
View
BIN  app/assets/images/icon_flag_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_handshake_38x33.png
Diff not rendered
View
BIN  app/assets/images/icon_info_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_inprogress_24x24.png
Diff not rendered
View
BIN  app/assets/images/icon_magnifying_glass_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_mail_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_message_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_need_help_113x61.png
Diff not rendered
View
BIN  app/assets/images/icon_note_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_overdue_24x24.png
Diff not rendered
View
BIN  app/assets/images/icon_page_white_16x16.png
Diff not rendered
View
BIN  app/assets/images/icon_right_angle_blue_12x19.png
Diff not rendered
View
BIN  app/assets/images/icon_right_arrow_15x22.png
Diff not rendered
View
BIN  app/assets/images/icon_speech_bubble_12x13.png
Diff not rendered
View
BIN  app/assets/images/icon_user_default_100x100.png
Diff not rendered
View
BIN  app/assets/images/ucb_footer_logo.png
Diff not rendered
View
41 app/assets/javascripts/angular/calcentral.js
@@ -0,0 +1,41 @@
+(function(window) {
+
+ /*global angular*/
+ 'use strict';
+
+ /**
+ * CalCentral module
+ */
+ var calcentral = angular.module('calcentral', []);
+
+ // Set the configuration
+ calcentral.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
+ // We set it to html5 mode so we don't have hash bang URLs
+ $locationProvider.html5Mode(true).hashPrefix('!');
+
+ // List all the routes
+ $routeProvider.when('/', {
+ templateUrl: 'templates/splash.html',
+ controller: 'SplashController'
+ }).
+ when('/dashboard', {
+ templateUrl: 'templates/dashboard.html',
+ controller: 'DashboardController'
+ }).
+ when('/profile', {
+ templateUrl: 'templates/profile.html',
+ controller: 'ProfileController'
+ }).
+
+ // Redirect to a 404 page
+ otherwise({
+ templateUrl: 'templates/404.html',
+ controller: 'ErrorController'
+ });
+
+ }]
+ );
+
+ // Hello calcentral
+ window.calcentral = calcentral;
+})(window);
View
14 app/assets/javascripts/angular/controllers/dashboardController.js
@@ -0,0 +1,14 @@
+(function() {
+ /*global calcentral*/
+ 'use strict';
+
+ /**
+ * Dashboard controller
+ */
+ calcentral.controller('DashboardController', ['$rootScope', function($rootScope) {
+
+ $rootScope.title = 'Dashboard | CalCentral';
+
+ }]);
+
+})();
View
12 app/assets/javascripts/angular/controllers/errorController.js
@@ -0,0 +1,12 @@
+(function() {
+ /*global calcentral*/
+ 'use strict';
+
+ /**
+ * Error controller
+ */
+ calcentral.controller('ErrorController', ['$rootScope', function($rootScope) {
+ $rootScope.title = 'Error | CalCentral';
+ }]);
+
+})();
View
18 app/assets/javascripts/angular/controllers/notificationsController.js
@@ -0,0 +1,18 @@
+(function() {
+ /*global calcentral*/
+ 'use strict';
+
+ /**
+ * Notifications controller
+ */
+ calcentral.controller('NotificationsController', ['$http', '$scope', function($http, $scope) {
+
+ $http.get('/dummy/notifications.json').success(function(data) {
+
+ $scope.notifications = data;
+
+ });
+
+ }]);
+
+})();
View
13 app/assets/javascripts/angular/controllers/profileController.js
@@ -0,0 +1,13 @@
+(function() {
+ /*global calcentral*/
+ 'use strict';
+
+ /**
+ * Profile controller
+ */
+ calcentral.controller('ProfileController', ['$rootScope', function($rootScope) {
+ $rootScope.title = 'Profile | CalCentral';
+ }]);
+
+})();
+
View
12 app/assets/javascripts/angular/controllers/splashController.js
@@ -0,0 +1,12 @@
+(function() {
+ /*global calcentral*/
+ 'use strict';
+
+ /**
+ * Splash controller
+ */
+ calcentral.controller('SplashController', ['$rootScope', function($rootScope) {
+ $rootScope.title = 'Home | CalCentral';
+ }]);
+
+})();
View
26 app/assets/javascripts/angular/controllers/userController.js
@@ -0,0 +1,26 @@
+(function(window) {
+ /*global calcentral*/
+ 'use strict';
+
+ /**
+ * User controller
+ */
+ calcentral.controller('UserController', ['$http', '$scope', function($http, $scope) {
+
+ $scope.user = {};
+
+ $http.get('/api/user/my/status.json').success(function(data) {
+ $scope.user = data;
+ });
+
+ $scope.signOut = function() {
+ window.location = '/logout';
+ };
+
+ $scope.signIn = function() {
+ window.location = '/login';
+ };
+
+ }]);
+
+})(window);
View
0  app/assets/javascripts/angular/filters/.gitkeep
No changes.
View
0  app/assets/javascripts/angular/services/.gitkeep
No changes.
View
14 app/assets/javascripts/application.js
@@ -0,0 +1,14 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require angular.min
+//= require_tree .
View
14 app/assets/stylesheets/application.scss
@@ -0,0 +1,14 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require foundation_and_overrides
+ *= require_tree .
+ */
View
8 app/assets/stylesheets/dashboard.css
@@ -0,0 +1,8 @@
+.cc-page-dashboard-column-shadow {
+ border-left: none;
+ box-shadow: -3px -1px 4px 0 #ccc;
+}
+
+.cc-page-dashboard-column-wide {
+ border-left: 1px solid #838383;
+}
View
252 app/assets/stylesheets/foundation_and_overrides.scss
@@ -0,0 +1,252 @@
+@import "foundation/common/ratios";
+
+// Settings file containing Foundation defaults.
+// Copy overrides to top, leaving reference values untouched below.
+
+$baseFontSize: 13px;
+$formSpacing: 7px;
+$mainColor: #2683BC;
+
+// ===========================
+// Do not edit below this line
+// ===========================
+
+// Grid Settings
+
+// $rowWidth: 1000px;
+// $columnGutter: 30px;
+// $totalColumns: 12;
+// $mobileTotalColumns: 4;
+// $blockGridElements: 12; // Highest number of block grid elements, Maximum of 24 supported
+
+// Colors Settings
+
+// $mainColor: #2ba6cb;
+// $secondaryColor: #e9e9e9;
+// $alertColor: #c60f13;
+// $successColor: #5da423;
+// $txtColor: #222;
+// $highlightColor: #ffff99;
+// $black: #000;
+// $white: #fff;
+// $shinyEdge: rgba(#fff, .5);
+// $darkEdge: rgba(#000, .2);
+
+// Font Settings
+
+// $headerFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
+// $headerFontWeight: bold;
+// $headerFontStyle: normal;
+// $headerFontColor: #222;
+// $bodyFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
+// $bodyFontWeight: normal;
+// $bodyFontStyle: normal;
+// $bodyFontColor: $txtColor;
+
+// Text Direction Settings
+
+// $textDirection: ltr; // Controls default global text direction, 'rtl' or 'ltr'
+
+// Button Settings
+
+// $buttonRadius: 3px;
+// $btnBase: 10px;
+
+// $tinyBtnBase: $btnBase - 5;
+// $smallBtnBase: $btnBase - 3;
+// $largeBtnBase: $btnBase + 5;
+
+// Form Settings
+
+// $formSpacing: 12px;
+// $labelFontWeight: 500;
+// $labelFontColor: lighten(#000, 30%);
+// $labelBtmMargin: 3px;
+// $inputFontColor: rgba(0,0,0,0.75);
+// $inputFontSize: 14px;
+// $inputBgColor: #fff;
+// $inputFocusBgColor: darken(#fff, 2%);
+// $inputBorderColor: darken(#fff, 20%);
+// $inputFocusBorderColor: darken(#fff, 30%);
+// $inputBorderStyle: solid;
+// $inputBorderWidth: 1px;
+// $inputBorderRadius: 2px;
+// $fieldsetBorderRadius: 3px;
+
+// Custom Form Settings
+
+// $custFormBorderColor: #ccc;
+// $custFormBgColor: #fff;
+// $custCheckColor: #222;
+// $custSelectCurrentFontColor: #141414;
+// $custSelectBgColor: #fff;
+// $custSelectBorderColor: #ddd;
+// $custSelectTriangleColor: #aaa;
+// $custSelectTriangleColorOpen: #222;
+// $custSelectDropHeight: 200px;
+// $custDropdownBgColor: #fff;
+// $custDropdownBorderColor: darken(#fff, 20%);
+// $custDropdownFontColor: #555;
+// $custDropdownSelectedBgColor: lighten(#2ba6cb, 40%);
+// $custDropdownSelectedFontColor: #000;
+// $custFormDisabledBgColor: #ddd;
+
+// Tab Settings
+
+// $tabHeight: 40px;
+// $tabTermFontSize: 12px;
+
+// Nav Bar Settings
+
+// $navBarHeight: 40px;
+// $navFlyoutBaseWidth: 250px;
+
+// Top Bar Settings
+
+// $topBarBgColor: #222;
+// $topBarHeight: 45px;
+// $topBarHeightMobile: 45px;
+// $topBarBtmMargin: 30px;
+// $topBarTitleWeight: bold;
+// $topBarTitleSize: 17px;
+// $topBarLinkColor: #fff;
+// $topBarLinkWeight: bold;
+// $topBarLinkSize: 13px;
+// $topBarDropBgColor: #222;
+// $topBarDropLinkColor: #fff;
+// $topBarDropToggleSize: 5px;
+// $topBarDropToggleColor: #fff;
+// $topBarDropToggleAlpha: 0.5;
+// $topBarSearchWidth: 200px;
+// $topBarBreakPoint: 940px; // Change to 9999px for always mobile layout
+// $topBarNavToggleSize: 8px;
+
+// UI Settings
+
+// $thumbRadius: 3px;
+// $progBarHeight: 25px;
+// $progBarBorderColor: darken(#fff, 20%);
+// $progBarBorderSize: 1px;
+// $progBarPad: 2px;
+// $linkListBottomMargin: 17px -22px;
+// $tableBorderRadius: 3px;
+
+// Tooltip Settings
+
+// $hasTipBorderBottom: dotted 1px #ccc;
+// $hasTipFontWeight: bold;
+// $hasTipFontColor: #333;
+// $hasTipBorderBottomHover: dotted 1px darken($mainColor, 20%);
+// $hasTipFontColorHover: $mainColor;
+// $tooltipBackgroundColor: #000;
+// $tooltipBackgroundOpacity: 0.85;
+// $tooltipFontSize: 12px;
+// $tooltipFontWeight: bold;
+// $tooltipFontColor: #fff;
+// $tapToCloseFontSize: 10;
+// $tapToCloseFontWeight: normal;
+// $tapToCloseFontColor: #888;
+// $tooltipFontSizeScreenSm: 14;
+// $tooltipBgOpacityScreenSm: 0.85;
+// $tooltipBorderRadius: 4px;
+
+// Pricing Table Settings
+
+// $priceTableBorder: solid 1px #ddd;
+// $priceTitleBgColor: #ddd;
+// $priceTitlePadding: 15px 20px;
+// $priceTitleAlign: center;
+// $priceTitleColor: #333;
+// $priceTitleWeight: bold;
+// $priceTitleSize: 16px;
+
+// $priceMoneyBgColor: #eee;
+// $priceMoneyPadding: 15px 20px;
+// $priceMoneyAlign: center;
+// $priceMoneyColor: #333;
+// $priceMoneyWeight: normal;
+// $priceMoneySize: 20px;
+
+// $priceBgColor: #fff;
+// $priceDescColor: #777;
+// $priceDescPadding: 15px;
+// $priceDescAlign: center;
+// $priceDescFontSize: 12px;
+// $priceDescWeight: normal;
+// $priceDescLineHeight: 1.4;
+// $priceDescBtmBorder: dotted 1px #ddd;
+
+// $priceItemColor: #333;
+// $priceItemPadding: 15px;
+// $priceItemAlign: center;
+// $priceItemFontSize: 14px;
+// $priceItemWeight: normal;
+// $priceItemBtmBorder: dotted 1px #ddd;
+
+// $priceCtaBgColor: #f5f5f5;
+// $priceCtaAlign: center;
+// $priceCtaPadding: 20px;
+
+// Orbit Settings
+
+// $orbitCaptionBgColorOldBrowser: #000;
+// $orbitCaptionBgColor: rgba(0,0,0,.6);
+// $orbitCaptionFontColor: #fff;
+// $orbitBulletNavColor: #999;
+// $orbitBulletNavColorActive: #222;
+// $orbitHasThumbBorderColor: #000;
+// $orbitHasThumbBorderWidth: 2px;
+// $orbitHasThumbBorderStyle: solid;
+// $orbitSlideNumBgColor: rgba(0,0,0,0.7);
+// $orbitSlideNumFontColor: #fff;
+// $orbitSlideNumPadding: 5px;
+
+// Clearing Settings
+
+// $clearingBg: rgba(0,0,0,0.8);
+// $clearingOldBrowserBg: rgb(0,0,0);
+// $clearingCaptionBg: rgba(0,0,0,0.7);
+// $clearingCaptionOldBrowserBg: rgb(0,0,0);
+// $clearingCaptionFontColor: #fff;
+// $clearingCloseColor: #fff;
+// $clearingArrowColor: #fff;
+// $clearingArrowSize: 16px;
+// $clearingCarouselBg: rgba(0,0,0,0.75);
+// $clearingCarouselOldBrowserBg: rgb(0,0,0);
+// $clearingCarouselHeight: 150px;
+// $clearingActiveImgHeight: 75%;
+// $clearingCarouselThumbWidth: 175px;
+// $clearingCarouselThumbActiveBorder: 4px solid rgb(255,255,255);
+// $clearingImgBg: rgba(0,0,0,0.75);
+// $clearingImgOldBrowserBg: rgb(0,0,0);
+
+// Joyride Settings
+
+// $tipBg: rgba(0,0,0,0.8);
+// $tipBgIE8: #000;
+// $tipFontColor: #fff;
+// $tipHeaderWeight: bold;
+// $tipDefaultWidth: 300px;
+// $tipBorderRadius: 4px;
+// $tipPadding: 18px 20px 24px;
+// $tipNubSize: 14px;
+// $tipFontSize: 14px;
+// $tipTimerWidth: 50px;
+// $tipTimerHeight: 3px;
+// $tipTimerBorder: solid 1px #555;
+// $tipTimerColor: #666;
+// $tipCloseColor: #777;
+// $tipCloseSize: 20px;
+// $tipCloseWeight: normal;
+// $tipScreenFill: rgba(0,0,0,0.5);
+
+// Modular Scale Settings
+
+// $ratio: $golden; // THIS IS DEFAULT IN MODULAR-SCALE
+// $baseFontSize: 14px;
+// $importantModNum: 44px;
+// $base-size: $baseFontSize $importantModNum;
+// Produced the following list of values: 14, 17, 23, 27, 37, 44, 59, 71, 95, 115;
+// http://www.modularscale.com by Tim Brown
+// https://github.com/scottkellum/modular-scale by scottkellum
+@import 'foundation';
View
60 app/assets/stylesheets/mycalendar.css
@@ -0,0 +1,60 @@
+/* Icon */
+#cc-widget-mycalendar .cc-widget-title .cc-icon {
+ margin-top: 3px;
+}
+
+.cc-widget-mycalendar-datelist {
+ list-style-type: none;
+ margin: 0;
+ max-height: 160px;
+ overflow: auto;
+ padding: 0;
+}
+
+/* List items */
+.cc-widget-mycalendar-datelist li {
+ border-bottom: 1px dotted #CACACA;
+ color: #474747;
+ overflow: hidden;
+}
+.cc-widget-mycalendar-datelist .cc-widget-mycalendar-isupcoming {
+ background: #f2fef3;
+ color: #000;
+}
+.cc-widget-mycalendar-datelist li:last-child {
+ border-bottom: none;
+}
+
+/* Time */
+.cc-widget-mycalendar-datelist-time {
+ font-family: 'Arial Narrow', sans-serif;
+ margin-right: 5px;
+}
+.cc-widget-mycalendar-datelist-time-hour {
+ font-size: 29px;
+ text-align: right;
+ width: 30px;
+}
+.cc-widget-mycalendar-datelist-time-minutes {
+ font-size: 14px;
+ line-height: 12px;
+ padding-top: 10px;
+}
+.cc-widget-mycalendar-datelist-time-ampm {
+ font-size: 11px;
+}
+.cc-widget-mycalendar-datelist-time-allday {
+ line-height: 27px;
+ text-align: right;
+ width: 44px;
+}
+
+/* Summary & location */
+.cc-widget-mycalendar-datelist-summary {
+ font-size: 12px;
+ line-height: 13px;
+ padding-top: 8px;
+}
+.cc-widget-mycalendar-datelist-location {
+ font-size: 10px;
+}
View
8 app/assets/stylesheets/notifications.css
@@ -0,0 +1,8 @@
+.cc-widget-notifications-summary {
+ padding-left: 30px;
+ width: 270px;
+}
+
+.cc-widget-section-list {
+ border-bottom: 1px dotted #cacaca;
+}
View
63 app/assets/stylesheets/splash.scss.css.erb
@@ -0,0 +1,63 @@
+.panel {
+ padding: 0;
+ background-color: #ffffff;
+}
+
+.cc-page-index-welcome1, .cc-page-index-welcome2 {
+ padding-top: 20px;
+}
+
+.cc-page-index-welcome1 p {
+ background: url(<%= asset_path 'calcentral_homepage_collage.png' %>) no-repeat top left scroll;
+ font-size: 1.3em;
+ height: 329px;
+ margin: 0;
+ padding: 10px;
+}
+
+.cc-page-index-welcome1 h3 {
+ color: #fff;
+ background-color: #C68811;
+ border-bottom: 5px solid #3F8BBF;
+ font-size: 1.5em;
+ font-weight: normal;
+ margin: 0;
+ padding: 10px;
+}
+
+.cc-page-index-welcome2 .cc-page-index-welcome2-handshake {
+ padding-left: 50px;
+ background: url(<%= asset_path 'icon_handshake_38x33.png' %>) no-repeat top left scroll;
+}
+
+
+.cc-page-index-welcome2 {
+ height: 412px;
+}
+.cc-page-index-welcome2 h3 {
+ border-bottom: 5px solid #3F8BBF;
+ font-size: 1.4em;
+ margin: 0;
+ padding: 10px;
+}
+.cc-page-index-welcome2 p {
+ margin: 1em 0.5em 1em 1em;
+}
+.cc-page-index-welcome2 li {
+ line-height: 1.5em;
+ list-style-image: url(<%= asset_path 'icon_speech_bubble_12x13.png' %>);
+}
+.cc-page-index-welcome2 .cc-page-index-welcome2-herefromyou {
+ font-weight: bold;
+ font-size: 1.1em;
+}
+.cc-page-index-welcome2 .cc-page-index-welcome2-handshake {
+ padding-left: 50px;
+ background: url(<%= asset_path 'icon_handshake_38x33.png' %>) no-repeat top left scroll;
+}
+
+/* Inset list items */
+
+ul {
+ padding: 0 0 0 40px;
+}
View
336 app/assets/stylesheets/style.scss.css.erb
@@ -0,0 +1,336 @@
+/* Body Foundation override */
+body {
+ background-color: #F2F2F2;
+}
+
+/* Masthead */
+body > header {
+ background: url(<%= asset_path 'calcentral_masthead_landing.png' %>);
+ background-repeat: no-repeat;
+ border: 1px solid #d3d8d8;
+ border-top: none;
+ cursor: pointer;
+ margin: 0 auto;
+ height: 90px;
+ position: relative;
+}
+
+body > header > h1 {
+ margin: 0;
+ text-indent: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+}
+
+
+/* Container */
+.cc-container-main {
+ background-color: #FFFFFF;
+ padding: 0 10px;
+}
+
+/* Launcher */
+.cc-launcher {
+ padding: 0;
+ position: absolute;
+ right: -1px;
+ top: 0;
+}
+.cc-launcher, .cc-launcher .cc-launcher-dropdown {
+ background: #fff;
+ border: 1px solid #114d80;
+ border-bottom-left-radius: 6px;
+ border-top: none;
+}
+.cc-launcher a {
+ color: #15315C;
+ font-weight: bold;
+}
+.cc-launcher .cc-launcher-icons {
+ border-right: 1px solid #114d80;
+ padding: 1px 10px 3px 5px;
+}
+.cc-launcher .cc-icon {
+ margin: 2px 0 0 5px;
+}
+.cc-launcher .cc-launcher-info {
+ padding: 2px 10px;
+}
+.cc-launcher .cc-launcher-icon-dropdown {
+ font-size: 8px;
+}
+.cc-launcher .cc-launcher-dropdown {
+ display: none;
+ position: absolute;
+ right: -1px;
+ z-index: 4;
+}
+.cc-launcher .cc-launcher-dropdown a {
+ display: block;
+ padding: 4px 10px;
+ text-align: right;
+}
+
+/* Footer */
+body > footer {
+ clear: both;
+ font-size: 0.85em;
+ margin: 0 auto;
+ overflow: hidden;
+ padding: 10px 10px 15px;
+ width: 960px;
+}
+
+body > footer a {
+ float: right;
+ font-weight: bold;
+ padding-left: 21px;
+}
+
+/* Foundation navbar overrides */
+.nav-bar {
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+.nav-bar > li > a {
+ font-weight: bold;
+}
+
+/* Useful classes */
+.cc-alert {
+ color: #FB0007 !important;
+}
+.cc-ellipsis {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.cc-icon, .cc-icon-big {
+ background: no-repeat;
+}
+.cc-icon {
+ height: 16px;
+ width: 16px;
+}
+
+.cc-icon-alert {
+ background-image: url(<%= asset_path 'icon_alert_16x16.png' %>);
+
+}
+.cc-icon-arrow-right-brown {
+ background-image: url(<%= asset_path 'icon_arrow_right_brown_16x16.png' %>);
+
+}
+.cc-icon-arrow-right {
+ background-image: url(<%= asset_path 'icon_arrow_right_16x16.png' %>);
+
+}
+.cc-icon-big {
+ height: 24px;
+ width: 24px;
+}
+
+.cc-container-widget .cc-widget-list-icon-big {
+ background-color: transparent;
+ background-position: 0 2px;
+ background-repeat: no-repeat;
+}
+
+.cc-icon-big-academics {
+ background-image: url(<%= asset_path 'icon_academics_24x24.png' %>);
+}
+.cc-icon-big-alert {
+ background-image: url(<%= asset_path 'icon_alert_24x24.png' %>);
+}
+.cc-icon-big-block {
+ background-image: url(<%= asset_path 'icon_block_24x24.png' %>);
+}
+.cc-icon-big-classes {
+ background-image: url(<%= asset_path 'icon_classes_24x24.png' %>);
+}
+.cc-icon-big-completed {
+ background-image: url(<%= asset_path 'icon_completed_24x24.png' %>);
+}
+.cc-icon-big-enrollment {
+ background-image: url(<%= asset_path 'icon_enrollment_24x24.png' %>);
+}
+.cc-icon-big-finances {
+ background-image: url(<%= asset_path 'icon_finances_24x24.png' %>);
+}
+.cc-icon-big-inprogress {
+ background-image: url(<%= asset_path 'icon_inprogress_24x24.png' %>);
+}
+.cc-icon-big-overdue {
+ background-image: url(<%= asset_path 'icon_overdue_24x24.png' %>);
+}
+.cc-icon-bspace {
+ background-image: url(<%= asset_path 'icon_bspace_16x16.png' %>);
+}
+.cc-icon-calendar {
+ background-image: url(<%= asset_path 'icon_calendar_16x16.png' %>);
+}
+.cc-icon-canvas {
+ background-image: url(<%= asset_path 'icon_canvas_16x16.png' %>);
+}
+.cc-icon-close {
+ background-image: url(<%= asset_path 'icon_close_16x16.png' %>);
+}
+.cc-icon-drive {
+ background-image: url(<%= asset_path 'icon_drive_16x16.png' %>);
+}
+.cc-icon-email {
+ background-image: url(<%= asset_path 'icon_message_16x16.png' %>);
+}
+.cc-icon-info {
+ background-image: url(<%= asset_path 'icon_info_16x16.png' %>);
+}
+.cc-icon-mail {
+ background-image: url(<%= asset_path 'icon_mail_16x16.png' %>);
+}
+
+/* 150x150 icons */
+.cc-icon-advising {
+ background-image: url(<%= asset_path 'icon_campus_advising_150x150.png' %>);
+}
+.cc-icon-academicplan {
+ background-image: url(<%= asset_path 'icon_campus_academicplan_150x150.png' %>);
+}
+.cc-icon-campusdepartments {
+ background-image: url(<%= asset_path 'icon_campus_campusdepartments_150x150.png' %>);
+}
+.cc-icon-career {
+ background-image: url(<%= asset_path 'icon_campus_career_150x150.png' %>);
+}
+.cc-icon-finances {
+ background-image: url(<%= asset_path 'icon_campus_finances_150x150.png' %>);
+}
+.cc-icon-gettingaround {
+ background-image: url(<%= asset_path 'icon_campus_gettingaround_150x150.png' %>);
+}
+.cc-icon-foodhousing {
+ background-image: url(<%= asset_path 'icon_campus_foodhousing_150x150.png' %>);
+}
+.cc-icon-healthsafety {
+ background-image: url(<%= asset_path 'icon_campus_healthsafety_150x150.png' %>);
+}
+.cc-icon-newtocampus {
+ background-image: url(<%= asset_path 'icon_campus_newtocampus_150x150.png' %>);
+}
+.cc-icon-researchstudying {
+ background-image: url(<%= asset_path 'icon_campus_researchstudying_150x150.png' %>);
+}
+.cc-icon-studentgroups {
+ background-image: url(<%= asset_path 'icon_campus_studentgroups_150x150.png' %>);
+}
+.cc-icon-socialrecreation {
+ background-image: url(<%= asset_path 'icon_campus_socialrecreation_150x150.png' %>);
+}
+
+.cc-left {
+ float: left;
+}
+.cc-right {
+ float: right;
+}
+.cc-input-search {
+ background: #fff url(<%= asset_path 'icon_magnifying_glass_16x16.png' %>) 98% center no-repeat;
+ border-radius: 4px;
+ padding: 2px 20px 2px 4px;
+}
+.cc-top-20 {
+ margin-top: 20px;
+}
+
+/* Widgets */
+
+.cc-container-widget .cc-widget-list {
+ margin: 0;
+ max-height: 200px;
+ overflow: auto;
+ padding: 0;
+}
+
+.cc-container-widget .cc-widget-list li {
+ border-bottom: 1px dotted #CACACA;
+ list-style-type: none;
+}
+
+.cc-widget-list-icon {
+ background-color: transparent;
+ background-position: 0 4px;
+ background-repeat: no-repeat;
+}
+
+.cc-widget-title {
+ border-bottom: 1px solid #999;
+ color: #474747;
+}
+
+.cc-widget-title h2 {
+ margin: 4px 0;
+ padding: 2px 0;
+ font-size: 16px;
+}
+
+.cc-widget-title-small {
+ margin-top: 3px;
+ font-size: 13px;
+ font-weight: normal;
+}
+
+.cc-widget-list-subtitle {
+ font-size: 11px;
+ line-height: 8px;
+ margin-left: 21px;
+ padding-bottom: 7px;
+}
+
+.cc-widget-section-label {
+ clear: both;
+ color: #232323;
+ font-size: 1.2em;
+ margin-top: 5px;
+}
+
+.cc-container-widget {
+ float: left;
+ margin-bottom: 10px;
+ margin-right: 10px;
+ width: 100%;
+}
+
+.cc-widget-main {
+ padding: 0 17px;
+}
+
+.cc-container-widgets {
+ margin: 0 15px;
+ overflow: hidden;
+}
+
+.cc-container-widget .cc-widget-list li:last-child {
+ border-bottom: none;
+}
+.cc-container-widget .cc-widget-list li a {
+ display: block;
+ padding: 4px 0 3px 21px;
+}
+.cc-container-widget .cc-widget-list li:last-child {
+ border-bottom: none;
+}
+
+.cc-container-widget .cc-widget-list {
+ margin: 0;
+ max-height: 200px;
+ overflow: auto;
+ padding: 0;
+}
+
+/* ==|== non-semantic helper classes ========================================
+ Please define your styles before this section.
+ ========================================================================== */
+
+/* For image replacement */
+.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
+.ir br { display: none; }
View
25 app/assets/stylesheets/tasks.css
@@ -0,0 +1,25 @@
+/* Tasks and Assigments */
+.cc-widget-tasks-taskslider {
+ margin: 10px 0;
+}
+
+.cc-widget-tasks-notifications-short-title {
+ display: block;
+ font-size: 14px;
+ padding-left: 30px;
+ width: 90%;
+}
+
+.cc-widget-notifications-list {
+ list-style-type: none;
+ margin: 0;
+ padding: 0 0 10px 0;
+}
+
+.cc-widget-notifications-list li {
+ margin-top: 10px;
+}
+
+.cc-widget-task-notifications-list-source {
+ padding-left: 30px;
+}
View
8 app/controllers/application_controller.rb
@@ -0,0 +1,8 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+
+ def authenticate
+ redirect_to login_url unless session[:user_id]
+ end
+
+end
View
8 app/controllers/bootstrap_controller.rb
@@ -0,0 +1,8 @@
+class BootstrapController < ApplicationController
+
+ caches_action(:index)
+
+ def index
+ end
+
+end
View
23 app/controllers/sessions_controller.rb
@@ -0,0 +1,23 @@
+class SessionsController < ApplicationController
+
+ def lookup
+ auth = request.env["omniauth.auth"]
+ session[:user_id] = auth['uid']
+ redirect_to '/dashboard', :notice => "Signed in!"
+ end
+
+ def destroy
+ expire_action(:controller => 'user_api', :action => 'status', :uid => session[:user_id])
+ reset_session
+ redirect_to "#{Settings.cas_logout_url}?url=#{CGI.escape(request.protocol + request.host_with_port)}"
+ end
+
+ def new
+ redirect_to '/auth/cas'
+ end
+
+ def failure
+ redirect_to root_url, :status => 401, :alert => "Authentication error: #{params[:message].humanize}"
+ end
+
+end
View
37 app/controllers/user_api_controller.rb
@@ -0,0 +1,37 @@
+class UserApiController < ApplicationController
+
+ caches_action(:status)
+
+ def status
+ user = get_user(session[:user_id])
+ if session[:user_id]
+ render :json => {
+ :is_logged_in => true,
+ :preferred_name => user.preferred_name || "",
+ :uid => session[:user_id],
+ :widget_data => {}
+ }.to_json
+ else
+ render :json => {
+ :is_logged_in => false
+ }.to_json
+ end
+ end
+
+ def get_user(uid)
+ Rails.cache.fetch(cache_key(uid)) do
+ UserApi.new(uid)
+ end
+ end
+
+ def cache_key(uid)
+ "user_#{uid}"
+ end
+
+ # TODO expire is not yet used, but should be called from any code that saves a user
+ def expire(uid)
+ expire_action(:controller => 'user_api', :action => 'status', :uid => uid)
+ Rails.cache.delete(cache_key(uid), :force => true)
+ end
+
+end
View
2  app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
View
43 app/models/user_api.rb
@@ -0,0 +1,43 @@
+class UserApi
+ include ActiveModel::Serialization
+ attr_accessor :uid
+
+ def initialize(uid)
+ self.uid = uid
+ @calcentral_user_data = UserData.where(:uid => self.uid).first
+ @campus_attributes = CampusData.get_person_attributes(self.uid) || {}
+ @default_name = @campus_attributes['person_name']
+ @override_name = @calcentral_user_data ? @calcentral_user_data.preferred_name : nil
+ end
+
+ def preferred_name
+ @override_name || @default_name
+ end
+ def preferred_name=(val)
+ if val.blank?
+ val = nil
+ else
+ val.strip!
+ end
+ @override_name = val
+ end
+
+ def save
+ if !@calcentral_user_data
+ @calcentral_user_data = UserData.create(uid: self.uid, preferred_name: @override_name)
+ else
+ stored_override = @calcentral_user_data.preferred_name
+ if stored_override != @override_name
+ @calcentral_user_data.update_attributes(preferred_name: @override_name)
+ end
+ end
+ end
+
+ def update_attributes(attributes)
+ if attributes.has_key?(:preferred_name)
+ self.preferred_name = attributes[:preferred_name]
+ end
+ save
+ end
+
+end
View
3  app/models/user_data.rb
@@ -0,0 +1,3 @@
+class UserData < ActiveRecord::Base
+ attr_accessible :preferred_name, :uid
+end
View
1  app/views/bootstrap/index.html.erb
@@ -0,0 +1 @@
+<div data-ng-view></div>
View
52 app/views/layouts/application.html.erb
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html lang="en" data-ng-app="calcentral">
+<head>
+ <meta charset="utf-8" />
+
+ <!-- Set the viewport width to device width for mobile -->
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+ <title data-ng-bind="title">CalCentral</title>
+
+ <meta name="description" content="CalCentral is a new resource for the UC Berkeley community." />
+
+ <link rel="icon" href="/assets/favicon.png" type="image/png" />
+
+ <link rel="shortcut icon" href="/assets/favicon.ico" />
+
+ <!-- Included CSS Files -->
+ <%= stylesheet_link_tag "application" %>
+
+ <!-- Included JS Files -->
+ <%= javascript_include_tag "application" %>
+
+ <%= csrf_meta_tags %>
+</head>
+
+<body class="cc-page-index">
+
+ <%= render 'templates/launcher' %>
+
+ <!-- Top Navbar -->
+ <div class="row">
+ <ul class="nav-bar">
+ <li class="active"><a href="/">Splash</a></li>
+ <li><a href="/dashboard">My Dashboard</a></li>
+ <li><a href="/secure/campus">My Campus</a></li>
+ </ul>
+ </div>
+
+ <div class="row cc-container-main" role="main">
+ <%= yield %>
+ </div>
+
+ <footer class="row">
+ <div class="cc-left">Copyright © 2012 The Regents of the University of California</div>
+ <a href="#">Help</a>
+ <a href="http://ets.berkeley.edu/calcentral-feedback">Feedback</a>
+ </footer>
+
+ <%= render 'templates/all' %>
+
+ </body>
+</html>
View
4 app/views/templates/_all.html.erb
@@ -0,0 +1,4 @@
+<%= render 'templates/splash' %>
+<%= render 'templates/dashboard' %>
+<%= render 'templates/profile' %>
+<%= render 'templates/error_404' %>
View
286 app/views/templates/_dashboard.html
@@ -0,0 +1,286 @@
+<script type="text/ng-template" id="templates/dashboard.html">
+ <div class="three columns">
+
+ <!-- Begin Calendar / Classes / Groups column -->
+ <div class="cc-container-widget" id="cc-widget-mycalendar">
+ <div class="cc-widget-title">
+ <h2>Up Next <a href="http://bcal.berkeley.edu" class="ir cc-right cc-icon cc-icon-calendar" title="View calendar in bCal">bCal</a></h2>
+ </div>
+ <!-- MAIN VIEW -->
+ <div class="cc-widget-mycalendar-container">
+
+ <ul class="cc-widget-mycalendar-datelist">
+
+ <li>
+ <div class="cc-widget-mycalendar-datelist-time cc-left">
+
+ <div class="cc-widget-mycalendar-datelist-time-hour cc-left">12</div>
+ <div class="cc-widget-mycalendar-datelist-time-minutes cc-left">
+ 30<br>
+ <span class="cc-widget-mycalendar-datelist-time-ampm">PM</span>
+ </div>
+ </div>
+ <div class="cc-widget-mycalendar-datelist-summary cc-ellipsis">
+ <a href="https://www.google.com/calendar/event?eid=aDVsZDE2NWZsdGVzNDBldGpraWFiZ2ZnaDAgc2hhY2tlckBiZXJrZWxleS5lZHU">Bart</a>
+
+ </div>
+ </li>
+
+ <li>
+ <div class="cc-widget-mycalendar-datelist-time cc-left">
+ <div class="cc-widget-mycalendar-datelist-time-hour cc-left">2</div>
+ <div class="cc-widget-mycalendar-datelist-time-minutes cc-left">
+ 00<br>
+ <span class="cc-widget-mycalendar-datelist-time-ampm">PM</span>
+ </div>
+ </div>
+ <div class="cc-widget-mycalendar-datelist-summary cc-ellipsis">
+ <a href="https://www.google.com/calendar/event?eid=MjNlMjZnaTFxOWtka2RtdjF1M2x0Nmc1ODQgc2hhY2tlckBiZXJrZWxleS5lZHU">Discuss Foundation</a>
+
+ <br><span class="cc-widget-mycalendar-datelist-location cc-ellipsis">Dwinelle 0004-Faculty Lab</span>
+
+ </div>
+ <a href="" title=""></a>
+ </li>
+
+ <li>
+ <div class="cc-widget-mycalendar-datelist-time cc-left">
+ <div class="cc-widget-mycalendar-datelist-time-allday cc-left">all-day</div>
+
+ </div>
+ <div class="cc-widget-mycalendar-datelist-summary cc-ellipsis">
+ <a href="https://www.google.com/calendar/event?eid=XzY4bzMyY2hnNjhvM2l0MWg2c3EzMGNwa2Y4bW04ZTlnY29zaXFjOWQ2b3EzZW9qNTc0c20yYmJmZTlnbTZyMzVfMjAxMjExMDUgc2hhY2tlckBiZXJrZWxleS5lZHU">Daphne OOO</a>
+
+ </div>
+ <a href="" title=""></a>
+ </li>
+ </ul>
+
+ </div>
+
+ </div>
+
+ <div class="cc-container-widget" id="cc-widget-myclasses">
+ <div class="cc-widget-title">
+ <h2>My Classes <span class="cc-right cc-widget-title-small">Fall 2012</span></h2>
+ </div>
+ <!-- MAIN VIEW -->
+ <div class="cc-widget-myclasses-list">
+
+ <ul class="cc-widget-list">
+
+ <li class="cc-widget-list-icon cc-icon-canvas">
+ <a href="https://ucberkeley.instructure.com/courses/832071" class="cc-ellipsis cc-myclasses-link-with-title">Biology</a>
+ <div class="cc-widget-list-subtitle cc-ellipsis">Biology for Poets</div>
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-bspace">
+ <a href="https://sakai-dev.berkeley.edu/portal/site/ba324114-0f04-4167-b2da-93c0df28d9d2" class="cc-ellipsis">Endurance Running 101</a>
+
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-canvas">
+ <a href="https://ucberkeley.instructure.com/courses/830013" class="cc-ellipsis cc-myclasses-link-with-title">Javascript-101</a>
+ <div class="cc-widget-list-subtitle cc-ellipsis">Intermediate JavaScript</div>
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-bspace">
+ <a href="https://sakai-dev.berkeley.edu/portal/site/cddb1acd-3e57-4f6a-9e66-a27a9a59b55f" class="cc-ellipsis cc-myclasses-link-with-title">PHYSICS 7B</a>
+ <div class="cc-widget-list-subtitle cc-ellipsis">Physics for Scientists and Engineers</div>
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-canvas">
+ <a href="https://ucberkeley.instructure.com/courses/750027" class="cc-ellipsis cc-myclasses-link-with-title">PLEO 22</a>
+ <div class="cc-widget-list-subtitle cc-ellipsis">Lessons from the Cambrian Explosion</div>
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-canvas">
+ <a href="https://ucberkeley.instructure.com/courses/830065" class="cc-ellipsis cc-myclasses-link-with-title">Responsive-Design</a>
+ <div class="cc-widget-list-subtitle cc-ellipsis">Responsive Design Workshop</div>
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-canvas">
+ <a href="https://ucberkeley.instructure.com/courses/760795" class="cc-ellipsis cc-myclasses-link-with-title">Stat 150C</a>
+ <div class="cc-widget-list-subtitle cc-ellipsis">Applied Sabrmetrics</div>
+ </li>
+
+ </ul>
+
+ </div>
+
+ </div>
+
+ <div class="cc-container-widget" id="cc-widget-mygroups">
+ <div class="cc-widget-title">
+ <h2>My Groups</h2>
+ </div>
+ <!-- MAIN VIEW -->
+ <div class="cc-widget-mygroups-list">
+
+ <ul class="cc-widget-list">
+
+ <li class="cc-widget-list-icon cc-icon-canvas">
+ <a class="cc-ellipsis" href="https://ucberkeley.instructure.com/groups/49957" title="">Canvas/ETS Collaboration</a>
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-bspace">
+ <a class="cc-ellipsis" href="https://sakai-dev.berkeley.edu/portal/site/7ea7d89c-b87c-4221-a2ea-16aee252b967" title="">OE IT Design Initiative</a>
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-bspace">
+ <a class="cc-ellipsis" href="https://sakai-dev.berkeley.edu/portal/site/b1df3076-88c5-43cc-00d2-632b196f8497" title="">UIE Seminars &amp; UCD Group Resources</a>
+ </li>
+
+ <li class="cc-widget-list-icon cc-icon-bspace">
+ <a class="cc-ellipsis" href="https://sakai-dev.berkeley.edu/portal/site/b3833e7d-fab2-42ae-80d8-2fad0e1dd147" title="">shacker test site</a>
+ </li>
+
+ </ul>
+
+ </div>
+
+ </div>
+
+
+ <!-- End Calendar / Classes / Groups column -->
+ </div>
+
+
+ <div class="four columns cc-page-dashboard-column-shadow">
+ <!-- Begin Tasks / Assignments column -->
+
+
+ <div class="cc-container-widget" id="cc-widget-tasks">
+ <div class="cc-widget-title">
+ <h2>Assignments and Tasks</h2>
+ </div>
+ <!-- MAIN VIEW -->
+ <div class="cc-tasks-list">
+ <div class="cc-widget-body">
+ <a href="#" data-notreal="standard">
+ <img src="/assets/dummy_task_slider.png" alt="Task slider placeholder" class="cc-widget-tasks-taskslider">
+ </a>
+ <div class="cc-widget-section-label">Due</div>
+ <ul class="cc-widget-notifications-list cc-widget-section-list">
+
+
+
+ <li class="cc-widget-list-icon-big cc-icon-big-overdue">
+ <a href="https://mail.google.com/tasks/canvas?pli=1" class="cc-widget-tasks-notifications-short-title cc-ellipsis cc-alert">Box of Bandaids</a>
+
+ <div class="cc-widget-task-notifications-list-source">
+
+ <em>Google Tasks</em>
+
+ </div>
+ </li>
+
+
+
+ <li class="cc-widget-list-icon-big cc-icon-big-overdue">
+ <a href="https://mail.google.com/tasks/canvas?pli=1" class="cc-widget-tasks-notifications-short-title cc-ellipsis cc-alert">Alphabetize MP3s</a>
+
+ <div class="cc-widget-task-notifications-list-source">
+
+ <em>Google Tasks</em>
+
+ </div>