kitsune 0.0.6 → 0.0.7
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/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rake'
|
|
2
2
|
|
3
3
|
gem_spec = Gem::Specification.new do |gem_spec|
|
4
4
|
gem_spec.name = "kitsune"
|
5
|
-
gem_spec.version = "0.0.
|
5
|
+
gem_spec.version = "0.0.7"
|
6
6
|
gem_spec.summary = "Integrated Rails Content Management System."
|
7
7
|
gem_spec.email = "matt@toastyapps.com"
|
8
8
|
gem_spec.homepage = "http://github.com/toastyapps/kitsune"
|
@@ -14,16 +14,22 @@
|
|
14
14
|
<td><%= truncate(sanitize(model.display_for(record, column.name).to_s), :length => 20) %></td>
|
15
15
|
<% end %>
|
16
16
|
<td>
|
17
|
-
<%
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<%
|
24
|
-
|
25
|
-
|
26
|
-
|
17
|
+
<% unless model.disabled?(:edit) %>
|
18
|
+
<% if parent %>
|
19
|
+
<%= link_to 'Edit', :controller => 'admin/kitsune/records', :action => :edit, :model_id => model.object_class, :id => record.id, (parent.class.to_s.underscore+'_id').to_sym => parent.id %>
|
20
|
+
<% else %>
|
21
|
+
<%= link_to 'Edit', :controller => 'admin/kitsune/records', :action => :edit, :model_id => model.object_class, :id => record.id %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% unless model.disabled?(:edit) || model.disabled?(:delete) %>
|
25
|
+
-
|
26
|
+
<% end %>
|
27
|
+
<% unless model.disabled?(:delete) %>
|
28
|
+
<% if parent %>
|
29
|
+
<%= link_to('Delete', url_for(:controller => 'admin/kitsune/records', :model_id => model.object_class, :id => record.id, :action => :destroy, :redirect => (parent.class.to_s.underscore+'_id'), :redirect_id => parent.id), :method => :delete, :confirm => "Are you sure?") %>
|
30
|
+
<% else %>
|
31
|
+
<%= link_to('Delete', url_for(:controller => 'admin/kitsune/records', :model_id => model.object_class, :id => record.id, :action => :destroy), :method => :delete, :confirm => "Are you sure?") %>
|
32
|
+
<% end %>
|
27
33
|
<% end %>
|
28
34
|
</td>
|
29
35
|
</tr>
|
@@ -1,8 +1,10 @@
|
|
1
1
|
<div id='kitsune_record_header'>
|
2
2
|
<h2><%= @model.admin_name %></h2>
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
<% unless @model.disabled?(:new) %>
|
4
|
+
<div id='menu'>
|
5
|
+
<%= link_to "New #{params[:id]}", :controller => 'admin/kitsune/records', :action => :new, :model_id => params[:model_id] %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
6
8
|
</div>
|
7
9
|
<% @model.tabs.each do |key, value|%>
|
8
10
|
<%= link_to key, value %>
|
@@ -13,7 +13,8 @@ module Kitsune
|
|
13
13
|
:reflections => {},
|
14
14
|
:fields => {},
|
15
15
|
:tabs => {},
|
16
|
-
:is_sti => false
|
16
|
+
:is_sti => false,
|
17
|
+
:disabled => []
|
17
18
|
}
|
18
19
|
end
|
19
20
|
end
|
@@ -28,4 +29,4 @@ module Kitsune
|
|
28
29
|
self.kitsune_admin[:no_admin] = true
|
29
30
|
end
|
30
31
|
end
|
31
|
-
end
|
32
|
+
end
|
data/lib/kitsune/builder.rb
CHANGED
@@ -16,6 +16,10 @@ module Kitsune
|
|
16
16
|
@resource.kitsune_admin[:name] = name
|
17
17
|
end
|
18
18
|
|
19
|
+
def no_menu
|
20
|
+
no_admin
|
21
|
+
end
|
22
|
+
|
19
23
|
def no_admin
|
20
24
|
@resource.kitsune_admin[:no_admin] = true
|
21
25
|
end
|
@@ -35,6 +39,12 @@ module Kitsune
|
|
35
39
|
def columns(type = nil)
|
36
40
|
@resource.columns
|
37
41
|
end
|
42
|
+
|
43
|
+
def disable(*types)
|
44
|
+
types.each do |type|
|
45
|
+
@resource.kitsune_admin[:disabled] << type.to_sym
|
46
|
+
end
|
47
|
+
end
|
38
48
|
|
39
49
|
def sortable(*fields)
|
40
50
|
@resource.kitsune_admin[:sortable] ||= []
|
data/lib/kitsune/inspector.rb
CHANGED