Convert file from Dos format (dos2unix)

This commit is contained in:
Victor LABORIE 2017-08-31 11:40:30 +02:00
parent dd1d7bb735
commit b7c1dceda3
2 changed files with 92 additions and 92 deletions

View file

@ -1,41 +1,41 @@
= Redmine Wiki Notes Plugin = Redmine Wiki Notes Plugin
== Plugin installation == Plugin installation
1. Copy the plugin directory into the vendor/plugins directory 1. Copy the plugin directory into the vendor/plugins directory
2. Restart Redmine 2. Restart Redmine
== Usage == Usage
The following macros are added: The following macros are added:
* note * note
* tip * tip
* important * important
* warning * warning
which can be used in one of three ways: which can be used in one of three ways:
{{note(text with *wiki formatting*)}} {{note(text with *wiki formatting*)}}
{{note {{note
Alternately, you can put blocks of *wiki-formatted* text here. Alternately, you can put blocks of *wiki-formatted* text here.
}} }}
{{note(Or if you really want) {{note(Or if you really want)
You can do both... You can do both...
}} }}
This displays a block in the wiki page with a corresponding This displays a block in the wiki page with a corresponding
icon and the specified text. icon and the specified text.
== Credits == Credits
The icons and the stylesheet were taken from the DokuWiki Note-Plugin ((c) Olivier The icons and the stylesheet were taken from the DokuWiki Note-Plugin ((c) Olivier
Cortès and others, http://www.dokuwiki.org/plugin:note (GPLv2)). Cortès and others, http://www.dokuwiki.org/plugin:note (GPLv2)).
For the contributors, please see the git commit log. For the contributors, please see the git commit log.
== License == License
This plugin is released under the GPLv2. This plugin is released under the GPLv2.

102
init.rb
View file

@ -1,51 +1,51 @@
# Wiki Notes plugin for Redmine # Wiki Notes plugin for Redmine
# Copyright (C) 2010 Daniel Seifert # Copyright (C) 2010 Daniel Seifert
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require 'redmine' require 'redmine'
begin begin
require 'config/initializers/session_store.rb' require 'config/initializers/session_store.rb'
rescue LoadError rescue LoadError
end end
def init_redmine_wiki_notes def init_redmine_wiki_notes
Dir::foreach(File.join(File.dirname(__FILE__), 'lib')) do |file| Dir::foreach(File.join(File.dirname(__FILE__), 'lib')) do |file|
next unless /\.rb$/ =~ file next unless /\.rb$/ =~ file
require_dependency file require_dependency file
end end
end end
if Rails::VERSION::MAJOR >= 3 if Rails::VERSION::MAJOR >= 3
ActionDispatch::Callbacks.to_prepare do ActionDispatch::Callbacks.to_prepare do
init_redmine_wiki_notes init_redmine_wiki_notes
end end
else else
Dispatcher.to_prepare :redmine_wiki_notes do Dispatcher.to_prepare :redmine_wiki_notes do
init_redmine_wiki_notes init_redmine_wiki_notes
end end
end end
require 'redcloth3' require 'redcloth3'
Redmine::Plugin.register :redmine_wiki_notes do Redmine::Plugin.register :redmine_wiki_notes do
name 'Redmine Wiki Notes plugin' name 'Redmine Wiki Notes plugin'
author 'Daniel Seifert' author 'Daniel Seifert'
description 'Allows adding different kinds of notes into a wiki page' description 'Allows adding different kinds of notes into a wiki page'
url "http://www.github.com/dseifert/redmine_wiki_notes" if respond_to?(:url) url "http://www.github.com/dseifert/redmine_wiki_notes" if respond_to?(:url)
version '0.0.2' version '0.0.2'
requires_redmine :version_or_higher => '2.3.0' requires_redmine :version_or_higher => '2.3.0'
RedCloth3::ALLOWED_TAGS << "div" RedCloth3::ALLOWED_TAGS << "div"
end end