Commit Graph

7 Commits

Author SHA1 Message Date
Toshi MARUYAMA 99e9e7c4cd remove trailing white-spaces from test/unit/lib/redmine/menu_manager/menu_helper_test.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6786 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-08-30 07:52:53 +00:00
Toshi MARUYAMA e5dfd24aa5 back out r6118. use ActionView::TestCase instead of HelperTestCase at MenuHelperTest.
Tests on CI server fail.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6120 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-22 07:55:02 +00:00
Toshi MARUYAMA 2871d56045 use ActionView::TestCase instead of HelperTestCase at test/unit/lib/redmine/menu_manager/menu_helper_test.rb.
ActionView::Helpers::ActiveRecordHelper at test/helper_testcase.rb
does not exist on Rails 3.0.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6118 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-22 04:10:43 +00:00
Jean-Baptiste Barth 17f86d964f Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4509 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-12 23:24:34 +00:00
Eric Davis b75e038255 Updated menus from JPL's feedback.
* Updated Mapper#push documentation
* Renamed :parent_menu to :parent
* Renamed the external API for :child_menus to :children.  Internally it needs
  to stay :child_menus because Tree::TreeNode already defines a children
  method for another purpose

  #4250

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3092 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-25 05:36:56 +00:00
Eric Davis b0999e3764 Add support for unattached menus (generated dynamically)
A MenuItem can define a :child_menus option with a Proc.  When the menus
are rendered, the Proc will be run and the resulting MenuItems will be
added to the page as child menus

  #4250

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3091 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-25 05:36:50 +00:00
Eric Davis 1f06cf8899 Converted Menus to a Tree structure to allow submenus.
* Bundle the rubytree gem
* Patched RubyTree's TreeNode to add some additional methods.
* Converted the menu rendering to walk the Tree of MenuItems to render
  each item
* Added a menu option for :parent_menu to make this menu a child of the parent
* Added a bunch of tests
* Made MenuItem a subclass of Tree::TreeNode in order to use it's methods
  directly
* Changed the exceptions in MenuItem#new to be ArgumentErrors instead of the
  generic RuntimeError

  #4250

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3090 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-25 05:36:44 +00:00