Wiki Extensions en

Version 51 (Haru Iida, 09/23/2011 04:23 pm)

1 1 Haru Iida
h1. Redmine Wiki Extensions Plugin
2 1 Haru Iida
3 1 Haru Iida
{{>toc}}
4 1 Haru Iida
5 27 Haru Iida
日本語は [[Wiki Extensions|こちら]].
6 27 Haru Iida
7 4 Haru Iida
This plugin adds usefull wiki macros into your Redmine.
8 1 Haru Iida
9 1 Haru Iida
h2. Downloads
10 1 Haru Iida
11 41 Haru Iida
"bitbucket":https://bitbucket.org/haru_iida/redmine_wiki_extensions/downloads
12 1 Haru Iida
13 17 Haru Iida
h3. Installation
14 17 Haru Iida
15 17 Haru Iida
# Copy the plugin into the vendor/plugins directory
16 17 Haru Iida
# Migrate plugin: rake db:migrate_plugins RAILS_ENV=production
17 17 Haru Iida
# Start Redmine
18 18 Haru Iida
# Enable the module on the project setting page.
19 1 Haru Iida
20 1 Haru Iida
h2. Footnote
21 1 Haru Iida
22 11 Haru Iida
This macro creates {{fn(footnotes, Notes of text placed at the bottom of a page.)}} in wiki pages.
23 1 Haru Iida
24 2 Haru Iida
h3. Syntacs
25 1 Haru Iida
26 34 Haru Iida
{{@fn(word, description)@}}: 
27 2 Haru Iida
28 2 Haru Iida
ex.
29 1 Haru Iida
30 1 Haru Iida
31 34 Haru Iida
*This site is {{@fn(Redmine, One of the best project management tool.)@}} site.*
32 34 Haru Iida
33 34 Haru Iida
34 2 Haru Iida
"This site is {{fn(Redmine, One of the best project management tool.)}} site."
35 1 Haru Iida
36 12 Haru Iida
You can see footnotes on the bottom of this page.
37 1 Haru Iida
38 15 Haru Iida
h2. Adding comment form
39 1 Haru Iida
40 4 Haru Iida
You can add a comment form in a page.
41 1 Haru Iida
42 4 Haru Iida
h3. Syntacs
43 1 Haru Iida
44 34 Haru Iida
{{@comment_form@}} displays the comment form in a page. And {{@comments@}} macro displays the list of comment.
45 1 Haru Iida
46 1 Haru Iida
{{comments}}
47 1 Haru Iida
{{comment_form}}
48 1 Haru Iida
49 1 Haru Iida
50 15 Haru Iida
h2. Link to the page of other projects.
51 1 Haru Iida
52 14 Haru Iida
{{new(2009-06-11)}}
53 14 Haru Iida
54 5 Haru Iida
You can create the link to the page of other projects.
55 1 Haru Iida
56 5 Haru Iida
h3. Syntacs
57 1 Haru Iida
58 5 Haru Iida
* @{{wiki(project_name, wiki_page)}}@
59 5 Haru Iida
* @{{wiki(project_name, wiki_page, alias)}}@
60 5 Haru Iida
* @{{wiki(project_identifier, wiki_page)}}@
61 5 Haru Iida
* @{{wiki(project_identifier, wiki_page, alias)}}@
62 1 Haru Iida
63 1 Haru Iida
64 5 Haru Iida
h2. Link to other projects
65 14 Haru Iida
66 14 Haru Iida
67 14 Haru Iida
{{new(2009-06-11)}}
68 1 Haru Iida
69 5 Haru Iida
You can create the link to projects.
70 1 Haru Iida
71 5 Haru Iida
h3. Syntacs
72 1 Haru Iida
73 5 Haru Iida
* @{{project(project_name)}}@
74 5 Haru Iida
* @{{project(project_name, alias)}}@
75 1 Haru Iida
* @{{project(project_identifier)}}@
76 5 Haru Iida
* @{{project(project_identifier, alias)}}@
77 1 Haru Iida
78 1 Haru Iida
79 5 Haru Iida
ex.)
80 1 Haru Iida
81 34 Haru Iida
*The project of Wiki Extensions Plugin is {{@project(Wiki Extensions, here)@}}.*
82 34 Haru Iida
83 34 Haru Iida
84 1 Haru Iida
"The project of Wiki Extensions Plugin is {{project(Wiki Extensions, here)}}."
85 13 Haru Iida
86 13 Haru Iida
h2. New macro
87 13 Haru Iida
88 13 Haru Iida
{{new(2009-06-12)}}
89 13 Haru Iida
90 13 Haru Iida
h3. Syntacs
91 13 Haru Iida
92 32 Haru Iida
* {{@new(yyyy-mm-dd)@}}
93 32 Haru Iida
* {{@new(yyyy-mm-dd, expire)@}}
94 1 Haru Iida
95 1 Haru Iida
96 15 Haru Iida
Displays the string "new" if specific date does not expired. Default of expire is 5 days.
97 15 Haru Iida
98 15 Haru Iida
h2. Tags
99 15 Haru Iida
100 16 Haru Iida
{{new(2009-06-23)}}
101 16 Haru Iida
102 1 Haru Iida
You can see the tag input form at the bottom of the wiki editing page. You can add several tags to each wiki pages. 
103 15 Haru Iida
104 15 Haru Iida
And {{@tagcloud@}} macro displays the tag cloud. so you can write this macro into [[SideBar]] like this site.
105 34 Haru Iida
106 38 Haru Iida
{{@taggedpages(tagname)@}} macro displays the list of pages which have specified tag.{{new(2010-10-05)}}
107 35 Haru Iida
108 46 Haru Iida
{{@taggedpages(tagname1[,tagname2..,tagnamen], project)@}} macro displays the list of pages of project which have specified tags.{{new(2010-12-06)}}
109 39 Haru Iida
110 39 Haru Iida
111 20 Haru Iida
h2. Editing Style Sheet
112 20 Haru Iida
113 20 Haru Iida
{{new(2009-07-16)}}
114 20 Haru Iida
115 20 Haru Iida
You can write CSS in the page named [[StyleSheet]]. This CSS is included in a HTML header of each page. Each page means every module of the project. not only wiki.
116 20 Haru Iida
So. you can even create a project-specific theme.
117 1 Haru Iida
118 20 Haru Iida
And if you want to change a style of a part of the page, you can use following macros.
119 20 Haru Iida
120 1 Haru Iida
* {{@div_start_tag(id_name)@}} is changed to、< div id="id_name">.
121 32 Haru Iida
* {{@div_start_tag(id_name, class_name)@}} is changed to< div id="id_name" class="class_name">.
122 32 Haru Iida
* {{@div_end_tag@}} is changed to < /div>.
123 20 Haru Iida
124 20 Haru Iida
ex.
125 20 Haru Iida
126 20 Haru Iida
127 34 Haru Iida
{{@div_start_tag(sample_tag)@}}
128 34 Haru Iida
129 20 Haru Iida
Style of this line was changed.
130 20 Haru Iida
131 34 Haru Iida
{{@div_end_tag@}}
132 20 Haru Iida
133 34 Haru Iida
134 1 Haru Iida
{{div_start_tag(sample_tag)}}
135 1 Haru Iida
136 20 Haru Iida
Style of this line was changed.
137 20 Haru Iida
138 20 Haru Iida
{{div_end_tag}}
139 20 Haru Iida
140 21 Haru Iida
h2. Footer
141 21 Haru Iida
142 21 Haru Iida
{{new(2009-08-04)}}
143 21 Haru Iida
144 21 Haru Iida
If you create the page named "Footer", you can see it at the bottom of the every pages.
145 22 Haru Iida
146 21 Haru Iida
For example. If you want to add the comment form to every pages, you should write like below.
147 21 Haru Iida
148 34 Haru Iida
{{@comments@}}
149 34 Haru Iida
150 34 Haru Iida
{{@comment_form@}}
151 34 Haru Iida
152 51 Haru Iida
h3. Comment notification
153 34 Haru Iida
154 51 Haru Iida
{{new(2011-09-23)}}
155 51 Haru Iida
156 51 Haru Iida
Watchers of wiki page can get notification if comment was added. You can configure about notification at Adminitistion -> Settings -> Email notifications.
157 51 Haru Iida
158 51 Haru Iida
159 21 Haru Iida
h2. Recently added pages
160 21 Haru Iida
161 21 Haru Iida
{{new(2009-08-04)}}
162 21 Haru Iida
163 33 Haru Iida
{{@recent@}} macro displays the list of the pages that were changed within last 5 days. If you specify the argument like {{@recent(10)@}}, it displays the pages that were changed within 10 days.
164 23 Haru Iida
165 24 Haru Iida
h2. Displays the person who updated the page. 
166 23 Haru Iida
167 23 Haru Iida
{{new(2009-09-06,14)}}
168 23 Haru Iida
169 33 Haru Iida
{{@lastupdated_by@}} macro displays the name of user who updated the wiki page.
170 23 Haru Iida
171 24 Haru Iida
h2. Displays the time when the page was updated.
172 23 Haru Iida
173 23 Haru Iida
{{new(2009-09-06,14)}}
174 23 Haru Iida
175 33 Haru Iida
{{@lastupdated_at@}} macrodisplays the timestamp when the wiki page was updated.
176 23 Haru Iida
177 25 Haru Iida
h2. Add tabs to project menu.
178 23 Haru Iida
179 23 Haru Iida
{{new(2009-09-06,14)}}
180 23 Haru Iida
181 26 Haru Iida
You can add project menu tabs that links to wiki page.
182 23 Haru Iida
183 23 Haru Iida
!setting.jpg!
184 23 Haru Iida
185 23 Haru Iida
!menu.jpg!
186 28 Haru Iida
187 1 Haru Iida
h2. Displays the page of other site.
188 1 Haru Iida
189 28 Haru Iida
190 28 Haru Iida
{{new(2009-10-08,14)}}
191 28 Haru Iida
192 28 Haru Iida
iframe macro displays the page of other site into the wiki page.
193 28 Haru Iida
194 28 Haru Iida
h3. Syntacs
195 1 Haru Iida
196 35 Haru Iida
{{@iframe(url)@}}
197 32 Haru Iida
{{@iframe(url, width, height)@}} or
198 32 Haru Iida
{{@iframe(url, width, height, scrolling)@}} 
199 28 Haru Iida
200 28 Haru Iida
scrolling is a value of scrolling option of iframe.[yes, no, auto]
201 28 Haru Iida
202 28 Haru Iida
h3. example
203 28 Haru Iida
204 28 Haru Iida
Displaying wikipedia.
205 28 Haru Iida
206 28 Haru Iida
207 34 Haru Iida
{{@iframe(http://en.wikipedia.org/wiki/Redmine, 700, 400)@}}
208 34 Haru Iida
209 34 Haru Iida
210 28 Haru Iida
{{iframe(http://en.wikipedia.org/wiki/Redmine, 700, 400)}}
211 29 Haru Iida
212 29 Haru Iida
h2. Access counter
213 29 Haru Iida
214 29 Haru Iida
{{new(2009-10-31,14)}}
215 29 Haru Iida
216 29 Haru Iida
217 34 Haru Iida
{{@count@}} macro counts acesses to the wiki pages. You can write this macro into the wiki page that you want to count accesses. If you want to count accesses to all of the pages, you can write {{@count@}} to the [[Footer]] page.
218 29 Haru Iida
219 32 Haru Iida
{{@show_count@}} macro displays the count of the page.
220 29 Haru Iida
221 32 Haru Iida
{{@popularity@}} macro displays the list of the access counts. If you specify the number in the argument, ex. {{@popularity(10)@}}, displays the top 10 access list.
222 30 Haru Iida
223 30 Haru Iida
h2. Auto preview
224 30 Haru Iida
225 30 Haru Iida
{{new(2010-02-02,14)}}
226 1 Haru Iida
227 35 Haru Iida
If you enabled this function, preview of wiki, forum and issue is displayed automatically. You can enable it on project setting page.
228 31 Haru Iida
229 1 Haru Iida
!autopreview.png!
230 35 Haru Iida
231 35 Haru Iida
h2. Sortable table
232 35 Haru Iida
233 35 Haru Iida
{{new(2010-10-05)}}
234 35 Haru Iida
235 37 Haru Iida
You can sort table items by clicking header.
236 35 Haru Iida
237 36 Haru Iida
ex)
238 36 Haru Iida
239 36 Haru Iida
<pre>
240 36 Haru Iida
|_.fruits|_.color|
241 36 Haru Iida
|Apple|Red|
242 36 Haru Iida
|Banana|Yellow|
243 36 Haru Iida
|Mellon|Green|
244 36 Haru Iida
</pre>
245 36 Haru Iida
246 35 Haru Iida
|_.fruits|_.color|
247 35 Haru Iida
|Apple|Red|
248 35 Haru Iida
|Banana|Yellow|
249 35 Haru Iida
|Mellon|Green|
250 35 Haru Iida
251 35 Haru Iida
h2. twitter macro
252 35 Haru Iida
253 35 Haru Iida
{{new(2010-10-05)}}
254 35 Haru Iida
255 35 Haru Iida
{{@twitter(username)@}} macro links to tiwtter page.
256 35 Haru Iida
257 35 Haru Iida
ex.) {{@twitter(haru_iida)@}} -> {{twitter(haru_iida)}} 
258 39 Haru Iida
259 39 Haru Iida
h3. vote macro
260 39 Haru Iida
261 39 Haru Iida
{{new(2010-12-6)}}
262 39 Haru Iida
263 39 Haru Iida
{{@vote(key)@}} macro displays a link for vote. You must specify a "key" which is unique in the page.
264 39 Haru Iida
ex.)
265 39 Haru Iida
266 39 Haru Iida
APPLE {{@vote(apple)@}}
267 39 Haru Iida
268 39 Haru Iida
LEMON {{@vote(lemon)@}}
269 39 Haru Iida
270 39 Haru Iida
BANANA {{@vote(banana)@}}
271 39 Haru Iida
272 39 Haru Iida
to
273 39 Haru Iida
274 39 Haru Iida
APPLE {{vote(apple)}}
275 39 Haru Iida
276 39 Haru Iida
LEMON {{vote(lemon)}}
277 39 Haru Iida
278 39 Haru Iida
BANANA {{vote(banana)}}
279 39 Haru Iida
280 39 Haru Iida
{{@vote(key,label)@}} displays label insteadof string "vote".
281 39 Haru Iida
282 39 Haru Iida
ex.)
283 39 Haru Iida
284 39 Haru Iida
{{@vote(apple2, I like apples.)@}}
285 39 Haru Iida
286 39 Haru Iida
{{@vote(lemon2, I like lemons.)@}}
287 39 Haru Iida
288 39 Haru Iida
{{@vote(banana2, I like bananas.)@}}
289 39 Haru Iida
290 40 Haru Iida
to
291 39 Haru Iida
292 39 Haru Iida
{{vote(apple2, I like apples.)}}
293 39 Haru Iida
294 39 Haru Iida
{{vote(lemon2, I like lemons.)}}
295 39 Haru Iida
296 39 Haru Iida
{{vote(banana2, I like bananas.)}}
297 42 Haru Iida
298 47 Haru Iida
h2. List issues
299 42 Haru Iida
300 47 Haru Iida
{{new(2011-01-19)}}
301 1 Haru Iida
302 47 Haru Iida
ref_issues macro displays list of issues.
303 47 Haru Iida
You can use custom query or keyword for selecting issues.
304 42 Haru Iida
305 47 Haru Iida
306 44 Haru Iida
h3. Syntacs
307 1 Haru Iida
308 1 Haru Iida
{{@ref_issues([options]..., [column]...)@}}
309 1 Haru Iida
310 47 Haru Iida
*options:* 
311 1 Haru Iida
312 50 Tomohisa Kusukawa
* -i=[CustomQuery ID]: ID of custom query.
313 47 Haru Iida
* -q=[CustomQuery name]: Name of custom query.
314 49 Tomohisa Kusukawa
* -s=[WORDs] : select issues that contain WORDs in subject. 
315 49 Tomohisa Kusukawa
* -d=[WORDs] : select issues that contain WORDs in description. 
316 49 Tomohisa Kusukawa
* -w=[WORDs] : select issues that contain WORDs in subject or description.
317 47 Haru Iida
* -p : Only the issues in the same project is displayed. 
318 1 Haru Iida
319 49 Tomohisa Kusukawa
You can specify two or more select option, it affect AND condition.
320 49 Tomohisa Kusukawa
WORDs is one or more search words divided by '|', and multiple words affect OR condition.
321 49 Tomohisa Kusukawa
If you specify no select condition, page name of wiki or number of issue is used for search word.
322 49 Tomohisa Kusukawa
323 47 Haru Iida
*columns:* 
324 47 Haru Iida
You can choose columns that you want to display.
325 47 Haru Iida
If you do not specify the columns, same columns with customquery are displayed.
326 1 Haru Iida
327 47 Haru Iida
* project
328 47 Haru Iida
* tracker
329 47 Haru Iida
* parent
330 47 Haru Iida
* status
331 47 Haru Iida
* priority
332 47 Haru Iida
* subject
333 47 Haru Iida
* author
334 47 Haru Iida
* assigned_to
335 47 Haru Iida
* updated_on
336 47 Haru Iida
* category
337 47 Haru Iida
* fixed_version
338 47 Haru Iida
* start_date
339 47 Haru Iida
* due_date
340 1 Haru Iida
* estimated_hours
341 1 Haru Iida
* done_ratio
342 1 Haru Iida
* created
343 47 Haru Iida
344 47 Haru Iida
h3. example
345 47 Haru Iida
346 49 Tomohisa Kusukawa
{{@ref_issues(-s=ref_issues,subject,fixed_version,done_ratio,status)@}}
347 49 Tomohisa Kusukawa
{{ref_issues(-s=ref_issues,subject,fixed_version,done_ratio,status)}}
348 47 Haru Iida
349 49 Tomohisa Kusukawa
350 49 Tomohisa Kusukawa
{{@ref_issues(-q=プロジェクト毎,-w=wiki extension|jenkins)@}}
351 49 Tomohisa Kusukawa
{{ref_issues(-q=プロジェクト毎,-w=wiki extension|jenkins)}}
352 47 Haru Iida
353 45 Haru Iida
354 43 Haru Iida
h2. Emoticons
355 43 Haru Iida
356 43 Haru Iida
{{new(2011-01-02)}}
357 43 Haru Iida
358 43 Haru Iida
You can add emoticons to wiki page.:)
359 43 Haru Iida
360 43 Haru Iida
!emoticons.png!
361 43 Haru Iida
362 1 Haru Iida
You can also use your original emoticons.
363 1 Haru Iida
364 1 Haru Iida
# Edit redmine_wiki_extensions/config/emocitons.yml
365 1 Haru Iida
# Put your emoticon image into redmine_wiki_extensions/assets/images.
366 1 Haru Iida
# Restart redmine.
367 51 Haru Iida
368 51 Haru Iida
h2. new_page macro
369 51 Haru Iida
370 51 Haru Iida
371 51 Haru Iida
{{new(2011-09-23,14)}}
372 51 Haru Iida
373 51 Haru Iida
{{@new_page@}} macro shows link for creating a new wiki page. You could put this macro on a side bar.