typus 3.1.0.rc19 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -31
- data/Gemfile +2 -2
- data/app/assets/javascripts/typus/jquery.application.js +15 -2
- data/app/controllers/admin/account_controller.rb +1 -2
- data/app/controllers/admin/base_controller.rb +5 -4
- data/app/controllers/admin/resources_controller.rb +16 -18
- data/app/controllers/admin/session_controller.rb +5 -5
- data/app/helpers/admin/resources/data_types/belongs_to_helper.rb +19 -23
- data/app/helpers/admin/resources/data_types/dragonfly_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/has_and_belongs_to_many_helper.rb +9 -13
- data/app/helpers/admin/resources/data_types/has_many_helper.rb +4 -6
- data/app/helpers/admin/resources/data_types/has_one_helper.rb +2 -2
- data/app/helpers/admin/resources/form_helper.rb +1 -4
- data/app/views/admin/resources/edit.html.erb +13 -0
- data/app/views/admin/templates/_dragonfly_form_preview.html.erb +0 -3
- data/app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb +1 -1
- data/app/views/helpers/admin/base/_apps.html.erb +1 -3
- data/lib/generators/templates/config/initializers/typus.rb +3 -3
- data/lib/generators/templates/config/typus/README +7 -9
- data/lib/generators/templates/config/typus/application.yml +0 -2
- data/lib/generators/templates/config/typus/application_roles.yml +1 -3
- data/lib/generators/templates/config/typus/typus.yml +0 -2
- data/lib/generators/templates/config/typus/typus_roles.yml +0 -2
- data/lib/generators/typus/config_generator.rb +22 -67
- data/lib/generators/typus/controller_generator.rb +1 -1
- data/lib/generators/typus/initializers_generator.rb +1 -3
- data/lib/generators/typus/typus_generator.rb +1 -1
- data/lib/generators/typus/views_generator.rb +1 -1
- data/lib/support/hash.rb +1 -6
- data/lib/typus/authentication/base.rb +4 -0
- data/lib/typus/controller/bulk.rb +4 -4
- data/lib/typus/controller/headless.rb +5 -21
- data/lib/typus/orm/base.rb +4 -4
- data/lib/typus/version.rb +1 -1
- data/lib/typus.rb +1 -1
- data/vendor/assets/chosen/chosen.css +18 -18
- data/vendor/assets/fancybox/jquery.fancybox-1.3.4.css +17 -17
- metadata +15 -12
data/CHANGELOG
CHANGED
@@ -1,38 +1,7 @@
|
|
1
1
|
= 3.2.0 (unreleased)
|
2
2
|
|
3
|
-
* [PLANNED] Models without a controller defined should use the "Resources"
|
4
|
-
controller.
|
5
|
-
|
6
|
-
* [PLANNED] New theme and theme support.
|
7
|
-
|
8
3
|
= 3.1.0 (unreleased)
|
9
4
|
|
10
|
-
* [PLANNED] Block changing uploaded files.
|
11
|
-
|
12
|
-
* [PLANNED] Use roles when using `:none` authentication.
|
13
|
-
|
14
|
-
* [PLANNED] Fix bulk actions combo separator. (UI)
|
15
|
-
|
16
|
-
* [PLANNED] Remove "Versions" stuff from demo sidebar.
|
17
|
-
|
18
|
-
* [PLANNED] Fix selector UI problems.
|
19
|
-
|
20
|
-
* [PLANNED] Reload data on forms only if data has changed. (UI)
|
21
|
-
|
22
|
-
* [PLANNED] Take back "Add New" on "BelongsTo" associations.
|
23
|
-
|
24
|
-
* [PLANNED] Document: `text_with_ckeditor_with_assets`.
|
25
|
-
|
26
|
-
* [PLANNED] Document: Migrate from `3.0` to `3.1`.
|
27
|
-
|
28
|
-
* [PLANNED] Document: How to test an admin controller?
|
29
|
-
|
30
|
-
* [PLANNED] Namespace filters to avoid collision with model attributes.
|
31
|
-
|
32
|
-
* [PLANNED] Helpers for `display_dragonfly` and `display_paperclip`.
|
33
|
-
|
34
|
-
* [NEW] Mountable apps support!
|
35
|
-
|
36
5
|
* [NEW] Filter with scopes.
|
37
6
|
|
38
7
|
* [NEW] Three different actions to save a record.
|
@@ -106,6 +75,12 @@
|
|
106
75
|
|
107
76
|
* [CHANGED] Custom actions are back!
|
108
77
|
|
78
|
+
* [REMOVED] Read Only option has been removed from configuration files. This
|
79
|
+
wasn't really protecting the forms. We are now using `attr_protected` with
|
80
|
+
roles: `attr_protected :title, :as => :admin`.
|
81
|
+
|
82
|
+
* [CHANGED] Configuration files are now generated by model not by groups.
|
83
|
+
|
109
84
|
= 3.0.12
|
110
85
|
|
111
86
|
* [FIXED] Use will_paginate 3.0.0.
|
data/Gemfile
CHANGED
@@ -11,7 +11,7 @@ $(document).ready(function() {
|
|
11
11
|
'scrolling': false,
|
12
12
|
});
|
13
13
|
|
14
|
-
$(".
|
14
|
+
$(".iframe_with_form_reload").fancybox({
|
15
15
|
'width': 720,
|
16
16
|
'height': '90%',
|
17
17
|
'autoScale': false,
|
@@ -20,7 +20,14 @@ $(document).ready(function() {
|
|
20
20
|
'type': 'iframe',
|
21
21
|
'centerOnScroll': true,
|
22
22
|
'scrolling': false,
|
23
|
-
onClosed: function() {
|
23
|
+
onClosed: function() {
|
24
|
+
// console.log(arguments);
|
25
|
+
var attribute = Typus.resource_attribute;
|
26
|
+
var text = Typus.resource_to_label;
|
27
|
+
var value = Typus.resource_id;
|
28
|
+
$(attribute).append(new Option(text, value, true, true));
|
29
|
+
$(".chzn-select").trigger("liszt:updated");
|
30
|
+
},
|
24
31
|
});
|
25
32
|
|
26
33
|
$(".iframe").fancybox({
|
@@ -32,6 +39,10 @@ $(document).ready(function() {
|
|
32
39
|
'type': 'iframe',
|
33
40
|
'centerOnScroll': true,
|
34
41
|
'scrolling': false,
|
42
|
+
onClosed: function() {
|
43
|
+
if (Typus.parent_location_reload)
|
44
|
+
parent.location.reload(true);
|
45
|
+
},
|
35
46
|
});
|
36
47
|
|
37
48
|
// This method is used by Typus::Controller::Bulk
|
@@ -45,6 +56,8 @@ $(document).ready(function() {
|
|
45
56
|
|
46
57
|
});
|
47
58
|
|
59
|
+
Typus = {}
|
60
|
+
|
48
61
|
function setConfirmUnload(on) {
|
49
62
|
window.onbeforeunload = (on) ? unloadMessage : null;
|
50
63
|
}
|
@@ -18,8 +18,7 @@ class Admin::AccountController < Admin::BaseController
|
|
18
18
|
redirect_to user ? { :action => "show", :id => user.token } : { :action => :new }
|
19
19
|
end
|
20
20
|
|
21
|
-
def forgot_password
|
22
|
-
end
|
21
|
+
def forgot_password; end
|
23
22
|
|
24
23
|
def send_password
|
25
24
|
if user = Typus.user_class.find_by_email(params[:typus_user][:email])
|
@@ -7,6 +7,7 @@ class Admin::BaseController < ActionController::Base
|
|
7
7
|
before_filter :set_locale
|
8
8
|
|
9
9
|
helper_method :admin_user
|
10
|
+
helper_method :current_role
|
10
11
|
|
11
12
|
def user_guide; end
|
12
13
|
|
@@ -18,10 +19,10 @@ class Admin::BaseController < ActionController::Base
|
|
18
19
|
|
19
20
|
def set_locale
|
20
21
|
I18n.locale = if admin_user && admin_user.respond_to?(:locale)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
admin_user.locale
|
23
|
+
else
|
24
|
+
Typus::I18n.default_locale
|
25
|
+
end
|
25
26
|
end
|
26
27
|
|
27
28
|
def zero_users
|
@@ -22,12 +22,8 @@ class Admin::ResourcesController < Admin::BaseController
|
|
22
22
|
|
23
23
|
respond_to do |format|
|
24
24
|
format.html do
|
25
|
-
|
26
|
-
|
27
|
-
else
|
28
|
-
set_default_action
|
29
|
-
add_resource_action("Trash", {:action => "destroy"}, {:confirm => "#{Typus::I18n.t("Trash")}?", :method => 'delete'})
|
30
|
-
end
|
25
|
+
set_default_action
|
26
|
+
add_resource_action("Trash", {:action => "destroy"}, {:confirm => "#{Typus::I18n.t("Trash")}?", :method => 'delete'})
|
31
27
|
generate_html
|
32
28
|
end
|
33
29
|
|
@@ -36,9 +32,7 @@ class Admin::ResourcesController < Admin::BaseController
|
|
36
32
|
end
|
37
33
|
|
38
34
|
def new
|
39
|
-
|
40
|
-
item_params.delete_if { |k, v| !@resource.columns.map(&:name).include?(k) }
|
41
|
-
@item = @resource.new(item_params)
|
35
|
+
@item = @resource.new(params[:resource])
|
42
36
|
|
43
37
|
respond_to do |format|
|
44
38
|
format.html # new.html.erb
|
@@ -47,8 +41,13 @@ class Admin::ResourcesController < Admin::BaseController
|
|
47
41
|
end
|
48
42
|
|
49
43
|
def create
|
44
|
+
# Note that we still can still assign the item to another model. To change
|
45
|
+
# this behavior we need only to change how we merge the params.
|
46
|
+
item_params = params[:resource] || {}
|
47
|
+
item_params.merge!(params[@object_name])
|
48
|
+
|
50
49
|
@item = @resource.new
|
51
|
-
@item.assign_attributes(
|
50
|
+
@item.assign_attributes(item_params, :as => current_role)
|
52
51
|
|
53
52
|
set_attributes_on_create
|
54
53
|
|
@@ -84,11 +83,10 @@ class Admin::ResourcesController < Admin::BaseController
|
|
84
83
|
end
|
85
84
|
|
86
85
|
def update
|
87
|
-
attributes = params[:
|
86
|
+
attributes = params[:_nullify] ? { params[:_nullify] => nil } : params[@object_name]
|
88
87
|
|
89
88
|
respond_to do |format|
|
90
|
-
|
91
|
-
if @item.update_attributes(attributes, :as => role)
|
89
|
+
if @item.update_attributes(attributes, :as => current_role)
|
92
90
|
set_attributes_on_update
|
93
91
|
format.html { redirect_on_success }
|
94
92
|
format.json { render :json => @item }
|
@@ -200,18 +198,18 @@ class Admin::ResourcesController < Admin::BaseController
|
|
200
198
|
def redirect_on_success
|
201
199
|
path = params.dup.cleanup
|
202
200
|
|
203
|
-
if params[:_save]
|
204
|
-
|
201
|
+
options = if params[:_save]
|
202
|
+
{ :action => nil, :id => nil }
|
205
203
|
elsif params[:_addanother]
|
206
|
-
|
204
|
+
{ :action => 'new', :id => nil }
|
207
205
|
elsif params[:_continue]
|
208
|
-
|
206
|
+
{ :action => 'edit', :id => @item.id }
|
209
207
|
end
|
210
208
|
|
211
209
|
message = params[:action].eql?('create') ? "%{model} successfully created." : "%{model} successfully updated."
|
212
210
|
notice = Typus::I18n.t(message, :model => @resource.model_name.human)
|
213
211
|
|
214
|
-
redirect_to path, :notice => notice
|
212
|
+
redirect_to path.merge!(options).compact, :notice => notice
|
215
213
|
end
|
216
214
|
|
217
215
|
def set_default_action
|
@@ -11,11 +11,11 @@ class Admin::SessionController < Admin::BaseController
|
|
11
11
|
user = user_scope.authenticate(params[:typus_user][:email], params[:typus_user][:password])
|
12
12
|
|
13
13
|
path = if user
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
session[:typus_user_id] = user.id
|
15
|
+
params[:back_to] || admin_dashboard_index_path
|
16
|
+
else
|
17
|
+
new_admin_session_path(:back_to => params[:back_to])
|
18
|
+
end
|
19
19
|
|
20
20
|
redirect_to path
|
21
21
|
end
|
@@ -4,29 +4,28 @@ module Admin::Resources::DataTypes::BelongsToHelper
|
|
4
4
|
association = @resource.reflect_on_association(attribute.to_sym)
|
5
5
|
|
6
6
|
related = if defined?(set_belongs_to_context)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
related_fk = association.foreign_key
|
7
|
+
set_belongs_to_context.send(attribute.pluralize.to_sym)
|
8
|
+
else
|
9
|
+
association.class_name.constantize
|
10
|
+
end
|
12
11
|
|
12
|
+
related_fk = association.foreign_key
|
13
13
|
html_options = { :disabled => attribute_disabled?(attribute) }
|
14
14
|
label_text = @resource.human_attribute_name(attribute)
|
15
|
+
options = { :attribute => "#{@resource.name.downcase}_#{related_fk}" }
|
15
16
|
|
16
17
|
label_text = @resource.human_attribute_name(attribute)
|
17
|
-
if (text = build_label_text_for_belongs_to(related, html_options))
|
18
|
+
if (text = build_label_text_for_belongs_to(related, html_options, options))
|
18
19
|
label_text += "<small>#{text}</small>"
|
19
20
|
end
|
20
21
|
|
21
22
|
values = if related.respond_to?(:roots)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
expand_tree_into_select_field(related.roots, related_fk)
|
24
|
+
else
|
25
|
+
related.order(related.typus_order_by).map { |p| [p.to_label, p.id] }
|
26
|
+
end
|
26
27
|
|
27
28
|
render "admin/templates/belongs_to",
|
28
|
-
:association => association,
|
29
|
-
:resource => @resource,
|
30
29
|
:attribute => attribute,
|
31
30
|
:attribute_id => "#{@resource.table_name}_#{attribute}",
|
32
31
|
:form => form,
|
@@ -66,23 +65,20 @@ module Admin::Resources::DataTypes::BelongsToHelper
|
|
66
65
|
items += resource.order(resource.typus_order_by).map { |v| [v.to_label, v.id] }
|
67
66
|
end
|
68
67
|
|
69
|
-
def build_label_text_for_belongs_to(klass, html_options)
|
68
|
+
def build_label_text_for_belongs_to(klass, html_options, options)
|
70
69
|
if html_options[:disabled] == true
|
71
70
|
Typus::I18n.t("Read only")
|
72
71
|
elsif admin_user.can?('create', klass) && !headless_mode?
|
73
|
-
build_add_new_for_belongs_to(klass)
|
72
|
+
build_add_new_for_belongs_to(klass, options)
|
74
73
|
end
|
75
74
|
end
|
76
75
|
|
77
|
-
def build_add_new_for_belongs_to(klass)
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
# the record actually exists.
|
84
|
-
options.merge!(:resource_id => @item.id) if %w(edit update).include?(params[:action])
|
85
|
-
link_to Typus::I18n.t("Add New"), options, { :class => 'iframe' }
|
76
|
+
def build_add_new_for_belongs_to(klass, options)
|
77
|
+
default_options = { :controller => "/admin/#{klass.to_resource}",
|
78
|
+
:action => 'new',
|
79
|
+
:attribute => options[:attribute],
|
80
|
+
:_popup => true }
|
81
|
+
link_to Typus::I18n.t("Add New"), default_options, { :class => 'iframe_with_form_reload' }
|
86
82
|
end
|
87
83
|
|
88
84
|
end
|
@@ -12,7 +12,7 @@ module Admin::Resources::DataTypes::DragonflyHelper
|
|
12
12
|
attribute_i18n = @item.class.human_attribute_name(attribute)
|
13
13
|
label_text = <<-HTML
|
14
14
|
#{attribute_i18n}
|
15
|
-
<small>#{link_to Typus::I18n.t("Remove"), { :action => 'update', :id => @item.id, :
|
15
|
+
<small>#{link_to Typus::I18n.t("Remove"), { :action => 'update', :id => @item.id, :_nullify => attribute, :_continue => true }, :confirm => Typus::I18n.t("Are you sure?")}</small>
|
16
16
|
HTML
|
17
17
|
label_text.html_safe
|
18
18
|
end
|
@@ -12,8 +12,10 @@ module Admin::Resources::DataTypes::HasAndBelongsToManyHelper
|
|
12
12
|
|
13
13
|
html_options = { :disabled => attribute_disabled?(resource_ids.to_sym) }
|
14
14
|
|
15
|
+
options = { :attribute => "#{@resource.name.downcase}_#{attribute}" }
|
16
|
+
|
15
17
|
label_text = @resource.human_attribute_name(attribute)
|
16
|
-
if (text = build_label_text_for_has_and_belongs_to_many(klass, html_options))
|
18
|
+
if (text = build_label_text_for_has_and_belongs_to_many(klass, html_options, options))
|
17
19
|
label_text += "<small>#{text}</small>"
|
18
20
|
end
|
19
21
|
|
@@ -30,27 +32,21 @@ module Admin::Resources::DataTypes::HasAndBelongsToManyHelper
|
|
30
32
|
render "admin/templates/has_and_belongs_to_many", locals
|
31
33
|
end
|
32
34
|
|
33
|
-
def build_label_text_for_has_and_belongs_to_many(klass, html_options)
|
35
|
+
def build_label_text_for_has_and_belongs_to_many(klass, html_options, options)
|
34
36
|
if html_options[:disabled] == true
|
35
37
|
Typus::I18n.t("Read only")
|
36
|
-
=begin
|
37
|
-
# TODO: Take this back at some point in the future. Adding a new item
|
38
|
-
# using the pop-up should update the items on the selector. I know
|
39
|
-
# this might be the most trivial thing in the world, but I don't
|
40
|
-
# know how to do it.
|
41
38
|
elsif admin_user.can?('create', klass) && !headless_mode?
|
42
|
-
build_add_new_for_has_and_belongs_to_many(klass)
|
43
|
-
=end
|
39
|
+
build_add_new_for_has_and_belongs_to_many(klass, options)
|
44
40
|
end
|
45
41
|
end
|
46
42
|
|
47
|
-
def build_add_new_for_has_and_belongs_to_many(klass)
|
43
|
+
def build_add_new_for_has_and_belongs_to_many(klass, options)
|
48
44
|
options = { :controller => "/admin/#{klass.to_resource}",
|
49
45
|
:action => "new",
|
50
|
-
:
|
51
|
-
:
|
46
|
+
:attribute => options[:attribute],
|
47
|
+
:_popup => true }
|
52
48
|
|
53
|
-
link_to Typus::I18n.t("Add New"), options, { :class => "
|
49
|
+
link_to Typus::I18n.t("Add New"), options, { :class => "iframe_with_form_reload" }
|
54
50
|
end
|
55
51
|
|
56
52
|
end
|
@@ -14,15 +14,13 @@ module Admin::Resources::DataTypes::HasManyHelper
|
|
14
14
|
def typus_form_has_many(field)
|
15
15
|
setup_relationship(field)
|
16
16
|
|
17
|
-
options = { @reflection.foreign_key => @item.id }
|
17
|
+
options = { "resource[#{@reflection.foreign_key}]" => @item.id }
|
18
18
|
|
19
19
|
if @reflection.options && (as = @reflection.options[:as])
|
20
20
|
klass = @resource.is_sti? ? @resource.superclass : @resource
|
21
21
|
options.merge!("#{as}_type" => klass)
|
22
22
|
end
|
23
23
|
|
24
|
-
count_items_to_relate = @model_to_relate.order(@model_to_relate.typus_order_by).count - @item.send(field).count
|
25
|
-
|
26
24
|
build_pagination
|
27
25
|
set_has_many_resource_actions
|
28
26
|
|
@@ -37,14 +35,14 @@ module Admin::Resources::DataTypes::HasManyHelper
|
|
37
35
|
if admin_user.can?("create", klass)
|
38
36
|
default_options = { :controller => "/admin/#{klass.to_resource}",
|
39
37
|
:action => "new",
|
40
|
-
:
|
38
|
+
:_popup => true }
|
41
39
|
|
42
|
-
link_to Typus::I18n.t("Add New"), default_options.merge(options), { :class => "
|
40
|
+
link_to Typus::I18n.t("Add New"), default_options.merge(options), { :class => "iframe" }
|
43
41
|
end
|
44
42
|
end
|
45
43
|
|
46
44
|
def set_has_many_resource_actions
|
47
|
-
@resource_actions = [["Edit", { :action => "edit", :
|
45
|
+
@resource_actions = [["Edit", { :action => "edit", :_popup => true }, { :class => 'iframe' }],
|
48
46
|
["Trash", { :action => "destroy" }, { :confirm => "Trash?" } ]]
|
49
47
|
end
|
50
48
|
|
@@ -11,7 +11,7 @@ module Admin::Resources::DataTypes::HasOneHelper
|
|
11
11
|
locals = { :association_name => @association_name, :table => build_relationship_table, :add_new => nil }
|
12
12
|
|
13
13
|
if @items.empty?
|
14
|
-
options = {
|
14
|
+
options = { "resource[#{@reflection.foreign_key}]" => @item.id }
|
15
15
|
locals[:add_new] = build_add_new_for_has_one(@model_to_relate, field, options)
|
16
16
|
end
|
17
17
|
|
@@ -22,7 +22,7 @@ module Admin::Resources::DataTypes::HasOneHelper
|
|
22
22
|
if admin_user.can?("create", klass)
|
23
23
|
default_options = { :controller => "/admin/#{klass.to_resource}",
|
24
24
|
:action => "new",
|
25
|
-
:
|
25
|
+
:_popup => true }
|
26
26
|
|
27
27
|
link_to Typus::I18n.t("Add New"), default_options.merge(options), { :class => "iframe" }
|
28
28
|
end
|
@@ -33,11 +33,9 @@ module Admin::Resources::FormHelper
|
|
33
33
|
|
34
34
|
label_text = @resource.human_attribute_name(attribute)
|
35
35
|
|
36
|
-
=begin
|
37
36
|
if options[:disabled] == true
|
38
37
|
label_text += "<small>#{Typus::I18n.t("Read only")}</small>"
|
39
38
|
end
|
40
|
-
=end
|
41
39
|
|
42
40
|
locals = { :resource => @resource,
|
43
41
|
:attribute => attribute,
|
@@ -52,8 +50,7 @@ module Admin::Resources::FormHelper
|
|
52
50
|
|
53
51
|
def attribute_disabled?(attribute)
|
54
52
|
if protected_attributes = @resource._protected_attributes
|
55
|
-
|
56
|
-
protected_attributes[role].include?(attribute)
|
53
|
+
protected_attributes[current_role].include?(attribute)
|
57
54
|
end
|
58
55
|
end
|
59
56
|
|
@@ -9,6 +9,19 @@
|
|
9
9
|
<small><%= list_actions %></small>
|
10
10
|
</h2>
|
11
11
|
|
12
|
+
<% if headless_mode? && params[:action] == 'edit' %>
|
13
|
+
<script type="text/javascript">
|
14
|
+
$(document).ready(function () {
|
15
|
+
parent.Typus.resource_attribute = "#<%= params[:attribute] %>";
|
16
|
+
parent.Typus.resource_id = '<%= @item.id %>';
|
17
|
+
parent.Typus.resource_to_label = '<%= @item.to_label %>';
|
18
|
+
<% if flash.keys.any? && !params[:_input] %>
|
19
|
+
parent.Typus.parent_location_reload = true;
|
20
|
+
<% end %>
|
21
|
+
});
|
22
|
+
</script>
|
23
|
+
<% end %>
|
24
|
+
|
12
25
|
<%= display_flash_message %>
|
13
26
|
<%= render 'edit' %>
|
14
27
|
|
@@ -10,9 +10,6 @@
|
|
10
10
|
<ul style="margin: 0 0 0 15px!important;">
|
11
11
|
<li><strong>File name:</strong> <%= attachment.name %></li>
|
12
12
|
<li><strong>File type:</strong> <%= attachment.mime_type %></li>
|
13
|
-
<% if @item.respond_to?(:created_at) %>
|
14
|
-
<li><strong>Upload date:</strong> <%= @item.created_at %></li>
|
15
|
-
<% end %>
|
16
13
|
<li><strong>Dimensions:</strong> <%= attachment.width %> x <%= attachment.height %></li>
|
17
14
|
</ul>
|
18
15
|
</div>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
insert_picture = <<-DATA
|
28
28
|
<small>
|
29
29
|
#{link_to "Insert picture",
|
30
|
-
{:controller => "/admin/assets", :
|
30
|
+
{:controller => "/admin/assets", :_popup => true, :_input => input},
|
31
31
|
{:class => "iframe", :style => "font-size: 10px; background: black; color: white; padding: 2px 5px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"}}
|
32
32
|
</small>
|
33
33
|
DATA
|
@@ -10,10 +10,8 @@
|
|
10
10
|
|
11
11
|
<% admin_user.applications.each do |application| %>
|
12
12
|
|
13
|
-
<% app_id = application.parameterize %>
|
14
|
-
|
15
13
|
<%
|
16
|
-
apps = admin_user.application(application)
|
14
|
+
app_id, apps = application.parameterize, admin_user.application(application)
|
17
15
|
if (params[:application] == app_id) || (@resource && apps.include?(@resource.model_name))
|
18
16
|
klass = 'active'
|
19
17
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Typus.setup do |config|
|
2
2
|
|
3
3
|
# Application name.
|
4
|
-
config.admin_title = "
|
4
|
+
# config.admin_title = "Typus"
|
5
5
|
# config.admin_sub_title = ""
|
6
6
|
|
7
7
|
# When mailer_sender is set, password recover is enabled. This email
|
@@ -13,7 +13,7 @@ Typus.setup do |config|
|
|
13
13
|
# config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
14
14
|
#
|
15
15
|
# This is a required Rails configuration. In production it must be the actual
|
16
|
-
# actual host of your application
|
16
|
+
# actual host of your application.
|
17
17
|
#
|
18
18
|
# config.mailer_sender = "admin@example.com"
|
19
19
|
|
@@ -25,7 +25,7 @@ Typus.setup do |config|
|
|
25
25
|
# Run `rails g typus:migration` if you need an advanced authentication system.
|
26
26
|
# config.authentication = :none
|
27
27
|
|
28
|
-
# Define username and password for +:http_basic+ authentication
|
28
|
+
# Define username and password for +:http_basic+ authentication.
|
29
29
|
# config.username = "admin"
|
30
30
|
# config.password = "columbia"
|
31
31
|
|
@@ -1,10 +1,9 @@
|
|
1
1
|
# Models
|
2
2
|
|
3
3
|
This is an example of a **Typus** enabled model with all available options.
|
4
|
-
|
5
|
-
most common settings.
|
4
|
+
Use this example as reference to customize your YAML files.
|
6
5
|
|
7
|
-
|
6
|
+
Entry:
|
8
7
|
fields:
|
9
8
|
default: id, title, category_id, created_at, is_published?
|
10
9
|
list: id, title, category_id, created_at, is_published?
|
@@ -40,17 +39,16 @@ most common settings.
|
|
40
39
|
|
41
40
|
# Roles
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
access to all actions.
|
42
|
+
This is an example of a roles file. Use this example as reference to customize
|
43
|
+
your YAML files.
|
46
44
|
|
47
45
|
admin:
|
48
|
-
|
46
|
+
Entry: create, read, update, delete
|
49
47
|
Category: create, read, update, delete
|
50
|
-
|
48
|
+
AdminUser: all
|
51
49
|
|
52
50
|
editor:
|
53
|
-
|
51
|
+
Entry: create, read, update
|
54
52
|
Category: read, update
|
55
53
|
|
56
54
|
You can also define `resources` which are not related to a model, for example
|
@@ -4,99 +4,54 @@ module Typus
|
|
4
4
|
|
5
5
|
source_root File.expand_path("../../templates", __FILE__)
|
6
6
|
|
7
|
-
class_option :admin_title, :default => Rails.root.basename
|
8
|
-
|
9
7
|
desc <<-MSG
|
10
8
|
Description:
|
11
|
-
Creates configuration files
|
9
|
+
Creates configuration files.
|
12
10
|
|
13
11
|
MSG
|
14
12
|
|
15
13
|
def generate_config
|
16
14
|
copy_file "config/typus/README"
|
17
|
-
|
18
|
-
|
19
|
-
template "config/typus
|
15
|
+
generate_yaml.each do |key, value|
|
16
|
+
if (@configuration = value)[:base].present?
|
17
|
+
template "config/typus/application.yml", "config/typus/#{key}.yml"
|
18
|
+
template "config/typus/application_roles.yml", "config/typus/#{key}_roles.yml"
|
20
19
|
end
|
21
20
|
end
|
22
21
|
end
|
23
22
|
|
24
23
|
protected
|
25
24
|
|
26
|
-
def timestamp
|
27
|
-
Time.zone.now.to_s(:number)
|
28
|
-
end
|
29
|
-
|
30
25
|
def configuration
|
31
26
|
@configuration
|
32
27
|
end
|
33
28
|
|
34
|
-
def
|
29
|
+
def generate_yaml
|
35
30
|
Typus.reload!
|
36
31
|
|
37
|
-
configuration = {
|
38
|
-
|
39
|
-
Typus.application_models.sort { |x,y| x <=> y }.each do |model|
|
40
|
-
|
41
|
-
next if Typus.models.include?(model)
|
42
|
-
|
43
|
-
klass = model.constantize
|
44
|
-
|
45
|
-
# Detect all relationships except polymorphic belongs_to using reflection.
|
46
|
-
relationships = [ :belongs_to, :has_and_belongs_to_many, :has_many, :has_one ].map do |relationship|
|
47
|
-
klass.reflect_on_all_associations(relationship).reject { |i| i.options[:polymorphic] }.map { |i| i.name.to_s }
|
48
|
-
end.flatten.sort
|
32
|
+
configuration = {}
|
33
|
+
models = Typus.application_models.reject { |m| Typus.models.include?(m) }.map { |m| m.constantize }
|
49
34
|
|
50
|
-
|
51
|
-
|
52
|
-
#
|
53
|
-
# - Default
|
54
|
-
# - Form
|
55
|
-
#
|
35
|
+
models.each do |model|
|
36
|
+
configuration[model.table_name] = {}
|
56
37
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
password_salt persistence_token single_access_token perishable_token
|
61
|
-
_type$ type
|
62
|
-
_file_size$ )
|
38
|
+
relationships = [ :has_many, :has_one ].map do |relationship|
|
39
|
+
model.reflect_on_all_associations(relationship).map { |i| i.name.to_s }
|
40
|
+
end.flatten.join(", ")
|
63
41
|
|
64
|
-
|
65
|
-
|
42
|
+
rejections = %w( ^id$ _type$ type created_at created_on updated_at updated_on deleted_at ).join("|")
|
43
|
+
fields = model.columns.map(&:name).reject { |f| f.match(rejections) }.join(", ")
|
66
44
|
|
67
|
-
|
68
|
-
|
69
|
-
form = fields.reject { |f| f.match(form_rejections) }
|
70
|
-
|
71
|
-
# Model defaults.
|
72
|
-
order_by = "position" if default.include?("position")
|
73
|
-
filters = "created_at" if fields.include?("created_at")
|
74
|
-
search = ( %w(name title) & default ).join(", ")
|
75
|
-
|
76
|
-
# We want attributes of belongs_to relationships to be shown in our
|
77
|
-
# field collections if those are not polymorphic.
|
78
|
-
[ default, form ].each do |fields|
|
79
|
-
fields << klass.reflect_on_all_associations(:belongs_to).reject { |i| i.options[:polymorphic] }.map { |i| i.name.to_s }
|
80
|
-
fields.flatten!
|
81
|
-
end
|
82
|
-
|
83
|
-
configuration[:base] << <<-RAW
|
84
|
-
#{klass}:
|
45
|
+
configuration[model.table_name][:base] = <<-RAW
|
46
|
+
#{model}:
|
85
47
|
fields:
|
86
|
-
default: #{
|
87
|
-
form: #{
|
88
|
-
|
89
|
-
|
90
|
-
filters: #{filters}
|
91
|
-
search: #{search}
|
92
|
-
application: #{options[:admin_title]}
|
93
|
-
|
94
|
-
RAW
|
95
|
-
|
96
|
-
configuration[:roles] << <<-RAW
|
97
|
-
#{klass}: create, read, update, delete
|
48
|
+
default: #{fields}
|
49
|
+
form: #{fields}
|
50
|
+
relationships: #{relationships}
|
51
|
+
application: Application
|
98
52
|
RAW
|
99
53
|
|
54
|
+
configuration[model.table_name][:roles] = "#{model}: create, read, update, delete"
|
100
55
|
end
|
101
56
|
|
102
57
|
configuration
|
@@ -4,11 +4,9 @@ module Typus
|
|
4
4
|
|
5
5
|
source_root File.expand_path("../../templates", __FILE__)
|
6
6
|
|
7
|
-
class_option :admin_title, :default => Rails.root.basename
|
8
|
-
|
9
7
|
desc <<-MSG
|
10
8
|
Description:
|
11
|
-
Copies
|
9
|
+
Copies Typus initializers into your application.
|
12
10
|
|
13
11
|
MSG
|
14
12
|
|
@@ -19,7 +19,7 @@ Description:
|
|
19
19
|
This generator creates required files to enable an admin panel which allows
|
20
20
|
trusted users to edit structured content.
|
21
21
|
|
22
|
-
To enable session authentication run `rails
|
22
|
+
To enable session authentication run `rails generate typus:migration`.
|
23
23
|
|
24
24
|
DESC
|
25
25
|
|
data/lib/support/hash.rb
CHANGED
@@ -5,12 +5,7 @@ class Hash
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def cleanup
|
8
|
-
whitelist = %w(controller action id
|
9
|
-
input
|
10
|
-
layout
|
11
|
-
resource resource_id resource_action
|
12
|
-
selected
|
13
|
-
back_to)
|
8
|
+
whitelist = %w(controller action id _input _popup resource attribute)
|
14
9
|
delete_if { |k, v| !whitelist.include?(k) }
|
15
10
|
end
|
16
11
|
|
@@ -25,10 +25,10 @@ module Typus
|
|
25
25
|
send(params[:batch_action], ids)
|
26
26
|
else
|
27
27
|
notice = if action.empty?
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
Typus::I18n.t("No bulk action selected.")
|
29
|
+
else
|
30
|
+
Typus::I18n.t("Items must be selected in order to perform actions on them. No items have been changed.")
|
31
|
+
end
|
32
32
|
redirect_to :back, :notice => notice
|
33
33
|
end
|
34
34
|
end
|
@@ -6,7 +6,7 @@ module Typus
|
|
6
6
|
base.before_filter :set_resources_action_for_headless_on_index, :only => [:index, :trash]
|
7
7
|
base.before_filter :set_resources_action_for_headless, :only => [:new, :create, :edit, :show]
|
8
8
|
base.helper_method :headless_mode?
|
9
|
-
base.layout :
|
9
|
+
base.layout :headless_layout
|
10
10
|
end
|
11
11
|
|
12
12
|
def set_resources_action_for_headless_on_index
|
@@ -19,29 +19,13 @@ module Typus
|
|
19
19
|
end
|
20
20
|
private :set_resources_action_for_headless
|
21
21
|
|
22
|
-
def
|
23
|
-
|
24
|
-
end
|
25
|
-
private :set_headless_layout
|
26
|
-
|
27
|
-
def headless_mode_with_custom_action_is_enabled?
|
28
|
-
headless_mode? && params[:resource_action]
|
29
|
-
end
|
30
|
-
private :headless_mode_with_custom_action_is_enabled?
|
31
|
-
|
32
|
-
def set_headless_resource_actions
|
33
|
-
body = params[:resource_action].titleize
|
34
|
-
url = { :controller => params[:resource].tableize,
|
35
|
-
:action => params[:resource_action],
|
36
|
-
:resource => params[:resource],
|
37
|
-
:resource_id => params[:resource_id],
|
38
|
-
:return_to => params[:return_to] }
|
39
|
-
options = { :target => "_parent" }
|
40
|
-
add_resource_action(body, url, options)
|
22
|
+
def headless_layout
|
23
|
+
headless_mode? ? "admin/headless" : "admin/base"
|
41
24
|
end
|
25
|
+
private :headless_layout
|
42
26
|
|
43
27
|
def headless_mode?
|
44
|
-
params[:
|
28
|
+
params[:_popup]
|
45
29
|
end
|
46
30
|
|
47
31
|
end
|
data/lib/typus/orm/base.rb
CHANGED
@@ -101,10 +101,10 @@ module Typus
|
|
101
101
|
options = read_model_config['fields']['options']
|
102
102
|
|
103
103
|
boolean = if options && options['booleans'] && boolean = options['booleans'][attribute.to_s]
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
104
|
+
boolean.is_a?(String) ? boolean.extract_settings : boolean
|
105
|
+
else
|
106
|
+
["True", "False"]
|
107
|
+
end
|
108
108
|
|
109
109
|
[[boolean.first, "true"], [boolean.last, "false"]]
|
110
110
|
end
|
data/lib/typus/version.rb
CHANGED
data/lib/typus.rb
CHANGED
@@ -197,7 +197,7 @@ module Typus
|
|
197
197
|
detect_application_models.map do |model|
|
198
198
|
class_name = model.sub(/\.rb$/,"").camelize
|
199
199
|
klass = class_name.split("::").inject(Object) { |klass,part| klass.const_get(part) }
|
200
|
-
class_name if is_active_record?(klass)
|
200
|
+
class_name if is_active_record?(klass) && !is_mongoid?(klass)
|
201
201
|
end.compact
|
202
202
|
end
|
203
203
|
|
@@ -81,7 +81,7 @@
|
|
81
81
|
width: 18px;
|
82
82
|
}
|
83
83
|
.chzn-container-single .chzn-single div b {
|
84
|
-
background: url('
|
84
|
+
background: url('/assets/chosen-sprite.png') no-repeat 0 1px;
|
85
85
|
display: block;
|
86
86
|
width: 100%;
|
87
87
|
height: 100%;
|
@@ -92,14 +92,14 @@
|
|
92
92
|
white-space: nowrap;
|
93
93
|
}
|
94
94
|
.chzn-container-single .chzn-search input {
|
95
|
-
background: #fff url('
|
96
|
-
background: url('
|
97
|
-
background: url('
|
98
|
-
background: url('
|
99
|
-
background: url('
|
100
|
-
background: url('
|
101
|
-
background: url('
|
102
|
-
background: url('
|
95
|
+
background: #fff url('/assets/chosen-sprite.png') no-repeat 100% -20px;
|
96
|
+
background: url('/assets/chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
97
|
+
background: url('/assets/chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
98
|
+
background: url('/assets/chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
99
|
+
background: url('/assets/chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
100
|
+
background: url('/assets/chosen-sprite.png') no-repeat 100% -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
101
|
+
background: url('/assets/chosen-sprite.png') no-repeat 100% -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
102
|
+
background: url('/assets/chosen-sprite.png') no-repeat 100% -20px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
103
103
|
margin: 1px 0;
|
104
104
|
padding: 4px 20px 4px 5px;
|
105
105
|
outline: 0;
|
@@ -196,7 +196,7 @@
|
|
196
196
|
width: 8px;
|
197
197
|
height: 9px;
|
198
198
|
font-size: 1px;
|
199
|
-
background: url('
|
199
|
+
background: url('/assets/chosen-sprite.png') right top no-repeat;
|
200
200
|
}
|
201
201
|
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
|
202
202
|
background-position: right -9px;
|
@@ -321,14 +321,14 @@
|
|
321
321
|
.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 20px; }
|
322
322
|
.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
|
323
323
|
.chzn-rtl .chzn-search input {
|
324
|
-
background: url('
|
325
|
-
background: url('
|
326
|
-
background: url('
|
327
|
-
background: url('
|
328
|
-
background: url('
|
329
|
-
background: url('
|
330
|
-
background: url('
|
331
|
-
background: url('
|
324
|
+
background: url('/assets/chosen-sprite.png') no-repeat -38px -20px, #ffffff;
|
325
|
+
background: url('/assets/chosen-sprite.png') no-repeat -38px -20px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
326
|
+
background: url('/assets/chosen-sprite.png') no-repeat -38px -20px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
327
|
+
background: url('/assets/chosen-sprite.png') no-repeat -38px -20px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
328
|
+
background: url('/assets/chosen-sprite.png') no-repeat -38px -20px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
329
|
+
background: url('/assets/chosen-sprite.png') no-repeat -38px -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
330
|
+
background: url('/assets/chosen-sprite.png') no-repeat -38px -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
331
|
+
background: url('/assets/chosen-sprite.png') no-repeat -38px -20px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
|
332
332
|
padding: 4px 5px 4px 20px;
|
333
333
|
}
|
334
334
|
/* @end */
|
@@ -35,7 +35,7 @@
|
|
35
35
|
left: 0;
|
36
36
|
width: 40px;
|
37
37
|
height: 480px;
|
38
|
-
background-image: url('
|
38
|
+
background-image: url('/assets/fancybox.png');
|
39
39
|
}
|
40
40
|
|
41
41
|
#fancybox-overlay {
|
@@ -99,7 +99,7 @@
|
|
99
99
|
right: -15px;
|
100
100
|
width: 30px;
|
101
101
|
height: 30px;
|
102
|
-
background: transparent url('
|
102
|
+
background: transparent url('/assets/fancybox.png') -40px 0px;
|
103
103
|
cursor: pointer;
|
104
104
|
z-index: 1103;
|
105
105
|
display: none;
|
@@ -137,7 +137,7 @@
|
|
137
137
|
width: 35%;
|
138
138
|
cursor: pointer;
|
139
139
|
outline: none;
|
140
|
-
background: transparent url('
|
140
|
+
background: transparent url('/assets/blank.gif');
|
141
141
|
z-index: 1102;
|
142
142
|
display: none;
|
143
143
|
}
|
@@ -163,12 +163,12 @@
|
|
163
163
|
}
|
164
164
|
|
165
165
|
#fancybox-left-ico {
|
166
|
-
background-image: url('
|
166
|
+
background-image: url('/assets/fancybox.png');
|
167
167
|
background-position: -40px -30px;
|
168
168
|
}
|
169
169
|
|
170
170
|
#fancybox-right-ico {
|
171
|
-
background-image: url('
|
171
|
+
background-image: url('/assets/fancybox.png');
|
172
172
|
background-position: -40px -60px;
|
173
173
|
}
|
174
174
|
|
@@ -199,13 +199,13 @@
|
|
199
199
|
top: -20px;
|
200
200
|
left: 0;
|
201
201
|
width: 100%;
|
202
|
-
background-image: url('
|
202
|
+
background-image: url('/assets/fancybox-x.png');
|
203
203
|
}
|
204
204
|
|
205
205
|
#fancybox-bg-ne {
|
206
206
|
top: -20px;
|
207
207
|
right: -20px;
|
208
|
-
background-image: url('
|
208
|
+
background-image: url('/assets/fancybox.png');
|
209
209
|
background-position: -40px -162px;
|
210
210
|
}
|
211
211
|
|
@@ -213,14 +213,14 @@
|
|
213
213
|
top: 0;
|
214
214
|
right: -20px;
|
215
215
|
height: 100%;
|
216
|
-
background-image: url('
|
216
|
+
background-image: url('/assets/fancybox-y.png');
|
217
217
|
background-position: -20px 0px;
|
218
218
|
}
|
219
219
|
|
220
220
|
#fancybox-bg-se {
|
221
221
|
bottom: -20px;
|
222
222
|
right: -20px;
|
223
|
-
background-image: url('
|
223
|
+
background-image: url('/assets/fancybox.png');
|
224
224
|
background-position: -40px -182px;
|
225
225
|
}
|
226
226
|
|
@@ -228,14 +228,14 @@
|
|
228
228
|
bottom: -20px;
|
229
229
|
left: 0;
|
230
230
|
width: 100%;
|
231
|
-
background-image: url('
|
231
|
+
background-image: url('/assets/fancybox-x.png');
|
232
232
|
background-position: 0px -20px;
|
233
233
|
}
|
234
234
|
|
235
235
|
#fancybox-bg-sw {
|
236
236
|
bottom: -20px;
|
237
237
|
left: -20px;
|
238
|
-
background-image: url('
|
238
|
+
background-image: url('/assets/fancybox.png');
|
239
239
|
background-position: -40px -142px;
|
240
240
|
}
|
241
241
|
|
@@ -243,13 +243,13 @@
|
|
243
243
|
top: 0;
|
244
244
|
left: -20px;
|
245
245
|
height: 100%;
|
246
|
-
background-image: url('
|
246
|
+
background-image: url('/assets/fancybox-y.png');
|
247
247
|
}
|
248
248
|
|
249
249
|
#fancybox-bg-nw {
|
250
250
|
top: -20px;
|
251
251
|
left: -20px;
|
252
|
-
background-image: url('
|
252
|
+
background-image: url('/assets/fancybox.png');
|
253
253
|
background-position: -40px -122px;
|
254
254
|
}
|
255
255
|
|
@@ -282,7 +282,7 @@
|
|
282
282
|
|
283
283
|
#fancybox-title-over {
|
284
284
|
padding: 10px;
|
285
|
-
background-image: url('
|
285
|
+
background-image: url('/assets/fancy_title_over.png');
|
286
286
|
display: block;
|
287
287
|
}
|
288
288
|
|
@@ -306,7 +306,7 @@
|
|
306
306
|
|
307
307
|
#fancybox-title-float-left {
|
308
308
|
padding: 0 0 0 15px;
|
309
|
-
background: url('
|
309
|
+
background: url('/assets/fancybox.png') -40px -90px no-repeat;
|
310
310
|
}
|
311
311
|
|
312
312
|
#fancybox-title-float-main {
|
@@ -314,12 +314,12 @@
|
|
314
314
|
line-height: 29px;
|
315
315
|
font-weight: bold;
|
316
316
|
padding: 0 0 3px 0;
|
317
|
-
background: url('
|
317
|
+
background: url('/assets/fancybox-x.png') 0px -40px;
|
318
318
|
}
|
319
319
|
|
320
320
|
#fancybox-title-float-right {
|
321
321
|
padding: 0 0 0 15px;
|
322
|
-
background: url('
|
322
|
+
background: url('/assets/fancybox.png') -55px -90px no-repeat;
|
323
323
|
}
|
324
324
|
|
325
325
|
/* IE6 */
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0
|
5
|
-
prerelease:
|
4
|
+
version: 3.1.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Francesc Esplugas
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-09-02 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jquery-rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70152604331140 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70152604331140
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: kaminari
|
27
|
-
requirement: &
|
27
|
+
requirement: &70152604330700 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70152604330700
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rails
|
38
|
-
requirement: &
|
38
|
+
requirement: &70152604330180 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 3.1.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70152604330180
|
47
47
|
description: Ruby on Rails Admin Panel (Engine) to allow trusted users edit structured
|
48
48
|
content.
|
49
49
|
email:
|
@@ -320,13 +320,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
320
320
|
version: '0'
|
321
321
|
segments:
|
322
322
|
- 0
|
323
|
-
hash:
|
323
|
+
hash: 4352251271305818957
|
324
324
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
325
325
|
none: false
|
326
326
|
requirements:
|
327
|
-
- - ! '
|
327
|
+
- - ! '>='
|
328
328
|
- !ruby/object:Gem::Version
|
329
|
-
version:
|
329
|
+
version: '0'
|
330
|
+
segments:
|
331
|
+
- 0
|
332
|
+
hash: 4352251271305818957
|
330
333
|
requirements: []
|
331
334
|
rubyforge_project: typus
|
332
335
|
rubygems_version: 1.8.9
|