Merged rails-3.2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -4,10 +4,11 @@ This is a sample plugin for Redmine
|
||||
|
||||
== Installation
|
||||
|
||||
1. Copy the plugin directory into the vendor/plugins directory
|
||||
1. Copy the plugin directory into the "plugins" directory at the root
|
||||
of your Redmine directory
|
||||
|
||||
2. Migrate plugin:
|
||||
rake db:migrate_plugins
|
||||
2. Migrate and copy plugin assets:
|
||||
rake redmine:plugins
|
||||
|
||||
3. Start Redmine
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<h2>Good Bye</h2>
|
||||
|
||||
<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" %>
|
||||
<%= stylesheet_link_tag "/plugin_assets/sample_plugin/stylesheets/example.css", :media => "screen" %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<h2>Hello</h2>
|
||||
|
||||
<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 %>
|
||||
<%= link_to('Good bye', :action => 'say_goodbye', :id => @project) if User.current.allowed_to?(:example_say_goodbye, @project) %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<p>Adding content to the sidebar...</p>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "example.css", :plugin => "sample_plugin", :media => "screen" %>
|
||||
<%= stylesheet_link_tag "/plugin_assets/sample_plugin/stylesheets/example.css", :media => "screen" %>
|
||||
<% end %>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Plugin's routes
|
||||
# See: http://guides.rubyonrails.org/routing.html
|
||||
|
||||
match 'projects/:id/hello', :to => 'example#say_hello', :via => 'get'
|
||||
match 'projects/:id/bye', :to => 'example#say_goodbye', :via => 'get'
|
||||
|
||||
resources 'meetings'
|
||||
@@ -1,7 +1,4 @@
|
||||
# Redmine sample plugin
|
||||
require 'redmine'
|
||||
|
||||
RAILS_DEFAULT_LOGGER.info 'Starting Example plugin for RedMine'
|
||||
Rails.logger.info 'Starting Example plugin for RedMine'
|
||||
|
||||
Redmine::Plugin.register :sample_plugin do
|
||||
name 'Example plugin'
|
||||
|
||||
Reference in New Issue
Block a user