fesplugas-typus 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +80 -0
- data/Rakefile +61 -0
- data/VERSION +1 -0
- data/app/controllers/admin/master_controller.rb +324 -0
- data/app/controllers/typus_controller.rb +127 -0
- data/app/helpers/admin/form_helper.rb +351 -0
- data/app/helpers/admin/master_helper.rb +99 -0
- data/app/helpers/admin/public_helper.rb +24 -0
- data/app/helpers/admin/sidebar_helper.rb +259 -0
- data/app/helpers/admin/table_helper.rb +227 -0
- data/app/helpers/typus_helper.rb +169 -0
- data/app/models/typus_mailer.rb +14 -0
- data/app/models/typus_user.rb +5 -0
- data/app/views/admin/dashboard/_sidebar.html.erb +9 -0
- data/app/views/admin/resources/edit.html.erb +29 -0
- data/app/views/admin/resources/index.html.erb +28 -0
- data/app/views/admin/resources/new.html.erb +27 -0
- data/app/views/admin/resources/show.html.erb +21 -0
- data/app/views/admin/shared/_footer.html.erb +1 -0
- data/app/views/admin/shared/_pagination.html.erb +28 -0
- data/app/views/layouts/admin.html.erb +72 -0
- data/app/views/layouts/typus.html.erb +29 -0
- data/app/views/typus/dashboard.html.erb +13 -0
- data/app/views/typus/recover_password.html.erb +7 -0
- data/app/views/typus/reset_password.html.erb +13 -0
- data/app/views/typus/sign_in.html.erb +9 -0
- data/app/views/typus/sign_up.html.erb +7 -0
- data/app/views/typus_mailer/reset_password_link.erb +11 -0
- data/config/locales/es.yml +106 -0
- data/config/locales/pt-BR.yml +108 -0
- data/config/locales/typus_hacks.yml +14 -0
- data/config/routes.rb +14 -0
- data/generators/typus/templates/config/initializers/typus.rb +27 -0
- data/generators/typus/templates/config/typus/application.yml +45 -0
- data/generators/typus/templates/config/typus/application_roles.yml +23 -0
- data/generators/typus/templates/config/typus/typus.yml +14 -0
- data/generators/typus/templates/config/typus/typus_roles.yml +2 -0
- data/generators/typus/templates/db/create_typus_users.rb +21 -0
- data/generators/typus/templates/public/images/admin/arrow_down.gif +0 -0
- data/generators/typus/templates/public/images/admin/arrow_up.gif +0 -0
- data/generators/typus/templates/public/images/admin/spinner.gif +0 -0
- data/generators/typus/templates/public/images/admin/status_false.gif +0 -0
- data/generators/typus/templates/public/images/admin/status_true.gif +0 -0
- data/generators/typus/templates/public/images/admin/trash.gif +0 -0
- data/generators/typus/templates/public/javascripts/admin/application.js +14 -0
- data/generators/typus/templates/public/stylesheets/admin/reset.css +68 -0
- data/generators/typus/templates/public/stylesheets/admin/screen.css +709 -0
- data/generators/typus/typus_generator.rb +141 -0
- data/generators/typus_update_schema_to_01/templates/config/typus.yml +14 -0
- data/generators/typus_update_schema_to_01/templates/migration.rb +11 -0
- data/generators/typus_update_schema_to_01/typus_update_schema_to_01_generator.rb +19 -0
- data/init.rb +19 -0
- data/lib/typus/active_record.rb +298 -0
- data/lib/typus/authentication.rb +155 -0
- data/lib/typus/configuration.rb +92 -0
- data/lib/typus/format.rb +56 -0
- data/lib/typus/generator.rb +173 -0
- data/lib/typus/hash.rb +10 -0
- data/lib/typus/locale.rb +17 -0
- data/lib/typus/object.rb +22 -0
- data/lib/typus/quick_edit.rb +33 -0
- data/lib/typus/reloader.rb +17 -0
- data/lib/typus/string.rb +11 -0
- data/lib/typus/user.rb +137 -0
- data/lib/typus.rb +133 -0
- data/lib/vendor/active_record.rb +15 -0
- data/lib/vendor/paginator.rb +143 -0
- data/tasks/typus_tasks.rake +26 -0
- data/test/config/broken/application.yml +68 -0
- data/test/config/broken/application_roles.yml +20 -0
- data/test/config/broken/empty.yml +0 -0
- data/test/config/broken/empty_roles.yml +0 -0
- data/test/config/broken/undefined.yml +3 -0
- data/test/config/broken/undefined_roles.yml +6 -0
- data/test/config/default/typus.yml +14 -0
- data/test/config/default/typus_roles.yml +2 -0
- data/test/config/empty/empty_01.yml +0 -0
- data/test/config/empty/empty_01_roles.yml +0 -0
- data/test/config/empty/empty_02.yml +0 -0
- data/test/config/empty/empty_02_roles.yml +0 -0
- data/test/config/locales/es.yml +10 -0
- data/test/config/ordered/001_roles.yml +2 -0
- data/test/config/ordered/002_roles.yml +2 -0
- data/test/config/unordered/app_one_roles.yml +2 -0
- data/test/config/unordered/app_two_roles.yml +2 -0
- data/test/config/working/application.yml +67 -0
- data/test/config/working/application_roles.yml +22 -0
- data/test/config/working/typus.yml +14 -0
- data/test/config/working/typus_roles.yml +2 -0
- data/test/fixtures/app/controllers/admin/assets_controller.rb +2 -0
- data/test/fixtures/app/controllers/admin/categories_controller.rb +2 -0
- data/test/fixtures/app/controllers/admin/comments_controller.rb +2 -0
- data/test/fixtures/app/controllers/admin/pages_controller.rb +2 -0
- data/test/fixtures/app/controllers/admin/posts_controller.rb +2 -0
- data/test/fixtures/app/controllers/admin/status_controller.rb +6 -0
- data/test/fixtures/app/controllers/admin/typus_users_controller.rb +2 -0
- data/test/fixtures/app/controllers/admin/watch_dog_controller.rb +6 -0
- data/test/fixtures/app/views/admin/comments/_edit_bottom.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_edit_sidebar.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_edit_top.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_index_bottom.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_index_sidebar.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_index_top.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_new_bottom.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_new_sidebar.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_new_top.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_show_bottom.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_show_sidebar.html.erb +1 -0
- data/test/fixtures/app/views/admin/comments/_show_top.html.erb +1 -0
- data/test/fixtures/app/views/admin/dashboard/_bottom.html.erb +1 -0
- data/test/fixtures/app/views/admin/dashboard/_sidebar.html.erb +1 -0
- data/test/fixtures/app/views/admin/dashboard/_top.html.erb +1 -0
- data/test/fixtures/app/views/admin/shared/_footer.html.erb +1 -0
- data/test/fixtures/app/views/admin/status/index.html.erb +1 -0
- data/test/fixtures/app/views/admin/templates/_datepicker.html.erb +1 -0
- data/test/fixtures/assets.yml +11 -0
- data/test/fixtures/categories.yml +14 -0
- data/test/fixtures/comments.yml +27 -0
- data/test/fixtures/pages.yml +41 -0
- data/test/fixtures/posts.yml +37 -0
- data/test/fixtures/typus_users.yml +54 -0
- data/test/functional/admin/assets_controller_test.rb +57 -0
- data/test/functional/admin/categories_controller_test.rb +106 -0
- data/test/functional/admin/comments_controller_test.rb +121 -0
- data/test/functional/admin/master_controller_test.rb +5 -0
- data/test/functional/admin/posts_controller_test.rb +278 -0
- data/test/functional/admin/status_controller_test.rb +43 -0
- data/test/functional/admin/typus_users_controller_test.rb +239 -0
- data/test/functional/typus_controller_test.rb +315 -0
- data/test/helper.rb +51 -0
- data/test/helpers/admin/form_helper_test.rb +316 -0
- data/test/helpers/admin/master_helper_test.rb +65 -0
- data/test/helpers/admin/public_helper_test.rb +22 -0
- data/test/helpers/admin/sidebar_helper_test.rb +351 -0
- data/test/helpers/admin/table_helper_test.rb +255 -0
- data/test/helpers/typus_helper_test.rb +106 -0
- data/test/lib/active_record_test.rb +372 -0
- data/test/lib/configuration_test.rb +91 -0
- data/test/lib/hash_test.rb +11 -0
- data/test/lib/routes_test.rb +82 -0
- data/test/lib/string_test.rb +25 -0
- data/test/lib/typus_test.rb +105 -0
- data/test/models.rb +51 -0
- data/test/schema.rb +64 -0
- data/test/unit/typus_mailer_test.rb +33 -0
- data/test/unit/typus_test.rb +17 -0
- data/test/unit/typus_user_roles_test.rb +90 -0
- data/test/unit/typus_user_test.rb +177 -0
- data/test/vendor/active_record_test.rb +18 -0
- data/test/vendor/paginator_test.rb +138 -0
- data/typus.gemspec +225 -0
- metadata +241 -0
data/lib/typus.rb
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
module Typus
|
|
2
|
+
|
|
3
|
+
class << self
|
|
4
|
+
|
|
5
|
+
def root
|
|
6
|
+
File.dirname(__FILE__) + '/../'
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def locales
|
|
10
|
+
Typus::Configuration.options[:locales]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def default_locale
|
|
14
|
+
locales.map(&:last).first
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def applications
|
|
18
|
+
Typus::Configuration.config.collect { |i| i.last['application'] }.compact.uniq.sort
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
##
|
|
22
|
+
# Returns a list of the modules of an application.
|
|
23
|
+
#
|
|
24
|
+
def application(name)
|
|
25
|
+
Typus::Configuration.config.collect { |i| i.first if i.last['application'] == name }.compact.uniq.sort
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
##
|
|
29
|
+
# Returns a list of the submodules of a module.
|
|
30
|
+
#
|
|
31
|
+
def module(name)
|
|
32
|
+
Typus::Configuration.config.collect { |i| i.first if i.last['module'] == name.name }.compact.uniq.sort
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
##
|
|
36
|
+
# Parent
|
|
37
|
+
#
|
|
38
|
+
# Typus::Configuration.config['Post']['module']
|
|
39
|
+
# Typus::Configuration.config['Post']['application']
|
|
40
|
+
#
|
|
41
|
+
def parent(model, name)
|
|
42
|
+
Typus::Configuration.config[model.name][name] || ''
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def models
|
|
46
|
+
Typus::Configuration.config.map { |i| i.first }.sort
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
##
|
|
50
|
+
# Return a list of resources, which are models tableless.
|
|
51
|
+
#
|
|
52
|
+
def resources(models = get_model_names)
|
|
53
|
+
|
|
54
|
+
all_resources = Typus::Configuration.roles.keys.map do |key|
|
|
55
|
+
Typus::Configuration.roles[key].keys
|
|
56
|
+
end.flatten.sort.uniq
|
|
57
|
+
|
|
58
|
+
all_resources.delete_if { |x| models.include?(x) || x == 'TypusUser' } rescue []
|
|
59
|
+
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def get_model_names
|
|
63
|
+
Dir[ "#{Rails.root}/app/models/**/*.rb",
|
|
64
|
+
"#{Rails.root}/vendor/plugins/**/app/models/**/*.rb" ].collect { |m| File.basename(m).sub(/\.rb$/,'').camelize }
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def module_description(modulo)
|
|
68
|
+
Typus::Configuration.config[modulo]['description']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def user_class
|
|
72
|
+
Typus::Configuration.options[:user_class_name].constantize
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def user_fk
|
|
76
|
+
Typus::Configuration.options[:user_fk]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def testing?
|
|
80
|
+
Rails.env.test? && Dir.pwd == "#{Rails.root}/vendor/plugins/typus"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def plugin?
|
|
84
|
+
File.exists?("#{Rails.root}/vendor/plugins/typus")
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
##
|
|
88
|
+
# Enable application. This is used at boot time.
|
|
89
|
+
#
|
|
90
|
+
# Typus.enable
|
|
91
|
+
#
|
|
92
|
+
def enable
|
|
93
|
+
|
|
94
|
+
# Ruby Extensions
|
|
95
|
+
require 'typus/hash'
|
|
96
|
+
require 'typus/object'
|
|
97
|
+
require 'typus/string'
|
|
98
|
+
|
|
99
|
+
# Load configuration and roles.
|
|
100
|
+
Typus::Configuration.config!
|
|
101
|
+
Typus::Configuration.roles!
|
|
102
|
+
|
|
103
|
+
# Load translation files from the plugin or the gem.
|
|
104
|
+
if plugin?
|
|
105
|
+
I18n.load_path += Dir[File.join("#{Rails.root}/vendor/plugins/typus/config/locales/**/*.{rb,yml}")]
|
|
106
|
+
else
|
|
107
|
+
Gem.path.each { |g| I18n.load_path += Dir[File.join("#{g}/gems/typus-**/config/locales/**/*.{rb,yml}")] }
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Require the test/models on when testing.
|
|
111
|
+
require File.dirname(__FILE__) + '/../test/models' if Typus.testing?
|
|
112
|
+
|
|
113
|
+
# Rails Extensions.
|
|
114
|
+
require 'typus/active_record'
|
|
115
|
+
|
|
116
|
+
# Mixins.
|
|
117
|
+
require 'typus/authentication'
|
|
118
|
+
require 'typus/format'
|
|
119
|
+
require 'typus/generator'
|
|
120
|
+
require 'typus/locale'
|
|
121
|
+
require 'typus/reloader'
|
|
122
|
+
require 'typus/quick_edit'
|
|
123
|
+
require 'typus/user'
|
|
124
|
+
|
|
125
|
+
# Vendor.
|
|
126
|
+
require 'vendor/active_record'
|
|
127
|
+
require 'vendor/paginator'
|
|
128
|
+
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class ActiveRecord::Base
|
|
2
|
+
|
|
3
|
+
def to_dom(*args)
|
|
4
|
+
|
|
5
|
+
options = args.extract_options!
|
|
6
|
+
display_id = new_record? ? 'new' : id
|
|
7
|
+
|
|
8
|
+
[ options[:prefix],
|
|
9
|
+
self.class.name.underscore,
|
|
10
|
+
display_id,
|
|
11
|
+
options[:suffix] ].compact.join('_')
|
|
12
|
+
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
end
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
require 'forwardable'
|
|
2
|
+
|
|
3
|
+
class Paginator
|
|
4
|
+
|
|
5
|
+
VERSION = '1.1.1'
|
|
6
|
+
|
|
7
|
+
include Enumerable
|
|
8
|
+
|
|
9
|
+
class ArgumentError < ::ArgumentError; end
|
|
10
|
+
class MissingCountError < ArgumentError; end
|
|
11
|
+
class MissingSelectError < ArgumentError; end
|
|
12
|
+
|
|
13
|
+
attr_reader :per_page, :count
|
|
14
|
+
|
|
15
|
+
# Instantiate a new Paginator object
|
|
16
|
+
#
|
|
17
|
+
# Provide:
|
|
18
|
+
# * A total count of the number of objects to paginate
|
|
19
|
+
# * The number of objects in each page
|
|
20
|
+
# * A block that returns the array of items
|
|
21
|
+
# * The block is passed the item offset
|
|
22
|
+
# (and the number of items to show per page, for
|
|
23
|
+
# convenience, if the arity is 2)
|
|
24
|
+
def initialize(count, per_page, &select)
|
|
25
|
+
@count, @per_page = count, per_page
|
|
26
|
+
unless select
|
|
27
|
+
raise MissingSelectError, "Must provide block to select data for each page"
|
|
28
|
+
end
|
|
29
|
+
@select = select
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Total number of pages
|
|
33
|
+
def number_of_pages
|
|
34
|
+
(@count / @per_page).to_i + (@count % @per_page > 0 ? 1 : 0)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# First page object
|
|
38
|
+
def first
|
|
39
|
+
page 1
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Last page object
|
|
43
|
+
def last
|
|
44
|
+
page number_of_pages
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def each
|
|
48
|
+
1.upto(number_of_pages) do |number|
|
|
49
|
+
yield page(number)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Retrieve page object by number
|
|
54
|
+
def page(number)
|
|
55
|
+
number = (n = number.to_i) > 0 ? n : 1
|
|
56
|
+
Page.new(self, number, lambda {
|
|
57
|
+
offset = (number - 1) * @per_page
|
|
58
|
+
args = [offset]
|
|
59
|
+
args << @per_page if @select.arity == 2
|
|
60
|
+
@select.call(*args)
|
|
61
|
+
})
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Page object
|
|
65
|
+
#
|
|
66
|
+
# Retrieves items for a page and provides metadata about the position
|
|
67
|
+
# of the page in the paginator
|
|
68
|
+
class Page
|
|
69
|
+
|
|
70
|
+
include Enumerable
|
|
71
|
+
|
|
72
|
+
attr_reader :number, :pager
|
|
73
|
+
|
|
74
|
+
def initialize(pager, number, select) #:nodoc:
|
|
75
|
+
@pager, @number = pager, number
|
|
76
|
+
@offset = (number - 1) * pager.per_page
|
|
77
|
+
@select = select
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Retrieve the items for this page
|
|
81
|
+
# * Caches
|
|
82
|
+
def items
|
|
83
|
+
@items ||= @select.call
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Does this page have any items?
|
|
87
|
+
def empty?
|
|
88
|
+
items.empty?
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Checks to see if there's a page before this one
|
|
92
|
+
def prev?
|
|
93
|
+
@number > 1
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Get previous page (if possible)
|
|
97
|
+
def prev
|
|
98
|
+
@pager.page(@number - 1) if prev?
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Checks to see if there's a page after this one
|
|
102
|
+
def next?
|
|
103
|
+
@number < @pager.number_of_pages
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Get next page (if possible)
|
|
107
|
+
def next
|
|
108
|
+
@pager.page(@number + 1) if next?
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# The "item number" of the first item on this page
|
|
112
|
+
def first_item_number
|
|
113
|
+
1 + @offset
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# The "item number" of the last item on this page
|
|
117
|
+
def last_item_number
|
|
118
|
+
if next?
|
|
119
|
+
@offset + @pager.per_page
|
|
120
|
+
else
|
|
121
|
+
@pager.count
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def ==(other) #:nodoc:
|
|
126
|
+
@pager == other.pager && self.number == other.number
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def each(&block)
|
|
130
|
+
items.each(&block)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def method_missing(meth, *args, &block) #:nodoc:
|
|
134
|
+
if @pager.respond_to?(meth)
|
|
135
|
+
@pager.__send__(meth, *args, &block)
|
|
136
|
+
else
|
|
137
|
+
super
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
namespace :typus do
|
|
2
|
+
|
|
3
|
+
desc 'Install acts_as_list, acts_as_tree and paperclip.'
|
|
4
|
+
task :misc do
|
|
5
|
+
plugins = [ 'git://github.com/thoughtbot/paperclip.git',
|
|
6
|
+
'git://github.com/rails/acts_as_list.git',
|
|
7
|
+
'git://github.com/rails/acts_as_tree.git' ]
|
|
8
|
+
system "script/plugin install #{plugins.join(' ')} --force"
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
desc 'List current roles.'
|
|
12
|
+
task :roles => :environment do
|
|
13
|
+
Typus::Configuration.roles.each do |role|
|
|
14
|
+
puts "\n#{role.first.capitalize} role has access to:"
|
|
15
|
+
role.last.each { |key, value| puts "- #{key}: #{value}" }
|
|
16
|
+
end
|
|
17
|
+
puts "\n"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
desc 'Install ssl_requirement.'
|
|
21
|
+
task :ssl do
|
|
22
|
+
plugins = [ 'git://github.com/rails/ssl_requirement.git' ]
|
|
23
|
+
system "script/plugin install #{plugins.join(' ')} --force"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Page:
|
|
2
|
+
fields:
|
|
3
|
+
# Body field is overwrited from a Page class method.
|
|
4
|
+
list: title, body, status
|
|
5
|
+
form: title, body, status
|
|
6
|
+
relationships:
|
|
7
|
+
has_many: assets
|
|
8
|
+
application: Site
|
|
9
|
+
|
|
10
|
+
Asset:
|
|
11
|
+
fields:
|
|
12
|
+
list: caption
|
|
13
|
+
form: caption
|
|
14
|
+
application: Site
|
|
15
|
+
|
|
16
|
+
Category:
|
|
17
|
+
fields:
|
|
18
|
+
list: name, position
|
|
19
|
+
form: name, permalink, position
|
|
20
|
+
order_by: position
|
|
21
|
+
module: Post
|
|
22
|
+
|
|
23
|
+
Post:
|
|
24
|
+
fields:
|
|
25
|
+
list: title, created_at, status
|
|
26
|
+
form: title, body, created_at, status
|
|
27
|
+
relationship: title, created_at
|
|
28
|
+
options:
|
|
29
|
+
selectors: status
|
|
30
|
+
read_only: permalink
|
|
31
|
+
auto_generated: created_at
|
|
32
|
+
date_formats:
|
|
33
|
+
created_at: post_short
|
|
34
|
+
relationships: assets, categories
|
|
35
|
+
actions:
|
|
36
|
+
index: cleanup
|
|
37
|
+
edit: send_as_newsletter, preview
|
|
38
|
+
filters: status, created_at, user, user_id
|
|
39
|
+
search: title
|
|
40
|
+
order_by: title, -created_at
|
|
41
|
+
application: Blog
|
|
42
|
+
|
|
43
|
+
User:
|
|
44
|
+
fields:
|
|
45
|
+
list: first_name, last_name, email
|
|
46
|
+
|
|
47
|
+
Comment:
|
|
48
|
+
fields:
|
|
49
|
+
list: email, post, post_id
|
|
50
|
+
form: email, post
|
|
51
|
+
filters: post
|
|
52
|
+
search: email, body
|
|
53
|
+
application: Blog
|
|
54
|
+
|
|
55
|
+
TypusUser:
|
|
56
|
+
fields:
|
|
57
|
+
list: first_name, last_name, email, role, status
|
|
58
|
+
form: first_name, last_name, email, role, password, password_confirmation
|
|
59
|
+
relationship: first_name, last_name, role, email, status
|
|
60
|
+
options:
|
|
61
|
+
selectors: role
|
|
62
|
+
booleans:
|
|
63
|
+
status: active, inactive
|
|
64
|
+
filters: status, role, unexisting
|
|
65
|
+
search: first_name, last_name, email, role
|
|
66
|
+
module: Typus
|
|
67
|
+
description: System Users Administration
|
|
68
|
+
application: Typus
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
admin:
|
|
2
|
+
Asset: create, read, update, delete
|
|
3
|
+
Category: create, read, update, delete
|
|
4
|
+
Comment: create, read, update, delete
|
|
5
|
+
TypusUser: create, read, update, delete
|
|
6
|
+
Page: create, read, update, delete
|
|
7
|
+
Post: create, read, update, delete
|
|
8
|
+
Status: index
|
|
9
|
+
Order:
|
|
10
|
+
|
|
11
|
+
editor:
|
|
12
|
+
Category: create, read, update
|
|
13
|
+
Comment: read, update, delete
|
|
14
|
+
Post: create, read, update
|
|
15
|
+
TypusUser: read, update
|
|
16
|
+
|
|
17
|
+
designer:
|
|
18
|
+
Category: read, update
|
|
19
|
+
Comment: read
|
|
20
|
+
Post: read
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
TypusUser:
|
|
2
|
+
fields:
|
|
3
|
+
list: email, role, status
|
|
4
|
+
form: first_name, last_name, role, email, password, password_confirmation
|
|
5
|
+
options:
|
|
6
|
+
selectors: role
|
|
7
|
+
booleans:
|
|
8
|
+
status: Active, Inactive
|
|
9
|
+
filters: status, role
|
|
10
|
+
search: first_name, last_name, email, role
|
|
11
|
+
application: Typus
|
|
12
|
+
description: System Users Administration
|
|
13
|
+
options:
|
|
14
|
+
icon_on_boolean: false
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Asset:
|
|
2
|
+
fields:
|
|
3
|
+
list: caption
|
|
4
|
+
form: caption
|
|
5
|
+
application: Site
|
|
6
|
+
options:
|
|
7
|
+
|
|
8
|
+
Category:
|
|
9
|
+
fields:
|
|
10
|
+
list: name, position
|
|
11
|
+
form: name, permalink, position
|
|
12
|
+
order_by: position
|
|
13
|
+
module: Post
|
|
14
|
+
|
|
15
|
+
Comment:
|
|
16
|
+
fields:
|
|
17
|
+
list: email, post, post_id
|
|
18
|
+
form: email, post
|
|
19
|
+
csv: email, post_id
|
|
20
|
+
export: csv
|
|
21
|
+
filters: post
|
|
22
|
+
search: email, body
|
|
23
|
+
application: Blog
|
|
24
|
+
|
|
25
|
+
Page:
|
|
26
|
+
fields:
|
|
27
|
+
# Body field is overwrited from a Page class method.
|
|
28
|
+
list: title, is_published?
|
|
29
|
+
form: title, body, is_published?
|
|
30
|
+
options:
|
|
31
|
+
booleans:
|
|
32
|
+
is_published: ["Yes, it is", "No, it isn't"]
|
|
33
|
+
actions:
|
|
34
|
+
index: rebuild_all
|
|
35
|
+
edit: rebuild
|
|
36
|
+
application: Site
|
|
37
|
+
filters: is_published?
|
|
38
|
+
options:
|
|
39
|
+
form_rows: 25
|
|
40
|
+
|
|
41
|
+
Post:
|
|
42
|
+
fields:
|
|
43
|
+
list: title, created_at, status
|
|
44
|
+
form: title, body, created_at, status, published_at
|
|
45
|
+
relationship: title, created_at
|
|
46
|
+
options:
|
|
47
|
+
selectors: status
|
|
48
|
+
read_only: permalink
|
|
49
|
+
auto_generated: created_at
|
|
50
|
+
date_formats:
|
|
51
|
+
created_at: post_short
|
|
52
|
+
templates:
|
|
53
|
+
published_at: datepicker
|
|
54
|
+
relationships: assets, categories
|
|
55
|
+
actions:
|
|
56
|
+
index: cleanup
|
|
57
|
+
edit: send_as_newsletter, preview
|
|
58
|
+
filters: status, created_at, user, user_id
|
|
59
|
+
search: title
|
|
60
|
+
order_by: title, -created_at
|
|
61
|
+
application: Blog
|
|
62
|
+
|
|
63
|
+
CustomUser:
|
|
64
|
+
fields:
|
|
65
|
+
list: first_name, last_name, email
|
|
66
|
+
csv: first_name, last_name, email
|
|
67
|
+
export: csv
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
admin:
|
|
2
|
+
Asset: create, read, update, delete
|
|
3
|
+
Category: create, read, update, delete
|
|
4
|
+
Comment: create, read, update, delete
|
|
5
|
+
Git: index, commit
|
|
6
|
+
Order:
|
|
7
|
+
Page: create, read, update, delete, rebuild, rebuild_all
|
|
8
|
+
Post: create, read, update, delete
|
|
9
|
+
Status: index
|
|
10
|
+
WatchDog: index, cleanup
|
|
11
|
+
|
|
12
|
+
editor:
|
|
13
|
+
Category: create, read, update
|
|
14
|
+
Comment: read, update, delete
|
|
15
|
+
Git: index
|
|
16
|
+
Post: create, read, update
|
|
17
|
+
TypusUser: read, update
|
|
18
|
+
|
|
19
|
+
designer:
|
|
20
|
+
Category: read, update
|
|
21
|
+
Comment: read
|
|
22
|
+
Post: read
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
TypusUser:
|
|
2
|
+
fields:
|
|
3
|
+
list: email, role, status
|
|
4
|
+
form: first_name, last_name, role, email, password, password_confirmation
|
|
5
|
+
options:
|
|
6
|
+
selectors: role
|
|
7
|
+
booleans:
|
|
8
|
+
status: Active, Inactive
|
|
9
|
+
filters: status, role
|
|
10
|
+
search: first_name, last_name, email, role
|
|
11
|
+
application: Typus
|
|
12
|
+
description: System Users Administration
|
|
13
|
+
options:
|
|
14
|
+
icon_on_boolean: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_edit_bottom.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_edit_sidebar.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_edit_top.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_index_bottom.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_index_sidebar.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_index_top.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_new_bottom.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_new_sidebar.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_new_top.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_show_bottom.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_show_sidebar.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_show_top.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_bottom.html.erb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_sidebar.html.erb
|