├── README.rdoc ├── README.rdoc.ja ├── app └── views │ └── redmine_wiki_unc │ └── _redmine_wiki_unc_partial.html.erb ├── assets ├── images │ └── bt_wiki_unc.png ├── javascripts │ └── redmine_wiki_unc.js └── stylesheets │ └── redmine_wiki_unc.css ├── init.rb ├── lang └── en.yml ├── lib └── redmine_wiki_unc_hooks.rb ├── test └── test_helper.rb └── toolbar.png /README.rdoc: -------------------------------------------------------------------------------- 1 | = wiki_unc 2 | 3 | == What is this? 4 | 5 | This plugin provides an ability to make a link to files on your server share. 6 | 7 | 8 | 9 | == How to Install 10 | 11 | A. If you have 'git' installed on your system: 12 | 1. Run the commands below: 13 | 14 | $ cd $(REDMINE_HOME) 15 | $ ruby script/plugin install git://github.com/bearmini/redmine_wiki_unc.git 16 | 17 | 2. Restart Redmine 18 | 19 | 20 | B. Otherwise 21 | 1. Download an archived version (.zip file) of the plugin from 22 | http://github.com/bearmini/redmine_wiki_unc/zipball/master 23 | 24 | 2. Unzip it. You are going to have redmine_wiki_unc_xxxxxxx directory. 25 | ('xxxxxxx' might be a combination of some characters) 26 | 27 | 3. Move the directory into redmine\vendor\plugins\ directory. 28 | (You'll get redmine\vendor\plugins\redmine_wiki_unc_xxxxxxx\ 29 | directory and have some files in the directory.) 30 | 31 | 4. Restart Redmine 32 | 33 | 34 | Note: Currently you don't have to do 'rake db:migrate_plugins' because this plugin does not use DBs. 35 | 36 | 37 | 38 | == How to use 39 | 40 | 1. Wherever you can use Wiki notation, you can write 'unc' macro like this: 41 | 42 | {{unc(\\server-name\dir\to\file)}} 43 | 44 | The path is the thing just copied from Windows Explorer. 45 | You need to trim double quotation marks ("...") surrounding the path if exists. 46 | The path can be containing white-space without the double quotation marks. 47 | The path cannot be containing comma(,). 48 | 49 | 2. Then you'll get the HTML tags below: 50 | 51 | \\server-name\dir\to\file 52 | 53 | You can save time to type '/' 5 times! :) 54 | 55 | 56 | == How to update the installed version 57 | 58 | A. If you have the old version installed using 'git': 59 | 1. Run the commands below: 60 | 61 | $ cd $(REDMINE_HOME)/vendor/plugins/redmien_wiki_unc 62 | $ git pull origin master 63 | 64 | 2. Restart Redmine 65 | 66 | B. Otherwise 67 | 1. Repeat the steps for the installation. 68 | (Taking a backup -- just copying the plugin directory to other place -- is recomennded) 69 | 70 | 71 | == Tips 72 | 73 | 1. You can specify a 'label' instead of displaying UNC path. 74 | 75 | {{unc(\\server-name\dir\to\file, Label of the file)}} 76 | 77 | Then you'll get the HTML tags below: 78 | 79 | Label of the file 80 | 81 | 2. If you are using Firefox, you'll be happy with LocalLink plugin. 82 | (Update: The plugin is currently not working with the latest version of Firefox.) 83 | 84 | If you are using Chrome, you'll be happy with LocalLinks plugin. 85 | https://chrome.google.com/webstore/search/LocalLinks 86 | 87 | Internet Explorer can handle file:// scheme without any add-ons. 88 | 89 | For other browsers, please let me know how to work with file:// scheme happily. 90 | 91 | 3. You can create a link from the Wiki Toolbar button. 92 | 93 | [link:toolbar.png] 94 | -------------------------------------------------------------------------------- /README.rdoc.ja: -------------------------------------------------------------------------------- 1 | = Redmine plugin : wiki_unc 2 | 3 | == これは何? 4 | 5 | このプラグインを使うと、Redmine の Wiki ページから、ネットワークのサーバ上の共有ファイルへのリンクを作ることができます。 6 | 7 | 8 | == インストール方法 9 | 10 | A. git がインストールされている環境の場合 11 | 1. 以下のコマンドを実行します。 12 | 13 | $ cd $(REDMINE_HOME) 14 | $ ruby script/plugin install git://github.com/bearmini/redmine_wiki_unc.git 15 | 16 | 2. Redmine を再起動します。 17 | 18 | B. git がインストールされていない環境の場合 19 | 1. このプラグインのファイルが zip にまとめられたバージョンを 20 | 以下の URL からダウンロードします。 21 | http://github.com/bearmini/redmine_wiki_unc/zipball/master 22 | 23 | 2. ダウンロードした zip ファイルを展開します。 24 | redmine_wiki_unc_xxxxxxx という名前のディレクトリができるはずです。 25 | (xxxxxxx の部分は、英数字の組み合わせになります) 26 | 27 | 3. そのディレクトリを、redmine/vendor/plugins/ ディレクトリに 28 | 移動します。 29 | (つまり、redmine/vendor/plugins/redmine_wiki_unc_xxxxxxx/ という 30 | 名前のディレクトリができて、その中にいくつかのファイルが 31 | 存在する状態になるはずです。) 32 | 33 | 4. Redmine を再起動します。 34 | 35 | 36 | == 使い方 37 | 38 | 1. Wiki 記法が使えるところならどこでも、以下のように書くことができます。 39 | 40 | {{unc(\\server-name\dir\to\file)}} 41 | 42 | パスの部分は、エクスプローラからコピーしてきたものです。 43 | もしパスの部分が " (ダブルクオーテーションマーク)でå¾れていたら、 44 | その " を削除してください。 45 | " がなくても、パス名には空白を含めることができます。 46 | パスにはカンマ (,) を含めることができます。 47 | 48 | 2. これで、以下のような HTML タグが生成されます。 49 | 50 | \\server-name\dir\to\file 51 | 52 | '/' を 5 回入力する時間を節約できますね!:) 53 | 54 | 55 | == アップデート方法 56 | 57 | A. git を使ってインストールした場合 58 | 1. 以下のコマンドを実行します。 59 | 60 | $ cd $(REDMINE_HOME)/vendor/plugins/redmine_wiki_unc 61 | $ git pull origin master 62 | 63 | 2. Redmine を再起動します。 64 | 65 | B. git を使わずにインストールした場合 66 | 1. インストール時の手順と同じことを再度行います。 67 | 事前にプラグインのバックアップをとることをおすすめします。 68 | (単にプラグインのディレクトリをどこか他の場所にコピーしてください) 69 | 70 | 71 | == Tips 72 | 73 | 1. UNC のパスを表示させる代わりに、ラベルを指定することができます。 74 | 75 | {{unc(\\server-name\dir\to\file, Label of the file)}} 76 | 77 | こうすると、以下のような HTML タグが生成されます。 78 | 79 | Label of the file 80 | 81 | 2. Firefox をお使いなら、LocalLink プラグインをいれると良いかもしれません。 82 | (現在、LocalLink プラグインは残念ながら最新の Firefox で動作しないようです) 83 | 84 | Chrome をお使いなら、LocalLinks プラグインを入れると良いかもしれません。 85 | https://chrome.google.com/webstore/search/LocalLinks 86 | 87 | IE は標準で file:// スキームを取り扱うことができるので、そのままでファイルへの 88 | リンクが問題なく働きます。 89 | その他のブラウザではどうすれば良いか、ご存じの方は教えてください。 90 | 91 | 3. WikiのToolbarのボタンからリンクを作成できます。 92 | 93 | [link:toolbar.png] 94 | 95 | 96 | -------------------------------------------------------------------------------- /app/views/redmine_wiki_unc/_redmine_wiki_unc_partial.html.erb: -------------------------------------------------------------------------------- 1 | <% 2 | header_tags_content = content_for(:header_tags) 3 | if header_tags_content.present? && header_tags_content.include?('/jstoolbar/') 4 | content_for :header_tags do 5 | javascript_include_tag('redmine_wiki_unc.js', plugin: 'redmine_wiki_unc', 'id' => 'js-redmine-wiki-unc-script-tag', 'data-text-formatting' => Setting.text_formatting) + 6 | stylesheet_link_tag('redmine_wiki_unc.css', plugin: 'redmine_wiki_unc') 7 | end 8 | end 9 | %> 10 | -------------------------------------------------------------------------------- /assets/images/bt_wiki_unc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bearmini/redmine_wiki_unc/72e7b0c8cf01e873d0f4b1863126f8c12860b5d3/assets/images/bt_wiki_unc.png -------------------------------------------------------------------------------- /assets/javascripts/redmine_wiki_unc.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | if(typeof jsToolBar === 'undefined') return false; 3 | 4 | // Create button 5 | var modalHtml = '
'
7 | + 'Address
'
8 | + '
'
9 | + 'Try link'
10 | + '
Text to display