@@ -0,0 +1,5 | |||
|
1 | <div class="wiki"> | |
|
2 | <% cache "wiki/show/#{content.page.id}/#{content.version}" do %> | |
|
3 | <%= textilizable content.text, :attachments => content.page.attachments %> | |
|
4 | <% end %> | |
|
5 | </div> |
@@ -0,0 +1,9 | |||
|
1 | class AddVersionsWikiPageTitle < ActiveRecord::Migration | |
|
2 | def self.up | |
|
3 | add_column :versions, :wiki_page_title, :string | |
|
4 | end | |
|
5 | ||
|
6 | def self.down | |
|
7 | remove_column :versions, :wiki_page_title | |
|
8 | end | |
|
9 | end |
@@ -141,6 +141,7 private | |||
|
141 | 141 | def find_wiki |
|
142 | 142 | @project = Project.find(params[:id]) |
|
143 | 143 | @wiki = @project.wiki |
|
144 | render_404 unless @wiki | |
|
144 | 145 | rescue ActiveRecord::RecordNotFound |
|
145 | 146 | render_404 |
|
146 | 147 | end |
@@ -37,6 +37,13 class Version < ActiveRecord::Base | |||
|
37 | 37 | effective_date && effective_date <= Date.today |
|
38 | 38 | end |
|
39 | 39 | |
|
40 | def wiki_page | |
|
41 | if project.wiki && !wiki_page_title.blank? | |
|
42 | @wiki_page ||= project.wiki.find_page(wiki_page_title) | |
|
43 | end | |
|
44 | @wiki_page | |
|
45 | end | |
|
46 | ||
|
40 | 47 | # Versions are sorted by effective_date |
|
41 | 48 | # Those with no effective_date are at the end, sorted by name |
|
42 | 49 | def <=>(version) |
@@ -21,7 +21,7 | |||
|
21 | 21 | <% elsif version.effective_date %> |
|
22 | 22 | <p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p> |
|
23 | 23 | <% end %> |
|
24 | <p><%=h version.description %></p> | |
|
24 | <p><%=h version.description %></p> | |
|
25 | 25 | <% issues = version.fixed_issues.find(:all, |
|
26 | 26 | :include => [:status, :tracker], |
|
27 | 27 | :conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"], |
@@ -44,7 +44,8 | |||
|
44 | 44 | <em><%= link_to(complete, :controller => 'projects', :action => 'list_issues', :id => @project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1) %> <%= lwr(:label_closed_issues, complete) %> (<%= percentComplete %>%)   |
|
45 | 45 | <%= link_to((total - complete), :controller => 'projects', :action => 'list_issues', :id => @project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1) %> <%= lwr(:label_open_issues, total - complete)%> (<%= percentIncomplete %>%)</em> |
|
46 | 46 | <br /> |
|
47 | <br /> | |
|
47 | <br /> | |
|
48 | <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> | |
|
48 | 49 | <ul> |
|
49 | 50 | <% if total == 0 %> |
|
50 | 51 | <li><%=l(:label_roadmap_no_issues)%></li> |
@@ -25,13 +25,21 | |||
|
25 | 25 | |
|
26 | 26 | <div id="tab-content-versions" class="tab-content" style="display:none;"> |
|
27 | 27 | <table class="list"> |
|
28 | <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th style="width:15%"></th><th style="width:15%"></th></thead> | |
|
28 | <thead> | |
|
29 | <th><%= l(:label_version) %></th> | |
|
30 | <th><%= l(:field_effective_date) %></th> | |
|
31 | <th><%= l(:field_description) %></th> | |
|
32 | <th><%= l(:label_wiki_page) unless @project.wiki.nil? %></th> | |
|
33 | <th style="width:15%"></th> | |
|
34 | <th style="width:15%"></th> | |
|
35 | </thead> | |
|
29 | 36 | <tbody> |
|
30 | 37 | <% for version in @project.versions.sort %> |
|
31 | 38 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
32 | 39 | <td><%=h version.name %></td> |
|
33 | 40 | <td align="center"><%= format_date(version.effective_date) %></td> |
|
34 | 41 | <td><%=h version.description %></td> |
|
42 | <td><%= link_to(version.wiki_page_title, :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td> | |
|
35 | 43 | <td align="center"><small><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></small></td> |
|
36 | 44 | <td align="center"><small><%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></small></td> |
|
37 | 45 | </td> |
@@ -1,11 +1,10 | |||
|
1 | 1 | <%= error_messages_for 'version' %> |
|
2 | 2 | |
|
3 | 3 | <div class="box"> |
|
4 | <!--[form:version]--> | |
|
5 | 4 | <p><%= f.text_field :name, :size => 20, :required => true %></p> |
|
6 | 5 | <p><%= f.text_field :description, :size => 60 %></p> |
|
6 | <p><%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %></p> | |
|
7 | 7 | <p><%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %></p> |
|
8 | <!--[eoform:version]--> | |
|
9 | 8 | </div> |
|
10 | 9 | |
|
11 | 10 | <% content_for :header_tags do %> |
@@ -13,4 +12,4 | |||
|
13 | 12 | <%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> |
|
14 | 13 | <%= javascript_include_tag 'calendar/calendar-setup' %> |
|
15 | 14 | <%= stylesheet_link_tag 'calendar' %> |
|
16 | <% end %> No newline at end of file | |
|
15 | <% end %> |
@@ -19,11 +19,7 | |||
|
19 | 19 | <hr /> |
|
20 | 20 | <% end %> |
|
21 | 21 | |
|
22 | <div class="wiki"> | |
|
23 | <% cache "wiki/show/#{@page.id}/#{@content.version}" do %> | |
|
24 | <%= textilizable @content.text, :attachments => @page.attachments %> | |
|
25 | <% end %> | |
|
26 | </div> | |
|
22 | <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> | |
|
27 | 23 | |
|
28 | 24 | <%= link_to_attachments @page.attachments, :delete_url => (authorize_for('wiki', 'destroy_attachment') ? {:controller => 'wiki', :action => 'destroy_attachment', :page => @page.title} : nil) %> |
|
29 | 25 |
@@ -346,6 +346,7 label_all_words: Всички думи | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Wiki редакция |
|
348 | 348 | label_wiki_edit_plural: Wiki редакции |
|
349 | label_wiki_page: Wiki page | |
|
349 | 350 | label_wiki_page_plural: Wiki pages |
|
350 | 351 | label_page_index: Индекс |
|
351 | 352 | label_current_version: Текуща версия |
@@ -346,6 +346,7 label_all_words: Alle Wörter | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Wiki Bearbeitung |
|
348 | 348 | label_wiki_edit_plural: Wiki Bearbeitungen |
|
349 | label_wiki_page: Wiki page | |
|
349 | 350 | label_wiki_page_plural: Wiki pages |
|
350 | 351 | label_page_index: Index |
|
351 | 352 | label_current_version: Gegenwärtige Version |
@@ -346,6 +346,7 label_all_words: All words | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Wiki edit |
|
348 | 348 | label_wiki_edit_plural: Wiki edits |
|
349 | label_wiki_page: Wiki page | |
|
349 | 350 | label_wiki_page_plural: Wiki pages |
|
350 | 351 | label_page_index: Index |
|
351 | 352 | label_current_version: Current version |
@@ -346,6 +346,7 label_all_words: Todas las palabras | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Wiki edit |
|
348 | 348 | label_wiki_edit_plural: Wiki edits |
|
349 | label_wiki_page: Wiki page | |
|
349 | 350 | label_wiki_page_plural: Wiki pages |
|
350 | 351 | label_page_index: Índice |
|
351 | 352 | label_current_version: Versión actual |
@@ -346,6 +346,7 label_all_words: Tous les mots | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Révision wiki |
|
348 | 348 | label_wiki_edit_plural: Révisions wiki |
|
349 | label_wiki_page: Page wiki | |
|
349 | 350 | label_wiki_page_plural: Pages wiki |
|
350 | 351 | label_page_index: Index |
|
351 | 352 | label_current_version: Version actuelle |
@@ -346,6 +346,7 label_all_words: Tutte le parole | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Modifica Wiki |
|
348 | 348 | label_wiki_edit_plural: Modfiche wiki |
|
349 | label_wiki_page: Wiki page | |
|
349 | 350 | label_wiki_page_plural: Wiki pages |
|
350 | 351 | label_page_index: Indice |
|
351 | 352 | label_current_version: Versione corrente |
@@ -347,6 +347,7 label_all_words: すべての単語 | |||
|
347 | 347 | label_wiki: Wiki |
|
348 | 348 | label_wiki_edit: Wiki編集 |
|
349 | 349 | label_wiki_edit_plural: Wiki編集 |
|
350 | label_wiki_page: Wiki page | |
|
350 | 351 | label_wiki_page_plural: Wikiページ |
|
351 | 352 | label_page_index: 索引 |
|
352 | 353 | label_current_version: 最新版 |
@@ -346,6 +346,7 label_all_words: Alle woorden | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Wiki edit |
|
348 | 348 | label_wiki_edit_plural: Wiki edits |
|
349 | label_wiki_page: Wiki page | |
|
349 | 350 | label_wiki_page_plural: Wiki pages |
|
350 | 351 | label_page_index: Index |
|
351 | 352 | label_current_version: Huidige versie |
@@ -346,6 +346,7 label_all_words: Todas as palavras | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Wiki edit |
|
348 | 348 | label_wiki_edit_plural: Wiki edits |
|
349 | label_wiki_page: Wiki page | |
|
349 | 350 | label_wiki_page_plural: Wiki pages |
|
350 | 351 | label_page_index: Index |
|
351 | 352 | label_current_version: Versao atual |
@@ -346,6 +346,7 label_all_words: Todas as palavras | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Wiki edit |
|
348 | 348 | label_wiki_edit_plural: Wiki edits |
|
349 | label_wiki_page: Wiki page | |
|
349 | 350 | label_wiki_page_plural: Wiki pages |
|
350 | 351 | label_page_index: Index |
|
351 | 352 | label_current_version: Versão atual |
@@ -346,6 +346,8 label_all_words: Alla ord | |||
|
346 | 346 | label_wiki: Wiki |
|
347 | 347 | label_wiki_edit: Wiki editera |
|
348 | 348 | label_wiki_edit_plural: Wiki editeringar |
|
349 | label_wiki_page: Wiki page | |
|
350 | label_wiki_page_plural: Wiki pages | |
|
349 | 351 | label_page_index: Index |
|
350 | 352 | label_current_version: Nuvarande version |
|
351 | 353 | label_preview: Preview |
General Comments 0
You need to be logged in to leave comments.
Login now