-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 60e54fd
Showing
9 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
=== ezSidebar Plugin 0.1.0 | ||
|
||
This is a plugin to make it easy to add content(like google ads) to redmine' right sidebar. | ||
ONLY compatible with Redmine 0.9 or last devel. | ||
Maybe compatible with Redmine 0.8.4 but not tested. | ||
|
||
=== Plugin installation | ||
|
||
1. Copy the plugin directory(redmine_ezsidebar) into the vendor/plugins directory | ||
NOTE: The plugin directory must be redmine_ezsidebar! | ||
|
||
2. Start Redmine | ||
|
||
Installed plugins are listed on 'Admin -> Plugin' screen. | ||
|
||
=== Usage | ||
|
||
1. Input content's html code you want to display in sidebar in plugin's setting page. | ||
|
||
2. Now the content will be displayed in every page's sidebar. | ||
|
||
=== Roadmap | ||
|
||
1. Able to choose projects and modules where to add the content. | ||
|
||
2. Able to input distinct content for different projects. | ||
|
||
=== Contact info | ||
|
||
Homepage -> http://ezwork.techcon.thtf.com.cn/projects/ezwork powered by redmine | ||
Email -> zouchaoqun@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<p> | ||
<label><%= l(:label_sidebar_content) %></label> | ||
<%= text_area_tag 'settings[sidebar_content]', @settings['sidebar_content'], :rows => 10, :cols => 80 %> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
en: | ||
label_sidebar_content: "Sidebar Content(HTML)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
zh: | ||
label_sidebar_content: "边栏内容(HTML)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# ezSidebar plugin for redMine | ||
# Copyright (C) 2008-2009 Zou Chaoqun | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
|
||
require 'redmine' | ||
|
||
# Hooks | ||
require_dependency 'ezsidebar_layouts_hook' | ||
|
||
Redmine::Plugin.register :redmine_ezsidebar do | ||
name 'Redmine ezSidebar plugin' | ||
author 'Zou Chaoqun' | ||
description 'This is a plugin for Redmine to make easy to insert content to its sidebar' | ||
version '0.1.0' | ||
url 'http://ezwork.techcon.thtf.com.cn/projects/ezwork' | ||
author_url 'mailto:zouchaoqun@gmail.com' | ||
settings :default => {'sidebar_content' => '[input html code here]'}, :partial => 'settings/settings' | ||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
en: | ||
label_sidebar_content: "Sidebar Content(HTML)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
zh: | ||
label_sidebar_content: "边栏内容(HTML)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Hooks to attach to the Redmine base layouts(for right sidebar). | ||
class EzsidebarLayoutHook < Redmine::Hook::ViewListener | ||
|
||
def view_layouts_base_sidebar(context = { }) | ||
if !Setting.plugin_redmine_ezsidebar['sidebar_content'].empty? | ||
"<p>#{Setting.plugin_redmine_ezsidebar['sidebar_content']}</p>" | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Load the normal Rails helper | ||
require File.expand_path(File.dirname(__FILE__) + '/../../../../test/test_helper') | ||
|
||
# Ensure that we are using the temporary fixture path | ||
Engines::Testing.set_fixture_path |