ecm_cms_navigation 0.0.11 → 0.0.12
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.
|
@@ -49,20 +49,6 @@ if defined?(ActiveAdmin)
|
|
|
49
49
|
column :key
|
|
50
50
|
column :options
|
|
51
51
|
default_actions
|
|
52
|
-
column ::Ecm::CmsCore::Template.model_name.human do |navigation_item|
|
|
53
|
-
if defined?(::Ecm::CmsCore::Template)
|
|
54
|
-
template = ::Ecm::CmsCore::Template.where(:pathname => navigation_item.pathname).where(:basename => navigation_item.basename).first
|
|
55
|
-
output = ""
|
|
56
|
-
if template
|
|
57
|
-
output << link_to(I18n.t("active_admin.view"), [:admin, template])
|
|
58
|
-
output << " "
|
|
59
|
-
output << link_to(I18n.t("active_admin.edit"), admin_ecm_cms_core_template_path(template))
|
|
60
|
-
# else
|
|
61
|
-
# output = link_to(I18n.t("active_admin.create_model", :model => ::Ecm::CmsCore::Template.model_name.human), new_admin_ecm_cms_core_template_path, :class => "member_link create_link")
|
|
62
|
-
end
|
|
63
|
-
output.html_safe
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
52
|
end
|
|
67
53
|
|
|
68
54
|
show :title => :name do
|
|
@@ -37,7 +37,8 @@ if defined?(ActiveAdmin)
|
|
|
37
37
|
column Ecm::CmsNavigation::NavigationItem.human_attribute_name(:key), :key
|
|
38
38
|
column Ecm::CmsNavigation::NavigationItem.human_attribute_name(:options), :options
|
|
39
39
|
column do |navigation_item|
|
|
40
|
-
link_to
|
|
40
|
+
link_to(I18n.t('active_admin.view'), [:admin, navigation_item], :class => "member_link view_link") +
|
|
41
|
+
link_to(I18n.t('active_admin.edit'), [:edit, :admin, navigation_item], :class => "member_link edit_link")
|
|
41
42
|
end
|
|
42
43
|
end
|
|
43
44
|
else
|
|
@@ -49,16 +49,4 @@ class Ecm::CmsNavigation::NavigationItem < ActiveRecord::Base
|
|
|
49
49
|
def update_children_navigations!
|
|
50
50
|
self.children.map(&:"set_navigation!")
|
|
51
51
|
end
|
|
52
|
-
|
|
53
|
-
def evaled_url
|
|
54
|
-
eval(self.url)
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def pathname
|
|
58
|
-
pathname = self.evaled_url.split("/")[1..-2].join("/") + "/"
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def basename
|
|
62
|
-
self.evaled_url.split("/").pop
|
|
63
|
-
end
|
|
64
52
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ecm_cms_navigation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 7
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 12
|
|
10
|
+
version: 0.0.12
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Roberto Vasquez Angel
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2012-09-
|
|
18
|
+
date: 2012-09-27 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
name: rails
|