Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/frontend' into frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
amikhile committed Feb 19, 2012
2 parents d4ba01c + 1f6277f commit 231e68b
Show file tree
Hide file tree
Showing 69 changed files with 1,362 additions and 1,257 deletions.
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ gem "cancan"
gem 'devise'
gem 'sunspot_rails'
gem 'sunspot_solr'
gem 'progress_bar' # for sunspot

gem 'therubyracer'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :development, :test do
gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
gem "ruby-debug-base19x", '>=0.11.30.pre7'
gem "ruby-debug-base19x", '>= 0.11.30.pre7'
gem "ruby-debug-ide"
gem "nifty-generators"
gem 'mongrel', '>= 1.2.0.pre2' #for ruby v1.9.2
gem 'progress_bar' # for sunspot
end

gem 'bootstrap-sass', :git => 'https://github.com/thomas-mcdonald/bootstrap-sass.git', :branch => "2.0"

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', "~> 3.2.0"
gem 'coffee-rails', "~> 3.2.0"
gem 'uglifier', '>= 1.0.3'
gem 'bootstrap-sass', '~> 2.0.0' #, :git => 'https://github.com/thomas-mcdonald/bootstrap-sass.git'
gem 'bootstrap-will_paginate'
#gem 'compass'#, ">= 0.11.beta.3"
end
50 changes: 22 additions & 28 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
GIT
remote: git://github.com/mark-moseley/linecache
revision: 869c6a65155068415925067e480741bd0a71527e
remote: https://github.com/amatsuda/kaminari.git
revision: 2ed15e327662f47e78c0404b4968764a792ff282
specs:
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)

GIT
remote: git://github.com/plataformatec/simple_form.git
revision: b36a9d2c53012b5da5d00195869906250d790f06
specs:
simple_form (2.0.0.rc)
actionpack (~> 3.0)
activemodel (~> 3.0)
kaminari (0.13.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
railties (>= 3.0.0)

GIT
remote: https://github.com/parasew/acts_as_tree.git
Expand All @@ -21,7 +15,7 @@ GIT

GIT
remote: https://github.com/thomas-mcdonald/bootstrap-sass.git
revision: 86eadbe5542edace510e8a0507641587ec46a423
revision: 6e75ae8075b615c93b336d0a495edb81e7311514
branch: 2.0
specs:
bootstrap-sass (2.0.0)
Expand Down Expand Up @@ -59,8 +53,6 @@ GEM
archive-tar-minitar (0.5.2)
arel (3.0.0)
bcrypt-ruby (3.0.1)
bootstrap-will_paginate (0.0.4)
will_paginate
builder (3.0.0)
cancan (1.6.7)
coffee-rails (3.2.2)
Expand All @@ -72,7 +64,7 @@ GEM
coffee-script-source (1.2.0)
columnize (0.3.6)
daemons (1.0.10)
devise (2.0.0)
devise (2.0.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
railties (~> 3.1)
Expand All @@ -93,10 +85,9 @@ GEM
railties (>= 3.2.0.beta, < 5.0)
thor (~> 0.14)
json (1.6.5)
kaminari (0.13.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
libv8 (3.3.10.4)
linecache19 (0.5.13)
ruby_core_source (>= 0.1.4)
mail (2.4.1)
i18n (>= 0.4.0)
mime-types (~> 1.16)
Expand Down Expand Up @@ -142,9 +133,9 @@ GEM
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rsolr (1.0.6)
rsolr (1.0.7)
builder (>= 2.1.2)
ruby-debug-base19x (0.11.30.pre9)
ruby-debug-base19x (0.11.30.pre10)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
rake (>= 0.8.1)
Expand All @@ -153,11 +144,14 @@ GEM
rake (>= 0.8.1)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
sass (3.1.14)
sass (3.1.15)
sass-rails (3.2.4)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
simple_form (2.0.0.rc)
actionpack (~> 3.0)
activemodel (~> 3.0)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
Expand All @@ -171,6 +165,8 @@ GEM
sunspot (= 1.3.0)
sunspot_solr (1.3.0)
escape (~> 0.0.4)
therubyracer (0.9.9)
libv8 (~> 3.3.10)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
Expand All @@ -186,22 +182,19 @@ GEM
multi_json (>= 1.0.2)
warden (1.1.0)
rack (>= 1.0)
will_paginate (3.0.3)

PLATFORMS
ruby

DEPENDENCIES
acts_as_tree!
bootstrap-sass!
bootstrap-will_paginate
cancan
coffee-rails (~> 3.2.0)
devise
haml
jquery-rails
kaminari
linecache19!
kaminari!
mongrel (>= 1.2.0.pre2)
mysql2 (>= 0.3)
nifty-generators
Expand All @@ -211,8 +204,9 @@ DEPENDENCIES
ruby-debug-ide
sass
sass-rails (~> 3.2.0)
simple_form!
simple_form (~> 2.0.0.rc)
sunspot_rails
sunspot_solr
therubyracer
thin
uglifier (>= 1.0.3)
8 changes: 7 additions & 1 deletion app/assets/javascripts/admin.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//= require jquery
//= require modernizr.custom
//= require jquery.tokeninput
//= require jquery.alphanumeric
//= require jquery_ujs
//= require bootstrap
//= require_self
Expand Down Expand Up @@ -38,8 +42,10 @@ $(function () {
$('#lesson_rss').live('click', function () {
if ($(this).is(':checked')) {
// Add RSS categories to catalogs
$('#lesson_catalog_tokens').tokenInput("add", rss_catalog);
} else {
// Remove RSS categories to catalogs
$('#lesson_catalog_tokens').tokenInput("remove", rss_catalog);
}
});

Expand All @@ -63,4 +69,4 @@ function auto_parse() {

e.preventDefault();
});
}
}
4 changes: 3 additions & 1 deletion app/assets/javascripts/user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//= require jquery
//= require modernizr.custom
//= require jquery_ujs
//= require bootstrap
//= require_self
//= require_tree ./common
//= require_tree ./user
//= require bootstrap
27 changes: 22 additions & 5 deletions app/assets/stylesheets/admin.css.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
/*
*= require token-input
*= require_self
*= require_tree ./admin
*/

@import "bootstrap";

* {
-webkit-transition: all 0.5s ease !important;
-moz-transition: all 0.5s ease !important;
-ms-transition: all 0.5s ease !important;
-o-transition: all 0.5s ease !important;
}

body {
font-family: Arial;
padding-top: 80px;
padding-top: 90px;
}

.clear {
Expand All @@ -21,10 +30,16 @@ body {
font-weight: normal;
}
}
}

.navbar-search .search-query {
color: black;
ul.nav {
li {
a {
color: rgba(255, 255, 255, 0.8);
&:hover {
color: white;
}
}
}
}
}

.brand.logout {
Expand All @@ -34,8 +49,10 @@ body {

.navbar-search {
.search-query {
color: black;
background-color: rgba(255, 255, 255, 0.8);
&:hover {
color: gray;
background-color: rgba(255, 255, 255, 0.9);
}
}
Expand Down
41 changes: 0 additions & 41 deletions app/controllers/admin/assets_controller.rb

This file was deleted.

41 changes: 41 additions & 0 deletions app/controllers/admin/file_assets_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
class Admin::FileAssetsController < Admin::ApplicationController
def index
@file_assets = FileAsset.page(params[:page])
end

def show
@file_asset = FileAsset.find(params[:id])
end

def new
@file_asset = FileAsset.new
end

def create
@file_asset = FileAsset.new(params[:file])
if @file_asset.save
redirect_to [:admin, @files], :notice => "Successfully created file."
else
render :action => 'new'
end
end

def edit
@file_asset = FileAsset.find(params[:id])
end

def update
@file_asset = FileAsset.find(params[:id])
if @file_asset.update_attributes(params[:file])
redirect_to [:admin, @files], :notice => "Successfully updated file."
else
render :action => 'edit'
end
end

def destroy
@file_asset = FileAsset.find(params[:id])
@file_asset.destroy
redirect_to admin_filess_url, :notice => "Successfully destroyed file."
end
end
4 changes: 2 additions & 2 deletions app/controllers/admin/lessons_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
class Admin::LessonsController < Admin::ApplicationController
before_filter :set_fields, :only => [:new, :create, :edit, :update, :edit_long_descr, :update_long_descr]


def index
@filter = params[:filter]
if @filter && @filter == 'all'
Expand All @@ -23,7 +22,7 @@ def show

def new
@lesson = Lesson.new
@lesson.catalogs << Catalog.find_by_catalognodename('Video') # Add it to RSS by default
@lesson.catalogs << @rss # Add it to RSS by default
@languages.each{ |l|
@lesson.lesson_descriptions.build(:lang => l.code3)
}
Expand Down Expand Up @@ -124,6 +123,7 @@ def set_fields
@lecturers = Lecturer.all
@container_types = ContainerType.all.map{|ct| [ct.name, ct.id]}
@security = SECURITY.collect{|s| [ s[:name], s[:level] ] }
@rss = Catalog.find_by_catalognodename('Video')
end

def sort_descriptions
Expand Down
Loading

0 comments on commit 231e68b

Please sign in to comment.