Mercurial > hg > soundsoftware-site
comparison vendor/plugins/embedded/init.rb @ 231:5d6e2819f3dd cannam-pre-20110113-merge
Merge from branch "feature_20". This initial implementation of #20 has been tested, but needs to be tested again in the proper context.
author | Chris Cannam |
---|---|
date | Thu, 17 Feb 2011 18:35:11 +0000 |
parents | 317821dd92c9 |
children |
comparison
equal
deleted
inserted
replaced
206:30203ffaa612 | 231:5d6e2819f3dd |
---|---|
1 require 'redmine' | |
2 require 'embedded' | |
3 | |
4 Redmine::Plugin.register :embedded do | |
5 name 'Embedded' | |
6 author 'Jean-Philippe Lang' | |
7 description 'Embed various documentations in your projects' | |
8 version '0.0.1' | |
9 settings :default => { 'path' => '/var/doc/{PROJECT}/html', | |
10 'index' => 'main.html overview-summary.html index.html', | |
11 'extensions' => 'html png gif', | |
12 'template' => '', | |
13 'encoding' => '', | |
14 'menu' => 'Embedded' }, | |
15 :partial => 'settings/embedded' | |
16 | |
17 project_module :embedded do | |
18 permission :view_embedded_doc, {:embedded => :index} | |
19 end | |
20 | |
21 menu :project_menu, :embedded, { :controller => 'embedded', :action => 'index', :path => nil }, | |
22 :caption => Proc.new { Setting.plugin_embedded['menu'] }, | |
23 :if => Proc.new { !Setting.plugin_embedded['menu'].blank? } | |
24 end | |
25 | |
26 # Routes | |
27 class << ActionController::Routing::Routes;self;end.class_eval do | |
28 define_method :clear!, lambda {} | |
29 end | |
30 | |
31 ActionController::Routing::Routes.draw do |map| | |
32 map.connect 'embedded/:id/*path', :controller => 'embedded', :action => 'index' | |
33 end |