mtoros-mega_menus 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/mega_menus.gemspec +2 -2
- data/rails_generators/menu/templates/helpers/menu_helper.rb +10 -10
- metadata +2 -2
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'echoe'
|
6
6
|
|
7
|
-
Echoe.new('mega_menus', '0.8.
|
7
|
+
Echoe.new('mega_menus', '0.8.4') do |p|
|
8
8
|
p.summary = "Treeview menu Gem for Rails"
|
9
9
|
p.description = "Adds a model, controller to perform the tasks in order to have a treeview menu. To use this gem simply install it and write script/generate menu name_of_the_menu"
|
10
10
|
p.author = ['Marko Toros']
|
data/mega_menus.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{mega_menus}
|
5
|
-
s.version = "0.8.
|
5
|
+
s.version = "0.8.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Marko Toros"]
|
9
|
-
s.date = %q{2008-12-
|
9
|
+
s.date = %q{2008-12-08}
|
10
10
|
s.description = %q{Adds a model, controller to perform the tasks in order to have a treeview menu. To use this gem simply install it and write script/generate menu name_of_the_menu}
|
11
11
|
s.email = %q{mtoros@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/mega_menus.rb", "lib/mega_menus/editor.rb", "lib/mega_menus/view_helpers.rb"]
|
@@ -42,7 +42,7 @@ module <%= "#{file_name.capitalize}editorHelper" %>
|
|
42
42
|
concat( "<ul id=\"ul_<%= "#{file_name}" %>_#{m.depth+1}\" class=\"ul_<%= "#{file_name}" %>_depth_#{m.depth} ul_<%= "#{file_name}" %>\">")
|
43
43
|
if(admin_condition)
|
44
44
|
concat( "<li id=\"root_<%= "#{file_name}" %>_add_#{m.id}\" class=\"<%= "#{file_name}" %>_root_add\">")
|
45
|
-
concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => '<%= "add_menu_form" %>', '<%= "#{file_name}_id" %>' => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_add", :title=> "Add",:id => "add_<%= "#{file_name}" %>_link_#{m.id}"}))
|
45
|
+
concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => '<%= "add_menu_form" %>', '<%= "#{file_name}_id" %>' => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_add all_menus_links_add", :title=> "Add",:id => "add_<%= "#{file_name}" %>_link_#{m.id}"}))
|
46
46
|
concat( "</li>")
|
47
47
|
end
|
48
48
|
firstm=FALSE
|
@@ -57,7 +57,7 @@ module <%= "#{file_name.capitalize}editorHelper" %>
|
|
57
57
|
concat( "<ul id=\"ul_<%= "#{file_name}" %>_#{m.depth}\" class=\"ul_<%= "#{file_name}" %>_depth_#{m.depth} ul_<%= "#{file_name}" %>\">")
|
58
58
|
if(admin_condition)
|
59
59
|
concat( "<li id=\"root_add_#{m.parent_id}\" class=\"root_add\">")
|
60
|
-
concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => 'add_menu_form', <%= ":#{file_name}_id" %> => m.parent_id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_add", :title=> "Add",:id => "add_<%= "#{file_name}" %>_link_#{m.id}"}))
|
60
|
+
concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => 'add_menu_form', <%= ":#{file_name}_id" %> => m.parent_id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_add all_menus_links_add", :title=> "Add",:id => "add_<%= "#{file_name}" %>_link_#{m.id}"}))
|
61
61
|
concat( "</li>")
|
62
62
|
end
|
63
63
|
firstm=FALSE
|
@@ -83,19 +83,19 @@ module <%= "#{file_name.capitalize}editorHelper" %>
|
|
83
83
|
#remove the comment on the following line depending on the view you want to have
|
84
84
|
#concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => 'add_menu_form', <%= "#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "menu_links_add", :title=> "Add",:id => "add_menu_link_#{m.id}"}))
|
85
85
|
# DELETE
|
86
|
-
concat( link_to_remote( "<span>Delete</span>", {:url => {:controller => menu_controller, :action => 'delete_menu', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}, :confirm => "Are you sure?"}, {:class => "<%= "#{file_name}" %>_links_delete", :title=> "Delete",:id => "delete_<%= "#{file_name}" %>_link_#{m.id}"}))
|
86
|
+
concat( link_to_remote( "<span>Delete</span>", {:url => {:controller => menu_controller, :action => 'delete_menu', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}, :confirm => "Are you sure?"}, {:class => "<%= "#{file_name}" %>_links_delete all_menus_links_delete", :title=> "Delete",:id => "delete_<%= "#{file_name}" %>_link_#{m.id}"}))
|
87
87
|
# EDIT
|
88
|
-
concat( link_to_remote( "<span>Edit</span>", {:url => {:controller => menu_controller, :action => 'edit_menu_form', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_edit",:title=> "Edit", :id => "edit_<%= "#{file_name}" %>_link_#{m.id}"}))
|
88
|
+
concat( link_to_remote( "<span>Edit</span>", {:url => {:controller => menu_controller, :action => 'edit_menu_form', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_edit all_menus_links_edit",:title=> "Edit", :id => "edit_<%= "#{file_name}" %>_link_#{m.id}"}))
|
89
89
|
# UP
|
90
|
-
concat( link_to_remote( "<span>Up</span>", {:url => {:controller => menu_controller, :action => 'up_menu', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_up", :title=> "Up",:id => "up_<%= "#{file_name}" %>_link_#{m.id}"}))
|
90
|
+
concat( link_to_remote( "<span>Up</span>", {:url => {:controller => menu_controller, :action => 'up_menu', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_up all_menus_links_up", :title=> "Up",:id => "up_<%= "#{file_name}" %>_link_#{m.id}"}))
|
91
91
|
# DOWN
|
92
|
-
concat( link_to_remote( "<span>Down</span>", {:url => {:controller => menu_controller, :action => 'down_menu', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_down", :title=> "Down", :id => "down_<%= "#{file_name}" %>_link_#{m.id}"}))
|
92
|
+
concat( link_to_remote( "<span>Down</span>", {:url => {:controller => menu_controller, :action => 'down_menu', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_down all_menus_links_down", :title=> "Down", :id => "down_<%= "#{file_name}" %>_link_#{m.id}"}))
|
93
93
|
# PUBLISH
|
94
94
|
if(m.published==TRUE)
|
95
|
-
mp="<%= "#{file_name}" %>_links_published"
|
95
|
+
mp="<%= "#{file_name}" %>_links_published all_menus_links_published"
|
96
96
|
mpt="published"
|
97
97
|
else
|
98
|
-
mp="<%= "#{file_name}" %>_links_not_published"
|
98
|
+
mp="<%= "#{file_name}" %>_links_not_published all_menus_links_not_published"
|
99
99
|
mpt="not published"
|
100
100
|
end
|
101
101
|
concat( link_to_remote( "<span>Publish</span>", {:url => {:controller => menu_controller, :action => 'publish_menu', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => mp, :title=> mpt, :id => "publish_menu_link_#{m.id}"}))
|
@@ -107,7 +107,7 @@ module <%= "#{file_name.capitalize}editorHelper" %>
|
|
107
107
|
if(admin_condition and m.children.empty? and admin_depth.include?(m.depth+1))
|
108
108
|
concat( "<ul id=\"ul_menu_#{m.depth+1}\" class=\"ul_<%= "#{file_name}" %>_depth_#{m.depth+1} ul_<%= "#{file_name}" %>\">")
|
109
109
|
concat( "<li id=\"root_<%= "#{file_name}" %>_add_#{m.id}\" class=\"root_<%= "#{file_name}" %>_add\">")
|
110
|
-
concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => 'add_menu_form', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "menu_<%= "#{file_name}" %>_add", :title=> "Add",:id => "add_<%= "#{file_name}" %>_link_#{m.id}"}))
|
110
|
+
concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => 'add_menu_form', <%= ":#{file_name}_id" %> => m.id,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "menu_<%= "#{file_name}" %>_add all_menus_links_add", :title=> "Add",:id => "add_<%= "#{file_name}" %>_link_#{m.id}"}))
|
111
111
|
add_menu_form(menu_model, menu_controller, m.id)
|
112
112
|
concat( "</li>")
|
113
113
|
concat( "</ul>")
|
@@ -120,7 +120,7 @@ module <%= "#{file_name.capitalize}editorHelper" %>
|
|
120
120
|
concat( "<ul id=\"ul_<%= "#{file_name}" %>_#{admin_depth.first}\" class=\"ul_<%= "#{file_name}" %>_depth_#{admin_depth.first} ul_<%= "#{file_name}" %>\">")
|
121
121
|
if(admin_condition)
|
122
122
|
concat( "<li id=\"root_<%= "#{file_name}" %>_add_#{admin_parent}\" class=\"root_<%= "#{file_name}" %>_add\">")
|
123
|
-
concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => 'add_menu_form', <%= ":#{file_name}_id" %> => admin_parent,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_add", :title=> "Add",:id => "add_<%="#{file_name}"%>_link_#{admin_parent}"}))
|
123
|
+
concat( link_to_remote( "<span>Add</span>", {:url => {:controller => menu_controller, :action => 'add_menu_form', <%= ":#{file_name}_id" %> => admin_parent,:menu_model=>menu_model, :menu_controller=>menu_controller}}, {:class => "<%= "#{file_name}" %>_links_add all_menus_links_add", :title=> "Add",:id => "add_<%="#{file_name}"%>_link_#{admin_parent}"}))
|
124
124
|
add_menu_form(menu_model, menu_controller, admin_parent)
|
125
125
|
concat( "</li>")
|
126
126
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mtoros-mega_menus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marko Toros
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-12-
|
12
|
+
date: 2008-12-08 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|