fesplugas-typus 0.9.10 → 0.9.11
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/VERSION +1 -1
- data/generators/typus/templates/config/typus/README +51 -0
- data/generators/typus/templates/config/typus/application.yml +3 -52
- data/generators/typus/templates/config/typus/application_roles.yml +6 -6
- data/generators/typus/typus_generator.rb +0 -9
- data/lib/typus/generator.rb +11 -1
- data/typus.gemspec +3 -2
- metadata +3 -2
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.11
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
This is an example of a **Typus** enabled model with all available
|
|
2
|
+
options. You can use this example to customize your YAML files which
|
|
3
|
+
only have set the most common settings.
|
|
4
|
+
|
|
5
|
+
Post:
|
|
6
|
+
fields:
|
|
7
|
+
list: id, title, category_id, created_at, is_published?
|
|
8
|
+
form: title, body, is_published?, created_at
|
|
9
|
+
show: title, category, is_published?
|
|
10
|
+
relationship: title, status
|
|
11
|
+
options:
|
|
12
|
+
auto_generated:
|
|
13
|
+
booleans:
|
|
14
|
+
is_published: ["Yes, it is", "No, it isn't"]
|
|
15
|
+
date_formats:
|
|
16
|
+
created_at: post_long
|
|
17
|
+
selectors:
|
|
18
|
+
read_only:
|
|
19
|
+
tiny_mce:
|
|
20
|
+
fields: body
|
|
21
|
+
options:
|
|
22
|
+
theme: simple
|
|
23
|
+
theme_advanced_buttons3_add:
|
|
24
|
+
- fulscreen
|
|
25
|
+
plugins:
|
|
26
|
+
- fulscreen
|
|
27
|
+
actions:
|
|
28
|
+
index: cleanup
|
|
29
|
+
edit: send_as_newsletter
|
|
30
|
+
show: rebuild
|
|
31
|
+
export: csv, xml, pdf
|
|
32
|
+
order_by: created_at
|
|
33
|
+
relationships:
|
|
34
|
+
filters: is_published?, created_at, category_id
|
|
35
|
+
search: title, body
|
|
36
|
+
application: Application
|
|
37
|
+
description: Some text to describe the model
|
|
38
|
+
options:
|
|
39
|
+
default_action_on_item: show
|
|
40
|
+
end_year: 2015
|
|
41
|
+
form_rows: 25
|
|
42
|
+
icon_on_boolean: true
|
|
43
|
+
index_after_save: false
|
|
44
|
+
minute_step: 15
|
|
45
|
+
nil: 'nil'
|
|
46
|
+
on_header: true
|
|
47
|
+
only_user_items: true
|
|
48
|
+
per_page: 5
|
|
49
|
+
sidebar_selector: 5
|
|
50
|
+
start_year: 1990
|
|
51
|
+
toggle: true
|
|
@@ -1,55 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
## Typus Configuration File
|
|
3
|
-
##
|
|
1
|
+
# Typus Models Configuration File
|
|
4
2
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
# list: id, title, category_id, created_at, is_published?
|
|
8
|
-
# form: title, body, is_published?, created_at
|
|
9
|
-
# show: title, category, is_published?
|
|
10
|
-
# relationship: title, status
|
|
11
|
-
# options:
|
|
12
|
-
# tiny_mce:
|
|
13
|
-
# fields: body
|
|
14
|
-
# options:
|
|
15
|
-
# theme: simple
|
|
16
|
-
# theme_advanced_buttons3_add:
|
|
17
|
-
# - fulscreen
|
|
18
|
-
# plugins:
|
|
19
|
-
# - fulscreen
|
|
20
|
-
# auto_generated:
|
|
21
|
-
# booleans:
|
|
22
|
-
# is_published: ["Yes, it is", "No, it isn't"]
|
|
23
|
-
# date_formats:
|
|
24
|
-
# created_at: post_long
|
|
25
|
-
# selectors:
|
|
26
|
-
# read_only:
|
|
27
|
-
# actions:
|
|
28
|
-
# index: cleanup
|
|
29
|
-
# edit: send_as_newsletter
|
|
30
|
-
# show: rebuild
|
|
31
|
-
# export: csv, xml, pdf
|
|
32
|
-
# order_by: created_at
|
|
33
|
-
# relationships:
|
|
34
|
-
# filters: is_published?, created_at, category_id
|
|
35
|
-
# search: title, body
|
|
36
|
-
# application: Application
|
|
37
|
-
# description: Some text to describe the model
|
|
38
|
-
# options:
|
|
39
|
-
# default_action_on_item: show
|
|
40
|
-
# end_year: 2015
|
|
41
|
-
# form_rows: 25
|
|
42
|
-
# icon_on_boolean: true
|
|
43
|
-
# index_after_save: false
|
|
44
|
-
# minute_step: 15
|
|
45
|
-
# nil: 'nil'
|
|
46
|
-
# on_header: true
|
|
47
|
-
# only_user_items: true
|
|
48
|
-
# per_page: 5
|
|
49
|
-
# sidebar_selector: 5
|
|
50
|
-
# start_year: 1990
|
|
51
|
-
# toggle: true
|
|
52
|
-
#
|
|
53
|
-
###
|
|
3
|
+
# Use the README file on the same folder as this file as a reference to
|
|
4
|
+
# customize this file to your needs.
|
|
54
5
|
|
|
55
6
|
<%= configuration[:base] %>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Typus Roles Configuration File
|
|
2
|
+
#
|
|
3
|
+
# In this file you can configure the actions available for each of your
|
|
4
|
+
# models on the application.
|
|
4
5
|
#
|
|
5
6
|
# admin:
|
|
6
7
|
# Post: create, read, update, delete
|
|
@@ -10,14 +11,13 @@
|
|
|
10
11
|
# Post: create, read, update
|
|
11
12
|
# Category: read, update
|
|
12
13
|
#
|
|
13
|
-
# You can also define
|
|
14
|
-
# for example to control MemCached
|
|
14
|
+
# You can also define `resources` which are not related to a model,
|
|
15
|
+
# for example to control MemCached or see the Starling queue statistics.
|
|
15
16
|
#
|
|
16
17
|
# admin:
|
|
17
18
|
# Starling: index
|
|
18
19
|
# MemCached: index, cleanup
|
|
19
20
|
#
|
|
20
|
-
###
|
|
21
21
|
|
|
22
22
|
admin:
|
|
23
23
|
<%= configuration[:roles] %>
|
|
@@ -78,18 +78,9 @@ class TypusGenerator < Rails::Generator::Base
|
|
|
78
78
|
list: #{list.join(', ')}
|
|
79
79
|
form: #{form.join(', ')}
|
|
80
80
|
show: #{show.join(', ')}
|
|
81
|
-
relationship:
|
|
82
|
-
options:
|
|
83
|
-
tiny_mce:
|
|
84
|
-
fields:
|
|
85
|
-
options:
|
|
86
|
-
auto_generated:
|
|
87
|
-
read_only:
|
|
88
|
-
selectors:
|
|
89
81
|
actions:
|
|
90
82
|
index:
|
|
91
83
|
edit:
|
|
92
|
-
export:
|
|
93
84
|
order_by:
|
|
94
85
|
relationships: #{relationships.join(', ')}
|
|
95
86
|
filters:
|
data/lib/typus/generator.rb
CHANGED
|
@@ -118,13 +118,23 @@ class Admin::#{model.pluralize}Controller < Admin::MasterController
|
|
|
118
118
|
##
|
|
119
119
|
# You can extend Admin::MasterController with your methods.
|
|
120
120
|
#
|
|
121
|
-
# This actions have to be defined in <tt>config/typus/application.yml</tt
|
|
121
|
+
# This actions have to be defined in <tt>config/typus/application.yml</tt>:
|
|
122
122
|
#
|
|
123
123
|
# #{model}:
|
|
124
124
|
# actions:
|
|
125
125
|
# index: custom_action
|
|
126
126
|
# edit: custom_action_for_an_item
|
|
127
127
|
#
|
|
128
|
+
# And you have to add permissions on <tt>config/typus/application_roles.yml</tt>
|
|
129
|
+
# to have access to them.
|
|
130
|
+
#
|
|
131
|
+
# admin:
|
|
132
|
+
# #{model}: create, read, update, destroy, custom_action
|
|
133
|
+
#
|
|
134
|
+
# editor:
|
|
135
|
+
# #{model}: create, read, update, custom_action_for_an_item
|
|
136
|
+
#
|
|
137
|
+
#
|
|
128
138
|
def custom_action
|
|
129
139
|
end
|
|
130
140
|
|
data/typus.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{typus}
|
|
5
|
-
s.version = "0.9.
|
|
5
|
+
s.version = "0.9.11"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Francesc Esplugas"]
|
|
9
|
-
s.date = %q{2009-
|
|
9
|
+
s.date = %q{2009-07-01}
|
|
10
10
|
s.description = %q{Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)}
|
|
11
11
|
s.email = %q{francesc@intraducibles.com}
|
|
12
12
|
s.extra_rdoc_files = [
|
|
@@ -49,6 +49,7 @@ Gem::Specification.new do |s|
|
|
|
49
49
|
"config/locales/typus/ru.yml",
|
|
50
50
|
"config/routes.rb",
|
|
51
51
|
"generators/typus/templates/config/initializers/typus.rb",
|
|
52
|
+
"generators/typus/templates/config/typus/README",
|
|
52
53
|
"generators/typus/templates/config/typus/application.yml",
|
|
53
54
|
"generators/typus/templates/config/typus/application_roles.yml",
|
|
54
55
|
"generators/typus/templates/config/typus/typus.yml",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fesplugas-typus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Francesc Esplugas
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-07-01 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|
|
@@ -58,6 +58,7 @@ files:
|
|
|
58
58
|
- config/locales/typus/ru.yml
|
|
59
59
|
- config/routes.rb
|
|
60
60
|
- generators/typus/templates/config/initializers/typus.rb
|
|
61
|
+
- generators/typus/templates/config/typus/README
|
|
61
62
|
- generators/typus/templates/config/typus/application.yml
|
|
62
63
|
- generators/typus/templates/config/typus/application_roles.yml
|
|
63
64
|
- generators/typus/templates/config/typus/typus.yml
|