Redmine 3.4.4

This commit is contained in:
Manuel Cillero 2018-02-02 22:19:29 +01:00
commit 64924a6376
2112 changed files with 259028 additions and 0 deletions

View file

@ -0,0 +1,20 @@
# Sample plugin controller
class ExampleController < ApplicationController
unloadable
layout 'base'
before_action :find_project, :authorize
menu_item :sample_plugin
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,12 @@
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',
:scope => includes(:project),
:permission => nil
end

View file

@ -0,0 +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', :plugin => 'sample_plugin', :media => "screen" %>
<% end %>

View file

@ -0,0 +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('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', :plugin => 'sample_plugin', :media => "screen" %>
<% end %>

View file

@ -0,0 +1,3 @@
<h3>Sample block</h3>
You are <strong><%= h(User.current) %></strong> and this is a sample block for My Page added from a plugin.

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>