diff --git a/app/views/wiki_extensions/_html_header.html.erb b/app/views/wiki_extensions/_html_header.html.erb index 123c9fa..4e4d764 100644 --- a/app/views/wiki_extensions/_html_header.html.erb +++ b/app/views/wiki_extensions/_html_header.html.erb @@ -28,8 +28,8 @@ <% end -%> - <%= javascript_include_tag(baseurl + "/plugin_assets/redmine_wiki_extensions/javascripts/jquery.tablesorter.js") %> - <%= stylesheet_link_tag(baseurl + "/plugin_assets/redmine_wiki_extensions/stylesheets/wiki_extensions.css") %> - <%= stylesheet_link_tag(baseurl + "/plugin_assets/redmine_wiki_extensions/stylesheets/wiki_extensions_print.css", :media => 'print') %> - <%= javascript_include_tag(baseurl + "/plugin_assets/redmine_wiki_extensions/javascripts/wiki_extensions.js") %> + <%= javascript_include_tag("jquery.tablesorter.js", plugin: "redmine_wiki_extensions") %> + <%= stylesheet_link_tag("wiki_extensions.css", plugin: "redmine_wiki_extensions") %> + <%= stylesheet_link_tag("wiki_extensions_print.css", plugin: "redmine_wiki_extensions", media: 'print') %> + <%= javascript_include_tag("wiki_extensions.js", plugin: "redmine_wiki_extensions") %> <% end %> diff --git a/assets/javascripts/wiki_smiles.js b/assets/javascripts/wiki_smiles.js index 7813597..59ba9fe 100644 --- a/assets/javascripts/wiki_smiles.js +++ b/assets/javascripts/wiki_smiles.js @@ -64,7 +64,7 @@ jsTooltip.prototype = { this.a.className = 'smiles'; this.img = document.createElement('img'); this.img.title = 'Smiles'; - this.img.src = redmine_base_url + '/plugin_assets/redmine_wiki_extensions/images/main_smile.png?dummy_param'; + this.img.src = 'plugin_assets/redmine_wiki_extensions/images/main_smile.png?dummy_param'; this.img.id = 'smiles_img'; this.img.tabIndex = 200; this.a.appendChild(this.img); diff --git a/init.rb b/init.rb index dd8569d..4a29f30 100644 --- a/init.rb +++ b/init.rb @@ -42,7 +42,7 @@ author_url 'http://twitter.com/haru_iida' description 'This is a Wiki Extensions plugin for Redmine' url 'http://www.r-labs.org/projects/r-labs/wiki/Wiki_Extensions_en' - version '1.0.0' + version '1.0.1' requires_redmine :version_or_higher => '6.0.0' project_module :wiki_extensions do diff --git a/lib/wiki_extensions_formatter_patch.rb b/lib/wiki_extensions_formatter_patch.rb index 341292b..af0d2e5 100644 --- a/lib/wiki_extensions_formatter_patch.rb +++ b/lib/wiki_extensions_formatter_patch.rb @@ -25,8 +25,7 @@ module WikiExtensionsFormatterPatch private def inline_smiles(text) - baseurl = Redmine::Utils.relative_url_root - src = baseurl + "/plugin_assets/redmine_wiki_extensions/images/" + src = "plugin_assets/redmine_wiki_extensions/images/" @emoticons = WikiExtensionsEmoticons::Emoticons.new @emoticons.emoticons.each{|emoticon| diff --git a/lib/wiki_extensions_helper_patch.rb b/lib/wiki_extensions_helper_patch.rb index db7ac53..de44abe 100644 --- a/lib/wiki_extensions_helper_patch.rb +++ b/lib/wiki_extensions_helper_patch.rb @@ -22,8 +22,7 @@ def heads_for_wiki_formatter super return if ie6_or_ie7? unless @heads_for_wiki_smiles_included - baseurl = Redmine::Utils.relative_url_root - imageurl = baseurl + "/plugin_assets/redmine_wiki_extensions/images" + content_for :header_tags do # o = stylesheet_link_tag("wiki_smiles.css", :plugin => "redmine_wiki_extensions") # o << javascript_include_tag("wiki_smiles.js", :plugin => "redmine_wiki_extensions") diff --git a/lib/wiki_extensions_projects_helper_patch.rb b/lib/wiki_extensions_projects_helper_patch.rb index 70e65dd..89b9494 100644 --- a/lib/wiki_extensions_projects_helper_patch.rb +++ b/lib/wiki_extensions_projects_helper_patch.rb @@ -1,5 +1,5 @@ # Wiki Extensions plugin for Redmine -# Copyright (C) 2009-2021 Haruyuki Iida +# Copyright (C) 2009- Haruyuki Iida # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -18,15 +18,13 @@ require_dependency 'projects_helper' module WikiExtensionsProjectsHelperPatch - def self.apply - ProjectsController.send :helper, WikiExtensionsProjectsHelperPatch - end + def project_settings_tabs tabs = super - action = {:name => 'wiki_extensions', - :controller => 'wiki_extensions_settings', - :action => :show, - :partial => 'wiki_extensions_settings/show', + action = {:name => 'wiki_extensions', + :controller => 'wiki_extensions_settings', + :action => :show, + :partial => 'wiki_extensions_settings/show', :label => :wiki_extensions} tabs << action if User.current.allowed_to?(action, @project) @@ -35,4 +33,4 @@ def project_settings_tabs end end - +ProjectsHelper.prepend(WikiExtensionsProjectsHelperPatch)