disguise 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +43 -0
- data/Rakefile +93 -0
- data/VERSION +1 -0
- data/app/controllers/admin/disguise/themes_controller.rb +32 -0
- data/app/models/theme.rb +37 -0
- data/app/views/admin/themes/_theme.html.erb +7 -0
- data/app/views/admin/themes/edit.html.erb +10 -0
- data/app/views/admin/themes/no_themes.html.erb +4 -0
- data/config/disguise_routes.rb +6 -0
- data/db/migrate/20090530170040_create_themes.rb +11 -0
- data/disguise.gemspec +164 -0
- data/generators/theme/USAGE +13 -0
- data/generators/theme/templates/INSTALL +5 -0
- data/generators/theme/templates/description.txt +1 -0
- data/generators/theme/templates/locales/en.yml +2 -0
- data/generators/theme/templates/preview.gif +0 -0
- data/generators/theme/templates/stylesheets/styles.css +1 -0
- data/generators/theme/templates/views/_footer.html.erb +7 -0
- data/generators/theme/templates/views/_head.html.erb +9 -0
- data/generators/theme/templates/views/_header.html.erb +28 -0
- data/generators/theme/templates/views/application.html.erb +18 -0
- data/generators/theme/templates/views/home.html.erb +14 -0
- data/generators/theme/theme_generator.rb +43 -0
- data/lib/action_controller/disguise_application.rb +50 -0
- data/lib/disguise/initialize_routes.rb +8 -0
- data/lib/disguise/tasks.rb +34 -0
- data/lib/disguise.rb +8 -0
- data/locales/ar.yml +8 -0
- data/locales/bg.yml +8 -0
- data/locales/ca.yml +8 -0
- data/locales/cs.yml +8 -0
- data/locales/da.yml +8 -0
- data/locales/de.yml +8 -0
- data/locales/el.yml +8 -0
- data/locales/en.yml +7 -0
- data/locales/es.yml +8 -0
- data/locales/fr.yml +8 -0
- data/locales/it.yml +8 -0
- data/locales/iw.yml +8 -0
- data/locales/ja.yml +8 -0
- data/locales/ko.yml +8 -0
- data/locales/lt.yml +8 -0
- data/locales/lv.yml +8 -0
- data/locales/nl.yml +8 -0
- data/locales/no.yml +9 -0
- data/locales/pl.yml +8 -0
- data/locales/pt.yml +8 -0
- data/locales/ro.yml +8 -0
- data/locales/ru.yml +8 -0
- data/locales/sk.yml +8 -0
- data/locales/sl.yml +8 -0
- data/locales/sr.yml +8 -0
- data/locales/sv.yml +8 -0
- data/locales/tl.yml +8 -0
- data/locales/uk.yml +8 -0
- data/locales/vi.yml +8 -0
- data/locales/zh-CN.yml +8 -0
- data/locales/zh-TW.yml +8 -0
- data/locales/zh.yml +8 -0
- data/rails/init.rb +3 -0
- data/tasks/rails.rake +2 -0
- data/test/disguise_test.rb +7 -0
- data/test/test_helper.rb +18 -0
- metadata +120 -0
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Justin Ball
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
= disguise
|
2
|
+
|
3
|
+
A simple theme system for your Rails application.
|
4
|
+
|
5
|
+
== Installation
|
6
|
+
sudo gem install disguise
|
7
|
+
|
8
|
+
== Setup
|
9
|
+
Disguise comes with an admin controller to make changing your theme simple. By default it is not protected.
|
10
|
+
In order to prevent unauthorized users from changing your theme you can override the admin controller like this:
|
11
|
+
|
12
|
+
class Admin::ThemesController < Admin::Disguise::ThemesController
|
13
|
+
before_filter :login_required
|
14
|
+
layout('admin')
|
15
|
+
end
|
16
|
+
|
17
|
+
Also be sure to add a route to the new controller in routes.rb:
|
18
|
+
|
19
|
+
# admin
|
20
|
+
map.namespace :admin do |a|
|
21
|
+
a.resource :theme
|
22
|
+
end
|
23
|
+
|
24
|
+
=== Rake tasks
|
25
|
+
|
26
|
+
Add disguise rake tasks to your rails project. Include the following line at the end of your Rakefile:
|
27
|
+
|
28
|
+
require 'disguise/tasks'
|
29
|
+
|
30
|
+
Then run the following to add the required files and database migration:
|
31
|
+
rake disguise:setup
|
32
|
+
rake db:migrate
|
33
|
+
|
34
|
+
|
35
|
+
== Usage
|
36
|
+
Generate a new theme for your Rails application using the built in theme generator:
|
37
|
+
|
38
|
+
./script/generate theme theme_name
|
39
|
+
|
40
|
+
|
41
|
+
== Copyright
|
42
|
+
|
43
|
+
Copyright (c) 2009 Justin Ball. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/rdoctask'
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'jeweler'
|
7
|
+
Jeweler::Tasks.new do |gem|
|
8
|
+
gem.name = "disguise"
|
9
|
+
gem.summary = "Easy to use view theme system for Rails"
|
10
|
+
gem.email = "justinball@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/jbasdf/disguise"
|
12
|
+
gem.description = "Add themes to your Rails application to easily change the view layer and impress everyone you know"
|
13
|
+
gem.authors = ["Justin Ball"]
|
14
|
+
gem.rubyforge_project = "disguise"
|
15
|
+
gem.files.include %w( tasks/*
|
16
|
+
db/migrate/*.rb
|
17
|
+
generators/**/**/**/*
|
18
|
+
app/**/**/**/*
|
19
|
+
config/*
|
20
|
+
locales/*
|
21
|
+
rails/*
|
22
|
+
test/*
|
23
|
+
lib/**/* )
|
24
|
+
end
|
25
|
+
rescue LoadError
|
26
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
27
|
+
end
|
28
|
+
|
29
|
+
# rubyforge tasks
|
30
|
+
begin
|
31
|
+
require 'rake/contrib/sshpublisher'
|
32
|
+
namespace :rubyforge do
|
33
|
+
|
34
|
+
desc "Release gem and RDoc documentation to RubyForge"
|
35
|
+
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
|
36
|
+
|
37
|
+
namespace :release do
|
38
|
+
desc "Publish RDoc to RubyForge."
|
39
|
+
task :docs => [:rdoc] do
|
40
|
+
config = YAML.load(
|
41
|
+
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
|
42
|
+
)
|
43
|
+
|
44
|
+
host = "#{config['username']}@rubyforge.org"
|
45
|
+
remote_dir = "/var/www/gforge-projects/disguise/"
|
46
|
+
local_dir = 'rdoc'
|
47
|
+
|
48
|
+
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
rescue LoadError
|
53
|
+
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
54
|
+
end
|
55
|
+
|
56
|
+
require 'rake/testtask'
|
57
|
+
Rake::TestTask.new(:test) do |test|
|
58
|
+
test.libs << 'lib' << 'test'
|
59
|
+
test.pattern = 'test/**/*_test.rb'
|
60
|
+
test.verbose = true
|
61
|
+
end
|
62
|
+
|
63
|
+
begin
|
64
|
+
require 'rcov/rcovtask'
|
65
|
+
Rcov::RcovTask.new do |test|
|
66
|
+
test.libs << 'test'
|
67
|
+
test.pattern = 'test/**/*_test.rb'
|
68
|
+
test.verbose = true
|
69
|
+
end
|
70
|
+
rescue LoadError
|
71
|
+
task :rcov do
|
72
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
task :default => :test
|
78
|
+
|
79
|
+
require 'rake/rdoctask'
|
80
|
+
Rake::RDocTask.new do |rdoc|
|
81
|
+
if File.exist?('VERSION.yml')
|
82
|
+
config = YAML.load(File.read('VERSION.yml'))
|
83
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
84
|
+
else
|
85
|
+
version = ""
|
86
|
+
end
|
87
|
+
|
88
|
+
rdoc.rdoc_dir = 'rdoc'
|
89
|
+
rdoc.title = "disguise #{version}"
|
90
|
+
rdoc.rdoc_files.include('README*')
|
91
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
92
|
+
end
|
93
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class Admin::Disguise::ThemesController < ApplicationController
|
2
|
+
unloadable
|
3
|
+
|
4
|
+
before_filter :get_theme
|
5
|
+
|
6
|
+
def edit
|
7
|
+
@current_theme, @themes = Theme.available_themes(@theme)
|
8
|
+
if @themes.empty?
|
9
|
+
respond_to do |format|
|
10
|
+
format.html { render :template => 'admin/themes/no_themes' }
|
11
|
+
end
|
12
|
+
else
|
13
|
+
respond_to do |format|
|
14
|
+
format.html { render :template => 'admin/themes/edit' }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def update
|
20
|
+
@theme.update_attributes!(params[:theme])
|
21
|
+
respond_to do |format|
|
22
|
+
flash[:notice] = t('disguise.theme_updated')
|
23
|
+
format.html { redirect_to edit_admin_theme_path }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def get_theme
|
29
|
+
@theme = Theme.first || Theme.create
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/app/models/theme.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
class Theme < ActiveRecord::Base
|
2
|
+
|
3
|
+
def locales
|
4
|
+
Dir[ File.join(RAILS_ROOT, 'themes', self.current, 'locales', '*.{rb,yml}') ]
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.available_themes(theme)
|
8
|
+
themes = []
|
9
|
+
current_theme = {:name => 'default', :preview_image => '/images/no_preview.gif', :description => 'default theme'}
|
10
|
+
theme_path = File.join(RAILS_ROOT, Disguise::THEME_PATH)
|
11
|
+
|
12
|
+
Dir.glob("#{theme_path}/*").each do |theme_directory|
|
13
|
+
if File.directory?(theme_directory)
|
14
|
+
theme_name = File.basename(theme_directory)
|
15
|
+
|
16
|
+
image = Dir.glob(File.join(RAILS_ROOT, 'public', 'images', theme_name, 'preview.*')).first || File.join('/', 'images', 'no_preview.gif')
|
17
|
+
image = image.gsub(File.join(RAILS_ROOT, 'public'), '')
|
18
|
+
|
19
|
+
description = ''
|
20
|
+
description_file = File.join(theme_directory, 'description.txt')
|
21
|
+
if File.exist?(description_file)
|
22
|
+
f = File.new(description_file, "r")
|
23
|
+
description = f.read
|
24
|
+
f.close
|
25
|
+
end
|
26
|
+
|
27
|
+
theme = {:name => theme_name, :preview_image => image, :description => description}
|
28
|
+
themes << theme
|
29
|
+
|
30
|
+
current_theme = theme if theme.current == theme_name
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
[current_theme, themes]
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<h1><%= t('disguise.set_theme') %></h1>
|
2
|
+
|
3
|
+
<h2><%= t('disguise.current_theme') %></h2>
|
4
|
+
<div id="current-theme">
|
5
|
+
<%= render :partial => 'admin/themes/theme', :object => @current_theme %>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<h2><%= t('disguise.activate_theme_message') %></h2>
|
9
|
+
<%= error_messages_for :theme %>
|
10
|
+
<%= render :partial => 'admin/themes/theme', :collection => @themes %>
|
data/disguise.gemspec
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{disguise}
|
5
|
+
s.version = "0.1.1"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Justin Ball"]
|
9
|
+
s.date = %q{2009-05-30}
|
10
|
+
s.description = %q{Add themes to your Rails application to easily change the view layer and impress everyone you know}
|
11
|
+
s.email = %q{justinball@gmail.com}
|
12
|
+
s.extra_rdoc_files = [
|
13
|
+
"LICENSE",
|
14
|
+
"README.rdoc"
|
15
|
+
]
|
16
|
+
s.files = [
|
17
|
+
".document",
|
18
|
+
".gitignore",
|
19
|
+
"LICENSE",
|
20
|
+
"README.rdoc",
|
21
|
+
"Rakefile",
|
22
|
+
"VERSION",
|
23
|
+
"app/controllers/admin/disguise/themes_controller.rb",
|
24
|
+
"app/controllers/admin/disguise/themes_controller.rb",
|
25
|
+
"app/models/theme.rb",
|
26
|
+
"app/models/theme.rb",
|
27
|
+
"app/views/admin/themes/_theme.html.erb",
|
28
|
+
"app/views/admin/themes/_theme.html.erb",
|
29
|
+
"app/views/admin/themes/edit.html.erb",
|
30
|
+
"app/views/admin/themes/edit.html.erb",
|
31
|
+
"app/views/admin/themes/no_themes.html.erb",
|
32
|
+
"app/views/admin/themes/no_themes.html.erb",
|
33
|
+
"config/disguise_routes.rb",
|
34
|
+
"config/disguise_routes.rb",
|
35
|
+
"db/migrate/20090530170040_create_themes.rb",
|
36
|
+
"db/migrate/20090530170040_create_themes.rb",
|
37
|
+
"disguise.gemspec",
|
38
|
+
"generators/theme/USAGE",
|
39
|
+
"generators/theme/USAGE",
|
40
|
+
"generators/theme/templates/INSTALL",
|
41
|
+
"generators/theme/templates/INSTALL",
|
42
|
+
"generators/theme/templates/description.txt",
|
43
|
+
"generators/theme/templates/description.txt",
|
44
|
+
"generators/theme/templates/locales/en.yml",
|
45
|
+
"generators/theme/templates/locales/en.yml",
|
46
|
+
"generators/theme/templates/preview.gif",
|
47
|
+
"generators/theme/templates/preview.gif",
|
48
|
+
"generators/theme/templates/stylesheets/styles.css",
|
49
|
+
"generators/theme/templates/stylesheets/styles.css",
|
50
|
+
"generators/theme/templates/views/_footer.html.erb",
|
51
|
+
"generators/theme/templates/views/_footer.html.erb",
|
52
|
+
"generators/theme/templates/views/_head.html.erb",
|
53
|
+
"generators/theme/templates/views/_head.html.erb",
|
54
|
+
"generators/theme/templates/views/_header.html.erb",
|
55
|
+
"generators/theme/templates/views/_header.html.erb",
|
56
|
+
"generators/theme/templates/views/application.html.erb",
|
57
|
+
"generators/theme/templates/views/application.html.erb",
|
58
|
+
"generators/theme/templates/views/home.html.erb",
|
59
|
+
"generators/theme/templates/views/home.html.erb",
|
60
|
+
"generators/theme/theme_generator.rb",
|
61
|
+
"generators/theme/theme_generator.rb",
|
62
|
+
"lib/action_controller/disguise_application.rb",
|
63
|
+
"lib/action_controller/disguise_application.rb",
|
64
|
+
"lib/disguise.rb",
|
65
|
+
"lib/disguise.rb",
|
66
|
+
"lib/disguise/initialize_routes.rb",
|
67
|
+
"lib/disguise/initialize_routes.rb",
|
68
|
+
"lib/disguise/tasks.rb",
|
69
|
+
"lib/disguise/tasks.rb",
|
70
|
+
"locales/ar.yml",
|
71
|
+
"locales/ar.yml",
|
72
|
+
"locales/bg.yml",
|
73
|
+
"locales/bg.yml",
|
74
|
+
"locales/ca.yml",
|
75
|
+
"locales/ca.yml",
|
76
|
+
"locales/cs.yml",
|
77
|
+
"locales/cs.yml",
|
78
|
+
"locales/da.yml",
|
79
|
+
"locales/da.yml",
|
80
|
+
"locales/de.yml",
|
81
|
+
"locales/de.yml",
|
82
|
+
"locales/el.yml",
|
83
|
+
"locales/el.yml",
|
84
|
+
"locales/en.yml",
|
85
|
+
"locales/en.yml",
|
86
|
+
"locales/es.yml",
|
87
|
+
"locales/es.yml",
|
88
|
+
"locales/fr.yml",
|
89
|
+
"locales/fr.yml",
|
90
|
+
"locales/it.yml",
|
91
|
+
"locales/it.yml",
|
92
|
+
"locales/iw.yml",
|
93
|
+
"locales/iw.yml",
|
94
|
+
"locales/ja.yml",
|
95
|
+
"locales/ja.yml",
|
96
|
+
"locales/ko.yml",
|
97
|
+
"locales/ko.yml",
|
98
|
+
"locales/lt.yml",
|
99
|
+
"locales/lt.yml",
|
100
|
+
"locales/lv.yml",
|
101
|
+
"locales/lv.yml",
|
102
|
+
"locales/nl.yml",
|
103
|
+
"locales/nl.yml",
|
104
|
+
"locales/no.yml",
|
105
|
+
"locales/no.yml",
|
106
|
+
"locales/pl.yml",
|
107
|
+
"locales/pl.yml",
|
108
|
+
"locales/pt.yml",
|
109
|
+
"locales/pt.yml",
|
110
|
+
"locales/ro.yml",
|
111
|
+
"locales/ro.yml",
|
112
|
+
"locales/ru.yml",
|
113
|
+
"locales/ru.yml",
|
114
|
+
"locales/sk.yml",
|
115
|
+
"locales/sk.yml",
|
116
|
+
"locales/sl.yml",
|
117
|
+
"locales/sl.yml",
|
118
|
+
"locales/sr.yml",
|
119
|
+
"locales/sr.yml",
|
120
|
+
"locales/sv.yml",
|
121
|
+
"locales/sv.yml",
|
122
|
+
"locales/tl.yml",
|
123
|
+
"locales/tl.yml",
|
124
|
+
"locales/uk.yml",
|
125
|
+
"locales/uk.yml",
|
126
|
+
"locales/vi.yml",
|
127
|
+
"locales/vi.yml",
|
128
|
+
"locales/zh-CN.yml",
|
129
|
+
"locales/zh-CN.yml",
|
130
|
+
"locales/zh-TW.yml",
|
131
|
+
"locales/zh-TW.yml",
|
132
|
+
"locales/zh.yml",
|
133
|
+
"locales/zh.yml",
|
134
|
+
"rails/init.rb",
|
135
|
+
"rails/init.rb",
|
136
|
+
"tasks/rails.rake",
|
137
|
+
"tasks/rails.rake",
|
138
|
+
"test/disguise_test.rb",
|
139
|
+
"test/disguise_test.rb",
|
140
|
+
"test/test_helper.rb",
|
141
|
+
"test/test_helper.rb"
|
142
|
+
]
|
143
|
+
s.has_rdoc = true
|
144
|
+
s.homepage = %q{http://github.com/jbasdf/disguise}
|
145
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
146
|
+
s.require_paths = ["lib"]
|
147
|
+
s.rubyforge_project = %q{disguise}
|
148
|
+
s.rubygems_version = %q{1.3.1}
|
149
|
+
s.summary = %q{Easy to use view theme system for Rails}
|
150
|
+
s.test_files = [
|
151
|
+
"test/disguise_test.rb",
|
152
|
+
"test/test_helper.rb"
|
153
|
+
]
|
154
|
+
|
155
|
+
if s.respond_to? :specification_version then
|
156
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
157
|
+
s.specification_version = 2
|
158
|
+
|
159
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
160
|
+
else
|
161
|
+
end
|
162
|
+
else
|
163
|
+
end
|
164
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
NAME
|
2
|
+
theme - Creates the folder structure for a new theme
|
3
|
+
|
4
|
+
SYNOPSIS
|
5
|
+
theme [theme_name]
|
6
|
+
|
7
|
+
DESCRIPTION
|
8
|
+
This generator creates the folder structure for a new theme and copies over the appropriate files.
|
9
|
+
|
10
|
+
EXAMPLE
|
11
|
+
./script/generate theme theme_name
|
12
|
+
|
13
|
+
This will generate the file structure for a theme named 'theme_name'.
|
@@ -0,0 +1,5 @@
|
|
1
|
+
To complete the theme you will need to modify the strings in the en.yml file that can be found in /themes/{theme_name}/locale/en.yml.
|
2
|
+
You can change most of the text in the site by changing that file.
|
3
|
+
We've created a directory in the images folder with your theme name. Place all theme specific images into that folder.
|
4
|
+
We also added a file called public/stylesheets/themes/{theme_name}.css where you can put theme specific css.
|
5
|
+
Add a description for your new theme to description.txt and a preview image named preview.gif. (You can also use a png or jpg).
|
@@ -0,0 +1 @@
|
|
1
|
+
Put information about your theme here
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
/*Add styles specific to your theme here*/
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<div id="footer">
|
2
|
+
<%= link_to _('Contact Us'), contact_path %>
|
3
|
+
<%= link_to _('News'), news_index_path %> |
|
4
|
+
<%= link_to _('Privacy Policy'), page_path('privacy-policy') %> |
|
5
|
+
<%= link_to _('Terms of Use'), page_path('terms') %> |
|
6
|
+
<%= link_to _('Code of Conduct'), page_path('code_of_conduct') %>
|
7
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
2
|
+
<meta name="description" content="Luvfoo - communities with purpose" />
|
3
|
+
<title><%= @title || _(GlobalConfig.application_name) -%></title>
|
4
|
+
<%= stylesheet_link_tag 'reset', 'ie', 'application', 'beast', 'standard', :cache=>true -%>
|
5
|
+
<%= javascript_include_tag 'jquery', 'jquery-ui', 'jrails', 'thickbox', 'jquery-plugins/jquery.jgrowl_minimized.js', 'application' -%>
|
6
|
+
<%= theme_stylesheet_link_tag %>
|
7
|
+
<%= javascript_tag %[const AUTH_TOKEN = #{form_authenticity_token.inspect};] if protect_against_forgery? -%>
|
8
|
+
<%= yield :head -%>
|
9
|
+
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<div id="top-navigation">
|
2
|
+
<form action="/search" style='margin:0px;padding:0px;'>
|
3
|
+
<ul class="top-nav">
|
4
|
+
<li class="first"><a href="http://<%= GlobalConfig.application_url %>/home"><%= _('Home') %></a></li>
|
5
|
+
<li><a href="<%= groups_path %>"><%= _('Groups') %></a></li>
|
6
|
+
<li><a href="<%= profiles_path %>"><%= _('People') %></a></li>
|
7
|
+
<li><a href="<%= news_index_path %>"><%= _('News') %></a></li>
|
8
|
+
<li><a href="http://courses.<%= GlobalConfig.application_base_url %>"><%= _('Courses') %></a></li>
|
9
|
+
<li><a href="/pages/support-us"><%= _('Donate') %></a></li>
|
10
|
+
</ul>
|
11
|
+
<div id="log-out" class="right">
|
12
|
+
<span id='search'>
|
13
|
+
<script type='text/javascript'>function searchClicked(){sb=document.getElementById('search_box');sb.style.color='black';if (sb.value == 'Search') sb.value='';}</script>
|
14
|
+
<input id='search_box' type='text' name='q' value='<%= _('Search') %>' onclick='searchClicked();'/>
|
15
|
+
<button style='height:22px;'><span style='line-height:13px;vertical-align:middle;'><%= _('Go') %></span></button>
|
16
|
+
</span>
|
17
|
+
<% if logged_in? -%>
|
18
|
+
<%= link_to _('My Dashboard'), user_path(current_user) %>
|
19
|
+
<%= link_to current_user.login, profile_path(current_user) %>
|
20
|
+
<%= link_to _('Logout'), logout_path %>
|
21
|
+
<% else -%>
|
22
|
+
<%= _("%{login_link} %{signup_link}") % {:login_link => link_to(_('Login'), login_path), :signup_link => link_to(_('Sign-up'), signup_path)} %>
|
23
|
+
<% end -%>
|
24
|
+
</div>
|
25
|
+
</form>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="clear"></div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<%= render :partial => 'layouts/global/head' %>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<div id="header">
|
8
|
+
<%= render :partial => 'layouts/global/header' %>
|
9
|
+
</div>
|
10
|
+
<div id="main">
|
11
|
+
<div id="content">
|
12
|
+
<%= display_standard_flashes %>
|
13
|
+
<%= yield %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<%= render :partial => 'layouts/global/footer' %>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<%= render :partial => 'layouts/global/head' %>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<div id="home">
|
8
|
+
<%= render :partial => 'layouts/global/header' %>
|
9
|
+
Your home page can be different than the rest of your site. Build out your custom home layout here.
|
10
|
+
<%= yield %>
|
11
|
+
<%= render :partial => 'layouts/global/footer' %>
|
12
|
+
</div>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
class ThemeGenerator < Rails::Generator::NamedBase
|
2
|
+
def manifest
|
3
|
+
record do |m|
|
4
|
+
|
5
|
+
# Theme directory
|
6
|
+
m.directory "themes/#{file_name}"
|
7
|
+
m.directory "themes/#{file_name}/content"
|
8
|
+
m.directory "themes/#{file_name}/content/pages"
|
9
|
+
m.directory "themes/#{file_name}/content/protected-pages"
|
10
|
+
m.directory "themes/#{file_name}/locale"
|
11
|
+
m.directory "themes/#{file_name}/views"
|
12
|
+
m.directory "themes/#{file_name}/views/layouts"
|
13
|
+
|
14
|
+
# basic theme files
|
15
|
+
m.file "views/_head.html.erb", "themes/#{file_name}/views/layouts/_head.html.erb"
|
16
|
+
m.file "views/_header.html.erb", "themes/#{file_name}/views/layouts/_header.html.erb"
|
17
|
+
m.file "views/_footer.html.erb", "themes/#{file_name}/views/layouts/_footer.html.erb"
|
18
|
+
m.file "views/application.html.erb", "themes/#{file_name}/views/layouts/application.html.erb"
|
19
|
+
m.file "views/home.html.erb", "themes/#{file_name}/views/layouts/home.html.erb"
|
20
|
+
|
21
|
+
# description
|
22
|
+
m.file "description.txt", "themes/#{file_name}/description.txt"
|
23
|
+
|
24
|
+
# images
|
25
|
+
m.directory "public/images/#{file_name}"
|
26
|
+
m.file "preview.gif", "public/images/#{file_name}/preview.gif"
|
27
|
+
|
28
|
+
#stylesheets
|
29
|
+
m.directory "public/stylesheets/themes"
|
30
|
+
m.directory "public/stylesheets/themes/#{file_name}"
|
31
|
+
m.file "stylesheets/styles.css", "public/stylesheets/themes/#{file_name}/styles.css"
|
32
|
+
|
33
|
+
# localization
|
34
|
+
m.file "locale/en.yml", "themes/#{file_name}/locale/en.yml"
|
35
|
+
|
36
|
+
m.readme "INSTALL"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module ActionController
|
2
|
+
module DisguiseApplication
|
3
|
+
|
4
|
+
# Module automatically mixed into the all controllers
|
5
|
+
def self.included(base)
|
6
|
+
base.class_eval do
|
7
|
+
include InstanceMethods
|
8
|
+
before_filter :setup_theme
|
9
|
+
end
|
10
|
+
base.send :helper_method, :current_theme
|
11
|
+
end
|
12
|
+
|
13
|
+
module InstanceMethods
|
14
|
+
|
15
|
+
def current_theme
|
16
|
+
@theme ||= Theme.first
|
17
|
+
end
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def setup_theme
|
22
|
+
return if current_theme.blank? || current_theme.current.blank?
|
23
|
+
theme_view_path = File.join(Disguise::THEME_FULL_BASE_PATH, current_theme.current, 'views')
|
24
|
+
if self.view_paths.first == theme_view_path
|
25
|
+
return
|
26
|
+
else
|
27
|
+
clean_theme_view_path
|
28
|
+
self.prepend_view_path(theme_view_path)
|
29
|
+
clean_theme_locale
|
30
|
+
set_theme_locale
|
31
|
+
I18n.reload!
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def clean_theme_view_path
|
36
|
+
self.view_paths.delete_if {|view_path| view_path.to_s.index(Disguise::THEME_PATH) == 0}
|
37
|
+
end
|
38
|
+
|
39
|
+
def clean_theme_locale
|
40
|
+
I18n.load_path.delete_if {|localization_path| localization_path.index(Disguise::THEME_FULL_BASE_PATH) == 0}
|
41
|
+
end
|
42
|
+
|
43
|
+
def set_theme_locale
|
44
|
+
I18n.load_path += current_theme.locales
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class ActionController::Routing::RouteSet
|
2
|
+
def load_routes_with_disguise!
|
3
|
+
disguise_routes = File.join(File.dirname(__FILE__), *%w[.. .. config disguise_routes.rb])
|
4
|
+
add_configuration_file(disguise_routes) unless configuration_files.include? disguise_routes
|
5
|
+
load_routes_without_disguise!
|
6
|
+
end
|
7
|
+
alias_method_chain :load_routes!, :disguise
|
8
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/tasklib'
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
module Disguise
|
6
|
+
class Tasks < ::Rake::TaskLib
|
7
|
+
def initialize
|
8
|
+
define
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
def define
|
13
|
+
namespace :disguise do
|
14
|
+
|
15
|
+
task :app_env do
|
16
|
+
Rake::Task[:environment].invoke if defined?(RAILS_ROOT)
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Setup disguise"
|
20
|
+
task :setup => :sync do
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Sync required files from disguise."
|
25
|
+
task :sync do
|
26
|
+
path = File.join(File.dirname(__FILE__), *%w[.. ..])
|
27
|
+
system "rsync -ruv #{path}/db ."
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
Disguise::Tasks.new
|
data/lib/disguise.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
ActionController::Base.send :include, ActionController::DisguiseApplication
|
2
|
+
|
3
|
+
I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'locales', '*.{rb,yml}') ]
|
4
|
+
|
5
|
+
module Disguise
|
6
|
+
THEME_PATH = 'themes'
|
7
|
+
THEME_FULL_BASE_PATH = File.join(RAILS_ROOT, THEME_PATH)
|
8
|
+
end
|
data/locales/ar.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
ar:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "انقر على موضوع لتفعيلها"
|
5
|
+
current_theme: "الموضوع الحالي"
|
6
|
+
no_themes_message: "أنت لم تكن قد أنشأت أي مواضيع طلبك. إذا كنت ترغب في إنشاء لجنة جديدة لمجرد موضوع لموضوع تشغيل المولدات واتبع التعليمات :"
|
7
|
+
set_theme: "حدد الموضوع"
|
8
|
+
theme_updated: "وكان موضوع تحديث بنجاح."
|
data/locales/bg.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
bg:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Щракнете върху някоя тема, за да го активирате"
|
5
|
+
current_theme: "Текущи Тема"
|
6
|
+
no_themes_message: "Все още не сте създали нито теми за вашата заявка. Ако искате да създадете нова тема просто стартирайте тема генератора и следвайте инструкциите:"
|
7
|
+
set_theme: "Задайте Тема"
|
8
|
+
theme_updated: "Тема бе успешно обновен."
|
data/locales/ca.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
ca:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Feu clic a un tema per activar"
|
5
|
+
current_theme: "Tema actual"
|
6
|
+
no_themes_message: "Vostè encara no ha creat cap temes per a la seva aplicació. Si voleu crear un nou tema simplement executeu el tema generador i seguiu les instruccions:"
|
7
|
+
set_theme: "Establir Tema"
|
8
|
+
theme_updated: "Tema s'ha actualitzat."
|
data/locales/cs.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
cs:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Klikněte na téma pro jeho aktivaci"
|
5
|
+
current_theme: "Aktuální téma"
|
6
|
+
no_themes_message: "Vy ještě nemáte vytvořen jakékoliv témata pro vaše aplikace. Pokud chcete vytvořit nové téma jednoduše spustit generátor téma a postupujte podle návodu:"
|
7
|
+
set_theme: "Nastavit Témata"
|
8
|
+
theme_updated: "Téma bylo úspěšně aktualizováno."
|
data/locales/da.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
da:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Klik på et tema for at aktivere den"
|
5
|
+
current_theme: "Nuværende tema"
|
6
|
+
no_themes_message: "Du har endnu ikke oprettet nogen temaer for din ansøgning. Hvis du vil oprette et nyt emne, skal du blot køre den tema-generator, og følg vejledningen:"
|
7
|
+
set_theme: "Indstil Theme"
|
8
|
+
theme_updated: "Tema var blevet opdateret."
|
data/locales/de.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
de:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Klicken Sie auf ein Thema, um es zu aktivieren"
|
5
|
+
current_theme: "Aktuelle Themen"
|
6
|
+
no_themes_message: "Sie haben noch nicht alle Themen, die für Ihre Anwendung. Wenn Sie möchten, erstellen Sie ein neues Thema starten Sie das Thema Generator und folgen Sie den Anweisungen:"
|
7
|
+
set_theme: "Set Thema"
|
8
|
+
theme_updated: "Thema wurde erfolgreich aktualisiert."
|
data/locales/el.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
el:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Κάντε κλικ σε ένα θέμα για να ενεργοποιήσετε"
|
5
|
+
current_theme: "Τρέχον Θέμα"
|
6
|
+
no_themes_message: "Εσείς δεν έχετε δημιουργήσει οποιαδήποτε θέματα για την εφαρμογή σας. Αν θέλετε να δημιουργήσετε ένα νέο θέμα απλά εκτελέστε το θέμα γεννήτριας και ακολουθήστε τις οδηγίες:"
|
7
|
+
set_theme: "Ορισμός Θέμα"
|
8
|
+
theme_updated: "Το θέμα είχε ενημερωθεί με επιτυχία."
|
data/locales/en.yml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
en:
|
2
|
+
disguise:
|
3
|
+
theme_updated: 'Theme was successfully updated.'
|
4
|
+
no_themes_message: 'You have not yet created any themes for your application. If you would like to create a new theme simply run the theme generator and follow the instructions:'
|
5
|
+
set_theme: Set Theme
|
6
|
+
current_theme: Current Theme
|
7
|
+
activate_theme_message: Click on a theme to activate it
|
data/locales/es.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
es:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Haga clic en un tema para activarlo"
|
5
|
+
current_theme: "Tema actual"
|
6
|
+
no_themes_message: "Usted aún no ha creado ninguna temas para su aplicación. Si desea crear un nuevo tema simplemente ejecute el tema generador y siga las instrucciones:"
|
7
|
+
set_theme: "Establecer Tema"
|
8
|
+
theme_updated: "Tema se ha actualizado."
|
data/locales/fr.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
fr:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Cliquez sur un thème pour l'activer"
|
5
|
+
current_theme: "Thème actuel"
|
6
|
+
no_themes_message: "Vous n'avez pas encore créé de thèmes pour votre application. Si vous souhaitez créer un nouveau thème, exécutez simplement le thème générateur et suivez les instructions:"
|
7
|
+
set_theme: "Set Thème"
|
8
|
+
theme_updated: "Thème a été mis à jour."
|
data/locales/it.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
it:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Fare clic su un tema per attivarla"
|
5
|
+
current_theme: "Tema attuale"
|
6
|
+
no_themes_message: "Non hai ancora creato alcun temi per la vostra applicazione. Se si desidera creare un nuovo tema basta eseguire il tema generatore e seguire le istruzioni:"
|
7
|
+
set_theme: "Imposta Tema"
|
8
|
+
theme_updated: "Tema è stato aggiornato con successo."
|
data/locales/iw.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
iw:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "לחץ על נושא כדי להפעיל אותה"
|
5
|
+
current_theme: "נושאים נוכחיים"
|
6
|
+
no_themes_message: "עדיין לא נוצר שום נושאים עבור היישום שלך. אם אתה רוצה ליצור ערכת נושא פשוט להפעיל את הגנרטור נושא אחר ההוראות:"
|
7
|
+
set_theme: "בחר ערכת נושא"
|
8
|
+
theme_updated: "נושאים היה עודכנו בהצלחה."
|
data/locales/ja.yml
ADDED
data/locales/ko.yml
ADDED
data/locales/lt.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
lt:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Paspauskite ant temos aktyvuoti"
|
5
|
+
current_theme: "Aktualios temos"
|
6
|
+
no_themes_message: "Jūs dar neturite susikūrę jokių temų jūsų paraišką. Jei norite sukurti naują temą tiesiog paleiskite tema generatorius ir sekite instrukcijas:"
|
7
|
+
set_theme: "Nustatykite temą"
|
8
|
+
theme_updated: "Tema buvo sėkmingai atnaujintas."
|
data/locales/lv.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
lv:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Klikšķiniet uz tēmas, lai aktivizētu"
|
5
|
+
current_theme: "Current Theme"
|
6
|
+
no_themes_message: "Jūs vēl neesat izveidojis nevienu tēmas savu pieteikumu. Ja vēlaties izveidot jaunu tēmu vienkārši palaist tēmu ģenerators un izpildiet instrukcijas:"
|
7
|
+
set_theme: "Set Theme"
|
8
|
+
theme_updated: "Tēma ir veiksmīgi atjaunināts."
|
data/locales/nl.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
nl:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Klik op een thema te activeren"
|
5
|
+
current_theme: "Huidig Thema"
|
6
|
+
no_themes_message: "U nog geen thema's voor uw toepassing. Wilt u een nieuw thema als u het thema generator en volg de instructies:"
|
7
|
+
set_theme: "Stel Thema"
|
8
|
+
theme_updated: "Thema is bijgewerkt."
|
data/locales/no.yml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
---
|
2
|
+
? "no"
|
3
|
+
:
|
4
|
+
disguise:
|
5
|
+
activate_theme_message: "Klikk på et tema for å aktivere den"
|
6
|
+
current_theme: "Aktuelle tema"
|
7
|
+
no_themes_message: "Du har ennå ikke opprettet noen temaer for din søknad. Hvis du vil opprette et nytt tema rett og slett kjøre theme generator og følg instruksjonene:"
|
8
|
+
set_theme: "Set Theme"
|
9
|
+
theme_updated: "Temaet ble oppdatert."
|
data/locales/pl.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
pl:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Kliknij na temat, aby uaktywnić"
|
5
|
+
current_theme: "Aktualny temat"
|
6
|
+
no_themes_message: "Jeszcze nie utworzono żadnych tematów dla danej aplikacji. Jeśli chcesz utworzyć nowy temat wygenerować temat generatora i postępuj zgodnie z instrukcjami:"
|
7
|
+
set_theme: "Ustaw Theme"
|
8
|
+
theme_updated: "Temat został zaktualizowany."
|
data/locales/pt.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
pt:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Clique em um tema para ativá-la"
|
5
|
+
current_theme: "Tema atual"
|
6
|
+
no_themes_message: "Você ainda não criou nenhum temas para a sua aplicação. Se você gostaria de criar um novo tema basta executar o tema gerador e siga as instruções:"
|
7
|
+
set_theme: "Configurar tema"
|
8
|
+
theme_updated: "Tema foi atualizado."
|
data/locales/ro.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
ro:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Click pe o temă pentru a activa"
|
5
|
+
current_theme: "Tematica curenta"
|
6
|
+
no_themes_message: "Încă nu aţi creat nici teme pentru cererea dumneavoastră. Dacă doriţi să creaţi o nouă temă pur şi simplu rulaţi tema generator şi urmaţi instrucţiunile:"
|
7
|
+
set_theme: "Setare Tematica"
|
8
|
+
theme_updated: "Tematica a fost actualizat cu succes."
|
data/locales/ru.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
ru:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Нажмите на тему для его активации"
|
5
|
+
current_theme: "Текущая тема"
|
6
|
+
no_themes_message: "Вы еще не создали какой-либо темы для вашего приложения. Если вы хотите создать новую тему просто запустить тему генератора и следуйте инструкциям:"
|
7
|
+
set_theme: "Установить тема"
|
8
|
+
theme_updated: "Тема была успешно обновлена."
|
data/locales/sk.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
sk:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Kliknite na tému pre jeho aktiváciu"
|
5
|
+
current_theme: "Aktuálna téma"
|
6
|
+
no_themes_message: "Vy ešte nemáte vytvorený akékoľvek témy pre vaše aplikácie. Ak chcete vytvoriť novú tému jednoducho spustiť generátor tému a postupujte podľa návodu:"
|
7
|
+
set_theme: "Nastaviť Témy"
|
8
|
+
theme_updated: "Téma bolo úspešne aktualizované."
|
data/locales/sl.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
sl:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Kliknite na temo, da jo aktivirate"
|
5
|
+
current_theme: "Trenutne teme"
|
6
|
+
no_themes_message: "Še niste ustvarili nobenih teme za vašo prijavo. Če želite ustvariti novo temo, preprosto zaženite theme generator in sledite navodilom:"
|
7
|
+
set_theme: "Nastavljanje teme"
|
8
|
+
theme_updated: "Tema je bila uspeÅ ¡no posodobljen."
|
data/locales/sr.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
sr:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Кликните на тему да активирате га"
|
5
|
+
current_theme: "Тренутне теме"
|
6
|
+
no_themes_message: "Још нисте креирали теме за било које ваше апликације. Ако желите креирати нову тему једноставно покренути тему генератор и следите упутства:"
|
7
|
+
set_theme: "Постави тему"
|
8
|
+
theme_updated: "Тема је успешно обновљен."
|
data/locales/sv.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
sv:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Klicka på ett tema för att aktivera den"
|
5
|
+
current_theme: "Aktuella teman"
|
6
|
+
no_themes_message: "Du har ännu inte skapat några teman för din ansökan. Om du vill skapa ett nytt tema kör helt enkelt temat generator och följ instruktionerna:"
|
7
|
+
set_theme: "Ställ Tema"
|
8
|
+
theme_updated: "Tema har uppdaterats."
|
data/locales/tl.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
tl:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Mag-click sa isang tema upang buhayin ito"
|
5
|
+
current_theme: "Kasalukuyang Theme"
|
6
|
+
no_themes_message: "Hindi mo pa ng anumang mga tema para sa iyong application. Kung nais mong lumikha ng isang bagong tema lamang patakbuhin ang tema dyeneretor at sundin ang mga tagubilin:"
|
7
|
+
set_theme: "Itakda ang Theme"
|
8
|
+
theme_updated: "Tema ay matagumpay na na-update."
|
data/locales/uk.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
uk:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Натисніть на тему для його активації"
|
5
|
+
current_theme: "Поточна тема"
|
6
|
+
no_themes_message: "Ви ще не створили якої-небудь теми для вашої програми. Якщо ви хочете створити нову тему просто запустити тему генератора і дотримуйтесь інструкцій:"
|
7
|
+
set_theme: "Встановити тема"
|
8
|
+
theme_updated: "Тема була успішно оновлено."
|
data/locales/vi.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
vi:
|
3
|
+
disguise:
|
4
|
+
activate_theme_message: "Click chuột vào một chủ đề để kích hoạt nó"
|
5
|
+
current_theme: "Chủ đề hiện tại"
|
6
|
+
no_themes_message: "Bạn chưa tạo ra bất kỳ chủ đề cho các ứng dụng của bạn. Nếu bạn muốn tạo ra một chủ đề mới chủ đề đơn giản hãy chạy máy phát điện và làm theo hướng dẫn:"
|
7
|
+
set_theme: "Đặt Chủ đề"
|
8
|
+
theme_updated: "Chủ đề đã được cập nhật."
|
data/locales/zh-CN.yml
ADDED
data/locales/zh-TW.yml
ADDED
data/locales/zh.yml
ADDED
data/rails/init.rb
ADDED
data/tasks/rails.rake
ADDED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + "/rails_root/config/environment")
|
3
|
+
require 'test_help'
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
7
|
+
require 'disguise'
|
8
|
+
|
9
|
+
gem 'thoughtbot-factory_girl' # from github
|
10
|
+
|
11
|
+
require 'factory_girl'
|
12
|
+
require 'redgreen' rescue LoadError
|
13
|
+
|
14
|
+
|
15
|
+
class ActiveSupport::TestCase
|
16
|
+
self.use_transactional_fixtures = true
|
17
|
+
self.use_instantiated_fixtures = false
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: disguise
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Justin Ball
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-05-30 00:00:00 -06:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Add themes to your Rails application to easily change the view layer and impress everyone you know
|
17
|
+
email: justinball@gmail.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.rdoc
|
25
|
+
files:
|
26
|
+
- .document
|
27
|
+
- .gitignore
|
28
|
+
- LICENSE
|
29
|
+
- README.rdoc
|
30
|
+
- Rakefile
|
31
|
+
- VERSION
|
32
|
+
- app/controllers/admin/disguise/themes_controller.rb
|
33
|
+
- app/models/theme.rb
|
34
|
+
- app/views/admin/themes/_theme.html.erb
|
35
|
+
- app/views/admin/themes/edit.html.erb
|
36
|
+
- app/views/admin/themes/no_themes.html.erb
|
37
|
+
- config/disguise_routes.rb
|
38
|
+
- db/migrate/20090530170040_create_themes.rb
|
39
|
+
- disguise.gemspec
|
40
|
+
- generators/theme/USAGE
|
41
|
+
- generators/theme/templates/INSTALL
|
42
|
+
- generators/theme/templates/description.txt
|
43
|
+
- generators/theme/templates/locales/en.yml
|
44
|
+
- generators/theme/templates/preview.gif
|
45
|
+
- generators/theme/templates/stylesheets/styles.css
|
46
|
+
- generators/theme/templates/views/_footer.html.erb
|
47
|
+
- generators/theme/templates/views/_head.html.erb
|
48
|
+
- generators/theme/templates/views/_header.html.erb
|
49
|
+
- generators/theme/templates/views/application.html.erb
|
50
|
+
- generators/theme/templates/views/home.html.erb
|
51
|
+
- generators/theme/theme_generator.rb
|
52
|
+
- lib/action_controller/disguise_application.rb
|
53
|
+
- lib/disguise.rb
|
54
|
+
- lib/disguise/initialize_routes.rb
|
55
|
+
- lib/disguise/tasks.rb
|
56
|
+
- locales/ar.yml
|
57
|
+
- locales/bg.yml
|
58
|
+
- locales/ca.yml
|
59
|
+
- locales/cs.yml
|
60
|
+
- locales/da.yml
|
61
|
+
- locales/de.yml
|
62
|
+
- locales/el.yml
|
63
|
+
- locales/en.yml
|
64
|
+
- locales/es.yml
|
65
|
+
- locales/fr.yml
|
66
|
+
- locales/it.yml
|
67
|
+
- locales/iw.yml
|
68
|
+
- locales/ja.yml
|
69
|
+
- locales/ko.yml
|
70
|
+
- locales/lt.yml
|
71
|
+
- locales/lv.yml
|
72
|
+
- locales/nl.yml
|
73
|
+
- locales/no.yml
|
74
|
+
- locales/pl.yml
|
75
|
+
- locales/pt.yml
|
76
|
+
- locales/ro.yml
|
77
|
+
- locales/ru.yml
|
78
|
+
- locales/sk.yml
|
79
|
+
- locales/sl.yml
|
80
|
+
- locales/sr.yml
|
81
|
+
- locales/sv.yml
|
82
|
+
- locales/tl.yml
|
83
|
+
- locales/uk.yml
|
84
|
+
- locales/vi.yml
|
85
|
+
- locales/zh-CN.yml
|
86
|
+
- locales/zh-TW.yml
|
87
|
+
- locales/zh.yml
|
88
|
+
- rails/init.rb
|
89
|
+
- tasks/rails.rake
|
90
|
+
- test/disguise_test.rb
|
91
|
+
- test/test_helper.rb
|
92
|
+
has_rdoc: true
|
93
|
+
homepage: http://github.com/jbasdf/disguise
|
94
|
+
post_install_message:
|
95
|
+
rdoc_options:
|
96
|
+
- --charset=UTF-8
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: "0"
|
104
|
+
version:
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: "0"
|
110
|
+
version:
|
111
|
+
requirements: []
|
112
|
+
|
113
|
+
rubyforge_project: disguise
|
114
|
+
rubygems_version: 1.3.1
|
115
|
+
signing_key:
|
116
|
+
specification_version: 2
|
117
|
+
summary: Easy to use view theme system for Rails
|
118
|
+
test_files:
|
119
|
+
- test/disguise_test.rb
|
120
|
+
- test/test_helper.rb
|