Adds a branch for unlimited project hierarchy.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2148 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-19 20:51:35 +00:00
parent 7ae224f5c2
commit 04fea923a4
1272 changed files with 119640 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# Sample plugin controller
class ExampleController < ApplicationController
unloadable
layout 'base'
before_filter :find_project, :authorize
def say_hello
@value = Setting.plugin_sample_plugin['sample_setting']
end
def say_goodbye
end
private
def find_project
@project=Project.find(params[:id])
end
end

View File

@@ -0,0 +1,11 @@
class Meeting < ActiveRecord::Base
belongs_to :project
acts_as_event :title => Proc.new {|o| "#{o.scheduled_on} Meeting"},
:datetime => :scheduled_on,
:author => nil,
:url => Proc.new {|o| {:controller => 'meetings', :action => 'show', :id => o.id}}
acts_as_activity_provider :timestamp => 'scheduled_on',
:find_options => { :include => :project }
end

View File

@@ -0,0 +1,5 @@
<p class="icon icon-example-works"><%= l(:text_say_goodbye) %></p>
<% content_for :header_tags do %>
<%= stylesheet_link_tag "example.css", :plugin => "sample_plugin", :media => "screen" %>
<% end %>

View File

@@ -0,0 +1,9 @@
<p class="icon icon-example-works"><%= l(:text_say_hello) %></p>
<p><label>Example setting</label>: <%= @value %></p>
<%= link_to_if_authorized 'Good bye', :action => 'say_goodbye', :id => @project %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag "example.css", :plugin => "sample_plugin", :media => "screen" %>
<% end %>

View File

@@ -0,0 +1,3 @@
<p><label>Example setting</label><%= text_field_tag 'settings[sample_setting]', @settings['sample_setting'] %></p>
<p><label>Foo</label><%= text_field_tag 'settings[foo]', @settings['foo'] %></p>