suite
This commit is contained in:
parent
d70c4a5601
commit
e4e4463be1
19
Gemfile
19
Gemfile
@ -1,17 +1,16 @@
|
||||
source 'http://rubygems.org'
|
||||
|
||||
gem 'rails', '3.0.20'
|
||||
gem 'rails', '4.2.10'
|
||||
|
||||
# Bundle edge Rails instead:
|
||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||
|
||||
gem 'sqlite3'
|
||||
gem 'yaml_db'
|
||||
gem 'mysql2', '< 0.3'
|
||||
#gem 'sqlite3', "~> 1.3.5"
|
||||
|
||||
gem 'mysql2', "0.4.10"
|
||||
# Asset template engines
|
||||
|
||||
gem 'sass'
|
||||
gem 'sass-rails', "4.0.5"
|
||||
|
||||
gem 'jquery-rails'
|
||||
|
||||
@ -40,12 +39,12 @@ gem 'carrierwave'
|
||||
|
||||
gem 'mimetype-fu'
|
||||
|
||||
gem "cancan"
|
||||
#gem "cancan"
|
||||
|
||||
gem "meta_where"
|
||||
gem 'meta_search'
|
||||
#gem "meta_where"
|
||||
#gem 'meta_search'
|
||||
|
||||
gem "devise"
|
||||
#gem "devise" , "1.4.3"
|
||||
gem "haml", ">= 3.0.0"
|
||||
|
||||
gem 'unicorn'
|
||||
|
265
Gemfile.lock
265
Gemfile.lock
@ -1,121 +1,154 @@
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
abstract (1.0.0)
|
||||
actionmailer (3.0.20)
|
||||
actionpack (= 3.0.20)
|
||||
mail (~> 2.2.19)
|
||||
actionpack (3.0.20)
|
||||
activemodel (= 3.0.20)
|
||||
activesupport (= 3.0.20)
|
||||
builder (~> 2.1.2)
|
||||
erubis (~> 2.6.6)
|
||||
i18n (~> 0.5.0)
|
||||
rack (~> 1.2.5)
|
||||
rack-mount (~> 0.6.14)
|
||||
rack-test (~> 0.5.7)
|
||||
tzinfo (~> 0.3.23)
|
||||
activemodel (3.0.20)
|
||||
activesupport (= 3.0.20)
|
||||
builder (~> 2.1.2)
|
||||
i18n (~> 0.5.0)
|
||||
activerecord (3.0.20)
|
||||
activemodel (= 3.0.20)
|
||||
activesupport (= 3.0.20)
|
||||
arel (~> 2.0.10)
|
||||
tzinfo (~> 0.3.23)
|
||||
activeresource (3.0.20)
|
||||
activemodel (= 3.0.20)
|
||||
activesupport (= 3.0.20)
|
||||
activesupport (3.0.20)
|
||||
acts_as_list (0.1.2)
|
||||
acts_as_tree (0.1.1)
|
||||
arel (2.0.10)
|
||||
bcrypt-ruby (2.1.4)
|
||||
builder (2.1.2)
|
||||
cancan (1.6.4)
|
||||
carrierwave (0.5.3)
|
||||
activesupport (~> 3.0)
|
||||
devise (1.3.4)
|
||||
bcrypt-ruby (~> 2.1.2)
|
||||
orm_adapter (~> 0.0.3)
|
||||
warden (~> 1.0.3)
|
||||
erubis (2.6.6)
|
||||
abstract (>= 1.0.0)
|
||||
formtastic (1.2.3)
|
||||
actionpack (>= 2.3.7)
|
||||
activesupport (>= 2.3.7)
|
||||
i18n (~> 0.4)
|
||||
haml (3.1.1)
|
||||
i18n (0.5.4)
|
||||
jquery-rails (1.0.2)
|
||||
railties (~> 3.0)
|
||||
thor (~> 0.14)
|
||||
json (1.8.2)
|
||||
kaminari (0.12.4)
|
||||
rails (>= 3.0.0)
|
||||
kgio (2.9.3)
|
||||
mail (2.2.20)
|
||||
activesupport (>= 2.3.6)
|
||||
i18n (>= 0.4.0)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
meta_search (1.0.5)
|
||||
actionpack (~> 3.0.2)
|
||||
activerecord (~> 3.0.2)
|
||||
activesupport (~> 3.0.2)
|
||||
arel (~> 2.0.2)
|
||||
meta_where (1.0.4)
|
||||
activerecord (~> 3.0.0)
|
||||
activesupport (~> 3.0.0)
|
||||
arel (~> 2.0.7)
|
||||
mime-types (1.25.1)
|
||||
actionmailer (4.2.10)
|
||||
actionpack (= 4.2.10)
|
||||
actionview (= 4.2.10)
|
||||
activejob (= 4.2.10)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
actionpack (4.2.10)
|
||||
actionview (= 4.2.10)
|
||||
activesupport (= 4.2.10)
|
||||
rack (~> 1.6)
|
||||
rack-test (~> 0.6.2)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||
actionview (4.2.10)
|
||||
activesupport (= 4.2.10)
|
||||
builder (~> 3.1)
|
||||
erubis (~> 2.7.0)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
activejob (4.2.10)
|
||||
activesupport (= 4.2.10)
|
||||
globalid (>= 0.3.0)
|
||||
activemodel (4.2.10)
|
||||
activesupport (= 4.2.10)
|
||||
builder (~> 3.1)
|
||||
activerecord (4.2.10)
|
||||
activemodel (= 4.2.10)
|
||||
activesupport (= 4.2.10)
|
||||
arel (~> 6.0)
|
||||
activesupport (4.2.10)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
acts_as_list (0.9.19)
|
||||
activerecord (>= 3.0)
|
||||
acts_as_tree (2.9.1)
|
||||
activerecord (>= 3.0.0)
|
||||
arel (6.0.4)
|
||||
builder (3.2.4)
|
||||
carrierwave (1.3.2)
|
||||
activemodel (>= 4.0.0)
|
||||
activesupport (>= 4.0.0)
|
||||
mime-types (>= 1.16)
|
||||
ssrf_filter (~> 1.0)
|
||||
concurrent-ruby (1.1.8)
|
||||
crass (1.0.6)
|
||||
erubis (2.7.0)
|
||||
formtastic (3.1.5)
|
||||
actionpack (>= 3.2.13)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
haml (5.2.1)
|
||||
temple (>= 0.8.0)
|
||||
tilt
|
||||
hike (1.2.3)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jquery-rails (4.4.0)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
kaminari (1.2.1)
|
||||
activesupport (>= 4.1.0)
|
||||
kaminari-actionview (= 1.2.1)
|
||||
kaminari-activerecord (= 1.2.1)
|
||||
kaminari-core (= 1.2.1)
|
||||
kaminari-actionview (1.2.1)
|
||||
actionview
|
||||
kaminari-core (= 1.2.1)
|
||||
kaminari-activerecord (1.2.1)
|
||||
activerecord
|
||||
kaminari-core (= 1.2.1)
|
||||
kaminari-core (1.2.1)
|
||||
kgio (2.11.3)
|
||||
loofah (2.9.1)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
mime-types (3.3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2021.0225)
|
||||
mimetype-fu (0.1.2)
|
||||
mysql2 (0.2.24)
|
||||
orm_adapter (0.0.5)
|
||||
polyglot (0.3.5)
|
||||
rack (1.2.8)
|
||||
rack-mount (0.6.14)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (0.5.7)
|
||||
mini_mime (1.1.0)
|
||||
mini_portile2 (2.4.0)
|
||||
minitest (5.14.4)
|
||||
multi_json (1.15.0)
|
||||
mysql2 (0.4.10)
|
||||
nokogiri (1.10.10)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
rack (1.6.13)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rails (3.0.20)
|
||||
actionmailer (= 3.0.20)
|
||||
actionpack (= 3.0.20)
|
||||
activerecord (= 3.0.20)
|
||||
activeresource (= 3.0.20)
|
||||
activesupport (= 3.0.20)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.0.20)
|
||||
railties (3.0.20)
|
||||
actionpack (= 3.0.20)
|
||||
activesupport (= 3.0.20)
|
||||
rails (4.2.10)
|
||||
actionmailer (= 4.2.10)
|
||||
actionpack (= 4.2.10)
|
||||
actionview (= 4.2.10)
|
||||
activejob (= 4.2.10)
|
||||
activemodel (= 4.2.10)
|
||||
activerecord (= 4.2.10)
|
||||
activesupport (= 4.2.10)
|
||||
bundler (>= 1.3.0, < 2.0)
|
||||
railties (= 4.2.10)
|
||||
sprockets-rails
|
||||
rails-deprecated_sanitizer (1.0.4)
|
||||
activesupport (>= 4.2.0.alpha)
|
||||
rails-dom-testing (1.0.9)
|
||||
activesupport (>= 4.2.0, < 5.0)
|
||||
nokogiri (~> 1.6)
|
||||
rails-deprecated_sanitizer (>= 1.0.1)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
loofah (~> 2.3)
|
||||
railties (4.2.10)
|
||||
actionpack (= 4.2.10)
|
||||
activesupport (= 4.2.10)
|
||||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (~> 0.14.4)
|
||||
raindrops (0.13.0)
|
||||
rake (10.4.2)
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
rmagick (2.16.0)
|
||||
sass (3.1.1)
|
||||
simple-navigation (3.2.0)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
raindrops (0.19.1)
|
||||
rake (13.0.3)
|
||||
rmagick (4.2.2)
|
||||
sass (3.2.19)
|
||||
sass-rails (4.0.5)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
sass (~> 3.2.2)
|
||||
sprockets (~> 2.8, < 3.0)
|
||||
sprockets-rails (~> 2.0)
|
||||
simple-navigation (4.3.0)
|
||||
activesupport (>= 2.3.2)
|
||||
sqlite3 (1.3.3)
|
||||
thor (0.14.6)
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.44)
|
||||
unicorn (4.9.0)
|
||||
sprockets (2.12.5)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-rails (2.3.3)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
ssrf_filter (1.0.7)
|
||||
temple (0.8.2)
|
||||
thor (1.1.0)
|
||||
thread_safe (0.3.6)
|
||||
tilt (1.4.1)
|
||||
tzinfo (1.2.9)
|
||||
thread_safe (~> 0.1)
|
||||
unicorn (6.0.0)
|
||||
kgio (~> 2.6)
|
||||
rack
|
||||
raindrops (~> 0.7)
|
||||
warden (1.0.4)
|
||||
rack (>= 1.0)
|
||||
yaml_db (0.3.0)
|
||||
rails (>= 3.0, < 4.3)
|
||||
rake (>= 0.8.7)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@ -123,24 +156,18 @@ PLATFORMS
|
||||
DEPENDENCIES
|
||||
acts_as_list
|
||||
acts_as_tree
|
||||
cancan
|
||||
carrierwave
|
||||
devise
|
||||
formtastic
|
||||
haml (>= 3.0.0)
|
||||
jquery-rails
|
||||
kaminari
|
||||
meta_search
|
||||
meta_where
|
||||
mimetype-fu
|
||||
mysql2 (< 0.3)
|
||||
rails (= 3.0.20)
|
||||
mysql2 (= 0.4.10)
|
||||
rails (= 4.2.10)
|
||||
rmagick
|
||||
sass
|
||||
sass-rails (= 4.0.5)
|
||||
simple-navigation
|
||||
sqlite3
|
||||
unicorn
|
||||
yaml_db
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.1
|
||||
1.17.3
|
||||
|
@ -3,7 +3,7 @@ class Admin::AdminsController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
layout "admin"
|
||||
|
||||
navigation :admins
|
||||
##navigation :admins
|
||||
|
||||
|
||||
def index
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::AlbumsController < ApplicationController
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
|
||||
def index
|
||||
@albums = Album.all(:order => :name)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::BlocksController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
|
||||
layout "admin"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::DashboardController < ApplicationController
|
||||
navigation :dahsboard
|
||||
#navigation :dahsboard
|
||||
before_filter :authenticate_admin!
|
||||
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::DataFilesController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
# load_and_authorize_resource
|
||||
# #load_and_authorize_resource
|
||||
|
||||
layout "admin"
|
||||
navigation :data_files
|
||||
#navigation :data_files
|
||||
def index
|
||||
params[:file_folder_id] = params[:file_folder_id] || 1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::FileFoldersController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
|
||||
|
||||
def index
|
||||
|
@ -1,11 +1,11 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::FoldersController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
|
||||
layout "admin"
|
||||
|
||||
navigation :folders
|
||||
#navigation :folders
|
||||
|
||||
|
||||
def index
|
||||
@ -13,12 +13,12 @@ class Admin::FoldersController < ApplicationController
|
||||
end
|
||||
|
||||
def new
|
||||
current_navigation :new_folders
|
||||
#current_navigation :new_folders
|
||||
@folder = Folder.new
|
||||
end
|
||||
|
||||
def create
|
||||
current_navigation :new_folders
|
||||
#current_navigation :new_folders
|
||||
|
||||
@folder = Folder.new(params[:folder])
|
||||
|
||||
@ -43,14 +43,14 @@ class Admin::FoldersController < ApplicationController
|
||||
|
||||
|
||||
def edit
|
||||
current_navigation :edit_folders
|
||||
#current_navigation :edit_folders
|
||||
|
||||
@folder = Folder.find(params[:id])
|
||||
|
||||
end
|
||||
|
||||
def update
|
||||
current_navigation :edit_folders
|
||||
#current_navigation :edit_folders
|
||||
|
||||
@folder = Folder.find(params[:id])
|
||||
|
||||
|
@ -5,7 +5,7 @@ class Admin::FoyersController < ApplicationController
|
||||
|
||||
|
||||
layout "admin"
|
||||
navigation :foyers
|
||||
#navigation :foyers
|
||||
|
||||
|
||||
def index
|
||||
|
@ -2,7 +2,7 @@
|
||||
class Admin::ImageFilesController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
layout "admin"
|
||||
navigation :image_files
|
||||
#navigation :image_files
|
||||
|
||||
def index
|
||||
params[:album_id] = params[:album_id] || 1
|
||||
|
@ -2,7 +2,7 @@
|
||||
class Admin::MenuAliasesController < ApplicationController
|
||||
|
||||
before_filter :authenticate_admin!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
|
||||
|
||||
def edit
|
||||
|
@ -1,10 +1,10 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::MenuItemsController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
#load_and_authorize_resource
|
||||
##load_and_authorize_resource
|
||||
|
||||
layout "admin"
|
||||
navigation :menu_items
|
||||
#navigation :menu_items
|
||||
|
||||
|
||||
def index
|
||||
@ -38,7 +38,7 @@ class Admin::MenuItemsController < ApplicationController
|
||||
end
|
||||
|
||||
def new
|
||||
current_navigation :new_menu_items
|
||||
#current_navigation :new_menu_items
|
||||
|
||||
|
||||
@menu_item = MenuItem.new(:menu_id => params[:menu_id],:parent_id => params[:parent_id])
|
||||
@ -55,7 +55,7 @@ class Admin::MenuItemsController < ApplicationController
|
||||
|
||||
def create
|
||||
|
||||
current_navigation :new_menu_items
|
||||
#current_navigation :new_menu_items
|
||||
params_content = params[:menu_item].delete(:menu_content_attributes)
|
||||
content_type = params[:menu_item][:menu_content_type]
|
||||
|
||||
@ -87,13 +87,13 @@ class Admin::MenuItemsController < ApplicationController
|
||||
end
|
||||
|
||||
def edit
|
||||
current_navigation :edit_menu_items
|
||||
#current_navigation :edit_menu_items
|
||||
@menu_item= MenuItem.find(params[:id])
|
||||
|
||||
end
|
||||
|
||||
def update
|
||||
current_navigation :edit_menu_items
|
||||
#current_navigation :edit_menu_items
|
||||
@menu_item= MenuItem.find(params[:id])
|
||||
|
||||
@menu = @menu_item.menu
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::MenuUrlsController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
|
||||
def edit
|
||||
|
||||
|
@ -4,7 +4,7 @@ class Admin::MenusController < ApplicationController
|
||||
layout "admin"
|
||||
|
||||
before_filter :authenticate_admin!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
|
||||
|
||||
def index
|
||||
|
@ -5,7 +5,7 @@ class Admin::NewslettersController < ApplicationController
|
||||
|
||||
|
||||
layout "admin"
|
||||
navigation :newsletters
|
||||
#navigation :newsletters
|
||||
|
||||
|
||||
def index
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admin::PagesController < ApplicationController
|
||||
before_filter :authenticate_admin!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
|
||||
|
||||
def edit
|
||||
|
@ -5,7 +5,7 @@ class Admin::StudientsController < ApplicationController
|
||||
|
||||
|
||||
layout "admin"
|
||||
navigation :studients
|
||||
#navigation :studients
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admins::PasswordsController < ::Devise::PasswordsController
|
||||
class Admins::PasswordsController < ApplicationController
|
||||
layout "connexion"
|
||||
|
||||
def create
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Admins::SessionsController < ::Devise::SessionsController
|
||||
class Admins::SessionsController < ApplicationController
|
||||
layout "connexion"
|
||||
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class Ability
|
||||
include CanCan::Ability
|
||||
#include CanCan::Ability
|
||||
|
||||
def initialize(admin)
|
||||
admin ||= Admin.new # guest user
|
||||
|
@ -2,11 +2,11 @@
|
||||
class Admin < ActiveRecord::Base
|
||||
|
||||
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable
|
||||
#devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable
|
||||
|
||||
attr_accessor :login
|
||||
|
||||
attr_accessible :login, :username, :surname, :firstname, :email, :password, :password_confirmation, :roles_mask, :roles, :super_admin
|
||||
#attr_accessible :login, :username, :surname, :firstname, :email, :password, :password_confirmation, :roles_mask, :roles, :super_admin
|
||||
|
||||
|
||||
validates :username, :presence => true, :uniqueness => true
|
||||
|
@ -4,7 +4,7 @@ class Block < ActiveRecord::Base
|
||||
|
||||
belongs_to :blockable, :polymorphic => true
|
||||
|
||||
has_many :portlets, :order => :position, :dependent => :destroy
|
||||
has_many :portlets,-> {order("position")}, :dependent => :destroy
|
||||
accepts_nested_attributes_for :portlets
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class GalleryContent < ActiveRecord::Base
|
||||
has_many :gallery_images, :order => :position
|
||||
has_many :gallery_images, -> {order("position")}
|
||||
|
||||
has_one :portlet, :as => :content, :dependent => :destroy
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class TableContent < ActiveRecord::Base
|
||||
has_one :portlet, :as => :content, :dependent => :destroy
|
||||
has_many :table_rows, :include => :cel_tables, :order => :position
|
||||
has_many :table_rows, -> {order("position")}
|
||||
has_many :cel_tables, :through => :table_rows
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
class TableRow < ActiveRecord::Base
|
||||
has_many :cel_tables, :order => :position
|
||||
has_many :cel_tables, -> {order("position")}
|
||||
belongs_to :table_content
|
||||
|
||||
attr_accessor :skip_before_update
|
||||
|
@ -35,7 +35,7 @@
|
||||
=link_to image_tag( "/front/logo.png", :alt => "accescible spécialiste contrôle d'accès, interphones, haute savoie, suisse, genève, annemasse"), "/", :id => "logo", :title => "accescible spécialiste contrôle d'accès, interphones, haute savoie, suisse, genève, annemasse"
|
||||
.menu_first_level
|
||||
|
||||
-MenuItem.find(:all, :conditions => {:parent_id =>nil, :enabled => true}, :order => :position, :limit => 7).each do |mi|
|
||||
-MenuItem.where(:parent_id =>nil, :enabled => true).order("position").limit(7).each do |mi|
|
||||
-if mi.slug != "accueil"
|
||||
=menu_item_link mi
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
|
||||
#diapo{:style => "height:245px"}
|
||||
-menu_item = MenuItem.find_by_slug('nos-installations') || MenuItem.first
|
||||
-ImageFile.all(:conditions => {:home => true}).each do |sample|
|
||||
-ImageFile.where(:home => true).each do |sample|
|
||||
|
||||
|
||||
.item
|
||||
@ -97,7 +97,7 @@
|
||||
|
||||
|
||||
.menu_first_level
|
||||
-MenuItem.find(:all, :conditions => {:parent_id =>nil, :enabled => true}, :order => :position,:limit => 6, :offset => 7).each do |mi|
|
||||
-MenuItem.where(:parent_id =>nil, :enabled => true).order("position").limit(6).offset(7).each do |mi|
|
||||
=menu_item_link mi
|
||||
%a{:href => "#back_to_top"} Retour en haut de page
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
# SQLite version 3.x
|
||||
# gem install sqlite3
|
||||
development:
|
||||
adapter: sqlite3
|
||||
database: ../sqlite3_databases/development.sqlite3
|
||||
adapter: mysql2
|
||||
encoding: utf8
|
||||
database: accescible_app
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
username: root
|
||||
socket: /tmp/mysql.sock
|
||||
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
APP_RUBY=1.9.3-p0
|
||||
APP_RUBY=2.6.0
|
||||
ENV=production
|
||||
APP_ROOT=/srv/www/web/accescible_app/current/
|
||||
GEM_HOME=/srv/www/web/.rvm/gems/ruby-$APP_RUBY
|
||||
|
@ -5,14 +5,18 @@ PharmacieboissierCom::Application.configure do
|
||||
# In the development environment your application's code is reloaded on
|
||||
# every request. This slows down response time but is perfect for development
|
||||
# since you don't have to restart the web server when you make code changes.
|
||||
config.cache_classes = false
|
||||
|
||||
|
||||
config.eager_load = true
|
||||
|
||||
|
||||
config.cache_classes = true
|
||||
# Log error messages when you accidentally call methods on nil.
|
||||
config.whiny_nils = true
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_view.debug_rjs = true
|
||||
#config.action_view.debug_rjs = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Don't care if the mailer can't send
|
||||
|
@ -3,6 +3,9 @@ PharmacieboissierCom::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# Code is not reloaded between requests
|
||||
config.eager_load = true
|
||||
|
||||
|
||||
config.cache_classes = true
|
||||
|
||||
# Full error reports are disabled and caching is turned on
|
||||
|
@ -1,144 +1,146 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
||||
# four configuration values can also be set straight in your models.
|
||||
Devise.setup do |config|
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in DeviseMailer.
|
||||
config.mailer_sender = "n.bally@quartz-agence.com"
|
||||
if false
|
||||
# -*- encoding : utf-8 -*-
|
||||
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
||||
# four configuration values can also be set straight in your models.
|
||||
Devise.setup do |config|
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in DeviseMailer.
|
||||
config.mailer_sender = "n.bally@quartz-agence.com"
|
||||
|
||||
# Configure the class responsible to send e-mails.
|
||||
# config.mailer = "Devise::Mailer"
|
||||
# Configure the class responsible to send e-mails.
|
||||
# config.mailer = "Devise::Mailer"
|
||||
|
||||
# ==> ORM configuration
|
||||
# Load and configure the ORM. Supports :active_record (default) and
|
||||
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
||||
# available as additional gems.
|
||||
require 'devise/orm/active_record'
|
||||
# ==> ORM configuration
|
||||
# Load and configure the ORM. Supports :active_record (default) and
|
||||
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
||||
# available as additional gems.
|
||||
require 'devise/orm/active_record'
|
||||
|
||||
# ==> Configuration for any authentication mechanism
|
||||
# Configure which keys are used when authenticating an user. By default is
|
||||
# just :email. You can configure it to use [:username, :subdomain], so for
|
||||
# authenticating an user, both parameters are required. Remember that those
|
||||
# parameters are used only when authenticating and not when retrieving from
|
||||
# session. If you need permissions, you should implement that in a before filter.
|
||||
# config.authentication_keys = [ :email ]
|
||||
# ==> Configuration for any authentication mechanism
|
||||
# Configure which keys are used when authenticating an user. By default is
|
||||
# just :email. You can configure it to use [:username, :subdomain], so for
|
||||
# authenticating an user, both parameters are required. Remember that those
|
||||
# parameters are used only when authenticating and not when retrieving from
|
||||
# session. If you need permissions, you should implement that in a before filter.
|
||||
# config.authentication_keys = [ :email ]
|
||||
|
||||
# Tell if authentication through request.params is enabled. True by default.
|
||||
# config.params_authenticatable = true
|
||||
# Tell if authentication through request.params is enabled. True by default.
|
||||
# config.params_authenticatable = true
|
||||
|
||||
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
||||
# config.http_authenticatable = false
|
||||
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
||||
# config.http_authenticatable = false
|
||||
|
||||
# Set this to true to use Basic Auth for AJAX requests. True by default.
|
||||
# config.http_authenticatable_on_xhr = true
|
||||
# Set this to true to use Basic Auth for AJAX requests. True by default.
|
||||
# config.http_authenticatable_on_xhr = true
|
||||
|
||||
# The realm used in Http Basic Authentication
|
||||
# config.http_authentication_realm = "Application"
|
||||
# The realm used in Http Basic Authentication
|
||||
# config.http_authentication_realm = "Application"
|
||||
|
||||
# ==> Configuration for :database_authenticatable
|
||||
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
||||
# using other encryptors, it sets how many times you want the password re-encrypted.
|
||||
config.stretches = 10
|
||||
# ==> Configuration for :database_authenticatable
|
||||
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
||||
# using other encryptors, it sets how many times you want the password re-encrypted.
|
||||
config.stretches = 10
|
||||
|
||||
# Define which will be the encryption algorithm. Devise also supports encryptors
|
||||
# from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
|
||||
# you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
|
||||
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
|
||||
config.encryptor = :bcrypt
|
||||
# Define which will be the encryption algorithm. Devise also supports encryptors
|
||||
# from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
|
||||
# you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
|
||||
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
|
||||
config.encryptor = :bcrypt
|
||||
|
||||
# Setup a pepper to generate the encrypted password.
|
||||
config.pepper = "04dcd46f0ea82d5d5238e37dd08d75529296d044c20e3311df2f09407337c859e340ef7d69fcf5f4d90625c66d7b0eb0e471efa36d9d43f1fe63f6b268a8021a"
|
||||
# Setup a pepper to generate the encrypted password.
|
||||
config.pepper = "04dcd46f0ea82d5d5238e37dd08d75529296d044c20e3311df2f09407337c859e340ef7d69fcf5f4d90625c66d7b0eb0e471efa36d9d43f1fe63f6b268a8021a"
|
||||
|
||||
# ==> Configuration for :confirmable
|
||||
# The time you want to give your user to confirm his account. During this time
|
||||
# he will be able to access your application without confirming. Default is nil.
|
||||
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
||||
# You can use this to let your user access some features of your application
|
||||
# without confirming the account, but blocking it after a certain period
|
||||
# (ie 2 days).
|
||||
# config.confirm_within = 2.days
|
||||
# ==> Configuration for :confirmable
|
||||
# The time you want to give your user to confirm his account. During this time
|
||||
# he will be able to access your application without confirming. Default is nil.
|
||||
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
||||
# You can use this to let your user access some features of your application
|
||||
# without confirming the account, but blocking it after a certain period
|
||||
# (ie 2 days).
|
||||
# config.confirm_within = 2.days
|
||||
|
||||
# ==> Configuration for :rememberable
|
||||
# The time the user will be remembered without asking for credentials again.
|
||||
# config.remember_for = 2.weeks
|
||||
# ==> Configuration for :rememberable
|
||||
# The time the user will be remembered without asking for credentials again.
|
||||
# config.remember_for = 2.weeks
|
||||
|
||||
# If true, a valid remember token can be re-used between multiple browsers.
|
||||
# config.remember_across_browsers = true
|
||||
# If true, a valid remember token can be re-used between multiple browsers.
|
||||
# config.remember_across_browsers = true
|
||||
|
||||
# If true, extends the user's remember period when remembered via cookie.
|
||||
# config.extend_remember_period = false
|
||||
# If true, extends the user's remember period when remembered via cookie.
|
||||
# config.extend_remember_period = false
|
||||
|
||||
# ==> Configuration for :validatable
|
||||
# Range for password length
|
||||
# config.password_length = 6..20
|
||||
# ==> Configuration for :validatable
|
||||
# Range for password length
|
||||
# config.password_length = 6..20
|
||||
|
||||
# Regex to use to validate the email address
|
||||
# config.email_regexp = /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
|
||||
# Regex to use to validate the email address
|
||||
# config.email_regexp = /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
|
||||
|
||||
# ==> Configuration for :timeoutable
|
||||
# The time you want to timeout the user session without activity. After this
|
||||
# time the user will be asked for credentials again.
|
||||
# config.timeout_in = 10.minutes
|
||||
# ==> Configuration for :timeoutable
|
||||
# The time you want to timeout the user session without activity. After this
|
||||
# time the user will be asked for credentials again.
|
||||
# config.timeout_in = 10.minutes
|
||||
|
||||
# ==> Configuration for :lockable
|
||||
# Defines which strategy will be used to lock an account.
|
||||
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
||||
# :none = No lock strategy. You should handle locking by yourself.
|
||||
# config.lock_strategy = :failed_attempts
|
||||
# ==> Configuration for :lockable
|
||||
# Defines which strategy will be used to lock an account.
|
||||
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
||||
# :none = No lock strategy. You should handle locking by yourself.
|
||||
# config.lock_strategy = :failed_attempts
|
||||
|
||||
# Defines which strategy will be used to unlock an account.
|
||||
# :email = Sends an unlock link to the user email
|
||||
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
||||
# :both = Enables both strategies
|
||||
# :none = No unlock strategy. You should handle unlocking by yourself.
|
||||
# config.unlock_strategy = :both
|
||||
# Defines which strategy will be used to unlock an account.
|
||||
# :email = Sends an unlock link to the user email
|
||||
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
||||
# :both = Enables both strategies
|
||||
# :none = No unlock strategy. You should handle unlocking by yourself.
|
||||
# config.unlock_strategy = :both
|
||||
|
||||
# Number of authentication tries before locking an account if lock_strategy
|
||||
# is failed attempts.
|
||||
# config.maximum_attempts = 20
|
||||
# Number of authentication tries before locking an account if lock_strategy
|
||||
# is failed attempts.
|
||||
# config.maximum_attempts = 20
|
||||
|
||||
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
||||
# config.unlock_in = 1.hour
|
||||
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
||||
# config.unlock_in = 1.hour
|
||||
|
||||
# ==> Configuration for :token_authenticatable
|
||||
# Defines name of the authentication token params key
|
||||
# config.token_authentication_key = :auth_token
|
||||
# ==> Configuration for :token_authenticatable
|
||||
# Defines name of the authentication token params key
|
||||
# config.token_authentication_key = :auth_token
|
||||
|
||||
# ==> Scopes configuration
|
||||
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
||||
# "users/sessions/new". It's turned off by default because it's slower if you
|
||||
# are using only default views.
|
||||
config.scoped_views = true
|
||||
# ==> Scopes configuration
|
||||
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
||||
# "users/sessions/new". It's turned off by default because it's slower if you
|
||||
# are using only default views.
|
||||
config.scoped_views = true
|
||||
|
||||
# Configure the default scope given to Warden. By default it's the first
|
||||
# devise role declared in your routes.
|
||||
# config.default_scope = :user
|
||||
# Configure the default scope given to Warden. By default it's the first
|
||||
# devise role declared in your routes.
|
||||
# config.default_scope = :user
|
||||
|
||||
# Configure sign_out behavior.
|
||||
# By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
|
||||
# In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
|
||||
# config.sign_out_all_scopes = false
|
||||
# Configure sign_out behavior.
|
||||
# By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
|
||||
# In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
|
||||
# config.sign_out_all_scopes = false
|
||||
|
||||
# ==> Navigation configuration
|
||||
# Lists the formats that should be treated as navigational. Formats like
|
||||
# :html, should redirect to the sign in page when the user does not have
|
||||
# access, but formats like :xml or :json, should return 401.
|
||||
# If you have any extra navigational formats, like :iphone or :mobile, you
|
||||
# should add them to the navigational formats lists. Default is [:html]
|
||||
# config.navigational_formats = [:html, :iphone]
|
||||
# ==> Navigation configuration
|
||||
# Lists the formats that should be treated as navigational. Formats like
|
||||
# :html, should redirect to the sign in page when the user does not have
|
||||
# access, but formats like :xml or :json, should return 401.
|
||||
# If you have any extra navigational formats, like :iphone or :mobile, you
|
||||
# should add them to the navigational formats lists. Default is [:html]
|
||||
# config.navigational_formats = [:html, :iphone]
|
||||
|
||||
# ==> Warden configuration
|
||||
# If you want to use other strategies, that are not (yet) supported by Devise,
|
||||
# you can configure them inside the config.warden block. The example below
|
||||
# allows you to setup OAuth, using http://github.com/roman/warden_oauth
|
||||
#
|
||||
# config.warden do |manager|
|
||||
# manager.oauth(:twitter) do |twitter|
|
||||
# twitter.consumer_secret = <YOUR CONSUMER SECRET>
|
||||
# twitter.consumer_key = <YOUR CONSUMER KEY>
|
||||
# twitter.options :site => 'http://twitter.com'
|
||||
# end
|
||||
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
|
||||
# end
|
||||
config.authentication_keys = [ :login ]
|
||||
# ==> Warden configuration
|
||||
# If you want to use other strategies, that are not (yet) supported by Devise,
|
||||
# you can configure them inside the config.warden block. The example below
|
||||
# allows you to setup OAuth, using http://github.com/roman/warden_oauth
|
||||
#
|
||||
# config.warden do |manager|
|
||||
# manager.oauth(:twitter) do |twitter|
|
||||
# twitter.consumer_secret = <YOUR CONSUMER SECRET>
|
||||
# twitter.consumer_key = <YOUR CONSUMER KEY>
|
||||
# twitter.options :site => 'http://twitter.com'
|
||||
# end
|
||||
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
|
||||
# end
|
||||
config.authentication_keys = [ :login ]
|
||||
end
|
||||
end
|
@ -1,3 +1,3 @@
|
||||
Sass::Plugin.options[:template_location] = {
|
||||
"#{RAILS_ROOT}/app/assets/stylesheets" => "#{RAILS_ROOT}/public/assets/stylesheets"
|
||||
}
|
||||
#Sass::Plugin.options[:template_location] = {
|
||||
# "#{RAILS_ROOT}/app/assets/stylesheets" => "#{RAILS_ROOT}/public/assets/stylesheets"
|
||||
#}
|
@ -1,2 +1,2 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
require 'simple_navigation/rails_controller_methods'
|
||||
#require 'simple_navigation/rails_controller_methods'
|
||||
|
@ -32,7 +32,7 @@ PharmacieboissierCom::Application.routes.draw do
|
||||
|
||||
|
||||
|
||||
devise_for :admins, :controllers => {:sessions => "admins/sessions", :passwords => "admins/passwords"}
|
||||
#devise_for :admins, :controllers => {:sessions => "admins/sessions", :passwords => "admins/passwords"}
|
||||
|
||||
namespace :portlet do
|
||||
resources :break_contents
|
||||
@ -133,7 +133,7 @@ PharmacieboissierCom::Application.routes.draw do
|
||||
# resources :products
|
||||
# end
|
||||
|
||||
match 'pages/*url.:f' => 'public/menu_items#show', :as => :menu_item, :f => "html"
|
||||
get 'pages/*url.:f' => 'public/menu_items#show', :as => :menu_item, :f => "html"
|
||||
# You can have the root of your site routed with "root"
|
||||
# just remember to delete public/index.html.
|
||||
root :to => "public/menu_items#home"
|
||||
|
Loading…
x
Reference in New Issue
Block a user